@searchcraft/vue-sdk 0.12.2 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -1,44 +1,44 @@
1
- (function(X,fe){typeof exports=="object"&&typeof module<"u"?fe(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],fe):(X=typeof globalThis<"u"?globalThis:X||self,fe(X.SearchcraftVueSdk={},X.Vue))})(this,function(X,fe){"use strict";var Rc=Object.defineProperty;var Ec=(X,fe,ft)=>fe in X?Rc(X,fe,{enumerable:!0,configurable:!0,writable:!0,value:ft}):X[fe]=ft;var c=(X,fe,ft)=>Ec(X,typeof fe!="symbol"?fe+"":fe,ft);const ft="searchcraft-javascript-sdk",pt={experimentalSlotFixes:!1,hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var Ja=Object.defineProperty,en=(r,t)=>{for(var e in t)Ja(r,e,{get:t[e],enumerable:!0})},tn="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml",sn=(r,t)=>{var e;const s=t.$cmpMeta$;Object.entries((e=s.$members$)!=null?e:{}).map(([o,[n]])=>{if(n&31||n&32){const h=r[o],u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),o);Object.defineProperty(r,o,{get(){return u.get.call(this)},set(l){u.set.call(this,l)},configurable:!0,enumerable:!0}),r[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):h}})},Ir=new WeakMap,an=r=>Ir.delete(r),Xe=r=>Ir.get(r),nn=(r,t)=>{const e={$flags$:0,$hostElement$:r,$cmpMeta$:t,$instanceValues$:new Map};e.$onReadyPromise$=new Promise(a=>e.$onReadyResolve$=a),r["s-p"]=[],r["s-rc"]=[];const s=Ir.set(r,e);return sn(r,e),s},Rs=(r,t)=>t in r,Zt=(r,t)=>(0,console.error)(r,t),Yt=typeof window<"u"?window:{},mt=Yt.document||{head:{}},J=Yt.HTMLElement||class{},xe={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,t,e,s)=>r.addEventListener(t,e,s),rel:(r,t,e,s)=>r.removeEventListener(t,e,s),ce:(r,t)=>new CustomEvent(r,t)},on=pt.shadowDom,cn=r=>Promise.resolve(r),_r=!1,Es=[],Ts=[],ln=(r,t)=>e=>{r.push(e),_r||(_r=!0,xe.$flags$&4?Mr(Ar):xe.raf(Ar))},Ps=r=>{for(let t=0;t<r.length;t++)try{r[t](performance.now())}catch(e){Zt(e)}r.length=0},Ar=()=>{Ps(Es),Ps(Ts),(_r=Es.length>0)&&xe.raf(Ar)},Mr=r=>cn().then(r),un=ln(Ts),Or=r=>(r=typeof r,r==="object"||r==="function"),hn={};en(hn,{err:()=>$s,map:()=>dn,ok:()=>Lr,unwrap:()=>fn,unwrapErr:()=>pn});var Lr=r=>({isOk:!0,isErr:!1,value:r}),$s=r=>({isOk:!1,isErr:!0,value:r});function dn(r,t){if(r.isOk){const e=t(r.value);return e instanceof Promise?e.then(s=>Lr(s)):Lr(e)}if(r.isErr){const e=r.value;return $s(e)}throw"should never get here"}var fn=r=>{if(r.isOk)return r.value;throw r.value},pn=r=>{if(r.isErr)return r.value;throw r.value},Is=r=>{const t=r.__childNodes||r.childNodes;r.tagName&&r.tagName.includes("-")&&r["s-cr"]&&r.tagName!=="SLOT-FB"&&_s(t,r.tagName).forEach(e=>{var s;e.nodeType===1&&e.tagName==="SLOT-FB"&&((s=mn(e,e["s-sn"],!1))!=null&&s.length?e.hidden=!0:e.hidden=!1)});for(const e of t)e.nodeType===1&&(e.__childNodes||e.childNodes).length&&Is(e)};function _s(r,t,e){let s=0,a=[],o;for(;s<r.length;s++)o=r[s],o["s-sr"]&&o["s-hn"]===t&&e===void 0&&a.push(o),a=[...a,..._s(o.childNodes,t,e)];return a}var mn=(r,t,e=!0)=>{const s=[];for((e&&r["s-sr"]||!r["s-sr"])&&s.push(r);(r=r.nextSibling)&&r["s-sn"]===t;)s.push(r);return s},As=(r,t)=>r.nodeType===1?r.getAttribute("slot")===null&&t===""||r.getAttribute("slot")===t:r["s-sn"]===t?!0:t==="",$t=(r,t="")=>()=>{},m=(r,t,...e)=>{let s=null,a=null,o=null,n=!1,h=!1;const u=[],l=C=>{for(let w=0;w<C.length;w++)s=C[w],Array.isArray(s)?l(s):s!=null&&typeof s!="boolean"&&((n=typeof r!="function"&&!Or(s))&&(s=String(s)),n&&h?u[u.length-1].$text$+=s:u.push(n?Qt(null,s):s),h=n)};if(l(e),t){t.key&&(a=t.key),t.name&&(o=t.name);{const C=t.className||t.class;C&&(t.class=typeof C!="object"?C:Object.keys(C).filter(w=>C[w]).join(" "))}}if(typeof r=="function")return r(t===null?{}:t,u,vn);const p=Qt(r,null);return p.$attrs$=t,u.length>0&&(p.$children$=u),p.$key$=a,p.$name$=o,p},Qt=(r,t)=>{const e={$flags$:0,$tag$:r,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},gn={},bn=r=>r&&r.$tag$===gn,vn={forEach:(r,t)=>r.map(Ms).forEach(t),map:(r,t)=>r.map(Ms).map(t).map(yn)},Ms=r=>({vattrs:r.$attrs$,vchildren:r.$children$,vkey:r.$key$,vname:r.$name$,vtag:r.$tag$,vtext:r.$text$}),yn=r=>{if(typeof r.vtag=="function"){const e={...r.vattrs};return r.vkey&&(e.key=r.vkey),r.vname&&(e.name=r.vname),m(r.vtag,e,...r.vchildren||[])}const t=Qt(r.vtag,r.vtext);return t.$attrs$=r.vattrs,t.$children$=r.vchildren,t.$key$=r.vkey,t.$name$=r.vname,t},Os=(r,t)=>r!=null&&!Or(r)?t&4?r==="false"?!1:r===""||!!r:t&2?parseFloat(r):t&1?String(r):r:r,kn=r=>r,Je=(r,t,e)=>{const s=kn(r);return{emit:a=>Ls(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Ls=(r,t,e)=>{const s=xe.ce(t,e);return r.dispatchEvent(s),s},Kt=new WeakMap,Fs=(r,t,e,s,a,o)=>{if(e!==s){let n=Rs(r,t),h=t.toLowerCase();if(t==="class"){const u=r.classList,l=Ds(e);let p=Ds(s);r["s-si"]?(p.push(r["s-si"]),l.forEach(C=>{C.startsWith(r["s-si"])&&p.push(C)}),p=[...new Set(p)],u.add(...p),delete r["s-si"]):(u.remove(...l.filter(C=>C&&!p.includes(C))),u.add(...p.filter(C=>C&&!l.includes(C))))}else if(t==="style"){for(const u in e)(!s||s[u]==null)&&(u.includes("-")?r.style.removeProperty(u):r.style[u]="");for(const u in s)(!e||s[u]!==e[u])&&(u.includes("-")?r.style.setProperty(u,s[u]):r.style[u]=s[u])}else if(t!=="key")if(!r.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Rs(Yt,h)?t=h.slice(2):t=h[2]+t.slice(3),e||s){const u=t.endsWith(Ns);t=t.replace(xn,""),e&&xe.rel(r,t,e,u),s&&xe.ael(r,t,s,u)}}else{const u=Or(s);if((n||u&&s!==null)&&!a)try{if(r.tagName.includes("-"))r[t]!==s&&(r[t]=s);else{const l=s??"";t==="list"?n=!1:(e==null||r[t]!=l)&&(typeof r.__lookupSetter__(t)=="function"?r[t]=l:r.setAttribute(t,l))}}catch{}s==null||s===!1?(s!==!1||r.getAttribute(t)==="")&&r.removeAttribute(t):(!n||o&4||a)&&!u&&(s=s===!0?"":s,r.setAttribute(t,s))}}},Cn=/\s/,Ds=r=>(typeof r=="object"&&"baseVal"in r&&(r=r.baseVal),r?r.split(Cn):[]),Ns="Capture",xn=new RegExp(Ns+"$"),zs=(r,t,e)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=r&&r.$attrs$||{},o=t.$attrs$||{};for(const n of Hs(Object.keys(a)))n in o||Fs(s,n,a[n],void 0,e,t.$flags$);for(const n of Hs(Object.keys(o)))Fs(s,n,a[n],o[n],e,t.$flags$)};function Hs(r){return r.includes("ref")?[...r.filter(t=>t!=="ref"),"ref"]:r}var Fr,Dr,Xt=!1,Jt=!1,Nr=!1,Te=!1,er=(r,t,e)=>{var s;const a=t.$children$[e];let o=0,n,h,u;if(Xt||(Nr=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=mt.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=mt.createTextNode("");else{if(Te||(Te=a.$tag$==="svg"),n=a.$elm$=mt.createElementNS(Te?tn:rn,!Xt&&pt.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),Te&&a.$tag$==="foreignObject"&&(Te=!1),zs(null,a,Te),a.$children$)for(o=0;o<a.$children$.length;++o)h=er(r,a,o),h&&n.appendChild(h);a.$tag$==="svg"?Te=!1:n.tagName==="foreignObject"&&(Te=!0)}return n["s-hn"]=Dr,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Fr,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,u=r&&r.$children$&&r.$children$[e],u&&u.$tag$===a.$tag$&&r.$elm$&&It(r.$elm$,!1)),n},It=(r,t)=>{xe.$flags$|=1;const e=Array.from(r.__childNodes||r.childNodes);r["s-sr"]&&pt.experimentalSlotFixes;for(let s=e.length-1;s>=0;s--){const a=e[s];a["s-hn"]!==Dr&&a["s-ol"]&&(et(_t(a).parentNode,a,_t(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Nr=!0),t&&It(a,t)}xe.$flags$&=-2},Us=(r,t,e,s,a,o)=>{let n=r["s-cr"]&&r["s-cr"].parentNode||r,h;for(;a<=o;++a)s[a]&&(h=er(null,e,a),h&&(s[a].$elm$=h,et(n,h,_t(t))))},Bs=(r,t,e)=>{for(let s=t;s<=e;++s){const a=r[s];if(a){const o=a.$elm$;o&&(Jt=!0,o["s-ol"]?o["s-ol"].remove():It(o,!0),o.remove())}}},Sn=(r,t,e,s,a=!1)=>{let o=0,n=0,h=0,u=0,l=t.length-1,p=t[0],C=t[l],w=s.length-1,$=s[0],A=s[w],N,D;for(;o<=l&&n<=w;)if(p==null)p=t[++o];else if(C==null)C=t[--l];else if($==null)$=s[++n];else if(A==null)A=s[--w];else if(tr(p,$,a))gt(p,$,a),p=t[++o],$=s[++n];else if(tr(C,A,a))gt(C,A,a),C=t[--l],A=s[--w];else if(tr(p,A,a))(p.$tag$==="slot"||A.$tag$==="slot")&&It(p.$elm$.parentNode,!1),gt(p,A,a),et(r,p.$elm$,C.$elm$.nextSibling),p=t[++o],A=s[--w];else if(tr(C,$,a))(p.$tag$==="slot"||A.$tag$==="slot")&&It(C.$elm$.parentNode,!1),gt(C,$,a),et(r,C.$elm$,p.$elm$),C=t[--l],$=s[++n];else{for(h=-1,u=o;u<=l;++u)if(t[u]&&t[u].$key$!==null&&t[u].$key$===$.$key$){h=u;break}h>=0?(D=t[h],D.$tag$!==$.$tag$?N=er(t&&t[n],e,h):(gt(D,$,a),t[h]=void 0,N=D.$elm$),$=s[++n]):(N=er(t&&t[n],e,n),$=s[++n]),N&&et(_t(p.$elm$).parentNode,N,_t(p.$elm$))}o>l?Us(r,s[w+1]==null?null:s[w+1].$elm$,e,s,n,w):n>w&&Bs(t,o,l)},tr=(r,t,e=!1)=>r.$tag$===t.$tag$?r.$tag$==="slot"?r.$name$===t.$name$:e?(e&&!r.$key$&&t.$key$&&(r.$key$=t.$key$),!0):r.$key$===t.$key$:!1,_t=r=>r&&r["s-ol"]||r,gt=(r,t,e=!1)=>{const s=t.$elm$=r.$elm$,a=r.$children$,o=t.$children$,n=t.$tag$,h=t.$text$;let u;h===null?(Te=n==="svg"?!0:n==="foreignObject"?!1:Te,n==="slot"&&!Xt||zs(r,t,Te),a!==null&&o!==null?Sn(s,a,t,o,e):o!==null?(r.$text$!==null&&(s.textContent=""),Us(s,null,t,o,0,o.length-1)):!e&&pt.updatable&&a!==null&&Bs(a,0,a.length-1),Te&&n==="svg"&&(Te=!1)):(u=s["s-cr"])?u.parentNode.textContent=h:r.$text$!==h&&(s.data=h)},ze=[],qs=r=>{let t,e,s;const a=r.__childNodes||r.childNodes;for(const o of a){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){e=t.parentNode.__childNodes||t.parentNode.childNodes;const n=o["s-sn"];for(s=e.length-1;s>=0;s--)if(t=e[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(As(t,n)){let h=ze.find(u=>u.$nodeToRelocate$===t);Jt=!0,t["s-sn"]=t["s-sn"]||n,h?(h.$nodeToRelocate$["s-sh"]=o["s-hn"],h.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],ze.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&ze.map(u=>{As(u.$nodeToRelocate$,t["s-sn"])&&(h=ze.find(l=>l.$nodeToRelocate$===t),h&&!u.$slotRefNode$&&(u.$slotRefNode$=h.$slotRefNode$))})}else ze.some(h=>h.$nodeToRelocate$===t)||ze.push({$nodeToRelocate$:t})}o.nodeType===1&&qs(o)}},et=(r,t,e)=>r==null?void 0:r.insertBefore(t,e),wn=(r,t,e=!1)=>{var s,a,o,n;const h=r.$hostElement$,u=r.$vnode$||Qt(null,null),l=bn(t)?t:m(null,null,t);if(Dr=h.tagName,e&&l.$attrs$)for(const p of Object.keys(l.$attrs$))h.hasAttribute(p)&&!["key","ref","style","class"].includes(p)&&(l.$attrs$[p]=h[p]);l.$tag$=null,l.$flags$|=4,r.$vnode$=l,l.$elm$=u.$elm$=h,Xt=on,Fr=h["s-cr"],Jt=!1,gt(u,l,e);{if(xe.$flags$|=1,Nr){qs(l.$elm$);for(const p of ze){const C=p.$nodeToRelocate$;if(!C["s-ol"]){const w=mt.createTextNode("");w["s-nr"]=C,et(C.parentNode,C["s-ol"]=w,C)}}for(const p of ze){const C=p.$nodeToRelocate$,w=p.$slotRefNode$;if(w){const $=w.parentNode;let A=w.nextSibling;{let P=(s=C["s-ol"])==null?void 0:s.previousSibling;for(;P;){let I=(a=P["s-nr"])!=null?a:null;if(I&&I["s-sn"]===C["s-sn"]&&$===(I.__parentNode||I.parentNode)){for(I=I.nextSibling;I===C||I!=null&&I["s-sr"];)I=I==null?void 0:I.nextSibling;if(!I||!I["s-nr"]){A=I;break}}P=P.previousSibling}}const N=C.__parentNode||C.parentNode,D=C.__nextSibling||C.nextSibling;(!A&&$!==N||D!==A)&&C!==A&&(!C["s-hn"]&&C["s-ol"]&&(C["s-hn"]=C["s-ol"].parentNode.nodeName),et($,C,A),C.nodeType===1&&C.tagName!=="SLOT-FB"&&(C.hidden=(o=C["s-ih"])!=null?o:!1)),C&&typeof w["s-rf"]=="function"&&w["s-rf"](C)}else C.nodeType===1&&(e&&(C["s-ih"]=(n=C.hidden)!=null?n:!1),C.hidden=!0)}}Jt&&Is(l.$elm$),xe.$flags$&=-2,ze.length=0}Fr=void 0},Vs=(r,t)=>{if(t&&!r.$onRenderResolve$&&t["s-p"]){const e=t["s-p"].push(new Promise(s=>r.$onRenderResolve$=()=>{t["s-p"].splice(e-1,1),s()}))}},zr=(r,t)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return Vs(r,r.$ancestorComponent$),un(()=>Rn(r,t))},Rn=(r,t)=>{const e=r.$hostElement$,s=$t("scheduleUpdate",r.$cmpMeta$.$tagName$),a=e;if(!a)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return s(),En(o,()=>Pn(r,a,t))},En=(r,t)=>Tn(r)?r.then(t).catch(e=>{console.error(e),t()}):t(),Tn=r=>r instanceof Promise||r&&r.then&&typeof r.then=="function",Pn=async(r,t,e)=>{var s;const a=r.$hostElement$,o=$t("update",r.$cmpMeta$.$tagName$),n=a["s-rc"],h=$t("render",r.$cmpMeta$.$tagName$);$n(r,t,a,e),n&&(n.map(u=>u()),a["s-rc"]=void 0),h(),o();{const u=(s=a["s-p"])!=null?s:[],l=()=>In(r);u.length===0?l():(Promise.all(u).then(l),r.$flags$|=4,u.length=0)}},$n=(r,t,e,s)=>{try{t=t.render(),r.$flags$&=-17,r.$flags$|=2,wn(r,t,s)}catch(a){Zt(a,r.$hostElement$)}return null},In=r=>{const t=r.$cmpMeta$.$tagName$,e=r.$hostElement$,s=$t("postUpdate",t),a=e,o=r.$ancestorComponent$;r.$flags$&64?s():(r.$flags$|=64,js(e),An(a,"componentDidLoad",void 0,e),s(),r.$onReadyResolve$(e),o||_n()),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Mr(()=>zr(r,!1)),r.$flags$&=-517},_n=r=>{js(mt.documentElement),Mr(()=>Ls(Yt,"appload",{detail:{namespace:ft}}))},An=(r,t,e,s)=>{if(r&&r[t])try{return r[t](e)}catch(a){Zt(a,s)}},js=r=>{var t;return r.classList.add((t=pt.hydratedSelectorName)!=null?t:"hydrated")},Mn=(r,t)=>Xe(r).$instanceValues$.get(t),Ws=(r,t,e,s)=>{const a=Xe(r),o=r,n=a.$instanceValues$.get(t),h=a.$flags$,u=o;e=Os(e,s.$members$[t][0]);const l=Number.isNaN(n)&&Number.isNaN(e);if(e!==n&&!l){a.$instanceValues$.set(t,e);{if(s.$watchers$&&h&128){const C=s.$watchers$[t];C&&C.map(w=>{try{u[w](e,n,t)}catch($){Zt($,o)}})}(h&18)===2&&zr(a,!1)}}},On=(r,t,e)=>{var s,a;const o=r.prototype;if(t.$members$||t.$watchers$||r.watchers){r.watchers&&!t.$watchers$&&(t.$watchers$=r.watchers);const n=Object.entries((s=t.$members$)!=null?s:{});n.map(([h,[u]])=>{if(u&31||u&32){const{get:l,set:p}=Object.getOwnPropertyDescriptor(o,h)||{};l&&(t.$members$[h][0]|=2048),p&&(t.$members$[h][0]|=4096),Object.defineProperty(o,h,{get(){return l?l.apply(this):Mn(this,h)},configurable:!0,enumerable:!0}),Object.defineProperty(o,h,{set(C){const w=Xe(this);if(p){const $=u&32?this[h]:w.$hostElement$[h];typeof $>"u"&&w.$instanceValues$.get(h)?C=w.$instanceValues$.get(h):!w.$instanceValues$.get(h)&&$&&w.$instanceValues$.set(h,$),p.apply(this,[Os(C,u)]),C=u&32?this[h]:w.$hostElement$[h],Ws(this,h,C,t);return}{Ws(this,h,C,t);return}}})}});{const h=new Map;o.attributeChangedCallback=function(u,l,p){xe.jmp(()=>{var C;const w=h.get(u);if(!(this.hasOwnProperty(w)&&pt.lazyLoad)){if(o.hasOwnProperty(w)&&typeof this[w]=="number"&&this[w]==p)return;if(w==null){const A=Xe(this),N=A==null?void 0:A.$flags$;if(N&&!(N&8)&&N&128&&p!==l){const P=this,I=(C=t.$watchers$)==null?void 0:C[u];I==null||I.forEach(U=>{P[U]!=null&&P[U].call(P,p,l,u)})}return}}const $=Object.getOwnPropertyDescriptor(o,w);p=p===null&&typeof this[w]=="boolean"?!1:p,p!==this[w]&&(!$.get||$.set)&&(this[w]=p)})},r.observedAttributes=Array.from(new Set([...Object.keys((a=t.$watchers$)!=null?a:{}),...n.filter(([u,l])=>l[0]&15).map(([u,l])=>{const p=l[1]||u;return h.set(p,u),p})]))}}return r},Ln=async(r,t,e,s)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const n=r.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}}const a=t.$ancestorComponent$,o=()=>zr(t,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Fn=(r,t)=>{},Dn=r=>{if(!(xe.$flags$&1)){const t=Xe(r),e=t.$cmpMeta$,s=$t("connectedCallback",e.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Fn());else{t.$flags$|=1,e.$flags$&12&&Nn(r);{let a=r;for(;a=a.parentNode||a.host;)if(a["s-p"]){Vs(t,t.$ancestorComponent$=a);break}}e.$members$&&Object.entries(e.$members$).map(([a,[o]])=>{if(o&31&&r.hasOwnProperty(a)){const n=r[a];delete r[a],r[a]=n}}),Ln(r,t)}s()}},Nn=r=>{const t=r["s-cr"]=mt.createComment("");t["s-cn"]=!0,et(r,t,r.firstChild)},zn=async r=>{xe.$flags$&1||Xe(r),Kt.has(r)&&Kt.delete(r),r.shadowRoot&&Kt.has(r.shadowRoot)&&Kt.delete(r.shadowRoot)},ee=(r,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$watchers$=r.$watchers$;const s=r.prototype.connectedCallback,a=r.prototype.disconnectedCallback;return Object.assign(r.prototype,{__hasHostListenerAttached:!1,__registerHost(){nn(this,e)},connectedCallback(){this.__hasHostListenerAttached||(Xe(this),this.__hasHostListenerAttached=!0),Dn(this),s&&s.call(this)},disconnectedCallback(){zn(this),a&&a.call(this),xe.raf(()=>{var o;const n=Xe(this);((o=n==null?void 0:n.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!n.$vnode$.$elm$.isConnected&&delete n.$vnode$,this instanceof Node&&!this.isConnected&&an(this)})},__attachShadow(){this.shadowRoot=this}}),r.is=e.$tagName$,On(r,e)},Hn=(r,t)=>t,Gs={exports:{}};/*!
1
+ (function(X,fe){typeof exports=="object"&&typeof module<"u"?fe(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],fe):(X=typeof globalThis<"u"?globalThis:X||self,fe(X.SearchcraftVueSdk={},X.Vue))})(this,function(X,fe){"use strict";var Rc=Object.defineProperty;var Ec=(X,fe,ft)=>fe in X?Rc(X,fe,{enumerable:!0,configurable:!0,writable:!0,value:ft}):X[fe]=ft;var c=(X,fe,ft)=>Ec(X,typeof fe!="symbol"?fe+"":fe,ft);const ft="searchcraft-javascript-sdk",pt={experimentalSlotFixes:!1,hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var Ja=Object.defineProperty,en=(r,t)=>{for(var e in t)Ja(r,e,{get:t[e],enumerable:!0})},tn="http://www.w3.org/2000/svg",rn="http://www.w3.org/1999/xhtml",sn=(r,t)=>{var e;const s=t.$cmpMeta$;Object.entries((e=s.$members$)!=null?e:{}).map(([o,[n]])=>{if(n&31||n&32){const h=r[o],u=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(r),o);Object.defineProperty(r,o,{get(){return u.get.call(this)},set(l){u.set.call(this,l)},configurable:!0,enumerable:!0}),r[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):h}})},Ir=new WeakMap,an=r=>Ir.delete(r),Xe=r=>Ir.get(r),nn=(r,t)=>{const e={$flags$:0,$hostElement$:r,$cmpMeta$:t,$instanceValues$:new Map};e.$onReadyPromise$=new Promise(a=>e.$onReadyResolve$=a),r["s-p"]=[],r["s-rc"]=[];const s=Ir.set(r,e);return sn(r,e),s},Rs=(r,t)=>t in r,Zt=(r,t)=>(0,console.error)(r,t),Yt=typeof window<"u"?window:{},mt=Yt.document||{head:{}},J=Yt.HTMLElement||class{},xe={$flags$:0,$resourcesUrl$:"",jmp:r=>r(),raf:r=>requestAnimationFrame(r),ael:(r,t,e,s)=>r.addEventListener(t,e,s),rel:(r,t,e,s)=>r.removeEventListener(t,e,s),ce:(r,t)=>new CustomEvent(r,t)},on=pt.shadowDom,cn=r=>Promise.resolve(r),_r=!1,Es=[],Ts=[],ln=(r,t)=>e=>{r.push(e),_r||(_r=!0,xe.$flags$&4?Mr(Ar):xe.raf(Ar))},Ps=r=>{for(let t=0;t<r.length;t++)try{r[t](performance.now())}catch(e){Zt(e)}r.length=0},Ar=()=>{Ps(Es),Ps(Ts),(_r=Es.length>0)&&xe.raf(Ar)},Mr=r=>cn().then(r),un=ln(Ts),Or=r=>(r=typeof r,r==="object"||r==="function"),hn={};en(hn,{err:()=>$s,map:()=>dn,ok:()=>Fr,unwrap:()=>fn,unwrapErr:()=>pn});var Fr=r=>({isOk:!0,isErr:!1,value:r}),$s=r=>({isOk:!1,isErr:!0,value:r});function dn(r,t){if(r.isOk){const e=t(r.value);return e instanceof Promise?e.then(s=>Fr(s)):Fr(e)}if(r.isErr){const e=r.value;return $s(e)}throw"should never get here"}var fn=r=>{if(r.isOk)return r.value;throw r.value},pn=r=>{if(r.isErr)return r.value;throw r.value},Is=r=>{const t=r.__childNodes||r.childNodes;r.tagName&&r.tagName.includes("-")&&r["s-cr"]&&r.tagName!=="SLOT-FB"&&_s(t,r.tagName).forEach(e=>{var s;e.nodeType===1&&e.tagName==="SLOT-FB"&&((s=mn(e,e["s-sn"],!1))!=null&&s.length?e.hidden=!0:e.hidden=!1)});for(const e of t)e.nodeType===1&&(e.__childNodes||e.childNodes).length&&Is(e)};function _s(r,t,e){let s=0,a=[],o;for(;s<r.length;s++)o=r[s],o["s-sr"]&&o["s-hn"]===t&&e===void 0&&a.push(o),a=[...a,..._s(o.childNodes,t,e)];return a}var mn=(r,t,e=!0)=>{const s=[];for((e&&r["s-sr"]||!r["s-sr"])&&s.push(r);(r=r.nextSibling)&&r["s-sn"]===t;)s.push(r);return s},As=(r,t)=>r.nodeType===1?r.getAttribute("slot")===null&&t===""||r.getAttribute("slot")===t:r["s-sn"]===t?!0:t==="",$t=(r,t="")=>()=>{},m=(r,t,...e)=>{let s=null,a=null,o=null,n=!1,h=!1;const u=[],l=C=>{for(let S=0;S<C.length;S++)s=C[S],Array.isArray(s)?l(s):s!=null&&typeof s!="boolean"&&((n=typeof r!="function"&&!Or(s))&&(s=String(s)),n&&h?u[u.length-1].$text$+=s:u.push(n?Qt(null,s):s),h=n)};if(l(e),t){t.key&&(a=t.key),t.name&&(o=t.name);{const C=t.className||t.class;C&&(t.class=typeof C!="object"?C:Object.keys(C).filter(S=>C[S]).join(" "))}}if(typeof r=="function")return r(t===null?{}:t,u,vn);const p=Qt(r,null);return p.$attrs$=t,u.length>0&&(p.$children$=u),p.$key$=a,p.$name$=o,p},Qt=(r,t)=>{const e={$flags$:0,$tag$:r,$text$:t,$elm$:null,$children$:null};return e.$attrs$=null,e.$key$=null,e.$name$=null,e},gn={},bn=r=>r&&r.$tag$===gn,vn={forEach:(r,t)=>r.map(Ms).forEach(t),map:(r,t)=>r.map(Ms).map(t).map(yn)},Ms=r=>({vattrs:r.$attrs$,vchildren:r.$children$,vkey:r.$key$,vname:r.$name$,vtag:r.$tag$,vtext:r.$text$}),yn=r=>{if(typeof r.vtag=="function"){const e={...r.vattrs};return r.vkey&&(e.key=r.vkey),r.vname&&(e.name=r.vname),m(r.vtag,e,...r.vchildren||[])}const t=Qt(r.vtag,r.vtext);return t.$attrs$=r.vattrs,t.$children$=r.vchildren,t.$key$=r.vkey,t.$name$=r.vname,t},Os=(r,t)=>r!=null&&!Or(r)?t&4?r==="false"?!1:r===""||!!r:t&2?parseFloat(r):t&1?String(r):r:r,kn=r=>r,Je=(r,t,e)=>{const s=kn(r);return{emit:a=>Fs(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Fs=(r,t,e)=>{const s=xe.ce(t,e);return r.dispatchEvent(s),s},Kt=new WeakMap,Ls=(r,t,e,s,a,o)=>{if(e!==s){let n=Rs(r,t),h=t.toLowerCase();if(t==="class"){const u=r.classList,l=Ds(e);let p=Ds(s);r["s-si"]?(p.push(r["s-si"]),l.forEach(C=>{C.startsWith(r["s-si"])&&p.push(C)}),p=[...new Set(p)],u.add(...p),delete r["s-si"]):(u.remove(...l.filter(C=>C&&!p.includes(C))),u.add(...p.filter(C=>C&&!l.includes(C))))}else if(t==="style"){for(const u in e)(!s||s[u]==null)&&(u.includes("-")?r.style.removeProperty(u):r.style[u]="");for(const u in s)(!e||s[u]!==e[u])&&(u.includes("-")?r.style.setProperty(u,s[u]):r.style[u]=s[u])}else if(t!=="key")if(!r.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):Rs(Yt,h)?t=h.slice(2):t=h[2]+t.slice(3),e||s){const u=t.endsWith(Ns);t=t.replace(xn,""),e&&xe.rel(r,t,e,u),s&&xe.ael(r,t,s,u)}}else{const u=Or(s);if((n||u&&s!==null)&&!a)try{if(r.tagName.includes("-"))r[t]!==s&&(r[t]=s);else{const l=s??"";t==="list"?n=!1:(e==null||r[t]!=l)&&(typeof r.__lookupSetter__(t)=="function"?r[t]=l:r.setAttribute(t,l))}}catch{}s==null||s===!1?(s!==!1||r.getAttribute(t)==="")&&r.removeAttribute(t):(!n||o&4||a)&&!u&&(s=s===!0?"":s,r.setAttribute(t,s))}}},Cn=/\s/,Ds=r=>(typeof r=="object"&&"baseVal"in r&&(r=r.baseVal),r?r.split(Cn):[]),Ns="Capture",xn=new RegExp(Ns+"$"),zs=(r,t,e)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=r&&r.$attrs$||{},o=t.$attrs$||{};for(const n of Hs(Object.keys(a)))n in o||Ls(s,n,a[n],void 0,e,t.$flags$);for(const n of Hs(Object.keys(o)))Ls(s,n,a[n],o[n],e,t.$flags$)};function Hs(r){return r.includes("ref")?[...r.filter(t=>t!=="ref"),"ref"]:r}var Lr,Dr,Xt=!1,Jt=!1,Nr=!1,Te=!1,er=(r,t,e)=>{var s;const a=t.$children$[e];let o=0,n,h,u;if(Xt||(Nr=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=mt.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=mt.createTextNode("");else{if(Te||(Te=a.$tag$==="svg"),n=a.$elm$=mt.createElementNS(Te?tn:rn,!Xt&&pt.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),Te&&a.$tag$==="foreignObject"&&(Te=!1),zs(null,a,Te),a.$children$)for(o=0;o<a.$children$.length;++o)h=er(r,a,o),h&&n.appendChild(h);a.$tag$==="svg"?Te=!1:n.tagName==="foreignObject"&&(Te=!0)}return n["s-hn"]=Dr,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Lr,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,u=r&&r.$children$&&r.$children$[e],u&&u.$tag$===a.$tag$&&r.$elm$&&It(r.$elm$,!1)),n},It=(r,t)=>{xe.$flags$|=1;const e=Array.from(r.__childNodes||r.childNodes);r["s-sr"]&&pt.experimentalSlotFixes;for(let s=e.length-1;s>=0;s--){const a=e[s];a["s-hn"]!==Dr&&a["s-ol"]&&(et(_t(a).parentNode,a,_t(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Nr=!0),t&&It(a,t)}xe.$flags$&=-2},Bs=(r,t,e,s,a,o)=>{let n=r["s-cr"]&&r["s-cr"].parentNode||r,h;for(;a<=o;++a)s[a]&&(h=er(null,e,a),h&&(s[a].$elm$=h,et(n,h,_t(t))))},Us=(r,t,e)=>{for(let s=t;s<=e;++s){const a=r[s];if(a){const o=a.$elm$;o&&(Jt=!0,o["s-ol"]?o["s-ol"].remove():It(o,!0),o.remove())}}},wn=(r,t,e,s,a=!1)=>{let o=0,n=0,h=0,u=0,l=t.length-1,p=t[0],C=t[l],S=s.length-1,$=s[0],A=s[S],N,D;for(;o<=l&&n<=S;)if(p==null)p=t[++o];else if(C==null)C=t[--l];else if($==null)$=s[++n];else if(A==null)A=s[--S];else if(tr(p,$,a))gt(p,$,a),p=t[++o],$=s[++n];else if(tr(C,A,a))gt(C,A,a),C=t[--l],A=s[--S];else if(tr(p,A,a))(p.$tag$==="slot"||A.$tag$==="slot")&&It(p.$elm$.parentNode,!1),gt(p,A,a),et(r,p.$elm$,C.$elm$.nextSibling),p=t[++o],A=s[--S];else if(tr(C,$,a))(p.$tag$==="slot"||A.$tag$==="slot")&&It(C.$elm$.parentNode,!1),gt(C,$,a),et(r,C.$elm$,p.$elm$),C=t[--l],$=s[++n];else{for(h=-1,u=o;u<=l;++u)if(t[u]&&t[u].$key$!==null&&t[u].$key$===$.$key$){h=u;break}h>=0?(D=t[h],D.$tag$!==$.$tag$?N=er(t&&t[n],e,h):(gt(D,$,a),t[h]=void 0,N=D.$elm$),$=s[++n]):(N=er(t&&t[n],e,n),$=s[++n]),N&&et(_t(p.$elm$).parentNode,N,_t(p.$elm$))}o>l?Bs(r,s[S+1]==null?null:s[S+1].$elm$,e,s,n,S):n>S&&Us(t,o,l)},tr=(r,t,e=!1)=>r.$tag$===t.$tag$?r.$tag$==="slot"?r.$name$===t.$name$:e?(e&&!r.$key$&&t.$key$&&(r.$key$=t.$key$),!0):r.$key$===t.$key$:!1,_t=r=>r&&r["s-ol"]||r,gt=(r,t,e=!1)=>{const s=t.$elm$=r.$elm$,a=r.$children$,o=t.$children$,n=t.$tag$,h=t.$text$;let u;h===null?(Te=n==="svg"?!0:n==="foreignObject"?!1:Te,n==="slot"&&!Xt||zs(r,t,Te),a!==null&&o!==null?wn(s,a,t,o,e):o!==null?(r.$text$!==null&&(s.textContent=""),Bs(s,null,t,o,0,o.length-1)):!e&&pt.updatable&&a!==null&&Us(a,0,a.length-1),Te&&n==="svg"&&(Te=!1)):(u=s["s-cr"])?u.parentNode.textContent=h:r.$text$!==h&&(s.data=h)},ze=[],Vs=r=>{let t,e,s;const a=r.__childNodes||r.childNodes;for(const o of a){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){e=t.parentNode.__childNodes||t.parentNode.childNodes;const n=o["s-sn"];for(s=e.length-1;s>=0;s--)if(t=e[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(As(t,n)){let h=ze.find(u=>u.$nodeToRelocate$===t);Jt=!0,t["s-sn"]=t["s-sn"]||n,h?(h.$nodeToRelocate$["s-sh"]=o["s-hn"],h.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],ze.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&ze.map(u=>{As(u.$nodeToRelocate$,t["s-sn"])&&(h=ze.find(l=>l.$nodeToRelocate$===t),h&&!u.$slotRefNode$&&(u.$slotRefNode$=h.$slotRefNode$))})}else ze.some(h=>h.$nodeToRelocate$===t)||ze.push({$nodeToRelocate$:t})}o.nodeType===1&&Vs(o)}},et=(r,t,e)=>r==null?void 0:r.insertBefore(t,e),Sn=(r,t,e=!1)=>{var s,a,o,n;const h=r.$hostElement$,u=r.$vnode$||Qt(null,null),l=bn(t)?t:m(null,null,t);if(Dr=h.tagName,e&&l.$attrs$)for(const p of Object.keys(l.$attrs$))h.hasAttribute(p)&&!["key","ref","style","class"].includes(p)&&(l.$attrs$[p]=h[p]);l.$tag$=null,l.$flags$|=4,r.$vnode$=l,l.$elm$=u.$elm$=h,Xt=on,Lr=h["s-cr"],Jt=!1,gt(u,l,e);{if(xe.$flags$|=1,Nr){Vs(l.$elm$);for(const p of ze){const C=p.$nodeToRelocate$;if(!C["s-ol"]){const S=mt.createTextNode("");S["s-nr"]=C,et(C.parentNode,C["s-ol"]=S,C)}}for(const p of ze){const C=p.$nodeToRelocate$,S=p.$slotRefNode$;if(S){const $=S.parentNode;let A=S.nextSibling;{let P=(s=C["s-ol"])==null?void 0:s.previousSibling;for(;P;){let I=(a=P["s-nr"])!=null?a:null;if(I&&I["s-sn"]===C["s-sn"]&&$===(I.__parentNode||I.parentNode)){for(I=I.nextSibling;I===C||I!=null&&I["s-sr"];)I=I==null?void 0:I.nextSibling;if(!I||!I["s-nr"]){A=I;break}}P=P.previousSibling}}const N=C.__parentNode||C.parentNode,D=C.__nextSibling||C.nextSibling;(!A&&$!==N||D!==A)&&C!==A&&(!C["s-hn"]&&C["s-ol"]&&(C["s-hn"]=C["s-ol"].parentNode.nodeName),et($,C,A),C.nodeType===1&&C.tagName!=="SLOT-FB"&&(C.hidden=(o=C["s-ih"])!=null?o:!1)),C&&typeof S["s-rf"]=="function"&&S["s-rf"](C)}else C.nodeType===1&&(e&&(C["s-ih"]=(n=C.hidden)!=null?n:!1),C.hidden=!0)}}Jt&&Is(l.$elm$),xe.$flags$&=-2,ze.length=0}Lr=void 0},qs=(r,t)=>{if(t&&!r.$onRenderResolve$&&t["s-p"]){const e=t["s-p"].push(new Promise(s=>r.$onRenderResolve$=()=>{t["s-p"].splice(e-1,1),s()}))}},zr=(r,t)=>{if(r.$flags$|=16,r.$flags$&4){r.$flags$|=512;return}return qs(r,r.$ancestorComponent$),un(()=>Rn(r,t))},Rn=(r,t)=>{const e=r.$hostElement$,s=$t("scheduleUpdate",r.$cmpMeta$.$tagName$),a=e;if(!a)throw new Error(`Can't render component <${e.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let o;return s(),En(o,()=>Pn(r,a,t))},En=(r,t)=>Tn(r)?r.then(t).catch(e=>{console.error(e),t()}):t(),Tn=r=>r instanceof Promise||r&&r.then&&typeof r.then=="function",Pn=async(r,t,e)=>{var s;const a=r.$hostElement$,o=$t("update",r.$cmpMeta$.$tagName$),n=a["s-rc"],h=$t("render",r.$cmpMeta$.$tagName$);$n(r,t,a,e),n&&(n.map(u=>u()),a["s-rc"]=void 0),h(),o();{const u=(s=a["s-p"])!=null?s:[],l=()=>In(r);u.length===0?l():(Promise.all(u).then(l),r.$flags$|=4,u.length=0)}},$n=(r,t,e,s)=>{try{t=t.render(),r.$flags$&=-17,r.$flags$|=2,Sn(r,t,s)}catch(a){Zt(a,r.$hostElement$)}return null},In=r=>{const t=r.$cmpMeta$.$tagName$,e=r.$hostElement$,s=$t("postUpdate",t),a=e,o=r.$ancestorComponent$;r.$flags$&64?s():(r.$flags$|=64,js(e),An(a,"componentDidLoad",void 0,e),s(),r.$onReadyResolve$(e),o||_n()),r.$onRenderResolve$&&(r.$onRenderResolve$(),r.$onRenderResolve$=void 0),r.$flags$&512&&Mr(()=>zr(r,!1)),r.$flags$&=-517},_n=r=>{js(mt.documentElement),Mr(()=>Fs(Yt,"appload",{detail:{namespace:ft}}))},An=(r,t,e,s)=>{if(r&&r[t])try{return r[t](e)}catch(a){Zt(a,s)}},js=r=>{var t;return r.classList.add((t=pt.hydratedSelectorName)!=null?t:"hydrated")},Mn=(r,t)=>Xe(r).$instanceValues$.get(t),Ws=(r,t,e,s)=>{const a=Xe(r),o=r,n=a.$instanceValues$.get(t),h=a.$flags$,u=o;e=Os(e,s.$members$[t][0]);const l=Number.isNaN(n)&&Number.isNaN(e);if(e!==n&&!l){a.$instanceValues$.set(t,e);{if(s.$watchers$&&h&128){const C=s.$watchers$[t];C&&C.map(S=>{try{u[S](e,n,t)}catch($){Zt($,o)}})}(h&18)===2&&zr(a,!1)}}},On=(r,t,e)=>{var s,a;const o=r.prototype;if(t.$members$||t.$watchers$||r.watchers){r.watchers&&!t.$watchers$&&(t.$watchers$=r.watchers);const n=Object.entries((s=t.$members$)!=null?s:{});n.map(([h,[u]])=>{if(u&31||u&32){const{get:l,set:p}=Object.getOwnPropertyDescriptor(o,h)||{};l&&(t.$members$[h][0]|=2048),p&&(t.$members$[h][0]|=4096),Object.defineProperty(o,h,{get(){return l?l.apply(this):Mn(this,h)},configurable:!0,enumerable:!0}),Object.defineProperty(o,h,{set(C){const S=Xe(this);if(p){const $=u&32?this[h]:S.$hostElement$[h];typeof $>"u"&&S.$instanceValues$.get(h)?C=S.$instanceValues$.get(h):!S.$instanceValues$.get(h)&&$&&S.$instanceValues$.set(h,$),p.apply(this,[Os(C,u)]),C=u&32?this[h]:S.$hostElement$[h],Ws(this,h,C,t);return}{Ws(this,h,C,t);return}}})}});{const h=new Map;o.attributeChangedCallback=function(u,l,p){xe.jmp(()=>{var C;const S=h.get(u);if(!(this.hasOwnProperty(S)&&pt.lazyLoad)){if(o.hasOwnProperty(S)&&typeof this[S]=="number"&&this[S]==p)return;if(S==null){const A=Xe(this),N=A==null?void 0:A.$flags$;if(N&&!(N&8)&&N&128&&p!==l){const P=this,I=(C=t.$watchers$)==null?void 0:C[u];I==null||I.forEach(B=>{P[B]!=null&&P[B].call(P,p,l,u)})}return}}const $=Object.getOwnPropertyDescriptor(o,S);p=p===null&&typeof this[S]=="boolean"?!1:p,p!==this[S]&&(!$.get||$.set)&&(this[S]=p)})},r.observedAttributes=Array.from(new Set([...Object.keys((a=t.$watchers$)!=null?a:{}),...n.filter(([u,l])=>l[0]&15).map(([u,l])=>{const p=l[1]||u;return h.set(p,u),p})]))}}return r},Fn=async(r,t,e,s)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const n=r.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}}const a=t.$ancestorComponent$,o=()=>zr(t,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Ln=(r,t)=>{},Dn=r=>{if(!(xe.$flags$&1)){const t=Xe(r),e=t.$cmpMeta$,s=$t("connectedCallback",e.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Ln());else{t.$flags$|=1,e.$flags$&12&&Nn(r);{let a=r;for(;a=a.parentNode||a.host;)if(a["s-p"]){qs(t,t.$ancestorComponent$=a);break}}e.$members$&&Object.entries(e.$members$).map(([a,[o]])=>{if(o&31&&r.hasOwnProperty(a)){const n=r[a];delete r[a],r[a]=n}}),Fn(r,t)}s()}},Nn=r=>{const t=r["s-cr"]=mt.createComment("");t["s-cn"]=!0,et(r,t,r.firstChild)},zn=async r=>{xe.$flags$&1||Xe(r),Kt.has(r)&&Kt.delete(r),r.shadowRoot&&Kt.has(r.shadowRoot)&&Kt.delete(r.shadowRoot)},ee=(r,t)=>{const e={$flags$:t[0],$tagName$:t[1]};e.$members$=t[2],e.$watchers$=r.$watchers$;const s=r.prototype.connectedCallback,a=r.prototype.disconnectedCallback;return Object.assign(r.prototype,{__hasHostListenerAttached:!1,__registerHost(){nn(this,e)},connectedCallback(){this.__hasHostListenerAttached||(Xe(this),this.__hasHostListenerAttached=!0),Dn(this),s&&s.call(this)},disconnectedCallback(){zn(this),a&&a.call(this),xe.raf(()=>{var o;const n=Xe(this);((o=n==null?void 0:n.$vnode$)==null?void 0:o.$elm$)instanceof Node&&!n.$vnode$.$elm$.isConnected&&delete n.$vnode$,this instanceof Node&&!this.isConnected&&an(this)})},__attachShadow(){this.shadowRoot=this}}),r.is=e.$tagName$,On(r,e)},Hn=(r,t)=>t,Gs={exports:{}};/*!
2
2
  Copyright (c) 2018 Jed Watson.
3
3
  Licensed under the MIT License (MIT), see
4
4
  http://jedwatson.github.io/classnames
5
- */(function(r){(function(){var t={}.hasOwnProperty;function e(){for(var o="",n=0;n<arguments.length;n++){var h=arguments[n];h&&(o=a(o,s(h)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return e.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var h in o)t.call(o,h)&&o[h]&&(n=a(n,h));return n}function a(o,n){return n?o?o+" "+n:o+n:o}r.exports?(e.default=e,r.exports=e):window.classNames=e})()})(Gs);const Se=Gs.exports;var Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ys={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(r,t){(function(e,s){r.exports=s()})(Zs,function(){const{entries:e,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:h,seal:u,create:l}=Object,{apply:p,construct:C}=typeof Reflect<"u"&&Reflect;h||(h=function(O){return O}),u||(u=function(O){return O}),p||(p=function(O,V,q){return O.apply(V,q)}),C||(C=function(O,V){return new O(...V)});const w=le(Array.prototype.forEach),$=le(Array.prototype.lastIndexOf),A=le(Array.prototype.pop),N=le(Array.prototype.push),D=le(Array.prototype.splice),P=le(String.prototype.toLowerCase),I=le(String.prototype.toString),U=le(String.prototype.match),j=le(String.prototype.replace),ae=le(String.prototype.indexOf),Y=le(String.prototype.trim),se=le(Object.prototype.hasOwnProperty),Q=le(RegExp.prototype.test),Le=as(TypeError);function le(B){return function(O){for(var V=arguments.length,q=new Array(V>1?V-1:0),ue=1;ue<V;ue++)q[ue-1]=arguments[ue];return p(B,O,q)}}function as(B){return function(){for(var O=arguments.length,V=new Array(O),q=0;q<O;q++)V[q]=arguments[q];return C(B,V)}}function z(B,O){let V=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P;s&&s(B,null);let q=O.length;for(;q--;){let ue=O[q];if(typeof ue=="string"){const we=V(ue);we!==ue&&(a(O)||(O[q]=we),ue=we)}B[ue]=!0}return B}function ns(B){for(let O=0;O<B.length;O++)se(B,O)||(B[O]=null);return B}function Ae(B){const O=l(null);for(const[V,q]of e(B))se(B,V)&&(Array.isArray(q)?O[V]=ns(q):q&&typeof q=="object"&&q.constructor===Object?O[V]=Ae(q):O[V]=q);return O}function it(B,O){for(;B!==null;){const q=n(B,O);if(q){if(q.get)return le(q.get);if(typeof q.value=="function")return le(q.value)}B=o(B)}function V(){return null}return V}const ur=h(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tt=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ct=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),os=h(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yt=h(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),is=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kt=h(["#text"]),Ft=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Dt=h(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hr=h(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ct=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cs=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dr=u(/<%[\w\W]*|[\w\W]*%>/gm),ls=u(/\$\{[\w\W]*/gm),xt=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nt=u(/^aria-[\-\w]+$/),zt=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),us=u(/^(?:\w+script|data):/i),fr=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pr=u(/^html$/i),hs=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var mr=Object.freeze({__proto__:null,ARIA_ATTR:Nt,ATTR_WHITESPACE:fr,CUSTOM_ELEMENT:hs,DATA_ATTR:xt,DOCTYPE_NAME:pr,ERB_EXPR:dr,IS_ALLOWED_URI:zt,IS_SCRIPT_OR_DATA:us,MUSTACHE_EXPR:cs,TMPLIT_EXPR:ls});const rt={element:1,text:3,progressingInstruction:7,comment:8,document:9},ds=function(){return typeof window>"u"?null:window},fs=function(O,V){if(typeof O!="object"||typeof O.createPolicy!="function")return null;let q=null;const ue="data-tt-policy-suffix";V&&V.hasAttribute(ue)&&(q=V.getAttribute(ue));const we="dompurify"+(q?"#"+q:"");try{return O.createPolicy(we,{createHTML(st){return st},createScriptURL(st){return st}})}catch{return console.warn("TrustedTypes policy "+we+" could not be created."),null}},Ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function gr(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ds();const O=L=>gr(L);if(O.version="3.2.4",O.removed=[],!B||!B.document||B.document.nodeType!==rt.document||!B.Element)return O.isSupported=!1,O;let{document:V}=B;const q=V,ue=q.currentScript,{DocumentFragment:we,HTMLTemplateElement:st,Node:St,Element:Ut,NodeFilter:lt,NamedNodeMap:Bt=B.NamedNodeMap||B.MozNamedAttrMap,HTMLFormElement:ms,DOMParser:qt,trustedTypes:wt}=B,Fe=Ut.prototype,ut=it(Fe,"cloneNode"),gs=it(Fe,"remove"),br=it(Fe,"nextSibling"),$e=it(Fe,"childNodes"),ht=it(Fe,"parentNode");if(typeof st=="function"){const L=V.createElement("template");L.content&&L.content.ownerDocument&&(V=L.content.ownerDocument)}let he,Me="";const{implementation:Vt,createNodeIterator:vr,createDocumentFragment:bs,getElementsByTagName:dt}=V,{importNode:Ie}=q;let ne=Ht();O.isSupported=typeof e=="function"&&typeof ht=="function"&&Vt&&Vt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:at,ERB_EXPR:Re,TMPLIT_EXPR:qe,DATA_ATTR:yr,ARIA_ATTR:Ve,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:kr,CUSTOM_ELEMENT:vs}=mr;let{IS_ALLOWED_URI:Cr}=mr,oe=null;const xr=z({},[...ur,...tt,...ct,...yt,...kt]);let ce=null;const Sr=z({},[...Ft,...Dt,...hr,...Ct]);let re=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,f=null,i=!0,d=!0,g=!1,v=!0,y=!1,R=!0,k=!1,T=!1,x=!1,S=!1,Z=!1,_=!1,ie=!0,G=!1;const ve="user-content-";let Rt=!0,We=!1,Ge={},Ze=null;const jt=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let wr=null;const Et=z({},["audio","video","img","source","image","track"]);let Ye=null;const Ha=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rr="http://www.w3.org/1998/Math/MathML",Er="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Tt=Qe,ys=!1,ks=null;const vc=z({},[Rr,Er,Qe],I);let Tr=z({},["mi","mo","mn","ms","mtext"]),Pr=z({},["annotation-xml"]);const yc=z({},["title","style","font","a","script"]);let Wt=null;const kc=["application/xhtml+xml","text/html"],Cc="text/html";let de=null,Pt=null;const xc=V.createElement("form"),Ua=function(b){return b instanceof RegExp||b instanceof Function},Cs=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===b)){if((!b||typeof b!="object")&&(b={}),b=Ae(b),Wt=kc.indexOf(b.PARSER_MEDIA_TYPE)===-1?Cc:b.PARSER_MEDIA_TYPE,de=Wt==="application/xhtml+xml"?I:P,oe=se(b,"ALLOWED_TAGS")?z({},b.ALLOWED_TAGS,de):xr,ce=se(b,"ALLOWED_ATTR")?z({},b.ALLOWED_ATTR,de):Sr,ks=se(b,"ALLOWED_NAMESPACES")?z({},b.ALLOWED_NAMESPACES,I):vc,Ye=se(b,"ADD_URI_SAFE_ATTR")?z(Ae(Ha),b.ADD_URI_SAFE_ATTR,de):Ha,wr=se(b,"ADD_DATA_URI_TAGS")?z(Ae(Et),b.ADD_DATA_URI_TAGS,de):Et,Ze=se(b,"FORBID_CONTENTS")?z({},b.FORBID_CONTENTS,de):jt,je=se(b,"FORBID_TAGS")?z({},b.FORBID_TAGS,de):{},f=se(b,"FORBID_ATTR")?z({},b.FORBID_ATTR,de):{},Ge=se(b,"USE_PROFILES")?b.USE_PROFILES:!1,i=b.ALLOW_ARIA_ATTR!==!1,d=b.ALLOW_DATA_ATTR!==!1,g=b.ALLOW_UNKNOWN_PROTOCOLS||!1,v=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,y=b.SAFE_FOR_TEMPLATES||!1,R=b.SAFE_FOR_XML!==!1,k=b.WHOLE_DOCUMENT||!1,S=b.RETURN_DOM||!1,Z=b.RETURN_DOM_FRAGMENT||!1,_=b.RETURN_TRUSTED_TYPE||!1,x=b.FORCE_BODY||!1,ie=b.SANITIZE_DOM!==!1,G=b.SANITIZE_NAMED_PROPS||!1,Rt=b.KEEP_CONTENT!==!1,We=b.IN_PLACE||!1,Cr=b.ALLOWED_URI_REGEXP||zt,Tt=b.NAMESPACE||Qe,Tr=b.MATHML_TEXT_INTEGRATION_POINTS||Tr,Pr=b.HTML_INTEGRATION_POINTS||Pr,re=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&Ua(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&Ua(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(d=!1),Z&&(S=!0),Ge&&(oe=z({},kt),ce=[],Ge.html===!0&&(z(oe,ur),z(ce,Ft)),Ge.svg===!0&&(z(oe,tt),z(ce,Dt),z(ce,Ct)),Ge.svgFilters===!0&&(z(oe,ct),z(ce,Dt),z(ce,Ct)),Ge.mathMl===!0&&(z(oe,yt),z(ce,hr),z(ce,Ct))),b.ADD_TAGS&&(oe===xr&&(oe=Ae(oe)),z(oe,b.ADD_TAGS,de)),b.ADD_ATTR&&(ce===Sr&&(ce=Ae(ce)),z(ce,b.ADD_ATTR,de)),b.ADD_URI_SAFE_ATTR&&z(Ye,b.ADD_URI_SAFE_ATTR,de),b.FORBID_CONTENTS&&(Ze===jt&&(Ze=Ae(Ze)),z(Ze,b.FORBID_CONTENTS,de)),Rt&&(oe["#text"]=!0),k&&z(oe,["html","head","body"]),oe.table&&(z(oe,["tbody"]),delete je.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw Le('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Le('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');he=b.TRUSTED_TYPES_POLICY,Me=he.createHTML("")}else he===void 0&&(he=fs(wt,ue)),he!==null&&typeof Me=="string"&&(Me=he.createHTML(""));h&&h(b),Pt=b}},Ba=z({},[...tt,...ct,...os]),qa=z({},[...yt,...is]),Sc=function(b){let E=ht(b);(!E||!E.tagName)&&(E={namespaceURI:Tt,tagName:"template"});const M=P(b.tagName),K=P(E.tagName);return ks[b.namespaceURI]?b.namespaceURI===Er?E.namespaceURI===Qe?M==="svg":E.namespaceURI===Rr?M==="svg"&&(K==="annotation-xml"||Tr[K]):!!Ba[M]:b.namespaceURI===Rr?E.namespaceURI===Qe?M==="math":E.namespaceURI===Er?M==="math"&&Pr[K]:!!qa[M]:b.namespaceURI===Qe?E.namespaceURI===Er&&!Pr[K]||E.namespaceURI===Rr&&!Tr[K]?!1:!qa[M]&&(yc[M]||!Ba[M]):!!(Wt==="application/xhtml+xml"&&ks[b.namespaceURI]):!1},De=function(b){N(O.removed,{element:b});try{ht(b).removeChild(b)}catch{gs(b)}},$r=function(b,E){try{N(O.removed,{attribute:E.getAttributeNode(b),from:E})}catch{N(O.removed,{attribute:null,from:E})}if(E.removeAttribute(b),b==="is")if(S||Z)try{De(E)}catch{}else try{E.setAttribute(b,"")}catch{}},Va=function(b){let E=null,M=null;if(x)b="<remove></remove>"+b;else{const ge=U(b,/^[\r\n\t ]+/);M=ge&&ge[0]}Wt==="application/xhtml+xml"&&Tt===Qe&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const K=he?he.createHTML(b):b;if(Tt===Qe)try{E=new qt().parseFromString(K,Wt)}catch{}if(!E||!E.documentElement){E=Vt.createDocument(Tt,"template",null);try{E.documentElement.innerHTML=ys?Me:K}catch{}}const ye=E.body||E.documentElement;return b&&M&&ye.insertBefore(V.createTextNode(M),ye.childNodes[0]||null),Tt===Qe?dt.call(E,k?"html":"body")[0]:k?E.documentElement:ye},ja=function(b){return vr.call(b.ownerDocument||b,b,lt.SHOW_ELEMENT|lt.SHOW_COMMENT|lt.SHOW_TEXT|lt.SHOW_PROCESSING_INSTRUCTION|lt.SHOW_CDATA_SECTION,null)},xs=function(b){return b instanceof ms&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof Bt)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},Wa=function(b){return typeof St=="function"&&b instanceof St};function Ke(L,b,E){w(L,M=>{M.call(O,b,E,Pt)})}const Ga=function(b){let E=null;if(Ke(ne.beforeSanitizeElements,b,null),xs(b))return De(b),!0;const M=de(b.nodeName);if(Ke(ne.uponSanitizeElement,b,{tagName:M,allowedTags:oe}),b.hasChildNodes()&&!Wa(b.firstElementChild)&&Q(/<[/\w]/g,b.innerHTML)&&Q(/<[/\w]/g,b.textContent)||b.nodeType===rt.progressingInstruction||R&&b.nodeType===rt.comment&&Q(/<[/\w]/g,b.data))return De(b),!0;if(!oe[M]||je[M]){if(!je[M]&&Ya(M)&&(re.tagNameCheck instanceof RegExp&&Q(re.tagNameCheck,M)||re.tagNameCheck instanceof Function&&re.tagNameCheck(M)))return!1;if(Rt&&!Ze[M]){const K=ht(b)||b.parentNode,ye=$e(b)||b.childNodes;if(ye&&K){const ge=ye.length;for(let Ee=ge-1;Ee>=0;--Ee){const Ne=ut(ye[Ee],!0);Ne.__removalCount=(b.__removalCount||0)+1,K.insertBefore(Ne,br(b))}}}return De(b),!0}return b instanceof Ut&&!Sc(b)||(M==="noscript"||M==="noembed"||M==="noframes")&&Q(/<\/no(script|embed|frames)/i,b.innerHTML)?(De(b),!0):(y&&b.nodeType===rt.text&&(E=b.textContent,w([at,Re,qe],K=>{E=j(E,K," ")}),b.textContent!==E&&(N(O.removed,{element:b.cloneNode()}),b.textContent=E)),Ke(ne.afterSanitizeElements,b,null),!1)},Za=function(b,E,M){if(ie&&(E==="id"||E==="name")&&(M in V||M in xc))return!1;if(!(d&&!f[E]&&Q(yr,E))){if(!(i&&Q(Ve,E))){if(!ce[E]||f[E]){if(!(Ya(b)&&(re.tagNameCheck instanceof RegExp&&Q(re.tagNameCheck,b)||re.tagNameCheck instanceof Function&&re.tagNameCheck(b))&&(re.attributeNameCheck instanceof RegExp&&Q(re.attributeNameCheck,E)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(E))||E==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Q(re.tagNameCheck,M)||re.tagNameCheck instanceof Function&&re.tagNameCheck(M))))return!1}else if(!Ye[E]){if(!Q(Cr,j(M,kr,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&b!=="script"&&ae(M,"data:")===0&&wr[b])){if(!(g&&!Q(W,j(M,kr,"")))){if(M)return!1}}}}}}return!0},Ya=function(b){return b!=="annotation-xml"&&U(b,vs)},Qa=function(b){Ke(ne.beforeSanitizeAttributes,b,null);const{attributes:E}=b;if(!E||xs(b))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0};let K=E.length;for(;K--;){const ye=E[K],{name:ge,namespaceURI:Ee,value:Ne}=ye,Gt=de(ge);let Ce=ge==="value"?Ne:Y(Ne);if(M.attrName=Gt,M.attrValue=Ce,M.keepAttr=!0,M.forceKeepAttr=void 0,Ke(ne.uponSanitizeAttribute,b,M),Ce=M.attrValue,G&&(Gt==="id"||Gt==="name")&&($r(ge,b),Ce=ve+Ce),R&&Q(/((--!?|])>)|<\/(style|title)/i,Ce)){$r(ge,b);continue}if(M.forceKeepAttr||($r(ge,b),!M.keepAttr))continue;if(!v&&Q(/\/>/i,Ce)){$r(ge,b);continue}y&&w([at,Re,qe],Xa=>{Ce=j(Ce,Xa," ")});const Ka=de(b.nodeName);if(Za(Ka,Gt,Ce)){if(he&&typeof wt=="object"&&typeof wt.getAttributeType=="function"&&!Ee)switch(wt.getAttributeType(Ka,Gt)){case"TrustedHTML":{Ce=he.createHTML(Ce);break}case"TrustedScriptURL":{Ce=he.createScriptURL(Ce);break}}try{Ee?b.setAttributeNS(Ee,ge,Ce):b.setAttribute(ge,Ce),xs(b)?De(b):A(O.removed)}catch{}}}Ke(ne.afterSanitizeAttributes,b,null)},wc=function L(b){let E=null;const M=ja(b);for(Ke(ne.beforeSanitizeShadowDOM,b,null);E=M.nextNode();)Ke(ne.uponSanitizeShadowNode,E,null),Ga(E),Qa(E),E.content instanceof we&&L(E.content);Ke(ne.afterSanitizeShadowDOM,b,null)};return O.sanitize=function(L){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,M=null,K=null,ye=null;if(ys=!L,ys&&(L="<!-->"),typeof L!="string"&&!Wa(L))if(typeof L.toString=="function"){if(L=L.toString(),typeof L!="string")throw Le("dirty is not a string, aborting")}else throw Le("toString is not a function");if(!O.isSupported)return L;if(T||Cs(b),O.removed=[],typeof L=="string"&&(We=!1),We){if(L.nodeName){const Ne=de(L.nodeName);if(!oe[Ne]||je[Ne])throw Le("root node is forbidden and cannot be sanitized in-place")}}else if(L instanceof St)E=Va("<!---->"),M=E.ownerDocument.importNode(L,!0),M.nodeType===rt.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?E=M:E.appendChild(M);else{if(!S&&!y&&!k&&L.indexOf("<")===-1)return he&&_?he.createHTML(L):L;if(E=Va(L),!E)return S?null:_?Me:""}E&&x&&De(E.firstChild);const ge=ja(We?L:E);for(;K=ge.nextNode();)Ga(K),Qa(K),K.content instanceof we&&wc(K.content);if(We)return L;if(S){if(Z)for(ye=bs.call(E.ownerDocument);E.firstChild;)ye.appendChild(E.firstChild);else ye=E;return(ce.shadowroot||ce.shadowrootmode)&&(ye=Ie.call(q,ye,!0)),ye}let Ee=k?E.outerHTML:E.innerHTML;return k&&oe["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&Q(pr,E.ownerDocument.doctype.name)&&(Ee="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
6
- `+Ee),y&&w([at,Re,qe],Ne=>{Ee=j(Ee,Ne," ")}),he&&_?he.createHTML(Ee):Ee},O.setConfig=function(){let L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cs(L),T=!0},O.clearConfig=function(){Pt=null,T=!1},O.isValidAttribute=function(L,b,E){Pt||Cs({});const M=de(L),K=de(b);return Za(M,K,E)},O.addHook=function(L,b){typeof b=="function"&&N(ne[L],b)},O.removeHook=function(L,b){if(b!==void 0){const E=$(ne[L],b);return E===-1?void 0:D(ne[L],E,1)[0]}return A(ne[L])},O.removeHooks=function(L){ne[L]=[]},O.removeAllHooks=function(){ne=Ht()},O}var ps=gr();return ps})})(Ys);const Qs=Ys.exports,At=(r,...t)=>{let e=r[0];for(let s=0;s<t.length;s++)e+=Qs.sanitize(t[s]?String(t[s]):"")+r[s+1];return e||""},Hr="searchcraft";class Un{constructor(){c(this,"coreInstances",{});c(this,"subscriptions",{})}addCoreInstance(t,e){const s=e||Hr;this.coreInstances[s]=t;for(const a of this.subscriptions[s]||[])a(t)}useCoreInstance(t,e){const s=t||Hr;return this.coreInstances[s]?(e(this.coreInstances[s]),()=>{}):(this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(e),()=>{this.subscriptions[s]&&(this.subscriptions[s]=this.subscriptions[s].filter(a=>a!==e))})}}const pe=new Un,Bn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nt=(r=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)t+=Bn[e[r]&63];return t};const qn=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"adSource","Custom");c(this,"adClientResponseItem");c(this,"renderPosition","interstitial");c(this,"searchTerm");c(this,"isSearchInProgress",!1);c(this,"searchResultCount",0);c(this,"core");c(this,"intersectionObserver");c(this,"storeUnsubscribe");c(this,"cleanupCore");c(this,"adContainerRenderedTimeout");c(this,"isComponentConnected",!1);c(this,"timeTaken");c(this,"adContainerId","");this.__registerHost()}get hostElement(){return this}handleAdRendered(){var e,s,a;this.adContainerId=nt(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var o;(o=this.core)==null||o.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(s=(e=this.core)==null?void 0:e.config)==null?void 0:s.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var e;(e=this.core)==null||e.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(e){const s=e.searchClientRequestProperties;s&&typeof s=="object"&&(this.searchTerm=s.searchTerm),this.searchResultCount=e.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(e){const s=e.store.getState();this.isComponentConnected=!0,this.core=s.core,this.isSearchInProgress=s.isSearchInProgress,this.searchResultCount=s.searchClientResponseItems.length,this.timeTaken=s.searchResponseTimeTaken;const a=s.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(s),this.storeUnsubscribe=e.store.subscribe(o=>{this.timeTaken!==o.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(o),this.timeTaken=o.searchResponseTimeTaken,this.isSearchInProgress=o.isSearchInProgress})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var e;(e=this.intersectionObserver)==null||e.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([s])=>{s!=null&&s.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var e,s,a;(e=this.storeUnsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,h,u;const e=this.adClientResponseItem;if(!e.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(n=(o=(a=this.core)==null?void 0:a.config)==null?void 0:o.admAdConfig)!=null&&n.template&&(s=(u=(h=this.core)==null?void 0:h.config)==null?void 0:u.admAdConfig.template(e.admAd,{html:At})),m("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:s})}renderCustomAd(){var o,n,h;const e=(h=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdConfig)==null?void 0:h.template,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return e&&(a=e({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:At})),m("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s,a;const e=((a=(s=this.core)==null?void 0:s.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return m("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:Se("searchcraft-ad",e),"data-searchcraft-ad-container-id":this.adContainerId})}render(){if(this.searchResultCount!==0)switch(this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{searchcraftId:[1,"searchcraft-id"],adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function rr(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,qn);break}})}const Vn=rr,jn=ee(class extends J{constructor(){super();c(this,"hierarchy","primary");c(this,"disabled",!1);c(this,"icon");c(this,"iconOnly",!1);c(this,"iconPosition","left");c(this,"label","Search");c(this,"type","button");c(this,"buttonClick");c(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=Je(this,"buttonClick")}render(){return m("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:Se("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:m(Hn,null,this.iconPosition==="left"&&this.icon,m("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function sr(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,jn);break}})}const Wn=sr,Gn=ee(class extends J{constructor(){super(),this.__registerHost()}render(){return m("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},m("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function ar(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,Gn);break}})}const Zn=ar,Ks=(r,t)=>{let e=r;for(const s of t)e=e==null?void 0:e.children[s];return e},Ur=(r,t)=>{const e={...r};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&r[s]instanceof Object?e[s]=Ur(r[s],t[s]):e[s]=t[s]);return e};function Yn(r){return r.filter((t,e,s)=>!s.some((a,o)=>o!==e&&a.includes(t)))}const Xs=(r,t)=>{const e=structuredClone(r),s=(a,o)=>{var u;const n=structuredClone(a),h=Ks(t,o);if(!h)return n;for(const l of Object.keys(a.children))h.children[l]?n.children[l]={...Ur(a.children[l],h.children[l]),count:((u=n.children[l])==null?void 0:u.count)||0}:n.children[l]&&(n.children[l]=s(n.children[l],[...o,l]));return n};return s(e,[])},Br=(r,t)=>{const e={path:"/",count:0,children:{}},s=[],a=o=>{if(o.path!=="/"&&s.push({path:o.path,count:o.count}),o.children)for(const n of o.children)a(n)};a(r);for(const{path:o,count:n}of s){const h=o.split("/").filter(Boolean);if(t&&t.length>0){let l=!1;for(const p of t)if(p.startsWith("/")){if(o===p||o.startsWith(`${p}/`)){l=!0;break}}else if(h.includes(p)){l=!0;break}if(l)continue}let u=e;for(const l of h){const p=u.path==="/"?`/${l}`:`${u.path}/${l}`;u.children[l]||(u.children[l]={path:p,count:n,children:{}}),u=u.children[l]}u.count=n}return e},Qn=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"fieldName","");c(this,"exclude");c(this,"facetSelectionUpdated");c(this,"selectedPaths",{});c(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});c(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});c(this,"renderedFacetTree",{path:"/",count:0,children:{}});c(this,"lastTimeTaken");c(this,"lastSearchTerm");c(this,"lastSearchMode");c(this,"lastSortType");c(this,"lastRangeValues");c(this,"lastFacetValues");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"formatFacetName",e=>`${e.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);this.__registerHost(),this.facetSelectionUpdated=Je(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(e=>this.selectedPaths[e])}handleIncomingSearchResponse(e,s){var u,l,p;const a=(u=e.searchResponseFacetPrime)==null?void 0:u.find(C=>this.fieldName===Object.keys(C)[0]),o=a==null?void 0:a[this.fieldName],n=Br({path:"/",count:0,children:o||[]},this.exclude);switch(s){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=n;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(e.supplementalFacetPrime){const C=(l=e.supplementalFacetPrime)==null?void 0:l.find(A=>this.fieldName===Object.keys(A)[0]),w=C==null?void 0:C[this.fieldName],$=Br({path:"/",count:0,children:w||[]},this.exclude);this.facetTreeCollectedFromSearchResponse=Xs($,n)}else this.facetTreeCollectedFromSearchResponse=n;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=Xs(this.facetTreeCollectedFromSearchResponse,n);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const h={path:"/",count:0,children:[]};for(const C of Object.keys(this.selectedPaths).filter(w=>this.selectedPaths[w])){const w=C.startsWith("/")?C.substring(1).split("/"):C.split("/"),$=!!Ks(this.facetTreeCollectedFromSearchResponse,w),A=w.at(-1);!$&&A&&((p=h.children)==null||p.push({children:[],count:0,path:C}))}this.facetTreeFromFacetPathsNotInSearchResponse=Br(h,this.exclude),this.renderedFacetTree=Ur(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(e){const s={...e},a=typeof s.searchClientRequestProperties=="string"&&s.searchTerm.trim()==="";if(s.searchTerm.trim()===""&&!a)this.handleIncomingSearchResponse(s,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==s.searchResponseTimeTaken&&s.searchClientRequestProperties){if(typeof s.searchClientRequestProperties=="object"){const o=s.searchClientRequestProperties;let n="UNKNOWN";this.lastSearchTerm!==o.searchTerm?this.areAnyFacetPathsSelected?n="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":n="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(o.rangeValueForIndexFields)?n="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(o.facetPathsForIndexFields)?n="FACET_UPDATE":this.lastSortType!==o.order_by?n="SORT_ORDER_UPDATE":this.lastSearchMode!==o.mode&&(n="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(o.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(o.facetPathsForIndexFields),this.lastSortType=o.order_by,this.lastSearchMode=o.mode,this.lastSearchTerm=o.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,n)}else if(typeof s.searchClientRequestProperties=="string"){let o="NEW_SEARCH_TERM";const n=JSON.parse(s.searchClientRequestProperties),u=(Array.isArray(n.query)?n.query:[n.query]).filter(p=>p.occur==="must"),l=JSON.stringify(u);this.lastFacetValues!==void 0&&this.lastFacetValues!==l?o="FACET_UPDATE":s.searchTerm.trim()===""&&this.lastSearchTerm===""?o="NEW_SEARCH_TERM":this.lastSearchTerm!==s.searchTerm&&(this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM"),this.lastFacetValues=l,this.lastSearchTerm=s.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,o)}}}onCoreAvailable(e){this.handleStateUpdate(e.store.getState()),this.unsubscribe=e.store.subscribe(s=>{this.handleStateUpdate(s)})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleCheckboxChange(e){var n;if(!this.selectedPaths[e])this.selectedPaths={...this.selectedPaths,[e]:!0};else{const h=Object.keys(this.selectedPaths).filter(u=>!u.includes(e));this.selectedPaths=h.reduce((u,l)=>(u[l]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(h=>this.selectedPaths[h]),o=Yn(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}renderFacet(e,s){let a=!1;for(const h of Object.keys(this.selectedPaths))this.selectedPaths[h]&&h.startsWith(s.path)&&h.length>s.path.length&&(a=!0);const o=Object.keys(this.selectedPaths).includes(s.path),n=Object.keys(s.children).length>0&&(o||a)||e==="@@root";return m("div",{class:"searchcraft-facet-list-item"},e!=="@@root"&&m("label",{class:"searchcraft-facet-list-checkbox-label"},m("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},m("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[s.path],onChange:h=>{this.handleCheckboxChange(s.path)},type:"checkbox"}),a?m("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},m("svg",{viewBox:"0 0 14 3",fill:"none"},m("title",null,"Checkbox dash"),m("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):m("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},m("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},m("title",null,"Checkbox check"),m("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),m("span",null,this.formatFacetName(e)," (",s.count,")")),n&&m("div",{class:"searchcraft-facet-list",style:{paddingLeft:e!=="@@root"?"24px":"0px",paddingTop:e!=="@@root"?"6px":"0px"}},Object.keys(s.children).map(h=>{if(s.children[h])return this.renderFacet(h,s.children[h])})))}render(){if(this.fieldName&&!(Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length===0))return Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length>0?m("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):m("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[0,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],exclude:[16],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function Js(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,Qn);break}})}const Kn=Js;function Mt(r,t){if(r&&t)return t.fieldNames.map(e=>{let s=r[e.fieldName];if(s)switch(e.dataType){case"date":{s=Xn(s,e.dateFormatLocale,e.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(e.numberFormatLocale,e.numberFormatOptions).format(s*(e.numberScale||1));break}}return s}).filter(e=>!!e).join(t.delimiter||" ")}function ea(r){return r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Xn(r,t="en-US",e={day:"numeric",month:"long",year:"numeric"}){const s=new Date(r),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const h=Math.trunc(o/1e3),u=Math.trunc(h/60),l=Math.trunc(u/60),p=Math.trunc(l/24),C=new Intl.RelativeTimeFormat(t,e);return p>=1?C.format(-p,"day"):l>=1?C.format(-l,"hour"):u>=1?C.format(-u,"minute"):C.format(0,"second")}return new Intl.DateTimeFormat(t,e).format(s)}function qr(r,t,e=0){const s=new Date(r);switch(t){case"year":return new Date(s.getFullYear()+e,0,1,0,0,0,0).getTime();case"month":return new Date(s.getFullYear(),s.getMonth()+e,1,0,0,0,0).getTime();case"day":return new Date(s.getFullYear(),s.getMonth(),s.getDate()+e,0,0,0,0).getTime();case"hour":return new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours()+e,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${t}`)}}function Jn(r,t,e){const s=new Date(t),a=new Date(e);switch(r){case"year":return Math.abs(a.getFullYear()-s.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(s.getFullYear()*12+s.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${r}`)}}const ta=r=>{if(r>=11&&r<=13)return`${r}th`;switch(r%10){case 1:return`${r}st`;case 2:return`${r}nd`;case 3:return`${r}rd`;default:return`${r}th`}};function eo(r,t){const e=new Intl.DateTimeFormat("en-US",{month:"short"});switch(r){case"year":return t.getFullYear().toString();case"month":return`${e.format(t)} ${t.getFullYear()}`;case"day":return`${e.format(t)} ${ta(t.getDate())}, ${t.getFullYear()}`;case"hour":{const s=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${e.format(t)} ${ta(t.getDate())}, ${s.format(t)}`}default:throw new Error(`Unsupported granularity: ${r}`)}}function to(r,t){let e=!1,s=null;const a=o=>{r(...o),e=!0,setTimeout(()=>{if(e=!1,s){const n=s;s=null,a(n)}},t)};return(...o)=>{e?s=o:a(o)}}const ro=ee(class extends J{constructor(){super();c(this,"max",100);c(this,"min",0);c(this,"step",1);c(this,"dataType","number");c(this,"dateGranularity");c(this,"lowerBound",0);c(this,"upperBound",1);c(this,"endValue",0);c(this,"startValue",0);c(this,"lastFocusedHandle","max");c(this,"throttledEmitUpdate",()=>{});c(this,"rangeChanged");c(this,"emitUpdate",async()=>{var e,s;switch(this.dataType){case"number":(e=this.rangeChanged)==null||e.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",o=qr(this.min,a,this.lowerBound+this.startValue),n=qr(this.min,a,this.lowerBound+this.endValue+1);(s=this.rangeChanged)==null||s.emit({startValue:o,endValue:n});break}}});c(this,"handleStartValueChange",e=>{const s=e.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});c(this,"handleEndValueChange",e=>{const s=e.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});c(this,"getLabel",e=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const s=this.dateGranularity||"year",a=this.lowerBound+e,o=qr(this.min,s,a);return eo(this.dateGranularity||"year",new Date(o))}}});this.__registerHost(),this.rangeChanged=Je(this,"rangeChanged")}connectedCallback(){switch(this.dataType){case"number":this.startValue=this.min,this.endValue=this.max,this.lowerBound=this.min,this.upperBound=this.max;break;case"date":{this.startValue=0,this.endValue=Jn(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=to(this.emitUpdate,120)}render(){const e=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,s=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),o=this.getLabel(this.endValue);return m("div",{key:"2c72254f52151edd2e2fa89c092fc788db0b5562",class:"searchcraft-slider"},m("div",{key:"98c25badf2c9386d7173ea552e510dcc168e7fc7",class:"searchcraft-slider-range"},m("div",{key:"50774db2253e34b1bce68acc0a40b2706cab542d",class:"searchcraft-slider-active-range",style:{left:`${e}%`,width:`${s-e}%`}}),m("input",{key:"229afedc1318a63cbd75806805210cf4f5695e6e",class:Se("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleStartValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),m("input",{key:"6aa038b01daaba86f501ebbbec30fc6720b549b3",class:Se("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleEndValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),m("div",{key:"f70501538635c3b08ad1e6ac101d0b3192ef8e04",class:"searchcraft-slider-label"},m("span",{key:"ddd539b86774f8900771d77d5ef7eb3a67c98d59",class:"searchcraft-slider-start-label"},a),m("span",{key:"b754a9c8d284e0623032cee6b92f9df88873ec04",class:"searchcraft-slider-end-label"},o)))}},[0,"searchcraft-slider",{max:[2],min:[2],step:[2],dataType:[1,"data-type"],dateGranularity:[1,"date-granularity"],lowerBound:[32],upperBound:[32],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function ra(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,ro);break}})}const so=ee(class extends J{constructor(){super();c(this,"label","Toggle");c(this,"subLabel");c(this,"searchcraftId");c(this,"toggleUpdated");c(this,"isActive",!1);c(this,"lastSearchTerm");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleToggle",async()=>{var e;this.isActive=!this.isActive,(e=this.toggleUpdated)==null||e.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=Je(this,"toggleUpdated")}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{s.searchTerm!==this.lastSearchTerm&&s.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=s.searchTerm})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return m("div",{key:"ab1d5ee21c7aaa28af1c405edc986556858366e8",class:Se("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},m("div",{key:"44f86a16d796d448bdb2fb3af72d4d8e1484364b"},m("p",{key:"9fedb38795d6379cae56dc005ab8e4a944b4261b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&m("p",{key:"44f3d17175184032275fec89a4cfe7f8266b7014",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),m("button",{key:"15fc18906ff2fb21fe646a4e3a8a2ace4a37cae2",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},m("div",{key:"716d29c65a199f63f5fd294dc3e3ad2ea4d53aa3",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function sa(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,so);break}})}const ao=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"items",[]);c(this,"lastSearchTerm");c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.core=e,this.setInitialDateRanges(),this.unsubscribe=e.store.subscribe(s=>{this.lastSearchTerm=s.searchTerm||""})}componentDidLoad(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}setInitialDateRanges(){var e,s;for(const a of this.items)if(a.type==="dateRange"){const o=a,n=o.options.minDate,h=o.options.maxDate||new Date;(s=(e=this.core)==null?void 0:e.store.getState())==null||s.addRangeValueForIndexField({fieldName:o.fieldName,value:`${o.fieldName}:[${n.toISOString()} TO ${h.toISOString()}]`})}}handleDateRangeChanged(e,s,a){var h,u,l,p;const o=new Date(s),n=new Date(a);(u=(h=this.core)==null?void 0:h.store.getState())==null||u.addRangeValueForIndexField({fieldName:e.fieldName,value:`${e.fieldName}:[${o.toISOString()} TO ${n.toISOString()}]`}),(p=(l=this.core)==null?void 0:l.store.getState())==null||p.search()}handleNumericRangeChanged(e,s,a){var o,n,h,u;(n=(o=this.core)==null?void 0:o.store.getState())==null||n.addRangeValueForIndexField({fieldName:e,value:`${e}:[${s} TO ${a}]`}),(u=(h=this.core)==null?void 0:h.store.getState())==null||u.search()}handleFacetSelectionUpdated(e,s){var a,o,n,h,u,l;s.length>0?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.addFacetPathsForIndexField({fieldName:e,value:`${e}: IN [${s.join(" ")}]`}):(h=(n=this.core)==null?void 0:n.store.getState())==null||h.removeFacetPathsForIndexField(e),(l=(u=this.core)==null?void 0:u.store.getState())==null||l.search()}handleExactMatchToggleUpdated(e){var s,a,o,n;(a=(s=this.core)==null?void 0:s.store.getState())==null||a.setSearchMode(e?"exact":"fuzzy"),(n=(o=this.core)==null?void 0:o.store.getState())==null||n.search()}handleMostRecentToggleUpdated(e,s){var a,o,n,h,u,l;s?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.setSortOrder({orderByField:e,sortType:"desc"}):(h=(n=this.core)==null?void 0:n.store.getState())==null||h.setSortOrder({orderByField:null,sortType:null}),(l=(u=this.core)==null?void 0:u.store.getState())==null||l.search()}render(){return m("div",{key:"ee8974e38b296a1ba27111bc2a4244d8915f5839",class:"searchcraft-filter-panel"},this.items.map(e=>{switch(e.type){case"dateRange":{const s=e,a=s.options.maxDate||new Date;return m("div",{class:"searchcraft-filter-panel-section"},m("p",{class:"searchcraft-filter-panel-label"},e.label),m("searchcraft-slider",{min:s.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:s.options.granularity,onRangeChanged:o=>{this.handleDateRangeChanged(s,o.detail.startValue,o.detail.endValue)}}))}case"numericRange":{const s=e;return m("div",{class:"searchcraft-filter-panel-section"},m("p",{class:"searchcraft-filter-panel-label"},e.label),m("searchcraft-slider",{min:s.options.min,max:s.options.max,step:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=e;return m("div",{class:"searchcraft-filter-panel-section"},m("p",{class:"searchcraft-filter-panel-label"},e.label),m("searchcraft-facet-list",{fieldName:s.fieldName,exclude:s.options.exclude,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=e;return m("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=e;return m("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],lastSearchTerm:[32]}]);function no(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,ao);break;case"searchcraft-facet-list":customElements.get(t)||Js();break;case"searchcraft-slider":customElements.get(t)||ra();break;case"searchcraft-toggle-button":customElements.get(t)||sa();break}})}const oo=no,io=ee(class extends J{constructor(){super();c(this,"inputLabelClassName","");c(this,"label","");this.__registerHost()}render(){return m("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:Se("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Vr(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,io);break}})}const co=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"autoSearch",!0);c(this,"buttonPlacement","none");c(this,"buttonLabel");c(this,"inputLabel");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"value");c(this,"inputFocus");c(this,"inputBlur");c(this,"inputInit");c(this,"inputValue","");c(this,"searchTerm","");c(this,"error",!1);c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleInput",e=>{var a;const s=e.target;this.inputValue=s.value,(a=this.core)==null||a.store.getState().setSearchTerm(s.value),this.autoSearch&&this.performSearch()});c(this,"performSearch",async()=>{var e;this.error=!1;try{await((e=this.core)==null?void 0:e.store.getState().search())}catch{this.error=!0}});c(this,"handleClearInput",()=>{var e;this.inputValue="",(e=this.core)==null||e.store.getState().resetSearchValues(),this.error=!1});c(this,"handleFormSubmit",async e=>{e.preventDefault(),await this.performSearch()});this.__registerHost(),this.inputFocus=Je(this,"inputFocus"),this.inputBlur=Je(this,"inputBlur"),this.inputInit=Je(this,"inputInit")}init(){var e;this.core&&(this.value!==void 0&&this.value.trim().length>0&&(this.inputValue=this.value,this.core.store.getState().setSearchTerm(this.value),this.autoSearch&&this.core.store.getState().search()),(e=this.inputInit)==null||e.emit())}onCoreChange(){this.init()}onValueChange(e){var s,a;e!==void 0&&e!==this.inputValue&&(this.inputValue=e,(s=this.core)==null||s.store.getState().setSearchTerm(e),this.autoSearch&&e.trim().length>0&&((a=this.core)==null||a.store.getState().search()))}onCoreAvailable(e){this.core=e,this.init(),this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,(this.value===void 0||s.searchTerm==="")&&(this.inputValue=s.searchTerm)})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=this.inputValue.length>0,s=Se("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return m("form",{key:"d214ace44e9209154d215e803de088aefa58a285",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},m("div",{key:"5699f5dca28caf5e9584401f1883d2e08d26e3ec",class:s,style:o},m("div",{key:"ef792a946414a680e9c99c145246d00b9b8f2ffb",class:"searchcraft-input-form-button"},m("searchcraft-button",{key:"ba5a8cb98889bb486781af4915a21c94a0b1498a",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&m("div",{key:"a9e770ef967f7ab1c6ddf8f87f23cea509894536",class:"searchcraft-input-form-label"},m("searchcraft-input-label",{key:"93b29e630e71a3c7724921aa9586aab76e592f4f",label:this.inputLabel})),this.error&&m("div",{key:"641ef4f468d527c24a1635d49dcbbba03030686f",class:"searchcraft-input-form-error-message"},m("searchcraft-error-message",{key:"2d839d17b702fe1b41d7e49aacfc52fb53315766"},"Something went wrong.")),m("div",{key:"af0c73478de21447c992bd0037ba007d54f53a86",class:"searchcraft-input-form-input-wrapper"},m("input",{key:"3de1be1aa71c143b58cd6080d422410bd400e4e5",autoComplete:"off",class:Se("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),m("div",{key:"fe9043c046e3b1b91129299f0860919ba8a8416b",class:"searchcraft-input-form-input-icon"},m("svg",{key:"31ae1553cd214d5e2f97c9e3699862dff51a0916",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},m("title",{key:"9db677da65283ff15b0d4e79b5d9daf89637b33f"},"Search icon"),m("path",{key:"2a002eae6ed3725a432e7c3e4649c0bd2ffff7a0",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),e&&m("button",{key:"b7e92b22c3234eb31d85b0aa98d7c682b2fc0021",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},m("svg",{key:"bfbeb742f197da0cac6dd5df2627db9df5349207",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},m("title",{key:"c62b9d237b3762609fed72e0520322fb5eabe979"},"Clear icon"),m("path",{key:"198a13760ce8b076ef8e791dec933b210ff3017a",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"],value:["onValueChange"]}}},[0,"searchcraft-input-form",{searchcraftId:[1,"searchcraft-id"],autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],value:[1],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"],value:["onValueChange"]}]);function aa(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,co);break;case"searchcraft-button":customElements.get(t)||sr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-input-label":customElements.get(t)||Vr();break}})}const lo=aa,uo=Vr,ho=ee(class extends J{constructor(){super();c(this,"label");this.__registerHost()}render(){return m("div",{key:"507cde7e8f74682d0535a65fbc787b18fa4c49f7",class:"searchcraft-loading"},m("div",{key:"de8d4db44bd0d54baa276403063327b040a39ee4",class:"searchcraft-loading-bars"},m("div",{key:"3ef1ad066aef5582de0afe08c598747e48533f0a",class:"searchcraft-loading-bar-1"}),m("div",{key:"0e9b5bfb8c031b1d788b0f39a63b1b325f123aad",class:"searchcraft-loading-bar-2"}),m("div",{key:"b342f47a3869301d17e66f0ae79cbea6b2a7ed41",class:"searchcraft-loading-bar-3"}),m("div",{key:"c11c58254a005b80c54b98f6713acb4c7f376a58",class:"searchcraft-loading-bar-4"}),m("div",{key:"c53ff4d003ed8e1d17fdc2ab8d61b2d3313dd5ac",class:"searchcraft-loading-bar-5"}),m("div",{key:"3f517f20a24a844c04562cbb95b3a39502905405",class:"searchcraft-loading-bar-6"})),m("p",{key:"11a63145472d8ded9d28bf7e9cfde9097e6a02e2",class:"searchcraft-loading-label"},this.label))}},[0,"searchcraft-loading",{label:[1]}]);function na(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(t=>{switch(t){case"searchcraft-loading":customElements.get(t)||customElements.define(t,ho);break}})}const fo=na,po=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPerPage");c(this,"searchResultsPage");c(this,"searchResultsCount");c(this,"searchClientRequestProperties");c(this,"searchResultsPagesCount",1);c(this,"searchResultsRangeMin",1);c(this,"searchResultsRangeMax",1);c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,this.searchClientRequestProperties=s.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=s.setSearchResultsPage})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleGoToPage(e){this.setSearchResultsPage(e)}renderOddPaginationItem(e){return m("li",null,m("button",{class:Se("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===e}),onClick:()=>this.handleGoToPage(e),type:"button"},e))}renderEvenPaginationItem(e){if(!(this.searchResultsPagesCount<=e))return(this.searchResultsPagesCount<=5||e<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=e+1:this.searchResultsPage>=e-1)?m("li",null,m("button",{class:Se("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===e}),onClick:()=>this.handleGoToPage(e),type:"button"},e)):m("li",null,m("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?m("li",null,m("button",{class:Se("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):m("li",null,m("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){const e=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!e||this.searchResultsPagesCount<=1))return m("div",{class:"searchcraft-pagination"},m("div",{class:"searchcraft-pagination-control"},m("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:m("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",null,"Previous page icon"),m("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),m("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),m("div",{class:"searchcraft-pagination-control"},m("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:m("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",null,"Next page icon"),m("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function mo(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,po);break;case"searchcraft-button":customElements.get(t)||sr();break}})}const go=mo,bo=ee(class extends J{constructor(){super();c(this,"template");c(this,"type");c(this,"searchcraftId");c(this,"hotkey");c(this,"hotkeyModifier");c(this,"hotkeyModifierSymbol");c(this,"isPopoverVisible");c(this,"userAgent");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");c(this,"core");c(this,"renderOptionSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Option key"),m("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),m("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));c(this,"renderCtrlSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Ctrl key"),m("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));c(this,"renderWindowsMetaSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Windows meta key"),m("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));c(this,"renderMacMetaSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Mac meta key"),m("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));this.__registerHost()}onCoreAvailable(e){this.core=e;const s=e.store.getState();this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.isPopoverVisible=s.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=e.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var e;(e=this.core)==null||e.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}setUserAgent(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("windows"):return"window";case e.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return m("div",{class:"searchcraft-popover-button-wrapper"},m("div",{class:"searchcraft-popover-button-input"},m("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},m("title",null,"Search icon"),m("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),m("span",null,"Search")),m("div",{class:"searchcraft-popover-button-keycaps"},m("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},m("span",null,this.hotkeyModifierSymbol)),m("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},m("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return m("div",null,m("slot",null))}}render(){return m("button",{key:"ef815c1ea4ecde68fe152f80b811a95ccb9a38be",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:At}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[4,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function vo(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,bo);break}})}const yo=vo,ko=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"searchResultsCount");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.searchResultsCount=e.store.getState().searchResultsCount,this.unsubscribe=e.store.subscribe(s=>{this.searchResultsCount=s.searchResultsCount})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return m("footer",{key:"e12fa32df3c1137e643af22323feb3dc33f7718f",class:"searchcraft-popover-footer"},m("p",{key:"73a33859c1702d82625748f398d5402030cc71f4",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ea(this.searchResultsCount)} Results Found`:" "),m("a",{key:"9d32f6b21b166fef3e17e5b2eb81bfafe32f8d1a",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},m("svg",{key:"e47249460b6e2b5bb2a25d37c33d8a85b8c6013e",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",{key:"438e675ff71edfc2176c08abe8efa34aaf7496ca"},"Powered by Searchcraft"),m("path",{key:"484e8935fb1cb84a79b8402748bac1da8171e9de",d:"M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z",fill:"currentColor"}))))}},[0,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],searchResultsCount:[32]}]);function oa(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,ko);break}})}const Co=oa,xo=ee(class extends J{constructor(){super();c(this,"item");c(this,"popoverResultMappings");c(this,"documentPosition",0);c(this,"searchcraftId");c(this,"title");c(this,"subtitle");c(this,"href");c(this,"imageSource");c(this,"imageAlt");c(this,"core");c(this,"cleanupCore");c(this,"handleLinkClick",()=>{var e;if(this.core){const s=this.documentPosition,a=this.core.store.getState().searchTerm,o=this.core.store.getState().searchClientResponseItems.length||0;(e=this.core.measureClient)==null||e.sendMeasureEvent("document_clicked",{document_position:s,number_of_documents:o,search_term:a})}});this.__registerHost()}mapValuesFromDocument(e){var s,a,o,n,h;this.title=Mt(e,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Mt(e,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Mt(e,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Mt(e,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Mt(e,(h=this.popoverResultMappings)==null?void 0:h.imageAlt)}onCoreAvailable(e){this.core=e}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}render(){return m("div",{key:"fe1f0a2803c05c7f7901a1e34e3751283683b841",class:"searchcraft-popover-list-item"},m("a",{key:"b1765b28e4df4483554e4aa1e776f85817f45709",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&m("div",{key:"d47112466fe3414278f88db73294c829eceb63ba",class:"searchcraft-popover-list-item-image-wrapper"},m("img",{key:"cf65d6520a2586f9b056775a0d1c3e85cb81cdd7",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),m("div",{key:"b6bdaf2e52e216d20c23790b4b53563be8709d40",class:"searchcraft-popover-list-item-content"},this.title&&m("p",{key:"21a6541924914c8ea2b798d0e910c6e4544b7e46",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&m("p",{key:"625a1d6b1a7e6bfb848fd49cb316968b396b0473",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],searchcraftId:[1,"searchcraft-id"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function jr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,xo);break}})}const So=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"popoverResultMappings");c(this,"searchClientResponseItems");c(this,"adClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"config");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.config=e.config}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}renderWithADMAds(){var e,s;return m("div",{class:"searchcraft-popover-list-view"},(e=this.adClientResponseItems)==null?void 0:e.map(a=>m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,l,p,C,w,$,A,N;const e=[],s=((l=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:l.adInterstitialInterval)||0,a=((C=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=(($=(w=this.config)==null?void 0:w.customAdConfig)==null?void 0:$.adStartQuantity)||0,n=((N=(A=this.config)==null?void 0:A.customAdConfig)==null?void 0:N.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let D=0;D<o;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));h.forEach((D,P)=>{if(s&&P%s===0&&P+s<h.length&&P>=s)for(let I=0;I<a;I++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${I}`,renderPosition:"interstitial"}));e.push(m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:D,key:D.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+P}))});for(let D=0;D<n;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-popover-list-view"},e)}renderWithNativoAds(){var l,p,C,w,$,A,N,D,P,I;const e=[],s=((p=(l=this.config)==null?void 0:l.nativoConfig)==null?void 0:p.adInterstialStartIndex)||0,a=((w=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:w.adInterstitialInterval)||0,o=((A=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:A.adInterstitialQuantity)||1,n=((D=(N=this.config)==null?void 0:N.nativoConfig)==null?void 0:D.adStartQuantity)||0,h=((I=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:I.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let U=0;U<n;U++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${U}-ad`,renderPosition:"top"}));u.forEach((U,j)=>{if(a&&(j+s)%a===0&&j+a<u.length&&j>=a)for(let ae=0;ae<o;ae++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${U.id}-ad-${ae}`,renderPosition:"interstitial"}));e.push(m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:U,key:U.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+j}))});for(let U=0;U<h;U++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${U}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-popover-list-view"},e)}renderWithNoAds(){var e;return m("div",{class:"searchcraft-popover-list-view"},(e=this.searchClientResponseItems)==null?void 0:e.map((s,a)=>m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var e,s,a;return(e=this.config)!=null&&e.customAdConfig?this.renderWithCustomAds():(s=this.config)!=null&&s.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[0,"searchcraft-popover-list-view",{searchcraftId:[1,"searchcraft-id"],popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function ia(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,So);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-popover-list-item":customElements.get(t)||jr();break}})}const wo=ee(class extends J{constructor(){super();c(this,"type","inline");c(this,"popoverResultMappings");c(this,"hotkey","k");c(this,"hotkeyModifier","meta");c(this,"searchcraftId");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"isPopoverVisibleInState",!1);c(this,"searchClientResponseItems",[]);c(this,"adClientResponseItems",[]);c(this,"searchTerm");c(this,"isFocused",!1);c(this,"breakpointSm",576);c(this,"breakpointMd",768);c(this,"breakpointLg",992);c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"modalElement");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"core");c(this,"handleDocumentClick",e=>{this.hostElement.contains(e.target)||(this.isFocused=!1)});c(this,"handleDocumentKeyDown",e=>{var s;if(e.key===this.hotkey&&this.handleHotkeyPressed(e),!!this.hostElement.contains(document.activeElement))switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.focusOnNextListItem(e.key);break;case"Escape":(s=this.core)==null||s.store.getState().setPopoverVisibility(!1);break;default:return}});c(this,"handleInputInit",()=>{const e=this.hostElement.querySelector(".searchcraft-input-form-input");e==null||e.focus()});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e;const s=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=e.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=e.store.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage}),e.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(e){this.isPopoverVisibleInState=e,document.body.style.overflow=e?"hidden":"auto"}handleInputFocus(){var e;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((e=this.core)==null||e.store.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),this.modalElement.setAttribute("searchcraft-id",this.searchcraftId),this.placeholderValue&&this.modalElement.setAttribute("placeholder-value",this.placeholderValue),this.placeholderBehavior&&this.modalElement.setAttribute("placeholder-behavior",this.placeholderBehavior),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(e){var s;(s=this.core)==null||s.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(e){var s;if(e.ctrlKey&&this.hotkeyModifier==="ctrl"||e.altKey&&this.hotkeyModifier==="alt"||e.metaKey&&this.hotkeyModifier==="meta")if(e.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(s=this.core)==null||s.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var e;(e=this.core)==null||e.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(e){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(h=>!h.hasAttribute("disabled")&&h.offsetParent!==null),a=s.indexOf(document.activeElement);if(e==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(e==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const h=document.querySelector(".searchcraft-input-form-input");h&&(h.focus(),requestAnimationFrame(()=>{h.selectionEnd=h.value.length,h.selectionStart=h.value.length}))}}get hasResultsToShow(){var e,s;return this.searchTerm&&((s=(e=this.searchTerm)==null?void 0:e.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const e=this.hasResultsToShow&&this.isFocused;return m("div",{class:Se("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":e})},m("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},m("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),e&&m("div",{class:"searchcraft-popover-form-inline-wrapper"},m("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),m("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderModalPopover(){if(this.isPopoverVisibleInState)return m("div",{class:Se("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},m("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),m("div",{class:"searchcraft-popover-form-modal-wrapper"},m("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},m("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),m("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),m("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&m("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),m("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return m("div",{class:Se("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},m("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},m("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),m("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),m("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&m("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),m("searchcraft-popover-footer",{searchcraftId:this.searchcraftId}))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function ca(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,wo);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-button":customElements.get(t)||sr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-input-form":customElements.get(t)||aa();break;case"searchcraft-input-label":customElements.get(t)||Vr();break;case"searchcraft-popover-footer":customElements.get(t)||oa();break;case"searchcraft-popover-form":customElements.get(t)||ca();break;case"searchcraft-popover-list-item":customElements.get(t)||jr();break;case"searchcraft-popover-list-view":customElements.get(t)||ia();break}})}const Ro=ca,Eo=jr,To=ia,Po=ee(class extends J{constructor(){super();c(this,"template");c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"searchClientRequestProperties");c(this,"count",0);c(this,"range",[0,0]);c(this,"responseTime","0");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsCount=s.searchResultsCount,this.searchClientRequestProperties=s.searchClientRequestProperties,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((s.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";return!this.searchTerm&&!e||this.searchResultsCount===0?null:m("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:At}):`${ea(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],count:[32],range:[32],responseTime:[32]}]);function $o(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,Po);break}})}const Io=$o,_o=ee(class extends J{constructor(){super();c(this,"item");c(this,"index");c(this,"documentPosition",0);c(this,"template");c(this,"searchcraftId");c(this,"templateHtml");c(this,"core");c(this,"cleanupCore");c(this,"handleResultContainerClick",e=>{var u;if(!e.target)return;const a=e.target.closest("a");if(!a||!((u=this.hostElement)!=null&&u.contains(a))||!this.core||!this.core.measureClient)return;const o=this.documentPosition,n=this.core.store.getState().searchTerm,h=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:h,search_term:n})});c(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e}connectedCallback(){var e;if(this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(e=this.template)==null?void 0:e.call(this,this.item.document,this.index,{html:At,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}render(){if(this.item)return typeof this.template>"u"?m("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([e,s])=>m("p",{key:e},m("strong",null,e),": ",s))):m("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function la(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,_o);break}})}const Ao=la,Mo=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"initialQuery");c(this,"template");c(this,"adClientResponseItems",[]);c(this,"config");c(this,"isSearchInProgress",!0);c(this,"searchClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchTerm","");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){var a;const s=e.store.getState();this.handleStateChange(s),this.searchClientResponseItems=s.searchClientResponseItems,this.searchTerm=s.searchTerm,this.config=(a=s.core)==null?void 0:a.config,this.unsubscribe=e.store.subscribe(o=>this.handleStateChange(o))}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(e){var s;this.adClientResponseItems=[...e.adClientResponseItems],this.config=(s=e.core)==null?void 0:s.config,this.isSearchInProgress=e.isSearchInProgress,this.searchClientResponseItems=[...e.searchClientResponseItems],this.searchResultsPage=e.searchResultsPage,this.searchResultsPerPage=e.searchResultsPerPage,this.searchTerm=e.searchTerm}renderEmptyState(){return m("div",{class:"searchcraft-search-results-empty-state"},m("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return m("div",{class:"searchcraft-search-results"},m("div",{class:"searchcraft-search-results-error-message"},m("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s;const e=this.searchClientResponseItems||[];return m("div",{class:"searchcraft-search-results"},(s=this.adClientResponseItems)==null?void 0:s.map(a=>m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),e.map((a,o)=>m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+o,index:o,item:a,template:this.template})))}renderWithCustomAds(){var u,l,p,C,w,$,A,N;const e=[],s=((l=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:l.adInterstitialInterval)||0,a=((C=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=(($=(w=this.config)==null?void 0:w.customAdConfig)==null?void 0:$.adStartQuantity)||0,n=((N=(A=this.config)==null?void 0:A.customAdConfig)==null?void 0:N.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let D=0;D<o;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));h.forEach((D,P)=>{if(s&&P%s===0&&P+s<h.length&&P>=s)for(let I=0;I<a;I++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${I}`,renderPosition:"interstitial"}));e.push(m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:D.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+P,index:P,item:D,template:this.template}))});for(let D=0;D<n;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-search-results"},e)}renderWithNativoAds(){var l,p,C,w,$,A,N,D,P,I;const e=[],s=((p=(l=this.config)==null?void 0:l.nativoConfig)==null?void 0:p.adInterstialStartIndex)||0,a=((w=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:w.adInterstitialInterval)||0,o=((A=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:A.adInterstitialQuantity)||1,n=((D=(N=this.config)==null?void 0:N.nativoConfig)==null?void 0:D.adStartQuantity)||0,h=((I=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:I.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let U=0;U<n;U++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${U}-ad`,renderPosition:"top"}));u.forEach((U,j)=>{if(a&&(j+s)%a===0&&j+a<u.length&&j>=a)for(let ae=0;ae<o;ae++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${U.id}-ad-${ae}`,renderPosition:"interstitial"}));e.push(m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:U.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+j,index:j,item:U,template:this.template}))});for(let U=0;U<h;U++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${U}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-search-results"},e)}renderWithNoAds(){const e=this.searchClientResponseItems||[];return m("div",{class:"searchcraft-search-results"},e.map((s,a)=>m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:s.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:s,template:this.template})))}render(){var s,a,o;const e=this.searchClientResponseItems||[];return e.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&e.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(s=this.config)!=null&&s.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(o=this.config)!=null&&o.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[4,"searchcraft-search-results",{searchcraftId:[1,"searchcraft-id"],initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Oo(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-results":customElements.get(t)||customElements.define(t,Mo);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-search-result":customElements.get(t)||la();break}})}const Lo=Oo,Fo=ee(class extends J{constructor(){super();c(this,"caption");c(this,"disabled",!1);c(this,"inputId");c(this,"label");c(this,"labelId");c(this,"name");c(this,"options",[]);c(this,"selectChange");c(this,"searchResultsPerPage");c(this,"setSearchResultsPage",()=>{});c(this,"setSearchResultsPerPage",()=>{});c(this,"handleSelectChange",e=>{this.selectChange.emit(e.target.value)});this.__registerHost(),this.selectChange=Je(this,"selectChange")}handleGoToPage(e){this.setSearchResultsPage(e)}render(){return m("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&m("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),m("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},m("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:e,value:s,selected:a})=>m("option",{key:s,value:s,selected:a},e))),m("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),m("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&m("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function ua(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Fo);break}})}const Do=ee(class extends J{constructor(){super();c(this,"increment",20);c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"searchResultsPagesCount");c(this,"searchClientRequestProperties");c(this,"initialSearchResultsPerPage");c(this,"setSearchResultsPerPage",()=>{});c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,this.searchClientRequestProperties=s.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=s.setSearchResultsPage,this.setSearchResultsPerPage=s.setSearchResultsPerPage}),this.initialSearchResultsPerPage=e.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!e||this.searchResultsPagesCount<=1))return m("div",{class:"searchcraft-search-results-per-page"},m("div",{class:"searchcraft-search-results-per-page-select"},m("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),m("div",{class:"searchcraft-search-results-per-page-select-input"},m("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((s,a)=>{const o=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${o}`,value:o}}),onSelectChange:s=>{this.setSearchResultsPerPage(Number(s.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchClientRequestProperties:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function No(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Do);break;case"searchcraft-select":customElements.get(t)||ua();break}})}const zo=No,Ho=ua,Uo=ra;var ha={exports:{}};(function(r,t){(function(e,s){r.exports=s()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Zs,function(){var je;var e={},s=e,a={exports:e},o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=(f,i)=>{for(var d in i)o(f,d,{get:i[d],enumerable:!0})},p=(f,i,d,g)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of h(i))!u.call(f,v)&&v!==d&&o(f,v,{get:()=>i[v],enumerable:!(g=n(i,v))||g.enumerable});return f},C=f=>p(o({},"__esModule",{value:!0}),f),w={};l(w,{Hooks:()=>qe,Lexer:()=>Ie,Marked:()=>yr,Parser:()=>Re,Renderer:()=>ne,TextRenderer:()=>at,Tokenizer:()=>dt,defaults:()=>A,getDefaults:()=>$,lexer:()=>re,marked:()=>W,options:()=>kr,parse:()=>ce,parseInline:()=>xr,parser:()=>Sr,setOptions:()=>vs,use:()=>Cr,walkTokens:()=>oe}),a.exports=C(w);function $(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=$();function N(f){A=f}var D={exec:()=>null};function P(f,i=""){let d=typeof f=="string"?f:f.source;const g={replace:(v,y)=>{let R=typeof y=="string"?y:y.source;return R=R.replace(I.caret,"$1"),d=d.replace(v,R),g},getRegex:()=>new RegExp(d,i)};return g}var I={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:f=>new RegExp(`^( {0,3}${f})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}#`),htmlBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}<(?:[a-z].*>|!--)`,"i")},U=/^(?:[ \t]*(?:\n|$))+/,j=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,se=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,le=P(Le).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),as=P(Le).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),z=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ns=/^[^\n]+/,Ae=/(?!\s*\])(?:\\.|[^\[\]\\])+/,it=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ae).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ur=P(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),tt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ct=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,os=P("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ct).replace("tag",tt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yt=P(z).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tt).getRegex(),is=P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yt).getRegex(),kt={blockquote:is,code:j,def:it,fences:ae,heading:se,hr:Y,html:os,lheading:le,list:ur,newline:U,paragraph:yt,table:D,text:ns},Ft=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tt).getRegex(),Dt={...kt,lheading:as,table:Ft,paragraph:P(z).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ft).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tt).getRegex()},hr={...kt,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ct).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(z).replace("hr",Y).replace("heading",` *#{1,6} *[^
7
- ]`).replace("lheading",le).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dr=/^( {2,}|\\)\n(?!\s*$)/,ls=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xt=/[\p{P}\p{S}]/u,Nt=/[\s\p{P}\p{S}]/u,zt=/[^\s\p{P}\p{S}]/u,us=P(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nt).getRegex(),fr=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,hs=/(?:[^\s\p{P}\p{S}]|~)/u,mr=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,rt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ds=P(rt,"u").replace(/punct/g,xt).getRegex(),fs=P(rt,"u").replace(/punct/g,fr).getRegex(),Ht="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gr=P(Ht,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),ps=P(Ht,"gu").replace(/notPunctSpace/g,hs).replace(/punctSpace/g,pr).replace(/punct/g,fr).getRegex(),B=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),O=P(/\\(punct)/,"gu").replace(/punct/g,xt).getRegex(),V=P(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),q=P(ct).replace("(?:-->|$)","-->").getRegex(),ue=P("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",q).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),we=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,st=P(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",we).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),St=P(/^!?\[(label)\]\[(ref)\]/).replace("label",we).replace("ref",Ae).getRegex(),Ut=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ae).getRegex(),lt=P("reflink|nolink(?!\\()","g").replace("reflink",St).replace("nolink",Ut).getRegex(),Bt={_backpedal:D,anyPunctuation:O,autolink:V,blockSkip:mr,br:dr,code:cs,del:D,emStrongLDelim:ds,emStrongRDelimAst:gr,emStrongRDelimUnd:B,escape:Ct,link:st,nolink:Ut,punctuation:us,reflink:St,reflinkSearch:lt,tag:ue,text:ls,url:D},ms={...Bt,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",we).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",we).getRegex()},qt={...Bt,emStrongRDelimAst:ps,emStrongLDelim:fs,url:P(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},wt={...qt,br:P(dr).replace("{2,}","*").getRegex(),text:P(qt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Fe={normal:kt,gfm:Dt,pedantic:hr},ut={normal:Bt,gfm:qt,breaks:wt,pedantic:ms},gs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},br=f=>gs[f];function $e(f,i){if(i){if(I.escapeTest.test(f))return f.replace(I.escapeReplace,br)}else if(I.escapeTestNoEncode.test(f))return f.replace(I.escapeReplaceNoEncode,br);return f}function ht(f){try{f=encodeURI(f).replace(I.percentDecode,"%")}catch{return null}return f}function he(f,i){var y;const d=f.replace(I.findPipe,(R,k,T)=>{let x=!1,S=k;for(;--S>=0&&T[S]==="\\";)x=!x;return x?"|":" |"}),g=d.split(I.splitPipe);let v=0;if(g[0].trim()||g.shift(),g.length>0&&!((y=g.at(-1))!=null&&y.trim())&&g.pop(),i)if(g.length>i)g.splice(i);else for(;g.length<i;)g.push("");for(;v<g.length;v++)g[v]=g[v].trim().replace(I.slashPipe,"|");return g}function Me(f,i,d){const g=f.length;if(g===0)return"";let v=0;for(;v<g&&f.charAt(g-v-1)===i;)v++;return f.slice(0,g-v)}function Vt(f,i){if(f.indexOf(i[1])===-1)return-1;let d=0;for(let g=0;g<f.length;g++)if(f[g]==="\\")g++;else if(f[g]===i[0])d++;else if(f[g]===i[1]&&(d--,d<0))return g;return d>0?-2:-1}function vr(f,i,d,g,v){const y=i.href,R=i.title||null,k=f[1].replace(v.other.outputLinkReplace,"$1");g.state.inLink=!0;const T={type:f[0].charAt(0)==="!"?"image":"link",raw:d,href:y,title:R,text:k,tokens:g.inlineTokens(k)};return g.state.inLink=!1,T}function bs(f,i,d){const g=f.match(d.other.indentCodeCompensation);if(g===null)return i;const v=g[1];return i.split(`
5
+ */(function(r){(function(){var t={}.hasOwnProperty;function e(){for(var o="",n=0;n<arguments.length;n++){var h=arguments[n];h&&(o=a(o,s(h)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return e.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var h in o)t.call(o,h)&&o[h]&&(n=a(n,h));return n}function a(o,n){return n?o?o+" "+n:o+n:o}r.exports?(e.default=e,r.exports=e):window.classNames=e})()})(Gs);const we=Gs.exports;var Zs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Ys={exports:{}};/*! @license DOMPurify 3.2.4 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.4/LICENSE */(function(r,t){(function(e,s){r.exports=s()})(Zs,function(){const{entries:e,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:h,seal:u,create:l}=Object,{apply:p,construct:C}=typeof Reflect<"u"&&Reflect;h||(h=function(O){return O}),u||(u=function(O){return O}),p||(p=function(O,q,V){return O.apply(q,V)}),C||(C=function(O,q){return new O(...q)});const S=le(Array.prototype.forEach),$=le(Array.prototype.lastIndexOf),A=le(Array.prototype.pop),N=le(Array.prototype.push),D=le(Array.prototype.splice),P=le(String.prototype.toLowerCase),I=le(String.prototype.toString),B=le(String.prototype.match),j=le(String.prototype.replace),ae=le(String.prototype.indexOf),Y=le(String.prototype.trim),se=le(Object.prototype.hasOwnProperty),Q=le(RegExp.prototype.test),Fe=as(TypeError);function le(U){return function(O){for(var q=arguments.length,V=new Array(q>1?q-1:0),ue=1;ue<q;ue++)V[ue-1]=arguments[ue];return p(U,O,V)}}function as(U){return function(){for(var O=arguments.length,q=new Array(O),V=0;V<O;V++)q[V]=arguments[V];return C(U,q)}}function z(U,O){let q=arguments.length>2&&arguments[2]!==void 0?arguments[2]:P;s&&s(U,null);let V=O.length;for(;V--;){let ue=O[V];if(typeof ue=="string"){const Se=q(ue);Se!==ue&&(a(O)||(O[V]=Se),ue=Se)}U[ue]=!0}return U}function ns(U){for(let O=0;O<U.length;O++)se(U,O)||(U[O]=null);return U}function Ae(U){const O=l(null);for(const[q,V]of e(U))se(U,q)&&(Array.isArray(V)?O[q]=ns(V):V&&typeof V=="object"&&V.constructor===Object?O[q]=Ae(V):O[q]=V);return O}function it(U,O){for(;U!==null;){const V=n(U,O);if(V){if(V.get)return le(V.get);if(typeof V.value=="function")return le(V.value)}U=o(U)}function q(){return null}return q}const ur=h(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),tt=h(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ct=h(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),os=h(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),yt=h(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),is=h(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),kt=h(["#text"]),Lt=h(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),Dt=h(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),hr=h(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ct=h(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),cs=u(/\{\{[\w\W]*|[\w\W]*\}\}/gm),dr=u(/<%[\w\W]*|[\w\W]*%>/gm),ls=u(/\$\{[\w\W]*/gm),xt=u(/^data-[\-\w.\u00B7-\uFFFF]+$/),Nt=u(/^aria-[\-\w]+$/),zt=u(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),us=u(/^(?:\w+script|data):/i),fr=u(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pr=u(/^html$/i),hs=u(/^[a-z][.\w]*(-[.\w]+)+$/i);var mr=Object.freeze({__proto__:null,ARIA_ATTR:Nt,ATTR_WHITESPACE:fr,CUSTOM_ELEMENT:hs,DATA_ATTR:xt,DOCTYPE_NAME:pr,ERB_EXPR:dr,IS_ALLOWED_URI:zt,IS_SCRIPT_OR_DATA:us,MUSTACHE_EXPR:cs,TMPLIT_EXPR:ls});const rt={element:1,text:3,progressingInstruction:7,comment:8,document:9},ds=function(){return typeof window>"u"?null:window},fs=function(O,q){if(typeof O!="object"||typeof O.createPolicy!="function")return null;let V=null;const ue="data-tt-policy-suffix";q&&q.hasAttribute(ue)&&(V=q.getAttribute(ue));const Se="dompurify"+(V?"#"+V:"");try{return O.createPolicy(Se,{createHTML(st){return st},createScriptURL(st){return st}})}catch{return console.warn("TrustedTypes policy "+Se+" could not be created."),null}},Ht=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function gr(){let U=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ds();const O=F=>gr(F);if(O.version="3.2.4",O.removed=[],!U||!U.document||U.document.nodeType!==rt.document||!U.Element)return O.isSupported=!1,O;let{document:q}=U;const V=q,ue=V.currentScript,{DocumentFragment:Se,HTMLTemplateElement:st,Node:wt,Element:Bt,NodeFilter:lt,NamedNodeMap:Ut=U.NamedNodeMap||U.MozNamedAttrMap,HTMLFormElement:ms,DOMParser:Vt,trustedTypes:St}=U,Le=Bt.prototype,ut=it(Le,"cloneNode"),gs=it(Le,"remove"),br=it(Le,"nextSibling"),$e=it(Le,"childNodes"),ht=it(Le,"parentNode");if(typeof st=="function"){const F=q.createElement("template");F.content&&F.content.ownerDocument&&(q=F.content.ownerDocument)}let he,Me="";const{implementation:qt,createNodeIterator:vr,createDocumentFragment:bs,getElementsByTagName:dt}=q,{importNode:Ie}=V;let ne=Ht();O.isSupported=typeof e=="function"&&typeof ht=="function"&&qt&&qt.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:at,ERB_EXPR:Re,TMPLIT_EXPR:Ve,DATA_ATTR:yr,ARIA_ATTR:qe,IS_SCRIPT_OR_DATA:W,ATTR_WHITESPACE:kr,CUSTOM_ELEMENT:vs}=mr;let{IS_ALLOWED_URI:Cr}=mr,oe=null;const xr=z({},[...ur,...tt,...ct,...yt,...kt]);let ce=null;const wr=z({},[...Lt,...Dt,...hr,...Ct]);let re=Object.seal(l(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),je=null,f=null,i=!0,d=!0,g=!1,v=!0,y=!1,R=!0,k=!1,T=!1,x=!1,w=!1,Z=!1,_=!1,ie=!0,G=!1;const ve="user-content-";let Rt=!0,We=!1,Ge={},Ze=null;const jt=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let Sr=null;const Et=z({},["audio","video","img","source","image","track"]);let Ye=null;const Ha=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Rr="http://www.w3.org/1998/Math/MathML",Er="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Tt=Qe,ys=!1,ks=null;const vc=z({},[Rr,Er,Qe],I);let Tr=z({},["mi","mo","mn","ms","mtext"]),Pr=z({},["annotation-xml"]);const yc=z({},["title","style","font","a","script"]);let Wt=null;const kc=["application/xhtml+xml","text/html"],Cc="text/html";let de=null,Pt=null;const xc=q.createElement("form"),Ba=function(b){return b instanceof RegExp||b instanceof Function},Cs=function(){let b=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Pt&&Pt===b)){if((!b||typeof b!="object")&&(b={}),b=Ae(b),Wt=kc.indexOf(b.PARSER_MEDIA_TYPE)===-1?Cc:b.PARSER_MEDIA_TYPE,de=Wt==="application/xhtml+xml"?I:P,oe=se(b,"ALLOWED_TAGS")?z({},b.ALLOWED_TAGS,de):xr,ce=se(b,"ALLOWED_ATTR")?z({},b.ALLOWED_ATTR,de):wr,ks=se(b,"ALLOWED_NAMESPACES")?z({},b.ALLOWED_NAMESPACES,I):vc,Ye=se(b,"ADD_URI_SAFE_ATTR")?z(Ae(Ha),b.ADD_URI_SAFE_ATTR,de):Ha,Sr=se(b,"ADD_DATA_URI_TAGS")?z(Ae(Et),b.ADD_DATA_URI_TAGS,de):Et,Ze=se(b,"FORBID_CONTENTS")?z({},b.FORBID_CONTENTS,de):jt,je=se(b,"FORBID_TAGS")?z({},b.FORBID_TAGS,de):{},f=se(b,"FORBID_ATTR")?z({},b.FORBID_ATTR,de):{},Ge=se(b,"USE_PROFILES")?b.USE_PROFILES:!1,i=b.ALLOW_ARIA_ATTR!==!1,d=b.ALLOW_DATA_ATTR!==!1,g=b.ALLOW_UNKNOWN_PROTOCOLS||!1,v=b.ALLOW_SELF_CLOSE_IN_ATTR!==!1,y=b.SAFE_FOR_TEMPLATES||!1,R=b.SAFE_FOR_XML!==!1,k=b.WHOLE_DOCUMENT||!1,w=b.RETURN_DOM||!1,Z=b.RETURN_DOM_FRAGMENT||!1,_=b.RETURN_TRUSTED_TYPE||!1,x=b.FORCE_BODY||!1,ie=b.SANITIZE_DOM!==!1,G=b.SANITIZE_NAMED_PROPS||!1,Rt=b.KEEP_CONTENT!==!1,We=b.IN_PLACE||!1,Cr=b.ALLOWED_URI_REGEXP||zt,Tt=b.NAMESPACE||Qe,Tr=b.MATHML_TEXT_INTEGRATION_POINTS||Tr,Pr=b.HTML_INTEGRATION_POINTS||Pr,re=b.CUSTOM_ELEMENT_HANDLING||{},b.CUSTOM_ELEMENT_HANDLING&&Ba(b.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(re.tagNameCheck=b.CUSTOM_ELEMENT_HANDLING.tagNameCheck),b.CUSTOM_ELEMENT_HANDLING&&Ba(b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(re.attributeNameCheck=b.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),b.CUSTOM_ELEMENT_HANDLING&&typeof b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=b.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),y&&(d=!1),Z&&(w=!0),Ge&&(oe=z({},kt),ce=[],Ge.html===!0&&(z(oe,ur),z(ce,Lt)),Ge.svg===!0&&(z(oe,tt),z(ce,Dt),z(ce,Ct)),Ge.svgFilters===!0&&(z(oe,ct),z(ce,Dt),z(ce,Ct)),Ge.mathMl===!0&&(z(oe,yt),z(ce,hr),z(ce,Ct))),b.ADD_TAGS&&(oe===xr&&(oe=Ae(oe)),z(oe,b.ADD_TAGS,de)),b.ADD_ATTR&&(ce===wr&&(ce=Ae(ce)),z(ce,b.ADD_ATTR,de)),b.ADD_URI_SAFE_ATTR&&z(Ye,b.ADD_URI_SAFE_ATTR,de),b.FORBID_CONTENTS&&(Ze===jt&&(Ze=Ae(Ze)),z(Ze,b.FORBID_CONTENTS,de)),Rt&&(oe["#text"]=!0),k&&z(oe,["html","head","body"]),oe.table&&(z(oe,["tbody"]),delete je.tbody),b.TRUSTED_TYPES_POLICY){if(typeof b.TRUSTED_TYPES_POLICY.createHTML!="function")throw Fe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof b.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Fe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');he=b.TRUSTED_TYPES_POLICY,Me=he.createHTML("")}else he===void 0&&(he=fs(St,ue)),he!==null&&typeof Me=="string"&&(Me=he.createHTML(""));h&&h(b),Pt=b}},Ua=z({},[...tt,...ct,...os]),Va=z({},[...yt,...is]),wc=function(b){let E=ht(b);(!E||!E.tagName)&&(E={namespaceURI:Tt,tagName:"template"});const M=P(b.tagName),K=P(E.tagName);return ks[b.namespaceURI]?b.namespaceURI===Er?E.namespaceURI===Qe?M==="svg":E.namespaceURI===Rr?M==="svg"&&(K==="annotation-xml"||Tr[K]):!!Ua[M]:b.namespaceURI===Rr?E.namespaceURI===Qe?M==="math":E.namespaceURI===Er?M==="math"&&Pr[K]:!!Va[M]:b.namespaceURI===Qe?E.namespaceURI===Er&&!Pr[K]||E.namespaceURI===Rr&&!Tr[K]?!1:!Va[M]&&(yc[M]||!Ua[M]):!!(Wt==="application/xhtml+xml"&&ks[b.namespaceURI]):!1},De=function(b){N(O.removed,{element:b});try{ht(b).removeChild(b)}catch{gs(b)}},$r=function(b,E){try{N(O.removed,{attribute:E.getAttributeNode(b),from:E})}catch{N(O.removed,{attribute:null,from:E})}if(E.removeAttribute(b),b==="is")if(w||Z)try{De(E)}catch{}else try{E.setAttribute(b,"")}catch{}},qa=function(b){let E=null,M=null;if(x)b="<remove></remove>"+b;else{const ge=B(b,/^[\r\n\t ]+/);M=ge&&ge[0]}Wt==="application/xhtml+xml"&&Tt===Qe&&(b='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+b+"</body></html>");const K=he?he.createHTML(b):b;if(Tt===Qe)try{E=new Vt().parseFromString(K,Wt)}catch{}if(!E||!E.documentElement){E=qt.createDocument(Tt,"template",null);try{E.documentElement.innerHTML=ys?Me:K}catch{}}const ye=E.body||E.documentElement;return b&&M&&ye.insertBefore(q.createTextNode(M),ye.childNodes[0]||null),Tt===Qe?dt.call(E,k?"html":"body")[0]:k?E.documentElement:ye},ja=function(b){return vr.call(b.ownerDocument||b,b,lt.SHOW_ELEMENT|lt.SHOW_COMMENT|lt.SHOW_TEXT|lt.SHOW_PROCESSING_INSTRUCTION|lt.SHOW_CDATA_SECTION,null)},xs=function(b){return b instanceof ms&&(typeof b.nodeName!="string"||typeof b.textContent!="string"||typeof b.removeChild!="function"||!(b.attributes instanceof Ut)||typeof b.removeAttribute!="function"||typeof b.setAttribute!="function"||typeof b.namespaceURI!="string"||typeof b.insertBefore!="function"||typeof b.hasChildNodes!="function")},Wa=function(b){return typeof wt=="function"&&b instanceof wt};function Ke(F,b,E){S(F,M=>{M.call(O,b,E,Pt)})}const Ga=function(b){let E=null;if(Ke(ne.beforeSanitizeElements,b,null),xs(b))return De(b),!0;const M=de(b.nodeName);if(Ke(ne.uponSanitizeElement,b,{tagName:M,allowedTags:oe}),b.hasChildNodes()&&!Wa(b.firstElementChild)&&Q(/<[/\w]/g,b.innerHTML)&&Q(/<[/\w]/g,b.textContent)||b.nodeType===rt.progressingInstruction||R&&b.nodeType===rt.comment&&Q(/<[/\w]/g,b.data))return De(b),!0;if(!oe[M]||je[M]){if(!je[M]&&Ya(M)&&(re.tagNameCheck instanceof RegExp&&Q(re.tagNameCheck,M)||re.tagNameCheck instanceof Function&&re.tagNameCheck(M)))return!1;if(Rt&&!Ze[M]){const K=ht(b)||b.parentNode,ye=$e(b)||b.childNodes;if(ye&&K){const ge=ye.length;for(let Ee=ge-1;Ee>=0;--Ee){const Ne=ut(ye[Ee],!0);Ne.__removalCount=(b.__removalCount||0)+1,K.insertBefore(Ne,br(b))}}}return De(b),!0}return b instanceof Bt&&!wc(b)||(M==="noscript"||M==="noembed"||M==="noframes")&&Q(/<\/no(script|embed|frames)/i,b.innerHTML)?(De(b),!0):(y&&b.nodeType===rt.text&&(E=b.textContent,S([at,Re,Ve],K=>{E=j(E,K," ")}),b.textContent!==E&&(N(O.removed,{element:b.cloneNode()}),b.textContent=E)),Ke(ne.afterSanitizeElements,b,null),!1)},Za=function(b,E,M){if(ie&&(E==="id"||E==="name")&&(M in q||M in xc))return!1;if(!(d&&!f[E]&&Q(yr,E))){if(!(i&&Q(qe,E))){if(!ce[E]||f[E]){if(!(Ya(b)&&(re.tagNameCheck instanceof RegExp&&Q(re.tagNameCheck,b)||re.tagNameCheck instanceof Function&&re.tagNameCheck(b))&&(re.attributeNameCheck instanceof RegExp&&Q(re.attributeNameCheck,E)||re.attributeNameCheck instanceof Function&&re.attributeNameCheck(E))||E==="is"&&re.allowCustomizedBuiltInElements&&(re.tagNameCheck instanceof RegExp&&Q(re.tagNameCheck,M)||re.tagNameCheck instanceof Function&&re.tagNameCheck(M))))return!1}else if(!Ye[E]){if(!Q(Cr,j(M,kr,""))){if(!((E==="src"||E==="xlink:href"||E==="href")&&b!=="script"&&ae(M,"data:")===0&&Sr[b])){if(!(g&&!Q(W,j(M,kr,"")))){if(M)return!1}}}}}}return!0},Ya=function(b){return b!=="annotation-xml"&&B(b,vs)},Qa=function(b){Ke(ne.beforeSanitizeAttributes,b,null);const{attributes:E}=b;if(!E||xs(b))return;const M={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ce,forceKeepAttr:void 0};let K=E.length;for(;K--;){const ye=E[K],{name:ge,namespaceURI:Ee,value:Ne}=ye,Gt=de(ge);let Ce=ge==="value"?Ne:Y(Ne);if(M.attrName=Gt,M.attrValue=Ce,M.keepAttr=!0,M.forceKeepAttr=void 0,Ke(ne.uponSanitizeAttribute,b,M),Ce=M.attrValue,G&&(Gt==="id"||Gt==="name")&&($r(ge,b),Ce=ve+Ce),R&&Q(/((--!?|])>)|<\/(style|title)/i,Ce)){$r(ge,b);continue}if(M.forceKeepAttr||($r(ge,b),!M.keepAttr))continue;if(!v&&Q(/\/>/i,Ce)){$r(ge,b);continue}y&&S([at,Re,Ve],Xa=>{Ce=j(Ce,Xa," ")});const Ka=de(b.nodeName);if(Za(Ka,Gt,Ce)){if(he&&typeof St=="object"&&typeof St.getAttributeType=="function"&&!Ee)switch(St.getAttributeType(Ka,Gt)){case"TrustedHTML":{Ce=he.createHTML(Ce);break}case"TrustedScriptURL":{Ce=he.createScriptURL(Ce);break}}try{Ee?b.setAttributeNS(Ee,ge,Ce):b.setAttribute(ge,Ce),xs(b)?De(b):A(O.removed)}catch{}}}Ke(ne.afterSanitizeAttributes,b,null)},Sc=function F(b){let E=null;const M=ja(b);for(Ke(ne.beforeSanitizeShadowDOM,b,null);E=M.nextNode();)Ke(ne.uponSanitizeShadowNode,E,null),Ga(E),Qa(E),E.content instanceof Se&&F(E.content);Ke(ne.afterSanitizeShadowDOM,b,null)};return O.sanitize=function(F){let b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},E=null,M=null,K=null,ye=null;if(ys=!F,ys&&(F="<!-->"),typeof F!="string"&&!Wa(F))if(typeof F.toString=="function"){if(F=F.toString(),typeof F!="string")throw Fe("dirty is not a string, aborting")}else throw Fe("toString is not a function");if(!O.isSupported)return F;if(T||Cs(b),O.removed=[],typeof F=="string"&&(We=!1),We){if(F.nodeName){const Ne=de(F.nodeName);if(!oe[Ne]||je[Ne])throw Fe("root node is forbidden and cannot be sanitized in-place")}}else if(F instanceof wt)E=qa("<!---->"),M=E.ownerDocument.importNode(F,!0),M.nodeType===rt.element&&M.nodeName==="BODY"||M.nodeName==="HTML"?E=M:E.appendChild(M);else{if(!w&&!y&&!k&&F.indexOf("<")===-1)return he&&_?he.createHTML(F):F;if(E=qa(F),!E)return w?null:_?Me:""}E&&x&&De(E.firstChild);const ge=ja(We?F:E);for(;K=ge.nextNode();)Ga(K),Qa(K),K.content instanceof Se&&Sc(K.content);if(We)return F;if(w){if(Z)for(ye=bs.call(E.ownerDocument);E.firstChild;)ye.appendChild(E.firstChild);else ye=E;return(ce.shadowroot||ce.shadowrootmode)&&(ye=Ie.call(V,ye,!0)),ye}let Ee=k?E.outerHTML:E.innerHTML;return k&&oe["!doctype"]&&E.ownerDocument&&E.ownerDocument.doctype&&E.ownerDocument.doctype.name&&Q(pr,E.ownerDocument.doctype.name)&&(Ee="<!DOCTYPE "+E.ownerDocument.doctype.name+`>
6
+ `+Ee),y&&S([at,Re,Ve],Ne=>{Ee=j(Ee,Ne," ")}),he&&_?he.createHTML(Ee):Ee},O.setConfig=function(){let F=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cs(F),T=!0},O.clearConfig=function(){Pt=null,T=!1},O.isValidAttribute=function(F,b,E){Pt||Cs({});const M=de(F),K=de(b);return Za(M,K,E)},O.addHook=function(F,b){typeof b=="function"&&N(ne[F],b)},O.removeHook=function(F,b){if(b!==void 0){const E=$(ne[F],b);return E===-1?void 0:D(ne[F],E,1)[0]}return A(ne[F])},O.removeHooks=function(F){ne[F]=[]},O.removeAllHooks=function(){ne=Ht()},O}var ps=gr();return ps})})(Ys);const Qs=Ys.exports,At=(r,...t)=>{let e=r[0];for(let s=0;s<t.length;s++)e+=Qs.sanitize(t[s]?String(t[s]):"")+r[s+1];return e||""},Hr="searchcraft";class Bn{constructor(){c(this,"coreInstances",{});c(this,"subscriptions",{})}addCoreInstance(t,e){const s=e||Hr;this.coreInstances[s]=t;for(const a of this.subscriptions[s]||[])a(t)}useCoreInstance(t,e){const s=t||Hr;return this.coreInstances[s]?(e(this.coreInstances[s]),()=>{}):(this.subscriptions[s]||(this.subscriptions[s]=[]),this.subscriptions[s].push(e),()=>{this.subscriptions[s]&&(this.subscriptions[s]=this.subscriptions[s].filter(a=>a!==e))})}}const pe=new Bn,Un="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let nt=(r=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)t+=Un[e[r]&63];return t};const Vn=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"adSource","Custom");c(this,"adClientResponseItem");c(this,"renderPosition","interstitial");c(this,"searchTerm");c(this,"isSearchInProgress",!1);c(this,"searchResultCount",0);c(this,"core");c(this,"intersectionObserver");c(this,"storeUnsubscribe");c(this,"cleanupCore");c(this,"adContainerRenderedTimeout");c(this,"isComponentConnected",!1);c(this,"timeTaken");c(this,"adContainerId","");this.__registerHost()}get hostElement(){return this}handleAdRendered(){var e,s,a;this.adContainerId=nt(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var o;(o=this.core)==null||o.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})},((a=(s=(e=this.core)==null?void 0:e.config)==null?void 0:s.customAdConfig)==null?void 0:a.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var e;(e=this.core)==null||e.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(e){const s=e.searchClientRequestProperties;s&&typeof s=="object"&&(this.searchTerm=s.searchTerm),this.searchResultCount=e.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}onCoreAvailable(e){const s=e.store.getState();this.isComponentConnected=!0,this.core=s.core,this.isSearchInProgress=s.isSearchInProgress,this.searchResultCount=s.searchClientResponseItems.length,this.timeTaken=s.searchResponseTimeTaken;const a=s.searchClientRequestProperties;a&&typeof a=="object"&&(this.searchTerm=a.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(s),this.storeUnsubscribe=e.store.subscribe(o=>{this.timeTaken!==o.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(o),this.timeTaken=o.searchResponseTimeTaken,this.isSearchInProgress=o.isSearchInProgress})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}startIntersectionObserver(){var e;(e=this.intersectionObserver)==null||e.disconnect(),this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([s])=>{s!=null&&s.isIntersecting&&this.searchResultCount>0&&this.handleAdViewed()},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var e,s,a;(e=this.storeUnsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),(a=this.intersectionObserver)==null||a.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,h,u;const e=this.adClientResponseItem;if(!e.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(n=(o=(a=this.core)==null?void 0:a.config)==null?void 0:o.admAdConfig)!=null&&n.template&&(s=(u=(h=this.core)==null?void 0:h.config)==null?void 0:u.admAdConfig.template(e.admAd,{html:At})),m("div",{class:"searchcraft-ad searchcraft-adm-ad","data-searchcraft-ad-container-id":this.adContainerId,id:`searchcraft-adm-ad-${this.adContainerId}`,innerHTML:s})}renderCustomAd(){var o,n,h;const e=(h=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdConfig)==null?void 0:h.template,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return e&&(a=e({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:At})),m("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s,a;const e=((a=(s=this.core)==null?void 0:s.config.nativoConfig)==null?void 0:a.adClassName)||"ntv-item";return m("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:we("searchcraft-ad",e),"data-searchcraft-ad-container-id":this.adContainerId})}render(){if(this.searchResultCount!==0)switch(this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{searchcraftId:[1,"searchcraft-id"],adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function rr(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,Vn);break}})}const qn=rr,jn=ee(class extends J{constructor(){super();c(this,"hierarchy","primary");c(this,"disabled",!1);c(this,"icon");c(this,"iconOnly",!1);c(this,"iconPosition","left");c(this,"label","Search");c(this,"type","button");c(this,"buttonClick");c(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=Je(this,"buttonClick")}render(){return m("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:we("searchcraft-button",{"searchcraft-button-primary":this.hierarchy==="primary","searchcraft-button-tertiary":this.hierarchy==="tertiary","searchcraft-button-disabled":this.disabled}),disabled:this.disabled,onClick:this.handleButtonClick,type:this.type},this.iconOnly?this.icon:m(Hn,null,this.iconPosition==="left"&&this.icon,m("span",null,this.label),this.iconPosition==="right"&&this.icon))}},[0,"searchcraft-button",{hierarchy:[1],disabled:[4],icon:[16],iconOnly:[4,"icon-only"],iconPosition:[1,"icon-position"],label:[1],type:[1]}]);function sr(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,jn);break}})}const Wn=sr,Gn=ee(class extends J{constructor(){super(),this.__registerHost()}render(){return m("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},m("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function ar(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,Gn);break}})}const Zn=ar,Ks=(r,t)=>{let e=r;for(const s of t)e=e==null?void 0:e.children[s];return e},Br=(r,t)=>{const e={...r};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&r[s]instanceof Object?e[s]=Br(r[s],t[s]):e[s]=t[s]);return e};function Yn(r){return r.filter((t,e,s)=>!s.some((a,o)=>o!==e&&a.includes(t)))}const Xs=(r,t)=>{const e=structuredClone(r),s=(a,o)=>{var u;const n=structuredClone(a),h=Ks(t,o);if(!h)return n;for(const l of Object.keys(a.children))h.children[l]?n.children[l]={...Br(a.children[l],h.children[l]),count:((u=n.children[l])==null?void 0:u.count)||0}:n.children[l]&&(n.children[l]=s(n.children[l],[...o,l]));return n};return s(e,[])},Ur=(r,t)=>{const e={path:"/",count:0,children:{}},s=[],a=o=>{if(o.path!=="/"&&s.push({path:o.path,count:o.count}),o.children)for(const n of o.children)a(n)};a(r);for(const{path:o,count:n}of s){const h=o.split("/").filter(Boolean);if(t&&t.length>0){let l=!1;for(const p of t)if(p.startsWith("/")){if(o===p||o.startsWith(`${p}/`)){l=!0;break}}else if(h.includes(p)){l=!0;break}if(l)continue}let u=e;for(const l of h){const p=u.path==="/"?`/${l}`:`${u.path}/${l}`;u.children[l]||(u.children[l]={path:p,count:n,children:{}}),u=u.children[l]}u.count=n}return e},Qn=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"fieldName","");c(this,"exclude");c(this,"facetSelectionUpdated");c(this,"selectedPaths",{});c(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});c(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});c(this,"renderedFacetTree",{path:"/",count:0,children:{}});c(this,"lastTimeTaken");c(this,"lastSearchTerm");c(this,"lastSearchMode");c(this,"lastSortType");c(this,"lastRangeValues");c(this,"lastFacetValues");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"formatFacetName",e=>`${e.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);this.__registerHost(),this.facetSelectionUpdated=Je(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(e=>this.selectedPaths[e])}handleIncomingSearchResponse(e,s){var u,l,p;const a=(u=e.searchResponseFacetPrime)==null?void 0:u.find(C=>this.fieldName===Object.keys(C)[0]),o=a==null?void 0:a[this.fieldName],n=Ur({path:"/",count:0,children:o||[]},this.exclude);switch(s){case"SEARCH_TERM_EMPTY":this.facetTreeCollectedFromSearchResponse={path:"/",count:0,children:{}};break;case"NEW_SEARCH_TERM":this.facetTreeCollectedFromSearchResponse=n;break;case"NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":case"EXACT_MATCH_UPDATE":case"RANGE_VALUE_UPDATE":{if(e.supplementalFacetPrime){const C=(l=e.supplementalFacetPrime)==null?void 0:l.find(A=>this.fieldName===Object.keys(A)[0]),S=C==null?void 0:C[this.fieldName],$=Ur({path:"/",count:0,children:S||[]},this.exclude);this.facetTreeCollectedFromSearchResponse=Xs($,n)}else this.facetTreeCollectedFromSearchResponse=n;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=Xs(this.facetTreeCollectedFromSearchResponse,n);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const h={path:"/",count:0,children:[]};for(const C of Object.keys(this.selectedPaths).filter(S=>this.selectedPaths[S])){const S=C.startsWith("/")?C.substring(1).split("/"):C.split("/"),$=!!Ks(this.facetTreeCollectedFromSearchResponse,S),A=S.at(-1);!$&&A&&((p=h.children)==null||p.push({children:[],count:0,path:C}))}this.facetTreeFromFacetPathsNotInSearchResponse=Ur(h,this.exclude),this.renderedFacetTree=Br(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(e){const s={...e},a=typeof s.searchClientRequestProperties=="string"&&s.searchTerm.trim()==="";if(s.searchTerm.trim()===""&&!a)this.handleIncomingSearchResponse(s,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==s.searchResponseTimeTaken&&s.searchClientRequestProperties){if(typeof s.searchClientRequestProperties=="object"){const o=s.searchClientRequestProperties;let n="UNKNOWN";this.lastSearchTerm!==o.searchTerm?this.areAnyFacetPathsSelected?n="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":n="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(o.rangeValueForIndexFields)?n="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(o.facetPathsForIndexFields)?n="FACET_UPDATE":this.lastSortType!==o.order_by?n="SORT_ORDER_UPDATE":this.lastSearchMode!==o.mode&&(n="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(o.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(o.facetPathsForIndexFields),this.lastSortType=o.order_by,this.lastSearchMode=o.mode,this.lastSearchTerm=o.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,n)}else if(typeof s.searchClientRequestProperties=="string"){let o="NEW_SEARCH_TERM";const n=JSON.parse(s.searchClientRequestProperties),u=(Array.isArray(n.query)?n.query:[n.query]).filter(p=>p.occur==="must"),l=JSON.stringify(u);this.lastFacetValues!==void 0&&this.lastFacetValues!==l?o="FACET_UPDATE":s.searchTerm.trim()===""&&this.lastSearchTerm===""?o="NEW_SEARCH_TERM":this.lastSearchTerm!==s.searchTerm&&(this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM"),this.lastFacetValues=l,this.lastSearchTerm=s.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,o)}}}onCoreAvailable(e){this.handleStateUpdate(e.store.getState()),this.unsubscribe=e.store.subscribe(s=>{this.handleStateUpdate(s)})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleCheckboxChange(e){var n;if(!this.selectedPaths[e])this.selectedPaths={...this.selectedPaths,[e]:!0};else{const h=Object.keys(this.selectedPaths).filter(u=>!u.includes(e));this.selectedPaths=h.reduce((u,l)=>(u[l]=!0,u),{})}const a=Object.keys(this.selectedPaths).filter(h=>this.selectedPaths[h]),o=Yn(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}renderFacet(e,s){let a=!1;for(const h of Object.keys(this.selectedPaths))this.selectedPaths[h]&&h.startsWith(s.path)&&h.length>s.path.length&&(a=!0);const o=Object.keys(this.selectedPaths).includes(s.path),n=Object.keys(s.children).length>0&&(o||a)||e==="@@root";return m("div",{class:"searchcraft-facet-list-item"},e!=="@@root"&&m("label",{class:"searchcraft-facet-list-checkbox-label"},m("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},m("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[s.path],onChange:h=>{this.handleCheckboxChange(s.path)},type:"checkbox"}),a?m("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},m("svg",{viewBox:"0 0 14 3",fill:"none"},m("title",null,"Checkbox dash"),m("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):m("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},m("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},m("title",null,"Checkbox check"),m("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),m("span",null,this.formatFacetName(e)," (",s.count,")")),n&&m("div",{class:"searchcraft-facet-list",style:{paddingLeft:e!=="@@root"?"24px":"0px",paddingTop:e!=="@@root"?"6px":"0px"}},Object.keys(s.children).map(h=>{if(s.children[h])return this.renderFacet(h,s.children[h])})))}render(){if(this.fieldName&&!(Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length===0))return Object.keys(this.facetTreeCollectedFromSearchResponse.children).length===0&&(this.lastSearchTerm||"").trim().length>0?m("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):m("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[0,"searchcraft-facet-list",{searchcraftId:[1,"searchcraft-id"],fieldName:[1,"field-name"],exclude:[16],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function Js(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,Qn);break}})}const Kn=Js;function Mt(r,t){if(r&&t)return t.fieldNames.map(e=>{let s=r[e.fieldName];if(s)switch(e.dataType){case"date":{s=Xn(s,e.dateFormatLocale,e.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(e.numberFormatLocale,e.numberFormatOptions).format(s*(e.numberScale||1));break}}return s}).filter(e=>!!e).join(t.delimiter||" ")}function ea(r){return r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function Xn(r,t="en-US",e={day:"numeric",month:"long",year:"numeric"}){const s=new Date(r),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const h=Math.trunc(o/1e3),u=Math.trunc(h/60),l=Math.trunc(u/60),p=Math.trunc(l/24),C=new Intl.RelativeTimeFormat(t,e);return p>=1?C.format(-p,"day"):l>=1?C.format(-l,"hour"):u>=1?C.format(-u,"minute"):C.format(0,"second")}return new Intl.DateTimeFormat(t,e).format(s)}function Vr(r,t,e=0){const s=new Date(r);switch(t){case"year":return new Date(s.getFullYear()+e,0,1,0,0,0,0).getTime();case"month":return new Date(s.getFullYear(),s.getMonth()+e,1,0,0,0,0).getTime();case"day":return new Date(s.getFullYear(),s.getMonth(),s.getDate()+e,0,0,0,0).getTime();case"hour":return new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours()+e,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${t}`)}}function Jn(r,t,e){const s=new Date(t),a=new Date(e);switch(r){case"year":return Math.abs(a.getFullYear()-s.getFullYear());case"month":return Math.abs(a.getFullYear()*12+a.getMonth()-(s.getFullYear()*12+s.getMonth()));case"day":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60*24));case"hour":return Math.floor(Math.abs(a.getTime()-s.getTime())/(1e3*60*60));default:throw new Error(`Unsupported unit: ${r}`)}}const ta=r=>{if(r>=11&&r<=13)return`${r}th`;switch(r%10){case 1:return`${r}st`;case 2:return`${r}nd`;case 3:return`${r}rd`;default:return`${r}th`}};function eo(r,t){const e=new Intl.DateTimeFormat("en-US",{month:"short"});switch(r){case"year":return t.getFullYear().toString();case"month":return`${e.format(t)} ${t.getFullYear()}`;case"day":return`${e.format(t)} ${ta(t.getDate())}, ${t.getFullYear()}`;case"hour":{const s=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${e.format(t)} ${ta(t.getDate())}, ${s.format(t)}`}default:throw new Error(`Unsupported granularity: ${r}`)}}function to(r,t){let e=!1,s=null;const a=o=>{r(...o),e=!0,setTimeout(()=>{if(e=!1,s){const n=s;s=null,a(n)}},t)};return(...o)=>{e?s=o:a(o)}}const ro=ee(class extends J{constructor(){super();c(this,"max",100);c(this,"min",0);c(this,"step",1);c(this,"dataType","number");c(this,"dateGranularity");c(this,"lowerBound",0);c(this,"upperBound",1);c(this,"endValue",0);c(this,"startValue",0);c(this,"lastFocusedHandle","max");c(this,"throttledEmitUpdate",()=>{});c(this,"rangeChanged");c(this,"emitUpdate",async()=>{var e,s;switch(this.dataType){case"number":(e=this.rangeChanged)==null||e.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",o=Vr(this.min,a,this.lowerBound+this.startValue),n=Vr(this.min,a,this.lowerBound+this.endValue+1);(s=this.rangeChanged)==null||s.emit({startValue:o,endValue:n});break}}});c(this,"handleStartValueChange",e=>{const s=e.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="min",a<=this.endValue?(this.startValue=a,this.throttledEmitUpdate()):(this.startValue=this.endValue,s.value=`${this.endValue}`)});c(this,"handleEndValueChange",e=>{const s=e.target,a=Number.parseInt(s.value,10);this.lastFocusedHandle="max",a>=this.startValue?(this.endValue=a,this.throttledEmitUpdate()):(this.endValue=this.startValue,s.value=`${this.startValue}`)});c(this,"getLabel",e=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const s=this.dateGranularity||"year",a=this.lowerBound+e,o=Vr(this.min,s,a);return eo(this.dateGranularity||"year",new Date(o))}}});this.__registerHost(),this.rangeChanged=Je(this,"rangeChanged")}connectedCallback(){switch(this.dataType){case"number":this.startValue=this.min,this.endValue=this.max,this.lowerBound=this.min,this.upperBound=this.max;break;case"date":{this.startValue=0,this.endValue=Jn(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=to(this.emitUpdate,120)}render(){const e=(this.startValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,s=(this.endValue-this.lowerBound)/(this.upperBound-this.lowerBound)*100,a=this.getLabel(this.startValue),o=this.getLabel(this.endValue);return m("div",{key:"d5035ed8bcbf95c0ef5b2a7a9ef471e318a9dc30",class:"searchcraft-slider"},m("div",{key:"f5f7bc48703250b4f6c75a1f07c921233bd957d5",class:"searchcraft-slider-range"},m("div",{key:"fc2ec9f9786986a7306ffe43b54c47c35a1f086a",class:"searchcraft-slider-active-range",style:{left:`${e}%`,width:`${s-e}%`}}),m("input",{key:"716316b5ce507c40db5b7bd408f47b3bece88494",class:we("searchcraft-slider-input","searchcraft-slider-input-min-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleStartValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="min"?"2":"1"},type:"range",value:this.startValue}),m("input",{key:"e2ad0d586136185faccb50d6d7fb113a64ddac42",class:we("searchcraft-slider-input","searchcraft-slider-input-max-handle"),max:this.upperBound,min:this.lowerBound,onInput:this.handleEndValueChange.bind(this),step:this.step,style:{zIndex:this.lastFocusedHandle==="max"?"2":"1"},type:"range",value:this.endValue})),m("div",{key:"7e9ab9fa9563cac6a1dfdd11910e04084ae5348d",class:"searchcraft-slider-label"},m("span",{key:"0909279f460c4be84c1088c5981a5f5299e8e2a0",class:"searchcraft-slider-start-label"},a),m("span",{key:"4b610a68f97fcbc0aa1eda428dfa1e53b00efe43",class:"searchcraft-slider-end-label"},o)))}},[0,"searchcraft-slider",{max:[2],min:[2],step:[2],dataType:[1,"data-type"],dateGranularity:[1,"date-granularity"],lowerBound:[32],upperBound:[32],endValue:[32],startValue:[32],lastFocusedHandle:[32]}]);function ra(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,ro);break}})}const so=ee(class extends J{constructor(){super();c(this,"label","Toggle");c(this,"subLabel");c(this,"searchcraftId");c(this,"toggleUpdated");c(this,"isActive",!1);c(this,"lastSearchTerm");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleToggle",async()=>{var e;this.isActive=!this.isActive,(e=this.toggleUpdated)==null||e.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=Je(this,"toggleUpdated")}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{s.searchTerm!==this.lastSearchTerm&&s.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=s.searchTerm})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return m("div",{key:"7dad6f4e4422a62f6403724ff16fe25e042ae2ac",class:we("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},m("div",{key:"2faa2ee1eb5cb78dc39f523415f2be96bc23fed1"},m("p",{key:"29ea63c281b8f1ae041ba75a149ce1b60e936662",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&m("p",{key:"e51efaae5ca79eede71852e6dec8eff4575139fe",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),m("button",{key:"d590da981692db162df9b8086ba2444d6a56ef9d",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},m("div",{key:"5be6ee1dd7dc58bd67fff18923569caee37b4936",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],searchcraftId:[1,"searchcraft-id"],isActive:[32],lastSearchTerm:[32]}]);function sa(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,so);break}})}const ao=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"items",[]);c(this,"responsiveBreakpoint",768);c(this,"responsiveBehavior","auto");c(this,"lastSearchTerm");c(this,"isFilterPanelVisible",!0);c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"resizeObserver");c(this,"manuallyToggled",!1);c(this,"toggleClickHandler");c(this,"handleWindowResize",()=>{this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize()});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e,this.setInitialDateRanges(),this.responsiveBehavior==="auto"&&this.updateVisibilityBasedOnWindowSize(),this.unsubscribe=e.store.subscribe((s,a)=>{if(this.lastSearchTerm=s.searchTerm||"",a.isFilterPanelVisible!==s.isFilterPanelVisible){const n=window.innerWidth>=(this.responsiveBreakpoint||768);s.isFilterPanelVisible!==n&&(this.manuallyToggled=!0),this.updateToggleElementAttributes(s.isFilterPanelVisible)}this.isFilterPanelVisible=s.isFilterPanelVisible})}componentDidLoad(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.responsiveBehavior==="auto"&&typeof window<"u"&&this.setupResizeObserver(),this.setupToggleClickHandlers(),setTimeout(()=>{if(this.core){const e=this.core.store.getState().isFilterPanelVisible;this.updateToggleElementAttributes(e)}},0)}disconnectedCallback(){var e,s,a;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),(a=this.resizeObserver)==null||a.disconnect(),typeof window<"u"&&window.removeEventListener("resize",this.handleWindowResize),this.cleanupToggleClickHandlers()}setupResizeObserver(){if(typeof ResizeObserver>"u"){window.addEventListener("resize",this.handleWindowResize);return}this.resizeObserver=new ResizeObserver(()=>{this.handleWindowResize()}),this.resizeObserver.observe(document.body)}updateVisibilityBasedOnWindowSize(){if(typeof window>"u"||this.manuallyToggled)return;const s=window.innerWidth>=(this.responsiveBreakpoint||768);this.core&&this.isFilterPanelVisible!==s&&this.core.store.getState().setFilterPanelVisibility(s)}setupToggleClickHandlers(){if(typeof document>"u")return;this.toggleClickHandler=s=>{if(!(window.innerWidth>=(this.responsiveBreakpoint||768))&&(s.preventDefault(),this.core)){const o=this.core.store.getState().isFilterPanelVisible;this.core.store.getState().setFilterPanelVisibility(!o)}},document.querySelectorAll("[data-toggle-filter-panel]").forEach(s=>{this.toggleClickHandler&&s.addEventListener("click",this.toggleClickHandler)})}updateToggleElementAttributes(e){if(typeof document>"u")return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(a=>{e?(a.removeAttribute("data-filter-panel-collapsed"),a.setAttribute("data-filter-panel-expanded","")):(a.removeAttribute("data-filter-panel-expanded"),a.setAttribute("data-filter-panel-collapsed",""))})}cleanupToggleClickHandlers(){if(typeof document>"u"||!this.toggleClickHandler)return;document.querySelectorAll("[data-toggle-filter-panel]").forEach(s=>{this.toggleClickHandler&&s.removeEventListener("click",this.toggleClickHandler)})}setInitialDateRanges(){var e,s;for(const a of this.items)if(a.type==="dateRange"){const o=a,n=o.options.minDate,h=o.options.maxDate||new Date;(s=(e=this.core)==null?void 0:e.store.getState())==null||s.addRangeValueForIndexField({fieldName:o.fieldName,value:`${o.fieldName}:[${n.toISOString()} TO ${h.toISOString()}]`})}}handleDateRangeChanged(e,s,a){var h,u,l,p;const o=new Date(s),n=new Date(a);(u=(h=this.core)==null?void 0:h.store.getState())==null||u.addRangeValueForIndexField({fieldName:e.fieldName,value:`${e.fieldName}:[${o.toISOString()} TO ${n.toISOString()}]`}),(p=(l=this.core)==null?void 0:l.store.getState())==null||p.search()}handleNumericRangeChanged(e,s,a){var o,n,h,u;(n=(o=this.core)==null?void 0:o.store.getState())==null||n.addRangeValueForIndexField({fieldName:e,value:`${e}:[${s} TO ${a}]`}),(u=(h=this.core)==null?void 0:h.store.getState())==null||u.search()}handleFacetSelectionUpdated(e,s){var a,o,n,h,u,l;s.length>0?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.addFacetPathsForIndexField({fieldName:e,value:`${e}: IN [${s.join(" ")}]`}):(h=(n=this.core)==null?void 0:n.store.getState())==null||h.removeFacetPathsForIndexField(e),(l=(u=this.core)==null?void 0:u.store.getState())==null||l.search()}handleExactMatchToggleUpdated(e){var s,a,o,n;(a=(s=this.core)==null?void 0:s.store.getState())==null||a.setSearchMode(e?"exact":"fuzzy"),(n=(o=this.core)==null?void 0:o.store.getState())==null||n.search()}handleMostRecentToggleUpdated(e,s){var a,o,n,h,u,l;s?(o=(a=this.core)==null?void 0:a.store.getState())==null||o.setSortOrder({orderByField:e,sortType:"desc"}):(h=(n=this.core)==null?void 0:n.store.getState())==null||h.setSortOrder({orderByField:null,sortType:null}),(l=(u=this.core)==null?void 0:u.store.getState())==null||l.search()}render(){return this.isFilterPanelVisible?m("div",{class:"searchcraft-filter-panel"},this.items.map(e=>{switch(e.type){case"dateRange":{const s=e,a=s.options.maxDate||new Date;return m("div",{class:"searchcraft-filter-panel-section"},m("p",{class:"searchcraft-filter-panel-label"},e.label),m("searchcraft-slider",{min:s.options.minDate.getTime(),max:a.getTime(),dataType:"date",step:1,dateGranularity:s.options.granularity,onRangeChanged:o=>{this.handleDateRangeChanged(s,o.detail.startValue,o.detail.endValue)}}))}case"numericRange":{const s=e;return m("div",{class:"searchcraft-filter-panel-section"},m("p",{class:"searchcraft-filter-panel-label"},e.label),m("searchcraft-slider",{min:s.options.min,max:s.options.max,step:s.options.granularity,onRangeChanged:a=>{this.handleNumericRangeChanged(s.fieldName,a.detail.startValue,a.detail.endValue)}}))}case"facets":{const s=e;return m("div",{class:"searchcraft-filter-panel-section"},m("p",{class:"searchcraft-filter-panel-label"},e.label),m("searchcraft-facet-list",{fieldName:s.fieldName,exclude:s.options.exclude,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=e;return m("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=e;return m("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}})):null}},[0,"searchcraft-filter-panel",{searchcraftId:[1,"searchcraft-id"],items:[16],responsiveBreakpoint:[2,"responsive-breakpoint"],responsiveBehavior:[1,"responsive-behavior"],lastSearchTerm:[32],isFilterPanelVisible:[32]}]);function no(){if(typeof customElements>"u")return;["searchcraft-filter-panel","searchcraft-facet-list","searchcraft-slider","searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-filter-panel":customElements.get(t)||customElements.define(t,ao);break;case"searchcraft-facet-list":customElements.get(t)||Js();break;case"searchcraft-slider":customElements.get(t)||ra();break;case"searchcraft-toggle-button":customElements.get(t)||sa();break}})}const oo=no,io=ee(class extends J{constructor(){super();c(this,"inputLabelClassName","");c(this,"label","");this.__registerHost()}render(){return m("label",{key:"1008f9beb320aaa94026604b283eb65a96023265",class:we("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function qr(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,io);break}})}const co=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"autoSearch",!0);c(this,"buttonPlacement","none");c(this,"buttonLabel");c(this,"inputLabel");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"value");c(this,"inputFocus");c(this,"inputBlur");c(this,"inputInit");c(this,"inputValue","");c(this,"searchTerm","");c(this,"error",!1);c(this,"core");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"handleInput",e=>{var a;const s=e.target;this.inputValue=s.value,(a=this.core)==null||a.store.getState().setSearchTerm(s.value),this.autoSearch&&this.performSearch()});c(this,"performSearch",async()=>{var e;this.error=!1;try{await((e=this.core)==null?void 0:e.store.getState().search())}catch{this.error=!0}});c(this,"handleClearInput",()=>{var e;this.inputValue="",(e=this.core)==null||e.store.getState().resetSearchValues(),this.error=!1});c(this,"handleFormSubmit",async e=>{e.preventDefault(),await this.performSearch()});this.__registerHost(),this.inputFocus=Je(this,"inputFocus"),this.inputBlur=Je(this,"inputBlur"),this.inputInit=Je(this,"inputInit")}init(){var e;this.core&&(this.value!==void 0&&this.value.trim().length>0&&(this.inputValue=this.value,this.core.store.getState().setSearchTerm(this.value),this.autoSearch&&this.core.store.getState().search()),(e=this.inputInit)==null||e.emit())}onCoreChange(){this.init()}onValueChange(e){var s,a;e!==void 0&&e!==this.inputValue&&(this.inputValue=e,(s=this.core)==null||s.store.getState().setSearchTerm(e),this.autoSearch&&e.trim().length>0&&((a=this.core)==null||a.store.getState().search()))}onCoreAvailable(e){this.core=e,this.init(),this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,(this.value===void 0||s.searchTerm==="")&&(this.inputValue=s.searchTerm)})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=this.inputValue.length>0,s=we("searchcraft-input-form-grid",{"searchcraft-input-form-grid-button-left":this.buttonPlacement==="left","searchcraft-input-form-grid-button-right":this.buttonPlacement==="right","searchcraft-input-form-grid-button-none":this.buttonPlacement==="none"}),o={gap:this.inputLabel||this.error?"4px 8px":"0px 8px"};return m("form",{key:"8ba91615394f95c0d5bd26a3006d3e8b454f047e",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},m("div",{key:"d9025a1c041e3132280b22e5a1b039df0196cea5",class:s,style:o},m("div",{key:"a8c3a80a0ccb718f974902fb1d163d5c3ee6194a",class:"searchcraft-input-form-button"},m("searchcraft-button",{key:"a12ff9a8cdb9a4ce3c3fd54b1c2ae084edd37069",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&m("div",{key:"866e7162c402524eaca864bb6e950a244245dc48",class:"searchcraft-input-form-label"},m("searchcraft-input-label",{key:"c57217cd5924c827df08e22a728067e3bfc63a26",label:this.inputLabel})),this.error&&m("div",{key:"4a54728bf366db50de39470cf31860a6307dafea",class:"searchcraft-input-form-error-message"},m("searchcraft-error-message",{key:"5fa5b5f5677350338d15c8e6614b0d9f584141b0"},"Something went wrong.")),m("div",{key:"67be766103a3bca11cff6f83a2a6dea7c6c6f106",class:"searchcraft-input-form-input-wrapper"},m("input",{key:"931609a4e8fc55d688077ec6cb04f2bb9b86b5fe",autoComplete:"off",class:we("searchcraft-input-form-input",{"searchcraft-placeholder-hide-on-focus":this.placeholderBehavior==="hide-on-focus"}),onFocus:()=>{var n;return(n=this.inputFocus)==null?void 0:n.emit()},onBlur:()=>{var n;return(n=this.inputBlur)==null?void 0:n.emit()},onInput:n=>{this.handleInput(n)},placeholder:this.placeholderValue,type:"text",value:this.inputValue}),m("div",{key:"7feb32348b7faec4104137a142ba8150149498a5",class:"searchcraft-input-form-input-icon"},m("svg",{key:"8b9abd236d4896b8dbd5c14e06019c116e3675be",class:"searchcraft-input-form-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"searchcraft-title"},m("title",{key:"4d3b6724f6532920f5531d2e15b28a06f0770688"},"Search icon"),m("path",{key:"65a46a1916c1f020c9bebffd42aa016b59177376",d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),e&&m("button",{key:"65278eb0ab49415dce79c874adf90adcb5854db5",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},m("svg",{key:"0016263afe32250ace58cc4b98ff6106d7d9d4a0",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},m("title",{key:"9b40d806455ab9c19c0cddb4c76101debdb0266c"},"Clear icon"),m("path",{key:"2954ee1496d6736d6e780755034902c76adb81e9",d:"M14 8L8 14M8 8L14 14M21 11C21 16.5228 16.5228 21 11 21C5.47715 21 1 16.5228 1 11C1 5.47715 5.47715 1 11 1C16.5228 1 21 5.47715 21 11Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))))))}static get watchers(){return{core:["onCoreChange"],value:["onValueChange"]}}},[0,"searchcraft-input-form",{searchcraftId:[1,"searchcraft-id"],autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],value:[1],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"],value:["onValueChange"]}]);function aa(){if(typeof customElements>"u")return;["searchcraft-input-form","searchcraft-button","searchcraft-error-message","searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-form":customElements.get(t)||customElements.define(t,co);break;case"searchcraft-button":customElements.get(t)||sr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-input-label":customElements.get(t)||qr();break}})}const lo=aa,uo=qr,ho=ee(class extends J{constructor(){super();c(this,"label");this.__registerHost()}render(){return m("div",{key:"5bda164202246eeb2e56bb6a25bede9931898e7a",class:"searchcraft-loading"},m("div",{key:"e33a5abc6686f9983c718a2532aa2d46902d98a2",class:"searchcraft-loading-bars"},m("div",{key:"85ff7af527b8f419c9bfd6e84331dd68772e6fdd",class:"searchcraft-loading-bar-1"}),m("div",{key:"1485d17e9262dbec6d2e5976a63149878137821c",class:"searchcraft-loading-bar-2"}),m("div",{key:"d2939b9f7bc0599df7d96db91802ebfcbf232f3e",class:"searchcraft-loading-bar-3"}),m("div",{key:"7a73bd5baf25ec789c3170e066d1333b905bfe7b",class:"searchcraft-loading-bar-4"}),m("div",{key:"b644b618766727773b21d288945c21b6ef0be958",class:"searchcraft-loading-bar-5"}),m("div",{key:"4f5123a786fc40891ca54edc538dd56f683b26ce",class:"searchcraft-loading-bar-6"})),m("p",{key:"967c1a6fb41231c8d713b78facca98e7f5a80709",class:"searchcraft-loading-label"},this.label))}},[0,"searchcraft-loading",{label:[1]}]);function na(){if(typeof customElements>"u")return;["searchcraft-loading"].forEach(t=>{switch(t){case"searchcraft-loading":customElements.get(t)||customElements.define(t,ho);break}})}const fo=na,po=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPerPage");c(this,"searchResultsPage");c(this,"searchResultsCount");c(this,"searchClientRequestProperties");c(this,"searchResultsPagesCount",1);c(this,"searchResultsRangeMin",1);c(this,"searchResultsRangeMax",1);c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,this.searchClientRequestProperties=s.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.searchResultsRangeMin=(this.searchResultsPage-1)*this.searchResultsPerPage+1,this.searchResultsRangeMax=(this.searchResultsPerPage-1)*this.searchResultsPerPage+this.searchResultsPerPage,this.setSearchResultsPage=s.setSearchResultsPage})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleGoToPage(e){this.setSearchResultsPage(e)}renderOddPaginationItem(e){return m("li",null,m("button",{class:we("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===e}),onClick:()=>this.handleGoToPage(e),type:"button"},e))}renderEvenPaginationItem(e){if(!(this.searchResultsPagesCount<=e))return(this.searchResultsPagesCount<=5||e<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=e+1:this.searchResultsPage>=e-1)?m("li",null,m("button",{class:we("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===e}),onClick:()=>this.handleGoToPage(e),type:"button"},e)):m("li",null,m("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?m("li",null,m("button",{class:we("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===3||this.searchResultsPage===this.searchResultsPagesCount-2}),type:"button",onClick:()=>this.handleGoToPage(this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)},this.searchResultsPage>=this.searchResultsPagesCount-2?this.searchResultsPagesCount-2:3)):m("li",null,m("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){const e=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!e||this.searchResultsPagesCount<=1))return m("div",{class:"searchcraft-pagination"},m("div",{class:"searchcraft-pagination-control"},m("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:m("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",null,"Previous page icon"),m("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),m("ul",{class:"searchcraft-pagination-list"},this.renderOddPaginationItem(1),this.renderEvenPaginationItem(2),this.renderMiddlePaginationItem(),this.renderEvenPaginationItem(this.searchResultsPagesCount>4?this.searchResultsPagesCount-1:4),this.renderOddPaginationItem(this.searchResultsPagesCount)),m("div",{class:"searchcraft-pagination-control"},m("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:m("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",null,"Next page icon"),m("path",{d:"M7.5 15L12.5 10L7.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})))}},[0,"searchcraft-pagination",{searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function mo(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,po);break;case"searchcraft-button":customElements.get(t)||sr();break}})}const go=mo,bo=ee(class extends J{constructor(){super();c(this,"template");c(this,"type");c(this,"searchcraftId");c(this,"hotkey");c(this,"hotkeyModifier");c(this,"hotkeyModifierSymbol");c(this,"isPopoverVisible");c(this,"userAgent");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");c(this,"core");c(this,"renderOptionSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Option key"),m("path",{d:"M283,112c0-11.58,9.42-21,21-21h160c11.58,0,21,9.42,21,21s-9.42,21-21,21h-160c-11.58,0-21-9.42-21-21Z",fill:"currentColor"}),m("path",{d:"M485,400c0,11.58-9.42,21-21,21h-128c-8.29,0-15.82-4.9-19.19-12.47l-122.46-275.53H48c-11.58,0-21-9.42-21-21s9.42-21,21-21h160c8.29,0,15.82,4.9,19.19,12.47l122.46,275.53h114.35c11.58,0,21,9.42,21,21Z",fill:"currentColor"})));c(this,"renderCtrlSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Ctrl key"),m("path",{d:"M388.95,209.4c-.37,5.59-2.9,10.71-7.12,14.4-3.83,3.35-8.74,5.2-13.82,5.2-6.06,0-11.83-2.61-15.81-7.17l-96.2-109.94-96.2,109.94c-3.98,4.56-9.75,7.17-15.81,7.17-5.08,0-9.99-1.84-13.82-5.2-4.22-3.69-6.75-8.81-7.12-14.4-.38-5.6,1.45-11.01,5.15-15.23l112-128c3.98-4.56,9.74-7.17,15.8-7.17s11.82,2.61,15.8,7.17l112,128c3.7,4.22,5.53,9.63,5.15,15.23Z",fill:"currentColor"})));c(this,"renderWindowsMetaSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Windows meta key"),m("path",{d:"M206.115 255.957c-23.854-12.259-47.043-18.479-68.94-18.479-2.978 0-5.976 0.090-8.974 0.354-27.94 2.312-53.461 9.684-69.875 15.414-4.354 1.599-8.817 3.288-13.415 5.153l-44.911 155.697c30.851-11.416 58.146-16.969 83.135-16.969 40.423 0 69.764 15.104 93.996 30.652 11.481-38.959 39.022-133.045 47.241-161.162-5.975-3.642-12.038-7.285-18.257-10.66zM264.174 295.535l-45.223 157.074c13.416 7.686 58.549 32.025 93.106 32.025 27.896 0 59.126-7.148 95.417-21.896l43.178-150.988c-29.316 9.461-57.438 14.26-83.732 14.26-47.975 0-81.557-15.549-102.746-30.475zM146.411 184.395c38.559 0.399 67.076 15.104 90.708 30.251l46.376-158.672c-9.773-5.598-35.403-19.547-53.929-24.3-12.193-2.842-25.010-4.308-38.602-4.308-25.898 0.488-54.194 6.973-86.444 19.9l-44.22 155.298c32.404-12.218 60.322-18.17 86.043-18.17 0.023 0.001 0.068 0.001 0.068 0.001zM512 99.062c-29.407 11.416-58.104 17.233-85.514 17.233-45.843 0-79.646-15.901-101.547-31.183l-45.975 159.118c30.873 19.854 64.145 29.939 99.061 29.939 28.474 0 57.97-6.84 87.731-20.344l-0.091-1.111 1.867-0.443 44.468-153.209z",fill:"currentColor"})));c(this,"renderMacMetaSymbol",()=>m("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},m("title",null,"Mac meta key"),m("path",{d:"M368,283h-43v-54h43c46.87,0,85-38.13,85-85s-38.13-85-85-85-85,38.13-85,85v43h-54v-43c0-46.87-38.13-85-85-85s-85,38.13-85,85,38.13,85,85,85h43v54h-43c-46.87,0-85,38.13-85,85s38.13,85,85,85,85-38.13,85-85v-43h54v43c0,46.87,38.13,85,85,85s85-38.13,85-85-38.13-85-85-85ZM325,144c0-23.71,19.29-43,43-43s43,19.29,43,43-19.29,43-43,43h-43v-43ZM144,187c-23.71,0-43-19.29-43-43s19.29-43,43-43,43,19.29,43,43v43h-43ZM187,368c0,23.71-19.29,43-43,43s-43-19.29-43-43,19.29-43,43-43h43v43ZM283,283h-54v-54h54v54ZM368,411c-23.71,0-43-19.29-43-43v-43h43c23.71,0,43,19.29,43,43s-19.29,43-43,43Z",fill:"currentColor"})));this.__registerHost()}onCoreAvailable(e){this.core=e;const s=e.store.getState();this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.isPopoverVisible=s.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=e.store.subscribe(a=>{this.hotkey=a.hotkey.toUpperCase(),this.hotkeyModifier=a.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}handleOnClick(){var e;(e=this.core)==null||e.store.getState().setPopoverVisibility(!0)}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}setUserAgent(){const e=navigator.userAgent.toLowerCase();switch(!0){case e.includes("windows"):return"window";case e.includes("mac"):return"mac";default:return"other"}}setHotkeyModifierSymbol(){switch(this.hotkeyModifier){case"ctrl":return this.userAgent==="windows"?this.renderCtrlSymbol():this.renderMacMetaSymbol();case"alt":case"option":return this.renderOptionSymbol();default:return this.userAgent==="windows"?this.renderWindowsMetaSymbol():this.renderMacMetaSymbol()}}renderSkeuomorphicSlot(){return m("div",{class:"searchcraft-popover-button-wrapper"},m("div",{class:"searchcraft-popover-button-input"},m("svg",{class:"searchcraft-popover-button-input-search-icon",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",version:"1.1"},m("title",null,"Search icon"),m("path",{d:"M17.5 17.5L13.875 13.875M15.8333 9.16667C15.8333 12.8486 12.8486 15.8333 9.16667 15.8333C5.48477 15.8333 2.5 12.8486 2.5 9.16667C2.5 5.48477 5.48477 2.5 9.16667 2.5C12.8486 2.5 15.8333 5.48477 15.8333 9.16667Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),m("span",null,"Search")),m("div",{class:"searchcraft-popover-button-keycaps"},m("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},m("span",null,this.hotkeyModifierSymbol)),m("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},m("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return m("div",null,m("slot",null))}}render(){return m("button",{key:"4f11d81bb189a929372d9e398a0913b3b626e42c",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:At}):void 0,onClick:this.handleOnClick.bind(this),type:"button"},typeof this.template<"u"?void 0:this.type?this.renderSlot():"Open Popover")}},[4,"searchcraft-popover-button",{template:[16],type:[1],searchcraftId:[1,"searchcraft-id"],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function vo(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,bo);break}})}const yo=vo,ko=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"searchResultsCount");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.searchResultsCount=e.store.getState().searchResultsCount,this.unsubscribe=e.store.subscribe(s=>{this.searchResultsCount=s.searchResultsCount})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){return m("footer",{key:"5e3c0da21c63453ac705d0ea2dbb1ee5053bd527",class:"searchcraft-popover-footer"},m("p",{key:"34332a6a54af63717a6f6c36c65a321b2d18c82c",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ea(this.searchResultsCount)} Results Found`:" "),m("a",{key:"8cd1bd1ad4e3a91e7221c5d38650b10a66dc884e",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},m("svg",{key:"4ebaa80bc3ee8cc2643368d84158cc46ac141376",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",{key:"804857d081cf5cbd8e63af05c3479a96872d136d"},"Powered by Searchcraft"),m("path",{key:"43d4a2b110134036b8823e508f535c293fb2df0c",d:"M5.07288 0.608C7.60088 0.608 8.84888 2.064 8.84888 4.112C8.84888 6.16 7.60088 7.616 5.07288 7.616H1.68088V12H0.336875V0.608H5.07288ZM5.07288 6.4C6.67288 6.4 7.45688 5.552 7.45688 4.112C7.45688 2.672 6.67288 1.824 5.07288 1.824H1.68088V6.4H5.07288ZM13.31 12.192C10.99 12.192 9.31 10.512 9.31 7.872C9.31 5.232 10.99 3.552 13.31 3.552C15.63 3.552 17.31 5.232 17.31 7.872C17.31 10.512 15.63 12.192 13.31 12.192ZM13.31 11.04C14.91 11.04 15.966 9.872 15.966 7.872C15.966 5.872 14.91 4.704 13.31 4.704C11.71 4.704 10.654 5.872 10.654 7.872C10.654 9.872 11.71 11.04 13.31 11.04ZM28.3826 3.744H29.7586L27.0066 12H25.6626L24.4466 8.176C24.1586 7.264 23.8706 6.304 23.6146 5.376C23.3426 6.304 23.0546 7.264 22.7666 8.176L21.5666 12H20.2226L17.4706 3.744H18.8466L20.0146 7.472C20.3346 8.48 20.6226 9.472 20.9106 10.48C21.1826 9.472 21.4706 8.48 21.7906 7.472L22.9426 3.744H24.2866L25.4386 7.472C25.7426 8.464 26.0466 9.456 26.3346 10.448C26.6066 9.456 26.9106 8.464 27.2146 7.472L28.3826 3.744ZM37.5194 7.872V8.32H31.2474C31.3754 10.176 32.3514 11.024 33.7914 11.024C34.9594 11.024 35.6954 10.416 35.9834 9.488H37.3114C36.9114 11.04 35.7274 12.192 33.7594 12.192C31.5034 12.192 29.9194 10.544 29.9194 7.872C29.9194 5.28 31.4394 3.552 33.7274 3.552C36.1914 3.552 37.5194 5.504 37.5194 7.872ZM33.7274 4.72C32.4314 4.72 31.4874 5.536 31.2794 7.168H36.1434C36.0154 5.808 35.1994 4.72 33.7274 4.72ZM42.9101 3.616C43.0381 3.616 43.1661 3.616 43.3421 3.632V4.864H43.0221C41.3741 4.864 40.3181 5.696 40.3181 7.296V12H39.0381V3.744H40.2541V5.2C40.7181 4.336 41.5661 3.616 42.9101 3.616ZM51.2538 7.872V8.32H44.9818C45.1098 10.176 46.0858 11.024 47.5258 11.024C48.6938 11.024 49.4298 10.416 49.7178 9.488H51.0458C50.6458 11.04 49.4618 12.192 47.4938 12.192C45.2378 12.192 43.6538 10.544 43.6538 7.872C43.6538 5.28 45.1738 3.552 47.4618 3.552C49.9258 3.552 51.2538 5.504 51.2538 7.872ZM47.4618 4.72C46.1658 4.72 45.2218 5.536 45.0138 7.168H49.8778C49.7498 5.808 48.9338 4.72 47.4618 4.72ZM58.9805 0.608H60.2605V12H59.0445V10.72C58.4205 11.664 57.4445 12.192 56.2125 12.192C53.8925 12.192 52.3725 10.512 52.3725 7.872C52.3725 5.232 53.8925 3.552 56.2125 3.552C57.4125 3.552 58.3565 4.048 58.9805 4.928V0.608ZM56.3725 11.04C57.9725 11.04 59.0285 9.872 59.0285 7.872C59.0285 5.872 57.9725 4.704 56.3725 4.704C54.7725 4.704 53.7165 5.936 53.7165 7.936C53.7165 9.936 54.7725 11.04 56.3725 11.04ZM69.2736 3.552C71.5936 3.552 73.1136 5.232 73.1136 7.872C73.1136 10.512 71.5936 12.192 69.2736 12.192C68.0416 12.192 67.0656 11.664 66.4416 10.72V12H65.2256V0.608H66.5056V4.928C67.1296 4.048 68.0736 3.552 69.2736 3.552ZM69.1136 11.04C70.7136 11.04 71.7696 9.808 71.7696 7.808C71.7696 5.808 70.7136 4.704 69.1136 4.704C67.5136 4.704 66.4576 5.872 66.4576 7.872C66.4576 9.872 67.5136 11.04 69.1136 11.04ZM79.3795 3.744H80.7715L77.2835 13.296C76.7555 14.752 75.9075 15.184 74.5955 15.184C74.3395 15.184 74.0995 15.168 73.8275 15.136V14.064H74.5795C75.3955 14.064 75.8275 13.696 76.0835 13.04C76.1795 12.8 76.2755 12.528 76.3715 12.272L73.2675 3.744H74.6755L75.8435 7.184C76.2595 8.384 76.6435 9.568 77.0275 10.752C77.3955 9.568 77.7955 8.368 78.2115 7.168L79.3795 3.744ZM89.1546 12.256C86.1146 12.256 84.2906 10.864 84.2746 8.24H86.4026C86.4346 10.032 87.6346 10.512 89.2186 10.512C90.7066 10.512 91.5226 9.936 91.5226 8.864C91.5226 7.968 90.9306 7.568 89.1866 7.216L88.2266 7.024C86.0186 6.608 84.5626 5.632 84.5626 3.568C84.5626 1.68 86.0506 0.351999 88.7866 0.351999C91.9866 0.351999 93.3466 1.856 93.4266 4H91.3306C91.2506 2.784 90.6266 2.096 88.8186 2.096C87.4426 2.096 86.7706 2.64 86.7706 3.504C86.7706 4.416 87.2986 4.832 88.9946 5.184L89.9866 5.376C92.6746 5.904 93.7626 6.944 93.7626 8.752C93.7626 11.008 92.0026 12.256 89.1546 12.256ZM102.952 8.016V8.496H96.7758C96.9198 9.968 97.7518 10.624 98.9198 10.624C99.8798 10.624 100.504 10.176 100.808 9.44H102.744C102.328 11.12 100.888 12.192 98.9038 12.192C96.4718 12.192 94.7918 10.512 94.7918 7.872C94.7918 5.28 96.4238 3.552 98.8718 3.552C101.4 3.552 102.952 5.392 102.952 8.016ZM98.8558 5.12C97.7838 5.12 96.9838 5.728 96.7918 7.088H100.936C100.776 5.92 100.056 5.12 98.8558 5.12ZM111.599 12H109.583C109.455 11.776 109.391 11.392 109.359 10.992C108.815 11.76 107.919 12.192 106.703 12.192C104.943 12.192 103.727 11.312 103.727 9.712C103.727 8.336 104.559 7.36 106.895 7.136L108.143 7.024C108.911 6.928 109.311 6.688 109.311 6.08C109.311 5.44 108.975 5.056 107.807 5.056C106.655 5.056 106.175 5.36 106.095 6.368H104.111C104.223 4.624 105.247 3.552 107.823 3.552C110.287 3.552 111.263 4.544 111.263 6.032V10.432C111.263 11.024 111.375 11.68 111.599 12ZM107.183 10.752C108.255 10.752 109.311 10.176 109.311 8.736V7.984C109.103 8.176 108.799 8.272 108.367 8.32L107.279 8.448C106.159 8.576 105.791 8.976 105.791 9.632C105.791 10.32 106.255 10.752 107.183 10.752ZM117.216 3.616C117.392 3.616 117.536 3.616 117.712 3.648V5.504H117.2C115.712 5.504 114.816 6.24 114.816 7.808V12H112.8V3.744H114.752V5.216C115.152 4.288 115.936 3.616 117.216 3.616ZM122.137 12.192C119.689 12.192 118.057 10.512 118.057 7.872C118.057 5.232 119.673 3.552 122.137 3.552C124.297 3.552 125.737 4.784 125.977 6.72H123.961C123.769 5.696 123.033 5.232 122.137 5.232C120.937 5.232 120.121 6.064 120.121 7.872C120.121 9.68 120.969 10.512 122.137 10.512C123.049 10.512 123.833 10.016 123.993 8.928H126.009C125.785 10.944 124.249 12.192 122.137 12.192ZM131.641 3.552C133.369 3.552 134.537 4.56 134.537 6.528V12H132.521V6.864C132.521 5.808 131.993 5.296 130.969 5.296C130.089 5.296 129.129 5.904 129.129 7.376V12H127.113V0.608H129.129V4.848C129.673 4.096 130.521 3.552 131.641 3.552ZM139.887 12.192C137.439 12.192 135.807 10.512 135.807 7.872C135.807 5.232 137.423 3.552 139.887 3.552C142.047 3.552 143.487 4.784 143.727 6.72H141.711C141.519 5.696 140.783 5.232 139.887 5.232C138.687 5.232 137.871 6.064 137.871 7.872C137.871 9.68 138.719 10.512 139.887 10.512C140.799 10.512 141.583 10.016 141.743 8.928H143.759C143.535 10.944 141.999 12.192 139.887 12.192ZM149.279 3.616C149.455 3.616 149.599 3.616 149.775 3.648V5.504H149.263C147.775 5.504 146.879 6.24 146.879 7.808V12H144.863V3.744H146.815V5.216C147.215 4.288 147.999 3.616 149.279 3.616ZM157.803 12H155.787C155.659 11.776 155.595 11.392 155.563 10.992C155.019 11.76 154.123 12.192 152.907 12.192C151.147 12.192 149.931 11.312 149.931 9.712C149.931 8.336 150.763 7.36 153.099 7.136L154.347 7.024C155.115 6.928 155.515 6.688 155.515 6.08C155.515 5.44 155.179 5.056 154.011 5.056C152.859 5.056 152.379 5.36 152.299 6.368H150.315C150.427 4.624 151.451 3.552 154.027 3.552C156.491 3.552 157.467 4.544 157.467 6.032V10.432C157.467 11.024 157.579 11.68 157.803 12ZM153.387 10.752C154.459 10.752 155.515 10.176 155.515 8.736V7.984C155.307 8.176 155.003 8.272 154.571 8.32L153.483 8.448C152.363 8.576 151.995 8.976 151.995 9.632C151.995 10.32 152.459 10.752 153.387 10.752ZM162.466 2.16C161.746 2.16 161.426 2.512 161.426 3.152V3.744H163.122V5.28H161.426V12H159.426V5.28H158.146V3.744H159.426V3.12C159.426 1.664 160.146 0.559999 162.13 0.559999C162.45 0.559999 162.882 0.575999 163.17 0.608V2.16H162.466ZM168.636 5.28H167.004V9.744C167.004 10.288 167.276 10.464 167.948 10.464H168.636V12C168.268 12.032 167.9 12.064 167.58 12.064C165.836 12.064 165.004 11.472 165.004 9.952V5.28H163.724V3.744H165.004V1.344H167.004V3.744H168.636V5.28Z",fill:"currentColor"}))))}},[0,"searchcraft-popover-footer",{searchcraftId:[1,"searchcraft-id"],searchResultsCount:[32]}]);function oa(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,ko);break}})}const Co=oa,xo=ee(class extends J{constructor(){super();c(this,"item");c(this,"popoverResultMappings");c(this,"documentPosition",0);c(this,"searchcraftId");c(this,"title");c(this,"subtitle");c(this,"href");c(this,"imageSource");c(this,"imageAlt");c(this,"core");c(this,"cleanupCore");c(this,"handleLinkClick",()=>{var e;if(this.core){const s=this.documentPosition,a=this.core.store.getState().searchTerm,o=this.core.store.getState().searchClientResponseItems.length||0;(e=this.core.measureClient)==null||e.sendMeasureEvent("document_clicked",{document_position:s,number_of_documents:o,search_term:a})}});this.__registerHost()}mapValuesFromDocument(e){var s,a,o,n,h;this.title=Mt(e,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Mt(e,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Mt(e,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Mt(e,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Mt(e,(h=this.popoverResultMappings)==null?void 0:h.imageAlt)}onCoreAvailable(e){this.core=e}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document),this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}render(){return m("div",{key:"d1c9c310b8abc9d2370efb802eac1edf4189519d",class:"searchcraft-popover-list-item"},m("a",{key:"30eb1a5076c5b4b95ae43147eaee0bb72ce46179",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&m("div",{key:"d18ff55823dc2c61f3786f423936af8b009aeeda",class:"searchcraft-popover-list-item-image-wrapper"},m("img",{key:"56f4cc1d472f7da05e64fcf52c560a7ad0cdf7a6",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),m("div",{key:"78a0f0235d5e71d10076b70ccbaf4b58e0d6fea0",class:"searchcraft-popover-list-item-content"},this.title&&m("p",{key:"4489047af56e5aa295cb5f036e970dcad053d3b7",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&m("p",{key:"4d177c227a1dbf1233022d738403c8eb93ba328d",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],searchcraftId:[1,"searchcraft-id"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function jr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,xo);break}})}const wo=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"popoverResultMappings");c(this,"searchClientResponseItems");c(this,"adClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"config");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.config=e.config}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}renderWithADMAds(){var e,s;return m("div",{class:"searchcraft-popover-list-view"},(e=this.adClientResponseItems)==null?void 0:e.map(a=>m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var u,l,p,C,S,$,A,N;const e=[],s=((l=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:l.adInterstitialInterval)||0,a=((C=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=(($=(S=this.config)==null?void 0:S.customAdConfig)==null?void 0:$.adStartQuantity)||0,n=((N=(A=this.config)==null?void 0:A.customAdConfig)==null?void 0:N.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let D=0;D<o;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));h.forEach((D,P)=>{if(s&&P%s===0&&P+s<h.length&&P>=s)for(let I=0;I<a;I++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${I}`,renderPosition:"interstitial"}));e.push(m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:D,key:D.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+P}))});for(let D=0;D<n;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-popover-list-view"},e)}renderWithNativoAds(){var l,p,C,S,$,A,N,D,P,I;const e=[],s=((p=(l=this.config)==null?void 0:l.nativoConfig)==null?void 0:p.adInterstialStartIndex)||0,a=((S=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:S.adInterstitialInterval)||0,o=((A=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:A.adInterstitialQuantity)||1,n=((D=(N=this.config)==null?void 0:N.nativoConfig)==null?void 0:D.adStartQuantity)||0,h=((I=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:I.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let B=0;B<n;B++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"top"}));u.forEach((B,j)=>{if(a&&(j+s)%a===0&&j+a<u.length&&j>=a)for(let ae=0;ae<o;ae++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B.id}-ad-${ae}`,renderPosition:"interstitial"}));e.push(m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:B,key:B.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+j}))});for(let B=0;B<h;B++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-popover-list-view"},e)}renderWithNoAds(){var e;return m("div",{class:"searchcraft-popover-list-view"},(e=this.searchClientResponseItems)==null?void 0:e.map((s,a)=>m("searchcraft-popover-list-item",{"searchcraft-id":this.searchcraftId,item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var e,s,a;return(e=this.config)!=null&&e.customAdConfig?this.renderWithCustomAds():(s=this.config)!=null&&s.nativoConfig?this.renderWithNativoAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithADMAds():this.renderWithNoAds()}},[0,"searchcraft-popover-list-view",{searchcraftId:[1,"searchcraft-id"],popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function ia(){if(typeof customElements>"u")return;["searchcraft-popover-list-view","searchcraft-ad","searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-view":customElements.get(t)||customElements.define(t,wo);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-popover-list-item":customElements.get(t)||jr();break}})}const So=ee(class extends J{constructor(){super();c(this,"type","inline");c(this,"popoverResultMappings");c(this,"hotkey","k");c(this,"hotkeyModifier","meta");c(this,"searchcraftId");c(this,"placeholderValue","Enter Search");c(this,"placeholderBehavior");c(this,"isPopoverVisibleInState",!1);c(this,"searchClientResponseItems",[]);c(this,"adClientResponseItems",[]);c(this,"searchTerm");c(this,"isFocused",!1);c(this,"breakpointSm",576);c(this,"breakpointMd",768);c(this,"breakpointLg",992);c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"modalElement");c(this,"unsubscribe");c(this,"cleanupCore");c(this,"core");c(this,"handleDocumentClick",e=>{this.hostElement.contains(e.target)||(this.isFocused=!1)});c(this,"handleDocumentKeyDown",e=>{var s;if(e.key===this.hotkey&&this.handleHotkeyPressed(e),!!this.hostElement.contains(document.activeElement))switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.focusOnNextListItem(e.key);break;case"Escape":(s=this.core)==null||s.store.getState().setPopoverVisibility(!1);break;default:return}});c(this,"handleInputInit",()=>{const e=this.hostElement.querySelector(".searchcraft-input-form-input");e==null||e.focus()});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e;const s=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(s.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=e.store.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=e.store.subscribe(a=>{this.isPopoverVisibleInState!==a.isPopoverVisible&&this.handlePopoverVisibilityChange(a.isPopoverVisible),this.searchClientResponseItems=[...a.searchClientResponseItems],this.adClientResponseItems=[...a.adClientResponseItems],this.searchTerm=a.searchTerm,this.searchResultsPage=a.searchResultsPage,this.searchResultsPerPage=a.searchResultsPerPage}),e.store.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(e){this.isPopoverVisibleInState=e,document.body.style.overflow=e?"hidden":"auto"}handleInputFocus(){var e;this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&((e=this.core)==null||e.store.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),this.modalElement.setAttribute("searchcraft-id",this.searchcraftId),this.placeholderValue&&this.modalElement.setAttribute("placeholder-value",this.placeholderValue),this.placeholderBehavior&&this.modalElement.setAttribute("placeholder-behavior",this.placeholderBehavior),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(e){var s;(s=this.core)==null||s.store.getState().setPopoverVisibility(!1)}handleHotkeyPressed(e){var s;if(e.ctrlKey&&this.hotkeyModifier==="ctrl"||e.altKey&&this.hotkeyModifier==="alt"||e.metaKey&&this.hotkeyModifier==="meta")if(e.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const a=this.hostElement.querySelector(".searchcraft-input-form-input");a==null||a.focus()}else(s=this.core)==null||s.store.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){var e;(e=this.core)==null||e.store.getState().setPopoverVisibility(!1)}focusOnNextListItem(e){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(h=>!h.hasAttribute("disabled")&&h.offsetParent!==null),a=s.indexOf(document.activeElement);if(e==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(e==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const h=document.querySelector(".searchcraft-input-form-input");h&&(h.focus(),requestAnimationFrame(()=>{h.selectionEnd=h.value.length,h.selectionStart=h.value.length}))}}get hasResultsToShow(){var e,s;return this.searchTerm&&((s=(e=this.searchTerm)==null?void 0:e.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const e=this.hasResultsToShow&&this.isFocused;return m("div",{class:we("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":e})},m("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},m("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior})),e&&m("div",{class:"searchcraft-popover-form-inline-wrapper"},m("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId}),m("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderModalPopover(){if(this.isPopoverVisibleInState)return m("div",{class:we("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},m("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),m("div",{class:"searchcraft-popover-form-modal-wrapper"},m("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},m("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),m("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),m("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&m("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),m("searchcraft-popover-footer",{searchcraftId:this.searchcraftId})))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return m("div",{class:we("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},m("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},m("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this),searchcraftId:this.searchcraftId,placeholderValue:this.placeholderValue,placeholderBehavior:this.placeholderBehavior}),m("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),m("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&m("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage,searchcraftId:this.searchcraftId})),m("searchcraft-popover-footer",{searchcraftId:this.searchcraftId}))}render(){switch(this.type){case"inline":return this.renderInlinePopover();case"modal":return this.renderModalPopover();case"fullscreen":return this.renderFullscreenPopover()}}},[0,"searchcraft-popover-form",{type:[1],popoverResultMappings:[16],hotkey:[1],hotkeyModifier:[1,"hotkey-modifier"],searchcraftId:[1,"searchcraft-id"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],isPopoverVisibleInState:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function ca(){if(typeof customElements>"u")return;["searchcraft-popover-form","searchcraft-ad","searchcraft-button","searchcraft-error-message","searchcraft-input-form","searchcraft-input-label","searchcraft-popover-footer","searchcraft-popover-form","searchcraft-popover-list-item","searchcraft-popover-list-view"].forEach(t=>{switch(t){case"searchcraft-popover-form":customElements.get(t)||customElements.define(t,So);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-button":customElements.get(t)||sr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-input-form":customElements.get(t)||aa();break;case"searchcraft-input-label":customElements.get(t)||qr();break;case"searchcraft-popover-footer":customElements.get(t)||oa();break;case"searchcraft-popover-form":customElements.get(t)||ca();break;case"searchcraft-popover-list-item":customElements.get(t)||jr();break;case"searchcraft-popover-list-view":customElements.get(t)||ia();break}})}const Ro=ca,Eo=jr,To=ia,Po=ee(class extends J{constructor(){super();c(this,"template");c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"searchClientRequestProperties");c(this,"count",0);c(this,"range",[0,0]);c(this,"responseTime","0");c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsCount=s.searchResultsCount,this.searchClientRequestProperties=s.searchClientRequestProperties,this.count=this.searchResultsCount,this.range[0]=this.searchResultsPage<=1?1:this.searchResultsPerPage*(this.searchResultsPage-1),this.range[1]=this.searchResultsPerPage*this.searchResultsPage,this.range[1]=this.range[1]>this.searchResultsCount?this.searchResultsCount:this.range[1],this.responseTime=((s.searchResponseTimeTaken||0)*1e3).toFixed(2)})}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";return!this.searchTerm&&!e||this.searchResultsCount===0?null:m("p",{class:"searchcraft-results-info"},typeof this.template<"u"?this.template({range:[Number(this.range[0]),Number(this.range[1])],count:this.count,responseTime:this.responseTime},{html:At}):`${ea(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchClientRequestProperties:[32],count:[32],range:[32],responseTime:[32]}]);function $o(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,Po);break}})}const Io=$o,_o=ee(class extends J{constructor(){super();c(this,"item");c(this,"index");c(this,"documentPosition",0);c(this,"template");c(this,"searchcraftId");c(this,"templateHtml");c(this,"core");c(this,"cleanupCore");c(this,"handleResultContainerClick",e=>{var u;if(!e.target)return;const a=e.target.closest("a");if(!a||!((u=this.hostElement)!=null&&u.contains(a))||!this.core||!this.core.measureClient)return;const o=this.documentPosition,n=this.core.store.getState().searchTerm,h=this.core.store.getState().searchClientResponseItems.length||0;this.core.measureClient.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:h,search_term:n})});c(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){this.core=e}connectedCallback(){var e;if(this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this)),this.item)try{this.templateHtml=(e=this.template)==null?void 0:e.call(this,this.item.document,this.index,{html:At,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}disconnectedCallback(){var e;(e=this.cleanupCore)==null||e.call(this)}render(){if(this.item)return typeof this.template>"u"?m("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([e,s])=>m("p",{key:e},m("strong",null,e),": ",s))):m("div",{class:"searchcraft-search-result",innerHTML:this.templateHtml,onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown})}},[0,"searchcraft-search-result",{item:[16],index:[2],documentPosition:[2,"document-position"],template:[16],searchcraftId:[1,"searchcraft-id"],templateHtml:[32]}]);function la(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,_o);break}})}const Ao=la,Mo=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"initialQuery");c(this,"template");c(this,"adClientResponseItems",[]);c(this,"config");c(this,"isSearchInProgress",!0);c(this,"searchClientResponseItems");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchTerm","");c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){var a;const s=e.store.getState();this.handleStateChange(s),this.searchClientResponseItems=s.searchClientResponseItems,this.searchTerm=s.searchTerm,this.config=(a=s.core)==null?void 0:a.config,this.unsubscribe=e.store.subscribe(o=>this.handleStateChange(o))}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(e){var s;this.adClientResponseItems=[...e.adClientResponseItems],this.config=(s=e.core)==null?void 0:s.config,this.isSearchInProgress=e.isSearchInProgress,this.searchClientResponseItems=[...e.searchClientResponseItems],this.searchResultsPage=e.searchResultsPage,this.searchResultsPerPage=e.searchResultsPerPage,this.searchTerm=e.searchTerm}renderEmptyState(){return m("div",{class:"searchcraft-search-results-empty-state"},m("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return m("div",{class:"searchcraft-search-results"},m("div",{class:"searchcraft-search-results-error-message"},m("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s;const e=this.searchClientResponseItems||[];return m("div",{class:"searchcraft-search-results"},(s=this.adClientResponseItems)==null?void 0:s.map(a=>m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"adMarketplace",adClientResponseItem:a,key:a.id,renderPosition:"top"})),e.map((a,o)=>m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:a.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+o,index:o,item:a,template:this.template})))}renderWithCustomAds(){var u,l,p,C,S,$,A,N;const e=[],s=((l=(u=this.config)==null?void 0:u.customAdConfig)==null?void 0:l.adInterstitialInterval)||0,a=((C=(p=this.config)==null?void 0:p.customAdConfig)==null?void 0:C.adInterstitialQuantity)||1,o=(($=(S=this.config)==null?void 0:S.customAdConfig)==null?void 0:$.adStartQuantity)||0,n=((N=(A=this.config)==null?void 0:A.customAdConfig)==null?void 0:N.adEndQuantity)||0,h=this.searchClientResponseItems||[];for(let D=0;D<o;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"top"}));h.forEach((D,P)=>{if(s&&P%s===0&&P+s<h.length&&P>=s)for(let I=0;I<a;I++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D.id}-ad-${I}`,renderPosition:"interstitial"}));e.push(m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:D.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+P,index:P,item:D,template:this.template}))});for(let D=0;D<n;D++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Custom",key:`${D}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-search-results"},e)}renderWithNativoAds(){var l,p,C,S,$,A,N,D,P,I;const e=[],s=((p=(l=this.config)==null?void 0:l.nativoConfig)==null?void 0:p.adInterstialStartIndex)||0,a=((S=(C=this.config)==null?void 0:C.nativoConfig)==null?void 0:S.adInterstitialInterval)||0,o=((A=($=this.config)==null?void 0:$.nativoConfig)==null?void 0:A.adInterstitialQuantity)||1,n=((D=(N=this.config)==null?void 0:N.nativoConfig)==null?void 0:D.adStartQuantity)||0,h=((I=(P=this.config)==null?void 0:P.nativoConfig)==null?void 0:I.adEndQuantity)||0,u=this.searchClientResponseItems||[];for(let B=0;B<n;B++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"top"}));u.forEach((B,j)=>{if(a&&(j+s)%a===0&&j+a<u.length&&j>=a)for(let ae=0;ae<o;ae++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B.id}-ad-${ae}`,renderPosition:"interstitial"}));e.push(m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:B.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+j,index:j,item:B,template:this.template}))});for(let B=0;B<h;B++)e.push(m("searchcraft-ad",{"searchcraft-id":this.searchcraftId,adSource:"Nativo",key:`${B}-ad`,renderPosition:"bottom"}));return m("div",{class:"searchcraft-search-results"},e)}renderWithNoAds(){const e=this.searchClientResponseItems||[];return m("div",{class:"searchcraft-search-results"},e.map((s,a)=>m("searchcraft-search-result",{"searchcraft-id":this.searchcraftId,key:s.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+a,index:a,item:s,template:this.template})))}render(){var s,a,o;const e=this.searchClientResponseItems||[];return e.length===0&&!this.isSearchInProgress?this.renderEmptyState():this.searchTerm.length>0&&e.length===0&&!this.isSearchInProgress?this.renderNoResultsFoundState():(s=this.config)!=null&&s.customAdConfig?this.renderWithCustomAds():(a=this.config)!=null&&a.admAdConfig?this.renderWithNativoAds():(o=this.config)!=null&&o.nativoConfig?this.renderWithNativoAds():this.renderWithNoAds()}},[4,"searchcraft-search-results",{searchcraftId:[1,"searchcraft-id"],initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function Oo(){if(typeof customElements>"u")return;["searchcraft-search-results","searchcraft-ad","searchcraft-error-message","searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-results":customElements.get(t)||customElements.define(t,Mo);break;case"searchcraft-ad":customElements.get(t)||rr();break;case"searchcraft-error-message":customElements.get(t)||ar();break;case"searchcraft-search-result":customElements.get(t)||la();break}})}const Fo=Oo,Lo=ee(class extends J{constructor(){super();c(this,"caption");c(this,"disabled",!1);c(this,"inputId");c(this,"label");c(this,"labelId");c(this,"name");c(this,"options",[]);c(this,"selectChange");c(this,"searchResultsPerPage");c(this,"setSearchResultsPage",()=>{});c(this,"setSearchResultsPerPage",()=>{});c(this,"handleSelectChange",e=>{this.selectChange.emit(e.target.value)});this.__registerHost(),this.selectChange=Je(this,"selectChange")}handleGoToPage(e){this.setSearchResultsPage(e)}render(){return m("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&m("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),m("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},m("select",{key:"1d5f492c2255f8ca1b6ea5e04a2726dda2f2c52f","aria-labelledby":this.label?this.labelId||`${this.inputId}-label`:void 0,class:"searchcraft-select-input",disabled:this.disabled,id:this.inputId,name:this.name,onChange:this.handleSelectChange},(typeof this.options=="string"?JSON.parse(this.options):this.options).map(({label:e,value:s,selected:a})=>m("option",{key:s,value:s,selected:a},e))),m("svg",{key:"0ec6892b529f2e70027aadea47208582a65a97b7",class:"searchcraft-select-input-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},m("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),m("path",{key:"659f8ebf9129e2e7941da949d29688c41c1472bb",d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}))),this.caption&&m("p",{key:"51217d926f68f79b6c3514f5fd769b56549fdce9",class:"searchcraft-select-caption"},this.caption))}},[0,"searchcraft-select",{caption:[1],disabled:[4],inputId:[1,"input-id"],label:[1],labelId:[1,"label-id"],name:[1],options:[1],searchResultsPerPage:[32],setSearchResultsPage:[32],setSearchResultsPerPage:[32]}]);function ua(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Lo);break}})}const Do=ee(class extends J{constructor(){super();c(this,"increment",20);c(this,"searchcraftId");c(this,"searchTerm");c(this,"searchResultsPage");c(this,"searchResultsPerPage");c(this,"searchResultsCount");c(this,"searchResultsPagesCount");c(this,"searchClientRequestProperties");c(this,"initialSearchResultsPerPage");c(this,"setSearchResultsPerPage",()=>{});c(this,"setSearchResultsPage",()=>{});c(this,"unsubscribe",()=>{});c(this,"cleanupCore");this.__registerHost()}onCoreAvailable(e){this.unsubscribe=e.store.subscribe(s=>{this.searchTerm=s.searchTerm,this.searchResultsPerPage=s.searchResultsPerPage,this.searchResultsPage=s.searchResultsPage,this.searchResultsCount=s.searchResultsCount,this.searchClientRequestProperties=s.searchClientRequestProperties,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=s.setSearchResultsPage,this.setSearchResultsPerPage=s.setSearchResultsPerPage}),this.initialSearchResultsPerPage=e.store.getState().searchResultsPerPage}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}render(){const e=typeof this.searchClientRequestProperties=="string"&&this.searchTerm.trim()==="";if(!(!this.searchTerm&&!e||this.searchResultsPagesCount<=1))return m("div",{class:"searchcraft-search-results-per-page"},m("div",{class:"searchcraft-search-results-per-page-select"},m("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),m("div",{class:"searchcraft-search-results-per-page-select-input"},m("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((s,a)=>{const o=this.initialSearchResultsPerPage+Number(this.increment)*a;return{label:`${o}`,value:o}}),onSelectChange:s=>{this.setSearchResultsPerPage(Number(s.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchcraftId:[1,"searchcraft-id"],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchClientRequestProperties:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function No(){if(typeof customElements>"u")return;["searchcraft-search-results-per-page","searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-search-results-per-page":customElements.get(t)||customElements.define(t,Do);break;case"searchcraft-select":customElements.get(t)||ua();break}})}const zo=No,Ho=ua,Bo=ra;var ha={exports:{}};(function(r,t){(function(e,s){r.exports=s()})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:Zs,function(){var je;var e={},s=e,a={exports:e},o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,l=(f,i)=>{for(var d in i)o(f,d,{get:i[d],enumerable:!0})},p=(f,i,d,g)=>{if(i&&typeof i=="object"||typeof i=="function")for(let v of h(i))!u.call(f,v)&&v!==d&&o(f,v,{get:()=>i[v],enumerable:!(g=n(i,v))||g.enumerable});return f},C=f=>p(o({},"__esModule",{value:!0}),f),S={};l(S,{Hooks:()=>Ve,Lexer:()=>Ie,Marked:()=>yr,Parser:()=>Re,Renderer:()=>ne,TextRenderer:()=>at,Tokenizer:()=>dt,defaults:()=>A,getDefaults:()=>$,lexer:()=>re,marked:()=>W,options:()=>kr,parse:()=>ce,parseInline:()=>xr,parser:()=>wr,setOptions:()=>vs,use:()=>Cr,walkTokens:()=>oe}),a.exports=C(S);function $(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=$();function N(f){A=f}var D={exec:()=>null};function P(f,i=""){let d=typeof f=="string"?f:f.source;const g={replace:(v,y)=>{let R=typeof y=="string"?y:y.source;return R=R.replace(I.caret,"$1"),d=d.replace(v,R),g},getRegex:()=>new RegExp(d,i)};return g}var I={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:f=>new RegExp(`^( {0,3}${f})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}#`),htmlBeginRegex:f=>new RegExp(`^ {0,${Math.min(3,f-1)}}<(?:[a-z].*>|!--)`,"i")},B=/^(?:[ \t]*(?:\n|$))+/,j=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ae=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,se=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Q=/(?:[*+-]|\d{1,9}[.)])/,Fe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,le=P(Fe).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),as=P(Fe).replace(/bull/g,Q).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),z=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,ns=/^[^\n]+/,Ae=/(?!\s*\])(?:\\.|[^\[\]\\])+/,it=P(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ae).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ur=P(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Q).getRegex(),tt="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ct=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,os=P("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ct).replace("tag",tt).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yt=P(z).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tt).getRegex(),is=P(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yt).getRegex(),kt={blockquote:is,code:j,def:it,fences:ae,heading:se,hr:Y,html:os,lheading:le,list:ur,newline:B,paragraph:yt,table:D,text:ns},Lt=P("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tt).getRegex(),Dt={...kt,lheading:as,table:Lt,paragraph:P(z).replace("hr",Y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Lt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",tt).getRegex()},hr={...kt,html:P(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ct).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:D,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:P(z).replace("hr",Y).replace("heading",` *#{1,6} *[^
7
+ ]`).replace("lheading",le).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Ct=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,cs=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,dr=/^( {2,}|\\)\n(?!\s*$)/,ls=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,xt=/[\p{P}\p{S}]/u,Nt=/[\s\p{P}\p{S}]/u,zt=/[^\s\p{P}\p{S}]/u,us=P(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Nt).getRegex(),fr=/(?!~)[\p{P}\p{S}]/u,pr=/(?!~)[\s\p{P}\p{S}]/u,hs=/(?:[^\s\p{P}\p{S}]|~)/u,mr=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,rt=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ds=P(rt,"u").replace(/punct/g,xt).getRegex(),fs=P(rt,"u").replace(/punct/g,fr).getRegex(),Ht="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",gr=P(Ht,"gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),ps=P(Ht,"gu").replace(/notPunctSpace/g,hs).replace(/punctSpace/g,pr).replace(/punct/g,fr).getRegex(),U=P("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,zt).replace(/punctSpace/g,Nt).replace(/punct/g,xt).getRegex(),O=P(/\\(punct)/,"gu").replace(/punct/g,xt).getRegex(),q=P(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),V=P(ct).replace("(?:-->|$)","-->").getRegex(),ue=P("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",V).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Se=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,st=P(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Se).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),wt=P(/^!?\[(label)\]\[(ref)\]/).replace("label",Se).replace("ref",Ae).getRegex(),Bt=P(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ae).getRegex(),lt=P("reflink|nolink(?!\\()","g").replace("reflink",wt).replace("nolink",Bt).getRegex(),Ut={_backpedal:D,anyPunctuation:O,autolink:q,blockSkip:mr,br:dr,code:cs,del:D,emStrongLDelim:ds,emStrongRDelimAst:gr,emStrongRDelimUnd:U,escape:Ct,link:st,nolink:Bt,punctuation:us,reflink:wt,reflinkSearch:lt,tag:ue,text:ls,url:D},ms={...Ut,link:P(/^!?\[(label)\]\((.*?)\)/).replace("label",Se).getRegex(),reflink:P(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Se).getRegex()},Vt={...Ut,emStrongRDelimAst:ps,emStrongLDelim:fs,url:P(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},St={...Vt,br:P(dr).replace("{2,}","*").getRegex(),text:P(Vt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Le={normal:kt,gfm:Dt,pedantic:hr},ut={normal:Ut,gfm:Vt,breaks:St,pedantic:ms},gs={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},br=f=>gs[f];function $e(f,i){if(i){if(I.escapeTest.test(f))return f.replace(I.escapeReplace,br)}else if(I.escapeTestNoEncode.test(f))return f.replace(I.escapeReplaceNoEncode,br);return f}function ht(f){try{f=encodeURI(f).replace(I.percentDecode,"%")}catch{return null}return f}function he(f,i){var y;const d=f.replace(I.findPipe,(R,k,T)=>{let x=!1,w=k;for(;--w>=0&&T[w]==="\\";)x=!x;return x?"|":" |"}),g=d.split(I.splitPipe);let v=0;if(g[0].trim()||g.shift(),g.length>0&&!((y=g.at(-1))!=null&&y.trim())&&g.pop(),i)if(g.length>i)g.splice(i);else for(;g.length<i;)g.push("");for(;v<g.length;v++)g[v]=g[v].trim().replace(I.slashPipe,"|");return g}function Me(f,i,d){const g=f.length;if(g===0)return"";let v=0;for(;v<g&&f.charAt(g-v-1)===i;)v++;return f.slice(0,g-v)}function qt(f,i){if(f.indexOf(i[1])===-1)return-1;let d=0;for(let g=0;g<f.length;g++)if(f[g]==="\\")g++;else if(f[g]===i[0])d++;else if(f[g]===i[1]&&(d--,d<0))return g;return d>0?-2:-1}function vr(f,i,d,g,v){const y=i.href,R=i.title||null,k=f[1].replace(v.other.outputLinkReplace,"$1");g.state.inLink=!0;const T={type:f[0].charAt(0)==="!"?"image":"link",raw:d,href:y,title:R,text:k,tokens:g.inlineTokens(k)};return g.state.inLink=!1,T}function bs(f,i,d){const g=f.match(d.other.indentCodeCompensation);if(g===null)return i;const v=g[1];return i.split(`
8
8
  `).map(y=>{const R=y.match(d.other.beginningSpace);if(R===null)return y;const[k]=R;return k.length>=v.length?y.slice(v.length):y}).join(`
9
9
  `)}var dt=class{constructor(f){c(this,"options");c(this,"rules");c(this,"lexer");this.options=f||A}space(f){const i=this.rules.block.newline.exec(f);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(f){const i=this.rules.block.code.exec(f);if(i){const d=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?d:Me(d,`
10
10
  `)}}}fences(f){const i=this.rules.block.fences.exec(f);if(i){const d=i[0],g=bs(d,i[3]||"",this.rules);return{type:"code",raw:d,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:g}}}heading(f){const i=this.rules.block.heading.exec(f);if(i){let d=i[2].trim();if(this.rules.other.endingHash.test(d)){const g=Me(d,"#");(this.options.pedantic||!g||this.rules.other.endingSpaceChar.test(g))&&(d=g.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:d,tokens:this.lexer.inline(d)}}}hr(f){const i=this.rules.block.hr.exec(f);if(i)return{type:"hr",raw:Me(i[0],`
11
11
  `)}}blockquote(f){const i=this.rules.block.blockquote.exec(f);if(i){let d=Me(i[0],`
12
12
  `).split(`
13
13
  `),g="",v="";const y=[];for(;d.length>0;){let R=!1;const k=[];let T;for(T=0;T<d.length;T++)if(this.rules.other.blockquoteStart.test(d[T]))k.push(d[T]),R=!0;else if(!R)k.push(d[T]);else break;d=d.slice(T);const x=k.join(`
14
- `),S=x.replace(this.rules.other.blockquoteSetextReplace,`
14
+ `),w=x.replace(this.rules.other.blockquoteSetextReplace,`
15
15
  $1`).replace(this.rules.other.blockquoteSetextReplace2,"");g=g?`${g}
16
16
  ${x}`:x,v=v?`${v}
17
- ${S}`:S;const Z=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(S,y,!0),this.lexer.state.top=Z,d.length===0)break;const _=y.at(-1);if((_==null?void 0:_.type)==="code")break;if((_==null?void 0:_.type)==="blockquote"){const ie=_,G=ie.raw+`
17
+ ${w}`:w;const Z=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(w,y,!0),this.lexer.state.top=Z,d.length===0)break;const _=y.at(-1);if((_==null?void 0:_.type)==="code")break;if((_==null?void 0:_.type)==="blockquote"){const ie=_,G=ie.raw+`
18
18
  `+d.join(`
19
19
  `),ve=this.blockquote(G);y[y.length-1]=ve,g=g.substring(0,g.length-ie.raw.length)+ve.raw,v=v.substring(0,v.length-ie.text.length)+ve.text;break}else if((_==null?void 0:_.type)==="list"){const ie=_,G=ie.raw+`
20
20
  `+d.join(`
21
21
  `),ve=this.list(G);y[y.length-1]=ve,g=g.substring(0,g.length-_.raw.length)+ve.raw,v=v.substring(0,v.length-ie.raw.length)+ve.raw,d=G.substring(y.at(-1).raw.length).split(`
22
- `);continue}}return{type:"blockquote",raw:g,tokens:y,text:v}}}list(f){let i=this.rules.block.list.exec(f);if(i){let d=i[1].trim();const g=d.length>1,v={type:"list",raw:"",ordered:g,start:g?+d.slice(0,-1):"",loose:!1,items:[]};d=g?`\\d{1,9}\\${d.slice(-1)}`:`\\${d}`,this.options.pedantic&&(d=g?d:"[*+-]");const y=this.rules.other.listItemRegex(d);let R=!1;for(;f;){let T=!1,x="",S="";if(!(i=y.exec(f))||this.rules.block.hr.test(f))break;x=i[0],f=f.substring(x.length);let Z=i[2].split(`
22
+ `);continue}}return{type:"blockquote",raw:g,tokens:y,text:v}}}list(f){let i=this.rules.block.list.exec(f);if(i){let d=i[1].trim();const g=d.length>1,v={type:"list",raw:"",ordered:g,start:g?+d.slice(0,-1):"",loose:!1,items:[]};d=g?`\\d{1,9}\\${d.slice(-1)}`:`\\${d}`,this.options.pedantic&&(d=g?d:"[*+-]");const y=this.rules.other.listItemRegex(d);let R=!1;for(;f;){let T=!1,x="",w="";if(!(i=y.exec(f))||this.rules.block.hr.test(f))break;x=i[0],f=f.substring(x.length);let Z=i[2].split(`
23
23
  `,1)[0].replace(this.rules.other.listReplaceTabs,We=>" ".repeat(3*We.length)),_=f.split(`
24
- `,1)[0],ie=!Z.trim(),G=0;if(this.options.pedantic?(G=2,S=Z.trimStart()):ie?G=i[1].length+1:(G=i[2].search(this.rules.other.nonSpaceChar),G=G>4?1:G,S=Z.slice(G),G+=i[1].length),ie&&this.rules.other.blankLine.test(_)&&(x+=_+`
25
- `,f=f.substring(_.length+1),T=!0),!T){const We=this.rules.other.nextBulletRegex(G),Ge=this.rules.other.hrRegex(G),Ze=this.rules.other.fencesBeginRegex(G),jt=this.rules.other.headingBeginRegex(G),wr=this.rules.other.htmlBeginRegex(G);for(;f;){const Et=f.split(`
26
- `,1)[0];let Ye;if(_=Et,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),Ye=_):Ye=_.replace(this.rules.other.tabCharGlobal," "),Ze.test(_)||jt.test(_)||wr.test(_)||We.test(_)||Ge.test(_))break;if(Ye.search(this.rules.other.nonSpaceChar)>=G||!_.trim())S+=`
27
- `+Ye.slice(G);else{if(ie||Z.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ze.test(Z)||jt.test(Z)||Ge.test(Z))break;S+=`
24
+ `,1)[0],ie=!Z.trim(),G=0;if(this.options.pedantic?(G=2,w=Z.trimStart()):ie?G=i[1].length+1:(G=i[2].search(this.rules.other.nonSpaceChar),G=G>4?1:G,w=Z.slice(G),G+=i[1].length),ie&&this.rules.other.blankLine.test(_)&&(x+=_+`
25
+ `,f=f.substring(_.length+1),T=!0),!T){const We=this.rules.other.nextBulletRegex(G),Ge=this.rules.other.hrRegex(G),Ze=this.rules.other.fencesBeginRegex(G),jt=this.rules.other.headingBeginRegex(G),Sr=this.rules.other.htmlBeginRegex(G);for(;f;){const Et=f.split(`
26
+ `,1)[0];let Ye;if(_=Et,this.options.pedantic?(_=_.replace(this.rules.other.listReplaceNesting," "),Ye=_):Ye=_.replace(this.rules.other.tabCharGlobal," "),Ze.test(_)||jt.test(_)||Sr.test(_)||We.test(_)||Ge.test(_))break;if(Ye.search(this.rules.other.nonSpaceChar)>=G||!_.trim())w+=`
27
+ `+Ye.slice(G);else{if(ie||Z.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||Ze.test(Z)||jt.test(Z)||Ge.test(Z))break;w+=`
28
28
  `+_}!ie&&!_.trim()&&(ie=!0),x+=Et+`
29
- `,f=f.substring(Et.length+1),Z=Ye.slice(G)}}v.loose||(R?v.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(R=!0));let ve=null,Rt;this.options.gfm&&(ve=this.rules.other.listIsTask.exec(S),ve&&(Rt=ve[0]!=="[ ] ",S=S.replace(this.rules.other.listReplaceTask,""))),v.items.push({type:"list_item",raw:x,task:!!ve,checked:Rt,loose:!1,text:S,tokens:[]}),v.raw+=x}const k=v.items.at(-1);if(k)k.raw=k.raw.trimEnd(),k.text=k.text.trimEnd();else return;v.raw=v.raw.trimEnd();for(let T=0;T<v.items.length;T++)if(this.lexer.state.top=!1,v.items[T].tokens=this.lexer.blockTokens(v.items[T].text,[]),!v.loose){const x=v.items[T].tokens.filter(Z=>Z.type==="space"),S=x.length>0&&x.some(Z=>this.rules.other.anyLine.test(Z.raw));v.loose=S}if(v.loose)for(let T=0;T<v.items.length;T++)v.items[T].loose=!0;return v}}html(f){const i=this.rules.block.html.exec(f);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(f){const i=this.rules.block.def.exec(f);if(i){const d=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),g=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:d,raw:i[0],href:g,title:v}}}table(f){var R;const i=this.rules.block.table.exec(f);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const d=he(i[1]),g=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),v=(R=i[3])!=null&&R.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
29
+ `,f=f.substring(Et.length+1),Z=Ye.slice(G)}}v.loose||(R?v.loose=!0:this.rules.other.doubleBlankLine.test(x)&&(R=!0));let ve=null,Rt;this.options.gfm&&(ve=this.rules.other.listIsTask.exec(w),ve&&(Rt=ve[0]!=="[ ] ",w=w.replace(this.rules.other.listReplaceTask,""))),v.items.push({type:"list_item",raw:x,task:!!ve,checked:Rt,loose:!1,text:w,tokens:[]}),v.raw+=x}const k=v.items.at(-1);if(k)k.raw=k.raw.trimEnd(),k.text=k.text.trimEnd();else return;v.raw=v.raw.trimEnd();for(let T=0;T<v.items.length;T++)if(this.lexer.state.top=!1,v.items[T].tokens=this.lexer.blockTokens(v.items[T].text,[]),!v.loose){const x=v.items[T].tokens.filter(Z=>Z.type==="space"),w=x.length>0&&x.some(Z=>this.rules.other.anyLine.test(Z.raw));v.loose=w}if(v.loose)for(let T=0;T<v.items.length;T++)v.items[T].loose=!0;return v}}html(f){const i=this.rules.block.html.exec(f);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(f){const i=this.rules.block.def.exec(f);if(i){const d=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),g=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",v=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:d,raw:i[0],href:g,title:v}}}table(f){var R;const i=this.rules.block.table.exec(f);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;const d=he(i[1]),g=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),v=(R=i[3])!=null&&R.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
30
  `):[],y={type:"table",raw:i[0],header:[],align:[],rows:[]};if(d.length===g.length){for(const k of g)this.rules.other.tableAlignRight.test(k)?y.align.push("right"):this.rules.other.tableAlignCenter.test(k)?y.align.push("center"):this.rules.other.tableAlignLeft.test(k)?y.align.push("left"):y.align.push(null);for(let k=0;k<d.length;k++)y.header.push({text:d[k],tokens:this.lexer.inline(d[k]),header:!0,align:y.align[k]});for(const k of v)y.rows.push(he(k,y.header.length).map((T,x)=>({text:T,tokens:this.lexer.inline(T),header:!1,align:y.align[x]})));return y}}lheading(f){const i=this.rules.block.lheading.exec(f);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(f){const i=this.rules.block.paragraph.exec(f);if(i){const d=i[1].charAt(i[1].length-1)===`
31
- `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:d,tokens:this.lexer.inline(d)}}}text(f){const i=this.rules.block.text.exec(f);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(f){const i=this.rules.inline.escape.exec(f);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(f){const i=this.rules.inline.tag.exec(f);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(f){const i=this.rules.inline.link.exec(f);if(i){const d=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(d)){if(!this.rules.other.endAngleBracket.test(d))return;const y=Me(d.slice(0,-1),"\\");if((d.length-y.length)%2===0)return}else{const y=Vt(i[2],"()");if(y===-2)return;if(y>-1){const k=(i[0].indexOf("!")===0?5:4)+i[1].length+y;i[2]=i[2].substring(0,y),i[0]=i[0].substring(0,k).trim(),i[3]=""}}let g=i[2],v="";if(this.options.pedantic){const y=this.rules.other.pedanticHrefTitle.exec(g);y&&(g=y[1],v=y[3])}else v=i[3]?i[3].slice(1,-1):"";return g=g.trim(),this.rules.other.startAngleBracket.test(g)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(d)?g=g.slice(1):g=g.slice(1,-1)),vr(i,{href:g&&g.replace(this.rules.inline.anyPunctuation,"$1"),title:v&&v.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(f,i){let d;if((d=this.rules.inline.reflink.exec(f))||(d=this.rules.inline.nolink.exec(f))){const g=(d[2]||d[1]).replace(this.rules.other.multipleSpaceGlobal," "),v=i[g.toLowerCase()];if(!v){const y=d[0].charAt(0);return{type:"text",raw:y,text:y}}return vr(d,v,d[0],this.lexer,this.rules)}}emStrong(f,i,d=""){let g=this.rules.inline.emStrongLDelim.exec(f);if(!g||g[3]&&d.match(this.rules.other.unicodeAlphaNumeric))return;if(!(g[1]||g[2]||"")||!d||this.rules.inline.punctuation.exec(d)){const y=[...g[0]].length-1;let R,k,T=y,x=0;const S=g[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(S.lastIndex=0,i=i.slice(-1*f.length+y);(g=S.exec(i))!=null;){if(R=g[1]||g[2]||g[3]||g[4]||g[5]||g[6],!R)continue;if(k=[...R].length,g[3]||g[4]){T+=k;continue}else if((g[5]||g[6])&&y%3&&!((y+k)%3)){x+=k;continue}if(T-=k,T>0)continue;k=Math.min(k,k+T+x);const Z=[...g[0]][0].length,_=f.slice(0,y+g.index+Z+k);if(Math.min(y,k)%2){const G=_.slice(1,-1);return{type:"em",raw:_,text:G,tokens:this.lexer.inlineTokens(G)}}const ie=_.slice(2,-2);return{type:"strong",raw:_,text:ie,tokens:this.lexer.inlineTokens(ie)}}}}codespan(f){const i=this.rules.inline.code.exec(f);if(i){let d=i[2].replace(this.rules.other.newLineCharGlobal," ");const g=this.rules.other.nonSpaceChar.test(d),v=this.rules.other.startingSpaceChar.test(d)&&this.rules.other.endingSpaceChar.test(d);return g&&v&&(d=d.substring(1,d.length-1)),{type:"codespan",raw:i[0],text:d}}}br(f){const i=this.rules.inline.br.exec(f);if(i)return{type:"br",raw:i[0]}}del(f){const i=this.rules.inline.del.exec(f);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(f){const i=this.rules.inline.autolink.exec(f);if(i){let d,g;return i[2]==="@"?(d=i[1],g="mailto:"+d):(d=i[1],g=d),{type:"link",raw:i[0],text:d,href:g,tokens:[{type:"text",raw:d,text:d}]}}}url(f){var d;let i;if(i=this.rules.inline.url.exec(f)){let g,v;if(i[2]==="@")g=i[0],v="mailto:"+g;else{let y;do y=i[0],i[0]=((d=this.rules.inline._backpedal.exec(i[0]))==null?void 0:d[0])??"";while(y!==i[0]);g=i[0],i[1]==="www."?v="http://"+i[0]:v=i[0]}return{type:"link",raw:i[0],text:g,href:v,tokens:[{type:"text",raw:g,text:g}]}}}inlineText(f){const i=this.rules.inline.text.exec(f);if(i){const d=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:d}}}},Ie=class Ss{constructor(i){c(this,"tokens");c(this,"options");c(this,"state");c(this,"tokenizer");c(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||A,this.options.tokenizer=this.options.tokenizer||new dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const d={other:I,block:Fe.normal,inline:ut.normal};this.options.pedantic?(d.block=Fe.pedantic,d.inline=ut.pedantic):this.options.gfm&&(d.block=Fe.gfm,this.options.breaks?d.inline=ut.breaks:d.inline=ut.gfm),this.tokenizer.rules=d}static get rules(){return{block:Fe,inline:ut}}static lex(i,d){return new Ss(d).lex(i)}static lexInline(i,d){return new Ss(d).inlineTokens(i)}lex(i){i=i.replace(I.carriageReturn,`
31
+ `?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:d,tokens:this.lexer.inline(d)}}}text(f){const i=this.rules.block.text.exec(f);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(f){const i=this.rules.inline.escape.exec(f);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(f){const i=this.rules.inline.tag.exec(f);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(f){const i=this.rules.inline.link.exec(f);if(i){const d=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(d)){if(!this.rules.other.endAngleBracket.test(d))return;const y=Me(d.slice(0,-1),"\\");if((d.length-y.length)%2===0)return}else{const y=qt(i[2],"()");if(y===-2)return;if(y>-1){const k=(i[0].indexOf("!")===0?5:4)+i[1].length+y;i[2]=i[2].substring(0,y),i[0]=i[0].substring(0,k).trim(),i[3]=""}}let g=i[2],v="";if(this.options.pedantic){const y=this.rules.other.pedanticHrefTitle.exec(g);y&&(g=y[1],v=y[3])}else v=i[3]?i[3].slice(1,-1):"";return g=g.trim(),this.rules.other.startAngleBracket.test(g)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(d)?g=g.slice(1):g=g.slice(1,-1)),vr(i,{href:g&&g.replace(this.rules.inline.anyPunctuation,"$1"),title:v&&v.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(f,i){let d;if((d=this.rules.inline.reflink.exec(f))||(d=this.rules.inline.nolink.exec(f))){const g=(d[2]||d[1]).replace(this.rules.other.multipleSpaceGlobal," "),v=i[g.toLowerCase()];if(!v){const y=d[0].charAt(0);return{type:"text",raw:y,text:y}}return vr(d,v,d[0],this.lexer,this.rules)}}emStrong(f,i,d=""){let g=this.rules.inline.emStrongLDelim.exec(f);if(!g||g[3]&&d.match(this.rules.other.unicodeAlphaNumeric))return;if(!(g[1]||g[2]||"")||!d||this.rules.inline.punctuation.exec(d)){const y=[...g[0]].length-1;let R,k,T=y,x=0;const w=g[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(w.lastIndex=0,i=i.slice(-1*f.length+y);(g=w.exec(i))!=null;){if(R=g[1]||g[2]||g[3]||g[4]||g[5]||g[6],!R)continue;if(k=[...R].length,g[3]||g[4]){T+=k;continue}else if((g[5]||g[6])&&y%3&&!((y+k)%3)){x+=k;continue}if(T-=k,T>0)continue;k=Math.min(k,k+T+x);const Z=[...g[0]][0].length,_=f.slice(0,y+g.index+Z+k);if(Math.min(y,k)%2){const G=_.slice(1,-1);return{type:"em",raw:_,text:G,tokens:this.lexer.inlineTokens(G)}}const ie=_.slice(2,-2);return{type:"strong",raw:_,text:ie,tokens:this.lexer.inlineTokens(ie)}}}}codespan(f){const i=this.rules.inline.code.exec(f);if(i){let d=i[2].replace(this.rules.other.newLineCharGlobal," ");const g=this.rules.other.nonSpaceChar.test(d),v=this.rules.other.startingSpaceChar.test(d)&&this.rules.other.endingSpaceChar.test(d);return g&&v&&(d=d.substring(1,d.length-1)),{type:"codespan",raw:i[0],text:d}}}br(f){const i=this.rules.inline.br.exec(f);if(i)return{type:"br",raw:i[0]}}del(f){const i=this.rules.inline.del.exec(f);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(f){const i=this.rules.inline.autolink.exec(f);if(i){let d,g;return i[2]==="@"?(d=i[1],g="mailto:"+d):(d=i[1],g=d),{type:"link",raw:i[0],text:d,href:g,tokens:[{type:"text",raw:d,text:d}]}}}url(f){var d;let i;if(i=this.rules.inline.url.exec(f)){let g,v;if(i[2]==="@")g=i[0],v="mailto:"+g;else{let y;do y=i[0],i[0]=((d=this.rules.inline._backpedal.exec(i[0]))==null?void 0:d[0])??"";while(y!==i[0]);g=i[0],i[1]==="www."?v="http://"+i[0]:v=i[0]}return{type:"link",raw:i[0],text:g,href:v,tokens:[{type:"text",raw:g,text:g}]}}}inlineText(f){const i=this.rules.inline.text.exec(f);if(i){const d=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:d}}}},Ie=class ws{constructor(i){c(this,"tokens");c(this,"options");c(this,"state");c(this,"tokenizer");c(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=i||A,this.options.tokenizer=this.options.tokenizer||new dt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const d={other:I,block:Le.normal,inline:ut.normal};this.options.pedantic?(d.block=Le.pedantic,d.inline=ut.pedantic):this.options.gfm&&(d.block=Le.gfm,this.options.breaks?d.inline=ut.breaks:d.inline=ut.gfm),this.tokenizer.rules=d}static get rules(){return{block:Le,inline:ut}}static lex(i,d){return new ws(d).lex(i)}static lexInline(i,d){return new ws(d).inlineTokens(i)}lex(i){i=i.replace(I.carriageReturn,`
32
32
  `),this.blockTokens(i,this.tokens);for(let d=0;d<this.inlineQueue.length;d++){const g=this.inlineQueue[d];this.inlineTokens(g.src,g.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,d=[],g=!1){var v,y,R;for(this.options.pedantic&&(i=i.replace(I.tabCharGlobal," ").replace(I.spaceLine,""));i;){let k;if((y=(v=this.options.extensions)==null?void 0:v.block)!=null&&y.some(x=>(k=x.call({lexer:this},i,d))?(i=i.substring(k.raw.length),d.push(k),!0):!1))continue;if(k=this.tokenizer.space(i)){i=i.substring(k.raw.length);const x=d.at(-1);k.raw.length===1&&x!==void 0?x.raw+=`
33
33
  `:d.push(k);continue}if(k=this.tokenizer.code(i)){i=i.substring(k.raw.length);const x=d.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=`
34
34
  `+k.raw,x.text+=`
35
35
  `+k.text,this.inlineQueue.at(-1).src=x.text):d.push(k);continue}if(k=this.tokenizer.fences(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.heading(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.hr(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.blockquote(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.list(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.html(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.def(i)){i=i.substring(k.raw.length);const x=d.at(-1);(x==null?void 0:x.type)==="paragraph"||(x==null?void 0:x.type)==="text"?(x.raw+=`
36
36
  `+k.raw,x.text+=`
37
- `+k.raw,this.inlineQueue.at(-1).src=x.text):this.tokens.links[k.tag]||(this.tokens.links[k.tag]={href:k.href,title:k.title});continue}if(k=this.tokenizer.table(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.lheading(i)){i=i.substring(k.raw.length),d.push(k);continue}let T=i;if((R=this.options.extensions)!=null&&R.startBlock){let x=1/0;const S=i.slice(1);let Z;this.options.extensions.startBlock.forEach(_=>{Z=_.call({lexer:this},S),typeof Z=="number"&&Z>=0&&(x=Math.min(x,Z))}),x<1/0&&x>=0&&(T=i.substring(0,x+1))}if(this.state.top&&(k=this.tokenizer.paragraph(T))){const x=d.at(-1);g&&(x==null?void 0:x.type)==="paragraph"?(x.raw+=`
37
+ `+k.raw,this.inlineQueue.at(-1).src=x.text):this.tokens.links[k.tag]||(this.tokens.links[k.tag]={href:k.href,title:k.title});continue}if(k=this.tokenizer.table(i)){i=i.substring(k.raw.length),d.push(k);continue}if(k=this.tokenizer.lheading(i)){i=i.substring(k.raw.length),d.push(k);continue}let T=i;if((R=this.options.extensions)!=null&&R.startBlock){let x=1/0;const w=i.slice(1);let Z;this.options.extensions.startBlock.forEach(_=>{Z=_.call({lexer:this},w),typeof Z=="number"&&Z>=0&&(x=Math.min(x,Z))}),x<1/0&&x>=0&&(T=i.substring(0,x+1))}if(this.state.top&&(k=this.tokenizer.paragraph(T))){const x=d.at(-1);g&&(x==null?void 0:x.type)==="paragraph"?(x.raw+=`
38
38
  `+k.raw,x.text+=`
39
39
  `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):d.push(k),g=T.length!==i.length,i=i.substring(k.raw.length);continue}if(k=this.tokenizer.text(i)){i=i.substring(k.raw.length);const x=d.at(-1);(x==null?void 0:x.type)==="text"?(x.raw+=`
40
40
  `+k.raw,x.text+=`
41
- `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):d.push(k);continue}if(i){const x="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return this.state.top=!0,d}inline(i,d=[]){return this.inlineQueue.push({src:i,tokens:d}),d}inlineTokens(i,d=[]){var k,T,x;let g=i,v=null;if(this.tokens.links){const S=Object.keys(this.tokens.links);if(S.length>0)for(;(v=this.tokenizer.rules.inline.reflinkSearch.exec(g))!=null;)S.includes(v[0].slice(v[0].lastIndexOf("[")+1,-1))&&(g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(v=this.tokenizer.rules.inline.anyPunctuation.exec(g))!=null;)g=g.slice(0,v.index)+"++"+g.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(v=this.tokenizer.rules.inline.blockSkip.exec(g))!=null;)g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let y=!1,R="";for(;i;){y||(R=""),y=!1;let S;if((T=(k=this.options.extensions)==null?void 0:k.inline)!=null&&T.some(_=>(S=_.call({lexer:this},i,d))?(i=i.substring(S.raw.length),d.push(S),!0):!1))continue;if(S=this.tokenizer.escape(i)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.tag(i)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.link(i)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(S.raw.length);const _=d.at(-1);S.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=S.raw,_.text+=S.text):d.push(S);continue}if(S=this.tokenizer.emStrong(i,g,R)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.codespan(i)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.br(i)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.del(i)){i=i.substring(S.raw.length),d.push(S);continue}if(S=this.tokenizer.autolink(i)){i=i.substring(S.raw.length),d.push(S);continue}if(!this.state.inLink&&(S=this.tokenizer.url(i))){i=i.substring(S.raw.length),d.push(S);continue}let Z=i;if((x=this.options.extensions)!=null&&x.startInline){let _=1/0;const ie=i.slice(1);let G;this.options.extensions.startInline.forEach(ve=>{G=ve.call({lexer:this},ie),typeof G=="number"&&G>=0&&(_=Math.min(_,G))}),_<1/0&&_>=0&&(Z=i.substring(0,_+1))}if(S=this.tokenizer.inlineText(Z)){i=i.substring(S.raw.length),S.raw.slice(-1)!=="_"&&(R=S.raw.slice(-1)),y=!0;const _=d.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=S.raw,_.text+=S.text):d.push(S);continue}if(i){const _="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return d}},ne=class{constructor(f){c(this,"options");c(this,"parser");this.options=f||A}space(f){return""}code({text:f,lang:i,escaped:d}){var y;const g=(y=(i||"").match(I.notSpaceStart))==null?void 0:y[0],v=f.replace(I.endingNewline,"")+`
41
+ `+k.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=x.text):d.push(k);continue}if(i){const x="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(x);break}else throw new Error(x)}}return this.state.top=!0,d}inline(i,d=[]){return this.inlineQueue.push({src:i,tokens:d}),d}inlineTokens(i,d=[]){var k,T,x;let g=i,v=null;if(this.tokens.links){const w=Object.keys(this.tokens.links);if(w.length>0)for(;(v=this.tokenizer.rules.inline.reflinkSearch.exec(g))!=null;)w.includes(v[0].slice(v[0].lastIndexOf("[")+1,-1))&&(g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(v=this.tokenizer.rules.inline.anyPunctuation.exec(g))!=null;)g=g.slice(0,v.index)+"++"+g.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(v=this.tokenizer.rules.inline.blockSkip.exec(g))!=null;)g=g.slice(0,v.index)+"["+"a".repeat(v[0].length-2)+"]"+g.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let y=!1,R="";for(;i;){y||(R=""),y=!1;let w;if((T=(k=this.options.extensions)==null?void 0:k.inline)!=null&&T.some(_=>(w=_.call({lexer:this},i,d))?(i=i.substring(w.raw.length),d.push(w),!0):!1))continue;if(w=this.tokenizer.escape(i)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.tag(i)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.link(i)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(w.raw.length);const _=d.at(-1);w.type==="text"&&(_==null?void 0:_.type)==="text"?(_.raw+=w.raw,_.text+=w.text):d.push(w);continue}if(w=this.tokenizer.emStrong(i,g,R)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.codespan(i)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.br(i)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.del(i)){i=i.substring(w.raw.length),d.push(w);continue}if(w=this.tokenizer.autolink(i)){i=i.substring(w.raw.length),d.push(w);continue}if(!this.state.inLink&&(w=this.tokenizer.url(i))){i=i.substring(w.raw.length),d.push(w);continue}let Z=i;if((x=this.options.extensions)!=null&&x.startInline){let _=1/0;const ie=i.slice(1);let G;this.options.extensions.startInline.forEach(ve=>{G=ve.call({lexer:this},ie),typeof G=="number"&&G>=0&&(_=Math.min(_,G))}),_<1/0&&_>=0&&(Z=i.substring(0,_+1))}if(w=this.tokenizer.inlineText(Z)){i=i.substring(w.raw.length),w.raw.slice(-1)!=="_"&&(R=w.raw.slice(-1)),y=!0;const _=d.at(-1);(_==null?void 0:_.type)==="text"?(_.raw+=w.raw,_.text+=w.text):d.push(w);continue}if(i){const _="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(_);break}else throw new Error(_)}}return d}},ne=class{constructor(f){c(this,"options");c(this,"parser");this.options=f||A}space(f){return""}code({text:f,lang:i,escaped:d}){var y;const g=(y=(i||"").match(I.notSpaceStart))==null?void 0:y[0],v=f.replace(I.endingNewline,"")+`
42
42
  `;return g?'<pre><code class="language-'+$e(g)+'">'+(d?v:$e(v,!0))+`</code></pre>
43
43
  `:"<pre><code>"+(d?v:$e(v,!0))+`</code></pre>
44
44
  `}blockquote({tokens:f}){return`<blockquote>
@@ -56,10 +56,10 @@ ${this.parser.parse(f)}</blockquote>
56
56
  `}tablerow({text:f}){return`<tr>
57
57
  ${f}</tr>
58
58
  `}tablecell(f){const i=this.parser.parseInline(f.tokens),d=f.header?"th":"td";return(f.align?`<${d} align="${f.align}">`:`<${d}>`)+i+`</${d}>
59
- `}strong({tokens:f}){return`<strong>${this.parser.parseInline(f)}</strong>`}em({tokens:f}){return`<em>${this.parser.parseInline(f)}</em>`}codespan({text:f}){return`<code>${$e(f,!0)}</code>`}br(f){return"<br>"}del({tokens:f}){return`<del>${this.parser.parseInline(f)}</del>`}link({href:f,title:i,tokens:d}){const g=this.parser.parseInline(d),v=ht(f);if(v===null)return g;f=v;let y='<a href="'+f+'"';return i&&(y+=' title="'+$e(i)+'"'),y+=">"+g+"</a>",y}image({href:f,title:i,text:d,tokens:g}){g&&(d=this.parser.parseInline(g,this.parser.textRenderer));const v=ht(f);if(v===null)return $e(d);f=v;let y=`<img src="${f}" alt="${d}"`;return i&&(y+=` title="${$e(i)}"`),y+=">",y}text(f){return"tokens"in f&&f.tokens?this.parser.parseInline(f.tokens):"escaped"in f&&f.escaped?f.text:$e(f.text)}},at=class{strong({text:f}){return f}em({text:f}){return f}codespan({text:f}){return f}del({text:f}){return f}html({text:f}){return f}text({text:f}){return f}link({text:f}){return""+f}image({text:f}){return""+f}br(){return""}},Re=class ws{constructor(i){c(this,"options");c(this,"renderer");c(this,"textRenderer");this.options=i||A,this.options.renderer=this.options.renderer||new ne,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new at}static parse(i,d){return new ws(d).parse(i)}static parseInline(i,d){return new ws(d).parseInline(i)}parse(i,d=!0){var v,y;let g="";for(let R=0;R<i.length;R++){const k=i[R];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=k,S=this.options.extensions.renderers[x.type].call({parser:this},x);if(S!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(x.type)){g+=S||"";continue}}const T=k;switch(T.type){case"space":{g+=this.renderer.space(T);continue}case"hr":{g+=this.renderer.hr(T);continue}case"heading":{g+=this.renderer.heading(T);continue}case"code":{g+=this.renderer.code(T);continue}case"table":{g+=this.renderer.table(T);continue}case"blockquote":{g+=this.renderer.blockquote(T);continue}case"list":{g+=this.renderer.list(T);continue}case"html":{g+=this.renderer.html(T);continue}case"paragraph":{g+=this.renderer.paragraph(T);continue}case"text":{let x=T,S=this.renderer.text(x);for(;R+1<i.length&&i[R+1].type==="text";)x=i[++R],S+=`
60
- `+this.renderer.text(x);d?g+=this.renderer.paragraph({type:"paragraph",raw:S,text:S,tokens:[{type:"text",raw:S,text:S,escaped:!0}]}):g+=S;continue}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}parseInline(i,d=this.renderer){var v,y;let g="";for(let R=0;R<i.length;R++){const k=i[R];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=this.options.extensions.renderers[k.type].call({parser:this},k);if(x!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(k.type)){g+=x||"";continue}}const T=k;switch(T.type){case"escape":{g+=d.text(T);break}case"html":{g+=d.html(T);break}case"link":{g+=d.link(T);break}case"image":{g+=d.image(T);break}case"strong":{g+=d.strong(T);break}case"em":{g+=d.em(T);break}case"codespan":{g+=d.codespan(T);break}case"br":{g+=d.br(T);break}case"del":{g+=d.del(T);break}case"text":{g+=d.text(T);break}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}},qe=(je=class{constructor(f){c(this,"options");c(this,"block");this.options=f||A}preprocess(f){return f}postprocess(f){return f}processAllTokens(f){return f}provideLexer(){return this.block?Ie.lex:Ie.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},c(je,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),je),yr=class{constructor(...f){c(this,"defaults",$());c(this,"options",this.setOptions);c(this,"parse",this.parseMarkdown(!0));c(this,"parseInline",this.parseMarkdown(!1));c(this,"Parser",Re);c(this,"Renderer",ne);c(this,"TextRenderer",at);c(this,"Lexer",Ie);c(this,"Tokenizer",dt);c(this,"Hooks",qe);this.use(...f)}walkTokens(f,i){var g,v;let d=[];for(const y of f)switch(d=d.concat(i.call(this,y)),y.type){case"table":{const R=y;for(const k of R.header)d=d.concat(this.walkTokens(k.tokens,i));for(const k of R.rows)for(const T of k)d=d.concat(this.walkTokens(T.tokens,i));break}case"list":{const R=y;d=d.concat(this.walkTokens(R.items,i));break}default:{const R=y;(v=(g=this.defaults.extensions)==null?void 0:g.childTokens)!=null&&v[R.type]?this.defaults.extensions.childTokens[R.type].forEach(k=>{const T=R[k].flat(1/0);d=d.concat(this.walkTokens(T,i))}):R.tokens&&(d=d.concat(this.walkTokens(R.tokens,i)))}}return d}use(...f){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return f.forEach(d=>{const g={...d};if(g.async=this.defaults.async||g.async||!1,d.extensions&&(d.extensions.forEach(v=>{if(!v.name)throw new Error("extension name required");if("renderer"in v){const y=i.renderers[v.name];y?i.renderers[v.name]=function(...R){let k=v.renderer.apply(this,R);return k===!1&&(k=y.apply(this,R)),k}:i.renderers[v.name]=v.renderer}if("tokenizer"in v){if(!v.level||v.level!=="block"&&v.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=i[v.level];y?y.unshift(v.tokenizer):i[v.level]=[v.tokenizer],v.start&&(v.level==="block"?i.startBlock?i.startBlock.push(v.start):i.startBlock=[v.start]:v.level==="inline"&&(i.startInline?i.startInline.push(v.start):i.startInline=[v.start]))}"childTokens"in v&&v.childTokens&&(i.childTokens[v.name]=v.childTokens)}),g.extensions=i),d.renderer){const v=this.defaults.renderer||new ne(this.defaults);for(const y in d.renderer){if(!(y in v))throw new Error(`renderer '${y}' does not exist`);if(["options","parser"].includes(y))continue;const R=y,k=d.renderer[R],T=v[R];v[R]=(...x)=>{let S=k.apply(v,x);return S===!1&&(S=T.apply(v,x)),S||""}}g.renderer=v}if(d.tokenizer){const v=this.defaults.tokenizer||new dt(this.defaults);for(const y in d.tokenizer){if(!(y in v))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const R=y,k=d.tokenizer[R],T=v[R];v[R]=(...x)=>{let S=k.apply(v,x);return S===!1&&(S=T.apply(v,x)),S}}g.tokenizer=v}if(d.hooks){const v=this.defaults.hooks||new qe;for(const y in d.hooks){if(!(y in v))throw new Error(`hook '${y}' does not exist`);if(["options","block"].includes(y))continue;const R=y,k=d.hooks[R],T=v[R];qe.passThroughHooks.has(y)?v[R]=x=>{if(this.defaults.async)return Promise.resolve(k.call(v,x)).then(Z=>T.call(v,Z));const S=k.call(v,x);return T.call(v,S)}:v[R]=(...x)=>{let S=k.apply(v,x);return S===!1&&(S=T.apply(v,x)),S}}g.hooks=v}if(d.walkTokens){const v=this.defaults.walkTokens,y=d.walkTokens;g.walkTokens=function(R){let k=[];return k.push(y.call(this,R)),v&&(k=k.concat(v.call(this,R))),k}}this.defaults={...this.defaults,...g}}),this}setOptions(f){return this.defaults={...this.defaults,...f},this}lexer(f,i){return Ie.lex(f,i??this.defaults)}parser(f,i){return Re.parse(f,i??this.defaults)}parseMarkdown(f){return(d,g)=>{const v={...g},y={...this.defaults,...v},R=this.onError(!!y.silent,!!y.async);if(this.defaults.async===!0&&v.async===!1)return R(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof d>"u"||d===null)return R(new Error("marked(): input parameter is undefined or null"));if(typeof d!="string")return R(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(d)+", string expected"));y.hooks&&(y.hooks.options=y,y.hooks.block=f);const k=y.hooks?y.hooks.provideLexer():f?Ie.lex:Ie.lexInline,T=y.hooks?y.hooks.provideParser():f?Re.parse:Re.parseInline;if(y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(d):d).then(x=>k(x,y)).then(x=>y.hooks?y.hooks.processAllTokens(x):x).then(x=>y.walkTokens?Promise.all(this.walkTokens(x,y.walkTokens)).then(()=>x):x).then(x=>T(x,y)).then(x=>y.hooks?y.hooks.postprocess(x):x).catch(R);try{y.hooks&&(d=y.hooks.preprocess(d));let x=k(d,y);y.hooks&&(x=y.hooks.processAllTokens(x)),y.walkTokens&&this.walkTokens(x,y.walkTokens);let S=T(x,y);return y.hooks&&(S=y.hooks.postprocess(S)),S}catch(x){return R(x)}}}onError(f,i){return d=>{if(d.message+=`
61
- Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An error occurred:</p><pre>"+$e(d.message+"",!0)+"</pre>";return i?Promise.resolve(g):g}if(i)return Promise.reject(d);throw d}}},Ve=new yr;function W(f,i){return Ve.parse(f,i)}W.options=W.setOptions=function(f){return Ve.setOptions(f),W.defaults=Ve.defaults,N(W.defaults),W},W.getDefaults=$,W.defaults=A,W.use=function(...f){return Ve.use(...f),W.defaults=Ve.defaults,N(W.defaults),W},W.walkTokens=function(f,i){return Ve.walkTokens(f,i)},W.parseInline=Ve.parseInline,W.Parser=Re,W.parser=Re.parse,W.Renderer=ne,W.TextRenderer=at,W.Lexer=Ie,W.lexer=Ie.lex,W.Tokenizer=dt,W.Hooks=qe,W.parse=W;var kr=W.options,vs=W.setOptions,Cr=W.use,oe=W.walkTokens,xr=W.parseInline,ce=W,Sr=Re.parse,re=Ie.lex;return s!=e&&(a.exports=e),a.exports})})(ha);const Bo=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"summary","");c(this,"isLoading",!1);c(this,"isSummaryNotEnabled",!1);c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){e.store.setState({hasSummaryBox:!0}),this.unsubscribe=e.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(e){this.isLoading=e.isSummaryLoading,this.isSummaryNotEnabled=e.isSummaryNotEnabled,this.summary=this.sanitizeMarkdown(e.summary),this.updateContentElement(e.summary)}sanitizeMarkdown(e){return Qs.sanitize(ha.exports.marked.parse(e))}updateContentElement(e){var a;const s=(a=this.hostElement)==null?void 0:a.querySelector(".searchcraft-summary-box-content");s&&(s.innerHTML=this.sanitizeMarkdown(e))}renderContent(){return this.isLoading?m("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?m("div",{class:"searchcraft-summary-box-content"},"AI summaries are not enabled"):m("div",{class:"searchcraft-summary-box-content"},this.summary)}render(){return m("div",{key:"c88d0bf7e12ad0fa0c019d207854a6e92babc683",class:"searchcraft-summary-box"},this.renderContent())}},[0,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function qo(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(t=>{switch(t){case"searchcraft-summary-box":customElements.get(t)||customElements.define(t,Bo);break;case"searchcraft-loading":customElements.get(t)||na();break}})}const Vo=qo,jo=`[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:8px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);gap:8px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:flex}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:flex}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input.searchcraft-placeholder-hide-on-focus:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;width:0}.searchcraft-popover-form-cancel-button{background:none;border:none;cursor:pointer;font-size:14px}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-modal-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view{flex-grow:1;flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{border-radius:var(--sc-border-radius-2xl);inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-modal-cancel-button{padding:8px 12px}}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-cancel-button{border-radius:var(--sc-border-radius-lg);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-fullscreen-cancel-button{padding:8px 12px}}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 24px}@media(min-width: 576px){.searchcraft-popover-footer{padding:20px 32px}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%;margin-top:4px}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px}.searchcraft-slider-range .searchcraft-slider-input:focus::-webkit-slider-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-range .searchcraft-slider-input:focus::-moz-range-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);justify-content:space-between;margin-top:4px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}.searchcraft-summary-box{padding:20px;border-radius:var(--sc-border-radius);background-color:var(--sc-surface-neutral-secondary);position:relative;min-height:200px;color:var(--sc-content-neutral-primary);font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-summary-box h1,.searchcraft-summary-box h2,.searchcraft-summary-box h3,.searchcraft-summary-box h4,.searchcraft-summary-box h5{padding-top:10px;padding-bottom:10px}.searchcraft-summary-box p{padding-bottom:10px}.searchcraft-summary-box img{max-width:200px}.searchcraft-summary-box ol,.searchcraft-summary-box ul{padding-left:1em;padding-bottom:10px}.searchcraft-summary-box a{color:var(--sc-content-brand)}.searchcraft-loading-label{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin-top:40px;letter-spacing:2px;color:#828282;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-loading-bars{margin:0 auto;width:60px;height:50px;text-align:center;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);display:flex;gap:2px}.searchcraft-loading-bars>div{height:100%;width:8px;-webkit-animation:delay .8s infinite ease-in-out;animation:delay .8s infinite ease-in-out;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-1{background-color:var(--sc-surface-brand-primary);opacity:.1}.searchcraft-loading-bars .searchcraft-loading-bar-2{background-color:var(--sc-surface-brand-primary);animation-delay:-0.7s;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-3{background-color:var(--sc-surface-brand-primary);animation-delay:-0.6s;opacity:.3}.searchcraft-loading-bars .searchcraft-loading-bar-4{background-color:var(--sc-surface-brand-primary);animation-delay:-0.5s;opacity:.4}.searchcraft-loading-bars .searchcraft-loading-bar-5{background-color:var(--sc-surface-brand-primary);animation-delay:-0.4s;opacity:.5}.searchcraft-loading-bars .searchcraft-loading-bar-6{background-color:var(--sc-surface-brand-primary);animation-delay:-0.3s;opacity:.6}@keyframes delay{0%,40%,100%{transform:scaleY(0.05)}20%{transform:scaleY(1)}}/*# sourceMappingURL=hologram.css.map */
62
- `,Wo=ee(class extends J{constructor(){super(),this.__registerHost()}render(){return m("style",{key:"ef26626cdfa4fa98d516802d71443c49a9c6ecf9"},jo)}},[0,"searchcraft-theme"]);function Go(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,Wo);break}})}const Zo=Go,Yo=sa,da=()=>{Vn(),Wn(),Zn(),Kn(),oo(),lo(),uo(),fo(),go(),yo(),Co(),Ro(),Eo(),To(),Io(),Ao(),zo(),Lo(),Ho(),Uo(),Vo(),Zo(),Yo()};globalThis.__scDefineCustomElements__=da;var me;(function(r){r[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r[r.NONE=4]="NONE"})(me||(me={}));class Qo{constructor(t){c(this,"logLevel");c(this,"logFormatter");this.logLevel=t.logLevel||me.INFO,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,e){return`[${me[t]}] ${new Date().toISOString()}: ${e}`}debug(t){this.logLevel<=me.DEBUG&&console.log(this.logFormatter(me.DEBUG,t))}info(t){this.logLevel<=me.INFO&&console.info(this.logFormatter(me.INFO,t))}warn(t){this.logLevel<=me.WARN&&console.warn(this.logFormatter(me.WARN,t))}error(t){this.logLevel<=me.ERROR&&console.error(this.logFormatter(me.ERROR,t))}log(t,e){switch(t){case me.DEBUG:this.debug(e);break;case me.INFO:this.info(e);break;case me.WARN:this.warn(e);break;case me.ERROR:this.error(e);break}}}const nr=new Qo({logLevel:me.NONE});function He(r,t,e,s){return new(e||(e=Promise))(function(a,o){function n(l){try{u(s.next(l))}catch(p){o(p)}}function h(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){var p;l.done?a(l.value):(p=l.value,p instanceof e?p:new e(function(C){C(p)})).then(n,h)}u((s=s.apply(r,[])).next())})}function Ue(r,t){var e,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function h(u){return function(l){return function(p){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,p[0]&&(n=0)),n;)try{if(e=1,s&&(a=2&p[0]?s.return:p[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,p[1])).done)return a;switch(s=0,a&&(p=[2&p[0],a.value]),p[0]){case 0:case 1:a=p;break;case 4:return n.label++,{value:p[1],done:!1};case 5:n.label++,s=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||p[0]!==6&&p[0]!==2)){n=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){n.label=p[1];break}if(p[0]===6&&n.label<a[1]){n.label=a[1],a=p;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(p);break}a[2]&&n.ops.pop(),n.trys.pop();continue}p=t.call(r,n)}catch(C){p=[6,C],s=0}finally{e=a=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([u,l])}}}typeof SuppressedError=="function"&&SuppressedError;var Be={exclude:[]},fa={},Ko={timeout:"true"},_e=function(r,t){typeof window<"u"&&(fa[r]=t)},Xo=function(){return Object.fromEntries(Object.entries(fa).filter(function(r){var t,e=r[0];return!(!((t=Be==null?void 0:Be.exclude)===null||t===void 0)&&t.includes(e))}).map(function(r){return[r[0],(0,r[1])()]}))};function or(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var be=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Pe(r,t){return r<<t|r>>>32-t}function Wr(r,t){var e;if(t===void 0&&(t=0),t=t?0|t:0,typeof r=="string"&&(e=r,r=new TextEncoder().encode(e).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var s=new Uint32Array([t,t,t,t]);(function(o,n){for(var h=o.byteLength/16|0,u=new Uint32Array(o,0,4*h),l=0;l<h;l++){var p=u.subarray(4*l,4*(l+1));p[0]=Math.imul(p[0],be[0]),p[0]=Pe(p[0],15),p[0]=Math.imul(p[0],be[1]),n[0]=n[0]^p[0],n[0]=Pe(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,p[1]=Math.imul(p[1],be[1]),p[1]=Pe(p[1],16),p[1]=Math.imul(p[1],be[2]),n[1]=n[1]^p[1],n[1]=Pe(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,p[2]=Math.imul(p[2],be[2]),p[2]=Pe(p[2],17),p[2]=Math.imul(p[2],be[3]),n[2]=n[2]^p[2],n[2]=Pe(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,p[3]=Math.imul(p[3],be[3]),p[3]=Pe(p[3],18),p[3]=Math.imul(p[3],be[0]),n[3]=n[3]^p[3],n[3]=Pe(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(r,s),function(o,n){var h=o.byteLength/16|0,u=o.byteLength%16,l=new Uint32Array(4),p=new Uint8Array(o,16*h,u);switch(u){case 15:l[3]=l[3]^p[14]<<16;case 14:l[3]=l[3]^p[13]<<8;case 13:l[3]=l[3]^p[12]<<0,l[3]=Math.imul(l[3],be[3]),l[3]=Pe(l[3],18),l[3]=Math.imul(l[3],be[0]),n[3]=n[3]^l[3];case 12:l[2]=l[2]^p[11]<<24;case 11:l[2]=l[2]^p[10]<<16;case 10:l[2]=l[2]^p[9]<<8;case 9:l[2]=l[2]^p[8]<<0,l[2]=Math.imul(l[2],be[2]),l[2]=Pe(l[2],17),l[2]=Math.imul(l[2],be[3]),n[2]=n[2]^l[2];case 8:l[1]=l[1]^p[7]<<24;case 7:l[1]=l[1]^p[6]<<16;case 6:l[1]=l[1]^p[5]<<8;case 5:l[1]=l[1]^p[4]<<0,l[1]=Math.imul(l[1],be[1]),l[1]=Pe(l[1],16),l[1]=Math.imul(l[1],be[2]),n[1]=n[1]^l[1];case 4:l[0]=l[0]^p[3]<<24;case 3:l[0]=l[0]^p[2]<<16;case 2:l[0]=l[0]^p[1]<<8;case 1:l[0]=l[0]^p[0]<<0,l[0]=Math.imul(l[0],be[0]),l[0]=Pe(l[0],15),l[0]=Math.imul(l[0],be[1]),n[0]=n[0]^l[0]}}(r,s),function(o,n){n[0]=n[0]^o.byteLength,n[1]=n[1]^o.byteLength,n[2]=n[2]^o.byteLength,n[3]=n[3]^o.byteLength,n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0,n[0]=or(n[0]),n[1]=or(n[1]),n[2]=or(n[2]),n[3]=or(n[3]),n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0}(r,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Jo(r,t){return new Promise(function(e){setTimeout(function(){return e(t)},r)})}function ei(r,t,e){return Promise.all(r.map(function(s){return Promise.race([s,Jo(t,e)])}))}function ti(){return He(this,void 0,void 0,function(){var r,t,e,s,a;return Ue(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=Xo(),t=Object.keys(r),[4,ei(Object.values(r),(Be==null?void 0:Be.timeout)||1e3,Ko)];case 1:return e=o.sent(),s=e.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,h){a[t[h]]=n}),[2,pa(a,Be.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function pa(r,t){var e={},s=function(o){if(r.hasOwnProperty(o)){var n=r[o];if(typeof n!="object"||Array.isArray(n))t.includes(o)||(e[o]=n);else{var h=pa(n,t.map(function(u){return u.startsWith(o+".")?u.slice(o.length+1):u}));Object.keys(h).length>0&&(e[o]=h)}}};for(var a in r)s(a);return e}function ri(r){return He(this,void 0,void 0,function(){var t,e;return Ue(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,ti()];case 1:return t=s.sent(),e=Wr(JSON.stringify(t)),[2,e.toString()];case 2:throw s.sent();case 3:return[2]}})})}function si(r){for(var t=0,e=0;e<r.length;++e)t+=Math.abs(r[e]);return t}function ma(r,t,e){for(var s=[],a=0;a<r[0].data.length;a++){for(var o=[],n=0;n<r.length;n++)o.push(r[n].data[a]);s.push(ai(o))}var h=new Uint8ClampedArray(s);return new ImageData(h,t,e)}function ai(r){if(r.length===0)return 0;for(var t={},e=0,s=r;e<s.length;e++)t[o=s[e]]=(t[o]||0)+1;var a=r[0];for(var o in t)t[o]>t[a]&&(a=parseInt(o,10));return a}function Ot(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var r=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},e=0,s=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];e<s.length;e++){var a=s[e],o=r.match(a);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}_e("audio",function(){return He(this,void 0,void 0,function(){return Ue(this,function(r){return[2,new Promise(function(t,e){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,h=s.createDynamicsCompressor();h.threshold.value=-50,h.knee.value=40,h.ratio.value=12,h.attack.value=0,h.release.value=.2,o.connect(h),h.connect(s.destination),o.start(),s.oncomplete=function(u){n=u.renderedBuffer.getChannelData(0),t({sampleHash:si(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),e(u)}})]})})});var ni=Ot().name!=="SamsungBrowser"?1:3,ga=280,ba=20;Ot().name!="Firefox"&&_e("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(r){var t=Array.from({length:ni},function(){return function(){var e=document.createElement("canvas"),s=e.getContext("2d");if(!s)return new ImageData(1,1);e.width=ga,e.height=ba;var a=s.createLinearGradient(0,0,e.width,e.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),s.fillStyle=a,s.fillRect(0,0,e.width,e.height);var o="Random Text WMwmil10Oo";s.font="23.123px Arial",s.fillStyle="black",s.fillText(o,-5,15),s.fillStyle="rgba(0, 0, 255, 0.5)",s.fillText(o,-3.3,17.7),s.beginPath(),s.moveTo(0,0),s.lineTo(2*e.width/7,e.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,e.width,e.height);return n}()});r({commonImageDataHash:Wr(ma(t,ga,ba).data.toString()).toString()})})});var Gr,oi=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],ii=["monospace","sans-serif","serif"];function va(r,t){if(!r)throw new Error("Canvas context not supported");return r.font="72px ".concat(t),r.measureText("WwMmLli0Oo").width}function ci(){var r,t=document.createElement("canvas"),e=(r=t.getContext("webgl"))!==null&&r!==void 0?r:t.getContext("experimental-webgl");if(e&&"getParameter"in e)try{var s=(e.getParameter(e.VENDOR)||"").toString(),a=(e.getParameter(e.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(e.getParameter(e.VERSION)||"").toString(),shadingLanguageVersion:(e.getParameter(e.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=e.getExtension("WEBGL_debug_renderer_info");if(n){var h=(e.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(e.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();h&&(o.vendorUnmasked=h),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function li(){var r=new Float32Array(1),t=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],t[3]}function ui(r,t){var e={};return t.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(l){var p=String(l);n[p]=(n[p]||0)+1});var h=o[0],u=1;return Object.keys(n).forEach(function(l){n[l]>u&&(h=l,u=n[l])}),h}(r.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(e[s]=a)}),e}function hi(){var r=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(e){t[e].forEach(function(s){matchMedia("(".concat(e,": ").concat(s,")")).matches&&r.push("".concat(e,": ").concat(s))})}),r}function di(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var r=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(r(t))return t}catch{return 0}return 0}Ot().name!="Firefox"&&_e("fonts",function(){var r=this;return new Promise(function(t,e){try{(function(s){var a;He(this,void 0,void 0,function(){var o,n,h;return Ue(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(l=50,new Promise(function(C){return setTimeout(C,l,p)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=o.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(h=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:h}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var l,p})})})(function(s){var a=s.iframe;return He(r,void 0,void 0,function(){var o,n,h,u;return Ue(this,function(l){return o=a.createElement("canvas"),n=o.getContext("2d"),h=ii.map(function(p){return va(n,p)}),u={},oi.forEach(function(p){var C=va(n,p);h.includes(C)||(u[p]=C)}),t(u),[2]})})})}catch{e({error:"unsupported"})}})}),_e("hardware",function(){return new Promise(function(r,t){var e=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:ci(),architecture:li(),deviceMemory:e.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),_e("locales",function(){return new Promise(function(r){r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),_e("permissions",function(){return He(this,void 0,void 0,function(){var r;return Ue(this,function(t){return Gr=(Be==null?void 0:Be.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],r=Array.from({length:(Be==null?void 0:Be.retries)||3},function(){return function(){return He(this,void 0,void 0,function(){var e,s,a,o,n;return Ue(this,function(h){switch(h.label){case 0:e={},s=0,a=Gr,h.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],h.label=2;case 2:return h.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=h.sent(),e[o]=n.state.toString(),[3,5];case 4:return h.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,e]}})})}()}),[2,Promise.all(r).then(function(e){return ui(e,Gr)})]})})}),_e("plugins",function(){var r=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var e=navigator.plugins[t];r.push([e.name,e.filename,e.description].join("|"))}return new Promise(function(s){s({plugins:r})})}),_e("screen",function(){return new Promise(function(r){r({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:hi()})})}),_e("system",function(){return new Promise(function(r){var t=Ot();r({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:di()})})});var ke,fi=Ot().name!=="SamsungBrowser"?1:3,F=null;_e("webgl",function(){return He(this,void 0,void 0,function(){var r;return Ue(this,function(t){typeof document<"u"&&((ke=document.createElement("canvas")).width=200,ke.height=100,F=ke.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return r=Array.from({length:fi},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var e=`
59
+ `}strong({tokens:f}){return`<strong>${this.parser.parseInline(f)}</strong>`}em({tokens:f}){return`<em>${this.parser.parseInline(f)}</em>`}codespan({text:f}){return`<code>${$e(f,!0)}</code>`}br(f){return"<br>"}del({tokens:f}){return`<del>${this.parser.parseInline(f)}</del>`}link({href:f,title:i,tokens:d}){const g=this.parser.parseInline(d),v=ht(f);if(v===null)return g;f=v;let y='<a href="'+f+'"';return i&&(y+=' title="'+$e(i)+'"'),y+=">"+g+"</a>",y}image({href:f,title:i,text:d,tokens:g}){g&&(d=this.parser.parseInline(g,this.parser.textRenderer));const v=ht(f);if(v===null)return $e(d);f=v;let y=`<img src="${f}" alt="${d}"`;return i&&(y+=` title="${$e(i)}"`),y+=">",y}text(f){return"tokens"in f&&f.tokens?this.parser.parseInline(f.tokens):"escaped"in f&&f.escaped?f.text:$e(f.text)}},at=class{strong({text:f}){return f}em({text:f}){return f}codespan({text:f}){return f}del({text:f}){return f}html({text:f}){return f}text({text:f}){return f}link({text:f}){return""+f}image({text:f}){return""+f}br(){return""}},Re=class Ss{constructor(i){c(this,"options");c(this,"renderer");c(this,"textRenderer");this.options=i||A,this.options.renderer=this.options.renderer||new ne,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new at}static parse(i,d){return new Ss(d).parse(i)}static parseInline(i,d){return new Ss(d).parseInline(i)}parse(i,d=!0){var v,y;let g="";for(let R=0;R<i.length;R++){const k=i[R];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=k,w=this.options.extensions.renderers[x.type].call({parser:this},x);if(w!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(x.type)){g+=w||"";continue}}const T=k;switch(T.type){case"space":{g+=this.renderer.space(T);continue}case"hr":{g+=this.renderer.hr(T);continue}case"heading":{g+=this.renderer.heading(T);continue}case"code":{g+=this.renderer.code(T);continue}case"table":{g+=this.renderer.table(T);continue}case"blockquote":{g+=this.renderer.blockquote(T);continue}case"list":{g+=this.renderer.list(T);continue}case"html":{g+=this.renderer.html(T);continue}case"paragraph":{g+=this.renderer.paragraph(T);continue}case"text":{let x=T,w=this.renderer.text(x);for(;R+1<i.length&&i[R+1].type==="text";)x=i[++R],w+=`
60
+ `+this.renderer.text(x);d?g+=this.renderer.paragraph({type:"paragraph",raw:w,text:w,tokens:[{type:"text",raw:w,text:w,escaped:!0}]}):g+=w;continue}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}parseInline(i,d=this.renderer){var v,y;let g="";for(let R=0;R<i.length;R++){const k=i[R];if((y=(v=this.options.extensions)==null?void 0:v.renderers)!=null&&y[k.type]){const x=this.options.extensions.renderers[k.type].call({parser:this},k);if(x!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(k.type)){g+=x||"";continue}}const T=k;switch(T.type){case"escape":{g+=d.text(T);break}case"html":{g+=d.html(T);break}case"link":{g+=d.link(T);break}case"image":{g+=d.image(T);break}case"strong":{g+=d.strong(T);break}case"em":{g+=d.em(T);break}case"codespan":{g+=d.codespan(T);break}case"br":{g+=d.br(T);break}case"del":{g+=d.del(T);break}case"text":{g+=d.text(T);break}default:{const x='Token with "'+T.type+'" type was not found.';if(this.options.silent)return console.error(x),"";throw new Error(x)}}}return g}},Ve=(je=class{constructor(f){c(this,"options");c(this,"block");this.options=f||A}preprocess(f){return f}postprocess(f){return f}processAllTokens(f){return f}provideLexer(){return this.block?Ie.lex:Ie.lexInline}provideParser(){return this.block?Re.parse:Re.parseInline}},c(je,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),je),yr=class{constructor(...f){c(this,"defaults",$());c(this,"options",this.setOptions);c(this,"parse",this.parseMarkdown(!0));c(this,"parseInline",this.parseMarkdown(!1));c(this,"Parser",Re);c(this,"Renderer",ne);c(this,"TextRenderer",at);c(this,"Lexer",Ie);c(this,"Tokenizer",dt);c(this,"Hooks",Ve);this.use(...f)}walkTokens(f,i){var g,v;let d=[];for(const y of f)switch(d=d.concat(i.call(this,y)),y.type){case"table":{const R=y;for(const k of R.header)d=d.concat(this.walkTokens(k.tokens,i));for(const k of R.rows)for(const T of k)d=d.concat(this.walkTokens(T.tokens,i));break}case"list":{const R=y;d=d.concat(this.walkTokens(R.items,i));break}default:{const R=y;(v=(g=this.defaults.extensions)==null?void 0:g.childTokens)!=null&&v[R.type]?this.defaults.extensions.childTokens[R.type].forEach(k=>{const T=R[k].flat(1/0);d=d.concat(this.walkTokens(T,i))}):R.tokens&&(d=d.concat(this.walkTokens(R.tokens,i)))}}return d}use(...f){const i=this.defaults.extensions||{renderers:{},childTokens:{}};return f.forEach(d=>{const g={...d};if(g.async=this.defaults.async||g.async||!1,d.extensions&&(d.extensions.forEach(v=>{if(!v.name)throw new Error("extension name required");if("renderer"in v){const y=i.renderers[v.name];y?i.renderers[v.name]=function(...R){let k=v.renderer.apply(this,R);return k===!1&&(k=y.apply(this,R)),k}:i.renderers[v.name]=v.renderer}if("tokenizer"in v){if(!v.level||v.level!=="block"&&v.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const y=i[v.level];y?y.unshift(v.tokenizer):i[v.level]=[v.tokenizer],v.start&&(v.level==="block"?i.startBlock?i.startBlock.push(v.start):i.startBlock=[v.start]:v.level==="inline"&&(i.startInline?i.startInline.push(v.start):i.startInline=[v.start]))}"childTokens"in v&&v.childTokens&&(i.childTokens[v.name]=v.childTokens)}),g.extensions=i),d.renderer){const v=this.defaults.renderer||new ne(this.defaults);for(const y in d.renderer){if(!(y in v))throw new Error(`renderer '${y}' does not exist`);if(["options","parser"].includes(y))continue;const R=y,k=d.renderer[R],T=v[R];v[R]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w||""}}g.renderer=v}if(d.tokenizer){const v=this.defaults.tokenizer||new dt(this.defaults);for(const y in d.tokenizer){if(!(y in v))throw new Error(`tokenizer '${y}' does not exist`);if(["options","rules","lexer"].includes(y))continue;const R=y,k=d.tokenizer[R],T=v[R];v[R]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w}}g.tokenizer=v}if(d.hooks){const v=this.defaults.hooks||new Ve;for(const y in d.hooks){if(!(y in v))throw new Error(`hook '${y}' does not exist`);if(["options","block"].includes(y))continue;const R=y,k=d.hooks[R],T=v[R];Ve.passThroughHooks.has(y)?v[R]=x=>{if(this.defaults.async)return Promise.resolve(k.call(v,x)).then(Z=>T.call(v,Z));const w=k.call(v,x);return T.call(v,w)}:v[R]=(...x)=>{let w=k.apply(v,x);return w===!1&&(w=T.apply(v,x)),w}}g.hooks=v}if(d.walkTokens){const v=this.defaults.walkTokens,y=d.walkTokens;g.walkTokens=function(R){let k=[];return k.push(y.call(this,R)),v&&(k=k.concat(v.call(this,R))),k}}this.defaults={...this.defaults,...g}}),this}setOptions(f){return this.defaults={...this.defaults,...f},this}lexer(f,i){return Ie.lex(f,i??this.defaults)}parser(f,i){return Re.parse(f,i??this.defaults)}parseMarkdown(f){return(d,g)=>{const v={...g},y={...this.defaults,...v},R=this.onError(!!y.silent,!!y.async);if(this.defaults.async===!0&&v.async===!1)return R(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof d>"u"||d===null)return R(new Error("marked(): input parameter is undefined or null"));if(typeof d!="string")return R(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(d)+", string expected"));y.hooks&&(y.hooks.options=y,y.hooks.block=f);const k=y.hooks?y.hooks.provideLexer():f?Ie.lex:Ie.lexInline,T=y.hooks?y.hooks.provideParser():f?Re.parse:Re.parseInline;if(y.async)return Promise.resolve(y.hooks?y.hooks.preprocess(d):d).then(x=>k(x,y)).then(x=>y.hooks?y.hooks.processAllTokens(x):x).then(x=>y.walkTokens?Promise.all(this.walkTokens(x,y.walkTokens)).then(()=>x):x).then(x=>T(x,y)).then(x=>y.hooks?y.hooks.postprocess(x):x).catch(R);try{y.hooks&&(d=y.hooks.preprocess(d));let x=k(d,y);y.hooks&&(x=y.hooks.processAllTokens(x)),y.walkTokens&&this.walkTokens(x,y.walkTokens);let w=T(x,y);return y.hooks&&(w=y.hooks.postprocess(w)),w}catch(x){return R(x)}}}onError(f,i){return d=>{if(d.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An error occurred:</p><pre>"+$e(d.message+"",!0)+"</pre>";return i?Promise.resolve(g):g}if(i)return Promise.reject(d);throw d}}},qe=new yr;function W(f,i){return qe.parse(f,i)}W.options=W.setOptions=function(f){return qe.setOptions(f),W.defaults=qe.defaults,N(W.defaults),W},W.getDefaults=$,W.defaults=A,W.use=function(...f){return qe.use(...f),W.defaults=qe.defaults,N(W.defaults),W},W.walkTokens=function(f,i){return qe.walkTokens(f,i)},W.parseInline=qe.parseInline,W.Parser=Re,W.parser=Re.parse,W.Renderer=ne,W.TextRenderer=at,W.Lexer=Ie,W.lexer=Ie.lex,W.Tokenizer=dt,W.Hooks=Ve,W.parse=W;var kr=W.options,vs=W.setOptions,Cr=W.use,oe=W.walkTokens,xr=W.parseInline,ce=W,wr=Re.parse,re=Ie.lex;return s!=e&&(a.exports=e),a.exports})})(ha);const Uo=ee(class extends J{constructor(){super();c(this,"searchcraftId");c(this,"summary","");c(this,"isLoading",!1);c(this,"isSummaryNotEnabled",!1);c(this,"unsubscribe");c(this,"cleanupCore");this.__registerHost()}get hostElement(){return this}onCoreAvailable(e){e.store.setState({hasSummaryBox:!0}),this.unsubscribe=e.store.subscribe(this.handleStateChange.bind(this))}connectedCallback(){this.cleanupCore=pe.useCoreInstance(this.searchcraftId,this.onCoreAvailable.bind(this))}disconnectedCallback(){var e,s;(e=this.unsubscribe)==null||e.call(this),(s=this.cleanupCore)==null||s.call(this)}handleStateChange(e){this.isLoading=e.isSummaryLoading,this.isSummaryNotEnabled=e.isSummaryNotEnabled,this.summary=this.sanitizeMarkdown(e.summary),this.updateContentElement(e.summary)}sanitizeMarkdown(e){return Qs.sanitize(ha.exports.marked.parse(e))}updateContentElement(e){var a;const s=(a=this.hostElement)==null?void 0:a.querySelector(".searchcraft-summary-box-content");s&&(s.innerHTML=this.sanitizeMarkdown(e))}renderContent(){return this.isLoading?m("searchcraft-loading",{label:"LOADING"}):this.isSummaryNotEnabled?m("div",{class:"searchcraft-summary-box-content"},"AI summaries are not enabled"):m("div",{class:"searchcraft-summary-box-content"},this.summary)}render(){return m("div",{key:"94033d861f93036430eca149b3c017fb6099fb17",class:"searchcraft-summary-box"},this.renderContent())}},[0,"searchcraft-summary-box",{searchcraftId:[1,"searchcraft-id"],summary:[32],isLoading:[32],isSummaryNotEnabled:[32]}]);function Vo(){if(typeof customElements>"u")return;["searchcraft-summary-box","searchcraft-loading"].forEach(t=>{switch(t){case"searchcraft-summary-box":customElements.get(t)||customElements.define(t,Uo);break;case"searchcraft-loading":customElements.get(t)||na();break}})}const qo=Vo,jo=`\uFEFF[class*=searchcraft-],[class*=searchcraft-] *,[class*=searchcraft-]::before,[class*=searchcraft-]::after,[class*=searchcraft-] *,::before,[class*=searchcraft-] *,::after{box-sizing:border-box;padding:0;margin:0}:root{--sc-text-base-size: 1em;--sc-text-scale-ratio: 1.1;--sc-font-family: sans-serif;--sc-font-bold: 700;--sc-font-normal: 400;--sc-heading-1-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-2-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-3-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-4-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-5-font-size: calc( var(--sc-text-base-size) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) );--sc-heading-6-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) );--sc-body-font-size: calc(var(--sc-text-base-size));--sc-body-small-font-size: calc( var(--sc-text-base-size) / ( var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) * var(--sc-text-scale-ratio) ) )}:root{--sc-border-radius: 8px;--sc-border-radius-sm: calc(var(--sc-border-radius) / 2);--sc-border-radius-lg: calc(var(--sc-border-radius) * 2);--sc-border-radius-xl: calc(var(--sc-border-radius) * 3);--sc-border-radius-2xl: calc(var(--sc-border-radius) * 4);--sc-border-radius-full: 9999px}:root{--sc-breakpoint-sm: 576px;--sc-breakpoint-md: 768px;--sc-breakpoint-lg: 992px}:root{--sc-surface-neutral-primary: var(--sc-color-background, #ffffff);--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-primary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #fafafa) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-primary-active: var( --sc-color-background-active, var(--sc-color-background-active-computed, #f7f7f7) );--sc-surface-neutral-secondary: var( --sc-color-background-secondary, var(--sc-color-background, #f3f3f3) );--sc-color-background-secondary-hover-computed: hsl( from var(--sc-color-background-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-neutral-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #e6e6e6) );--sc-color-background-secondary-active-computed: hsl( from var(--sc-color-background-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-neutral-secondary-active: var( --sc-color-background-secondary-active, var(--sc-color-background-active-computed, #e0e0e0) );--sc-surface-neutral-light: #ffffff;--sc-content-neutral-primary: var(--sc-color-foreground, #292929);--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10, calc(l + 5), 90) );--sc-content-neutral-secondary: var( --sc-color-foreground-secondary, var(--sc-color-foreground-secondary-computed, #404040) );--sc-border-neutral: var(--sc-color-border, rgba(0, 0, 0, 0.1));--sc-surface-brand-primary: var(--sc-color-brand, #000000);--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20, calc(l + 5), 95) );--sc-surface-brand-primary-hover: var( --sc-color-brand-hover, var(--sc-color-brand-hover-computed, #2e2e2e) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10, calc(l - 5), 85) );--sc-surface-brand-primary-active: var( --sc-color-brand-active, var(--sc-color-brand-active-computed, #292929) );--sc-surface-brand-secondary: var( --sc-color-brand-secondary, var(--sc-color-brand, #e6e6e6) );--sc-color-brand-secondary-hover-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(10, calc(l + 5), 95) );--sc-surface-brand-secondary-hover: var( --sc-color-background-hover, var(--sc-color-background-hover-computed, #ebebeb) );--sc-color-brand-secondary-active-computed: hsl( from var(--sc-color-brand-secondary) h s clamp(5, calc(l - 5), 90) );--sc-surface-brand-secondary-active: var( --sc-color-brand-secondary-active, var(--sc-color-brand-active-computed, #e0e0e0) );--sc-content-brand: var( --sc-color-brand-text, var(--sc-surface-brand-primary) );--sc-content-brand-on-primary: #ffffff;--sc-border-brand: var(--sc-surface-brand-primary);--sc-surface-success-primary: var(--sc-color-success, #008000);--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30 );--sc-surface-success-primary-hover: var( --sc-color-success-primary-hover, var(--sc-color-success-primary-hover-computed, #009900) );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20 );--sc-surface-success-primary-active: var( --sc-color-success-primary-active, var(--sc-color-success-primary-active-computed, #006600) );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90 );--sc-surface-success-secondary: var( --sc-color-success-secondary, var(--sc-color-success-secondary-computed, #ccffcc) );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95 );--sc-surface-success-secondary-hover: var( --sc-color-success-secondary-hover, var(--sc-color-success-secondary-hover-computed, #e6ffe6) );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85 );--sc-surface-success-secondary-active: var( --sc-color-success-secondary-active, var(--sc-color-success-secondary-active-computed, #b2ffb2) );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30) );--sc-content-success-on-primary: #ffffff;--sc-border-success: var(--sc-surface-success-primary);--sc-surface-caution-primary: var(--sc-color-caution, #cc6600);--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30 );--sc-surface-caution-primary-hover: var( --sc-color-caution-primary-hover, var(--sc-color-caution-primary-hover-computed, #e57300) );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20 );--sc-surface-caution-primary-active: var( --sc-color-caution-primary-active, var(--sc-color-caution-primary-active-computed, #b25a00) );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90 );--sc-surface-caution-secondary: var( --sc-color-caution-secondary, var(--sc-color-caution-secondary-computed, #ffd9b3) );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95 );--sc-surface-caution-secondary-hover: var( --sc-color-caution-secondary-hover, var(--sc-color-caution-secondary-hover-computed, #ffe5cc) );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85 );--sc-surface-caution-secondary-active: var( --sc-color-caution-secondary-active, var(--sc-color-caution-secondary-active-computed, #ffcc99) );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30) );--sc-content-caution-on-primary: #ffffff;--sc-border-caution: var(--sc-surface-caution-primary);--sc-surface-danger-primary: var(--sc-color-danger, #cc0000);--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30 );--sc-surface-danger-primary-hover: var( --sc-color-danger-primary-hover, var(--sc-color-danger-primary-hover-computed, #e50000) );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20 );--sc-surface-danger-primary-active: var( --sc-color-danger-primary-active, var(--sc-color-danger-primary-active-computed, #b30000) );--sc-color-danger-secondary-computed: hsl(from var(--sc-color-danger) h s 90);--sc-surface-danger-secondary: var( --sc-color-danger-secondary, var(--sc-color-danger-secondary-computed, #ffcccc) );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95 );--sc-surface-danger-secondary-hover: var( --sc-color-danger-secondary-hover, var(--sc-color-danger-secondary-hover-computed, #ffe7e7) );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85 );--sc-surface-danger-secondary-active: var( --sc-color-danger-secondary-active, var(--sc-color-danger-secondary-active-computed, #ffb3b3) );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30) );--sc-content-danger-on-primary: #ffffff;--sc-border-danger: var(--sc-surface-danger-primary);--sc-color-disabled: hsl(from var(--sc-color-page-primary) h s calc(l * 0.5));--sc-surface-disabled: var(--sc-color-disabled, #d9d9d9);--sc-color-disabled-text: hsl( from var(--sc-color-text-primary) h s calc(l * 0.5) );--sc-content-disabled: var(--sc-color-disabled-text, #737373);--sc-content-disabled-on-disabled: var(--sc-color-disabled-text, #737373)}@supports(hanging-punctuation: first) and (font: -apple-system-body) and (-webkit-appearance: none){:root{--sc-color-background-hover-computed: hsl( from var(--sc-color-background) h s clamp(10%, calc(l + 5%), 95%) );--sc-color-background-active-computed: hsl( from var(--sc-color-background) h s clamp(5%, calc(l - 5%), 90%) );--sc-color-foreground-secondary-computed: hsl( from var(--sc-color-foreground) h s clamp(10%, calc(l + 5%), 90%) );--sc-color-brand-hover-computed: hsl( from var(--sc-color-brand) h s clamp(20%, calc(l + 5%), 95%) );--sc-color-brand-active-computed: hsl( from var(--sc-color-brand) h s clamp(10%, calc(l - 5%), 85%) );--sc-color-success-primary-hover-computed: hsl( from var(--sc-color-success) h s 30% );--sc-color-success-primary-active-computed: hsl( from var(--sc-color-success) h s 20% );--sc-color-success-secondary-computed: hsl( from var(--sc-color-success) h s 90% );--sc-color-success-secondary-hover-computed: hsl( from var(--sc-color-success-secondary) h s 95% );--sc-color-success-secondary-active-computed: hsl( from var(--sc-color-success-secondary) h s 85% );--sc-content-success: var( --sc-color-brand-text, hsl(from var(--sc-surface-success-primary) h s 30%) );--sc-color-caution-primary-hover-computed: hsl( from var(--sc-color-caution) h s 30% );--sc-color-caution-primary-active-computed: hsl( from var(--sc-color-caution) h s 20% );--sc-color-caution-secondary-computed: hsl( from var(--sc-color-caution) h s 90% );--sc-color-caution-secondary-hover-computed: hsl( from var(--sc-color-caution-secondary) h s 95% );--sc-color-caution-secondary-active-computed: hsl( from var(--sc-color-caution-secondary) h s 85% );--sc-content-caution: var( --sc-color-caution-text, hsl(from var(--sc-surface-caution-primary) h s 30%) );--sc-color-danger-primary-hover-computed: hsl( from var(--sc-color-danger) h s 30% );--sc-color-danger-primary-active-computed: hsl( from var(--sc-color-danger) h s 20% );--sc-color-danger-secondary-computed: hsl( from var(--sc-color-danger) h s 90% );--sc-color-danger-secondary-hover-computed: hsl( from var(--sc-color-danger-secondary) h s 95% );--sc-color-danger-secondary-active-computed: hsl( from var(--sc-color-danger-secondary) h s 85% );--sc-content-danger: var( --sc-color-caution-text, hsl(from var(--sc-surface-danger-primary) h s 30%) )}}.searchcraft-ad{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-ad-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-ad-no-template>p{margin:0}.searchcraft-adm-ad{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-result{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased}.searchcraft-search-result-no-template{display:flex;flex-direction:column;font-size:.875rem}.searchcraft-search-result-no-template>p{margin:0}.searchcraft-search-results{display:flex;flex-direction:column;justify-content:center;gap:16px}.searchcraft-search-results-empty-state{text-align:center}.searchcraft-search-results-error-message{text-align:center}.searchcraft-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background:none;border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;gap:4px;padding:12px;position:relative}.searchcraft-button.searchcraft-button-disabled{cursor:not-allowed}.searchcraft-button-primary{background-color:var(--sc-surface-brand-primary);color:var(--sc-content-brand-on-primary);font-weight:var(--sc-font-bold)}.searchcraft-button-primary:hover{background-color:var(--sc-surface-brand-primary-hover)}.searchcraft-button-primary:focus{border-color:var(--sc-border-primary)}.searchcraft-button-primary:active{background-color:var(--sc-surface-brand-primary-active)}.searchcraft-button-primary.searchcraft-button-disabled,.searchcraft-button-primary.searchcraft-button-disabled:hover,.searchcraft-button-primary.searchcraft-button-disabled:focus,.searchcraft-button-primary.searchcraft-button-disabled:active{background-color:var(--sc-surface-disabled);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-tertiary{background-color:var(--sc-surface-neutral-primary);color:var(--sc-content-brand);font-weight:var(--sc-font-normal)}.searchcraft-button-tertiary:hover{background-color:var(--sc-surface-brand-secondary-hover)}.searchcraft-button-tertiary:focus{background-color:var(--sc-surface-neutral-light);border-color:var(--sc-border-primary)}.searchcraft-button-tertiary:active{background-color:var(--sc-surface-brand-secondary-active)}.searchcraft-button-tertiary.searchcraft-button-disabled,.searchcraft-button-tertiary.searchcraft-button-disabled:hover,.searchcraft-button-tertiary.searchcraft-button-disabled:focus,.searchcraft-button-tertiary.searchcraft-button-disabled:active{background-color:var(--sc-surface-neutral-light);border-color:rgba(0,0,0,0);color:var(--sc-content-disabled)}.searchcraft-button-icon{fill:none}.searchcraft-error-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-danger);margin:0}.searchcraft-facet-list{display:flex;flex-direction:column;gap:8px;width:100%}.searchcraft-facet-list-checkbox-label{align-items:center;color:var(--sc-content-neutral-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);gap:8px;position:relative;-webkit-font-smoothing:antialiased}.searchcraft-facet-list-checkbox-input-wrapper{position:relative}.searchcraft-facet-list-checkbox-input{align-items:center;appearance:none;background-color:var(--sc-surface-neutral-secondary);border:1px solid var(--sc-surface-disabled);border-radius:var(--sc-border-radius);cursor:pointer;display:flex;height:24px;justify-content:center;width:24px;margin:0}.searchcraft-facet-list-checkbox-input:focus{outline:2px solid var(--sc-surface-brand-primary);outline-offset:2px}.searchcraft-facet-list-checkbox-input:checked{background-color:var(--sc-surface-brand-primary);position:relative}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-check-icon{display:flex}.searchcraft-facet-list-checkbox-input:checked+.searchcraft-facet-list-checkbox-input-dash-icon{display:flex}.searchcraft-facet-child-list{display:flex;flex-direction:column;gap:6px}.searchcraft-facet-child-list-checkbox-label{margin-left:24px}.searchcraft-facet-child-list-checkbox-label:first-child{margin-top:6px}.searchcraft-facet-list-checkbox-input-check-icon{display:none;height:16px;left:50%;position:absolute;margin-top:2px;top:50%;transform:translate(-50%, -50%);width:16px}.searchcraft-facet-list-checkbox-input-dash-icon{display:none;height:3px;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:14px}.searchcraft-facet-list-message{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-disabled);text-align:center}.searchcraft-filter-panel{display:flex;flex-direction:column;gap:16px}.searchcraft-filter-panel-section{display:flex;flex-direction:column;gap:8px}.searchcraft-filter-panel-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}@media(max-width: 767px){[data-toggle-filter-panel]{cursor:pointer;display:flex !important;align-items:center;justify-content:space-between;width:100%}[data-toggle-filter-panel]::after{content:"›";display:inline-block;font-size:1.5em;line-height:1;margin-left:auto;flex-shrink:0;transition:transform .2s ease;transform-origin:center}[data-toggle-filter-panel][data-filter-panel-collapsed]::after{transform:rotate(90deg)}[data-toggle-filter-panel][data-filter-panel-expanded]::after{transform:rotate(-90deg)}}@media(min-width: 768px){[data-toggle-filter-panel]{cursor:default}[data-toggle-filter-panel]::after{display:none}}:root{--sc-input-form-border-radius: var(--sc-border-radius);--sc-input-form-search-icon-size: 20px;--sc-input-form-clear-icon-size: 20px}.searchcraft-input-form-grid{display:grid;gap:4px 8px}.searchcraft-input-form-grid-button-left{grid-template-rows:repeat(3, auto);grid-template-columns:auto 1fr}.searchcraft-input-form-grid-button-left .searchcraft-input-form-button{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-label{grid-column:2/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-error-message{grid-column:2/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-left .searchcraft-input-form-input-wrapper{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right{grid-template-rows:repeat(3, auto);grid-template-columns:1fr auto}.searchcraft-input-form-grid-button-right .searchcraft-input-form-button{grid-column:2/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-right .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-grid-button-none{grid-template-rows:repeat(3, auto);grid-template-columns:auto}.searchcraft-input-form-grid-button-none .searchcraft-input-form-button{display:none}.searchcraft-input-form-grid-button-none .searchcraft-input-form-label{grid-column:1/span 1;grid-row:1/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-error-message{grid-column:1/span 1;grid-row:3/span 1}.searchcraft-input-form-grid-button-none .searchcraft-input-form-input-wrapper{grid-column:1/span 1;grid-row:2/span 1}.searchcraft-input-form-input-wrapper{display:flex;position:relative}.searchcraft-input-form-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);background-color:var(--sc-surface-neutral-secondary);border-radius:var(--sc-input-form-border-radius);border:none;color:var(--sc-content-neutral-primary);flex:1;outline:none;padding:12px 44px}.searchcraft-input-form-input::placeholder{color:var(--sc-content-disabled)}.searchcraft-input-form-input:focus{outline:var(--sc-border-brand) solid 2px;outline-offset:-1px}.searchcraft-input-form-input.searchcraft-placeholder-hide-on-focus:focus::placeholder{opacity:0}.searchcraft-input-form-error{color:var(--sc-content-danger);outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-error:focus{outline:var(--sc-border-danger) solid 2px}.searchcraft-input-form-input-icon{align-items:center;bottom:0;display:flex;justify-content:center;left:0;position:absolute;pointer-events:none;top:0;width:44px}.searchcraft-input-form-input-search-icon{color:var(--sc-content-neutral-secondary);fill:none;height:var(--sc-input-form-search-icon-size);pointer-events:none;width:var(--sc-input-form-search-icon-size)}.searchcraft-input-form-clear-button{all:unset;align-items:center;bottom:0;border:none;cursor:pointer;display:flex;justify-content:center;outline:none;position:absolute;right:0;top:0;width:44px}.searchcraft-input-form-clear-icon{color:var(--sc-content-brand);fill:none;height:var(--sc-input-form-clear-icon-size);width:var(--sc-input-form-clear-icon-size)}.searchcraft-input-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);font-weight:var(--sc-font-bold);margin-top:4px;margin-bottom:4px}:root{--sc-popover-button-border-radius: var(--sc-border-radius)}@media(min-width: 576px){:root{--sc-popover-button-border-radius: var(--sc-border-radius-lg)}}.searchcraft-popover-button{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);cursor:pointer}.searchcraft-popover-button-skeuomorphic{appearance:none;background:none;border:none;color:var(--sc-content-neutral-primary);display:block;width:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-popover-button-border-radius);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;display:flex;gap:24px;height:40px;justify-content:space-between;line-height:1;padding:4px 5px 4px 10px;background:var(--sc-surface-neutral-primary)}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-wrapper{box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-secondary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%) inset;height:63px;padding:8px 10px 8px 16px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{align-items:center;display:flex;gap:4px}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{color:var(--sc-content-neutral-secondary);display:flex;gap:4px;font-size:20px;font-weight:500}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps{gap:8px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 3px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 3px);background-color:var(--sc-surface-neutral-primary);box-shadow:0 3px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 6px 4px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 2px);position:relative}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap{border-radius:calc(var(--sc-popover-button-border-radius) - 8px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 8px);box-shadow:0 4px hsl(from var(--sc-surface-neutral-secondary) h s calc(l - 5)),0 1px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 6px 1px rgb(from var(--sc-content-neutral-secondary) r g b/20%),0 7px 2px rgb(from var(--sc-content-neutral-secondary) r g b/15%),0 9px 4px rgb(from var(--sc-content-neutral-secondary) r g b/10%),0 13px 8px rgb(from var(--sc-content-neutral-secondary) r g b/5%);height:calc(100% - 5px)}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before,.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{content:"";display:block}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 4px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 4px);background:linear-gradient(340deg, rgb(from var(--sc-surface-neutral-secondary) r g b/2%) 0%, var(--sc-surface-neutral-secondary) 100%);inset:2px;position:absolute}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::before{border-radius:calc(var(--sc-popover-button-border-radius) - 12px);border-radius:calc(var(var(--sc-popover-button-border-radius)) - 12px);inset:4px}}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap::after{aspect-ratio:1/1;height:100%}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-keycaps-keycap>span{display:flex;line-height:1;left:50%;margin-top:2%;position:absolute;top:50%;transform:translate(-50%, -50%)}.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:60%;width:auto}@media(min-width: 576px){.searchcraft-popover-button-skeuomorphic .searchcraft-popover-button-input-search-icon{height:50%}}:root{--sc-popover-list-view-height: 600px;--sc-popover-modal-max-width: 800px}.searchcraft-popover-form{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);display:flex;flex:1;flex-direction:column}.searchcraft-popover-form searchcraft-input-form,.searchcraft-popover-form searchcraft-popover-footer{width:100%}.searchcraft-popover-form.searchcraft-popover-form-active .searchcraft-popover-form-input{padding-bottom:1px}.searchcraft-popover-form searchcraft-popover-list-view{flex-shrink:1;height:100%;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-input{display:flex;flex-direction:row;gap:12px}.searchcraft-popover-form-input .searchcraft-input-form-input{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius-lg);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;width:0}.searchcraft-popover-form-cancel-button{background:none;border:none;cursor:pointer;font-size:14px}.searchcraft-popover-form-modal-input,.searchcraft-popover-form-fullscreen-input{padding:24px}.searchcraft-popover-form-modal-popover-list-view,.searchcraft-popover-form-fullscreen-popover-list-view{flex-grow:1;flex-shrink:1;min-height:0;overflow:auto;padding:0 24px}.searchcraft-popover-form-inline{background-color:var(--sc-surface-neutral-primary);border:1px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius-xl);padding:12px;position:relative}.searchcraft-popover-form-inline.searchcraft-popover-form-active{border:1px solid var(--sc-border-neutral);border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0;padding-bottom:1px}.searchcraft-popover-form-inline searchcraft-popover-list-view{padding:0 12px}.searchcraft-popover-form-inline .searchcraft-input-form-input,.searchcraft-popover-form-inline .searchcraft-popover-list-item-link,.searchcraft-popover-form-inline .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-xl - 12px);border-radius:calc(var(--sc-border-radius-xl) - 12px)}.searchcraft-popover-form-inline-wrapper{background-color:var(--sc-surface-neutral-primary);border:1px solid var(--sc-border-neutral);border-top:none;border-bottom-left-radius:var(--sc-border-radius-xl);border-bottom-right-radius:var(--sc-border-radius-xl);display:flex;flex-direction:column;left:-1px;max-height:var(--sc-popover-list-view-height);overflow:hidden;position:absolute;right:-1px;top:100%}.searchcraft-popover-form-modal{align-items:center;display:flex;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-modal .searchcraft-input-form-input,.searchcraft-popover-form-modal .searchcraft-popover-list-item-link,.searchcraft-popover-form-modal .searchcraft-adm-ad-link{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px)}.searchcraft-popover-form-modal-backdrop{background-color:rgb(from var(--sc-content-neutral-primary) r g b/50%);display:none;inset:0;position:fixed}@media(min-width: 576px){.searchcraft-popover-form-modal-backdrop{display:block}}.searchcraft-popover-form-modal-wrapper{background-color:var(--sc-surface-neutral-primary);box-shadow:1px 2px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 2px 4px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 4px 8px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 8px 16px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 16px 32px rgb(from var(--sc-content-neutral-primary) r g b/7%),0 32px 64px rgb(from var(--sc-content-neutral-primary) r g b/7%);display:flex;flex-direction:column;inset:0;max-width:var(--sc-popover-modal-max-width);overflow:hidden;position:absolute;width:100%;z-index:1001}@media(min-width: 576px){.searchcraft-popover-form-modal-wrapper{border-radius:var(--sc-border-radius-2xl);inset:0;margin-top:100px;max-height:var(--sc-popover-list-view-height);max-width:var(--sc-popover-modal-max-width);position:relative}}.searchcraft-popover-form-modal-cancel-button{border-radius:calc(--sc-border-radius-2xl - 20px);border-radius:calc(var(--sc-border-radius-2xl) - 20px);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-modal-cancel-button{padding:8px 12px}}.searchcraft-popover-form-fullscreen{background-color:var(--sc-surface-neutral-primary);display:flex;flex-direction:column;justify-content:space-between;inset:0;position:fixed;z-index:1000}.searchcraft-popover-form-fullscreen .searchcraft-popover-list-item-link,.searchcraft-popover-form-fullscreen .searchcraft-adm-ad-link{border-radius:var(--sc-border-radius-lg)}.searchcraft-popover-form-fullscreen-cancel-button{border-radius:var(--sc-border-radius-lg);padding:8px}@media(min-width: 576px){.searchcraft-popover-form-fullscreen-cancel-button{padding:8px 12px}}.searchcraft-popover-footer{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;background-color:var(--sc-surface-neutral-secondary);box-shadow:0 1px 1px rgb(from var(--sc-content-neutral-primary) r g b/10%) inset,0 2px 2px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset,0 4px 4px rgb(from var(--sc-content-neutral-primary) r g b/5%) inset;display:flex;gap:8px;justify-content:space-between;line-height:1;padding:20px 24px}@media(min-width: 576px){.searchcraft-popover-footer{padding:20px 32px}}.searchcraft-popover-footer-results-info{margin:0}.searchcraft-popover-footer-link{color:var(--sc-content-neutral-primary);display:flex;max-width:160px;width:100%}:root{--sc-popover-list-item-image-fit: contain}.searchcraft-popover-list-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;border-bottom:1px solid var(--sc-border-neutral);padding:12px 0}searchcraft-popover-list-item:last-child .searchcraft-popover-list-item{border-bottom:none}.searchcraft-popover-list-item-link{align-items:flex-start;color:var(--sc-content-neutral-primary);display:flex;gap:24px;padding:12px;text-decoration:none}.searchcraft-popover-list-item-link:focus,.searchcraft-popover-list-item-link:active{background-color:var(--sc-surface-neutral-primary-active)}.searchcraft-popover-list-item-link:hover{background-color:var(--sc-surface-neutral-primary-hover)}.searchcraft-popover-list-item-image-wrapper{align-items:center;aspect-ratio:16/9;display:flex;flex-shrink:0;justify-content:center;width:160px}.searchcraft-popover-list-item-image{height:100%;object-fit:var(--sc-popover-list-item-image-fit);width:100%}.searchcraft-popover-list-item-content{display:flex;flex-direction:column;flex-grow:1;gap:4px;justify-content:center}.searchcraft-popover-list-item-content-title,.searchcraft-popover-list-item-content-subtitle{display:-webkit-box;line-clamp:2;margin:0;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}.searchcraft-popover-list-item-content-title{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-heading-5-font-size);font-weight:var(--sc-font-bold)}.searchcraft-popover-list-item-content-subtitle{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-popover-list-view{display:flex;flex-direction:column}.searchcraft-results-info{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-primary);margin:0}.searchcraft-slider{align-items:center;display:flex;flex-direction:column;gap:10px;width:100%;margin-top:4px}.searchcraft-slider-range{align-items:center;background-color:var(--sc-surface-disabled);border-radius:999px;display:flex;position:relative;height:4px;width:100%}.searchcraft-slider-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range{background-color:var(--sc-surface-brand-primary);border-radius:2px;height:4px;position:absolute;top:50%;transform:translateY(-50%);z-index:0}.searchcraft-slider-range .searchcraft-slider-active-range::-webkit-slider-runnable-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-active-range::-moz-range-track{pointer-events:none}.searchcraft-slider-range .searchcraft-slider-input{appearance:none;background:rgba(0,0,0,0);border-radius:2px;height:4px;margin:0;outline:none;pointer-events:none;position:absolute;width:100%;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-webkit-slider-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px;-webkit-appearance:none}.searchcraft-slider-range .searchcraft-slider-input::-moz-range-thumb{background-color:var(--sc-surface-neutral-light);border-radius:50%;border:1px solid var(--sc-border-neutral);cursor:pointer;height:18px;pointer-events:all;width:18px}.searchcraft-slider-range .searchcraft-slider-input:focus::-webkit-slider-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-range .searchcraft-slider-input:focus::-moz-range-thumb{outline:2px solid var(--sc-surface-brand-primary)}.searchcraft-slider-label{color:var(--sc-content-primary);display:flex;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);justify-content:space-between;margin-top:4px;width:100%}.searchcraft-slider-start-label,.searchcraft-slider-end-label{min-width:30px;text-align:center}.searchcraft-toggle-button{align-items:flex-start;display:flex;gap:10px;justify-content:space-between}.searchcraft-toggle-button-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-primary);margin:0}.searchcraft-toggle-button-sub-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);color:var(--sc-content-neutral-secondary);margin:0}.searchcraft-toggle-button-background{background:var(--sc-surface-disabled);border-radius:var(--sc-border-radius-full);border:none;cursor:pointer;flex-shrink:0;height:26px;position:relative;transition:background-color .2s;width:44px}.searchcraft-toggle-button-handle{background:var(--sc-surface-neutral-light);border-radius:50%;height:18px;left:4px;position:absolute;top:calc(50% - 9px);transition:transform .3s ease;width:18px}.searchcraft-toggle-button-active .searchcraft-toggle-button-background{background:var(--sc-surface-brand-primary);box-shadow:0px 0px 0px 1px rgba(0,0,0,.05)}.searchcraft-toggle-button-active .searchcraft-toggle-button-handle{transform:translateX(16px)}.searchcraft-pagination{display:inline-grid;gap:16px;grid-template-columns:repeat(3, auto);grid-template-rows:1fr}.searchcraft-pagination-list{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius);display:flex;list-style-type:none;margin:0;overflow:hidden;padding:0;width:auto}.searchcraft-pagination-list li{border-right:1px solid var(--sc-border-neutral);height:100%;min-height:44px;width:44px}.searchcraft-pagination-list li:last-child{border-right:none}.searchcraft-pagination-item{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;background-color:var(--sc-surface-neutral-primary);border:none;display:flex;height:100%;justify-content:center;width:100%}.searchcraft-pagination-item-active{background-color:var(--sc-surface-brand-secondary);font-weight:var(--sc-font-bold)}.searchcraft-pagination-control{border:1px solid var(--sc-border-neutral);border-radius:var(--sc-border-radius)}.searchcraft-pagination-range{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);align-items:center;display:flex}.searchcraft-select{display:flex;flex-direction:column;gap:4px}.searchcraft-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal);font-weight:var(--sc-font-bold)}.searchcraft-select-input-wrapper{position:relative}.searchcraft-select-input{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal);appearance:none;background-color:var(--sc-surface-neutral-secondary);border:2px solid rgba(0,0,0,0);border-radius:var(--sc-border-radius);cursor:pointer;height:44px;padding:0 44px 0 16px;width:100%}.searchcraft-select-input:hover{background-color:var(--sc-surface-neutral-secondary-hover)}.searchcraft-select-input:active{background-color:var(--sc-surface-neutral-secondary-active)}.searchcraft-select-input:focus{border-color:var(--sc-border-brand);outline:none}.searchcraft-select-input-icon{fill:none;pointer-events:none;position:absolute;right:12px;top:50%;transform:translateY(-50%)}.searchcraft-select-caption{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page{display:flex}.searchcraft-search-results-per-page-select{align-items:center;display:flex;gap:12px}.searchcraft-search-results-per-page-select-label{font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-search-results-per-page-select-input{min-width:120px}.searchcraft-summary-box{padding:20px;border-radius:var(--sc-border-radius);background-color:var(--sc-surface-neutral-secondary);position:relative;min-height:200px;color:var(--sc-content-neutral-primary);font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-font-size);font-weight:var(--sc-font-normal)}.searchcraft-summary-box h1,.searchcraft-summary-box h2,.searchcraft-summary-box h3,.searchcraft-summary-box h4,.searchcraft-summary-box h5{padding-top:10px;padding-bottom:10px}.searchcraft-summary-box p{padding-bottom:10px}.searchcraft-summary-box img{max-width:200px}.searchcraft-summary-box ol,.searchcraft-summary-box ul{padding-left:1em;padding-bottom:10px}.searchcraft-summary-box a{color:var(--sc-content-brand)}.searchcraft-loading-label{position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);margin-top:40px;letter-spacing:2px;color:#828282;font-family:var(--sc-font-family);line-height:1.25;-webkit-font-smoothing:antialiased;font-size:var(--sc-body-small-font-size);font-weight:var(--sc-font-normal)}.searchcraft-loading-bars{margin:0 auto;width:60px;height:50px;text-align:center;position:absolute;top:50%;left:50%;transform:translateY(-50%) translateX(-50%);display:flex;gap:2px}.searchcraft-loading-bars>div{height:100%;width:8px;-webkit-animation:delay .8s infinite ease-in-out;animation:delay .8s infinite ease-in-out;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-1{background-color:var(--sc-surface-brand-primary);opacity:.1}.searchcraft-loading-bars .searchcraft-loading-bar-2{background-color:var(--sc-surface-brand-primary);animation-delay:-0.7s;opacity:.2}.searchcraft-loading-bars .searchcraft-loading-bar-3{background-color:var(--sc-surface-brand-primary);animation-delay:-0.6s;opacity:.3}.searchcraft-loading-bars .searchcraft-loading-bar-4{background-color:var(--sc-surface-brand-primary);animation-delay:-0.5s;opacity:.4}.searchcraft-loading-bars .searchcraft-loading-bar-5{background-color:var(--sc-surface-brand-primary);animation-delay:-0.4s;opacity:.5}.searchcraft-loading-bars .searchcraft-loading-bar-6{background-color:var(--sc-surface-brand-primary);animation-delay:-0.3s;opacity:.6}@keyframes delay{0%,40%,100%{transform:scaleY(0.05)}20%{transform:scaleY(1)}}/*# sourceMappingURL=hologram.css.map */
62
+ `,Wo=ee(class extends J{constructor(){super(),this.__registerHost()}render(){return m("style",{key:"13c28bb6075d6fcbec33938fd2227d9fb6129bf2"},jo)}},[0,"searchcraft-theme"]);function Go(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,Wo);break}})}const Zo=Go,Yo=sa,da=()=>{qn(),Wn(),Zn(),Kn(),oo(),lo(),uo(),fo(),go(),yo(),Co(),Ro(),Eo(),To(),Io(),Ao(),zo(),Fo(),Ho(),Bo(),qo(),Zo(),Yo()};globalThis.__scDefineCustomElements__=da;var me;(function(r){r[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.WARN=2]="WARN",r[r.ERROR=3]="ERROR",r[r.NONE=4]="NONE"})(me||(me={}));class Qo{constructor(t){c(this,"logLevel");c(this,"logFormatter");this.logLevel=t.logLevel||me.INFO,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,e){return`[${me[t]}] ${new Date().toISOString()}: ${e}`}debug(t){this.logLevel<=me.DEBUG&&console.log(this.logFormatter(me.DEBUG,t))}info(t){this.logLevel<=me.INFO&&console.info(this.logFormatter(me.INFO,t))}warn(t){this.logLevel<=me.WARN&&console.warn(this.logFormatter(me.WARN,t))}error(t){this.logLevel<=me.ERROR&&console.error(this.logFormatter(me.ERROR,t))}log(t,e){switch(t){case me.DEBUG:this.debug(e);break;case me.INFO:this.info(e);break;case me.WARN:this.warn(e);break;case me.ERROR:this.error(e);break}}}const nr=new Qo({logLevel:me.NONE});function He(r,t,e,s){return new(e||(e=Promise))(function(a,o){function n(l){try{u(s.next(l))}catch(p){o(p)}}function h(l){try{u(s.throw(l))}catch(p){o(p)}}function u(l){var p;l.done?a(l.value):(p=l.value,p instanceof e?p:new e(function(C){C(p)})).then(n,h)}u((s=s.apply(r,[])).next())})}function Be(r,t){var e,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:h(0),throw:h(1),return:h(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function h(u){return function(l){return function(p){if(e)throw new TypeError("Generator is already executing.");for(;o&&(o=0,p[0]&&(n=0)),n;)try{if(e=1,s&&(a=2&p[0]?s.return:p[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,p[1])).done)return a;switch(s=0,a&&(p=[2&p[0],a.value]),p[0]){case 0:case 1:a=p;break;case 4:return n.label++,{value:p[1],done:!1};case 5:n.label++,s=p[1],p=[0];continue;case 7:p=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||p[0]!==6&&p[0]!==2)){n=0;continue}if(p[0]===3&&(!a||p[1]>a[0]&&p[1]<a[3])){n.label=p[1];break}if(p[0]===6&&n.label<a[1]){n.label=a[1],a=p;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(p);break}a[2]&&n.ops.pop(),n.trys.pop();continue}p=t.call(r,n)}catch(C){p=[6,C],s=0}finally{e=a=0}if(5&p[0])throw p[1];return{value:p[0]?p[1]:void 0,done:!0}}([u,l])}}}typeof SuppressedError=="function"&&SuppressedError;var Ue={exclude:[]},fa={},Ko={timeout:"true"},_e=function(r,t){typeof window<"u"&&(fa[r]=t)},Xo=function(){return Object.fromEntries(Object.entries(fa).filter(function(r){var t,e=r[0];return!(!((t=Ue==null?void 0:Ue.exclude)===null||t===void 0)&&t.includes(e))}).map(function(r){return[r[0],(0,r[1])()]}))};function or(r){return r^=r>>>16,r=Math.imul(r,2246822507),r^=r>>>13,r=Math.imul(r,3266489909),(r^=r>>>16)>>>0}var be=new Uint32Array([597399067,2869860233,951274213,2716044179]);function Pe(r,t){return r<<t|r>>>32-t}function Wr(r,t){var e;if(t===void 0&&(t=0),t=t?0|t:0,typeof r=="string"&&(e=r,r=new TextEncoder().encode(e).buffer),!(r instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var s=new Uint32Array([t,t,t,t]);(function(o,n){for(var h=o.byteLength/16|0,u=new Uint32Array(o,0,4*h),l=0;l<h;l++){var p=u.subarray(4*l,4*(l+1));p[0]=Math.imul(p[0],be[0]),p[0]=Pe(p[0],15),p[0]=Math.imul(p[0],be[1]),n[0]=n[0]^p[0],n[0]=Pe(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,p[1]=Math.imul(p[1],be[1]),p[1]=Pe(p[1],16),p[1]=Math.imul(p[1],be[2]),n[1]=n[1]^p[1],n[1]=Pe(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,p[2]=Math.imul(p[2],be[2]),p[2]=Pe(p[2],17),p[2]=Math.imul(p[2],be[3]),n[2]=n[2]^p[2],n[2]=Pe(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,p[3]=Math.imul(p[3],be[3]),p[3]=Pe(p[3],18),p[3]=Math.imul(p[3],be[0]),n[3]=n[3]^p[3],n[3]=Pe(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(r,s),function(o,n){var h=o.byteLength/16|0,u=o.byteLength%16,l=new Uint32Array(4),p=new Uint8Array(o,16*h,u);switch(u){case 15:l[3]=l[3]^p[14]<<16;case 14:l[3]=l[3]^p[13]<<8;case 13:l[3]=l[3]^p[12]<<0,l[3]=Math.imul(l[3],be[3]),l[3]=Pe(l[3],18),l[3]=Math.imul(l[3],be[0]),n[3]=n[3]^l[3];case 12:l[2]=l[2]^p[11]<<24;case 11:l[2]=l[2]^p[10]<<16;case 10:l[2]=l[2]^p[9]<<8;case 9:l[2]=l[2]^p[8]<<0,l[2]=Math.imul(l[2],be[2]),l[2]=Pe(l[2],17),l[2]=Math.imul(l[2],be[3]),n[2]=n[2]^l[2];case 8:l[1]=l[1]^p[7]<<24;case 7:l[1]=l[1]^p[6]<<16;case 6:l[1]=l[1]^p[5]<<8;case 5:l[1]=l[1]^p[4]<<0,l[1]=Math.imul(l[1],be[1]),l[1]=Pe(l[1],16),l[1]=Math.imul(l[1],be[2]),n[1]=n[1]^l[1];case 4:l[0]=l[0]^p[3]<<24;case 3:l[0]=l[0]^p[2]<<16;case 2:l[0]=l[0]^p[1]<<8;case 1:l[0]=l[0]^p[0]<<0,l[0]=Math.imul(l[0],be[0]),l[0]=Pe(l[0],15),l[0]=Math.imul(l[0],be[1]),n[0]=n[0]^l[0]}}(r,s),function(o,n){n[0]=n[0]^o.byteLength,n[1]=n[1]^o.byteLength,n[2]=n[2]^o.byteLength,n[3]=n[3]^o.byteLength,n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0,n[0]=or(n[0]),n[1]=or(n[1]),n[2]=or(n[2]),n[3]=or(n[3]),n[0]=n[0]+n[1]|0,n[0]=n[0]+n[2]|0,n[0]=n[0]+n[3]|0,n[1]=n[1]+n[0]|0,n[2]=n[2]+n[0]|0,n[3]=n[3]+n[0]|0}(r,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function Jo(r,t){return new Promise(function(e){setTimeout(function(){return e(t)},r)})}function ei(r,t,e){return Promise.all(r.map(function(s){return Promise.race([s,Jo(t,e)])}))}function ti(){return He(this,void 0,void 0,function(){var r,t,e,s,a;return Be(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),r=Xo(),t=Object.keys(r),[4,ei(Object.values(r),(Ue==null?void 0:Ue.timeout)||1e3,Ko)];case 1:return e=o.sent(),s=e.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,h){a[t[h]]=n}),[2,pa(a,Ue.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function pa(r,t){var e={},s=function(o){if(r.hasOwnProperty(o)){var n=r[o];if(typeof n!="object"||Array.isArray(n))t.includes(o)||(e[o]=n);else{var h=pa(n,t.map(function(u){return u.startsWith(o+".")?u.slice(o.length+1):u}));Object.keys(h).length>0&&(e[o]=h)}}};for(var a in r)s(a);return e}function ri(r){return He(this,void 0,void 0,function(){var t,e;return Be(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,ti()];case 1:return t=s.sent(),e=Wr(JSON.stringify(t)),[2,e.toString()];case 2:throw s.sent();case 3:return[2]}})})}function si(r){for(var t=0,e=0;e<r.length;++e)t+=Math.abs(r[e]);return t}function ma(r,t,e){for(var s=[],a=0;a<r[0].data.length;a++){for(var o=[],n=0;n<r.length;n++)o.push(r[n].data[a]);s.push(ai(o))}var h=new Uint8ClampedArray(s);return new ImageData(h,t,e)}function ai(r){if(r.length===0)return 0;for(var t={},e=0,s=r;e<s.length;e++)t[o=s[e]]=(t[o]||0)+1;var a=r[0];for(var o in t)t[o]>t[a]&&(a=parseInt(o,10));return a}function Ot(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var r=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},e=0,s=[/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/];e<s.length;e++){var a=s[e],o=r.match(a);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}_e("audio",function(){return He(this,void 0,void 0,function(){return Be(this,function(r){return[2,new Promise(function(t,e){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,h=s.createDynamicsCompressor();h.threshold.value=-50,h.knee.value=40,h.ratio.value=12,h.attack.value=0,h.release.value=.2,o.connect(h),h.connect(s.destination),o.start(),s.oncomplete=function(u){n=u.renderedBuffer.getChannelData(0),t({sampleHash:si(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(u){console.error("Error creating audio fingerprint:",u),e(u)}})]})})});var ni=Ot().name!=="SamsungBrowser"?1:3,ga=280,ba=20;Ot().name!="Firefox"&&_e("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(r){var t=Array.from({length:ni},function(){return function(){var e=document.createElement("canvas"),s=e.getContext("2d");if(!s)return new ImageData(1,1);e.width=ga,e.height=ba;var a=s.createLinearGradient(0,0,e.width,e.height);a.addColorStop(0,"red"),a.addColorStop(.16666666666666666,"orange"),a.addColorStop(.3333333333333333,"yellow"),a.addColorStop(.5,"green"),a.addColorStop(.6666666666666666,"blue"),a.addColorStop(.8333333333333334,"indigo"),a.addColorStop(1,"violet"),s.fillStyle=a,s.fillRect(0,0,e.width,e.height);var o="Random Text WMwmil10Oo";s.font="23.123px Arial",s.fillStyle="black",s.fillText(o,-5,15),s.fillStyle="rgba(0, 0, 255, 0.5)",s.fillText(o,-3.3,17.7),s.beginPath(),s.moveTo(0,0),s.lineTo(2*e.width/7,e.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,e.width,e.height);return n}()});r({commonImageDataHash:Wr(ma(t,ga,ba).data.toString()).toString()})})});var Gr,oi=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],ii=["monospace","sans-serif","serif"];function va(r,t){if(!r)throw new Error("Canvas context not supported");return r.font="72px ".concat(t),r.measureText("WwMmLli0Oo").width}function ci(){var r,t=document.createElement("canvas"),e=(r=t.getContext("webgl"))!==null&&r!==void 0?r:t.getContext("experimental-webgl");if(e&&"getParameter"in e)try{var s=(e.getParameter(e.VENDOR)||"").toString(),a=(e.getParameter(e.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(e.getParameter(e.VERSION)||"").toString(),shadingLanguageVersion:(e.getParameter(e.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=e.getExtension("WEBGL_debug_renderer_info");if(n){var h=(e.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),u=(e.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();h&&(o.vendorUnmasked=h),u&&(o.rendererUnmasked=u)}}return o}catch{}return"undefined"}function li(){var r=new Float32Array(1),t=new Uint8Array(r.buffer);return r[0]=1/0,r[0]=r[0]-r[0],t[3]}function ui(r,t){var e={};return t.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(l){var p=String(l);n[p]=(n[p]||0)+1});var h=o[0],u=1;return Object.keys(n).forEach(function(l){n[l]>u&&(h=l,u=n[l])}),h}(r.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(e[s]=a)}),e}function hi(){var r=[],t={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(t).forEach(function(e){t[e].forEach(function(s){matchMedia("(".concat(e,": ").concat(s,")")).matches&&r.push("".concat(e,": ").concat(s))})}),r}function di(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var r=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(r(t))return t}catch{return 0}return 0}Ot().name!="Firefox"&&_e("fonts",function(){var r=this;return new Promise(function(t,e){try{(function(s){var a;He(this,void 0,void 0,function(){var o,n,h;return Be(this,function(u){switch(u.label){case 0:return document.body?[3,2]:[4,(l=50,new Promise(function(C){return setTimeout(C,l,p)}))];case 1:return u.sent(),[3,0];case 2:if((o=document.createElement("iframe")).setAttribute("frameBorder","0"),(n=o.style).setProperty("position","fixed"),n.setProperty("display","block","important"),n.setProperty("visibility","visible"),n.setProperty("border","0"),n.setProperty("opacity","0"),o.src="about:blank",document.body.appendChild(o),!(h=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:h}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var l,p})})})(function(s){var a=s.iframe;return He(r,void 0,void 0,function(){var o,n,h,u;return Be(this,function(l){return o=a.createElement("canvas"),n=o.getContext("2d"),h=ii.map(function(p){return va(n,p)}),u={},oi.forEach(function(p){var C=va(n,p);h.includes(C)||(u[p]=C)}),t(u),[2]})})})}catch{e({error:"unsupported"})}})}),_e("hardware",function(){return new Promise(function(r,t){var e=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;r({videocard:ci(),architecture:li(),deviceMemory:e.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),_e("locales",function(){return new Promise(function(r){r({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),_e("permissions",function(){return He(this,void 0,void 0,function(){var r;return Be(this,function(t){return Gr=(Ue==null?void 0:Ue.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],r=Array.from({length:(Ue==null?void 0:Ue.retries)||3},function(){return function(){return He(this,void 0,void 0,function(){var e,s,a,o,n;return Be(this,function(h){switch(h.label){case 0:e={},s=0,a=Gr,h.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],h.label=2;case 2:return h.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=h.sent(),e[o]=n.state.toString(),[3,5];case 4:return h.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,e]}})})}()}),[2,Promise.all(r).then(function(e){return ui(e,Gr)})]})})}),_e("plugins",function(){var r=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var e=navigator.plugins[t];r.push([e.name,e.filename,e.description].join("|"))}return new Promise(function(s){s({plugins:r})})}),_e("screen",function(){return new Promise(function(r){r({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:hi()})})}),_e("system",function(){return new Promise(function(r){var t=Ot();r({platform:window.navigator.platform,cookieEnabled:window.navigator.cookieEnabled,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:t.name,version:t.version},applePayVersion:di()})})});var ke,fi=Ot().name!=="SamsungBrowser"?1:3,L=null;_e("webgl",function(){return He(this,void 0,void 0,function(){var r;return Be(this,function(t){typeof document<"u"&&((ke=document.createElement("canvas")).width=200,ke.height=100,L=ke.getContext("webgl"));try{if(!L)throw new Error("WebGL not supported");return r=Array.from({length:fi},function(){return function(){try{if(!L)throw new Error("WebGL not supported");var e=`
63
63
  attribute vec2 position;
64
64
  void main() {
65
65
  gl_Position = vec4(position, 0.0, 1.0);
@@ -69,7 +69,7 @@ Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An err
69
69
  void main() {
70
70
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
71
71
  }
72
- `,a=F.createShader(F.VERTEX_SHADER),o=F.createShader(F.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(F.shaderSource(a,e),F.shaderSource(o,s),F.compileShader(a),!F.getShaderParameter(a,F.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+F.getShaderInfoLog(a));if(F.compileShader(o),!F.getShaderParameter(o,F.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+F.getShaderInfoLog(o));var n=F.createProgram();if(!n)throw new Error("Failed to create shader program");if(F.attachShader(n,a),F.attachShader(n,o),F.linkProgram(n),!F.getProgramParameter(n,F.LINK_STATUS))throw new Error("Shader program linking failed: "+F.getProgramInfoLog(n));F.useProgram(n);for(var h=137,u=new Float32Array(4*h),l=2*Math.PI/h,p=0;p<h;p++){var C=p*l;u[4*p]=0,u[4*p+1]=0,u[4*p+2]=Math.cos(C)*(ke.width/2),u[4*p+3]=Math.sin(C)*(ke.height/2)}var w=F.createBuffer();F.bindBuffer(F.ARRAY_BUFFER,w),F.bufferData(F.ARRAY_BUFFER,u,F.STATIC_DRAW);var $=F.getAttribLocation(n,"position");F.enableVertexAttribArray($),F.vertexAttribPointer($,2,F.FLOAT,!1,0,0),F.viewport(0,0,ke.width,ke.height),F.clearColor(0,0,0,1),F.clear(F.COLOR_BUFFER_BIT),F.drawArrays(F.LINES,0,2*h);var A=new Uint8ClampedArray(ke.width*ke.height*4);return F.readPixels(0,0,ke.width,ke.height,F.RGBA,F.UNSIGNED_BYTE,A),new ImageData(A,ke.width,ke.height)}catch{return new ImageData(1,1)}finally{F&&(F.bindBuffer(F.ARRAY_BUFFER,null),F.useProgram(null),F.viewport(0,0,F.drawingBufferWidth,F.drawingBufferHeight),F.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Wr(ma(r,ke.width,ke.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var ot=function(r,t,e,s){for(var a=(e-t)/s,o=0,n=0;n<s;n++)o+=r(t+(n+.5)*a);return o*a};_e("math",function(){return He(void 0,void 0,void 0,function(){return Ue(this,function(r){return[2,{acos:Math.acos(.5),asin:ot(Math.asin,-1,1,97),atan:ot(Math.atan,-1,1,97),cos:ot(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:ot(Math.sin,-Math.PI,Math.PI,97),sinh:ot(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:ot(Math.tan,0,2*Math.PI,97),tanh:ot(Math.tanh,-9/7,7/9,97)}]})})});class Zr{constructor(t){c(this,"config");this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,e){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class pi extends Zr{async getAds(t){const e=this.config.admAdConfig;if(!(e!=null&&e.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:e.sub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${e.textAdQuantity||0}`,"results-pa":`${e.productAdQuantity||0}`}).toString()}`,n=await(await fetch(a,{method:"GET"})).json(),h=n.product_ads.map(p=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:p})),u=n.text_ads.map(p=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:p}));return h.concat(u)}async onAdContainerViewed(t){var s;const e=t.adClientResponseItem;(s=e.admAd)!=null&&s.impression_url&&fetch(e.admAd.impression_url)}}class mi extends Zr{async getAds(t){return[]}}const gi=1e3;class bi extends Zr{constructor(e){super(e);c(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(e){this.addScriptTagToDocument()}async onQueryFetched(e,s){var a;if((((a=s.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(gi)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(e){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(s){console.error(s)}},e)}async getAds(e){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const e=document.createElement("script");e.type="text/javascript",e.src="https://s.ntv.io/serve/load.js",e.id="nativo-tag",e.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(e)}}removeScriptTagFromDocument(){const e=document.head.querySelector("#nativo-tag");e&&document.head.removeChild(e)}}const vi=600;class yi{constructor(t,e,s){c(this,"measureRequestTimeout");c(this,"measureRequestsBatched",[]);c(this,"config");c(this,"sdkInfo");c(this,"userId");c(this,"sessionId");c(this,"sendMeasureEvent",async(t,e={},s={})=>{const a={event_name:t,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...e},user:{...this.measureRequestUser,...s}};if(t==="document_clicked"){const o=JSON.stringify(a),n=`${this.baseMeasureUrl}/event`;try{const h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(!h.ok)throw new Error(`Failed to send request: ${h.status} ${h.statusText}`)}catch(h){throw console.error("Error sending MeasureRequest:",h),h}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const o=JSON.stringify({items:this.measureRequestsBatched}),n=`${this.baseMeasureUrl}/batch`;try{const h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(this.measureRequestsBatched=[],!h.ok)throw new Error(`Failed to send request: ${h.status} ${h.statusText}`);return}catch(h){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",h),h}},vi)});this.config=t,this.sdkInfo=e,this.userId=s,this.sessionId=nt(),this.sendMeasureEvent("sdk_initialized")}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const ki=r=>r.endsWith("/")?r.slice(0,-1):r,ir=r=>{let t="";if(t=r.trim(),t=t.replace(/[‘’“”]/g,s=>({"‘":"'","’":"'","“":'"',"”":'"'})[s]||s),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},Ci=500;class xi{constructor(t,e,s){c(this,"config");c(this,"userId");c(this,"parent");c(this,"searchCompletedEventTimeout");c(this,"abortController");c(this,"supplementalAbortController");c(this,"abortRequests",()=>{var t,e;(t=this.abortController)==null||t.abort("The pending search request has been cancelled."),(e=this.supplementalAbortController)==null||e.abort("The pending search request has been cancelled.")});c(this,"getSearchResponseItems",async(t,e=!1)=>{var n,h,u,l,p,C,w;let s,a="",o;return e?((n=this.supplementalAbortController)==null||n.abort("A newer search request has replaced this one."),o=new AbortController,this.supplementalAbortController=o):((h=this.abortController)==null||h.abort("A newer search request has replaced this one."),o=new AbortController,this.abortController=o),typeof t=="string"?a=ir(t):(t.searchTerm=ir(t.searchTerm),a=t.searchTerm),(u=this.parent.measureClient)==null||u.sendMeasureEvent("search_requested",{search_term:a}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:a}}),(l=this.parent.adClient)==null||l.onQuerySubmitted(typeof t=="string"?{searchTerm:a,mode:"exact"}:t),typeof t=="string"?s=await this.handleGetSearchResponseItemsWithString(a,o):s=await this.handleGetSearchResponseItemsWithObject(t,o),e||((p=this.parent.measureClient)==null||p.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:s.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var $;($=this.parent.measureClient)==null||$.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:s.data.count})},Ci),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((C=s.data.hits)==null?void 0:C.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(w=this.parent.adClient)==null||w.onQueryFetched(typeof t=="string"?{searchTerm:a,mode:"exact"}:t,s)),s});c(this,"handleGetSearchResponseItemsWithString",async(t,e)=>{var o;let s;try{s=JSON.parse(t),s={limit:this.config.searchResultsPerPage,...s}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:s});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:e.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});c(this,"handleGetSearchResponseItemsWithObject",async(t,e)=>{var o;const s={query:this.formatParamsForRequest(t),offset:t.offset||0,limit:t.limit||this.config.searchResultsPerPage||20,...t.order_by&&{order_by:t.order_by},...t.sort&&{sort:t.sort}};this.parent.store.setState({searchClientRequest:s});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:e.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=t,this.config=e,this.userId=s}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(t){const e=[];let s="should";t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(n=>{var u;const h=(u=t.facetPathsForIndexFields)==null?void 0:u[n];h&&(s="must",e.push({occur:"must",exact:{ctx:ir(h.value)}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(n=>{var u;const h=(u=t.rangeValueForIndexFields)==null?void 0:u[n];h&&(s="must",e.push({occur:"must",exact:{ctx:ir(h.value)}}))});const a=t.searchTerm,o=t.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return e.push({occur:t.mode==="exact"?"must":s,...o}),e}}var ya={},Yr={};const ka=r=>{let t;const e=new Set,s=(l,p)=>{const C=typeof l=="function"?l(t):l;if(!Object.is(C,t)){const w=t;t=p??(typeof C!="object"||C===null)?C:Object.assign({},t,C),e.forEach($=>$(t,w))}},a=()=>t,h={setState:s,getState:a,getInitialState:()=>u,subscribe:l=>(e.add(l),()=>e.delete(l))},u=t=r(s,a,h);return h},Si=r=>r?ka(r):ka;Yr.createStore=Si;var Qr={},Ca={exports:{}},H={};/**
72
+ `,a=L.createShader(L.VERTEX_SHADER),o=L.createShader(L.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(L.shaderSource(a,e),L.shaderSource(o,s),L.compileShader(a),!L.getShaderParameter(a,L.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+L.getShaderInfoLog(a));if(L.compileShader(o),!L.getShaderParameter(o,L.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+L.getShaderInfoLog(o));var n=L.createProgram();if(!n)throw new Error("Failed to create shader program");if(L.attachShader(n,a),L.attachShader(n,o),L.linkProgram(n),!L.getProgramParameter(n,L.LINK_STATUS))throw new Error("Shader program linking failed: "+L.getProgramInfoLog(n));L.useProgram(n);for(var h=137,u=new Float32Array(4*h),l=2*Math.PI/h,p=0;p<h;p++){var C=p*l;u[4*p]=0,u[4*p+1]=0,u[4*p+2]=Math.cos(C)*(ke.width/2),u[4*p+3]=Math.sin(C)*(ke.height/2)}var S=L.createBuffer();L.bindBuffer(L.ARRAY_BUFFER,S),L.bufferData(L.ARRAY_BUFFER,u,L.STATIC_DRAW);var $=L.getAttribLocation(n,"position");L.enableVertexAttribArray($),L.vertexAttribPointer($,2,L.FLOAT,!1,0,0),L.viewport(0,0,ke.width,ke.height),L.clearColor(0,0,0,1),L.clear(L.COLOR_BUFFER_BIT),L.drawArrays(L.LINES,0,2*h);var A=new Uint8ClampedArray(ke.width*ke.height*4);return L.readPixels(0,0,ke.width,ke.height,L.RGBA,L.UNSIGNED_BYTE,A),new ImageData(A,ke.width,ke.height)}catch{return new ImageData(1,1)}finally{L&&(L.bindBuffer(L.ARRAY_BUFFER,null),L.useProgram(null),L.viewport(0,0,L.drawingBufferWidth,L.drawingBufferHeight),L.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Wr(ma(r,ke.width,ke.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var ot=function(r,t,e,s){for(var a=(e-t)/s,o=0,n=0;n<s;n++)o+=r(t+(n+.5)*a);return o*a};_e("math",function(){return He(void 0,void 0,void 0,function(){return Be(this,function(r){return[2,{acos:Math.acos(.5),asin:ot(Math.asin,-1,1,97),atan:ot(Math.atan,-1,1,97),cos:ot(Math.cos,0,Math.PI,97),cosh:Math.cosh(9/7),e:Math.E,largeCos:Math.cos(1e20),largeSin:Math.sin(1e20),largeTan:Math.tan(1e20),log:Math.log(1e3),pi:Math.PI,sin:ot(Math.sin,-Math.PI,Math.PI,97),sinh:ot(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:ot(Math.tan,0,2*Math.PI,97),tanh:ot(Math.tanh,-9/7,7/9,97)}]})})});class Zr{constructor(t){c(this,"config");this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,e){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class pi extends Zr{async getAds(t){const e=this.config.admAdConfig;if(!(e!=null&&e.sub))return console.error("No admSub specified in config."),[];const a=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:e.sub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${e.textAdQuantity||0}`,"results-pa":`${e.productAdQuantity||0}`}).toString()}`,n=await(await fetch(a,{method:"GET"})).json(),h=n.product_ads.map(p=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:p})),u=n.text_ads.map(p=>({id:nt(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:p}));return h.concat(u)}async onAdContainerViewed(t){var s;const e=t.adClientResponseItem;(s=e.admAd)!=null&&s.impression_url&&fetch(e.admAd.impression_url)}}class mi extends Zr{async getAds(t){return[]}}const gi=1e3;class bi extends Zr{constructor(e){super(e);c(this,"adCallTimeout");this.addScriptTagToDocument()}async onQuerySubmitted(e){this.addScriptTagToDocument()}async onQueryFetched(e,s){var a;if((((a=s.data.hits)==null?void 0:a.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(gi)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(e){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(s){console.error(s)}},e)}async getAds(e){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const e=document.createElement("script");e.type="text/javascript",e.src="https://s.ntv.io/serve/load.js",e.id="nativo-tag",e.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(e)}}removeScriptTagFromDocument(){const e=document.head.querySelector("#nativo-tag");e&&document.head.removeChild(e)}}const vi=600;class yi{constructor(t,e,s){c(this,"measureRequestTimeout");c(this,"measureRequestsBatched",[]);c(this,"config");c(this,"sdkInfo");c(this,"userId");c(this,"sessionId");c(this,"sendMeasureEvent",async(t,e={},s={})=>{const a={event_name:t,properties:{searchcraft_index_names:this.config.indexName?[this.config.indexName]:[],searchcraft_federation_name:this.config.federationName,session_id:this.sessionId,...e},user:{...this.measureRequestUser,...s}};if(t==="document_clicked"){const o=JSON.stringify(a),n=`${this.baseMeasureUrl}/event`;try{const h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(!h.ok)throw new Error(`Failed to send request: ${h.status} ${h.statusText}`)}catch(h){throw console.error("Error sending MeasureRequest:",h),h}}else this.measureRequestsBatched.push(a),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const o=JSON.stringify({items:this.measureRequestsBatched}),n=`${this.baseMeasureUrl}/batch`;try{const h=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:o,keepalive:!0});if(this.measureRequestsBatched=[],!h.ok)throw new Error(`Failed to send request: ${h.status} ${h.statusText}`);return}catch(h){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",h),h}},vi)});this.config=t,this.sdkInfo=e,this.userId=s,this.sessionId=nt(),this.sendMeasureEvent("sdk_initialized")}get baseMeasureUrl(){return`${this.config.endpointURL}/measure`}get measureRequestUser(){return{user_id:this.userId,locale:navigator.language||"en-US",os:navigator.userAgent.includes("Windows")?"Windows":navigator.userAgent.includes("Mac")?"Mac":navigator.userAgent.includes("Linux")?"Linux":"Unknown",platform:navigator.platform||"Unknown",sdk_name:this.sdkInfo.sdkName,sdk_version:this.sdkInfo.sdkVersion,user_agent:navigator.userAgent||"Unknown"}}}const ki=r=>r.endsWith("/")?r.slice(0,-1):r,ir=r=>{let t="";if(t=r.trim(),t=t.replace(/[‘’“”]/g,s=>({"‘":"'","’":"'","“":'"',"”":'"'})[s]||s),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},Ci=500;class xi{constructor(t,e,s){c(this,"config");c(this,"userId");c(this,"parent");c(this,"searchCompletedEventTimeout");c(this,"abortController");c(this,"supplementalAbortController");c(this,"abortRequests",()=>{var t,e;(t=this.abortController)==null||t.abort("The pending search request has been cancelled."),(e=this.supplementalAbortController)==null||e.abort("The pending search request has been cancelled.")});c(this,"getSearchResponseItems",async(t,e=!1)=>{var n,h,u,l,p,C,S;let s,a="",o;return e?((n=this.supplementalAbortController)==null||n.abort("A newer search request has replaced this one."),o=new AbortController,this.supplementalAbortController=o):((h=this.abortController)==null||h.abort("A newer search request has replaced this one."),o=new AbortController,this.abortController=o),typeof t=="string"?a=ir(t):(t.searchTerm=ir(t.searchTerm),a=t.searchTerm),(u=this.parent.measureClient)==null||u.sendMeasureEvent("search_requested",{search_term:a}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:a}}),(l=this.parent.adClient)==null||l.onQuerySubmitted(typeof t=="string"?{searchTerm:a,mode:"exact"}:t),typeof t=="string"?s=await this.handleGetSearchResponseItemsWithString(a,o):s=await this.handleGetSearchResponseItemsWithObject(t,o),e||((p=this.parent.measureClient)==null||p.sendMeasureEvent("search_response_received",{search_term:a,number_of_documents:s.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var $;($=this.parent.measureClient)==null||$.sendMeasureEvent("search_completed",{search_term:a,number_of_documents:s.data.count})},Ci),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:a}}),(((C=s.data.hits)==null?void 0:C.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(S=this.parent.adClient)==null||S.onQueryFetched(typeof t=="string"?{searchTerm:a,mode:"exact"}:t,s)),s});c(this,"handleGetSearchResponseItemsWithString",async(t,e)=>{var o;let s;try{s=JSON.parse(t),s={limit:this.config.searchResultsPerPage,...s}}catch{throw new Error("Error: Query string is not valid json.")}this.parent.store.setState({searchClientRequest:s});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:e.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});c(this,"handleGetSearchResponseItemsWithObject",async(t,e)=>{var o;const s={query:this.formatParamsForRequest(t),offset:t.offset||0,limit:t.limit||this.config.searchResultsPerPage||20,...t.order_by&&{order_by:t.order_by},...t.sort&&{sort:t.sort}};this.parent.store.setState({searchClientRequest:s});const a=await fetch(this.baseSearchUrl,{method:"POST",headers:{Authorization:this.config.readKey,"Content-Type":"application/json","X-Sc-User-Id":this.userId,"X-Sc-Session-Id":((o=this.parent.measureClient)==null?void 0:o.sessionId)||nt()},body:JSON.stringify(s),signal:e.signal});if(!a.ok)throw new Error(`Error: ${a.statusText} (Status: ${a.status})`);return await a.json()});this.parent=t,this.config=e,this.userId=s}get baseSearchUrl(){return this.config.federationName?`${this.config.endpointURL}/federation/${this.config.federationName}/search`:`${this.config.endpointURL}/index/${this.config.indexName}/search`}formatParamsForRequest(t){const e=[];let s="should";t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(n=>{var u;const h=(u=t.facetPathsForIndexFields)==null?void 0:u[n];h&&(s="must",e.push({occur:"must",exact:{ctx:ir(h.value)}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(n=>{var u;const h=(u=t.rangeValueForIndexFields)==null?void 0:u[n];h&&(s="must",e.push({occur:"must",exact:{ctx:ir(h.value)}}))});const a=t.searchTerm,o=t.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return e.push({occur:t.mode==="exact"?"must":s,...o}),e}}var ya={},Yr={};const ka=r=>{let t;const e=new Set,s=(l,p)=>{const C=typeof l=="function"?l(t):l;if(!Object.is(C,t)){const S=t;t=p??(typeof C!="object"||C===null)?C:Object.assign({},t,C),e.forEach($=>$(t,S))}},a=()=>t,h={setState:s,getState:a,getInitialState:()=>u,subscribe:l=>(e.add(l),()=>e.delete(l))},u=t=r(s,a,h);return h},wi=r=>r?ka(r):ka;Yr.createStore=wi;var Qr={},Ca={exports:{}},H={};/**
73
73
  * @license React
74
74
  * react.production.js
75
75
  *
@@ -77,5 +77,5 @@ Please report this to https://github.com/markedjs/marked.`,f){const g="<p>An err
77
77
  *
78
78
  * This source code is licensed under the MIT license found in the
79
79
  * LICENSE file in the root directory of this source tree.
80
- */var Kr=Symbol.for("react.transitional.element"),wi=Symbol.for("react.portal"),Ri=Symbol.for("react.fragment"),Ei=Symbol.for("react.strict_mode"),Ti=Symbol.for("react.profiler"),Pi=Symbol.for("react.consumer"),$i=Symbol.for("react.context"),Ii=Symbol.for("react.forward_ref"),_i=Symbol.for("react.suspense"),Ai=Symbol.for("react.memo"),xa=Symbol.for("react.lazy"),Sa=Symbol.iterator;function Mi(r){return r===null||typeof r!="object"?null:(r=Sa&&r[Sa]||r["@@iterator"],typeof r=="function"?r:null)}var wa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ra=Object.assign,Ea={};function bt(r,t,e){this.props=r,this.context=t,this.refs=Ea,this.updater=e||wa}bt.prototype.isReactComponent={},bt.prototype.setState=function(r,t){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,t,"setState")},bt.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Ta(){}Ta.prototype=bt.prototype;function Xr(r,t,e){this.props=r,this.context=t,this.refs=Ea,this.updater=e||wa}var Jr=Xr.prototype=new Ta;Jr.constructor=Xr,Ra(Jr,bt.prototype),Jr.isPureReactComponent=!0;var Pa=Array.isArray,te={H:null,A:null,T:null,S:null},$a=Object.prototype.hasOwnProperty;function es(r,t,e,s,a,o){return e=o.ref,{$$typeof:Kr,type:r,key:t,ref:e!==void 0?e:null,props:o}}function Oi(r,t){return es(r.type,t,void 0,void 0,void 0,r.props)}function ts(r){return typeof r=="object"&&r!==null&&r.$$typeof===Kr}function Li(r){var t={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(e){return t[e]})}var Ia=/\/+/g;function rs(r,t){return typeof r=="object"&&r!==null&&r.key!=null?Li(""+r.key):t.toString(36)}function _a(){}function Fi(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(_a,_a):(r.status="pending",r.then(function(t){r.status==="pending"&&(r.status="fulfilled",r.value=t)},function(t){r.status==="pending"&&(r.status="rejected",r.reason=t)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function vt(r,t,e,s,a){var o=typeof r;(o==="undefined"||o==="boolean")&&(r=null);var n=!1;if(r===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(r.$$typeof){case Kr:case wi:n=!0;break;case xa:return n=r._init,vt(n(r._payload),t,e,s,a)}}if(n)return a=a(r),n=s===""?"."+rs(r,0):s,Pa(a)?(e="",n!=null&&(e=n.replace(Ia,"$&/")+"/"),vt(a,t,e,"",function(l){return l})):a!=null&&(ts(a)&&(a=Oi(a,e+(a.key==null||r&&r.key===a.key?"":(""+a.key).replace(Ia,"$&/")+"/")+n)),t.push(a)),1;n=0;var h=s===""?".":s+":";if(Pa(r))for(var u=0;u<r.length;u++)s=r[u],o=h+rs(s,u),n+=vt(s,t,e,o,a);else if(u=Mi(r),typeof u=="function")for(r=u.call(r),u=0;!(s=r.next()).done;)s=s.value,o=h+rs(s,u++),n+=vt(s,t,e,o,a);else if(o==="object"){if(typeof r.then=="function")return vt(Fi(r),t,e,s,a);throw t=String(r),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function cr(r,t,e){if(r==null)return r;var s=[],a=0;return vt(r,s,"","",function(o){return t.call(e,o,a++)}),s}function Di(r){if(r._status===-1){var t=r._result;t=t(),t.then(function(e){(r._status===0||r._status===-1)&&(r._status=1,r._result=e)},function(e){(r._status===0||r._status===-1)&&(r._status=2,r._result=e)}),r._status===-1&&(r._status=0,r._result=t)}if(r._status===1)return r._result.default;throw r._result}var Aa=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)};function Ni(){}H.Children={map:cr,forEach:function(r,t,e){cr(r,function(){t.apply(this,arguments)},e)},count:function(r){var t=0;return cr(r,function(){t++}),t},toArray:function(r){return cr(r,function(t){return t})||[]},only:function(r){if(!ts(r))throw Error("React.Children.only expected to receive a single React element child.");return r}},H.Component=bt,H.Fragment=Ri,H.Profiler=Ti,H.PureComponent=Xr,H.StrictMode=Ei,H.Suspense=_i,H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te,H.act=function(){throw Error("act(...) is not supported in production builds of React.")},H.cache=function(r){return function(){return r.apply(null,arguments)}},H.cloneElement=function(r,t,e){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var s=Ra({},r.props),a=r.key,o=void 0;if(t!=null)for(n in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(a=""+t.key),t)!$a.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=e;else if(1<n){for(var h=Array(n),u=0;u<n;u++)h[u]=arguments[u+2];s.children=h}return es(r.type,a,void 0,void 0,o,s)},H.createContext=function(r){return r={$$typeof:$i,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:Pi,_context:r},r},H.createElement=function(r,t,e){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)$a.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=e;else if(1<n){for(var h=Array(n),u=0;u<n;u++)h[u]=arguments[u+2];a.children=h}if(r&&r.defaultProps)for(s in n=r.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return es(r,o,void 0,void 0,null,a)},H.createRef=function(){return{current:null}},H.forwardRef=function(r){return{$$typeof:Ii,render:r}},H.isValidElement=ts,H.lazy=function(r){return{$$typeof:xa,_payload:{_status:-1,_result:r},_init:Di}},H.memo=function(r,t){return{$$typeof:Ai,type:r,compare:t===void 0?null:t}},H.startTransition=function(r){var t=te.T,e={};te.T=e;try{var s=r(),a=te.S;a!==null&&a(e,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Ni,Aa)}catch(o){Aa(o)}finally{te.T=t}},H.unstable_useCacheRefresh=function(){return te.H.useCacheRefresh()},H.use=function(r){return te.H.use(r)},H.useActionState=function(r,t,e){return te.H.useActionState(r,t,e)},H.useCallback=function(r,t){return te.H.useCallback(r,t)},H.useContext=function(r){return te.H.useContext(r)},H.useDebugValue=function(){},H.useDeferredValue=function(r,t){return te.H.useDeferredValue(r,t)},H.useEffect=function(r,t){return te.H.useEffect(r,t)},H.useId=function(){return te.H.useId()},H.useImperativeHandle=function(r,t,e){return te.H.useImperativeHandle(r,t,e)},H.useInsertionEffect=function(r,t){return te.H.useInsertionEffect(r,t)},H.useLayoutEffect=function(r,t){return te.H.useLayoutEffect(r,t)},H.useMemo=function(r,t){return te.H.useMemo(r,t)},H.useOptimistic=function(r,t){return te.H.useOptimistic(r,t)},H.useReducer=function(r,t,e){return te.H.useReducer(r,t,e)},H.useRef=function(r){return te.H.useRef(r)},H.useState=function(r){return te.H.useState(r)},H.useSyncExternalStore=function(r,t,e){return te.H.useSyncExternalStore(r,t,e)},H.useTransition=function(){return te.H.useTransition()},H.version="19.0.0",Ca.exports=H;var Ma=Ca.exports,zi=Yr;const Hi=r=>r;function Oa(r,t=Hi){const e=Ma.useSyncExternalStore(r.subscribe,()=>t(r.getState()),()=>t(r.getInitialState()));return Ma.useDebugValue(e),e}const La=r=>{const t=zi.createStore(r),e=s=>Oa(t,s);return Object.assign(e,t),e},Ui=r=>r?La(r):La;Qr.create=Ui,Qr.useStore=Oa,function(r){var t=Yr,e=Qr;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(e).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[s]}})})}(ya);const Bi=1e3;class qi{constructor(t,e){c(this,"set");c(this,"get");c(this,"abortController");c(this,"timeout");this.get=t,this.set=e}streamSummaryData(){var s;const t=async()=>{var u,l,p,C,w,$;const a=this.get(),o=(u=a.core)==null?void 0:u.config;if(!o){console.error("Could not stream summary data, no config found.");return}if(!o.cortexURL){console.error("Could not stream summary data, cortexURL was not specified in the config.");return}const n=(l=a.core)==null?void 0:l.config.indexName;if(!a.hasSummaryBox||!n)return;(p=this.abortController)==null||p.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,summary:""});const h=`${o.cortexURL.replace(/\/$/,"")}/api/search/summary`;try{const A=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((C=a.core)==null?void 0:C.config.readKey)||""},body:JSON.stringify({searchQuery:a.searchClientRequest,summaryInstructionsPrompt:(w=a.core)==null?void 0:w.config.summaryInstructionsPrompt,indexName:n,endpointUrl:($=a.core)==null?void 0:$.config.endpointURL}),signal:this.abortController.signal});if(!A)throw new Error("Invalid fetch response");if(!A.body)throw new Error("Invalid fetch response");if(!A.ok){if(A.status===403){console.warn("Please contact Searchcraft to enable AI summaries with your account"),this.set({isSummaryLoading:!1,isSummaryNotEnabled:!0});return}throw new Error(`HTTP ${A.status}`)}const N=A.body.getReader(),D=new TextDecoder;let P=!1;do{const{done:I,value:U}=await N.read();P=I;const j=D.decode(U,{stream:!0});this.set(ae=>({isSummaryLoading:!1,summary:`${ae.summary}${j}`}))}while(!P)}catch(A){A instanceof Error&&console.error(A.message),this.set({isSummaryLoading:!1})}},e=((s=this.get().core)==null?void 0:s.config.summaryDebounceDelay)||Bi;clearTimeout(this.timeout),this.timeout=setTimeout(()=>t(),e)}}const Fa={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],cachedSearchResponseFacetPrime:void 0,cachedSupplementalFacetPrime:void 0,cachedSearchResponseTimeTaken:void 0,cachedSearchResultsCount:void 0,cachedSearchClientRequestProperties:void 0,searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,summary:"",hasSummaryBox:!1,summaryClient:void 0,isSummaryLoading:!1,isSummaryNotEnabled:!1},lr={},Vi=(r,t={})=>{const e=r||Hr;if(lr[e])return lr[e].setState(t),lr[e];const s=ya.createStore((a,o)=>{const n={addFacetPathsForIndexField:u=>{a(l=>({facetPathsForIndexFields:{...l.facetPathsForIndexFields,[u.fieldName]:u},searchResultsPage:1}))},addRangeValueForIndexField:u=>a(l=>({rangeValueForIndexFields:{...l.rangeValueForIndexFields,[u.fieldName]:u}})),removeFacetPathsForIndexField:u=>{console.log("[FACET] removeFacetPathsForIndexField",{fieldName:u,currentPage:o().searchResultsPage,stackTrace:new Error().stack}),a(l=>{const p=l.facetPathsForIndexFields;return delete p[u],{facetPathsForIndexFields:{...p},searchResultsPage:1}})},removeRangeValueForIndexField:u=>a(l=>{const p=l.rangeValueForIndexFields;return delete p[u],{rangeValueForIndexFields:{...p}}}),resetSearchValues:()=>{var l,p;const u=o();(p=(l=u.core)==null?void 0:l.searchClient)==null||p.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems]})},search:async u=>{var N,D,P;const l=o();if(!l.core)throw new Error("Searchcraft instance is not initialized.");l.core.config.cortexURL&&!(u!=null&&u.skipSummary)&&((N=l.summaryClient)==null||N.streamSummaryData());const p=typeof l.cachedSearchClientRequestProperties=="string"&&l.searchTerm.trim()==="",C=Object.keys(l.facetPathsForIndexFields).length>0||Object.keys(l.rangeValueForIndexFields).length>0,w=l.searchResultsPage!==1,$=l.searchMode!=="fuzzy";if(!l.searchTerm.trim()){if(p&&(C||w||$)){const I=JSON.parse(l.cachedSearchClientRequestProperties);a({isSearchInProgress:!0});const j=[...Array.isArray(I.query)?I.query.filter(Y=>!Y.occur):[I.query]];l.facetPathsForIndexFields&&Object.keys(l.facetPathsForIndexFields).forEach(Y=>{var Q;const se=(Q=l.facetPathsForIndexFields)==null?void 0:Q[Y];se&&j.push({occur:"must",exact:{ctx:se.value}})}),l.rangeValueForIndexFields&&Object.keys(l.rangeValueForIndexFields).forEach(Y=>{var Q;const se=(Q=l.rangeValueForIndexFields)==null?void 0:Q[Y];se&&j.push({occur:"must",exact:{ctx:se.value}})});const ae={...I,query:j,offset:l.searchResultsPerPage?l.searchResultsPerPage*(l.searchResultsPage-1):0,limit:l.searchResultsPerPage};l.core.getResponseItems({requestProperties:JSON.stringify(ae),shouldCacheResultsForEmptyState:!1});return}(P=(D=l.core)==null?void 0:D.searchClient)==null||P.abortRequests(),a({searchClientResponseItems:[...l.cachedSearchClientResponseItems],adClientResponseItems:[...l.cachedAdClientResponseItems],searchResponseFacetPrime:l.cachedSearchResponseFacetPrime,supplementalFacetPrime:l.cachedSupplementalFacetPrime,searchResponseTimeTaken:l.cachedSearchResponseTimeTaken,searchResultsCount:l.cachedSearchResultsCount||0,searchClientRequestProperties:l.cachedSearchClientRequestProperties,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const A={searchTerm:l.searchTerm,mode:l.searchMode,sort:l.sortType,order_by:l.orderByField,facetPathsForIndexFields:l.facetPathsForIndexFields,rangeValueForIndexFields:l.rangeValueForIndexFields,offset:l.searchResultsPerPage?l.searchResultsPerPage*(l.searchResultsPage-1):0,limit:l.searchResultsPerPage};l.core.getResponseItems({requestProperties:A,shouldCacheResultsForEmptyState:!1})},setPopoverVisibility:u=>a({isPopoverVisible:u}),setSearchMode:u=>a({searchMode:u}),setSortOrder:({orderByField:u,sortType:l})=>a({sortType:l,orderByField:u}),setSearchTerm:u=>{var p;const l=o();u.length===0&&((p=l.core)==null||p.handleInputCleared()),a({searchTerm:u,searchResultsPage:1,...u.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...l.cachedSearchClientResponseItems],adClientResponseItems:[...l.cachedAdClientResponseItems],searchResponseFacetPrime:l.cachedSearchResponseFacetPrime,supplementalFacetPrime:l.cachedSupplementalFacetPrime,searchResponseTimeTaken:l.cachedSearchResponseTimeTaken,searchResultsCount:l.cachedSearchResultsCount||0,searchClientRequestProperties:l.cachedSearchClientRequestProperties}})},setSearchResultsCount:u=>a({searchResultsCount:u}),setSearchResultsPage:async u=>{a({searchResultsPage:u}),await n.search({skipSummary:!0})},setSearchResultsPerPage:async u=>{a({searchResultsPerPage:u}),await n.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(u,l)=>{const{hotkey:p,hotkeyModifier:C}=Fa;a({hotkey:u||p,hotkeyModifier:l||C})}};return{...Fa,...t,...n,summaryClient:new qi(o,a)}});return lr[e]=s,s};class ji{constructor(t,e,s){c(this,"store");c(this,"config");c(this,"measureClient");c(this,"searchClient");c(this,"adClient");c(this,"userId");c(this,"requestTimeout");c(this,"subscriptionEvents",{});c(this,"getResponseItems",t=>{const e=async()=>{(async()=>{var n,h;if(!this.searchClient){console.error("Search client was not initialized.");return}let s;try{s=await this.searchClient.getSearchResponseItems(t.requestProperties,!1)}catch(u){nr.info(`Search request error: ${u}`);return}if(!s){nr.info("Search request error: Search response was undefined");return}const a=(s.data.hits||[]).filter(u=>!!u.doc).map(u=>({id:nt(),document:u.doc||{id:-1},source_index:u.source_index,type:"SearchDocument"}));let o;if(typeof t.requestProperties=="object"){if(t.requestProperties.facetPathsForIndexFields&&Object.keys(t.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:u,...l}=t.requestProperties;try{o=await((n=this==null?void 0:this.searchClient)==null?void 0:n.getSearchResponseItems(l,!0))}catch(p){nr.info(`Search request error: ${p}`);return}}}else if(typeof t.requestProperties=="string"){const u=JSON.parse(t.requestProperties),l=Array.isArray(u.query)?u.query:[u.query];if(l.length>1){const p=l.filter(w=>w.occur!=="must"),C={...u,query:p.length>0?p:l.slice(0,1)};try{o=await((h=this==null?void 0:this.searchClient)==null?void 0:h.getSearchResponseItems(JSON.stringify(C),!0))}catch(w){nr.info(`Search request error: ${w}`);return}}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:s.data.time_taken,searchResultsCount:s.data.count,searchResponseFacetPrime:s.data.facets,supplementalFacetPrime:o==null?void 0:o.data.facets,searchClientRequestProperties:t.requestProperties,...t.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a,cachedSearchResponseFacetPrime:s.data.facets,cachedSupplementalFacetPrime:o==null?void 0:o.data.facets,cachedSearchResponseTimeTaken:s.data.time_taken,cachedSearchResultsCount:s.data.count,cachedSearchClientRequestProperties:t.requestProperties}})})(),(async()=>{if(this.adClient&&typeof t.requestProperties!="string"){const s=await this.adClient.getAds(t.requestProperties);this.store.setState({adClientResponseItems:s,...t.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:s}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(e,this.config.searchDebounceDelay):e()});if(!t.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!t.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!t.indexName&&!t.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(t.indexName&&t.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...t,endpointURL:ki(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&e.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=Vi(s,{core:this,searchResultsPerPage:t.searchResultsPerPage||20}),pe.addCoreInstance(this,s),(async a=>{typeof window<"u"&&await this.initClients(a,e),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(t,e){let s=this.config.measureUserIdentifier;s||(s=await ri()),this.measureClient=new yi(t,e,s),this.searchClient=new xi(this,t,s),t.customAdConfig?this.adClient=new mi(t):t.nativoConfig?this.adClient=new bi(t):t.admAdConfig&&(this.adClient=new pi(t)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(t,e){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(e)})}subscribe(t,e){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(e),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==e)}}handleAdContainerRendered(t){var e;(e=this.adClient)==null||e.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var e;(e=this.adClient)==null||e.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}const Wi="@searchcraft/vue-sdk",Gi="0.12.2",ss="routerLink",Da="navManager",Zi="router",Yi="aria",Lt=Symbol(),Na={default:Lt},za=r=>(r==null?void 0:r.split(" "))||[],Qi=(r,t,e=[])=>{var s;return[...Array.from(((s=r.value)==null?void 0:s.classList)||[]),...e].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},Oe=(r,t,e=[],s=[],a,o)=>{t!==void 0&&t();const n=fe.defineComponent((h,{attrs:u,slots:l,emit:p})=>{var P;const C=fe.ref(),w=new Set(za(u.class)),$=fe.getCurrentInstance(),N=((P=$==null?void 0:$.appContext)==null?void 0:P.provides[Da])?fe.inject(Da):void 0,D=I=>{const{routerLink:U}=h;if(U!==Lt)if(N!==void 0){I.preventDefault();let j={event:I};for(const ae in h){const Y=h[ae];h.hasOwnProperty(ae)&&ae.startsWith(Zi)&&Y!==Lt&&(j[ae]=Y)}N.navigate(j)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{h[a],za(u.class).forEach(Y=>{w.add(Y)});const I=h.onClick,U=Y=>{I!==void 0&&I(Y),Y.defaultPrevented||D(Y)};let j={ref:C,class:Qi(C,w),onClick:U};for(const Y in h){const se=h[Y];(h.hasOwnProperty(Y)&&se!==Lt||Y.startsWith(Yi))&&(j[Y]=se);const Q="on"+Y.slice(0,1).toUpperCase()+Y.slice(1),Le=u[Q];C.value&&u.hasOwnProperty(Q)&&"addEventListener"in C.value&&C.value.addEventListener(Y,Le)}return ss in h&&h[ss]!==Lt&&(j={...j,href:h[ss]}),fe.h(r,j,l.default&&l.default())}});if(typeof n!="function"){let h=[],u={};u.ROUTER_LINK_VALUE=Na,e.forEach(l=>u[l]=Na),h=s,n.name=r,n.emits=h,n.props=u}return n},Ki=Oe("searchcraft-filter-panel",()=>{},["searchcraftId","items"]),Xi=Oe("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","value","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Ji=Oe("searchcraft-pagination",()=>{},["searchcraftId"]),ec=Oe("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),tc=Oe("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior"]),rc=Oe("searchcraft-results-info",()=>{},["template","searchcraftId"]),sc=Oe("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),ac=Oe("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),nc=Oe("searchcraft-summary-box",()=>{},["searchcraftId"]),oc=Oe("searchcraft-theme",()=>{}),ic=sc,cc=Ki,lc=Xi,uc=ec,hc=tc,dc=rc,fc=oc,pc=Ji,mc=ac,gc=nc;class bc extends ji{constructor(t,e=void 0){super(t,{sdkName:Wi,sdkVersion:Gi},e)}}da(),X.Searchcraft=bc,X.SearchcraftFilterPanel=cc,X.SearchcraftInputForm=lc,X.SearchcraftPagination=pc,X.SearchcraftPopoverButton=uc,X.SearchcraftPopoverForm=hc,X.SearchcraftResultsInfo=dc,X.SearchcraftSearchResults=ic,X.SearchcraftSearchResultsPerPage=mc,X.SearchcraftSummaryBox=gc,X.SearchcraftTheme=fc,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
80
+ */var Kr=Symbol.for("react.transitional.element"),Si=Symbol.for("react.portal"),Ri=Symbol.for("react.fragment"),Ei=Symbol.for("react.strict_mode"),Ti=Symbol.for("react.profiler"),Pi=Symbol.for("react.consumer"),$i=Symbol.for("react.context"),Ii=Symbol.for("react.forward_ref"),_i=Symbol.for("react.suspense"),Ai=Symbol.for("react.memo"),xa=Symbol.for("react.lazy"),wa=Symbol.iterator;function Mi(r){return r===null||typeof r!="object"?null:(r=wa&&r[wa]||r["@@iterator"],typeof r=="function"?r:null)}var Sa={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Ra=Object.assign,Ea={};function bt(r,t,e){this.props=r,this.context=t,this.refs=Ea,this.updater=e||Sa}bt.prototype.isReactComponent={},bt.prototype.setState=function(r,t){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,t,"setState")},bt.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Ta(){}Ta.prototype=bt.prototype;function Xr(r,t,e){this.props=r,this.context=t,this.refs=Ea,this.updater=e||Sa}var Jr=Xr.prototype=new Ta;Jr.constructor=Xr,Ra(Jr,bt.prototype),Jr.isPureReactComponent=!0;var Pa=Array.isArray,te={H:null,A:null,T:null,S:null},$a=Object.prototype.hasOwnProperty;function es(r,t,e,s,a,o){return e=o.ref,{$$typeof:Kr,type:r,key:t,ref:e!==void 0?e:null,props:o}}function Oi(r,t){return es(r.type,t,void 0,void 0,void 0,r.props)}function ts(r){return typeof r=="object"&&r!==null&&r.$$typeof===Kr}function Fi(r){var t={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(e){return t[e]})}var Ia=/\/+/g;function rs(r,t){return typeof r=="object"&&r!==null&&r.key!=null?Fi(""+r.key):t.toString(36)}function _a(){}function Li(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(_a,_a):(r.status="pending",r.then(function(t){r.status==="pending"&&(r.status="fulfilled",r.value=t)},function(t){r.status==="pending"&&(r.status="rejected",r.reason=t)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function vt(r,t,e,s,a){var o=typeof r;(o==="undefined"||o==="boolean")&&(r=null);var n=!1;if(r===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(r.$$typeof){case Kr:case Si:n=!0;break;case xa:return n=r._init,vt(n(r._payload),t,e,s,a)}}if(n)return a=a(r),n=s===""?"."+rs(r,0):s,Pa(a)?(e="",n!=null&&(e=n.replace(Ia,"$&/")+"/"),vt(a,t,e,"",function(l){return l})):a!=null&&(ts(a)&&(a=Oi(a,e+(a.key==null||r&&r.key===a.key?"":(""+a.key).replace(Ia,"$&/")+"/")+n)),t.push(a)),1;n=0;var h=s===""?".":s+":";if(Pa(r))for(var u=0;u<r.length;u++)s=r[u],o=h+rs(s,u),n+=vt(s,t,e,o,a);else if(u=Mi(r),typeof u=="function")for(r=u.call(r),u=0;!(s=r.next()).done;)s=s.value,o=h+rs(s,u++),n+=vt(s,t,e,o,a);else if(o==="object"){if(typeof r.then=="function")return vt(Li(r),t,e,s,a);throw t=String(r),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function cr(r,t,e){if(r==null)return r;var s=[],a=0;return vt(r,s,"","",function(o){return t.call(e,o,a++)}),s}function Di(r){if(r._status===-1){var t=r._result;t=t(),t.then(function(e){(r._status===0||r._status===-1)&&(r._status=1,r._result=e)},function(e){(r._status===0||r._status===-1)&&(r._status=2,r._result=e)}),r._status===-1&&(r._status=0,r._result=t)}if(r._status===1)return r._result.default;throw r._result}var Aa=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)};function Ni(){}H.Children={map:cr,forEach:function(r,t,e){cr(r,function(){t.apply(this,arguments)},e)},count:function(r){var t=0;return cr(r,function(){t++}),t},toArray:function(r){return cr(r,function(t){return t})||[]},only:function(r){if(!ts(r))throw Error("React.Children.only expected to receive a single React element child.");return r}},H.Component=bt,H.Fragment=Ri,H.Profiler=Ti,H.PureComponent=Xr,H.StrictMode=Ei,H.Suspense=_i,H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=te,H.act=function(){throw Error("act(...) is not supported in production builds of React.")},H.cache=function(r){return function(){return r.apply(null,arguments)}},H.cloneElement=function(r,t,e){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var s=Ra({},r.props),a=r.key,o=void 0;if(t!=null)for(n in t.ref!==void 0&&(o=void 0),t.key!==void 0&&(a=""+t.key),t)!$a.call(t,n)||n==="key"||n==="__self"||n==="__source"||n==="ref"&&t.ref===void 0||(s[n]=t[n]);var n=arguments.length-2;if(n===1)s.children=e;else if(1<n){for(var h=Array(n),u=0;u<n;u++)h[u]=arguments[u+2];s.children=h}return es(r.type,a,void 0,void 0,o,s)},H.createContext=function(r){return r={$$typeof:$i,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:Pi,_context:r},r},H.createElement=function(r,t,e){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)$a.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=e;else if(1<n){for(var h=Array(n),u=0;u<n;u++)h[u]=arguments[u+2];a.children=h}if(r&&r.defaultProps)for(s in n=r.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return es(r,o,void 0,void 0,null,a)},H.createRef=function(){return{current:null}},H.forwardRef=function(r){return{$$typeof:Ii,render:r}},H.isValidElement=ts,H.lazy=function(r){return{$$typeof:xa,_payload:{_status:-1,_result:r},_init:Di}},H.memo=function(r,t){return{$$typeof:Ai,type:r,compare:t===void 0?null:t}},H.startTransition=function(r){var t=te.T,e={};te.T=e;try{var s=r(),a=te.S;a!==null&&a(e,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Ni,Aa)}catch(o){Aa(o)}finally{te.T=t}},H.unstable_useCacheRefresh=function(){return te.H.useCacheRefresh()},H.use=function(r){return te.H.use(r)},H.useActionState=function(r,t,e){return te.H.useActionState(r,t,e)},H.useCallback=function(r,t){return te.H.useCallback(r,t)},H.useContext=function(r){return te.H.useContext(r)},H.useDebugValue=function(){},H.useDeferredValue=function(r,t){return te.H.useDeferredValue(r,t)},H.useEffect=function(r,t){return te.H.useEffect(r,t)},H.useId=function(){return te.H.useId()},H.useImperativeHandle=function(r,t,e){return te.H.useImperativeHandle(r,t,e)},H.useInsertionEffect=function(r,t){return te.H.useInsertionEffect(r,t)},H.useLayoutEffect=function(r,t){return te.H.useLayoutEffect(r,t)},H.useMemo=function(r,t){return te.H.useMemo(r,t)},H.useOptimistic=function(r,t){return te.H.useOptimistic(r,t)},H.useReducer=function(r,t,e){return te.H.useReducer(r,t,e)},H.useRef=function(r){return te.H.useRef(r)},H.useState=function(r){return te.H.useState(r)},H.useSyncExternalStore=function(r,t,e){return te.H.useSyncExternalStore(r,t,e)},H.useTransition=function(){return te.H.useTransition()},H.version="19.0.0",Ca.exports=H;var Ma=Ca.exports,zi=Yr;const Hi=r=>r;function Oa(r,t=Hi){const e=Ma.useSyncExternalStore(r.subscribe,()=>t(r.getState()),()=>t(r.getInitialState()));return Ma.useDebugValue(e),e}const Fa=r=>{const t=zi.createStore(r),e=s=>Oa(t,s);return Object.assign(e,t),e},Bi=r=>r?Fa(r):Fa;Qr.create=Bi,Qr.useStore=Oa,function(r){var t=Yr,e=Qr;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(e).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(r,s)&&Object.defineProperty(r,s,{enumerable:!0,get:function(){return e[s]}})})}(ya);const Ui=1e3;class Vi{constructor(t,e){c(this,"set");c(this,"get");c(this,"abortController");c(this,"timeout");this.get=t,this.set=e}streamSummaryData(){var s;const t=async()=>{var u,l,p,C,S,$;const a=this.get(),o=(u=a.core)==null?void 0:u.config;if(!o){console.error("Could not stream summary data, no config found.");return}if(!o.cortexURL){console.error("Could not stream summary data, cortexURL was not specified in the config.");return}const n=(l=a.core)==null?void 0:l.config.indexName;if(!a.hasSummaryBox||!n)return;(p=this.abortController)==null||p.abort("A newer request has replaced this one."),this.abortController=new AbortController,this.set({isSummaryLoading:!0,summary:""});const h=`${o.cortexURL.replace(/\/$/,"")}/api/search/summary`;try{const A=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:((C=a.core)==null?void 0:C.config.readKey)||""},body:JSON.stringify({searchQuery:a.searchClientRequest,summaryInstructionsPrompt:(S=a.core)==null?void 0:S.config.summaryInstructionsPrompt,indexName:n,endpointUrl:($=a.core)==null?void 0:$.config.endpointURL}),signal:this.abortController.signal});if(!A)throw new Error("Invalid fetch response");if(!A.body)throw new Error("Invalid fetch response");if(!A.ok){if(A.status===403){console.warn("Please contact Searchcraft to enable AI summaries with your account"),this.set({isSummaryLoading:!1,isSummaryNotEnabled:!0});return}throw new Error(`HTTP ${A.status}`)}const N=A.body.getReader(),D=new TextDecoder;let P=!1;do{const{done:I,value:B}=await N.read();P=I;const j=D.decode(B,{stream:!0});this.set(ae=>({isSummaryLoading:!1,summary:`${ae.summary}${j}`}))}while(!P)}catch(A){A instanceof Error&&console.error(A.message),this.set({isSummaryLoading:!1})}},e=((s=this.get().core)==null?void 0:s.config.summaryDebounceDelay)||Ui;clearTimeout(this.timeout),this.timeout=setTimeout(()=>t(),e)}}const La={adClientResponseItems:[],cachedAdClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",facetPathsForIndexFields:{},isFilterPanelVisible:!0,isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientRequestProperties:void 0,searchClientResponseItems:[],cachedSearchClientResponseItems:[],cachedSearchResponseFacetPrime:void 0,cachedSupplementalFacetPrime:void 0,cachedSearchResponseTimeTaken:void 0,cachedSearchResultsCount:void 0,cachedSearchClientRequestProperties:void 0,searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,summary:"",hasSummaryBox:!1,summaryClient:void 0,isSummaryLoading:!1,isSummaryNotEnabled:!1},lr={},qi=(r,t={})=>{const e=r||Hr;if(lr[e])return lr[e].setState(t),lr[e];const s=ya.createStore((a,o)=>{const n={addFacetPathsForIndexField:u=>{a(l=>({facetPathsForIndexFields:{...l.facetPathsForIndexFields,[u.fieldName]:u},searchResultsPage:1}))},addRangeValueForIndexField:u=>a(l=>({rangeValueForIndexFields:{...l.rangeValueForIndexFields,[u.fieldName]:u}})),removeFacetPathsForIndexField:u=>{console.log("[FACET] removeFacetPathsForIndexField",{fieldName:u,currentPage:o().searchResultsPage,stackTrace:new Error().stack}),a(l=>{const p=l.facetPathsForIndexFields;return delete p[u],{facetPathsForIndexFields:{...p},searchResultsPage:1}})},removeRangeValueForIndexField:u=>a(l=>{const p=l.rangeValueForIndexFields;return delete p[u],{rangeValueForIndexFields:{...p}}}),resetSearchValues:()=>{var l,p;const u=o();(p=(l=u.core)==null?void 0:l.searchClient)==null||p.abortRequests(),a({searchTerm:"",searchResultsPage:1,searchClientResponseItems:[...u.cachedSearchClientResponseItems],adClientResponseItems:[...u.cachedAdClientResponseItems]})},search:async u=>{var N,D,P;const l=o();if(!l.core)throw new Error("Searchcraft instance is not initialized.");l.core.config.cortexURL&&!(u!=null&&u.skipSummary)&&((N=l.summaryClient)==null||N.streamSummaryData());const p=typeof l.cachedSearchClientRequestProperties=="string"&&l.searchTerm.trim()==="",C=Object.keys(l.facetPathsForIndexFields).length>0||Object.keys(l.rangeValueForIndexFields).length>0,S=l.searchResultsPage!==1,$=l.searchMode!=="fuzzy";if(!l.searchTerm.trim()){if(p&&(C||S||$)){const I=JSON.parse(l.cachedSearchClientRequestProperties);a({isSearchInProgress:!0});const j=[...Array.isArray(I.query)?I.query.filter(Y=>!Y.occur):[I.query]];l.facetPathsForIndexFields&&Object.keys(l.facetPathsForIndexFields).forEach(Y=>{var Q;const se=(Q=l.facetPathsForIndexFields)==null?void 0:Q[Y];se&&j.push({occur:"must",exact:{ctx:se.value}})}),l.rangeValueForIndexFields&&Object.keys(l.rangeValueForIndexFields).forEach(Y=>{var Q;const se=(Q=l.rangeValueForIndexFields)==null?void 0:Q[Y];se&&j.push({occur:"must",exact:{ctx:se.value}})});const ae={...I,query:j,offset:l.searchResultsPerPage?l.searchResultsPerPage*(l.searchResultsPage-1):0,limit:l.searchResultsPerPage};l.core.getResponseItems({requestProperties:JSON.stringify(ae),shouldCacheResultsForEmptyState:!1});return}(P=(D=l.core)==null?void 0:D.searchClient)==null||P.abortRequests(),a({searchClientResponseItems:[...l.cachedSearchClientResponseItems],adClientResponseItems:[...l.cachedAdClientResponseItems],searchResponseFacetPrime:l.cachedSearchResponseFacetPrime,supplementalFacetPrime:l.cachedSupplementalFacetPrime,searchResponseTimeTaken:l.cachedSearchResponseTimeTaken,searchResultsCount:l.cachedSearchResultsCount||0,searchClientRequestProperties:l.cachedSearchClientRequestProperties,searchResultsPage:1,searchTerm:""});return}a({isSearchInProgress:!0});const A={searchTerm:l.searchTerm,mode:l.searchMode,sort:l.sortType,order_by:l.orderByField,facetPathsForIndexFields:l.facetPathsForIndexFields,rangeValueForIndexFields:l.rangeValueForIndexFields,offset:l.searchResultsPerPage?l.searchResultsPerPage*(l.searchResultsPage-1):0,limit:l.searchResultsPerPage};l.core.getResponseItems({requestProperties:A,shouldCacheResultsForEmptyState:!1})},setFilterPanelVisibility:u=>a({isFilterPanelVisible:u}),setPopoverVisibility:u=>a({isPopoverVisible:u}),setSearchMode:u=>a({searchMode:u}),setSortOrder:({orderByField:u,sortType:l})=>a({sortType:l,orderByField:u}),setSearchTerm:u=>{var p;const l=o();u.length===0&&((p=l.core)==null||p.handleInputCleared()),a({searchTerm:u,searchResultsPage:1,...u.trim().length===0&&{searchMode:"fuzzy",sortType:null,orderByField:null,searchClientResponseItems:[...l.cachedSearchClientResponseItems],adClientResponseItems:[...l.cachedAdClientResponseItems],searchResponseFacetPrime:l.cachedSearchResponseFacetPrime,supplementalFacetPrime:l.cachedSupplementalFacetPrime,searchResponseTimeTaken:l.cachedSearchResponseTimeTaken,searchResultsCount:l.cachedSearchResultsCount||0,searchClientRequestProperties:l.cachedSearchClientRequestProperties}})},setSearchResultsCount:u=>a({searchResultsCount:u}),setSearchResultsPage:async u=>{a({searchResultsPage:u}),await n.search({skipSummary:!0})},setSearchResultsPerPage:async u=>{a({searchResultsPerPage:u}),await n.search({skipSummary:!0})},setHotKeyAndHotKeyModifier:(u,l)=>{const{hotkey:p,hotkeyModifier:C}=La;a({hotkey:u||p,hotkeyModifier:l||C})}};return{...La,...t,...n,summaryClient:new Vi(o,a)}});return lr[e]=s,s};class ji{constructor(t,e,s){c(this,"store");c(this,"config");c(this,"measureClient");c(this,"searchClient");c(this,"adClient");c(this,"userId");c(this,"requestTimeout");c(this,"subscriptionEvents",{});c(this,"getResponseItems",t=>{const e=async()=>{(async()=>{var n,h;if(!this.searchClient){console.error("Search client was not initialized.");return}let s;try{s=await this.searchClient.getSearchResponseItems(t.requestProperties,!1)}catch(u){nr.info(`Search request error: ${u}`);return}if(!s){nr.info("Search request error: Search response was undefined");return}const a=(s.data.hits||[]).filter(u=>!!u.doc).map(u=>({id:nt(),document:u.doc||{id:-1},source_index:u.source_index,type:"SearchDocument"}));let o;if(typeof t.requestProperties=="object"){if(t.requestProperties.facetPathsForIndexFields&&Object.keys(t.requestProperties.facetPathsForIndexFields).length>0){const{facetPathsForIndexFields:u,...l}=t.requestProperties;try{o=await((n=this==null?void 0:this.searchClient)==null?void 0:n.getSearchResponseItems(l,!0))}catch(p){nr.info(`Search request error: ${p}`);return}}}else if(typeof t.requestProperties=="string"){const u=JSON.parse(t.requestProperties),l=Array.isArray(u.query)?u.query:[u.query];if(l.length>1){const p=l.filter(S=>S.occur!=="must"),C={...u,query:p.length>0?p:l.slice(0,1)};try{o=await((h=this==null?void 0:this.searchClient)==null?void 0:h.getSearchResponseItems(JSON.stringify(C),!0))}catch(S){nr.info(`Search request error: ${S}`);return}}}this.store.setState({isSearchInProgress:!1,searchClientResponseItems:a,searchResponseTimeTaken:s.data.time_taken,searchResultsCount:s.data.count,searchResponseFacetPrime:s.data.facets,supplementalFacetPrime:o==null?void 0:o.data.facets,searchClientRequestProperties:t.requestProperties,...t.shouldCacheResultsForEmptyState&&{cachedSearchClientResponseItems:a,cachedSearchResponseFacetPrime:s.data.facets,cachedSupplementalFacetPrime:o==null?void 0:o.data.facets,cachedSearchResponseTimeTaken:s.data.time_taken,cachedSearchResultsCount:s.data.count,cachedSearchClientRequestProperties:t.requestProperties}})})(),(async()=>{if(this.adClient&&typeof t.requestProperties!="string"){const s=await this.adClient.getAds(t.requestProperties);this.store.setState({adClientResponseItems:s,...t.shouldCacheResultsForEmptyState&&{cachedAdClientResponseItems:s}})}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(e,this.config.searchDebounceDelay):e()});if(!t.endpointURL)throw new Error("SDK Configuration Error: endpointURL not specified.");if(!t.readKey)throw new Error("SDK Configuration Error: readKey not specified.");if(!t.indexName&&!t.federationName)throw new Error("SDK Configuration Error: Either indexName or federationName must be specified.");if(t.indexName&&t.federationName)throw new Error("SDK Configuration Error: Cannot specify both indexName and federationName. Please specify only one.");this.config={...t,endpointURL:ki(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&e.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),this.store=qi(s,{core:this,searchResultsPerPage:t.searchResultsPerPage||20}),pe.addCoreInstance(this,s),(async a=>{typeof window<"u"&&await this.initClients(a,e),a.initialQuery&&this.getResponseItems({requestProperties:a.initialQuery,shouldCacheResultsForEmptyState:!0})})(this.config)}async initClients(t,e){let s=this.config.measureUserIdentifier;s||(s=await ri()),this.measureClient=new yi(t,e,s),this.searchClient=new xi(this,t,s),t.customAdConfig?this.adClient=new mi(t):t.nativoConfig?this.adClient=new bi(t):t.admAdConfig&&(this.adClient=new pi(t)),this.emitEvent("initialized",{name:"initialized"})}emitEvent(t,e){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(e)})}subscribe(t,e){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(e),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==e)}}handleAdContainerRendered(t){var e;(e=this.adClient)==null||e.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var e;(e=this.adClient)==null||e.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}const Wi="@searchcraft/vue-sdk",Gi="0.13.0",ss="routerLink",Da="navManager",Zi="router",Yi="aria",Ft=Symbol(),Na={default:Ft},za=r=>(r==null?void 0:r.split(" "))||[],Qi=(r,t,e=[])=>{var s;return[...Array.from(((s=r.value)==null?void 0:s.classList)||[]),...e].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},Oe=(r,t,e=[],s=[],a,o)=>{t!==void 0&&t();const n=fe.defineComponent((h,{attrs:u,slots:l,emit:p})=>{var P;const C=fe.ref(),S=new Set(za(u.class)),$=fe.getCurrentInstance(),N=((P=$==null?void 0:$.appContext)==null?void 0:P.provides[Da])?fe.inject(Da):void 0,D=I=>{const{routerLink:B}=h;if(B!==Ft)if(N!==void 0){I.preventDefault();let j={event:I};for(const ae in h){const Y=h[ae];h.hasOwnProperty(ae)&&ae.startsWith(Zi)&&Y!==Ft&&(j[ae]=Y)}N.navigate(j)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{h[a],za(u.class).forEach(Y=>{S.add(Y)});const I=h.onClick,B=Y=>{I!==void 0&&I(Y),Y.defaultPrevented||D(Y)};let j={ref:C,class:Qi(C,S),onClick:B};for(const Y in h){const se=h[Y];(h.hasOwnProperty(Y)&&se!==Ft||Y.startsWith(Yi))&&(j[Y]=se);const Q="on"+Y.slice(0,1).toUpperCase()+Y.slice(1),Fe=u[Q];C.value&&u.hasOwnProperty(Q)&&"addEventListener"in C.value&&C.value.addEventListener(Y,Fe)}return ss in h&&h[ss]!==Ft&&(j={...j,href:h[ss]}),fe.h(r,j,l.default&&l.default())}});if(typeof n!="function"){let h=[],u={};u.ROUTER_LINK_VALUE=Na,e.forEach(l=>u[l]=Na),h=s,n.name=r,n.emits=h,n.props=u}return n},Ki=Oe("searchcraft-filter-panel",()=>{},["searchcraftId","items","responsiveBreakpoint","responsiveBehavior"]),Xi=Oe("searchcraft-input-form",()=>{},["searchcraftId","autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","value","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),Ji=Oe("searchcraft-pagination",()=>{},["searchcraftId"]),ec=Oe("searchcraft-popover-button",()=>{},["template","type","searchcraftId"]),tc=Oe("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier","searchcraftId","placeholderValue","placeholderBehavior"]),rc=Oe("searchcraft-results-info",()=>{},["template","searchcraftId"]),sc=Oe("searchcraft-search-results",()=>{},["searchcraftId","initialQuery","template"]),ac=Oe("searchcraft-search-results-per-page",()=>{},["increment","searchcraftId"]),nc=Oe("searchcraft-summary-box",()=>{},["searchcraftId"]),oc=Oe("searchcraft-theme",()=>{}),ic=sc,cc=Ki,lc=Xi,uc=ec,hc=tc,dc=rc,fc=oc,pc=Ji,mc=ac,gc=nc;class bc extends ji{constructor(t,e=void 0){super(t,{sdkName:Wi,sdkVersion:Gi},e)}}da(),X.Searchcraft=bc,X.SearchcraftFilterPanel=cc,X.SearchcraftInputForm=lc,X.SearchcraftPagination=pc,X.SearchcraftPopoverButton=uc,X.SearchcraftPopoverForm=hc,X.SearchcraftResultsInfo=dc,X.SearchcraftSearchResults=ic,X.SearchcraftSearchResultsPerPage=mc,X.SearchcraftSummaryBox=gc,X.SearchcraftTheme=fc,Object.defineProperty(X,Symbol.toStringTag,{value:"Module"})});
81
81
  //# sourceMappingURL=index.umd.js.map