@searchcraft/vue-sdk 0.10.6 → 0.10.7

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,4 +1,4 @@
1
- (function(F,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],j):(F=typeof globalThis<"u"?globalThis:F||self,j(F.SearchcraftVueSdk={},F.Vue))})(this,function(F,j){"use strict";var di=Object.defineProperty;var fi=(F,j,_e)=>j in F?di(F,j,{enumerable:!0,configurable:!0,writable:!0,value:_e}):F[j]=_e;var f=(F,j,_e)=>fi(F,typeof j!="symbol"?j+"":j,_e);var Fs;const _e="searchcraft-javascript-sdk",Ie={experimentalSlotFixes:!1,hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var va=Object.defineProperty,ba=(e,t)=>{for(var r in t)va(e,r,{get:t[r],enumerable:!0})},ya="http://www.w3.org/2000/svg",Ca="http://www.w3.org/1999/xhtml",Sa=(e,t)=>{var r;const s=t.$cmpMeta$;Object.entries((r=s.$members$)!=null?r:{}).map(([o,[n]])=>{if(n&31||n&32){const c=e[o],i=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),o);Object.defineProperty(e,o,{get(){return i.get.call(this)},set(h){i.set.call(this,h)},configurable:!0,enumerable:!0}),e[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):c}})},_t=new WeakMap,wa=e=>_t.delete(e),we=e=>_t.get(e),ka=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onReadyPromise$=new Promise(a=>r.$onReadyResolve$=a),e["s-p"]=[],e["s-rc"]=[];const s=_t.set(e,r);return Sa(e,r),s},kr=(e,t)=>t in e,ot=(e,t)=>(0,console.error)(e,t),ct=typeof window<"u"?window:{},Ae=ct.document||{head:{}},D=ct.HTMLElement||class{},re={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},Ra=Ie.shadowDom,Ea=e=>Promise.resolve(e),It=!1,Rr=[],Er=[],xa=(e,t)=>r=>{e.push(r),It||(It=!0,re.$flags$&4?Mt(At):re.raf(At))},xr=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(r){ot(r)}e.length=0},At=()=>{xr(Rr),xr(Er),(It=Rr.length>0)&&re.raf(At)},Mt=e=>Ea().then(e),Ta=xa(Er),Ot=e=>(e=typeof e,e==="object"||e==="function"),Pa={};ba(Pa,{err:()=>Tr,map:()=>$a,ok:()=>Ft,unwrap:()=>_a,unwrapErr:()=>Ia});var Ft=e=>({isOk:!0,isErr:!1,value:e}),Tr=e=>({isOk:!1,isErr:!0,value:e});function $a(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>Ft(s)):Ft(r)}if(e.isErr){const r=e.value;return Tr(r)}throw"should never get here"}var _a=e=>{if(e.isOk)return e.value;throw e.value},Ia=e=>{if(e.isErr)return e.value;throw e.value},Pr=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&$r(t,e.tagName).forEach(r=>{var s;r.nodeType===1&&r.tagName==="SLOT-FB"&&((s=Aa(r,r["s-sn"],!1))!=null&&s.length?r.hidden=!0:r.hidden=!1)});for(const r of t)r.nodeType===1&&(r.__childNodes||r.childNodes).length&&Pr(r)};function $r(e,t,r){let s=0,a=[],o;for(;s<e.length;s++)o=e[s],o["s-sr"]&&o["s-hn"]===t&&r===void 0&&a.push(o),a=[...a,...$r(o.childNodes,t,r)];return a}var Aa=(e,t,r=!0)=>{const s=[];for((r&&e["s-sr"]||!e["s-sr"])&&s.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)s.push(e);return s},_r=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",je=(e,t="")=>()=>{},l=(e,t,...r)=>{let s=null,a=null,o=null,n=!1,c=!1;const i=[],h=p=>{for(let m=0;m<p.length;m++)s=p[m],Array.isArray(s)?h(s):s!=null&&typeof s!="boolean"&&((n=typeof e!="function"&&!Ot(s))&&(s=String(s)),n&&c?i[i.length-1].$text$+=s:i.push(n?it(null,s):s),c=n)};if(h(r),t){t.key&&(a=t.key),t.name&&(o=t.name);{const p=t.className||t.class;p&&(t.class=typeof p!="object"?p:Object.keys(p).filter(m=>p[m]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,i,Fa);const u=it(e,null);return u.$attrs$=t,i.length>0&&(u.$children$=i),u.$key$=a,u.$name$=o,u},it=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},Ma={},Oa=e=>e&&e.$tag$===Ma,Fa={forEach:(e,t)=>e.map(Ir).forEach(t),map:(e,t)=>e.map(Ir).map(t).map(La)},Ir=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),La=e=>{if(typeof e.vtag=="function"){const r={...e.vattrs};return e.vkey&&(r.key=e.vkey),e.vname&&(r.name=e.vname),l(e.vtag,r,...e.vchildren||[])}const t=it(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Ar=(e,t)=>e!=null&&!Ot(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,Da=e=>e,ke=(e,t,r)=>{const s=Da(e);return{emit:a=>Mr(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Mr=(e,t,r)=>{const s=re.ce(t,r);return e.dispatchEvent(s),s},lt=new WeakMap,Or=(e,t,r,s,a,o)=>{if(r!==s){let n=kr(e,t),c=t.toLowerCase();if(t==="class"){const i=e.classList,h=Fr(r);let u=Fr(s);e["s-si"]?(u.push(e["s-si"]),h.forEach(p=>{p.startsWith(e["s-si"])&&u.push(p)}),u=[...new Set(u)],i.add(...u),delete e["s-si"]):(i.remove(...h.filter(p=>p&&!u.includes(p))),i.add(...u.filter(p=>p&&!h.includes(p))))}else if(t==="style"){for(const i in r)(!s||s[i]==null)&&(i.includes("-")?e.style.removeProperty(i):e.style[i]="");for(const i in s)(!r||s[i]!==r[i])&&(i.includes("-")?e.style.setProperty(i,s[i]):e.style[i]=s[i])}else if(t!=="key")if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):kr(ct,c)?t=c.slice(2):t=c[2]+t.slice(3),r||s){const i=t.endsWith(Lr);t=t.replace(Ha,""),r&&re.rel(e,t,r,i),s&&re.ael(e,t,s,i)}}else{const i=Ot(s);if((n||i&&s!==null)&&!a)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const h=s??"";t==="list"?n=!1:(r==null||e[t]!=h)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=h:e.setAttribute(t,h))}}catch{}s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!n||o&4||a)&&!i&&(s=s===!0?"":s,e.setAttribute(t,s))}}},Na=/\s/,Fr=e=>(typeof e=="object"&&"baseVal"in e&&(e=e.baseVal),e?e.split(Na):[]),Lr="Capture",Ha=new RegExp(Lr+"$"),Dr=(e,t,r)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},o=t.$attrs$||{};for(const n of Nr(Object.keys(a)))n in o||Or(s,n,a[n],void 0,r,t.$flags$);for(const n of Nr(Object.keys(o)))Or(s,n,a[n],o[n],r,t.$flags$)};function Nr(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var Lt,Dt,ut=!1,ht=!1,Nt=!1,oe=!1,dt=(e,t,r)=>{var s;const a=t.$children$[r];let o=0,n,c,i;if(ut||(Nt=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=Ae.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=Ae.createTextNode("");else{if(oe||(oe=a.$tag$==="svg"),n=a.$elm$=Ae.createElementNS(oe?ya:Ca,!ut&&Ie.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),oe&&a.$tag$==="foreignObject"&&(oe=!1),Dr(null,a,oe),a.$children$)for(o=0;o<a.$children$.length;++o)c=dt(e,a,o),c&&n.appendChild(c);a.$tag$==="svg"?oe=!1:n.tagName==="foreignObject"&&(oe=!0)}return n["s-hn"]=Dt,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Lt,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,i=e&&e.$children$&&e.$children$[r],i&&i.$tag$===a.$tag$&&e.$elm$&&We(e.$elm$,!1)),n},We=(e,t)=>{re.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&Ie.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const a=r[s];a["s-hn"]!==Dt&&a["s-ol"]&&(Re(Ge(a).parentNode,a,Ge(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Nt=!0),t&&We(a,t)}re.$flags$&=-2},Hr=(e,t,r,s,a,o)=>{let n=e["s-cr"]&&e["s-cr"].parentNode||e,c;for(;a<=o;++a)s[a]&&(c=dt(null,r,a),c&&(s[a].$elm$=c,Re(n,c,Ge(t))))},Ur=(e,t,r)=>{for(let s=t;s<=r;++s){const a=e[s];if(a){const o=a.$elm$;o&&(ht=!0,o["s-ol"]?o["s-ol"].remove():We(o,!0),o.remove())}}},Ua=(e,t,r,s,a=!1)=>{let o=0,n=0,c=0,i=0,h=t.length-1,u=t[0],p=t[h],m=s.length-1,v=s[0],b=s[m],T,I;for(;o<=h&&n<=m;)if(u==null)u=t[++o];else if(p==null)p=t[--h];else if(v==null)v=s[++n];else if(b==null)b=s[--m];else if(ft(u,v,a))Me(u,v,a),u=t[++o],v=s[++n];else if(ft(p,b,a))Me(p,b,a),p=t[--h],b=s[--m];else if(ft(u,b,a))(u.$tag$==="slot"||b.$tag$==="slot")&&We(u.$elm$.parentNode,!1),Me(u,b,a),Re(e,u.$elm$,p.$elm$.nextSibling),u=t[++o],b=s[--m];else if(ft(p,v,a))(u.$tag$==="slot"||b.$tag$==="slot")&&We(p.$elm$.parentNode,!1),Me(p,v,a),Re(e,p.$elm$,u.$elm$),p=t[--h],v=s[++n];else{for(c=-1,i=o;i<=h;++i)if(t[i]&&t[i].$key$!==null&&t[i].$key$===v.$key$){c=i;break}c>=0?(I=t[c],I.$tag$!==v.$tag$?T=dt(t&&t[n],r,c):(Me(I,v,a),t[c]=void 0,T=I.$elm$),v=s[++n]):(T=dt(t&&t[n],r,n),v=s[++n]),T&&Re(Ge(u.$elm$).parentNode,T,Ge(u.$elm$))}o>h?Hr(e,s[m+1]==null?null:s[m+1].$elm$,r,s,n,m):n>m&&Ur(t,o,h)},ft=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,Ge=e=>e&&e["s-ol"]||e,Me=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,a=e.$children$,o=t.$children$,n=t.$tag$,c=t.$text$;let i;c===null?(oe=n==="svg"?!0:n==="foreignObject"?!1:oe,n==="slot"&&!ut||Dr(e,t,oe),a!==null&&o!==null?Ua(s,a,t,o,r):o!==null?(e.$text$!==null&&(s.textContent=""),Hr(s,null,t,o,0,o.length-1)):!r&&Ie.updatable&&a!==null&&Ur(a,0,a.length-1),oe&&n==="svg"&&(oe=!1)):(i=s["s-cr"])?i.parentNode.textContent=c:e.$text$!==c&&(s.data=c)},de=[],zr=e=>{let t,r,s;const a=e.__childNodes||e.childNodes;for(const o of a){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const n=o["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if(_r(t,n)){let c=de.find(i=>i.$nodeToRelocate$===t);ht=!0,t["s-sn"]=t["s-sn"]||n,c?(c.$nodeToRelocate$["s-sh"]=o["s-hn"],c.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],de.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&de.map(i=>{_r(i.$nodeToRelocate$,t["s-sn"])&&(c=de.find(h=>h.$nodeToRelocate$===t),c&&!i.$slotRefNode$&&(i.$slotRefNode$=c.$slotRefNode$))})}else de.some(c=>c.$nodeToRelocate$===t)||de.push({$nodeToRelocate$:t})}o.nodeType===1&&zr(o)}},Re=(e,t,r)=>e==null?void 0:e.insertBefore(t,r),za=(e,t,r=!1)=>{var s,a,o,n;const c=e.$hostElement$,i=e.$vnode$||it(null,null),h=Oa(t)?t:l(null,null,t);if(Dt=c.tagName,r&&h.$attrs$)for(const u of Object.keys(h.$attrs$))c.hasAttribute(u)&&!["key","ref","style","class"].includes(u)&&(h.$attrs$[u]=c[u]);h.$tag$=null,h.$flags$|=4,e.$vnode$=h,h.$elm$=i.$elm$=c,ut=Ra,Lt=c["s-cr"],ht=!1,Me(i,h,r);{if(re.$flags$|=1,Nt){zr(h.$elm$);for(const u of de){const p=u.$nodeToRelocate$;if(!p["s-ol"]){const m=Ae.createTextNode("");m["s-nr"]=p,Re(p.parentNode,p["s-ol"]=m,p)}}for(const u of de){const p=u.$nodeToRelocate$,m=u.$slotRefNode$;if(m){const v=m.parentNode;let b=m.nextSibling;{let L=(s=p["s-ol"])==null?void 0:s.previousSibling;for(;L;){let P=(a=L["s-nr"])!=null?a:null;if(P&&P["s-sn"]===p["s-sn"]&&v===(P.__parentNode||P.parentNode)){for(P=P.nextSibling;P===p||P!=null&&P["s-sr"];)P=P==null?void 0:P.nextSibling;if(!P||!P["s-nr"]){b=P;break}}L=L.previousSibling}}const T=p.__parentNode||p.parentNode,I=p.__nextSibling||p.nextSibling;(!b&&v!==T||I!==b)&&p!==b&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),Re(v,p,b),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(o=p["s-ih"])!=null?o:!1)),p&&typeof m["s-rf"]=="function"&&m["s-rf"](p)}else p.nodeType===1&&(r&&(p["s-ih"]=(n=p.hidden)!=null?n:!1),p.hidden=!0)}}ht&&Pr(h.$elm$),re.$flags$&=-2,de.length=0}Lt=void 0},Br=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise(s=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),s()}))}},Ht=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return Br(e,e.$ancestorComponent$),Ta(()=>Ba(e,t))},Ba=(e,t)=>{const r=e.$hostElement$,s=je("scheduleUpdate",e.$cmpMeta$.$tagName$),a=r;if(!a)throw new Error(`Can't render component <${r.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(),Va(o,()=>Wa(e,a,t))},Va=(e,t)=>ja(e)?e.then(t).catch(r=>{console.error(r),t()}):t(),ja=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",Wa=async(e,t,r)=>{var s;const a=e.$hostElement$,o=je("update",e.$cmpMeta$.$tagName$),n=a["s-rc"],c=je("render",e.$cmpMeta$.$tagName$);Ga(e,t,a,r),n&&(n.map(i=>i()),a["s-rc"]=void 0),c(),o();{const i=(s=a["s-p"])!=null?s:[],h=()=>qa(e);i.length===0?h():(Promise.all(i).then(h),e.$flags$|=4,i.length=0)}},Ga=(e,t,r,s)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,za(e,t,s)}catch(a){ot(a,e.$hostElement$)}return null},qa=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,s=je("postUpdate",t),a=r,o=e.$ancestorComponent$;e.$flags$&64?s():(e.$flags$|=64,Vr(r),Za(a,"componentDidLoad",void 0,r),s(),e.$onReadyResolve$(r),o||Ya()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Mt(()=>Ht(e,!1)),e.$flags$&=-517},Ya=e=>{Vr(Ae.documentElement),Mt(()=>Mr(ct,"appload",{detail:{namespace:_e}}))},Za=(e,t,r,s)=>{if(e&&e[t])try{return e[t](r)}catch(a){ot(a,s)}},Vr=e=>{var t;return e.classList.add((t=Ie.hydratedSelectorName)!=null?t:"hydrated")},Qa=(e,t)=>we(e).$instanceValues$.get(t),jr=(e,t,r,s)=>{const a=we(e),o=e,n=a.$instanceValues$.get(t),c=a.$flags$,i=o;r=Ar(r,s.$members$[t][0]);const h=Number.isNaN(n)&&Number.isNaN(r);if(r!==n&&!h){a.$instanceValues$.set(t,r);{if(s.$watchers$&&c&128){const p=s.$watchers$[t];p&&p.map(m=>{try{i[m](r,n,t)}catch(v){ot(v,o)}})}(c&18)===2&&Ht(a,!1)}}},Ka=(e,t,r)=>{var s,a;const o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const n=Object.entries((s=t.$members$)!=null?s:{});n.map(([c,[i]])=>{if(i&31||i&32){const{get:h,set:u}=Object.getOwnPropertyDescriptor(o,c)||{};h&&(t.$members$[c][0]|=2048),u&&(t.$members$[c][0]|=4096),Object.defineProperty(o,c,{get(){return h?h.apply(this):Qa(this,c)},configurable:!0,enumerable:!0}),Object.defineProperty(o,c,{set(p){const m=we(this);if(u){const v=i&32?this[c]:m.$hostElement$[c];typeof v>"u"&&m.$instanceValues$.get(c)?p=m.$instanceValues$.get(c):!m.$instanceValues$.get(c)&&v&&m.$instanceValues$.set(c,v),u.apply(this,[Ar(p,i)]),p=i&32?this[c]:m.$hostElement$[c],jr(this,c,p,t);return}{jr(this,c,p,t);return}}})}});{const c=new Map;o.attributeChangedCallback=function(i,h,u){re.jmp(()=>{var p;const m=c.get(i);if(!(this.hasOwnProperty(m)&&Ie.lazyLoad)){if(o.hasOwnProperty(m)&&typeof this[m]=="number"&&this[m]==u)return;if(m==null){const b=we(this),T=b==null?void 0:b.$flags$;if(T&&!(T&8)&&T&128&&u!==h){const L=this,P=(p=t.$watchers$)==null?void 0:p[i];P==null||P.forEach(be=>{L[be]!=null&&L[be].call(L,u,h,i)})}return}}const v=Object.getOwnPropertyDescriptor(o,m);u=u===null&&typeof this[m]=="boolean"?!1:u,u!==this[m]&&(!v.get||v.set)&&(this[m]=u)})},e.observedAttributes=Array.from(new Set([...Object.keys((a=t.$watchers$)!=null?a:{}),...n.filter(([i,h])=>h[0]&15).map(([i,h])=>{const u=h[1]||i;return c.set(u,i),u})]))}}return e},Xa=async(e,t,r,s)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const n=e.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}}const a=t.$ancestorComponent$,o=()=>Ht(t,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Ja=(e,t)=>{},en=e=>{if(!(re.$flags$&1)){const t=we(e),r=t.$cmpMeta$,s=je("connectedCallback",r.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Ja());else{t.$flags$|=1,r.$flags$&12&&tn(e);{let a=e;for(;a=a.parentNode||a.host;)if(a["s-p"]){Br(t,t.$ancestorComponent$=a);break}}r.$members$&&Object.entries(r.$members$).map(([a,[o]])=>{if(o&31&&e.hasOwnProperty(a)){const n=e[a];delete e[a],e[a]=n}}),Xa(e,t)}s()}},tn=e=>{const t=e["s-cr"]=Ae.createComment("");t["s-cn"]=!0,Re(e,t,e.firstChild)},rn=async e=>{re.$flags$&1||we(e),lt.has(e)&&lt.delete(e),e.shadowRoot&&lt.has(e.shadowRoot)&&lt.delete(e.shadowRoot)},N=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};r.$members$=t[2],r.$watchers$=e.$watchers$;const s=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){ka(this,r)},connectedCallback(){this.__hasHostListenerAttached||(we(this),this.__hasHostListenerAttached=!0),en(this),s&&s.call(this)},disconnectedCallback(){rn(this),a&&a.call(this),re.raf(()=>{var o;const n=we(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&&wa(this)})},__attachShadow(){this.shadowRoot=this}}),e.is=r.$tagName$,Ka(e,r)},sn=(e,t)=>t,an=Object.defineProperty,nn=(e,t,r)=>t in e?an(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t,r)=>nn(e,typeof t!="symbol"?t+"":t,r),fe=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(fe||{});class on{constructor(t){A(this,"logLevel"),A(this,"logFormatter"),this.logLevel=t.logLevel||1,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,r){return`[${fe[t]}] ${new Date().toISOString()}: ${r}`}debug(t){this.logLevel<=0&&console.log(this.logFormatter(0,t))}info(t){this.logLevel<=1&&console.info(this.logFormatter(1,t))}warn(t){this.logLevel<=2&&console.warn(this.logFormatter(2,t))}error(t){this.logLevel<=3&&console.error(this.logFormatter(3,t))}log(t,r){switch(t){case 0:this.debug(r);break;case 1:this.info(r);break;case 2:this.warn(r);break;case 3:this.error(r);break}}}function pe(e,t,r,s){return new(r||(r=Promise))(function(a,o){function n(h){try{i(s.next(h))}catch(u){o(u)}}function c(h){try{i(s.throw(h))}catch(u){o(u)}}function i(h){var u;h.done?a(h.value):(u=h.value,u instanceof r?u:new r(function(p){p(u)})).then(n,c)}i((s=s.apply(e,[])).next())})}function me(e,t){var r,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(i){return function(h){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,s&&(a=2&u[0]?s.return:u[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,u[1])).done)return a;switch(s=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,s=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(p){u=[6,p],s=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([i,h])}}}var ge={exclude:[]},Wr={},cn={timeout:"true"},le=function(e,t){typeof window<"u"&&(Wr[e]=t)},ln=function(){return Object.fromEntries(Object.entries(Wr).filter(function(e){var t,r=e[0];return!(!((t=ge==null?void 0:ge.exclude)===null||t===void 0)&&t.includes(r))}).map(function(e){return[e[0],(0,e[1])()]}))};function pt(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var q=new Uint32Array([597399067,2869860233,951274213,2716044179]);function ie(e,t){return e<<t|e>>>32-t}function Ut(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e 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 c=o.byteLength/16|0,i=new Uint32Array(o,0,4*c),h=0;h<c;h++){var u=i.subarray(4*h,4*(h+1));u[0]=Math.imul(u[0],q[0]),u[0]=ie(u[0],15),u[0]=Math.imul(u[0],q[1]),n[0]=n[0]^u[0],n[0]=ie(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,u[1]=Math.imul(u[1],q[1]),u[1]=ie(u[1],16),u[1]=Math.imul(u[1],q[2]),n[1]=n[1]^u[1],n[1]=ie(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,u[2]=Math.imul(u[2],q[2]),u[2]=ie(u[2],17),u[2]=Math.imul(u[2],q[3]),n[2]=n[2]^u[2],n[2]=ie(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,u[3]=Math.imul(u[3],q[3]),u[3]=ie(u[3],18),u[3]=Math.imul(u[3],q[0]),n[3]=n[3]^u[3],n[3]=ie(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(e,s),function(o,n){var c=o.byteLength/16|0,i=o.byteLength%16,h=new Uint32Array(4),u=new Uint8Array(o,16*c,i);switch(i){case 15:h[3]=h[3]^u[14]<<16;case 14:h[3]=h[3]^u[13]<<8;case 13:h[3]=h[3]^u[12]<<0,h[3]=Math.imul(h[3],q[3]),h[3]=ie(h[3],18),h[3]=Math.imul(h[3],q[0]),n[3]=n[3]^h[3];case 12:h[2]=h[2]^u[11]<<24;case 11:h[2]=h[2]^u[10]<<16;case 10:h[2]=h[2]^u[9]<<8;case 9:h[2]=h[2]^u[8]<<0,h[2]=Math.imul(h[2],q[2]),h[2]=ie(h[2],17),h[2]=Math.imul(h[2],q[3]),n[2]=n[2]^h[2];case 8:h[1]=h[1]^u[7]<<24;case 7:h[1]=h[1]^u[6]<<16;case 6:h[1]=h[1]^u[5]<<8;case 5:h[1]=h[1]^u[4]<<0,h[1]=Math.imul(h[1],q[1]),h[1]=ie(h[1],16),h[1]=Math.imul(h[1],q[2]),n[1]=n[1]^h[1];case 4:h[0]=h[0]^u[3]<<24;case 3:h[0]=h[0]^u[2]<<16;case 2:h[0]=h[0]^u[1]<<8;case 1:h[0]=h[0]^u[0]<<0,h[0]=Math.imul(h[0],q[0]),h[0]=ie(h[0],15),h[0]=Math.imul(h[0],q[1]),n[0]=n[0]^h[0]}}(e,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]=pt(n[0]),n[1]=pt(n[1]),n[2]=pt(n[2]),n[3]=pt(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}(e,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function un(e,t){return new Promise(function(r){setTimeout(function(){return r(t)},e)})}function hn(e,t,r){return Promise.all(e.map(function(s){return Promise.race([s,un(t,r)])}))}function dn(){return pe(this,void 0,void 0,function(){var e,t,r,s,a;return me(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=ln(),t=Object.keys(e),[4,hn(Object.values(e),(ge==null?void 0:ge.timeout)||1e3,cn)];case 1:return r=o.sent(),s=r.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,c){a[t[c]]=n}),[2,Gr(a,ge.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function Gr(e,t){var r={},s=function(o){if(e.hasOwnProperty(o)){var n=e[o];if(typeof n!="object"||Array.isArray(n))t.includes(o)||(r[o]=n);else{var c=Gr(n,t.map(function(i){return i.startsWith(o+".")?i.slice(o.length+1):i}));Object.keys(c).length>0&&(r[o]=c)}}};for(var a in e)s(a);return r}function fn(e){return pe(this,void 0,void 0,function(){var t,r;return me(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,dn()];case 1:return t=s.sent(),r=Ut(JSON.stringify(t)),[2,r.toString()];case 2:throw s.sent();case 3:return[2]}})})}function pn(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function qr(e,t,r){for(var s=[],a=0;a<e[0].data.length;a++){for(var o=[],n=0;n<e.length;n++)o.push(e[n].data[a]);s.push(mn(o))}var c=new Uint8ClampedArray(s);return new ImageData(c,t,r)}function mn(e){if(e.length===0)return 0;for(var t={},r=0,s=e;r<s.length;r++)t[o=s[r]]=(t[o]||0)+1;var a=e[0];for(var o in t)t[o]>t[a]&&(a=parseInt(o,10));return a}function qe(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=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+)?)/];r<s.length;r++){var a=s[r],o=e.match(a);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}le("audio",function(){return pe(this,void 0,void 0,function(){return me(this,function(e){return[2,new Promise(function(t,r){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,c=s.createDynamicsCompressor();c.threshold.value=-50,c.knee.value=40,c.ratio.value=12,c.attack.value=0,c.release.value=.2,o.connect(c),c.connect(s.destination),o.start(),s.oncomplete=function(i){n=i.renderedBuffer.getChannelData(0),t({sampleHash:pn(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(i){console.error("Error creating audio fingerprint:",i),r(i)}})]})})});var gn=qe().name!=="SamsungBrowser"?1:3,Yr=280,Zr=20;qe().name!="Firefox"&&le("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:gn},function(){return function(){var r=document.createElement("canvas"),s=r.getContext("2d");if(!s)return new ImageData(1,1);r.width=Yr,r.height=Zr;var a=s.createLinearGradient(0,0,r.width,r.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,r.width,r.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*r.width/7,r.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,r.width,r.height);return n}()});e({commonImageDataHash:Ut(qr(t,Yr,Zr).data.toString()).toString()})})});var zt,vn=["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"],bn=["monospace","sans-serif","serif"];function Qr(e,t){if(!e)throw new Error("Canvas context not supported");return e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function yn(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var s=(r.getParameter(r.VENDOR)||"").toString(),a=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=r.getExtension("WEBGL_debug_renderer_info");if(n){var c=(r.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),i=(r.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();c&&(o.vendorUnmasked=c),i&&(o.rendererUnmasked=i)}}return o}catch{}return"undefined"}function Cn(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function Sn(e,t){var r={};return t.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(h){var u=String(h);n[u]=(n[u]||0)+1});var c=o[0],i=1;return Object.keys(n).forEach(function(h){n[h]>i&&(c=h,i=n[h])}),c}(e.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(r[s]=a)}),r}function wn(){var e=[],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(r){t[r].forEach(function(s){matchMedia("(".concat(r,": ").concat(s,")")).matches&&e.push("".concat(r,": ").concat(s))})}),e}function kn(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}qe().name!="Firefox"&&le("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(s){var a;pe(this,void 0,void 0,function(){var o,n,c;return me(this,function(i){switch(i.label){case 0:return document.body?[3,2]:[4,(h=50,new Promise(function(p){return setTimeout(p,h,u)}))];case 1:return i.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),!(c=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:c}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var h,u})})})(function(s){var a=s.iframe;return pe(e,void 0,void 0,function(){var o,n,c,i;return me(this,function(h){return o=a.createElement("canvas"),n=o.getContext("2d"),c=bn.map(function(u){return Qr(n,u)}),i={},vn.forEach(function(u){var p=Qr(n,u);c.includes(p)||(i[u]=p)}),t(i),[2]})})})}catch{r({error:"unsupported"})}})}),le("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:yn(),architecture:Cn(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),le("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),le("permissions",function(){return pe(this,void 0,void 0,function(){var e;return me(this,function(t){return zt=(ge==null?void 0:ge.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"],e=Array.from({length:(ge==null?void 0:ge.retries)||3},function(){return function(){return pe(this,void 0,void 0,function(){var r,s,a,o,n;return me(this,function(c){switch(c.label){case 0:r={},s=0,a=zt,c.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],c.label=2;case 2:return c.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=c.sent(),r[o]=n.state.toString(),[3,5];case 4:return c.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return Sn(r,zt)})]})})}),le("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(s){s({plugins:e})})}),le("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:wn()})})}),le("system",function(){return new Promise(function(e){var t=qe();e({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:kn()})})});var Q,Rn=qe().name!=="SamsungBrowser"?1:3,w=null;le("webgl",function(){return pe(this,void 0,void 0,function(){var e;return me(this,function(t){typeof document<"u"&&((Q=document.createElement("canvas")).width=200,Q.height=100,w=Q.getContext("webgl"));try{if(!w)throw new Error("WebGL not supported");return e=Array.from({length:Rn},function(){return function(){try{if(!w)throw new Error("WebGL not supported");var r=`
1
+ (function(F,j){typeof exports=="object"&&typeof module<"u"?j(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],j):(F=typeof globalThis<"u"?globalThis:F||self,j(F.SearchcraftVueSdk={},F.Vue))})(this,function(F,j){"use strict";var dc=Object.defineProperty;var fc=(F,j,$e)=>j in F?dc(F,j,{enumerable:!0,configurable:!0,writable:!0,value:$e}):F[j]=$e;var d=(F,j,$e)=>fc(F,typeof j!="symbol"?j+"":j,$e);var Os;const $e="searchcraft-javascript-sdk",_e={experimentalSlotFixes:!1,hydratedSelectorName:"hydrated",lazyLoad:!1,shadowDom:!1,slotRelocation:!0,updatable:!0};var ga=Object.defineProperty,va=(e,t)=>{for(var r in t)ga(e,r,{get:t[r],enumerable:!0})},ba="http://www.w3.org/2000/svg",ya="http://www.w3.org/1999/xhtml",Ca=(e,t)=>{var r;const s=t.$cmpMeta$;Object.entries((r=s.$members$)!=null?r:{}).map(([o,[n]])=>{if(n&31||n&32){const i=e[o],c=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),o);Object.defineProperty(e,o,{get(){return c.get.call(this)},set(h){c.set.call(this,h)},configurable:!0,enumerable:!0}),e[o]=t.$instanceValues$.has(o)?t.$instanceValues$.get(o):i}})},$t=new WeakMap,Sa=e=>$t.delete(e),Se=e=>$t.get(e),wa=(e,t)=>{const r={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};r.$onReadyPromise$=new Promise(a=>r.$onReadyResolve$=a),e["s-p"]=[],e["s-rc"]=[];const s=$t.set(e,r);return Ca(e,r),s},wr=(e,t)=>t in e,nt=(e,t)=>(0,console.error)(e,t),ot=typeof window<"u"?window:{},Ae=ot.document||{head:{}},D=ot.HTMLElement||class{},te={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,r,s)=>e.addEventListener(t,r,s),rel:(e,t,r,s)=>e.removeEventListener(t,r,s),ce:(e,t)=>new CustomEvent(e,t)},Ra=_e.shadowDom,ka=e=>Promise.resolve(e),_t=!1,Rr=[],kr=[],Ea=(e,t)=>r=>{e.push(r),_t||(_t=!0,te.$flags$&4?It(At):te.raf(At))},Er=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(r){nt(r)}e.length=0},At=()=>{Er(Rr),Er(kr),(_t=Rr.length>0)&&te.raf(At)},It=e=>ka().then(e),xa=Ea(kr),Mt=e=>(e=typeof e,e==="object"||e==="function"),Ta={};va(Ta,{err:()=>xr,map:()=>Pa,ok:()=>Ot,unwrap:()=>$a,unwrapErr:()=>_a});var Ot=e=>({isOk:!0,isErr:!1,value:e}),xr=e=>({isOk:!1,isErr:!0,value:e});function Pa(e,t){if(e.isOk){const r=t(e.value);return r instanceof Promise?r.then(s=>Ot(s)):Ot(r)}if(e.isErr){const r=e.value;return xr(r)}throw"should never get here"}var $a=e=>{if(e.isOk)return e.value;throw e.value},_a=e=>{if(e.isErr)return e.value;throw e.value},Tr=e=>{const t=e.__childNodes||e.childNodes;e.tagName&&e.tagName.includes("-")&&e["s-cr"]&&e.tagName!=="SLOT-FB"&&Pr(t,e.tagName).forEach(r=>{var s;r.nodeType===1&&r.tagName==="SLOT-FB"&&((s=Aa(r,r["s-sn"],!1))!=null&&s.length?r.hidden=!0:r.hidden=!1)});for(const r of t)r.nodeType===1&&(r.__childNodes||r.childNodes).length&&Tr(r)};function Pr(e,t,r){let s=0,a=[],o;for(;s<e.length;s++)o=e[s],o["s-sr"]&&o["s-hn"]===t&&r===void 0&&a.push(o),a=[...a,...Pr(o.childNodes,t,r)];return a}var Aa=(e,t,r=!0)=>{const s=[];for((r&&e["s-sr"]||!e["s-sr"])&&s.push(e);(e=e.nextSibling)&&e["s-sn"]===t;)s.push(e);return s},$r=(e,t)=>e.nodeType===1?e.getAttribute("slot")===null&&t===""||e.getAttribute("slot")===t:e["s-sn"]===t?!0:t==="",Ve=(e,t="")=>()=>{},l=(e,t,...r)=>{let s=null,a=null,o=null,n=!1,i=!1;const c=[],h=p=>{for(let m=0;m<p.length;m++)s=p[m],Array.isArray(s)?h(s):s!=null&&typeof s!="boolean"&&((n=typeof e!="function"&&!Mt(s))&&(s=String(s)),n&&i?c[c.length-1].$text$+=s:c.push(n?it(null,s):s),i=n)};if(h(r),t){t.key&&(a=t.key),t.name&&(o=t.name);{const p=t.className||t.class;p&&(t.class=typeof p!="object"?p:Object.keys(p).filter(m=>p[m]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,c,Oa);const u=it(e,null);return u.$attrs$=t,c.length>0&&(u.$children$=c),u.$key$=a,u.$name$=o,u},it=(e,t)=>{const r={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return r.$attrs$=null,r.$key$=null,r.$name$=null,r},Ia={},Ma=e=>e&&e.$tag$===Ia,Oa={forEach:(e,t)=>e.map(_r).forEach(t),map:(e,t)=>e.map(_r).map(t).map(Fa)},_r=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),Fa=e=>{if(typeof e.vtag=="function"){const r={...e.vattrs};return e.vkey&&(r.key=e.vkey),e.vname&&(r.name=e.vname),l(e.vtag,r,...e.vchildren||[])}const t=it(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Ar=(e,t)=>e!=null&&!Mt(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,La=e=>e,we=(e,t,r)=>{const s=La(e);return{emit:a=>Ir(s,t,{bubbles:!0,composed:!0,cancelable:!0,detail:a})}},Ir=(e,t,r)=>{const s=te.ce(t,r);return e.dispatchEvent(s),s},ct=new WeakMap,Mr=(e,t,r,s,a,o)=>{if(r!==s){let n=wr(e,t),i=t.toLowerCase();if(t==="class"){const c=e.classList,h=Or(r);let u=Or(s);e["s-si"]?(u.push(e["s-si"]),h.forEach(p=>{p.startsWith(e["s-si"])&&u.push(p)}),u=[...new Set(u)],c.add(...u),delete e["s-si"]):(c.remove(...h.filter(p=>p&&!u.includes(p))),c.add(...u.filter(p=>p&&!h.includes(p))))}else if(t==="style"){for(const c in r)(!s||s[c]==null)&&(c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(const c in s)(!r||s[c]!==r[c])&&(c.includes("-")?e.style.setProperty(c,s[c]):e.style[c]=s[c])}else if(t!=="key")if(!e.__lookupSetter__(t)&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):wr(ot,i)?t=i.slice(2):t=i[2]+t.slice(3),r||s){const c=t.endsWith(Fr);t=t.replace(Na,""),r&&te.rel(e,t,r,c),s&&te.ael(e,t,s,c)}}else{const c=Mt(s);if((n||c&&s!==null)&&!a)try{if(e.tagName.includes("-"))e[t]!==s&&(e[t]=s);else{const h=s??"";t==="list"?n=!1:(r==null||e[t]!=h)&&(typeof e.__lookupSetter__(t)=="function"?e[t]=h:e.setAttribute(t,h))}}catch{}s==null||s===!1?(s!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!n||o&4||a)&&!c&&(s=s===!0?"":s,e.setAttribute(t,s))}}},Da=/\s/,Or=e=>(typeof e=="object"&&"baseVal"in e&&(e=e.baseVal),e?e.split(Da):[]),Fr="Capture",Na=new RegExp(Fr+"$"),Lr=(e,t,r)=>{const s=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,a=e&&e.$attrs$||{},o=t.$attrs$||{};for(const n of Dr(Object.keys(a)))n in o||Mr(s,n,a[n],void 0,r,t.$flags$);for(const n of Dr(Object.keys(o)))Mr(s,n,a[n],o[n],r,t.$flags$)};function Dr(e){return e.includes("ref")?[...e.filter(t=>t!=="ref"),"ref"]:e}var Ft,Lt,lt=!1,ut=!1,Dt=!1,ne=!1,ht=(e,t,r)=>{var s;const a=t.$children$[r];let o=0,n,i,c;if(lt||(Dt=!0,a.$tag$==="slot"&&(a.$flags$|=a.$children$?2:1)),a.$text$!==null)n=a.$elm$=Ae.createTextNode(a.$text$);else if(a.$flags$&1)n=a.$elm$=Ae.createTextNode("");else{if(ne||(ne=a.$tag$==="svg"),n=a.$elm$=Ae.createElementNS(ne?ba:ya,!lt&&_e.slotRelocation&&a.$flags$&2?"slot-fb":a.$tag$),ne&&a.$tag$==="foreignObject"&&(ne=!1),Lr(null,a,ne),a.$children$)for(o=0;o<a.$children$.length;++o)i=ht(e,a,o),i&&n.appendChild(i);a.$tag$==="svg"?ne=!1:n.tagName==="foreignObject"&&(ne=!0)}return n["s-hn"]=Lt,a.$flags$&3&&(n["s-sr"]=!0,n["s-cr"]=Ft,n["s-sn"]=a.$name$||"",n["s-rf"]=(s=a.$attrs$)==null?void 0:s.ref,c=e&&e.$children$&&e.$children$[r],c&&c.$tag$===a.$tag$&&e.$elm$&&je(e.$elm$,!1)),n},je=(e,t)=>{te.$flags$|=1;const r=Array.from(e.__childNodes||e.childNodes);e["s-sr"]&&_e.experimentalSlotFixes;for(let s=r.length-1;s>=0;s--){const a=r[s];a["s-hn"]!==Lt&&a["s-ol"]&&(Re(We(a).parentNode,a,We(a)),a["s-ol"].remove(),a["s-ol"]=void 0,a["s-sh"]=void 0,Dt=!0),t&&je(a,t)}te.$flags$&=-2},Nr=(e,t,r,s,a,o)=>{let n=e["s-cr"]&&e["s-cr"].parentNode||e,i;for(;a<=o;++a)s[a]&&(i=ht(null,r,a),i&&(s[a].$elm$=i,Re(n,i,We(t))))},Hr=(e,t,r)=>{for(let s=t;s<=r;++s){const a=e[s];if(a){const o=a.$elm$;o&&(ut=!0,o["s-ol"]?o["s-ol"].remove():je(o,!0),o.remove())}}},Ha=(e,t,r,s,a=!1)=>{let o=0,n=0,i=0,c=0,h=t.length-1,u=t[0],p=t[h],m=s.length-1,b=s[0],v=s[m],R,P;for(;o<=h&&n<=m;)if(u==null)u=t[++o];else if(p==null)p=t[--h];else if(b==null)b=s[++n];else if(v==null)v=s[--m];else if(dt(u,b,a))Ie(u,b,a),u=t[++o],b=s[++n];else if(dt(p,v,a))Ie(p,v,a),p=t[--h],v=s[--m];else if(dt(u,v,a))(u.$tag$==="slot"||v.$tag$==="slot")&&je(u.$elm$.parentNode,!1),Ie(u,v,a),Re(e,u.$elm$,p.$elm$.nextSibling),u=t[++o],v=s[--m];else if(dt(p,b,a))(u.$tag$==="slot"||v.$tag$==="slot")&&je(p.$elm$.parentNode,!1),Ie(p,b,a),Re(e,p.$elm$,u.$elm$),p=t[--h],b=s[++n];else{for(i=-1,c=o;c<=h;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===b.$key$){i=c;break}i>=0?(P=t[i],P.$tag$!==b.$tag$?R=ht(t&&t[n],r,i):(Ie(P,b,a),t[i]=void 0,R=P.$elm$),b=s[++n]):(R=ht(t&&t[n],r,n),b=s[++n]),R&&Re(We(u.$elm$).parentNode,R,We(u.$elm$))}o>h?Nr(e,s[m+1]==null?null:s[m+1].$elm$,r,s,n,m):n>m&&Hr(t,o,h)},dt=(e,t,r=!1)=>e.$tag$===t.$tag$?e.$tag$==="slot"?e.$name$===t.$name$:r?(r&&!e.$key$&&t.$key$&&(e.$key$=t.$key$),!0):e.$key$===t.$key$:!1,We=e=>e&&e["s-ol"]||e,Ie=(e,t,r=!1)=>{const s=t.$elm$=e.$elm$,a=e.$children$,o=t.$children$,n=t.$tag$,i=t.$text$;let c;i===null?(ne=n==="svg"?!0:n==="foreignObject"?!1:ne,n==="slot"&&!lt||Lr(e,t,ne),a!==null&&o!==null?Ha(s,a,t,o,r):o!==null?(e.$text$!==null&&(s.textContent=""),Nr(s,null,t,o,0,o.length-1)):!r&&_e.updatable&&a!==null&&Hr(a,0,a.length-1),ne&&n==="svg"&&(ne=!1)):(c=s["s-cr"])?c.parentNode.textContent=i:e.$text$!==i&&(s.data=i)},he=[],Ur=e=>{let t,r,s;const a=e.__childNodes||e.childNodes;for(const o of a){if(o["s-sr"]&&(t=o["s-cr"])&&t.parentNode){r=t.parentNode.__childNodes||t.parentNode.childNodes;const n=o["s-sn"];for(s=r.length-1;s>=0;s--)if(t=r[s],!t["s-cn"]&&!t["s-nr"]&&t["s-hn"]!==o["s-hn"])if($r(t,n)){let i=he.find(c=>c.$nodeToRelocate$===t);ut=!0,t["s-sn"]=t["s-sn"]||n,i?(i.$nodeToRelocate$["s-sh"]=o["s-hn"],i.$slotRefNode$=o):(t["s-sh"]=o["s-hn"],he.push({$slotRefNode$:o,$nodeToRelocate$:t})),t["s-sr"]&&he.map(c=>{$r(c.$nodeToRelocate$,t["s-sn"])&&(i=he.find(h=>h.$nodeToRelocate$===t),i&&!c.$slotRefNode$&&(c.$slotRefNode$=i.$slotRefNode$))})}else he.some(i=>i.$nodeToRelocate$===t)||he.push({$nodeToRelocate$:t})}o.nodeType===1&&Ur(o)}},Re=(e,t,r)=>e==null?void 0:e.insertBefore(t,r),Ua=(e,t,r=!1)=>{var s,a,o,n;const i=e.$hostElement$,c=e.$vnode$||it(null,null),h=Ma(t)?t:l(null,null,t);if(Lt=i.tagName,r&&h.$attrs$)for(const u of Object.keys(h.$attrs$))i.hasAttribute(u)&&!["key","ref","style","class"].includes(u)&&(h.$attrs$[u]=i[u]);h.$tag$=null,h.$flags$|=4,e.$vnode$=h,h.$elm$=c.$elm$=i,lt=Ra,Ft=i["s-cr"],ut=!1,Ie(c,h,r);{if(te.$flags$|=1,Dt){Ur(h.$elm$);for(const u of he){const p=u.$nodeToRelocate$;if(!p["s-ol"]){const m=Ae.createTextNode("");m["s-nr"]=p,Re(p.parentNode,p["s-ol"]=m,p)}}for(const u of he){const p=u.$nodeToRelocate$,m=u.$slotRefNode$;if(m){const b=m.parentNode;let v=m.nextSibling;{let L=(s=p["s-ol"])==null?void 0:s.previousSibling;for(;L;){let $=(a=L["s-nr"])!=null?a:null;if($&&$["s-sn"]===p["s-sn"]&&b===($.__parentNode||$.parentNode)){for($=$.nextSibling;$===p||$!=null&&$["s-sr"];)$=$==null?void 0:$.nextSibling;if(!$||!$["s-nr"]){v=$;break}}L=L.previousSibling}}const R=p.__parentNode||p.parentNode,P=p.__nextSibling||p.nextSibling;(!v&&b!==R||P!==v)&&p!==v&&(!p["s-hn"]&&p["s-ol"]&&(p["s-hn"]=p["s-ol"].parentNode.nodeName),Re(b,p,v),p.nodeType===1&&p.tagName!=="SLOT-FB"&&(p.hidden=(o=p["s-ih"])!=null?o:!1)),p&&typeof m["s-rf"]=="function"&&m["s-rf"](p)}else p.nodeType===1&&(r&&(p["s-ih"]=(n=p.hidden)!=null?n:!1),p.hidden=!0)}}ut&&Tr(h.$elm$),te.$flags$&=-2,he.length=0}Ft=void 0},zr=(e,t)=>{if(t&&!e.$onRenderResolve$&&t["s-p"]){const r=t["s-p"].push(new Promise(s=>e.$onRenderResolve$=()=>{t["s-p"].splice(r-1,1),s()}))}},Nt=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return zr(e,e.$ancestorComponent$),xa(()=>za(e,t))},za=(e,t)=>{const r=e.$hostElement$,s=Ve("scheduleUpdate",e.$cmpMeta$.$tagName$),a=r;if(!a)throw new Error(`Can't render component <${r.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(),Ba(o,()=>ja(e,a,t))},Ba=(e,t)=>Va(e)?e.then(t).catch(r=>{console.error(r),t()}):t(),Va=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",ja=async(e,t,r)=>{var s;const a=e.$hostElement$,o=Ve("update",e.$cmpMeta$.$tagName$),n=a["s-rc"],i=Ve("render",e.$cmpMeta$.$tagName$);Wa(e,t,a,r),n&&(n.map(c=>c()),a["s-rc"]=void 0),i(),o();{const c=(s=a["s-p"])!=null?s:[],h=()=>Ga(e);c.length===0?h():(Promise.all(c).then(h),e.$flags$|=4,c.length=0)}},Wa=(e,t,r,s)=>{try{t=t.render(),e.$flags$&=-17,e.$flags$|=2,Ua(e,t,s)}catch(a){nt(a,e.$hostElement$)}return null},Ga=e=>{const t=e.$cmpMeta$.$tagName$,r=e.$hostElement$,s=Ve("postUpdate",t),a=r,o=e.$ancestorComponent$;e.$flags$&64?s():(e.$flags$|=64,Br(r),Ya(a,"componentDidLoad",void 0,r),s(),e.$onReadyResolve$(r),o||qa()),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&It(()=>Nt(e,!1)),e.$flags$&=-517},qa=e=>{Br(Ae.documentElement),It(()=>Ir(ot,"appload",{detail:{namespace:$e}}))},Ya=(e,t,r,s)=>{if(e&&e[t])try{return e[t](r)}catch(a){nt(a,s)}},Br=e=>{var t;return e.classList.add((t=_e.hydratedSelectorName)!=null?t:"hydrated")},Za=(e,t)=>Se(e).$instanceValues$.get(t),Vr=(e,t,r,s)=>{const a=Se(e),o=e,n=a.$instanceValues$.get(t),i=a.$flags$,c=o;r=Ar(r,s.$members$[t][0]);const h=Number.isNaN(n)&&Number.isNaN(r);if(r!==n&&!h){a.$instanceValues$.set(t,r);{if(s.$watchers$&&i&128){const p=s.$watchers$[t];p&&p.map(m=>{try{c[m](r,n,t)}catch(b){nt(b,o)}})}(i&18)===2&&Nt(a,!1)}}},Qa=(e,t,r)=>{var s,a;const o=e.prototype;if(t.$members$||t.$watchers$||e.watchers){e.watchers&&!t.$watchers$&&(t.$watchers$=e.watchers);const n=Object.entries((s=t.$members$)!=null?s:{});n.map(([i,[c]])=>{if(c&31||c&32){const{get:h,set:u}=Object.getOwnPropertyDescriptor(o,i)||{};h&&(t.$members$[i][0]|=2048),u&&(t.$members$[i][0]|=4096),Object.defineProperty(o,i,{get(){return h?h.apply(this):Za(this,i)},configurable:!0,enumerable:!0}),Object.defineProperty(o,i,{set(p){const m=Se(this);if(u){const b=c&32?this[i]:m.$hostElement$[i];typeof b>"u"&&m.$instanceValues$.get(i)?p=m.$instanceValues$.get(i):!m.$instanceValues$.get(i)&&b&&m.$instanceValues$.set(i,b),u.apply(this,[Ar(p,c)]),p=c&32?this[i]:m.$hostElement$[i],Vr(this,i,p,t);return}{Vr(this,i,p,t);return}}})}});{const i=new Map;o.attributeChangedCallback=function(c,h,u){te.jmp(()=>{var p;const m=i.get(c);if(!(this.hasOwnProperty(m)&&_e.lazyLoad)){if(o.hasOwnProperty(m)&&typeof this[m]=="number"&&this[m]==u)return;if(m==null){const v=Se(this),R=v==null?void 0:v.$flags$;if(R&&!(R&8)&&R&128&&u!==h){const L=this,$=(p=t.$watchers$)==null?void 0:p[c];$==null||$.forEach(ve=>{L[ve]!=null&&L[ve].call(L,u,h,c)})}return}}const b=Object.getOwnPropertyDescriptor(o,m);u=u===null&&typeof this[m]=="boolean"?!1:u,u!==this[m]&&(!b.get||b.set)&&(this[m]=u)})},e.observedAttributes=Array.from(new Set([...Object.keys((a=t.$watchers$)!=null?a:{}),...n.filter(([c,h])=>h[0]&15).map(([c,h])=>{const u=h[1]||c;return i.set(u,c),u})]))}}return e},Ka=async(e,t,r,s)=>{if(!(t.$flags$&32)){t.$flags$|=32;{const n=e.localName;customElements.whenDefined(n).then(()=>t.$flags$|=128)}}const a=t.$ancestorComponent$,o=()=>Nt(t,!0);a&&a["s-rc"]?a["s-rc"].push(o):o()},Xa=(e,t)=>{},Ja=e=>{if(!(te.$flags$&1)){const t=Se(e),r=t.$cmpMeta$,s=Ve("connectedCallback",r.$tagName$);if(t.$flags$&1)t!=null&&t.$lazyInstance$||t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>Xa());else{t.$flags$|=1,r.$flags$&12&&en(e);{let a=e;for(;a=a.parentNode||a.host;)if(a["s-p"]){zr(t,t.$ancestorComponent$=a);break}}r.$members$&&Object.entries(r.$members$).map(([a,[o]])=>{if(o&31&&e.hasOwnProperty(a)){const n=e[a];delete e[a],e[a]=n}}),Ka(e,t)}s()}},en=e=>{const t=e["s-cr"]=Ae.createComment("");t["s-cn"]=!0,Re(e,t,e.firstChild)},tn=async e=>{te.$flags$&1||Se(e),ct.has(e)&&ct.delete(e),e.shadowRoot&&ct.has(e.shadowRoot)&&ct.delete(e.shadowRoot)},N=(e,t)=>{const r={$flags$:t[0],$tagName$:t[1]};r.$members$=t[2],r.$watchers$=e.$watchers$;const s=e.prototype.connectedCallback,a=e.prototype.disconnectedCallback;return Object.assign(e.prototype,{__hasHostListenerAttached:!1,__registerHost(){wa(this,r)},connectedCallback(){this.__hasHostListenerAttached||(Se(this),this.__hasHostListenerAttached=!0),Ja(this),s&&s.call(this)},disconnectedCallback(){tn(this),a&&a.call(this),te.raf(()=>{var o;const n=Se(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&&Sa(this)})},__attachShadow(){this.shadowRoot=this}}),e.is=r.$tagName$,Qa(e,r)},rn=(e,t)=>t,sn=Object.defineProperty,an=(e,t,r)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,I=(e,t,r)=>an(e,typeof t!="symbol"?t+"":t,r),de=(e=>(e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARN=2]="WARN",e[e.ERROR=3]="ERROR",e))(de||{});class nn{constructor(t){I(this,"logLevel"),I(this,"logFormatter"),this.logLevel=t.logLevel||1,this.logFormatter=t.logFormatter||this.defaultFormatter}defaultFormatter(t,r){return`[${de[t]}] ${new Date().toISOString()}: ${r}`}debug(t){this.logLevel<=0&&console.log(this.logFormatter(0,t))}info(t){this.logLevel<=1&&console.info(this.logFormatter(1,t))}warn(t){this.logLevel<=2&&console.warn(this.logFormatter(2,t))}error(t){this.logLevel<=3&&console.error(this.logFormatter(3,t))}log(t,r){switch(t){case 0:this.debug(r);break;case 1:this.info(r);break;case 2:this.warn(r);break;case 3:this.error(r);break}}}function fe(e,t,r,s){return new(r||(r=Promise))(function(a,o){function n(h){try{c(s.next(h))}catch(u){o(u)}}function i(h){try{c(s.throw(h))}catch(u){o(u)}}function c(h){var u;h.done?a(h.value):(u=h.value,u instanceof r?u:new r(function(p){p(u)})).then(n,i)}c((s=s.apply(e,[])).next())})}function pe(e,t){var r,s,a,o,n={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:i(0),throw:i(1),return:i(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function i(c){return function(h){return function(u){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,u[0]&&(n=0)),n;)try{if(r=1,s&&(a=2&u[0]?s.return:u[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,u[1])).done)return a;switch(s=0,a&&(u=[2&u[0],a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,s=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!((a=a.length>0&&a[a.length-1])||u[0]!==6&&u[0]!==2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(p){u=[6,p],s=0}finally{r=a=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([c,h])}}}var me={exclude:[]},jr={},on={timeout:"true"},ce=function(e,t){typeof window<"u"&&(jr[e]=t)},cn=function(){return Object.fromEntries(Object.entries(jr).filter(function(e){var t,r=e[0];return!(!((t=me==null?void 0:me.exclude)===null||t===void 0)&&t.includes(r))}).map(function(e){return[e[0],(0,e[1])()]}))};function ft(e){return e^=e>>>16,e=Math.imul(e,2246822507),e^=e>>>13,e=Math.imul(e,3266489909),(e^=e>>>16)>>>0}var q=new Uint32Array([597399067,2869860233,951274213,2716044179]);function ie(e,t){return e<<t|e>>>32-t}function Ht(e,t){var r;if(t===void 0&&(t=0),t=t?0|t:0,typeof e=="string"&&(r=e,e=new TextEncoder().encode(r).buffer),!(e 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 i=o.byteLength/16|0,c=new Uint32Array(o,0,4*i),h=0;h<i;h++){var u=c.subarray(4*h,4*(h+1));u[0]=Math.imul(u[0],q[0]),u[0]=ie(u[0],15),u[0]=Math.imul(u[0],q[1]),n[0]=n[0]^u[0],n[0]=ie(n[0],19),n[0]=n[0]+n[1],n[0]=Math.imul(n[0],5)+1444728091,u[1]=Math.imul(u[1],q[1]),u[1]=ie(u[1],16),u[1]=Math.imul(u[1],q[2]),n[1]=n[1]^u[1],n[1]=ie(n[1],17),n[1]=n[1]+n[2],n[1]=Math.imul(n[1],5)+197830471,u[2]=Math.imul(u[2],q[2]),u[2]=ie(u[2],17),u[2]=Math.imul(u[2],q[3]),n[2]=n[2]^u[2],n[2]=ie(n[2],15),n[2]=n[2]+n[3],n[2]=Math.imul(n[2],5)+2530024501,u[3]=Math.imul(u[3],q[3]),u[3]=ie(u[3],18),u[3]=Math.imul(u[3],q[0]),n[3]=n[3]^u[3],n[3]=ie(n[3],13),n[3]=n[3]+n[0],n[3]=Math.imul(n[3],5)+850148119}})(e,s),function(o,n){var i=o.byteLength/16|0,c=o.byteLength%16,h=new Uint32Array(4),u=new Uint8Array(o,16*i,c);switch(c){case 15:h[3]=h[3]^u[14]<<16;case 14:h[3]=h[3]^u[13]<<8;case 13:h[3]=h[3]^u[12]<<0,h[3]=Math.imul(h[3],q[3]),h[3]=ie(h[3],18),h[3]=Math.imul(h[3],q[0]),n[3]=n[3]^h[3];case 12:h[2]=h[2]^u[11]<<24;case 11:h[2]=h[2]^u[10]<<16;case 10:h[2]=h[2]^u[9]<<8;case 9:h[2]=h[2]^u[8]<<0,h[2]=Math.imul(h[2],q[2]),h[2]=ie(h[2],17),h[2]=Math.imul(h[2],q[3]),n[2]=n[2]^h[2];case 8:h[1]=h[1]^u[7]<<24;case 7:h[1]=h[1]^u[6]<<16;case 6:h[1]=h[1]^u[5]<<8;case 5:h[1]=h[1]^u[4]<<0,h[1]=Math.imul(h[1],q[1]),h[1]=ie(h[1],16),h[1]=Math.imul(h[1],q[2]),n[1]=n[1]^h[1];case 4:h[0]=h[0]^u[3]<<24;case 3:h[0]=h[0]^u[2]<<16;case 2:h[0]=h[0]^u[1]<<8;case 1:h[0]=h[0]^u[0]<<0,h[0]=Math.imul(h[0],q[0]),h[0]=ie(h[0],15),h[0]=Math.imul(h[0],q[1]),n[0]=n[0]^h[0]}}(e,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]=ft(n[0]),n[1]=ft(n[1]),n[2]=ft(n[2]),n[3]=ft(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}(e,s);var a=new Uint8Array(s.buffer);return Array.from(a).map(function(o){return o.toString(16).padStart(2,"0")}).join("")}function ln(e,t){return new Promise(function(r){setTimeout(function(){return r(t)},e)})}function un(e,t,r){return Promise.all(e.map(function(s){return Promise.race([s,ln(t,r)])}))}function hn(){return fe(this,void 0,void 0,function(){var e,t,r,s,a;return pe(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),e=cn(),t=Object.keys(e),[4,un(Object.values(e),(me==null?void 0:me.timeout)||1e3,on)];case 1:return r=o.sent(),s=r.filter(function(n){return n!==void 0}),a={},s.forEach(function(n,i){a[t[i]]=n}),[2,Wr(a,me.exclude||[])];case 2:throw o.sent();case 3:return[2]}})})}function Wr(e,t){var r={},s=function(o){if(e.hasOwnProperty(o)){var n=e[o];if(typeof n!="object"||Array.isArray(n))t.includes(o)||(r[o]=n);else{var i=Wr(n,t.map(function(c){return c.startsWith(o+".")?c.slice(o.length+1):c}));Object.keys(i).length>0&&(r[o]=i)}}};for(var a in e)s(a);return r}function dn(e){return fe(this,void 0,void 0,function(){var t,r;return pe(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,hn()];case 1:return t=s.sent(),r=Ht(JSON.stringify(t)),[2,r.toString()];case 2:throw s.sent();case 3:return[2]}})})}function fn(e){for(var t=0,r=0;r<e.length;++r)t+=Math.abs(e[r]);return t}function Gr(e,t,r){for(var s=[],a=0;a<e[0].data.length;a++){for(var o=[],n=0;n<e.length;n++)o.push(e[n].data[a]);s.push(pn(o))}var i=new Uint8ClampedArray(s);return new ImageData(i,t,r)}function pn(e){if(e.length===0)return 0;for(var t={},r=0,s=e;r<s.length;r++)t[o=s[r]]=(t[o]||0)+1;var a=e[0];for(var o in t)t[o]>t[a]&&(a=parseInt(o,10));return a}function Ge(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var e=navigator.userAgent,t={Edg:"Edge",OPR:"Opera"},r=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+)?)/];r<s.length;r++){var a=s[r],o=e.match(a);if(o&&o.groups)return{name:t[o.groups.name]||o.groups.name,version:o.groups.version}}return{name:"unknown",version:"unknown"}}ce("audio",function(){return fe(this,void 0,void 0,function(){return pe(this,function(e){return[2,new Promise(function(t,r){try{var s=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),a=s.createBufferSource(),o=s.createOscillator();o.frequency.value=1e3;var n,i=s.createDynamicsCompressor();i.threshold.value=-50,i.knee.value=40,i.ratio.value=12,i.attack.value=0,i.release.value=.2,o.connect(i),i.connect(s.destination),o.start(),s.oncomplete=function(c){n=c.renderedBuffer.getChannelData(0),t({sampleHash:fn(n),oscillator:o.type,maxChannels:s.destination.maxChannelCount,channelCountMode:a.channelCountMode})},s.startRendering()}catch(c){console.error("Error creating audio fingerprint:",c),r(c)}})]})})});var mn=Ge().name!=="SamsungBrowser"?1:3,qr=280,Yr=20;Ge().name!="Firefox"&&ce("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(e){var t=Array.from({length:mn},function(){return function(){var r=document.createElement("canvas"),s=r.getContext("2d");if(!s)return new ImageData(1,1);r.width=qr,r.height=Yr;var a=s.createLinearGradient(0,0,r.width,r.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,r.width,r.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*r.width/7,r.height),s.strokeStyle="white",s.lineWidth=2,s.stroke();var n=s.getImageData(0,0,r.width,r.height);return n}()});e({commonImageDataHash:Ht(Gr(t,qr,Yr).data.toString()).toString()})})});var Ut,gn=["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"],vn=["monospace","sans-serif","serif"];function Zr(e,t){if(!e)throw new Error("Canvas context not supported");return e.font="72px ".concat(t),e.measureText("WwMmLli0Oo").width}function bn(){var e,t=document.createElement("canvas"),r=(e=t.getContext("webgl"))!==null&&e!==void 0?e:t.getContext("experimental-webgl");if(r&&"getParameter"in r)try{var s=(r.getParameter(r.VENDOR)||"").toString(),a=(r.getParameter(r.RENDERER)||"").toString(),o={vendor:s,renderer:a,version:(r.getParameter(r.VERSION)||"").toString(),shadingLanguageVersion:(r.getParameter(r.SHADING_LANGUAGE_VERSION)||"").toString()};if(!a.length||!s.length){var n=r.getExtension("WEBGL_debug_renderer_info");if(n){var i=(r.getParameter(n.UNMASKED_VENDOR_WEBGL)||"").toString(),c=(r.getParameter(n.UNMASKED_RENDERER_WEBGL)||"").toString();i&&(o.vendorUnmasked=i),c&&(o.rendererUnmasked=c)}}return o}catch{}return"undefined"}function yn(){var e=new Float32Array(1),t=new Uint8Array(e.buffer);return e[0]=1/0,e[0]=e[0]-e[0],t[3]}function Cn(e,t){var r={};return t.forEach(function(s){var a=function(o){if(o.length===0)return null;var n={};o.forEach(function(h){var u=String(h);n[u]=(n[u]||0)+1});var i=o[0],c=1;return Object.keys(n).forEach(function(h){n[h]>c&&(i=h,c=n[h])}),i}(e.map(function(o){return s in o?o[s]:void 0}).filter(function(o){return o!==void 0}));a&&(r[s]=a)}),r}function Sn(){var e=[],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(r){t[r].forEach(function(s){matchMedia("(".concat(r,": ").concat(s,")")).matches&&e.push("".concat(r,": ").concat(s))})}),e}function wn(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var e=window.ApplePaySession.supportsVersion,t=15;t>0;t--)if(e(t))return t}catch{return 0}return 0}Ge().name!="Firefox"&&ce("fonts",function(){var e=this;return new Promise(function(t,r){try{(function(s){var a;fe(this,void 0,void 0,function(){var o,n,i;return pe(this,function(c){switch(c.label){case 0:return document.body?[3,2]:[4,(h=50,new Promise(function(p){return setTimeout(p,h,u)}))];case 1:return c.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),!(i=o.contentDocument||((a=o.contentWindow)===null||a===void 0?void 0:a.document)))throw new Error("Iframe document is not accessible");return s({iframe:i}),setTimeout(function(){document.body.removeChild(o)},0),[2]}var h,u})})})(function(s){var a=s.iframe;return fe(e,void 0,void 0,function(){var o,n,i,c;return pe(this,function(h){return o=a.createElement("canvas"),n=o.getContext("2d"),i=vn.map(function(u){return Zr(n,u)}),c={},gn.forEach(function(u){var p=Zr(n,u);i.includes(p)||(c[u]=p)}),t(c),[2]})})})}catch{r({error:"unsupported"})}})}),ce("hardware",function(){return new Promise(function(e,t){var r=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,s=window.performance&&window.performance.memory?window.performance.memory:0;e({videocard:bn(),architecture:yn(),deviceMemory:r.toString()||"undefined",jsHeapSizeLimit:s.jsHeapSizeLimit||0})})}),ce("locales",function(){return new Promise(function(e){e({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),ce("permissions",function(){return fe(this,void 0,void 0,function(){var e;return pe(this,function(t){return Ut=(me==null?void 0:me.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"],e=Array.from({length:(me==null?void 0:me.retries)||3},function(){return function(){return fe(this,void 0,void 0,function(){var r,s,a,o,n;return pe(this,function(i){switch(i.label){case 0:r={},s=0,a=Ut,i.label=1;case 1:if(!(s<a.length))return[3,6];o=a[s],i.label=2;case 2:return i.trys.push([2,4,,5]),[4,navigator.permissions.query({name:o})];case 3:return n=i.sent(),r[o]=n.state.toString(),[3,5];case 4:return i.sent(),[3,5];case 5:return s++,[3,1];case 6:return[2,r]}})})}()}),[2,Promise.all(e).then(function(r){return Cn(r,Ut)})]})})}),ce("plugins",function(){var e=[];if(navigator.plugins)for(var t=0;t<navigator.plugins.length;t++){var r=navigator.plugins[t];e.push([r.name,r.filename,r.description].join("|"))}return new Promise(function(s){s({plugins:e})})}),ce("screen",function(){return new Promise(function(e){e({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:Sn()})})}),ce("system",function(){return new Promise(function(e){var t=Ge();e({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:wn()})})});var Q,Rn=Ge().name!=="SamsungBrowser"?1:3,w=null;ce("webgl",function(){return fe(this,void 0,void 0,function(){var e;return pe(this,function(t){typeof document<"u"&&((Q=document.createElement("canvas")).width=200,Q.height=100,w=Q.getContext("webgl"));try{if(!w)throw new Error("WebGL not supported");return e=Array.from({length:Rn},function(){return function(){try{if(!w)throw new Error("WebGL not supported");var r=`
2
2
  attribute vec2 position;
3
3
  void main() {
4
4
  gl_Position = vec4(position, 0.0, 1.0);
@@ -8,7 +8,7 @@
8
8
  void main() {
9
9
  gl_FragColor = vec4(0.812, 0.195, 0.553, 0.921); // Set line color
10
10
  }
11
- `,a=w.createShader(w.VERTEX_SHADER),o=w.createShader(w.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(w.shaderSource(a,r),w.shaderSource(o,s),w.compileShader(a),!w.getShaderParameter(a,w.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+w.getShaderInfoLog(a));if(w.compileShader(o),!w.getShaderParameter(o,w.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+w.getShaderInfoLog(o));var n=w.createProgram();if(!n)throw new Error("Failed to create shader program");if(w.attachShader(n,a),w.attachShader(n,o),w.linkProgram(n),!w.getProgramParameter(n,w.LINK_STATUS))throw new Error("Shader program linking failed: "+w.getProgramInfoLog(n));w.useProgram(n);for(var c=137,i=new Float32Array(4*c),h=2*Math.PI/c,u=0;u<c;u++){var p=u*h;i[4*u]=0,i[4*u+1]=0,i[4*u+2]=Math.cos(p)*(Q.width/2),i[4*u+3]=Math.sin(p)*(Q.height/2)}var m=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,m),w.bufferData(w.ARRAY_BUFFER,i,w.STATIC_DRAW);var v=w.getAttribLocation(n,"position");w.enableVertexAttribArray(v),w.vertexAttribPointer(v,2,w.FLOAT,!1,0,0),w.viewport(0,0,Q.width,Q.height),w.clearColor(0,0,0,1),w.clear(w.COLOR_BUFFER_BIT),w.drawArrays(w.LINES,0,2*c);var b=new Uint8ClampedArray(Q.width*Q.height*4);return w.readPixels(0,0,Q.width,Q.height,w.RGBA,w.UNSIGNED_BYTE,b),new ImageData(b,Q.width,Q.height)}catch{return new ImageData(1,1)}finally{w&&(w.bindBuffer(w.ARRAY_BUFFER,null),w.useProgram(null),w.viewport(0,0,w.drawingBufferWidth,w.drawingBufferHeight),w.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Ut(qr(e,Q.width,Q.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var Ee=function(e,t,r,s){for(var a=(r-t)/s,o=0,n=0;n<s;n++)o+=e(t+(n+.5)*a);return o*a};le("math",function(){return pe(void 0,void 0,void 0,function(){return me(this,function(e){return[2,{acos:Math.acos(.5),asin:Ee(Math.asin,-1,1,97),atan:Ee(Math.atan,-1,1,97),cos:Ee(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:Ee(Math.sin,-Math.PI,Math.PI,97),sinh:Ee(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:Ee(Math.tan,0,2*Math.PI,97),tanh:Ee(Math.tanh,-9/7,7/9,97)}]})})});const En="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Oe=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=En[r[e]&63];return t};class Bt{constructor(t){A(this,"config"),this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,r){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class xn extends Bt{async getAds(t){if(!this.config.admSub)return console.error("No admSub specified in config."),[];const r=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:this.config.admSub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,s=await(await fetch(r,{method:"GET"})).json(),a=s.product_ads.map(n=>({id:Oe(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:n})),o=s.text_ads.map(n=>({id:Oe(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:n}));return a.concat(o)}async onAdContainerViewed(t){var r;const s=t.adClientResponseItem;(r=s.admAd)!=null&&r.impression_url&&fetch(s.admAd.impression_url)}}class Tn extends Bt{async getAds(t){return[]}}const Pn=1e3;class $n extends Bt{constructor(t){super(t),A(this,"adCallTimeout"),this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var s;if((((s=r.data.hits)==null?void 0:s.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(Pn)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const _n=600;class In{constructor(t,r,s){A(this,"measureRequestTimeout"),A(this,"measureRequestsBatched",[]),A(this,"config"),A(this,"sdkInfo"),A(this,"userId"),A(this,"sessionId"),A(this,"sendMeasureEvent",async(a,o={},n={})=>{const c={event_name:a,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...n}};if(a==="document_clicked"){const i=JSON.stringify(c),h=`${this.baseMeasureUrl}/event`;try{const u=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:i,keepalive:!0});if(!u.ok)throw new Error(`Failed to send request: ${u.status} ${u.statusText}`)}catch(u){throw console.error("Error sending MeasureRequest:",u),u}}else this.measureRequestsBatched.push(c),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const i=JSON.stringify({items:this.measureRequestsBatched}),h=`${this.baseMeasureUrl}/batch`;try{const u=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:i,keepalive:!0});if(this.measureRequestsBatched=[],!u.ok)throw new Error(`Failed to send request: ${u.status} ${u.statusText}`);return}catch(u){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",u),u}},_n)}),this.config=t,this.sdkInfo=r,this.userId=s,this.sessionId=Oe(),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 An=e=>e.endsWith("/")?e.slice(0,-1):e,mt=e=>{let t="";if(t=e.trim(),t=t.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},Mn=500;class On{constructor(t,r,s){A(this,"config"),A(this,"userId"),A(this,"parent"),A(this,"searchCompletedEventTimeout"),A(this,"abortController"),A(this,"getSearchResponseItems",async(a,o=!0)=>{var n,c,i,h,u,p;(n=this.abortController)==null||n.abort("A newer search request has replaced this one."),this.abortController=new AbortController;let m,v="";return typeof a=="string"?v=mt(a):(a.searchTerm=mt(a.searchTerm),v=a.searchTerm),(c=this.parent.measureClient)==null||c.sendMeasureEvent("search_requested",{search_term:v}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:v}}),(i=this.parent.adClient)==null||i.onQuerySubmitted(typeof a=="string"?{searchTerm:v,mode:"exact"}:a),typeof a=="string"?m=await this.handleGetSearchResponseItemsWithString(v):m=await this.handleGetSearchResponseItemsWithObject(a),o&&((h=this.parent.measureClient)==null||h.sendMeasureEvent("search_response_received",{search_term:v,number_of_documents:m.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var b;(b=this.parent.measureClient)==null||b.sendMeasureEvent("search_completed",{search_term:v,number_of_documents:m.data.count})},Mn),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:v}}),(((u=m.data.hits)==null?void 0:u.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(p=this.parent.adClient)==null||p.onQueryFetched(typeof a=="string"?{searchTerm:v,mode:"exact"}:a,m)),m}),A(this,"handleGetSearchResponseItemsWithString",async a=>{var o,n;let c;try{c=JSON.parse(a),c={limit:this.config.searchResultsPerPage,...c}}catch{throw new Error("Error: Query string is not valid json.")}const i=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)||Oe()},body:JSON.stringify(c),signal:(n=this.abortController)==null?void 0:n.signal});if(!i.ok)throw new Error(`Error: ${i.statusText} (Status: ${i.status})`);return await i.json()}),A(this,"handleGetSearchResponseItemsWithObject",async a=>{var o,n;const c=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)||Oe()},body:JSON.stringify({query:this.formatParamsForRequest(a),offset:a.offset||0,limit:a.limit||this.config.searchResultsPerPage||20,...a.order_by&&{order_by:a.order_by},...a.sort&&{sort:a.sort}}),signal:(n=this.abortController)==null?void 0:n.signal});if(!c.ok)throw new Error(`Error: ${c.statusText} (Status: ${c.status})`);return await c.json()}),this.parent=t,this.config=r,this.userId=s}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}formatParamsForRequest(t){const r=[];let s="should";t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(n=>{var c;const i=(c=t.facetPathsForIndexFields)==null?void 0:c[n];i&&(s="must",r.push({occur:"must",exact:{ctx:mt(i.value)}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(n=>{var c;const i=(c=t.rangeValueForIndexFields)==null?void 0:c[n];i&&(s="must",r.push({occur:"must",exact:{ctx:mt(i.value)}}))});const a=t.searchTerm,o=t.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return r.push({occur:t.mode==="exact"?"must":s,...o}),r}}class Fn{constructor(t,r){if(A(this,"config"),A(this,"measureClient"),A(this,"searchClient"),A(this,"adClient"),A(this,"userId"),A(this,"requestTimeout"),A(this,"subscriptionEvents",{}),A(this,"getResponseItems",(s,a,o)=>{const n=async()=>{(async()=>{var c;if(!this.searchClient){console.error("Search client was not initialized.");return}let i;try{i=await this.searchClient.getSearchResponseItems(s)}catch(p){console.info(`Search request error: ${p}`);return}if(!i){console.error("Search request error: Search response was undefined");return}const h=(i.data.hits||[]).filter(p=>!!p.doc).map(p=>({id:Oe(),document:p.doc||{id:-1},source_index:p.source_index,type:"SearchDocument"}));let u;if(typeof s=="object"){const p=structuredClone(s);if(p.facetPathsForIndexFields&&Object.keys(p.facetPathsForIndexFields).length>0){p.facetPathsForIndexFields=void 0;try{u=await((c=this==null?void 0:this.searchClient)==null?void 0:c.getSearchResponseItems(p,!1))}catch(m){console.info(`Search request error: ${m}`)}}}a(s,i,h,u)})(),(async()=>{if(this.adClient&&typeof s!="string"){const c=await this.adClient.getAds(s);o(c)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(n,this.config.searchDebounceDelay):n()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:An(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&r.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),typeof window<"u"&&(this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations())}initInputForms(){const t=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{t.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((t,r)=>{let s=!1;for(const a of t)a.type==="childList"&&a.addedNodes.forEach(o=>{o.nodeType===1&&(o.getAttribute("class")||"").toLowerCase()==="searchcraft-input-form"&&(s=!0)});s&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let s=this.config.userId;switch(s||(s=await fn()),this.measureClient=new In(t,r,s),this.searchClient=new On(this,t,s),t.adSource){case"adMarketplace":this.adClient=new xn(t);break;case"Nativo":this.adClient=new $n(t);break;case"Custom":this.adClient=new Tn(t);break}this.emitEvent("initialized",{name:"initialized"})},300)}emitEvent(t,r){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==r)}}handleAdContainerRendered(t){var r;(r=this.adClient)==null||r.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var r;(r=this.adClient)==null||r.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}var Kr={},Vt={};const Xr=e=>{let t;const r=new Set,s=(h,u)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const m=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(v=>v(t,m))}},a=()=>t,c={setState:s,getState:a,getInitialState:()=>i,subscribe:h=>(r.add(h),()=>r.delete(h))},i=t=e(s,a,c);return c},Ln=e=>e?Xr(e):Xr;Vt.createStore=Ln;var jt={},Jr={exports:{}},k={};/**
11
+ `,a=w.createShader(w.VERTEX_SHADER),o=w.createShader(w.FRAGMENT_SHADER);if(!a||!o)throw new Error("Failed to create shaders");if(w.shaderSource(a,r),w.shaderSource(o,s),w.compileShader(a),!w.getShaderParameter(a,w.COMPILE_STATUS))throw new Error("Vertex shader compilation failed: "+w.getShaderInfoLog(a));if(w.compileShader(o),!w.getShaderParameter(o,w.COMPILE_STATUS))throw new Error("Fragment shader compilation failed: "+w.getShaderInfoLog(o));var n=w.createProgram();if(!n)throw new Error("Failed to create shader program");if(w.attachShader(n,a),w.attachShader(n,o),w.linkProgram(n),!w.getProgramParameter(n,w.LINK_STATUS))throw new Error("Shader program linking failed: "+w.getProgramInfoLog(n));w.useProgram(n);for(var i=137,c=new Float32Array(4*i),h=2*Math.PI/i,u=0;u<i;u++){var p=u*h;c[4*u]=0,c[4*u+1]=0,c[4*u+2]=Math.cos(p)*(Q.width/2),c[4*u+3]=Math.sin(p)*(Q.height/2)}var m=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,m),w.bufferData(w.ARRAY_BUFFER,c,w.STATIC_DRAW);var b=w.getAttribLocation(n,"position");w.enableVertexAttribArray(b),w.vertexAttribPointer(b,2,w.FLOAT,!1,0,0),w.viewport(0,0,Q.width,Q.height),w.clearColor(0,0,0,1),w.clear(w.COLOR_BUFFER_BIT),w.drawArrays(w.LINES,0,2*i);var v=new Uint8ClampedArray(Q.width*Q.height*4);return w.readPixels(0,0,Q.width,Q.height,w.RGBA,w.UNSIGNED_BYTE,v),new ImageData(v,Q.width,Q.height)}catch{return new ImageData(1,1)}finally{w&&(w.bindBuffer(w.ARRAY_BUFFER,null),w.useProgram(null),w.viewport(0,0,w.drawingBufferWidth,w.drawingBufferHeight),w.clearColor(0,0,0,0))}}()}),[2,{commonImageHash:Ht(Gr(e,Q.width,Q.height).data.toString()).toString()}]}catch{return[2,{webgl:"unsupported"}]}return[2]})})});var ke=function(e,t,r,s){for(var a=(r-t)/s,o=0,n=0;n<s;n++)o+=e(t+(n+.5)*a);return o*a};ce("math",function(){return fe(void 0,void 0,void 0,function(){return pe(this,function(e){return[2,{acos:Math.acos(.5),asin:ke(Math.asin,-1,1,97),atan:ke(Math.atan,-1,1,97),cos:ke(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:ke(Math.sin,-Math.PI,Math.PI,97),sinh:ke(Math.sinh,-9/7,7/9,97),sqrt:Math.sqrt(2),tan:ke(Math.tan,0,2*Math.PI,97),tanh:ke(Math.tanh,-9/7,7/9,97)}]})})});const kn="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let Me=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=kn[r[e]&63];return t};class zt{constructor(t){I(this,"config"),this.config=t}async getAds(t){return[]}async onQuerySubmitted(t){}async onQueryFetched(t,r){}async onInputCleared(){}async onAdContainerRendered(t){}async onAdContainerViewed(t){}}class En extends zt{async getAds(t){if(!this.config.admSub)return console.error("No admSub specified in config."),[];const r=`https://demofeed.is.ampfeed.com/is?${new URLSearchParams({partner:"demofeed",sub1:this.config.admSub,qt:t.searchTerm,v:"2.0",rfr:"searchcraft.io","results-ta":`${this.config.admTextAdQuantity||0}`,"results-pa":`${this.config.admProductAdQuantity||0}`}).toString()}`,s=await(await fetch(r,{method:"GET"})).json(),a=s.product_ads.map(n=>({id:Me(),adSource:"adMarketplace",admAdType:"adm-product-ad",admAd:n})),o=s.text_ads.map(n=>({id:Me(),adSource:"adMarketplace",admAdType:"adm-text-ad",admAd:n}));return a.concat(o)}async onAdContainerViewed(t){var r;const s=t.adClientResponseItem;(r=s.admAd)!=null&&r.impression_url&&fetch(s.admAd.impression_url)}}class xn extends zt{async getAds(t){return[]}}const Tn=1e3;class Pn extends zt{constructor(t){super(t),I(this,"adCallTimeout"),this.addScriptTagToDocument()}async onQuerySubmitted(t){this.addScriptTagToDocument()}async onQueryFetched(t,r){var s;if((((s=r.data.hits)==null?void 0:s.length)||0)===0){this.removeScriptTagFromDocument();return}this.performAdCall(Tn)}async onInputCleared(){this.removeScriptTagFromDocument()}performAdCall(t){this.adCallTimeout&&clearTimeout(this.adCallTimeout),this.adCallTimeout=setTimeout(()=>{this.addScriptTagToDocument();try{PostRelease==null||PostRelease.Start({ptd:[this.config.nativoPlacementId]})}catch(r){console.error(r)}},t)}async getAds(t){return[]}addScriptTagToDocument(){if(!document.head.querySelector("#nativo-tag")){const t=document.createElement("script");t.type="text/javascript",t.src="https://s.ntv.io/serve/load.js",t.id="nativo-tag",t.setAttribute("data-ntv-set-no-auto-start","true"),document.head.appendChild(t)}}removeScriptTagFromDocument(){const t=document.head.querySelector("#nativo-tag");t&&document.head.removeChild(t)}}const $n=600;class _n{constructor(t,r,s){I(this,"measureRequestTimeout"),I(this,"measureRequestsBatched",[]),I(this,"config"),I(this,"sdkInfo"),I(this,"userId"),I(this,"sessionId"),I(this,"sendMeasureEvent",async(a,o={},n={})=>{const i={event_name:a,properties:{searchcraft_index_names:this.config.index,session_id:this.sessionId,...o},user:{...this.measureRequestUser,...n}};if(a==="document_clicked"){const c=JSON.stringify(i),h=`${this.baseMeasureUrl}/event`;try{const u=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:c,keepalive:!0});if(!u.ok)throw new Error(`Failed to send request: ${u.status} ${u.statusText}`)}catch(u){throw console.error("Error sending MeasureRequest:",u),u}}else this.measureRequestsBatched.push(i),clearTimeout(this.measureRequestTimeout),this.measureRequestTimeout=setTimeout(async()=>{const c=JSON.stringify({items:this.measureRequestsBatched}),h=`${this.baseMeasureUrl}/batch`;try{const u=await fetch(h,{method:"POST",headers:{"Content-Type":"application/json",Authorization:this.config.readKey,"X-Sc-User-Id":this.userId,"X-Sc-Session-Id":this.sessionId},body:c,keepalive:!0});if(this.measureRequestsBatched=[],!u.ok)throw new Error(`Failed to send request: ${u.status} ${u.statusText}`);return}catch(u){throw this.measureRequestsBatched=[],console.error("Error sending MeasureRequest:",u),u}},$n)}),this.config=t,this.sdkInfo=r,this.userId=s,this.sessionId=Me(),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 An=e=>e.endsWith("/")?e.slice(0,-1):e,pt=e=>{let t="";if(t=e.trim(),t=t.replace(/[‘’“”]/g,r=>({"‘":"'","’":"'","“":'"',"”":'"'})[r]||r),(t.match(/"/g)||[]).length%2!==0)throw new Error("The search term contains an uneven number of quote characters.");return t},In=500;class Mn{constructor(t,r,s){I(this,"config"),I(this,"userId"),I(this,"parent"),I(this,"searchCompletedEventTimeout"),I(this,"abortController"),I(this,"supplementalAbortController"),I(this,"getSearchResponseItems",async(a,o=!1)=>{var n,i,c,h,u,p,m;let b,v="",R;return o?((n=this.supplementalAbortController)==null||n.abort("A newer search request has replaced this one."),R=new AbortController,this.supplementalAbortController=R):((i=this.abortController)==null||i.abort("A newer search request has replaced this one."),R=new AbortController,this.abortController=R),typeof a=="string"?v=pt(a):(a.searchTerm=pt(a.searchTerm),v=a.searchTerm),(c=this.parent.measureClient)==null||c.sendMeasureEvent("search_requested",{search_term:v}),this.parent.emitEvent("query_submitted",{name:"query_submitted",data:{searchTerm:v}}),(h=this.parent.adClient)==null||h.onQuerySubmitted(typeof a=="string"?{searchTerm:v,mode:"exact"}:a),typeof a=="string"?b=await this.handleGetSearchResponseItemsWithString(v,R):b=await this.handleGetSearchResponseItemsWithObject(a,R),o||((u=this.parent.measureClient)==null||u.sendMeasureEvent("search_response_received",{search_term:v,number_of_documents:b.data.count}),clearTimeout(this.searchCompletedEventTimeout),this.searchCompletedEventTimeout=setTimeout(()=>{var P;(P=this.parent.measureClient)==null||P.sendMeasureEvent("search_completed",{search_term:v,number_of_documents:b.data.count})},In),this.parent.emitEvent("query_fetched",{name:"query_fetched",data:{searchTerm:v}}),(((p=b.data.hits)==null?void 0:p.length)||0)===0&&this.parent.emitEvent("no_results_returned",{name:"no_results_returned"}),(m=this.parent.adClient)==null||m.onQueryFetched(typeof a=="string"?{searchTerm:v,mode:"exact"}:a,b)),b}),I(this,"handleGetSearchResponseItemsWithString",async(a,o)=>{var n;let i;try{i=JSON.parse(a),i={limit:this.config.searchResultsPerPage,...i}}catch{throw new Error("Error: Query string is not valid json.")}const c=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":((n=this.parent.measureClient)==null?void 0:n.sessionId)||Me()},body:JSON.stringify(i),signal:o.signal});if(!c.ok)throw new Error(`Error: ${c.statusText} (Status: ${c.status})`);return await c.json()}),I(this,"handleGetSearchResponseItemsWithObject",async(a,o)=>{var n;const i=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":((n=this.parent.measureClient)==null?void 0:n.sessionId)||Me()},body:JSON.stringify({query:this.formatParamsForRequest(a),offset:a.offset||0,limit:a.limit||this.config.searchResultsPerPage||20,...a.order_by&&{order_by:a.order_by},...a.sort&&{sort:a.sort}}),signal:o.signal});if(!i.ok)throw new Error(`Error: ${i.statusText} (Status: ${i.status})`);return await i.json()}),this.parent=t,this.config=r,this.userId=s}get baseSearchUrl(){return`${this.config.endpointURL}/index/${this.config.index.join(",")}/search`}formatParamsForRequest(t){const r=[];let s="should";t.facetPathsForIndexFields&&Object.keys(t.facetPathsForIndexFields).forEach(n=>{var i;const c=(i=t.facetPathsForIndexFields)==null?void 0:i[n];c&&(s="must",r.push({occur:"must",exact:{ctx:pt(c.value)}}))}),t.rangeValueForIndexFields&&Object.keys(t.rangeValueForIndexFields).forEach(n=>{var i;const c=(i=t.rangeValueForIndexFields)==null?void 0:i[n];c&&(s="must",r.push({occur:"must",exact:{ctx:pt(c.value)}}))});const a=t.searchTerm,o=t.mode==="fuzzy"?{fuzzy:{ctx:a}}:{exact:{ctx:`${a.startsWith('"')?a:`"${a}"`}`}};return r.push({occur:t.mode==="exact"?"must":s,...o}),r}}class On{constructor(t,r){if(I(this,"config"),I(this,"measureClient"),I(this,"searchClient"),I(this,"adClient"),I(this,"userId"),I(this,"requestTimeout"),I(this,"subscriptionEvents",{}),I(this,"getResponseItems",(s,a,o)=>{const n=async()=>{(async()=>{var i;if(!this.searchClient){console.error("Search client was not initialized.");return}let c;try{c=await this.searchClient.getSearchResponseItems(s,!1)}catch(p){console.info(`Search request error: ${p}`);return}if(!c){console.error("Search request error: Search response was undefined");return}const h=(c.data.hits||[]).filter(p=>!!p.doc).map(p=>({id:Me(),document:p.doc||{id:-1},source_index:p.source_index,type:"SearchDocument"}));let u;if(typeof s=="object"){const p=structuredClone(s);if(p.facetPathsForIndexFields&&Object.keys(p.facetPathsForIndexFields).length>0){p.facetPathsForIndexFields=void 0;try{u=await((i=this==null?void 0:this.searchClient)==null?void 0:i.getSearchResponseItems(p,!0))}catch(m){console.info(`Search request error: ${m}`);return}}}a(s,c,h,u)})(),(async()=>{if(this.adClient&&typeof s!="string"){const i=await this.adClient.getAds(s);o(i)}})()};clearTimeout(this.requestTimeout),this.config.searchDebounceDelay?this.requestTimeout=setTimeout(n,this.config.searchDebounceDelay):n()}),!t.endpointURL||!t.index||!t.readKey)throw new Error("Endpoint URL, Index value(s), and Read Key must be provided");this.config={...t,endpointURL:An(t.endpointURL)},this.userId="",typeof window<"u"&&typeof customElements<"u"&&r.sdkName==="@searchcraft/javascript-sdk"&&globalThis.__scDefineCustomElements__&&globalThis.__scDefineCustomElements__(),typeof window<"u"&&(this.initClients(this.config,r),this.initInputForms(),this.startObservingMutations())}initInputForms(){const t=document.querySelectorAll("searchcraft-input-form");setTimeout(()=>{t.forEach(r=>{r.core=this})},40)}startObservingMutations(){new MutationObserver((t,r)=>{let s=!1;for(const a of t)a.type==="childList"&&a.addedNodes.forEach(o=>{o.nodeType===1&&(o.getAttribute("class")||"").toLowerCase()==="searchcraft-input-form"&&(s=!0)});s&&this.initInputForms()}).observe(document.body,{childList:!0,subtree:!0})}initClients(t,r){setTimeout(async()=>{let s=this.config.userId;switch(s||(s=await dn()),this.measureClient=new _n(t,r,s),this.searchClient=new Mn(this,t,s),t.adSource){case"adMarketplace":this.adClient=new En(t);break;case"Nativo":this.adClient=new Pn(t);break;case"Custom":this.adClient=new xn(t);break}this.emitEvent("initialized",{name:"initialized"})},300)}emitEvent(t,r){var s;(s=this.subscriptionEvents[t])==null||s.forEach(a=>{a(r)})}subscribe(t,r){return this.subscriptionEvents[t]||(this.subscriptionEvents[t]=[]),this.subscriptionEvents[t].push(r),()=>{this.subscriptionEvents[t]=this.subscriptionEvents[t].filter(s=>s!==r)}}handleAdContainerRendered(t){var r;(r=this.adClient)==null||r.onAdContainerRendered(t),this.emitEvent("ad_container_rendered",{name:"ad_container_rendered",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleAdContainerViewed(t){var r;(r=this.adClient)==null||r.onAdContainerViewed(t),this.emitEvent("ad_container_viewed",{name:"ad_container_viewed",data:{adContainerId:t.adContainerId,adSource:t.adSource,searchTerm:t.searchTerm}})}handleInputCleared(){var t;this.emitEvent("input_cleared",{name:"input_cleared"}),(t=this.adClient)==null||t.onInputCleared()}}var Qr={},Bt={};const Kr=e=>{let t;const r=new Set,s=(h,u)=>{const p=typeof h=="function"?h(t):h;if(!Object.is(p,t)){const m=t;t=u??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(b=>b(t,m))}},a=()=>t,i={setState:s,getState:a,getInitialState:()=>c,subscribe:h=>(r.add(h),()=>r.delete(h))},c=t=e(s,a,i);return i},Fn=e=>e?Kr(e):Kr;Bt.createStore=Fn;var Vt={},Xr={exports:{}},k={};/**
12
12
  * @license React
13
13
  * react.production.js
14
14
  *
@@ -16,11 +16,11 @@
16
16
  *
17
17
  * This source code is licensed under the MIT license found in the
18
18
  * LICENSE file in the root directory of this source tree.
19
- */var Wt=Symbol.for("react.transitional.element"),Dn=Symbol.for("react.portal"),Nn=Symbol.for("react.fragment"),Hn=Symbol.for("react.strict_mode"),Un=Symbol.for("react.profiler"),zn=Symbol.for("react.consumer"),Bn=Symbol.for("react.context"),Vn=Symbol.for("react.forward_ref"),jn=Symbol.for("react.suspense"),Wn=Symbol.for("react.memo"),es=Symbol.for("react.lazy"),ts=Symbol.iterator;function Gn(e){return e===null||typeof e!="object"?null:(e=ts&&e[ts]||e["@@iterator"],typeof e=="function"?e:null)}var rs={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},ss=Object.assign,as={};function Fe(e,t,r){this.props=e,this.context=t,this.refs=as,this.updater=r||rs}Fe.prototype.isReactComponent={},Fe.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")},Fe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ns(){}ns.prototype=Fe.prototype;function Gt(e,t,r){this.props=e,this.context=t,this.refs=as,this.updater=r||rs}var qt=Gt.prototype=new ns;qt.constructor=Gt,ss(qt,Fe.prototype),qt.isPureReactComponent=!0;var os=Array.isArray,O={H:null,A:null,T:null,S:null},cs=Object.prototype.hasOwnProperty;function Yt(e,t,r,s,a,o){return r=o.ref,{$$typeof:Wt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function qn(e,t){return Yt(e.type,t,void 0,void 0,void 0,e.props)}function Zt(e){return typeof e=="object"&&e!==null&&e.$$typeof===Wt}function Yn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var is=/\/+/g;function Qt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Yn(""+e.key):t.toString(36)}function ls(){}function Zn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(ls,ls):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Le(e,t,r,s,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case Wt:case Dn:n=!0;break;case es:return n=e._init,Le(n(e._payload),t,r,s,a)}}if(n)return a=a(e),n=s===""?"."+Qt(e,0):s,os(a)?(r="",n!=null&&(r=n.replace(is,"$&/")+"/"),Le(a,t,r,"",function(h){return h})):a!=null&&(Zt(a)&&(a=qn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(is,"$&/")+"/")+n)),t.push(a)),1;n=0;var c=s===""?".":s+":";if(os(e))for(var i=0;i<e.length;i++)s=e[i],o=c+Qt(s,i),n+=Le(s,t,r,o,a);else if(i=Gn(e),typeof i=="function")for(e=i.call(e),i=0;!(s=e.next()).done;)s=s.value,o=c+Qt(s,i++),n+=Le(s,t,r,o,a);else if(o==="object"){if(typeof e.then=="function")return Le(Zn(e),t,r,s,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function gt(e,t,r){if(e==null)return e;var s=[],a=0;return Le(e,s,"","",function(o){return t.call(r,o,a++)}),s}function Qn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var us=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Kn(){}k.Children={map:gt,forEach:function(e,t,r){gt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return gt(e,function(){t++}),t},toArray:function(e){return gt(e,function(t){return t})||[]},only:function(e){if(!Zt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},k.Component=Fe,k.Fragment=Nn,k.Profiler=Un,k.PureComponent=Gt,k.StrictMode=Hn,k.Suspense=jn,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,k.act=function(){throw Error("act(...) is not supported in production builds of React.")},k.cache=function(e){return function(){return e.apply(null,arguments)}},k.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=ss({},e.props),a=e.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)!cs.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=r;else if(1<n){for(var c=Array(n),i=0;i<n;i++)c[i]=arguments[i+2];s.children=c}return Yt(e.type,a,void 0,void 0,o,s)},k.createContext=function(e){return e={$$typeof:Bn,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:zn,_context:e},e},k.createElement=function(e,t,r){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)cs.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=r;else if(1<n){for(var c=Array(n),i=0;i<n;i++)c[i]=arguments[i+2];a.children=c}if(e&&e.defaultProps)for(s in n=e.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return Yt(e,o,void 0,void 0,null,a)},k.createRef=function(){return{current:null}},k.forwardRef=function(e){return{$$typeof:Vn,render:e}},k.isValidElement=Zt,k.lazy=function(e){return{$$typeof:es,_payload:{_status:-1,_result:e},_init:Qn}},k.memo=function(e,t){return{$$typeof:Wn,type:e,compare:t===void 0?null:t}},k.startTransition=function(e){var t=O.T,r={};O.T=r;try{var s=e(),a=O.S;a!==null&&a(r,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Kn,us)}catch(o){us(o)}finally{O.T=t}},k.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},k.use=function(e){return O.H.use(e)},k.useActionState=function(e,t,r){return O.H.useActionState(e,t,r)},k.useCallback=function(e,t){return O.H.useCallback(e,t)},k.useContext=function(e){return O.H.useContext(e)},k.useDebugValue=function(){},k.useDeferredValue=function(e,t){return O.H.useDeferredValue(e,t)},k.useEffect=function(e,t){return O.H.useEffect(e,t)},k.useId=function(){return O.H.useId()},k.useImperativeHandle=function(e,t,r){return O.H.useImperativeHandle(e,t,r)},k.useInsertionEffect=function(e,t){return O.H.useInsertionEffect(e,t)},k.useLayoutEffect=function(e,t){return O.H.useLayoutEffect(e,t)},k.useMemo=function(e,t){return O.H.useMemo(e,t)},k.useOptimistic=function(e,t){return O.H.useOptimistic(e,t)},k.useReducer=function(e,t,r){return O.H.useReducer(e,t,r)},k.useRef=function(e){return O.H.useRef(e)},k.useState=function(e){return O.H.useState(e)},k.useSyncExternalStore=function(e,t,r){return O.H.useSyncExternalStore(e,t,r)},k.useTransition=function(){return O.H.useTransition()},k.version="19.0.0",Jr.exports=k;var hs=Jr.exports,Xn=Vt;const Jn=e=>e;function ds(e,t=Jn){const r=hs.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return hs.useDebugValue(r),r}const fs=e=>{const t=Xn.createStore(e),r=s=>ds(t,s);return Object.assign(r,t),r},eo=e=>e?fs(e):fs;jt.create=eo,jt.useStore=ds,function(e){var t=Vt,r=jt;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(r).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[s]}})})}(Kr);const ps={adClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",logger:void 0,facetPathsForIndexFields:{},initialQuery:"",initialSearchClientResponseItems:[],isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,afterInit:()=>{}},_=Kr.createStore((e,t)=>{const r={set:a=>(e(a),t()),addFacetPathsForIndexField:a=>r.set(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[a.fieldName]:a}})),addRangeValueForIndexField:a=>r.set(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[a.fieldName]:a}})),getSearchcraftCore:()=>{const{core:a}=t();return a},init:(a,o=!1)=>{const n=o?new on({logLevel:fe.DEBUG}):void 0,c=r.set({core:a,logger:n,searchResultsPerPage:(a==null?void 0:a.config.searchResultsPerPage)||20});a==null||a.subscribe("initialized",()=>{c.afterInit&&c.afterInit(c)})},removeFacetPathsForIndexField:a=>r.set(o=>{const n=o.facetPathsForIndexFields;return delete n[a],{facetPathsForIndexFields:{...n}}}),removeRangeValueForIndexField:a=>r.set(o=>{const n=o.rangeValueForIndexFields;return delete n[a],{rangeValueForIndexFields:{...n}}}),resetFacetPaths:()=>{r.set({facetPathsForIndexFields:{}})},search:async()=>{var o,n;const a=t();if((o=a.logger)==null||o.log(fe.INFO,`Starting search with search term: "${a.searchTerm}"`),!a.core)throw new Error("Searchcraft instance is not initialized.");if(!a.searchTerm.trim()){(n=a.logger)==null||n.log(fe.INFO,"No search request was made: search term was empty."),r.set({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}r.set({isSearchInProgress:!0}),a.core.getResponseItems({searchTerm:a.searchTerm,mode:a.searchMode,sort:a.sortType,order_by:a.orderByField,facetPathsForIndexFields:a.facetPathsForIndexFields,rangeValueForIndexFields:a.rangeValueForIndexFields,offset:a.searchResultsPerPage?a.searchResultsPerPage*(a.searchResultsPage-1):0,limit:a.searchResultsPerPage},r.setSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setAdClientResponseItems:a=>r.set({adClientResponseItems:a}),setSearchClientResponseItemsFromResponse:(a,o,n,c)=>{var m,v;const{facets:i,count:h=0,time_taken:u=0}=o.data,p=r.set(b=>({isSearchInProgress:!1,searchClientResponseItems:n,searchResponseTimeTaken:u,searchResultsPage:h===b.searchResultsCount?b.searchResultsPage:1,searchResultsCount:h,searchResponseFacetPrime:i,supplementalFacetPrime:c==null?void 0:c.data.facets,searchClientRequest:a}));(m=p.logger)==null||m.log(fe.DEBUG,`Search results: ${JSON.stringify(n)}`),(v=p.logger)==null||v.log(fe.DEBUG,`Facets from response: ${JSON.stringify(i)}`)},setInitialSearchClientResponseItemsFromResponse:(a,o,n)=>{var u;const c=t(),{count:i=0,time_taken:h=0}=o.data;r.set(p=>({isSearchInProgress:!1,initialSearchClientResponseItems:n,searchResponseTimeTaken:h,searchResultsPage:i===p.searchResultsCount?p.searchResultsPage:1,searchResultsCount:i,searchClientRequest:a})),(u=c.logger)==null||u.log(fe.DEBUG,`Search results: ${JSON.stringify(n)}`)},setInitialQuery:async a=>{var n;const o=r.set({initialQuery:a});if((n=o.logger)==null||n.log(fe.INFO,`Starting search with query: "${o.initialQuery}"`),!o.core)throw new Error("Searchcraft instance is not initialized.");await o.core.getResponseItems(a,r.setInitialSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setPopoverVisibility:a=>r.set({isPopoverVisible:a}),setSearchMode:a=>r.set({searchMode:a}),setSortOrder:({orderByField:a,sortType:o})=>r.set({sortType:o,orderByField:a}),setSearchTerm:a=>{const{core:o}=t();a.length===0&&(o==null||o.handleInputCleared()),r.set({searchTerm:a})},setSearchClientResponseItems:a=>r.set({searchClientResponseItems:a}),setSearchResultsCount:a=>r.set({searchResultsCount:a}),setSearchResultsPage:async a=>{r.set({searchResultsPage:a}),await r.search()},setSearchResultsPerPage:async a=>{r.set({searchResultsPerPage:a}),await r.search()},setHotKeyAndHotKeyModifier:(a,o)=>{const{hotkey:n,hotkeyModifier:c}=ps;r.set({hotkey:a||n,hotkeyModifier:o||c})}};return{...ps,...r}});var ms={exports:{}};/*!
19
+ */var jt=Symbol.for("react.transitional.element"),Ln=Symbol.for("react.portal"),Dn=Symbol.for("react.fragment"),Nn=Symbol.for("react.strict_mode"),Hn=Symbol.for("react.profiler"),Un=Symbol.for("react.consumer"),zn=Symbol.for("react.context"),Bn=Symbol.for("react.forward_ref"),Vn=Symbol.for("react.suspense"),jn=Symbol.for("react.memo"),Jr=Symbol.for("react.lazy"),es=Symbol.iterator;function Wn(e){return e===null||typeof e!="object"?null:(e=es&&e[es]||e["@@iterator"],typeof e=="function"?e:null)}var ts={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rs=Object.assign,ss={};function Oe(e,t,r){this.props=e,this.context=t,this.refs=ss,this.updater=r||ts}Oe.prototype.isReactComponent={},Oe.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")},Oe.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function as(){}as.prototype=Oe.prototype;function Wt(e,t,r){this.props=e,this.context=t,this.refs=ss,this.updater=r||ts}var Gt=Wt.prototype=new as;Gt.constructor=Wt,rs(Gt,Oe.prototype),Gt.isPureReactComponent=!0;var ns=Array.isArray,O={H:null,A:null,T:null,S:null},os=Object.prototype.hasOwnProperty;function qt(e,t,r,s,a,o){return r=o.ref,{$$typeof:jt,type:e,key:t,ref:r!==void 0?r:null,props:o}}function Gn(e,t){return qt(e.type,t,void 0,void 0,void 0,e.props)}function Yt(e){return typeof e=="object"&&e!==null&&e.$$typeof===jt}function qn(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var is=/\/+/g;function Zt(e,t){return typeof e=="object"&&e!==null&&e.key!=null?qn(""+e.key):t.toString(36)}function cs(){}function Yn(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(cs,cs):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Fe(e,t,r,s,a){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var n=!1;if(e===null)n=!0;else switch(o){case"bigint":case"string":case"number":n=!0;break;case"object":switch(e.$$typeof){case jt:case Ln:n=!0;break;case Jr:return n=e._init,Fe(n(e._payload),t,r,s,a)}}if(n)return a=a(e),n=s===""?"."+Zt(e,0):s,ns(a)?(r="",n!=null&&(r=n.replace(is,"$&/")+"/"),Fe(a,t,r,"",function(h){return h})):a!=null&&(Yt(a)&&(a=Gn(a,r+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(is,"$&/")+"/")+n)),t.push(a)),1;n=0;var i=s===""?".":s+":";if(ns(e))for(var c=0;c<e.length;c++)s=e[c],o=i+Zt(s,c),n+=Fe(s,t,r,o,a);else if(c=Wn(e),typeof c=="function")for(e=c.call(e),c=0;!(s=e.next()).done;)s=s.value,o=i+Zt(s,c++),n+=Fe(s,t,r,o,a);else if(o==="object"){if(typeof e.then=="function")return Fe(Yn(e),t,r,s,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return n}function mt(e,t,r){if(e==null)return e;var s=[],a=0;return Fe(e,s,"","",function(o){return t.call(r,o,a++)}),s}function Zn(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ls=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function Qn(){}k.Children={map:mt,forEach:function(e,t,r){mt(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return mt(e,function(){t++}),t},toArray:function(e){return mt(e,function(t){return t})||[]},only:function(e){if(!Yt(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},k.Component=Oe,k.Fragment=Dn,k.Profiler=Hn,k.PureComponent=Wt,k.StrictMode=Nn,k.Suspense=Vn,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,k.act=function(){throw Error("act(...) is not supported in production builds of React.")},k.cache=function(e){return function(){return e.apply(null,arguments)}},k.cloneElement=function(e,t,r){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=rs({},e.props),a=e.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)!os.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=r;else if(1<n){for(var i=Array(n),c=0;c<n;c++)i[c]=arguments[c+2];s.children=i}return qt(e.type,a,void 0,void 0,o,s)},k.createContext=function(e){return e={$$typeof:zn,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:Un,_context:e},e},k.createElement=function(e,t,r){var s,a={},o=null;if(t!=null)for(s in t.key!==void 0&&(o=""+t.key),t)os.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(a[s]=t[s]);var n=arguments.length-2;if(n===1)a.children=r;else if(1<n){for(var i=Array(n),c=0;c<n;c++)i[c]=arguments[c+2];a.children=i}if(e&&e.defaultProps)for(s in n=e.defaultProps,n)a[s]===void 0&&(a[s]=n[s]);return qt(e,o,void 0,void 0,null,a)},k.createRef=function(){return{current:null}},k.forwardRef=function(e){return{$$typeof:Bn,render:e}},k.isValidElement=Yt,k.lazy=function(e){return{$$typeof:Jr,_payload:{_status:-1,_result:e},_init:Zn}},k.memo=function(e,t){return{$$typeof:jn,type:e,compare:t===void 0?null:t}},k.startTransition=function(e){var t=O.T,r={};O.T=r;try{var s=e(),a=O.S;a!==null&&a(r,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Qn,ls)}catch(o){ls(o)}finally{O.T=t}},k.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},k.use=function(e){return O.H.use(e)},k.useActionState=function(e,t,r){return O.H.useActionState(e,t,r)},k.useCallback=function(e,t){return O.H.useCallback(e,t)},k.useContext=function(e){return O.H.useContext(e)},k.useDebugValue=function(){},k.useDeferredValue=function(e,t){return O.H.useDeferredValue(e,t)},k.useEffect=function(e,t){return O.H.useEffect(e,t)},k.useId=function(){return O.H.useId()},k.useImperativeHandle=function(e,t,r){return O.H.useImperativeHandle(e,t,r)},k.useInsertionEffect=function(e,t){return O.H.useInsertionEffect(e,t)},k.useLayoutEffect=function(e,t){return O.H.useLayoutEffect(e,t)},k.useMemo=function(e,t){return O.H.useMemo(e,t)},k.useOptimistic=function(e,t){return O.H.useOptimistic(e,t)},k.useReducer=function(e,t,r){return O.H.useReducer(e,t,r)},k.useRef=function(e){return O.H.useRef(e)},k.useState=function(e){return O.H.useState(e)},k.useSyncExternalStore=function(e,t,r){return O.H.useSyncExternalStore(e,t,r)},k.useTransition=function(){return O.H.useTransition()},k.version="19.0.0",Xr.exports=k;var us=Xr.exports,Kn=Bt;const Xn=e=>e;function hs(e,t=Xn){const r=us.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return us.useDebugValue(r),r}const ds=e=>{const t=Kn.createStore(e),r=s=>hs(t,s);return Object.assign(r,t),r},Jn=e=>e?ds(e):ds;Vt.create=Jn,Vt.useStore=hs,function(e){var t=Bt,r=Vt;Object.keys(t).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[s]}})}),Object.keys(r).forEach(function(s){s!=="default"&&!Object.prototype.hasOwnProperty.call(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:function(){return r[s]}})})}(Qr);const fs={adClientResponseItems:[],core:void 0,hotkey:"k",hotkeyModifier:"meta",logger:void 0,facetPathsForIndexFields:{},initialQuery:"",initialSearchClientResponseItems:[],isPopoverVisible:!1,isSearchInProgress:!1,rangeValueForIndexFields:{},searchTerm:"",searchMode:"fuzzy",searchClientRequest:void 0,searchClientResponseItems:[],searchResponseTimeTaken:void 0,searchResponseFacetPrime:void 0,supplementalFacetPrime:void 0,searchResultsCount:0,searchResultsPerPage:20,searchResultsPage:1,sortType:void 0,orderByField:void 0,afterInit:()=>{}},A=Qr.createStore((e,t)=>{const r={set:a=>(e(a),t()),addFacetPathsForIndexField:a=>r.set(o=>({facetPathsForIndexFields:{...o.facetPathsForIndexFields,[a.fieldName]:a}})),addRangeValueForIndexField:a=>r.set(o=>({rangeValueForIndexFields:{...o.rangeValueForIndexFields,[a.fieldName]:a}})),getSearchcraftCore:()=>{const{core:a}=t();return a},init:(a,o=!1)=>{const n=o?new nn({logLevel:de.DEBUG}):void 0,i=r.set({core:a,logger:n,searchResultsPerPage:(a==null?void 0:a.config.searchResultsPerPage)||20});a==null||a.subscribe("initialized",()=>{i.afterInit&&i.afterInit(i)})},removeFacetPathsForIndexField:a=>r.set(o=>{const n=o.facetPathsForIndexFields;return delete n[a],{facetPathsForIndexFields:{...n}}}),removeRangeValueForIndexField:a=>r.set(o=>{const n=o.rangeValueForIndexFields;return delete n[a],{rangeValueForIndexFields:{...n}}}),resetFacetPaths:()=>{r.set({facetPathsForIndexFields:{}})},search:async()=>{var o,n;const a=t();if((o=a.logger)==null||o.log(de.INFO,`Starting search with search term: "${a.searchTerm}"`),!a.core)throw new Error("Searchcraft instance is not initialized.");if(!a.searchTerm.trim()){(n=a.logger)==null||n.log(de.INFO,"No search request was made: search term was empty."),r.set({searchClientResponseItems:[],searchResultsCount:0,searchResultsPage:1,searchTerm:""});return}r.set({isSearchInProgress:!0}),a.core.getResponseItems({searchTerm:a.searchTerm,mode:a.searchMode,sort:a.sortType,order_by:a.orderByField,facetPathsForIndexFields:a.facetPathsForIndexFields,rangeValueForIndexFields:a.rangeValueForIndexFields,offset:a.searchResultsPerPage?a.searchResultsPerPage*(a.searchResultsPage-1):0,limit:a.searchResultsPerPage},r.setSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setAdClientResponseItems:a=>r.set({adClientResponseItems:a}),setSearchClientResponseItemsFromResponse:(a,o,n,i)=>{var m,b;const{facets:c,count:h=0,time_taken:u=0}=o.data,p=r.set(v=>({isSearchInProgress:!1,searchClientResponseItems:n,searchResponseTimeTaken:u,searchResultsPage:h===v.searchResultsCount?v.searchResultsPage:1,searchResultsCount:h,searchResponseFacetPrime:c,supplementalFacetPrime:i==null?void 0:i.data.facets,searchClientRequest:a}));(m=p.logger)==null||m.log(de.DEBUG,`Search results: ${JSON.stringify(n)}`),(b=p.logger)==null||b.log(de.DEBUG,`Facets from response: ${JSON.stringify(c)}`)},setInitialSearchClientResponseItemsFromResponse:(a,o,n)=>{var u;const i=t(),{count:c=0,time_taken:h=0}=o.data;r.set(p=>({isSearchInProgress:!1,initialSearchClientResponseItems:n,searchResponseTimeTaken:h,searchResultsPage:c===p.searchResultsCount?p.searchResultsPage:1,searchResultsCount:c,searchClientRequest:a})),(u=i.logger)==null||u.log(de.DEBUG,`Search results: ${JSON.stringify(n)}`)},setInitialQuery:async a=>{var n;const o=r.set({initialQuery:a});if((n=o.logger)==null||n.log(de.INFO,`Starting search with query: "${o.initialQuery}"`),!o.core)throw new Error("Searchcraft instance is not initialized.");await o.core.getResponseItems(a,r.setInitialSearchClientResponseItemsFromResponse,r.setAdClientResponseItems)},setPopoverVisibility:a=>r.set({isPopoverVisible:a}),setSearchMode:a=>r.set({searchMode:a}),setSortOrder:({orderByField:a,sortType:o})=>r.set({sortType:o,orderByField:a}),setSearchTerm:a=>{const{core:o}=t();a.length===0&&(o==null||o.handleInputCleared()),r.set({searchTerm:a})},setSearchClientResponseItems:a=>r.set({searchClientResponseItems:a}),setSearchResultsCount:a=>r.set({searchResultsCount:a}),setSearchResultsPage:async a=>{r.set({searchResultsPage:a}),await r.search()},setSearchResultsPerPage:async a=>{r.set({searchResultsPerPage:a}),await r.search()},setHotKeyAndHotKeyModifier:(a,o)=>{const{hotkey:n,hotkeyModifier:i}=fs;r.set({hotkey:a||n,hotkeyModifier:o||i})}};return{...fs,...r}});var ps={exports:{}};/*!
20
20
  Copyright (c) 2018 Jed Watson.
21
21
  Licensed under the MIT License (MIT), see
22
22
  http://jedwatson.github.io/classnames
23
- */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",n=0;n<arguments.length;n++){var c=arguments[n];c&&(o=a(o,s(c)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var c in o)t.call(o,c)&&o[c]&&(n=a(n,c));return n}function a(o,n){return n?o?o+" "+n:o+n:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ms);const se=ms.exports;var to=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},gs={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(e,t){(function(r,s){e.exports=s()})(to,function(){const{entries:r,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:c,seal:i,create:h}=Object,{apply:u,construct:p}=typeof Reflect<"u"&&Reflect;c||(c=function(C){return C}),i||(i=function(C){return C}),u||(u=function(C,$,x){return C.apply($,x)}),p||(p=function(C,$){return new C(...$)});const m=X(Array.prototype.forEach),v=X(Array.prototype.lastIndexOf),b=X(Array.prototype.pop),T=X(Array.prototype.push),I=X(Array.prototype.splice),L=X(String.prototype.toLowerCase),P=X(String.prototype.toString),be=X(String.prototype.match),ce=X(String.prototype.replace),xe=X(String.prototype.indexOf),U=X(String.prototype.trim),ae=X(Object.prototype.hasOwnProperty),z=X(RegExp.prototype.test),Te=Pc(TypeError);function X(E){return function(C){for(var $=arguments.length,x=new Array($>1?$-1:0),Y=1;Y<$;Y++)x[Y-1]=arguments[Y];return u(E,C,x)}}function Pc(E){return function(){for(var C=arguments.length,$=new Array(C),x=0;x<C;x++)$[x]=arguments[x];return p(E,$)}}function R(E,C){let $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:L;s&&s(E,null);let x=C.length;for(;x--;){let Y=C[x];if(typeof Y=="string"){const ye=$(Y);ye!==Y&&(a(C)||(C[x]=ye),Y=ye)}E[Y]=!0}return E}function $c(E){for(let C=0;C<E.length;C++)ae(E,C)||(E[C]=null);return E}function Pe(E){const C=h(null);for(const[$,x]of r(E))ae(E,$)&&(Array.isArray(x)?C[$]=$c(x):x&&typeof x=="object"&&x.constructor===Object?C[$]=Pe(x):C[$]=x);return C}function Ke(E,C){for(;E!==null;){const x=n(E,C);if(x){if(x.get)return X(x.get);if(typeof x.value=="function")return X(x.value)}E=o(E)}function $(){return null}return $}const Ls=c(["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"]),sr=c(["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"]),ar=c(["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"]),_c=c(["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"]),nr=c(["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"]),Ic=c(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ds=c(["#text"]),Ns=c(["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"]),or=c(["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"]),Hs=c(["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=c(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ac=i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Mc=i(/<%[\w\W]*|[\w\W]*%>/gm),Oc=i(/\$\{[\w\W]*/gm),Fc=i(/^data-[\-\w.\u00B7-\uFFFF]+$/),Lc=i(/^aria-[\-\w]+$/),Us=i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Dc=i(/^(?:\w+script|data):/i),Nc=i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zs=i(/^html$/i),Hc=i(/^[a-z][.\w]*(-[.\w]+)+$/i);var Bs=Object.freeze({__proto__:null,ARIA_ATTR:Lc,ATTR_WHITESPACE:Nc,CUSTOM_ELEMENT:Hc,DATA_ATTR:Fc,DOCTYPE_NAME:zs,ERB_EXPR:Mc,IS_ALLOWED_URI:Us,IS_SCRIPT_OR_DATA:Dc,MUSTACHE_EXPR:Ac,TMPLIT_EXPR:Oc});const Xe={element:1,text:3,progressingInstruction:7,comment:8,document:9},Uc=function(){return typeof window>"u"?null:window},zc=function(C,$){if(typeof C!="object"||typeof C.createPolicy!="function")return null;let x=null;const Y="data-tt-policy-suffix";$&&$.hasAttribute(Y)&&(x=$.getAttribute(Y));const ye="dompurify"+(x?"#"+x:"");try{return C.createPolicy(ye,{createHTML(De){return De},createScriptURL(De){return De}})}catch{return console.warn("TrustedTypes policy "+ye+" could not be created."),null}},Vs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function js(){let E=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Uc();const C=S=>js(S);if(C.version="3.2.4",C.removed=[],!E||!E.document||E.document.nodeType!==Xe.document||!E.Element)return C.isSupported=!1,C;let{document:$}=E;const x=$,Y=x.currentScript,{DocumentFragment:ye,HTMLTemplateElement:De,Node:cr,Element:Ws,NodeFilter:Je,NamedNodeMap:Vc=E.NamedNodeMap||E.MozNamedAttrMap,HTMLFormElement:jc,DOMParser:Wc,trustedTypes:St}=E,et=Ws.prototype,Gc=Ke(et,"cloneNode"),qc=Ke(et,"remove"),Yc=Ke(et,"nextSibling"),Zc=Ke(et,"childNodes"),wt=Ke(et,"parentNode");if(typeof De=="function"){const S=$.createElement("template");S.content&&S.content.ownerDocument&&($=S.content.ownerDocument)}let J,tt="";const{implementation:ir,createNodeIterator:Qc,createDocumentFragment:Kc,getElementsByTagName:Xc}=$,{importNode:Jc}=x;let ee=Vs();C.isSupported=typeof r=="function"&&typeof wt=="function"&&ir&&ir.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:lr,ERB_EXPR:ur,TMPLIT_EXPR:hr,DATA_ATTR:ei,ARIA_ATTR:ti,IS_SCRIPT_OR_DATA:ri,ATTR_WHITESPACE:Gs,CUSTOM_ELEMENT:si}=Bs;let{IS_ALLOWED_URI:qs}=Bs,B=null;const Ys=R({},[...Ls,...sr,...ar,...nr,...Ds]);let W=null;const Zs=R({},[...Ns,...or,...Hs,...Ct]);let H=Object.seal(h(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}})),rt=null,dr=null,Qs=!0,fr=!0,Ks=!1,Xs=!0,Ne=!1,pr=!0,$e=!1,mr=!1,gr=!1,He=!1,kt=!1,Rt=!1,Js=!0,ea=!1;const ai="user-content-";let vr=!0,st=!1,Ue={},ze=null;const ta=R({},["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 ra=null;const sa=R({},["audio","video","img","source","image","track"]);let br=null;const aa=R({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Et="http://www.w3.org/1998/Math/MathML",xt="http://www.w3.org/2000/svg",Ce="http://www.w3.org/1999/xhtml";let Be=Ce,yr=!1,Cr=null;const ni=R({},[Et,xt,Ce],P);let Tt=R({},["mi","mo","mn","ms","mtext"]),Pt=R({},["annotation-xml"]);const oi=R({},["title","style","font","a","script"]);let at=null;const ci=["application/xhtml+xml","text/html"],ii="text/html";let V=null,Ve=null;const li=$.createElement("form"),na=function(d){return d instanceof RegExp||d instanceof Function},Sr=function(){let d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Ve&&Ve===d)){if((!d||typeof d!="object")&&(d={}),d=Pe(d),at=ci.indexOf(d.PARSER_MEDIA_TYPE)===-1?ii:d.PARSER_MEDIA_TYPE,V=at==="application/xhtml+xml"?P:L,B=ae(d,"ALLOWED_TAGS")?R({},d.ALLOWED_TAGS,V):Ys,W=ae(d,"ALLOWED_ATTR")?R({},d.ALLOWED_ATTR,V):Zs,Cr=ae(d,"ALLOWED_NAMESPACES")?R({},d.ALLOWED_NAMESPACES,P):ni,br=ae(d,"ADD_URI_SAFE_ATTR")?R(Pe(aa),d.ADD_URI_SAFE_ATTR,V):aa,ra=ae(d,"ADD_DATA_URI_TAGS")?R(Pe(sa),d.ADD_DATA_URI_TAGS,V):sa,ze=ae(d,"FORBID_CONTENTS")?R({},d.FORBID_CONTENTS,V):ta,rt=ae(d,"FORBID_TAGS")?R({},d.FORBID_TAGS,V):{},dr=ae(d,"FORBID_ATTR")?R({},d.FORBID_ATTR,V):{},Ue=ae(d,"USE_PROFILES")?d.USE_PROFILES:!1,Qs=d.ALLOW_ARIA_ATTR!==!1,fr=d.ALLOW_DATA_ATTR!==!1,Ks=d.ALLOW_UNKNOWN_PROTOCOLS||!1,Xs=d.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ne=d.SAFE_FOR_TEMPLATES||!1,pr=d.SAFE_FOR_XML!==!1,$e=d.WHOLE_DOCUMENT||!1,He=d.RETURN_DOM||!1,kt=d.RETURN_DOM_FRAGMENT||!1,Rt=d.RETURN_TRUSTED_TYPE||!1,gr=d.FORCE_BODY||!1,Js=d.SANITIZE_DOM!==!1,ea=d.SANITIZE_NAMED_PROPS||!1,vr=d.KEEP_CONTENT!==!1,st=d.IN_PLACE||!1,qs=d.ALLOWED_URI_REGEXP||Us,Be=d.NAMESPACE||Ce,Tt=d.MATHML_TEXT_INTEGRATION_POINTS||Tt,Pt=d.HTML_INTEGRATION_POINTS||Pt,H=d.CUSTOM_ELEMENT_HANDLING||{},d.CUSTOM_ELEMENT_HANDLING&&na(d.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=d.CUSTOM_ELEMENT_HANDLING.tagNameCheck),d.CUSTOM_ELEMENT_HANDLING&&na(d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=d.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),d.CUSTOM_ELEMENT_HANDLING&&typeof d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=d.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),Ne&&(fr=!1),kt&&(He=!0),Ue&&(B=R({},Ds),W=[],Ue.html===!0&&(R(B,Ls),R(W,Ns)),Ue.svg===!0&&(R(B,sr),R(W,or),R(W,Ct)),Ue.svgFilters===!0&&(R(B,ar),R(W,or),R(W,Ct)),Ue.mathMl===!0&&(R(B,nr),R(W,Hs),R(W,Ct))),d.ADD_TAGS&&(B===Ys&&(B=Pe(B)),R(B,d.ADD_TAGS,V)),d.ADD_ATTR&&(W===Zs&&(W=Pe(W)),R(W,d.ADD_ATTR,V)),d.ADD_URI_SAFE_ATTR&&R(br,d.ADD_URI_SAFE_ATTR,V),d.FORBID_CONTENTS&&(ze===ta&&(ze=Pe(ze)),R(ze,d.FORBID_CONTENTS,V)),vr&&(B["#text"]=!0),$e&&R(B,["html","head","body"]),B.table&&(R(B,["tbody"]),delete rt.tbody),d.TRUSTED_TYPES_POLICY){if(typeof d.TRUSTED_TYPES_POLICY.createHTML!="function")throw Te('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof d.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Te('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');J=d.TRUSTED_TYPES_POLICY,tt=J.createHTML("")}else J===void 0&&(J=zc(St,Y)),J!==null&&typeof tt=="string"&&(tt=J.createHTML(""));c&&c(d),Ve=d}},oa=R({},[...sr,...ar,..._c]),ca=R({},[...nr,...Ic]),ui=function(d){let g=wt(d);(!g||!g.tagName)&&(g={namespaceURI:Be,tagName:"template"});const y=L(d.tagName),M=L(g.tagName);return Cr[d.namespaceURI]?d.namespaceURI===xt?g.namespaceURI===Ce?y==="svg":g.namespaceURI===Et?y==="svg"&&(M==="annotation-xml"||Tt[M]):!!oa[y]:d.namespaceURI===Et?g.namespaceURI===Ce?y==="math":g.namespaceURI===xt?y==="math"&&Pt[M]:!!ca[y]:d.namespaceURI===Ce?g.namespaceURI===xt&&!Pt[M]||g.namespaceURI===Et&&!Tt[M]?!1:!ca[y]&&(oi[y]||!oa[y]):!!(at==="application/xhtml+xml"&&Cr[d.namespaceURI]):!1},ue=function(d){T(C.removed,{element:d});try{wt(d).removeChild(d)}catch{qc(d)}},$t=function(d,g){try{T(C.removed,{attribute:g.getAttributeNode(d),from:g})}catch{T(C.removed,{attribute:null,from:g})}if(g.removeAttribute(d),d==="is")if(He||kt)try{ue(g)}catch{}else try{g.setAttribute(d,"")}catch{}},ia=function(d){let g=null,y=null;if(gr)d="<remove></remove>"+d;else{const G=be(d,/^[\r\n\t ]+/);y=G&&G[0]}at==="application/xhtml+xml"&&Be===Ce&&(d='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+d+"</body></html>");const M=J?J.createHTML(d):d;if(Be===Ce)try{g=new Wc().parseFromString(M,at)}catch{}if(!g||!g.documentElement){g=ir.createDocument(Be,"template",null);try{g.documentElement.innerHTML=yr?tt:M}catch{}}const Z=g.body||g.documentElement;return d&&y&&Z.insertBefore($.createTextNode(y),Z.childNodes[0]||null),Be===Ce?Xc.call(g,$e?"html":"body")[0]:$e?g.documentElement:Z},la=function(d){return Qc.call(d.ownerDocument||d,d,Je.SHOW_ELEMENT|Je.SHOW_COMMENT|Je.SHOW_TEXT|Je.SHOW_PROCESSING_INSTRUCTION|Je.SHOW_CDATA_SECTION,null)},wr=function(d){return d instanceof jc&&(typeof d.nodeName!="string"||typeof d.textContent!="string"||typeof d.removeChild!="function"||!(d.attributes instanceof Vc)||typeof d.removeAttribute!="function"||typeof d.setAttribute!="function"||typeof d.namespaceURI!="string"||typeof d.insertBefore!="function"||typeof d.hasChildNodes!="function")},ua=function(d){return typeof cr=="function"&&d instanceof cr};function Se(S,d,g){m(S,y=>{y.call(C,d,g,Ve)})}const ha=function(d){let g=null;if(Se(ee.beforeSanitizeElements,d,null),wr(d))return ue(d),!0;const y=V(d.nodeName);if(Se(ee.uponSanitizeElement,d,{tagName:y,allowedTags:B}),d.hasChildNodes()&&!ua(d.firstElementChild)&&z(/<[/\w]/g,d.innerHTML)&&z(/<[/\w]/g,d.textContent)||d.nodeType===Xe.progressingInstruction||pr&&d.nodeType===Xe.comment&&z(/<[/\w]/g,d.data))return ue(d),!0;if(!B[y]||rt[y]){if(!rt[y]&&fa(y)&&(H.tagNameCheck instanceof RegExp&&z(H.tagNameCheck,y)||H.tagNameCheck instanceof Function&&H.tagNameCheck(y)))return!1;if(vr&&!ze[y]){const M=wt(d)||d.parentNode,Z=Zc(d)||d.childNodes;if(Z&&M){const G=Z.length;for(let ne=G-1;ne>=0;--ne){const he=Gc(Z[ne],!0);he.__removalCount=(d.__removalCount||0)+1,M.insertBefore(he,Yc(d))}}}return ue(d),!0}return d instanceof Ws&&!ui(d)||(y==="noscript"||y==="noembed"||y==="noframes")&&z(/<\/no(script|embed|frames)/i,d.innerHTML)?(ue(d),!0):(Ne&&d.nodeType===Xe.text&&(g=d.textContent,m([lr,ur,hr],M=>{g=ce(g,M," ")}),d.textContent!==g&&(T(C.removed,{element:d.cloneNode()}),d.textContent=g)),Se(ee.afterSanitizeElements,d,null),!1)},da=function(d,g,y){if(Js&&(g==="id"||g==="name")&&(y in $||y in li))return!1;if(!(fr&&!dr[g]&&z(ei,g))){if(!(Qs&&z(ti,g))){if(!W[g]||dr[g]){if(!(fa(d)&&(H.tagNameCheck instanceof RegExp&&z(H.tagNameCheck,d)||H.tagNameCheck instanceof Function&&H.tagNameCheck(d))&&(H.attributeNameCheck instanceof RegExp&&z(H.attributeNameCheck,g)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(g))||g==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&z(H.tagNameCheck,y)||H.tagNameCheck instanceof Function&&H.tagNameCheck(y))))return!1}else if(!br[g]){if(!z(qs,ce(y,Gs,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&d!=="script"&&xe(y,"data:")===0&&ra[d])){if(!(Ks&&!z(ri,ce(y,Gs,"")))){if(y)return!1}}}}}}return!0},fa=function(d){return d!=="annotation-xml"&&be(d,si)},pa=function(d){Se(ee.beforeSanitizeAttributes,d,null);const{attributes:g}=d;if(!g||wr(d))return;const y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let M=g.length;for(;M--;){const Z=g[M],{name:G,namespaceURI:ne,value:he}=Z,nt=V(G);let te=G==="value"?he:U(he);if(y.attrName=nt,y.attrValue=te,y.keepAttr=!0,y.forceKeepAttr=void 0,Se(ee.uponSanitizeAttribute,d,y),te=y.attrValue,ea&&(nt==="id"||nt==="name")&&($t(G,d),te=ai+te),pr&&z(/((--!?|])>)|<\/(style|title)/i,te)){$t(G,d);continue}if(y.forceKeepAttr||($t(G,d),!y.keepAttr))continue;if(!Xs&&z(/\/>/i,te)){$t(G,d);continue}Ne&&m([lr,ur,hr],ga=>{te=ce(te,ga," ")});const ma=V(d.nodeName);if(da(ma,nt,te)){if(J&&typeof St=="object"&&typeof St.getAttributeType=="function"&&!ne)switch(St.getAttributeType(ma,nt)){case"TrustedHTML":{te=J.createHTML(te);break}case"TrustedScriptURL":{te=J.createScriptURL(te);break}}try{ne?d.setAttributeNS(ne,G,te):d.setAttribute(G,te),wr(d)?ue(d):b(C.removed)}catch{}}}Se(ee.afterSanitizeAttributes,d,null)},hi=function S(d){let g=null;const y=la(d);for(Se(ee.beforeSanitizeShadowDOM,d,null);g=y.nextNode();)Se(ee.uponSanitizeShadowNode,g,null),ha(g),pa(g),g.content instanceof ye&&S(g.content);Se(ee.afterSanitizeShadowDOM,d,null)};return C.sanitize=function(S){let d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,y=null,M=null,Z=null;if(yr=!S,yr&&(S="<!-->"),typeof S!="string"&&!ua(S))if(typeof S.toString=="function"){if(S=S.toString(),typeof S!="string")throw Te("dirty is not a string, aborting")}else throw Te("toString is not a function");if(!C.isSupported)return S;if(mr||Sr(d),C.removed=[],typeof S=="string"&&(st=!1),st){if(S.nodeName){const he=V(S.nodeName);if(!B[he]||rt[he])throw Te("root node is forbidden and cannot be sanitized in-place")}}else if(S instanceof cr)g=ia("<!---->"),y=g.ownerDocument.importNode(S,!0),y.nodeType===Xe.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?g=y:g.appendChild(y);else{if(!He&&!Ne&&!$e&&S.indexOf("<")===-1)return J&&Rt?J.createHTML(S):S;if(g=ia(S),!g)return He?null:Rt?tt:""}g&&gr&&ue(g.firstChild);const G=la(st?S:g);for(;M=G.nextNode();)ha(M),pa(M),M.content instanceof ye&&hi(M.content);if(st)return S;if(He){if(kt)for(Z=Kc.call(g.ownerDocument);g.firstChild;)Z.appendChild(g.firstChild);else Z=g;return(W.shadowroot||W.shadowrootmode)&&(Z=Jc.call(x,Z,!0)),Z}let ne=$e?g.outerHTML:g.innerHTML;return $e&&B["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&z(zs,g.ownerDocument.doctype.name)&&(ne="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
24
- `+ne),Ne&&m([lr,ur,hr],he=>{ne=ce(ne,he," ")}),J&&Rt?J.createHTML(ne):ne},C.setConfig=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Sr(S),mr=!0},C.clearConfig=function(){Ve=null,mr=!1},C.isValidAttribute=function(S,d,g){Ve||Sr({});const y=V(S),M=V(d);return da(y,M,g)},C.addHook=function(S,d){typeof d=="function"&&T(ee[S],d)},C.removeHook=function(S,d){if(d!==void 0){const g=v(ee[S],d);return g===-1?void 0:I(ee[S],g,1)[0]}return b(ee[S])},C.removeHooks=function(S){ee[S]=[]},C.removeAllHooks=function(){ee=Vs()},C}var Bc=js();return Bc})})(gs);const ro=gs.exports,Ye=(e,...t)=>{let r=e[0];for(let s=0;s<t.length;s++)r+=ro.sanitize(t[s]?String(t[s]):"")+e[s+1];return r||""},so="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let K=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=so[r[e]&63];return t};const ao=N(class extends D{constructor(){super();f(this,"adSource","Custom");f(this,"adClientResponseItem");f(this,"adContainerId",K());f(this,"searchTerm");f(this,"isSearchInProgress",!1);f(this,"core");f(this,"intersectionObserver");f(this,"storeUnsubscribe");f(this,"adContainerRenderedTimeout");f(this,"isComponentConnected",!0);this.__registerHost()}get hostElement(){return this}connectedCallback(){const r=_.getState();this.core=r.core,this.searchTerm=r.searchTerm,this.isSearchInProgress=r.isSearchInProgress,this.storeUnsubscribe=_.subscribe(s=>{this.searchTerm=s.searchTerm,this.isSearchInProgress=s.isSearchInProgress})}componentDidLoad(){this.hostElement&&(this.intersectionObserver=new IntersectionObserver(([r])=>{var s;r!=null&&r.isIntersecting&&!this.isSearchInProgress&&((s=this.core)==null||s.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""}))},{threshold:0}),this.intersectionObserver.observe(this.hostElement))}disconnectedCallback(){var r,s;(r=this.storeUnsubscribe)==null||r.call(this),(s=this.intersectionObserver)==null||s.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,c;const r=this.adClientResponseItem;if(!r.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(o=(a=this.core)==null?void 0:a.config)!=null&&o.admAdTemplate&&(s=(c=(n=this.core)==null?void 0:n.config)==null?void 0:c.admAdTemplate(r.admAd,{html:Ye})),l("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;const r=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdTemplate,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return r&&(a=r({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:Ye})),l("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s;const r=((s=this.core)==null?void 0:s.config.nativoAdClassName)||"ntv-item";return l("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:se("searchcraft-ad",r),"data-searchcraft-ad-container-id":this.adContainerId})}render(){var r,s;if(!this.isSearchInProgress)switch(this.isComponentConnected&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var a;(a=this.core)==null||a.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})},((s=(r=this.core)==null?void 0:r.config)==null?void 0:s.adContainerRenderedDebounceDelay)||500)),this.adSource){case"adMarketplace":return this.renderADMAd();case"Custom":return this.renderCustomAd();case"Nativo":return this.renderNativoAd();default:return}}},[0,"searchcraft-ad",{adSource:[1,"ad-source"],adClientResponseItem:[16],adContainerId:[1,"ad-container-id"],searchTerm:[32],isSearchInProgress:[32]}]);function vt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,ao);break}})}const no=vt,oo=N(class extends D{constructor(){super();f(this,"hierarchy","primary");f(this,"disabled",!1);f(this,"icon");f(this,"iconOnly",!1);f(this,"iconPosition","left");f(this,"label","Search");f(this,"type","button");f(this,"buttonClick");f(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=ke(this,"buttonClick")}render(){return l("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:l(sn,null,this.iconPosition==="left"&&this.icon,l("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 bt(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,oo);break}})}const co=bt,io=N(class extends D{constructor(){super(),this.__registerHost()}render(){return l("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},l("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function yt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,io);break}})}const lo=yt,vs=(e,t)=>{let r=e;for(const s of t)r=r==null?void 0:r.children[s];return r},Kt=(e,t)=>{const r={...e};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&e[s]instanceof Object?r[s]=Kt(e[s],t[s]):r[s]=t[s]);return r};function uo(e){return e.filter((t,r,s)=>!s.some((a,o)=>o!==r&&a.includes(t)))}const bs=(e,t)=>{const r=structuredClone(e),s=(a,o)=>{var i;const n=structuredClone(a),c=vs(t,o);if(!c)return n;for(const h of Object.keys(a.children))c.children[h]?n.children[h]={...Kt(a.children[h],c.children[h]),count:((i=n.children[h])==null?void 0:i.count)||0}:n.children[h]&&(n.children[h]=s(n.children[h],[...o,h]));return n};return s(r,[])},Xt=e=>{const t={path:"/",count:0,children:{}},r=[],s=a=>{if(a.path!=="/"&&r.push({path:a.path,count:a.count}),a.children)for(const o of a.children)s(o)};s(e);for(const{path:a,count:o}of r){const n=a.split("/").filter(Boolean);let c=t;for(const i of n){const h=c.path==="/"?`/${i}`:`${c.path}/${i}`;c.children[i]||(c.children[i]={path:h,count:o,children:{}}),c=c.children[i]}c.count=o}return t},ho=N(class extends D{constructor(){super();f(this,"fieldName","");f(this,"facetSelectionUpdated");f(this,"selectedPaths",{});f(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});f(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});f(this,"renderedFacetTree",{path:"/",count:0,children:{}});f(this,"lastTimeTaken");f(this,"lastSearchTerm");f(this,"lastSearchMode");f(this,"lastSortType");f(this,"lastRangeValues");f(this,"lastFacetValues");f(this,"unsubscribe");f(this,"formatFacetName",r=>`${r.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);this.__registerHost(),this.facetSelectionUpdated=ke(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(r=>this.selectedPaths[r])}handleIncomingSearchResponse(r,s){var i,h,u;const a=(i=r.searchResponseFacetPrime)==null?void 0:i.find(p=>this.fieldName===Object.keys(p)[0]),o=a==null?void 0:a[this.fieldName],n=Xt({path:"/",count:0,children:o||[]});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(r.supplementalFacetPrime){const p=(h=r.supplementalFacetPrime)==null?void 0:h.find(b=>this.fieldName===Object.keys(b)[0]),m=p==null?void 0:p[this.fieldName],v=Xt({path:"/",count:0,children:m||[]});this.facetTreeCollectedFromSearchResponse=bs(v,n)}else this.facetTreeCollectedFromSearchResponse=n;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=bs(this.facetTreeCollectedFromSearchResponse,n);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const c={path:"/",count:0,children:[]};for(const p of Object.keys(this.selectedPaths).filter(m=>this.selectedPaths[m])){const m=p.startsWith("/")?p.substring(1).split("/"):p.split("/"),v=!!vs(this.facetTreeCollectedFromSearchResponse,m),b=m.at(-1);!v&&b&&((u=c.children)==null||u.push({children:[],count:0,path:p}))}this.facetTreeFromFacetPathsNotInSearchResponse=Xt(c),this.renderedFacetTree=Kt(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(r){const s={...r};if(s.searchTerm.trim()==="")this.handleIncomingSearchResponse(s,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==s.searchResponseTimeTaken&&s.searchClientRequest&&typeof s.searchClientRequest=="object"){const a=s.searchClientRequest;let o="UNKNOWN";this.lastSearchTerm!==a.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(a.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(a.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==a.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==a.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(a.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(a.facetPathsForIndexFields),this.lastSortType=a.order_by,this.lastSearchMode=a.mode,this.lastSearchTerm=a.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,o)}}connectedCallback(){this.handleStateUpdate(_.getState()),this.unsubscribe=_.subscribe(r=>{this.handleStateUpdate(r)})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleCheckboxChange(r){var n;if(!this.selectedPaths[r])this.selectedPaths={...this.selectedPaths,[r]:!0};else{const c=Object.keys(this.selectedPaths).filter(i=>!i.includes(r));this.selectedPaths=c.reduce((i,h)=>(i[h]=!0,i),{})}const a=Object.keys(this.selectedPaths).filter(c=>this.selectedPaths[c]),o=uo(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}renderFacet(r,s){let a=!1;for(const c of Object.keys(this.selectedPaths))this.selectedPaths[c]&&c.startsWith(s.path)&&c.length>s.path.length&&(a=!0);const o=Object.keys(this.selectedPaths).includes(s.path),n=Object.keys(s.children).length>0&&(o||a)||r==="@@root";return l("div",{class:"searchcraft-facet-list-item"},r!=="@@root"&&l("label",{class:"searchcraft-facet-list-checkbox-label"},l("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},l("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[s.path],onChange:c=>{this.handleCheckboxChange(s.path)},type:"checkbox"}),a?l("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},l("svg",{viewBox:"0 0 14 3",fill:"none"},l("title",null,"Checkbox dash"),l("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):l("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l("title",null,"Checkbox check"),l("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),l("span",null,this.formatFacetName(r)," (",s.count,")")),n&&l("div",{class:"searchcraft-facet-list",style:{paddingLeft:r!=="@@root"?"24px":"0px",paddingTop:r!=="@@root"?"6px":"0px"}},Object.keys(s.children).map(c=>{if(s.children[c])return this.renderFacet(c,s.children[c])})))}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?l("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):l("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function ys(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,ho);break}})}const fo=ys;function Ze(e,t){if(e&&t)return t.fieldNames.map(r=>{let s=e[r.fieldName];if(s)switch(r.dataType){case"date":{s=po(s,r.dateFormatLocale,r.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(s*(r.numberScale||1));break}}return s}).filter(r=>!!r).join(t.delimiter||" ")}function Cs(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function po(e,t="en-US",r={day:"numeric",month:"long",year:"numeric"}){const s=new Date(e),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const c=Math.trunc(o/1e3),i=Math.trunc(c/60),h=Math.trunc(i/60),u=Math.trunc(h/24),p=new Intl.RelativeTimeFormat(t,r);return u>=1?p.format(-u,"day"):h>=1?p.format(-h,"hour"):i>=1?p.format(-i,"minute"):p.format(0,"second")}return new Intl.DateTimeFormat(t,r).format(s)}function Jt(e,t,r=0){const s=new Date(e);switch(t){case"year":return new Date(s.getFullYear()+r,0,1,0,0,0,0).getTime();case"month":return new Date(s.getFullYear(),s.getMonth()+r,1,0,0,0,0).getTime();case"day":return new Date(s.getFullYear(),s.getMonth(),s.getDate()+r,0,0,0,0).getTime();case"hour":return new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours()+r,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${t}`)}}function mo(e,t,r){const s=new Date(t),a=new Date(r);switch(e){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: ${e}`)}}const Ss=e=>{if(e>=11&&e<=13)return`${e}th`;switch(e%10){case 1:return`${e}st`;case 2:return`${e}nd`;case 3:return`${e}rd`;default:return`${e}th`}};function go(e,t){const r=new Intl.DateTimeFormat("en-US",{month:"short"});switch(e){case"year":return t.getFullYear().toString();case"month":return`${r.format(t)} ${t.getFullYear()}`;case"day":return`${r.format(t)} ${Ss(t.getDate())}, ${t.getFullYear()}`;case"hour":{const s=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${r.format(t)} ${Ss(t.getDate())}, ${s.format(t)}`}default:throw new Error(`Unsupported granularity: ${e}`)}}function vo(e,t){let r=!1,s=null;const a=o=>{e(...o),r=!0,setTimeout(()=>{if(r=!1,s){const n=s;s=null,a(n)}},t)};return(...o)=>{r?s=o:a(o)}}const bo=N(class extends D{constructor(){super();f(this,"max",100);f(this,"min",0);f(this,"step",1);f(this,"dataType","number");f(this,"dateGranularity");f(this,"lowerBound",0);f(this,"upperBound",1);f(this,"endValue",0);f(this,"startValue",0);f(this,"lastFocusedHandle","max");f(this,"throttledEmitUpdate",()=>{});f(this,"rangeChanged");f(this,"emitUpdate",async()=>{var r,s;switch(this.dataType){case"number":(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",o=Jt(this.min,a,this.lowerBound+this.startValue),n=Jt(this.min,a,this.lowerBound+this.endValue+1);(s=this.rangeChanged)==null||s.emit({startValue:o,endValue:n});break}}});f(this,"handleStartValueChange",r=>{const s=r.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}`)});f(this,"handleEndValueChange",r=>{const s=r.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}`)});f(this,"getLabel",r=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const s=this.dateGranularity||"year",a=this.lowerBound+r,o=Jt(this.min,s,a);return go(this.dateGranularity||"year",new Date(o))}}});this.__registerHost(),this.rangeChanged=ke(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=mo(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=vo(this.emitUpdate,120)}render(){const r=(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 l("div",{key:"3b2e8576d64826f123d40deff3b0df9316649a03",class:"searchcraft-slider"},l("div",{key:"ecaa546b96855aad4e839c5e34e995da0925e0b6",class:"searchcraft-slider-range"},l("div",{key:"f37fc0329249857a29f77d9e3739d10f05f6bf62",class:"searchcraft-slider-active-range",style:{left:`${r}%`,width:`${s-r}%`}}),l("input",{key:"7b5e6f3983b7c109ea0a3f2b248c35d0e225400b",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}),l("input",{key:"b5bb628b73c8b582a31453e73cb3ef38579eeea5",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})),l("div",{key:"ecb379babd244e3205f30d45628506566fbeff3c",class:"searchcraft-slider-label"},l("span",{key:"2be886d05c323f7da1059be88c0cb8ede2e1e98b",class:"searchcraft-slider-start-label"},a),l("span",{key:"bf66fcab3fae565980a4637cb13b14589ffcb5ba",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 ws(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,bo);break}})}const yo=N(class extends D{constructor(){super();f(this,"label","Toggle");f(this,"subLabel");f(this,"toggleUpdated");f(this,"isActive",!1);f(this,"unsubscribe");f(this,"lastSearchTerm");f(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=ke(this,"toggleUpdated")}connectedCallback(){this.unsubscribe=_.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("div",{key:"f8a751315daf6bcdc0d47bc4fc802bc4615e565f",class:se("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},l("div",{key:"aaa92d7c1aebe241a163a1fba7cd1f8d3804286d"},l("p",{key:"068b82b17a99bf55ad17818d0dd4c7e95858317b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&l("p",{key:"39e43e3fad6a2ab09d20f37c6d6865cede3701d9",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),l("button",{key:"5ae352870d4a01c430389e75b967b2eb9d3fa5f7",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},l("div",{key:"0574ade4e1681ce8e122039c40e761cb68555621",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function ks(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,yo);break}})}const Co=N(class extends D{constructor(){super();f(this,"items",[]);f(this,"unsubscribe");f(this,"lastSearchTerm");f(this,"searchStore",_.getState());this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.lastSearchTerm=r.searchTerm||""})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleDateRangeChanged(r,s,a){const o=new Date(s),n=new Date(a);this.searchStore.addRangeValueForIndexField({fieldName:r.fieldName,value:`${r.fieldName}:[${o.toISOString()} TO ${n.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,s,a){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${s} TO ${a}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,s){s.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${s.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r,s){s?this.searchStore.setSortOrder({orderByField:r,sortType:"desc"}):this.searchStore.setSortOrder({orderByField:null,sortType:null}),this.searchStore.search()}render(){return l("div",{key:"fb5fce357783f39b0a2846a0bd99994faa5e742d",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-slider",{min:s.options.minDate.getTime(),max:s.options.maxDate.getTime(),dataType:"date",step:1,dateGranularity:s.options.granularity,onRangeChanged:a=>{this.handleDateRangeChanged(s,a.detail.startValue,a.detail.endValue)}}))}case"numericRange":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("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=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function So(){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,Co);break;case"searchcraft-facet-list":customElements.get(t)||ys();break;case"searchcraft-slider":customElements.get(t)||ws();break;case"searchcraft-toggle-button":customElements.get(t)||ks();break}})}const wo=So,ko=N(class extends D{constructor(){super();f(this,"inputLabelClassName","");f(this,"label","");this.__registerHost()}render(){return l("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 er(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,ko);break}})}const Ro=N(class extends D{constructor(){super();f(this,"autoSearch",!0);f(this,"buttonPlacement","none");f(this,"buttonLabel");f(this,"inputLabel");f(this,"placeholderValue","Enter Search");f(this,"placeholderBehavior");f(this,"inputFocus");f(this,"inputBlur");f(this,"inputInit");f(this,"inputValue","");f(this,"searchTerm","");f(this,"error",!1);f(this,"core");f(this,"searchcraftStore",_.getState());f(this,"unsubscribe",()=>{});f(this,"handleInput",r=>{const s=r.target;this.inputValue=s.value,this.searchcraftStore.setSearchTerm(s.value),this.autoSearch&&this.performSearch()});f(this,"performSearch",async()=>{this.error=!1;try{await this.searchcraftStore.search()}catch{this.error=!0}});f(this,"handleReset",()=>{this.searchcraftStore.setSearchResultsCount(0),this.searchcraftStore.setSearchTerm(""),this.searchcraftStore.setSearchClientResponseItems([]),this.error=!1});f(this,"handleClearInput",()=>{this.handleReset()});f(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch()});this.__registerHost(),this.inputFocus=ke(this,"inputFocus"),this.inputBlur=ke(this,"inputBlur"),this.inputInit=ke(this,"inputInit")}init(){var r;this.core&&(this.searchcraftStore.init(this.core),(r=this.inputInit)==null||r.emit())}onCoreChange(){this.init()}connectedCallback(){this.init()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.inputValue=r.searchTerm})}disconnectedCallback(){var r;this.handleReset(),(r=this.unsubscribe)==null||r.call(this)}render(){const r=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 l("form",{key:"d0654def009278279b7edeeccc6044d999c0d5b0",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},l("div",{key:"27978b08e46e0f8ecdf6dc95a74c962d85f5e9ff",class:s,style:o},l("div",{key:"1f7cecc80a84bfc46c994971cd751d2b65af6d83",class:"searchcraft-input-form-button"},l("searchcraft-button",{key:"b3f2078604c380eef895be103b2bdf5cef6bca84",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&l("div",{key:"b33c0d3cbb3512964c3a47a2c354a610fa6faa09",class:"searchcraft-input-form-label"},l("searchcraft-input-label",{key:"e620088318c82e2e70d885bd3ee2c88ef8118e7c",label:this.inputLabel})),this.error&&l("div",{key:"c3a20576917aaa33cc12df5ee5b479f87d628de7",class:"searchcraft-input-form-error-message"},l("searchcraft-error-message",{key:"f48e54a236b7a33fa55bab7f29d3b321be0bbb77"},"Something went wrong.")),l("div",{key:"ebda089a3b8698892fd6cebcbaf89582a1bb21a2",class:"searchcraft-input-form-input-wrapper"},l("input",{key:"d7ea7b49f7d65067924168fc281033841a71d419",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}),l("div",{key:"6dd4a02322072467a104938a47626592658eaa1e",class:"searchcraft-input-form-input-icon"},l("svg",{key:"26a4deabe9149db6db219e49fcccbbe7688e9f0a",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"},l("title",{key:"eff07788d2edaead45a60d8ac20e5d1d694c5165"},"Search icon"),l("path",{key:"9083cf32c8f749210232b51b1f5934a3c32b109f",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"}))),r&&l("button",{key:"0b2117ae2510fe743b11d8e638e981ee0f7e4760",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},l("svg",{key:"3fbb57c1b6486638286e1010639751a83a75f489",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},l("title",{key:"84ce771c55c072b4339babb136639469b68a1f9b"},"Clear icon"),l("path",{key:"811f5fc9cc708f80004f1cf50ddcd85de05f3b6b",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"]}}},[0,"searchcraft-input-form",{autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],core:[16],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function Rs(){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,Ro);break;case"searchcraft-button":customElements.get(t)||bt();break;case"searchcraft-error-message":customElements.get(t)||yt();break;case"searchcraft-input-label":customElements.get(t)||er();break}})}const Eo=Rs,xo=er,To=N(class extends D{constructor(){super();f(this,"searchTerm");f(this,"searchResultsPerPage");f(this,"searchResultsPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount",1);f(this,"searchResultsRangeMin",1);f(this,"searchResultsRangeMax",1);f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,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=r.setSearchResultsPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleGoToPage(r){this.setSearchResultsPage(r)}renderOddPaginationItem(r){return l("li",null,l("button",{class:se("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r))}renderEvenPaginationItem(r){if(!(this.searchResultsPagesCount<=r))return(this.searchResultsPagesCount<=5||r<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=r+1:this.searchResultsPage>=r-1)?l("li",null,l("button",{class:se("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):l("li",null,l("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?l("li",null,l("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)):l("li",null,l("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-pagination"},l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Previous page icon"),l("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),l("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)),l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Next page icon"),l("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",{searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function Po(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,To);break;case"searchcraft-button":customElements.get(t)||bt();break}})}const $o=Po,_o=N(class extends D{constructor(){super();f(this,"template");f(this,"type");f(this,"hotkey");f(this,"hotkeyModifier");f(this,"hotkeyModifierSymbol");f(this,"isPopoverVisible");f(this,"userAgent");f(this,"unsubscribe",()=>{});f(this,"renderOptionSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Option key"),l("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"}),l("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"})));f(this,"renderCtrlSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Ctrl key"),l("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"})));f(this,"renderWindowsMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Windows meta key"),l("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"})));f(this,"renderMacMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Mac meta key"),l("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()}handleOnClick(){_.getState().setPopoverVisibility(!0)}componentDidLoad(){const r=_.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=_.subscribe(s=>{this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}setUserAgent(){const r=navigator.userAgent.toLowerCase();switch(!0){case r.includes("windows"):return"window";case r.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 l("div",{class:"searchcraft-popover-button-wrapper"},l("div",{class:"searchcraft-popover-button-input"},l("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"},l("title",null,"Search icon"),l("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"})),l("span",null,"Search")),l("div",{class:"searchcraft-popover-button-keycaps"},l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},l("span",null,this.hotkeyModifierSymbol)),l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},l("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return l("div",null,l("slot",null))}}render(){return l("button",{key:"74e36b0593ba2cbb03f5ecff1434bc7056bf0db0",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:Ye}):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],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function Io(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,_o);break}})}const Ao=Io,Mo=N(class extends D{constructor(){super();f(this,"searchResultsCount");f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.searchResultsCount=_.getState().searchResultsCount,this.unsubscribe=_.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("footer",{key:"e1344ae185ef1b8a83bb69ba88e2952ab1c75e70",class:"searchcraft-popover-footer"},l("p",{key:"51874f4ce490e4f164b999e8c6f89710702e73bd",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${Cs(this.searchResultsCount)} Results Found`:" "),l("a",{key:"5476e24cc3fa7fa265bd2b5cba43c8a70d8609ca",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},l("svg",{key:"0a4edf94e9e40a96a93a4e7ba1ffbd081e51b585",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",{key:"67813a626922d709a4409028cb0f3f1ce3e2cfe8"},"Powered by Searchcraft"),l("path",{key:"bf9e46a5f9783edd7167c1c5c1256d0200053969",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",{searchResultsCount:[32]}]);function Es(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,Mo);break}})}const Oo=Es,Fo=N(class extends D{constructor(){super();f(this,"item");f(this,"popoverResultMappings");f(this,"documentPosition",0);f(this,"title");f(this,"subtitle");f(this,"href");f(this,"imageSource");f(this,"imageAlt");f(this,"handleLinkClick",()=>{var a;const r=_.getState(),s=r.getSearchcraftCore();if(s){const o=this.documentPosition,n=r.searchTerm,c=r.searchClientResponseItems.length||0;(a=s.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:c,search_term:n})}});this.__registerHost()}mapValuesFromDocument(r){var s,a,o,n,c;this.title=Ze(r,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Ze(r,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Ze(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Ze(r,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Ze(r,(c=this.popoverResultMappings)==null?void 0:c.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return l("div",{key:"63a2f070ce71cd1330105c03985e32cd1f228b29",class:"searchcraft-popover-list-item"},l("a",{key:"d9bb09248be9be235147acdfeed1a9f29cd123a2",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&l("div",{key:"6af7c3e754885730d8651a593f13b7b5b704a26d",class:"searchcraft-popover-list-item-image-wrapper"},l("img",{key:"74c7e53467efd83ae95439a7065c1de2748113f5",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),l("div",{key:"25a12e5cf582b248773005f5fb58f7a15304d2d1",class:"searchcraft-popover-list-item-content"},this.title&&l("p",{key:"8169f7730feb832178adbc9bdb14a089e955a2ad",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&l("p",{key:"96812df1bab635e3865bdfdb31f133ca629d800e",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function tr(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,Fo);break}})}const Lo=N(class extends D{constructor(){super();f(this,"popoverResultMappings");f(this,"searchClientResponseItems");f(this,"adClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"config",(Fs=_.getState().core)==null?void 0:Fs.config);this.__registerHost()}renderWithADMAds(){var r,s;return l("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>l("searchcraft-ad",{adClientResponseItem:a,adContainerId:K(),adSource:"adMarketplace",key:a.id})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>l("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var i,h,u,p;const r=[],s=((i=this.config)==null?void 0:i.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((u=this.config)==null?void 0:u.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let m=0;m<o;m++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${m}-ad`}));c.forEach((m,v)=>{if(s&&v%s===0&&v+s<c.length&&v>=s)for(let b=0;b<a;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${m.id}-ad-${b}`}));r.push(l("searchcraft-popover-list-item",{item:m,key:m.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+v}))});for(let m=0;m<n;m++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${m}-ad`}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNativoAds(){var h,u,p,m,v;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((u=this.config)==null?void 0:u.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,c=((v=this.config)==null?void 0:v.nativoAdEndQuantity)||0,i=this.searchClientResponseItems||[];for(let b=0;b<n;b++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b}-ad`}));i.forEach((b,T)=>{if(a&&(T+s)%a===0&&T+a<i.length&&T>=a)for(let I=0;I<o;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b.id}-ad-${I}`}));r.push(l("searchcraft-popover-list-item",{item:b,key:b.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+T}))});for(let b=0;b<c;b++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${b}-ad`}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return l("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((s,a)=>l("searchcraft-popover-list-item",{item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[0,"searchcraft-popover-list-view",{popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function xs(){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,Lo);break;case"searchcraft-ad":customElements.get(t)||vt();break;case"searchcraft-popover-list-item":customElements.get(t)||tr();break}})}const Do=N(class extends D{constructor(){super();f(this,"type","inline");f(this,"popoverResultMappings");f(this,"hotkey","k");f(this,"hotkeyModifier","meta");f(this,"isPopoverVisibleInState",!1);f(this,"unsubscribe");f(this,"searchClientResponseItems",[]);f(this,"adClientResponseItems",[]);f(this,"searchTerm");f(this,"isFocused",!1);f(this,"breakpointSm",576);f(this,"breakpointMd",768);f(this,"breakpointLg",992);f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"modalElement");f(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});f(this,"handleDocumentKeyDown",r=>{if(r.key===this.hotkey&&this.handleHotkeyPressed(r),!!this.hostElement.contains(document.activeElement))switch(r.key){case"ArrowDown":case"ArrowUp":r.preventDefault(),this.focusOnNextListItem(r.key);break;case"Escape":_.getState().setPopoverVisibility(!1);break;default:return}});f(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-input-form-input");r==null||r.focus()});this.__registerHost()}get hostElement(){return this}componentDidLoad(){const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=_.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=_.subscribe(s=>{this.isPopoverVisibleInState!==s.isPopoverVisible&&this.handlePopoverVisibilityChange(s.isPopoverVisible),this.searchClientResponseItems=[...s.searchClientResponseItems],this.adClientResponseItems=[...s.adClientResponseItems],this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage}),_.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(r){this.isPopoverVisibleInState=r,document.body.style.overflow=r?"hidden":"auto"}handleInputFocus(){this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&(_.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(r){_.getState().setPopoverVisibility(!1)}handleHotkeyPressed(r){if(r.ctrlKey&&this.hotkeyModifier==="ctrl"||r.altKey&&this.hotkeyModifier==="alt"||r.metaKey&&this.hotkeyModifier==="meta")if(r.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const s=this.hostElement.querySelector(".searchcraft-input-form-input");s==null||s.focus()}else _.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){_.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(c=>!c.hasAttribute("disabled")&&c.offsetParent!==null),a=s.indexOf(document.activeElement);if(r==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(r==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const c=document.querySelector(".searchcraft-input-form-input");c&&(c.focus(),requestAnimationFrame(()=>{c.selectionEnd=c.value.length,c.selectionStart=c.value.length}))}}get hasResultsToShow(){var r,s;return this.searchTerm&&((s=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused;return l("div",{class:se("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)})),r&&l("div",{class:"searchcraft-popover-form-inline-wrapper"},l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}),l("searchcraft-popover-footer",null)))}renderModalPopover(){if(this.isPopoverVisibleInState)return l("div",{class:se("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),l("div",{class:"searchcraft-popover-form-modal-wrapper"},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null)))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return l("div",{class:se("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null))}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"],isPopoverVisibleInState:[32],unsubscribe:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function Ts(){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,Do);break;case"searchcraft-ad":customElements.get(t)||vt();break;case"searchcraft-button":customElements.get(t)||bt();break;case"searchcraft-error-message":customElements.get(t)||yt();break;case"searchcraft-input-form":customElements.get(t)||Rs();break;case"searchcraft-input-label":customElements.get(t)||er();break;case"searchcraft-popover-footer":customElements.get(t)||Es();break;case"searchcraft-popover-form":customElements.get(t)||Ts();break;case"searchcraft-popover-list-item":customElements.get(t)||tr();break;case"searchcraft-popover-list-view":customElements.get(t)||xs();break}})}const No=Ts,Ho=tr,Uo=xs,zo=N(class extends D{constructor(){super();f(this,"template");f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"count",0);f(this,"range",[0,0]);f(this,"responseTime","0");f(this,"unsubscribe",()=>{});this.__registerHost()}connectedCallback(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,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=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}render(){return!this.searchTerm||this.searchResultsCount===0?null:l("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:Ye}):`${Cs(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function Bo(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,zo);break}})}const Vo=Bo,jo=N(class extends D{constructor(){super();f(this,"item");f(this,"index");f(this,"documentPosition",0);f(this,"template");f(this,"templateHtml");f(this,"handleResultContainerClick",r=>{var u;const s=_.getState(),a=s.getSearchcraftCore();if(!r.target)return;const n=r.target.closest("a");if(!n||!((u=this.hostElement)!=null&&u.contains(n))||!a||!a.measureClient)return;const c=this.documentPosition,i=s.searchTerm,h=s.searchClientResponseItems.length||0;a.measureClient.sendMeasureEvent("document_clicked",{document_position:c,number_of_documents:h,search_term:i})});f(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}connectedCallback(){var r;if(this.item)try{this.templateHtml=(r=this.template)==null?void 0:r.call(this,this.item.document,this.index,{html:Ye,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}render(){if(this.item)return typeof this.template>"u"?l("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([r,s])=>l("p",{key:r},l("strong",null,r),": ",s))):l("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],templateHtml:[32]}]);function Ps(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,jo);break}})}const Wo=Ps,Go=N(class extends D{constructor(){super();f(this,"initialQuery");f(this,"template");f(this,"adClientResponseItems",[]);f(this,"config");f(this,"initialSearchClientResponseItems");f(this,"isSearchInProgress",!0);f(this,"searchClientResponseItems");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchTerm","");f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){var s;const r=_.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(s=r.core)==null?void 0:s.config,r.afterInit=a=>{this.initialQuery&&a.setInitialQuery(this.initialQuery)},this.unsubscribe=_.subscribe(a=>this.handleStateChange(a))}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var s;this.adClientResponseItems=[...r.adClientResponseItems],this.config=(s=r.core)==null?void 0:s.config,this.initialSearchClientResponseItems=[...r.initialSearchClientResponseItems],this.isSearchInProgress=r.isSearchInProgress,this.searchClientResponseItems=[...r.searchClientResponseItems],this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchTerm=r.searchTerm}renderEmptyState(){return l("div",{class:"searchcraft-search-results-empty-state"},l("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return l("div",{class:"searchcraft-search-results"},l("div",{class:"searchcraft-search-results-error-message"},l("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s,a,o;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},(o=this.adClientResponseItems)==null?void 0:o.map(n=>l("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:n,adContainerId:K(),key:n.id})),r.map((n,c)=>l("searchcraft-search-result",{key:n.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+c,index:c,item:n,template:this.template})))}renderWithCustomAds(){var i,h,u,p,m,v;const r=[],s=((i=this.config)==null?void 0:i.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((u=this.config)==null?void 0:u.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,c=(m=this.searchClientResponseItems)!=null&&m.length?this.searchClientResponseItems:(v=this.initialSearchClientResponseItems)!=null&&v.length?this.initialSearchClientResponseItems:[];for(let b=0;b<o;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b}-ad`}));c.forEach((b,T)=>{if(s&&T%s===0&&T+s<c.length&&T>=s)for(let I=0;I<a;I++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b.id}-ad-${I}`}));r.push(l("searchcraft-search-result",{key:b.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+T,index:T,item:b,template:this.template}))});for(let b=0;b<n;b++)r.push(l("searchcraft-ad",{adSource:"Custom",adContainerId:K(),key:`${b}-ad`}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNativoAds(){var h,u,p,m,v,b,T;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((u=this.config)==null?void 0:u.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,c=((v=this.config)==null?void 0:v.nativoAdEndQuantity)||0,i=(b=this.searchClientResponseItems)!=null&&b.length?this.searchClientResponseItems:(T=this.initialSearchClientResponseItems)!=null&&T.length?this.initialSearchClientResponseItems:[];for(let I=0;I<n;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I}-ad`}));i.forEach((I,L)=>{if(a&&(L+s)%a===0&&L+a<i.length&&L>=a)for(let P=0;P<o;P++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I.id}-ad-${P}`}));r.push(l("searchcraft-search-result",{key:I.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+L,index:L,item:I,template:this.template}))});for(let I=0;I<c;I++)r.push(l("searchcraft-ad",{adSource:"Nativo",adContainerId:K(),key:`${I}-ad`}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNoAds(){var s,a;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},r.map((o,n)=>l("searchcraft-search-result",{key:o.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:o,template:this.template})))}render(){var a;const r=this.searchClientResponseItems||[],s=this.initialSearchClientResponseItems||[];if(this.searchTerm===""&&s.length===0&&!this.isSearchInProgress)return this.renderEmptyState();if(this.searchTerm.length>0&&r.length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((a=this.config)==null?void 0:a.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-search-results",{initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],initialSearchClientResponseItems:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function qo(){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,Go);break;case"searchcraft-ad":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||yt();break;case"searchcraft-search-result":customElements.get(t)||Ps();break}})}const Yo=qo,Zo=N(class extends D{constructor(){super();f(this,"caption");f(this,"disabled",!1);f(this,"inputId");f(this,"label");f(this,"labelId");f(this,"name");f(this,"options",[]);f(this,"selectChange");f(this,"searchResultsPerPage");f(this,"setSearchResultsPage",()=>{});f(this,"setSearchResultsPerPage",()=>{});f(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=ke(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return l("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&l("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),l("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},l("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:r,value:s,selected:a})=>l("option",{key:s,value:s,selected:a},r))),l("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"},l("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),l("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&&l("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 $s(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Zo);break}})}const Qo=N(class extends D{constructor(){super();f(this,"increment",20);f(this,"searchTerm");f(this,"searchResultsPage");f(this,"searchResultsPerPage");f(this,"searchResultsCount");f(this,"searchResultsPagesCount");f(this,"initialSearchResultsPerPage");f(this,"setSearchResultsPerPage",()=>{});f(this,"setSearchResultsPage",()=>{});f(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=_.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=_.getState().searchResultsPerPage}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-search-results-per-page"},l("div",{class:"searchcraft-search-results-per-page-select"},l("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),l("div",{class:"searchcraft-search-results-per-page-select-input"},l("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Ko(){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,Qo);break;case"searchcraft-select":customElements.get(t)||$s();break}})}const Xo=Ko,Jo=$s,ec=ws,tc=`[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}/*# sourceMappingURL=hologram.css.map */
25
- `,rc=N(class extends D{constructor(){super(),this.__registerHost()}render(){return l("style",{key:"912dbad4e0aa5be21ed638cd20c276b530991454"},tc)}},[0,"searchcraft-theme"]);function sc(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,rc);break}})}const ac=sc,nc=ks,_s=()=>{no(),co(),lo(),fo(),wo(),Eo(),xo(),$o(),Ao(),Oo(),No(),Ho(),Uo(),Vo(),Wo(),Xo(),Yo(),Jo(),ec(),ac(),nc()};globalThis.__scDefineCustomElements__=_s;const Is={name:"@searchcraft/vue-sdk",version:"0.10.6"},rr="routerLink",As="navManager",oc="router",cc="aria",Qe=Symbol(),Ms={default:Qe},Os=e=>(e==null?void 0:e.split(" "))||[],ic=(e,t,r=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...r].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},ve=(e,t,r=[],s=[],a,o)=>{t!==void 0&&t();const n=j.defineComponent((c,{attrs:i,slots:h,emit:u})=>{var L;const p=j.ref(),m=new Set(Os(i.class)),v=j.getCurrentInstance(),T=((L=v==null?void 0:v.appContext)==null?void 0:L.provides[As])?j.inject(As):void 0,I=P=>{const{routerLink:be}=c;if(be!==Qe)if(T!==void 0){P.preventDefault();let ce={event:P};for(const xe in c){const U=c[xe];c.hasOwnProperty(xe)&&xe.startsWith(oc)&&U!==Qe&&(ce[xe]=U)}T.navigate(ce)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{c[a],Os(i.class).forEach(U=>{m.add(U)});const P=c.onClick,be=U=>{P!==void 0&&P(U),U.defaultPrevented||I(U)};let ce={ref:p,class:ic(p,m),onClick:be};for(const U in c){const ae=c[U];(c.hasOwnProperty(U)&&ae!==Qe||U.startsWith(cc))&&(ce[U]=ae);const z="on"+U.slice(0,1).toUpperCase()+U.slice(1),Te=i[z];p.value&&i.hasOwnProperty(z)&&"addEventListener"in p.value&&p.value.addEventListener(U,Te)}return rr in c&&c[rr]!==Qe&&(ce={...ce,href:c[rr]}),j.h(e,ce,h.default&&h.default())}});if(typeof n!="function"){let c=[],i={};i.ROUTER_LINK_VALUE=Ms,r.forEach(h=>i[h]=Ms),c=s,n.name=e,n.emits=c,n.props=i}return n},lc=ve("searchcraft-filter-panel",()=>{},["items"]),uc=ve("searchcraft-input-form",()=>{},["autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),hc=ve("searchcraft-pagination",()=>{}),dc=ve("searchcraft-popover-button",()=>{},["template","type"]),fc=ve("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier"]),pc=ve("searchcraft-results-info",()=>{},["template"]),mc=ve("searchcraft-search-results",()=>{},["initialQuery","template"]),gc=ve("searchcraft-search-results-per-page",()=>{},["increment"]),vc=ve("searchcraft-theme",()=>{}),bc=mc,yc=lc,Cc=uc,Sc=dc,wc=fc,kc=pc,Rc=vc,Ec=hc,xc=gc;class Tc extends Fn{constructor(t){super(t,{sdkName:Is.name,sdkVersion:Is.version})}}_s(),F.Searchcraft=Tc,F.SearchcraftFilterPanel=yc,F.SearchcraftInputForm=Cc,F.SearchcraftPagination=Ec,F.SearchcraftPopoverButton=Sc,F.SearchcraftPopoverForm=wc,F.SearchcraftResultsInfo=kc,F.SearchcraftSearchResults=bc,F.SearchcraftSearchResultsPerPage=xc,F.SearchcraftTheme=Rc,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
23
+ */(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var o="",n=0;n<arguments.length;n++){var i=arguments[n];i&&(o=a(o,s(i)))}return o}function s(o){if(typeof o=="string"||typeof o=="number")return o;if(typeof o!="object")return"";if(Array.isArray(o))return r.apply(null,o);if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]"))return o.toString();var n="";for(var i in o)t.call(o,i)&&o[i]&&(n=a(n,i));return n}function a(o,n){return n?o?o+" "+n:o+n:o}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(ps);const re=ps.exports;var eo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},ms={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(e,t){(function(r,s){e.exports=s()})(eo,function(){const{entries:r,setPrototypeOf:s,isFrozen:a,getPrototypeOf:o,getOwnPropertyDescriptor:n}=Object;let{freeze:i,seal:c,create:h}=Object,{apply:u,construct:p}=typeof Reflect<"u"&&Reflect;i||(i=function(C){return C}),c||(c=function(C){return C}),u||(u=function(C,_,T){return C.apply(_,T)}),p||(p=function(C,_){return new C(..._)});const m=K(Array.prototype.forEach),b=K(Array.prototype.lastIndexOf),v=K(Array.prototype.pop),R=K(Array.prototype.push),P=K(Array.prototype.splice),L=K(String.prototype.toLowerCase),$=K(String.prototype.toString),ve=K(String.prototype.match),oe=K(String.prototype.replace),Ee=K(String.prototype.indexOf),U=K(String.prototype.trim),se=K(Object.prototype.hasOwnProperty),z=K(RegExp.prototype.test),xe=Pi(TypeError);function K(x){return function(C){for(var _=arguments.length,T=new Array(_>1?_-1:0),Y=1;Y<_;Y++)T[Y-1]=arguments[Y];return u(x,C,T)}}function Pi(x){return function(){for(var C=arguments.length,_=new Array(C),T=0;T<C;T++)_[T]=arguments[T];return p(x,_)}}function E(x,C){let _=arguments.length>2&&arguments[2]!==void 0?arguments[2]:L;s&&s(x,null);let T=C.length;for(;T--;){let Y=C[T];if(typeof Y=="string"){const be=_(Y);be!==Y&&(a(C)||(C[T]=be),Y=be)}x[Y]=!0}return x}function $i(x){for(let C=0;C<x.length;C++)se(x,C)||(x[C]=null);return x}function Te(x){const C=h(null);for(const[_,T]of r(x))se(x,_)&&(Array.isArray(T)?C[_]=$i(T):T&&typeof T=="object"&&T.constructor===Object?C[_]=Te(T):C[_]=T);return C}function Qe(x,C){for(;x!==null;){const T=n(x,C);if(T){if(T.get)return K(T.get);if(typeof T.value=="function")return K(T.value)}x=o(x)}function _(){return null}return _}const Fs=i(["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"]),rr=i(["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"]),sr=i(["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"]),_i=i(["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"]),ar=i(["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"]),Ai=i(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Ls=i(["#text"]),Ds=i(["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"]),nr=i(["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"]),Ns=i(["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"]),yt=i(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ii=c(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Mi=c(/<%[\w\W]*|[\w\W]*%>/gm),Oi=c(/\$\{[\w\W]*/gm),Fi=c(/^data-[\-\w.\u00B7-\uFFFF]+$/),Li=c(/^aria-[\-\w]+$/),Hs=c(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Di=c(/^(?:\w+script|data):/i),Ni=c(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Us=c(/^html$/i),Hi=c(/^[a-z][.\w]*(-[.\w]+)+$/i);var zs=Object.freeze({__proto__:null,ARIA_ATTR:Li,ATTR_WHITESPACE:Ni,CUSTOM_ELEMENT:Hi,DATA_ATTR:Fi,DOCTYPE_NAME:Us,ERB_EXPR:Mi,IS_ALLOWED_URI:Hs,IS_SCRIPT_OR_DATA:Di,MUSTACHE_EXPR:Ii,TMPLIT_EXPR:Oi});const Ke={element:1,text:3,progressingInstruction:7,comment:8,document:9},Ui=function(){return typeof window>"u"?null:window},zi=function(C,_){if(typeof C!="object"||typeof C.createPolicy!="function")return null;let T=null;const Y="data-tt-policy-suffix";_&&_.hasAttribute(Y)&&(T=_.getAttribute(Y));const be="dompurify"+(T?"#"+T:"");try{return C.createPolicy(be,{createHTML(Le){return Le},createScriptURL(Le){return Le}})}catch{return console.warn("TrustedTypes policy "+be+" could not be created."),null}},Bs=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Vs(){let x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ui();const C=S=>Vs(S);if(C.version="3.2.4",C.removed=[],!x||!x.document||x.document.nodeType!==Ke.document||!x.Element)return C.isSupported=!1,C;let{document:_}=x;const T=_,Y=T.currentScript,{DocumentFragment:be,HTMLTemplateElement:Le,Node:or,Element:js,NodeFilter:Xe,NamedNodeMap:Vi=x.NamedNodeMap||x.MozNamedAttrMap,HTMLFormElement:ji,DOMParser:Wi,trustedTypes:Ct}=x,Je=js.prototype,Gi=Qe(Je,"cloneNode"),qi=Qe(Je,"remove"),Yi=Qe(Je,"nextSibling"),Zi=Qe(Je,"childNodes"),St=Qe(Je,"parentNode");if(typeof Le=="function"){const S=_.createElement("template");S.content&&S.content.ownerDocument&&(_=S.content.ownerDocument)}let X,et="";const{implementation:ir,createNodeIterator:Qi,createDocumentFragment:Ki,getElementsByTagName:Xi}=_,{importNode:Ji}=T;let J=Bs();C.isSupported=typeof r=="function"&&typeof St=="function"&&ir&&ir.createHTMLDocument!==void 0;const{MUSTACHE_EXPR:cr,ERB_EXPR:lr,TMPLIT_EXPR:ur,DATA_ATTR:ec,ARIA_ATTR:tc,IS_SCRIPT_OR_DATA:rc,ATTR_WHITESPACE:Ws,CUSTOM_ELEMENT:sc}=zs;let{IS_ALLOWED_URI:Gs}=zs,B=null;const qs=E({},[...Fs,...rr,...sr,...ar,...Ls]);let W=null;const Ys=E({},[...Ds,...nr,...Ns,...yt]);let H=Object.seal(h(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}})),tt=null,hr=null,Zs=!0,dr=!0,Qs=!1,Ks=!0,De=!1,fr=!0,Pe=!1,pr=!1,mr=!1,Ne=!1,wt=!1,Rt=!1,Xs=!0,Js=!1;const ac="user-content-";let gr=!0,rt=!1,He={},Ue=null;const ea=E({},["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 ta=null;const ra=E({},["audio","video","img","source","image","track"]);let vr=null;const sa=E({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),kt="http://www.w3.org/1998/Math/MathML",Et="http://www.w3.org/2000/svg",ye="http://www.w3.org/1999/xhtml";let ze=ye,br=!1,yr=null;const nc=E({},[kt,Et,ye],$);let xt=E({},["mi","mo","mn","ms","mtext"]),Tt=E({},["annotation-xml"]);const oc=E({},["title","style","font","a","script"]);let st=null;const ic=["application/xhtml+xml","text/html"],cc="text/html";let V=null,Be=null;const lc=_.createElement("form"),aa=function(f){return f instanceof RegExp||f instanceof Function},Cr=function(){let f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(Be&&Be===f)){if((!f||typeof f!="object")&&(f={}),f=Te(f),st=ic.indexOf(f.PARSER_MEDIA_TYPE)===-1?cc:f.PARSER_MEDIA_TYPE,V=st==="application/xhtml+xml"?$:L,B=se(f,"ALLOWED_TAGS")?E({},f.ALLOWED_TAGS,V):qs,W=se(f,"ALLOWED_ATTR")?E({},f.ALLOWED_ATTR,V):Ys,yr=se(f,"ALLOWED_NAMESPACES")?E({},f.ALLOWED_NAMESPACES,$):nc,vr=se(f,"ADD_URI_SAFE_ATTR")?E(Te(sa),f.ADD_URI_SAFE_ATTR,V):sa,ta=se(f,"ADD_DATA_URI_TAGS")?E(Te(ra),f.ADD_DATA_URI_TAGS,V):ra,Ue=se(f,"FORBID_CONTENTS")?E({},f.FORBID_CONTENTS,V):ea,tt=se(f,"FORBID_TAGS")?E({},f.FORBID_TAGS,V):{},hr=se(f,"FORBID_ATTR")?E({},f.FORBID_ATTR,V):{},He=se(f,"USE_PROFILES")?f.USE_PROFILES:!1,Zs=f.ALLOW_ARIA_ATTR!==!1,dr=f.ALLOW_DATA_ATTR!==!1,Qs=f.ALLOW_UNKNOWN_PROTOCOLS||!1,Ks=f.ALLOW_SELF_CLOSE_IN_ATTR!==!1,De=f.SAFE_FOR_TEMPLATES||!1,fr=f.SAFE_FOR_XML!==!1,Pe=f.WHOLE_DOCUMENT||!1,Ne=f.RETURN_DOM||!1,wt=f.RETURN_DOM_FRAGMENT||!1,Rt=f.RETURN_TRUSTED_TYPE||!1,mr=f.FORCE_BODY||!1,Xs=f.SANITIZE_DOM!==!1,Js=f.SANITIZE_NAMED_PROPS||!1,gr=f.KEEP_CONTENT!==!1,rt=f.IN_PLACE||!1,Gs=f.ALLOWED_URI_REGEXP||Hs,ze=f.NAMESPACE||ye,xt=f.MATHML_TEXT_INTEGRATION_POINTS||xt,Tt=f.HTML_INTEGRATION_POINTS||Tt,H=f.CUSTOM_ELEMENT_HANDLING||{},f.CUSTOM_ELEMENT_HANDLING&&aa(f.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(H.tagNameCheck=f.CUSTOM_ELEMENT_HANDLING.tagNameCheck),f.CUSTOM_ELEMENT_HANDLING&&aa(f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(H.attributeNameCheck=f.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),f.CUSTOM_ELEMENT_HANDLING&&typeof f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(H.allowCustomizedBuiltInElements=f.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),De&&(dr=!1),wt&&(Ne=!0),He&&(B=E({},Ls),W=[],He.html===!0&&(E(B,Fs),E(W,Ds)),He.svg===!0&&(E(B,rr),E(W,nr),E(W,yt)),He.svgFilters===!0&&(E(B,sr),E(W,nr),E(W,yt)),He.mathMl===!0&&(E(B,ar),E(W,Ns),E(W,yt))),f.ADD_TAGS&&(B===qs&&(B=Te(B)),E(B,f.ADD_TAGS,V)),f.ADD_ATTR&&(W===Ys&&(W=Te(W)),E(W,f.ADD_ATTR,V)),f.ADD_URI_SAFE_ATTR&&E(vr,f.ADD_URI_SAFE_ATTR,V),f.FORBID_CONTENTS&&(Ue===ea&&(Ue=Te(Ue)),E(Ue,f.FORBID_CONTENTS,V)),gr&&(B["#text"]=!0),Pe&&E(B,["html","head","body"]),B.table&&(E(B,["tbody"]),delete tt.tbody),f.TRUSTED_TYPES_POLICY){if(typeof f.TRUSTED_TYPES_POLICY.createHTML!="function")throw xe('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof f.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw xe('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');X=f.TRUSTED_TYPES_POLICY,et=X.createHTML("")}else X===void 0&&(X=zi(Ct,Y)),X!==null&&typeof et=="string"&&(et=X.createHTML(""));i&&i(f),Be=f}},na=E({},[...rr,...sr,..._i]),oa=E({},[...ar,...Ai]),uc=function(f){let g=St(f);(!g||!g.tagName)&&(g={namespaceURI:ze,tagName:"template"});const y=L(f.tagName),M=L(g.tagName);return yr[f.namespaceURI]?f.namespaceURI===Et?g.namespaceURI===ye?y==="svg":g.namespaceURI===kt?y==="svg"&&(M==="annotation-xml"||xt[M]):!!na[y]:f.namespaceURI===kt?g.namespaceURI===ye?y==="math":g.namespaceURI===Et?y==="math"&&Tt[M]:!!oa[y]:f.namespaceURI===ye?g.namespaceURI===Et&&!Tt[M]||g.namespaceURI===kt&&!xt[M]?!1:!oa[y]&&(oc[y]||!na[y]):!!(st==="application/xhtml+xml"&&yr[f.namespaceURI]):!1},le=function(f){R(C.removed,{element:f});try{St(f).removeChild(f)}catch{qi(f)}},Pt=function(f,g){try{R(C.removed,{attribute:g.getAttributeNode(f),from:g})}catch{R(C.removed,{attribute:null,from:g})}if(g.removeAttribute(f),f==="is")if(Ne||wt)try{le(g)}catch{}else try{g.setAttribute(f,"")}catch{}},ia=function(f){let g=null,y=null;if(mr)f="<remove></remove>"+f;else{const G=ve(f,/^[\r\n\t ]+/);y=G&&G[0]}st==="application/xhtml+xml"&&ze===ye&&(f='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+f+"</body></html>");const M=X?X.createHTML(f):f;if(ze===ye)try{g=new Wi().parseFromString(M,st)}catch{}if(!g||!g.documentElement){g=ir.createDocument(ze,"template",null);try{g.documentElement.innerHTML=br?et:M}catch{}}const Z=g.body||g.documentElement;return f&&y&&Z.insertBefore(_.createTextNode(y),Z.childNodes[0]||null),ze===ye?Xi.call(g,Pe?"html":"body")[0]:Pe?g.documentElement:Z},ca=function(f){return Qi.call(f.ownerDocument||f,f,Xe.SHOW_ELEMENT|Xe.SHOW_COMMENT|Xe.SHOW_TEXT|Xe.SHOW_PROCESSING_INSTRUCTION|Xe.SHOW_CDATA_SECTION,null)},Sr=function(f){return f instanceof ji&&(typeof f.nodeName!="string"||typeof f.textContent!="string"||typeof f.removeChild!="function"||!(f.attributes instanceof Vi)||typeof f.removeAttribute!="function"||typeof f.setAttribute!="function"||typeof f.namespaceURI!="string"||typeof f.insertBefore!="function"||typeof f.hasChildNodes!="function")},la=function(f){return typeof or=="function"&&f instanceof or};function Ce(S,f,g){m(S,y=>{y.call(C,f,g,Be)})}const ua=function(f){let g=null;if(Ce(J.beforeSanitizeElements,f,null),Sr(f))return le(f),!0;const y=V(f.nodeName);if(Ce(J.uponSanitizeElement,f,{tagName:y,allowedTags:B}),f.hasChildNodes()&&!la(f.firstElementChild)&&z(/<[/\w]/g,f.innerHTML)&&z(/<[/\w]/g,f.textContent)||f.nodeType===Ke.progressingInstruction||fr&&f.nodeType===Ke.comment&&z(/<[/\w]/g,f.data))return le(f),!0;if(!B[y]||tt[y]){if(!tt[y]&&da(y)&&(H.tagNameCheck instanceof RegExp&&z(H.tagNameCheck,y)||H.tagNameCheck instanceof Function&&H.tagNameCheck(y)))return!1;if(gr&&!Ue[y]){const M=St(f)||f.parentNode,Z=Zi(f)||f.childNodes;if(Z&&M){const G=Z.length;for(let ae=G-1;ae>=0;--ae){const ue=Gi(Z[ae],!0);ue.__removalCount=(f.__removalCount||0)+1,M.insertBefore(ue,Yi(f))}}}return le(f),!0}return f instanceof js&&!uc(f)||(y==="noscript"||y==="noembed"||y==="noframes")&&z(/<\/no(script|embed|frames)/i,f.innerHTML)?(le(f),!0):(De&&f.nodeType===Ke.text&&(g=f.textContent,m([cr,lr,ur],M=>{g=oe(g,M," ")}),f.textContent!==g&&(R(C.removed,{element:f.cloneNode()}),f.textContent=g)),Ce(J.afterSanitizeElements,f,null),!1)},ha=function(f,g,y){if(Xs&&(g==="id"||g==="name")&&(y in _||y in lc))return!1;if(!(dr&&!hr[g]&&z(ec,g))){if(!(Zs&&z(tc,g))){if(!W[g]||hr[g]){if(!(da(f)&&(H.tagNameCheck instanceof RegExp&&z(H.tagNameCheck,f)||H.tagNameCheck instanceof Function&&H.tagNameCheck(f))&&(H.attributeNameCheck instanceof RegExp&&z(H.attributeNameCheck,g)||H.attributeNameCheck instanceof Function&&H.attributeNameCheck(g))||g==="is"&&H.allowCustomizedBuiltInElements&&(H.tagNameCheck instanceof RegExp&&z(H.tagNameCheck,y)||H.tagNameCheck instanceof Function&&H.tagNameCheck(y))))return!1}else if(!vr[g]){if(!z(Gs,oe(y,Ws,""))){if(!((g==="src"||g==="xlink:href"||g==="href")&&f!=="script"&&Ee(y,"data:")===0&&ta[f])){if(!(Qs&&!z(rc,oe(y,Ws,"")))){if(y)return!1}}}}}}return!0},da=function(f){return f!=="annotation-xml"&&ve(f,sc)},fa=function(f){Ce(J.beforeSanitizeAttributes,f,null);const{attributes:g}=f;if(!g||Sr(f))return;const y={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:W,forceKeepAttr:void 0};let M=g.length;for(;M--;){const Z=g[M],{name:G,namespaceURI:ae,value:ue}=Z,at=V(G);let ee=G==="value"?ue:U(ue);if(y.attrName=at,y.attrValue=ee,y.keepAttr=!0,y.forceKeepAttr=void 0,Ce(J.uponSanitizeAttribute,f,y),ee=y.attrValue,Js&&(at==="id"||at==="name")&&(Pt(G,f),ee=ac+ee),fr&&z(/((--!?|])>)|<\/(style|title)/i,ee)){Pt(G,f);continue}if(y.forceKeepAttr||(Pt(G,f),!y.keepAttr))continue;if(!Ks&&z(/\/>/i,ee)){Pt(G,f);continue}De&&m([cr,lr,ur],ma=>{ee=oe(ee,ma," ")});const pa=V(f.nodeName);if(ha(pa,at,ee)){if(X&&typeof Ct=="object"&&typeof Ct.getAttributeType=="function"&&!ae)switch(Ct.getAttributeType(pa,at)){case"TrustedHTML":{ee=X.createHTML(ee);break}case"TrustedScriptURL":{ee=X.createScriptURL(ee);break}}try{ae?f.setAttributeNS(ae,G,ee):f.setAttribute(G,ee),Sr(f)?le(f):v(C.removed)}catch{}}}Ce(J.afterSanitizeAttributes,f,null)},hc=function S(f){let g=null;const y=ca(f);for(Ce(J.beforeSanitizeShadowDOM,f,null);g=y.nextNode();)Ce(J.uponSanitizeShadowNode,g,null),ua(g),fa(g),g.content instanceof be&&S(g.content);Ce(J.afterSanitizeShadowDOM,f,null)};return C.sanitize=function(S){let f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},g=null,y=null,M=null,Z=null;if(br=!S,br&&(S="<!-->"),typeof S!="string"&&!la(S))if(typeof S.toString=="function"){if(S=S.toString(),typeof S!="string")throw xe("dirty is not a string, aborting")}else throw xe("toString is not a function");if(!C.isSupported)return S;if(pr||Cr(f),C.removed=[],typeof S=="string"&&(rt=!1),rt){if(S.nodeName){const ue=V(S.nodeName);if(!B[ue]||tt[ue])throw xe("root node is forbidden and cannot be sanitized in-place")}}else if(S instanceof or)g=ia("<!---->"),y=g.ownerDocument.importNode(S,!0),y.nodeType===Ke.element&&y.nodeName==="BODY"||y.nodeName==="HTML"?g=y:g.appendChild(y);else{if(!Ne&&!De&&!Pe&&S.indexOf("<")===-1)return X&&Rt?X.createHTML(S):S;if(g=ia(S),!g)return Ne?null:Rt?et:""}g&&mr&&le(g.firstChild);const G=ca(rt?S:g);for(;M=G.nextNode();)ua(M),fa(M),M.content instanceof be&&hc(M.content);if(rt)return S;if(Ne){if(wt)for(Z=Ki.call(g.ownerDocument);g.firstChild;)Z.appendChild(g.firstChild);else Z=g;return(W.shadowroot||W.shadowrootmode)&&(Z=Ji.call(T,Z,!0)),Z}let ae=Pe?g.outerHTML:g.innerHTML;return Pe&&B["!doctype"]&&g.ownerDocument&&g.ownerDocument.doctype&&g.ownerDocument.doctype.name&&z(Us,g.ownerDocument.doctype.name)&&(ae="<!DOCTYPE "+g.ownerDocument.doctype.name+`>
24
+ `+ae),De&&m([cr,lr,ur],ue=>{ae=oe(ae,ue," ")}),X&&Rt?X.createHTML(ae):ae},C.setConfig=function(){let S=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Cr(S),pr=!0},C.clearConfig=function(){Be=null,pr=!1},C.isValidAttribute=function(S,f,g){Be||Cr({});const y=V(S),M=V(f);return ha(y,M,g)},C.addHook=function(S,f){typeof f=="function"&&R(J[S],f)},C.removeHook=function(S,f){if(f!==void 0){const g=b(J[S],f);return g===-1?void 0:P(J[S],g,1)[0]}return v(J[S])},C.removeHooks=function(S){J[S]=[]},C.removeAllHooks=function(){J=Bs()},C}var Bi=Vs();return Bi})})(ms);const to=ms.exports,qe=(e,...t)=>{let r=e[0];for(let s=0;s<t.length;s++)r+=to.sanitize(t[s]?String(t[s]):"")+e[s+1];return r||""},ro="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let so=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=ro[r[e]&63];return t};const ao=N(class extends D{constructor(){super();d(this,"adSource","Custom");d(this,"adClientResponseItem");d(this,"renderPosition","interstitial");d(this,"searchTerm");d(this,"isSearchInProgress",!1);d(this,"searchResultCount",0);d(this,"core");d(this,"intersectionObserver");d(this,"storeUnsubscribe");d(this,"adContainerRenderedTimeout");d(this,"isComponentConnected",!1);d(this,"timeTaken");d(this,"adContainerId","");this.__registerHost()}get hostElement(){return this}handleAdRendered(){var r,s;this.adContainerId=so(),this.isComponentConnected&&this.searchResultCount>0&&(clearTimeout(this.adContainerRenderedTimeout),this.adContainerRenderedTimeout=setTimeout(()=>{var a;(a=this.core)==null||a.handleAdContainerRendered({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})},((s=(r=this.core)==null?void 0:r.config)==null?void 0:s.adContainerRenderedDebounceDelay)||300))}handleAdViewed(){var r;(r=this.core)==null||r.handleAdContainerViewed({adClientResponseItem:this.adClientResponseItem,adContainerId:this.adContainerId,adSource:this.adSource,searchTerm:this.searchTerm||""})}handleNewIncomingSearchRequest(r){const s=r.searchClientRequest;s&&typeof s=="object"&&(this.searchTerm=s.searchTerm),this.searchResultCount=r.searchClientResponseItems.length,this.handleAdRendered(),this.startIntersectionObserver()}connectedCallback(){const r=A.getState();this.isComponentConnected=!0,this.core=r.core,this.isSearchInProgress=r.isSearchInProgress,this.searchResultCount=r.searchClientResponseItems.length,this.timeTaken=r.searchResponseTimeTaken;const s=r.searchClientRequest;s&&typeof s=="object"&&(this.searchTerm=s.searchTerm),this.renderPosition==="interstitial"&&this.handleNewIncomingSearchRequest(r),this.storeUnsubscribe=A.subscribe(a=>{this.timeTaken!==a.searchResponseTimeTaken&&this.handleNewIncomingSearchRequest(a),this.timeTaken=a.searchResponseTimeTaken,this.isSearchInProgress=a.isSearchInProgress})}startIntersectionObserver(){var r;(r=this.intersectionObserver)==null||r.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 r,s;(r=this.storeUnsubscribe)==null||r.call(this),(s=this.intersectionObserver)==null||s.disconnect(),this.isComponentConnected=!1,clearTimeout(this.adContainerRenderedTimeout)}renderADMAd(){var a,o,n,i;const r=this.adClientResponseItem;if(!r.admAd)return;let s="<p>Ad Marketplace Ad Placeholder</p>";return(o=(a=this.core)==null?void 0:a.config)!=null&&o.admAdTemplate&&(s=(i=(n=this.core)==null?void 0:n.config)==null?void 0:i.admAdTemplate(r.admAd,{html:qe})),l("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;const r=(n=(o=this.core)==null?void 0:o.config)==null?void 0:n.customAdTemplate,s=`searchcraft-custom-ad-${this.adContainerId}`;let a="<p>Custom Ad Placeholder</p>";return r&&(a=r({searchTerm:this.searchTerm||"",adContainerId:this.adContainerId},{html:qe})),l("div",{class:"searchcraft-ad searchcraft-custom-ad",id:s,"data-searchcraft-ad-container-id":this.adContainerId,innerHTML:a})}renderNativoAd(){var s;const r=((s=this.core)==null?void 0:s.config.nativoAdClassName)||"ntv-item";return l("div",{id:`searchcraft-native-ad-${this.adContainerId}`,class:re("searchcraft-ad",r),"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",{adSource:[1,"ad-source"],adClientResponseItem:[16],renderPosition:[1,"render-position"],searchTerm:[32],isSearchInProgress:[32],searchResultCount:[32],adContainerId:[32]}]);function gt(){if(typeof customElements>"u")return;["searchcraft-ad"].forEach(t=>{switch(t){case"searchcraft-ad":customElements.get(t)||customElements.define(t,ao);break}})}const no=gt,oo=N(class extends D{constructor(){super();d(this,"hierarchy","primary");d(this,"disabled",!1);d(this,"icon");d(this,"iconOnly",!1);d(this,"iconPosition","left");d(this,"label","Search");d(this,"type","button");d(this,"buttonClick");d(this,"handleButtonClick",()=>{this.buttonClick.emit()});this.__registerHost(),this.buttonClick=we(this,"buttonClick")}render(){return l("button",{key:"e54b4566e0286265bc0c8b6bb4e9ef26108575da","aria-label":this.label,class:re("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:l(rn,null,this.iconPosition==="left"&&this.icon,l("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 vt(){if(typeof customElements>"u")return;["searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-button":customElements.get(t)||customElements.define(t,oo);break}})}const io=vt,co=N(class extends D{constructor(){super(),this.__registerHost()}render(){return l("div",{key:"d42f7abf8dfb2620622b8012d868d32f04b2f354",class:"searchcraft-error-message"},l("slot",{key:"75a7811576ea8afe80a7ae739f5cf2d411f976df"},"Search term is required."))}},[4,"searchcraft-error-message"]);function bt(){if(typeof customElements>"u")return;["searchcraft-error-message"].forEach(t=>{switch(t){case"searchcraft-error-message":customElements.get(t)||customElements.define(t,co);break}})}const lo=bt,gs=(e,t)=>{let r=e;for(const s of t)r=r==null?void 0:r.children[s];return r},Qt=(e,t)=>{const r={...e};for(const s in t)t.hasOwnProperty(s)&&(t[s]instanceof Object&&e[s]instanceof Object?r[s]=Qt(e[s],t[s]):r[s]=t[s]);return r};function uo(e){return e.filter((t,r,s)=>!s.some((a,o)=>o!==r&&a.includes(t)))}const vs=(e,t)=>{const r=structuredClone(e),s=(a,o)=>{var c;const n=structuredClone(a),i=gs(t,o);if(!i)return n;for(const h of Object.keys(a.children))i.children[h]?n.children[h]={...Qt(a.children[h],i.children[h]),count:((c=n.children[h])==null?void 0:c.count)||0}:n.children[h]&&(n.children[h]=s(n.children[h],[...o,h]));return n};return s(r,[])},Kt=e=>{const t={path:"/",count:0,children:{}},r=[],s=a=>{if(a.path!=="/"&&r.push({path:a.path,count:a.count}),a.children)for(const o of a.children)s(o)};s(e);for(const{path:a,count:o}of r){const n=a.split("/").filter(Boolean);let i=t;for(const c of n){const h=i.path==="/"?`/${c}`:`${i.path}/${c}`;i.children[c]||(i.children[c]={path:h,count:o,children:{}}),i=i.children[c]}i.count=o}return t},ho=N(class extends D{constructor(){super();d(this,"fieldName","");d(this,"facetSelectionUpdated");d(this,"selectedPaths",{});d(this,"facetTreeCollectedFromSearchResponse",{path:"/",count:0,children:{}});d(this,"facetTreeFromFacetPathsNotInSearchResponse",{path:"/",count:0,children:{}});d(this,"renderedFacetTree",{path:"/",count:0,children:{}});d(this,"lastTimeTaken");d(this,"lastSearchTerm");d(this,"lastSearchMode");d(this,"lastSortType");d(this,"lastRangeValues");d(this,"lastFacetValues");d(this,"unsubscribe");d(this,"formatFacetName",r=>`${r.replace(/^\//,"").replace(/-/g," ").replace(/\b\w/g,a=>a.toUpperCase())}`);this.__registerHost(),this.facetSelectionUpdated=we(this,"facetSelectionUpdated")}get areAnyFacetPathsSelected(){return Object.keys(this.selectedPaths).some(r=>this.selectedPaths[r])}handleIncomingSearchResponse(r,s){var c,h,u;const a=(c=r.searchResponseFacetPrime)==null?void 0:c.find(p=>this.fieldName===Object.keys(p)[0]),o=a==null?void 0:a[this.fieldName],n=Kt({path:"/",count:0,children:o||[]});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(r.supplementalFacetPrime){const p=(h=r.supplementalFacetPrime)==null?void 0:h.find(v=>this.fieldName===Object.keys(v)[0]),m=p==null?void 0:p[this.fieldName],b=Kt({path:"/",count:0,children:m||[]});this.facetTreeCollectedFromSearchResponse=vs(b,n)}else this.facetTreeCollectedFromSearchResponse=n;break}case"FACET_UPDATE":case"SORT_ORDER_UPDATE":this.facetTreeCollectedFromSearchResponse=vs(this.facetTreeCollectedFromSearchResponse,n);break;default:return}this.facetTreeFromFacetPathsNotInSearchResponse={path:"/",count:0,children:{}};const i={path:"/",count:0,children:[]};for(const p of Object.keys(this.selectedPaths).filter(m=>this.selectedPaths[m])){const m=p.startsWith("/")?p.substring(1).split("/"):p.split("/"),b=!!gs(this.facetTreeCollectedFromSearchResponse,m),v=m.at(-1);!b&&v&&((u=i.children)==null||u.push({children:[],count:0,path:p}))}this.facetTreeFromFacetPathsNotInSearchResponse=Kt(i),this.renderedFacetTree=Qt(this.facetTreeFromFacetPathsNotInSearchResponse,this.facetTreeCollectedFromSearchResponse)}handleStateUpdate(r){const s={...r};if(s.searchTerm.trim()==="")this.handleIncomingSearchResponse(s,"SEARCH_TERM_EMPTY"),this.lastSearchTerm="";else if(this.lastTimeTaken!==s.searchResponseTimeTaken&&s.searchClientRequest&&typeof s.searchClientRequest=="object"){const a=s.searchClientRequest;let o="UNKNOWN";this.lastSearchTerm!==a.searchTerm?this.areAnyFacetPathsSelected?o="NEW_SEARCH_TERM_WHILE_FACETS_ACTIVE":o="NEW_SEARCH_TERM":this.lastRangeValues!==JSON.stringify(a.rangeValueForIndexFields)?o="RANGE_VALUE_UPDATE":this.lastFacetValues!==JSON.stringify(a.facetPathsForIndexFields)?o="FACET_UPDATE":this.lastSortType!==a.order_by?o="SORT_ORDER_UPDATE":this.lastSearchMode!==a.mode&&(o="EXACT_MATCH_UPDATE"),this.lastRangeValues=JSON.stringify(a.rangeValueForIndexFields),this.lastFacetValues=JSON.stringify(a.facetPathsForIndexFields),this.lastSortType=a.order_by,this.lastSearchMode=a.mode,this.lastSearchTerm=a.searchTerm,this.lastTimeTaken=s.searchResponseTimeTaken,this.handleIncomingSearchResponse(s,o)}}connectedCallback(){this.handleStateUpdate(A.getState()),this.unsubscribe=A.subscribe(r=>{this.handleStateUpdate(r)})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleCheckboxChange(r){var n;if(!this.selectedPaths[r])this.selectedPaths={...this.selectedPaths,[r]:!0};else{const i=Object.keys(this.selectedPaths).filter(c=>!c.includes(r));this.selectedPaths=i.reduce((c,h)=>(c[h]=!0,c),{})}const a=Object.keys(this.selectedPaths).filter(i=>this.selectedPaths[i]),o=uo(a);(n=this.facetSelectionUpdated)==null||n.emit({paths:o})}renderFacet(r,s){let a=!1;for(const i of Object.keys(this.selectedPaths))this.selectedPaths[i]&&i.startsWith(s.path)&&i.length>s.path.length&&(a=!0);const o=Object.keys(this.selectedPaths).includes(s.path),n=Object.keys(s.children).length>0&&(o||a)||r==="@@root";return l("div",{class:"searchcraft-facet-list-item"},r!=="@@root"&&l("label",{class:"searchcraft-facet-list-checkbox-label"},l("div",{class:"searchcraft-facet-list-checkbox-input-wrapper"},l("input",{class:"searchcraft-facet-list-checkbox-input",checked:this.selectedPaths[s.path],onChange:i=>{this.handleCheckboxChange(s.path)},type:"checkbox"}),a?l("div",{class:"searchcraft-facet-list-checkbox-input-dash-icon"},l("svg",{viewBox:"0 0 14 3",fill:"none"},l("title",null,"Checkbox dash"),l("line",{x1:"1.5",y1:"1.5",x2:"12.5",y2:"1.5",stroke:"white","stroke-width":"3","stroke-linecap":"round"}))):l("div",{class:"searchcraft-facet-list-checkbox-input-check-icon"},l("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},l("title",null,"Checkbox check"),l("path",{d:"M13.9999 2L5.74988 10L1.99988 6.36364",stroke:"white","stroke-width":"3","stroke-linecap":"round","stroke-linejoin":"round"})))),l("span",null,this.formatFacetName(r)," (",s.count,")")),n&&l("div",{class:"searchcraft-facet-list",style:{paddingLeft:r!=="@@root"?"24px":"0px",paddingTop:r!=="@@root"?"6px":"0px"}},Object.keys(s.children).map(i=>{if(s.children[i])return this.renderFacet(i,s.children[i])})))}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?l("p",{class:"searchcraft-facet-list-message"},"No facets are available for this search query."):l("div",{class:"searchcraft-facet-list"},this.renderFacet("@@root",this.renderedFacetTree))}},[0,"searchcraft-facet-list",{fieldName:[1,"field-name"],selectedPaths:[32],facetTreeCollectedFromSearchResponse:[32],renderedFacetTree:[32]}]);function bs(){if(typeof customElements>"u")return;["searchcraft-facet-list"].forEach(t=>{switch(t){case"searchcraft-facet-list":customElements.get(t)||customElements.define(t,ho);break}})}const fo=bs;function Ye(e,t){if(e&&t)return t.fieldNames.map(r=>{let s=e[r.fieldName];if(s)switch(r.dataType){case"date":{s=po(s,r.dateFormatLocale,r.dateFormatOptions);break}case"number":{s=Intl.NumberFormat(r.numberFormatLocale,r.numberFormatOptions).format(s*(r.numberScale||1));break}}return s}).filter(r=>!!r).join(t.delimiter||" ")}function ys(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function po(e,t="en-US",r={day:"numeric",month:"long",year:"numeric"}){const s=new Date(e),o=new Date().getTime()-s.getTime(),n=30*24*60*60*1e3;if(o<n){const i=Math.trunc(o/1e3),c=Math.trunc(i/60),h=Math.trunc(c/60),u=Math.trunc(h/24),p=new Intl.RelativeTimeFormat(t,r);return u>=1?p.format(-u,"day"):h>=1?p.format(-h,"hour"):c>=1?p.format(-c,"minute"):p.format(0,"second")}return new Intl.DateTimeFormat(t,r).format(s)}function Xt(e,t,r=0){const s=new Date(e);switch(t){case"year":return new Date(s.getFullYear()+r,0,1,0,0,0,0).getTime();case"month":return new Date(s.getFullYear(),s.getMonth()+r,1,0,0,0,0).getTime();case"day":return new Date(s.getFullYear(),s.getMonth(),s.getDate()+r,0,0,0,0).getTime();case"hour":return new Date(s.getFullYear(),s.getMonth(),s.getDate(),s.getHours()+r,0,0,0).getTime();default:throw new Error(`Unsupported unit: ${t}`)}}function mo(e,t,r){const s=new Date(t),a=new Date(r);switch(e){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: ${e}`)}}const Cs=e=>{if(e>=11&&e<=13)return`${e}th`;switch(e%10){case 1:return`${e}st`;case 2:return`${e}nd`;case 3:return`${e}rd`;default:return`${e}th`}};function go(e,t){const r=new Intl.DateTimeFormat("en-US",{month:"short"});switch(e){case"year":return t.getFullYear().toString();case"month":return`${r.format(t)} ${t.getFullYear()}`;case"day":return`${r.format(t)} ${Cs(t.getDate())}, ${t.getFullYear()}`;case"hour":{const s=new Intl.DateTimeFormat("en-US",{hour:"numeric",minute:"2-digit",hour12:!0});return`${r.format(t)} ${Cs(t.getDate())}, ${s.format(t)}`}default:throw new Error(`Unsupported granularity: ${e}`)}}function vo(e,t){let r=!1,s=null;const a=o=>{e(...o),r=!0,setTimeout(()=>{if(r=!1,s){const n=s;s=null,a(n)}},t)};return(...o)=>{r?s=o:a(o)}}const bo=N(class extends D{constructor(){super();d(this,"max",100);d(this,"min",0);d(this,"step",1);d(this,"dataType","number");d(this,"dateGranularity");d(this,"lowerBound",0);d(this,"upperBound",1);d(this,"endValue",0);d(this,"startValue",0);d(this,"lastFocusedHandle","max");d(this,"throttledEmitUpdate",()=>{});d(this,"rangeChanged");d(this,"emitUpdate",async()=>{var r,s;switch(this.dataType){case"number":(r=this.rangeChanged)==null||r.emit({startValue:this.startValue,endValue:this.endValue});break;case"date":{const a=this.dateGranularity||"year",o=Xt(this.min,a,this.lowerBound+this.startValue),n=Xt(this.min,a,this.lowerBound+this.endValue+1);(s=this.rangeChanged)==null||s.emit({startValue:o,endValue:n});break}}});d(this,"handleStartValueChange",r=>{const s=r.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}`)});d(this,"handleEndValueChange",r=>{const s=r.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}`)});d(this,"getLabel",r=>{switch(this.dataType){case"number":return`${this.startValue}`;case"date":{const s=this.dateGranularity||"year",a=this.lowerBound+r,o=Xt(this.min,s,a);return go(this.dateGranularity||"year",new Date(o))}}});this.__registerHost(),this.rangeChanged=we(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=mo(this.dateGranularity||"year",this.min,this.max),this.lowerBound=0,this.upperBound=this.endValue;break}}this.throttledEmitUpdate=vo(this.emitUpdate,120)}render(){const r=(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 l("div",{key:"3b2e8576d64826f123d40deff3b0df9316649a03",class:"searchcraft-slider"},l("div",{key:"ecaa546b96855aad4e839c5e34e995da0925e0b6",class:"searchcraft-slider-range"},l("div",{key:"f37fc0329249857a29f77d9e3739d10f05f6bf62",class:"searchcraft-slider-active-range",style:{left:`${r}%`,width:`${s-r}%`}}),l("input",{key:"7b5e6f3983b7c109ea0a3f2b248c35d0e225400b",class:re("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}),l("input",{key:"b5bb628b73c8b582a31453e73cb3ef38579eeea5",class:re("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})),l("div",{key:"ecb379babd244e3205f30d45628506566fbeff3c",class:"searchcraft-slider-label"},l("span",{key:"2be886d05c323f7da1059be88c0cb8ede2e1e98b",class:"searchcraft-slider-start-label"},a),l("span",{key:"bf66fcab3fae565980a4637cb13b14589ffcb5ba",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 Ss(){if(typeof customElements>"u")return;["searchcraft-slider"].forEach(t=>{switch(t){case"searchcraft-slider":customElements.get(t)||customElements.define(t,bo);break}})}const yo=N(class extends D{constructor(){super();d(this,"label","Toggle");d(this,"subLabel");d(this,"toggleUpdated");d(this,"isActive",!1);d(this,"unsubscribe");d(this,"lastSearchTerm");d(this,"handleToggle",async()=>{var r;this.isActive=!this.isActive,(r=this.toggleUpdated)==null||r.emit(this.isActive)});this.__registerHost(),this.toggleUpdated=we(this,"toggleUpdated")}connectedCallback(){this.unsubscribe=A.subscribe(r=>{r.searchTerm!==this.lastSearchTerm&&r.searchTerm.trim().length===0&&(this.isActive=!1),this.lastSearchTerm=r.searchTerm})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("div",{key:"f8a751315daf6bcdc0d47bc4fc802bc4615e565f",class:re("searchcraft-toggle-button",{"searchcraft-toggle-button-active":this.isActive})},l("div",{key:"aaa92d7c1aebe241a163a1fba7cd1f8d3804286d"},l("p",{key:"068b82b17a99bf55ad17818d0dd4c7e95858317b",class:"searchcraft-toggle-button-label"},this.label),this.subLabel&&l("p",{key:"39e43e3fad6a2ab09d20f37c6d6865cede3701d9",class:"searchcraft-toggle-button-sub-label"},this.subLabel)),l("button",{key:"5ae352870d4a01c430389e75b967b2eb9d3fa5f7",class:"searchcraft-toggle-button-background",onClick:this.handleToggle,type:"button"},l("div",{key:"0574ade4e1681ce8e122039c40e761cb68555621",class:"searchcraft-toggle-button-handle"})))}},[0,"searchcraft-toggle-button",{label:[1],subLabel:[1,"sub-label"],isActive:[32],unsubscribe:[32],lastSearchTerm:[32]}]);function ws(){if(typeof customElements>"u")return;["searchcraft-toggle-button"].forEach(t=>{switch(t){case"searchcraft-toggle-button":customElements.get(t)||customElements.define(t,yo);break}})}const Co=N(class extends D{constructor(){super();d(this,"items",[]);d(this,"unsubscribe");d(this,"lastSearchTerm");d(this,"searchStore",A.getState());this.__registerHost()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.lastSearchTerm=r.searchTerm||""})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleDateRangeChanged(r,s,a){const o=new Date(s),n=new Date(a);this.searchStore.addRangeValueForIndexField({fieldName:r.fieldName,value:`${r.fieldName}:[${o.toISOString()} TO ${n.toISOString()}]`}),this.searchStore.search()}handleNumericRangeChanged(r,s,a){this.searchStore.addRangeValueForIndexField({fieldName:r,value:`${r}:[${s} TO ${a}]`}),this.searchStore.search()}handleFacetSelectionUpdated(r,s){s.length>0?this.searchStore.addFacetPathsForIndexField({fieldName:r,value:`${r}: IN [${s.join(" ")}]`}):this.searchStore.removeFacetPathsForIndexField(r),this.searchStore.search()}handleExactMatchToggleUpdated(r){this.searchStore.setSearchMode(r?"exact":"fuzzy"),this.searchStore.search()}handleMostRecentToggleUpdated(r,s){s?this.searchStore.setSortOrder({orderByField:r,sortType:"desc"}):this.searchStore.setSortOrder({orderByField:null,sortType:null}),this.searchStore.search()}render(){return l("div",{key:"fb5fce357783f39b0a2846a0bd99994faa5e742d",class:"searchcraft-filter-panel"},this.items.map(r=>{switch(r.type){case"dateRange":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-slider",{min:s.options.minDate.getTime(),max:s.options.maxDate.getTime(),dataType:"date",step:1,dateGranularity:s.options.granularity,onRangeChanged:a=>{this.handleDateRangeChanged(s,a.detail.startValue,a.detail.endValue)}}))}case"numericRange":{const s=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("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=r;return l("div",{class:"searchcraft-filter-panel-section"},l("p",{class:"searchcraft-filter-panel-label"},r.label),l("searchcraft-facet-list",{fieldName:s.fieldName,onFacetSelectionUpdated:a=>{this.handleFacetSelectionUpdated(s.fieldName,a.detail.paths)}}))}case"exactMatchToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleExactMatchToggleUpdated(a.detail)}})}case"mostRecentToggle":{const s=r;return l("searchcraft-toggle-button",{label:s.label,subLabel:s.options.subLabel,onToggleUpdated:a=>{this.handleMostRecentToggleUpdated(s.fieldName,a.detail)}})}}}))}},[0,"searchcraft-filter-panel",{items:[16],unsubscribe:[32],lastSearchTerm:[32]}]);function So(){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,Co);break;case"searchcraft-facet-list":customElements.get(t)||bs();break;case"searchcraft-slider":customElements.get(t)||Ss();break;case"searchcraft-toggle-button":customElements.get(t)||ws();break}})}const wo=So,Ro=N(class extends D{constructor(){super();d(this,"inputLabelClassName","");d(this,"label","");this.__registerHost()}render(){return l("label",{key:"3622c616d480e57b1dfaa2d61637a30b843cb968",class:re("searchcraft-input-label",this.inputLabelClassName),htmlFor:"searchcraft-input-id"},this.label)}},[0,"searchcraft-input-label",{inputLabelClassName:[1,"input-label-class-name"],label:[1]}]);function Jt(){if(typeof customElements>"u")return;["searchcraft-input-label"].forEach(t=>{switch(t){case"searchcraft-input-label":customElements.get(t)||customElements.define(t,Ro);break}})}const ko=N(class extends D{constructor(){super();d(this,"autoSearch",!0);d(this,"buttonPlacement","none");d(this,"buttonLabel");d(this,"inputLabel");d(this,"placeholderValue","Enter Search");d(this,"placeholderBehavior");d(this,"inputFocus");d(this,"inputBlur");d(this,"inputInit");d(this,"inputValue","");d(this,"searchTerm","");d(this,"error",!1);d(this,"core");d(this,"searchcraftStore",A.getState());d(this,"unsubscribe",()=>{});d(this,"handleInput",r=>{const s=r.target;this.inputValue=s.value,this.searchcraftStore.setSearchTerm(s.value),this.autoSearch&&this.performSearch()});d(this,"performSearch",async()=>{this.error=!1;try{await this.searchcraftStore.search()}catch{this.error=!0}});d(this,"handleReset",()=>{this.searchcraftStore.setSearchResultsCount(0),this.searchcraftStore.setSearchTerm(""),this.searchcraftStore.setSearchClientResponseItems([]),this.error=!1});d(this,"handleClearInput",()=>{this.handleReset()});d(this,"handleFormSubmit",async r=>{r.preventDefault(),await this.performSearch()});this.__registerHost(),this.inputFocus=we(this,"inputFocus"),this.inputBlur=we(this,"inputBlur"),this.inputInit=we(this,"inputInit")}init(){var r;this.core&&(this.searchcraftStore.init(this.core),(r=this.inputInit)==null||r.emit())}onCoreChange(){this.init()}connectedCallback(){this.init()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.inputValue=r.searchTerm})}disconnectedCallback(){var r;this.handleReset(),(r=this.unsubscribe)==null||r.call(this)}render(){const r=this.inputValue.length>0,s=re("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 l("form",{key:"d0654def009278279b7edeeccc6044d999c0d5b0",class:"searchcraft-input-form",onSubmit:this.handleFormSubmit},l("div",{key:"27978b08e46e0f8ecdf6dc95a74c962d85f5e9ff",class:s,style:o},l("div",{key:"1f7cecc80a84bfc46c994971cd751d2b65af6d83",class:"searchcraft-input-form-button"},l("searchcraft-button",{key:"b3f2078604c380eef895be103b2bdf5cef6bca84",onButtonClick:this.handleFormSubmit,label:this.buttonLabel})),this.inputLabel&&l("div",{key:"b33c0d3cbb3512964c3a47a2c354a610fa6faa09",class:"searchcraft-input-form-label"},l("searchcraft-input-label",{key:"e620088318c82e2e70d885bd3ee2c88ef8118e7c",label:this.inputLabel})),this.error&&l("div",{key:"c3a20576917aaa33cc12df5ee5b479f87d628de7",class:"searchcraft-input-form-error-message"},l("searchcraft-error-message",{key:"f48e54a236b7a33fa55bab7f29d3b321be0bbb77"},"Something went wrong.")),l("div",{key:"ebda089a3b8698892fd6cebcbaf89582a1bb21a2",class:"searchcraft-input-form-input-wrapper"},l("input",{key:"d7ea7b49f7d65067924168fc281033841a71d419",autoComplete:"off",class:re("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}),l("div",{key:"6dd4a02322072467a104938a47626592658eaa1e",class:"searchcraft-input-form-input-icon"},l("svg",{key:"26a4deabe9149db6db219e49fcccbbe7688e9f0a",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"},l("title",{key:"eff07788d2edaead45a60d8ac20e5d1d694c5165"},"Search icon"),l("path",{key:"9083cf32c8f749210232b51b1f5934a3c32b109f",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"}))),r&&l("button",{key:"0b2117ae2510fe743b11d8e638e981ee0f7e4760",type:"button",class:"searchcraft-input-form-clear-button",onClick:this.handleClearInput},l("svg",{key:"3fbb57c1b6486638286e1010639751a83a75f489",class:"searchcraft-input-form-clear-icon",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":"icon-title"},l("title",{key:"84ce771c55c072b4339babb136639469b68a1f9b"},"Clear icon"),l("path",{key:"811f5fc9cc708f80004f1cf50ddcd85de05f3b6b",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"]}}},[0,"searchcraft-input-form",{autoSearch:[4,"auto-search"],buttonPlacement:[1,"button-placement"],buttonLabel:[1,"button-label"],inputLabel:[1,"input-label"],placeholderValue:[1,"placeholder-value"],placeholderBehavior:[1,"placeholder-behavior"],core:[16],inputValue:[32],searchTerm:[32],error:[32]},void 0,{core:["onCoreChange"]}]);function Rs(){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,ko);break;case"searchcraft-button":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-input-label":customElements.get(t)||Jt();break}})}const Eo=Rs,xo=Jt,To=N(class extends D{constructor(){super();d(this,"searchTerm");d(this,"searchResultsPerPage");d(this,"searchResultsPage");d(this,"searchResultsCount");d(this,"searchResultsPagesCount",1);d(this,"searchResultsRangeMin",1);d(this,"searchResultsRangeMax",1);d(this,"setSearchResultsPage",()=>{});d(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,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=r.setSearchResultsPage})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleGoToPage(r){this.setSearchResultsPage(r)}renderOddPaginationItem(r){return l("li",null,l("button",{class:re("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r))}renderEvenPaginationItem(r){if(!(this.searchResultsPagesCount<=r))return(this.searchResultsPagesCount<=5||r<Math.ceil(this.searchResultsPagesCount/2)?this.searchResultsPage<=r+1:this.searchResultsPage>=r-1)?l("li",null,l("button",{class:re("searchcraft-pagination-item",{"searchcraft-pagination-item-active":this.searchResultsPage===r}),onClick:()=>this.handleGoToPage(r),type:"button"},r)):l("li",null,l("span",{class:"searchcraft-pagination-item"},"..."))}renderMiddlePaginationItem(){if(!(this.searchResultsPagesCount<=3))return this.searchResultsPagesCount<=5||this.searchResultsPage<=3||this.searchResultsPage>=this.searchResultsPagesCount-2?l("li",null,l("button",{class:re("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)):l("li",null,l("span",{class:"searchcraft-pagination-item searchcraft-pagination-item-active"},this.searchResultsPage))}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-pagination"},l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===1,hierarchy:"tertiary",onButtonClick:()=>this.handleGoToPage(Math.max(1,this.searchResultsPage-1)),label:"Previous",iconPosition:"left",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Previous page icon"),l("path",{d:"M12.5 15L7.5 10L12.5 5",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"})),iconOnly:!0})),l("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)),l("div",{class:"searchcraft-pagination-control"},l("searchcraft-button",{disabled:this.searchResultsPage===this.searchResultsPagesCount,hierarchy:"tertiary",onButtonClick:()=>{this.handleGoToPage(Math.min(this.searchResultsPagesCount,this.searchResultsPage+1))},label:"Next",iconPosition:"right",icon:l("svg",{class:"searchcraft-button-icon",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",null,"Next page icon"),l("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",{searchTerm:[32],searchResultsPerPage:[32],searchResultsPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],searchResultsRangeMin:[32],searchResultsRangeMax:[32],setSearchResultsPage:[32]}]);function Po(){if(typeof customElements>"u")return;["searchcraft-pagination","searchcraft-button"].forEach(t=>{switch(t){case"searchcraft-pagination":customElements.get(t)||customElements.define(t,To);break;case"searchcraft-button":customElements.get(t)||vt();break}})}const $o=Po,_o=N(class extends D{constructor(){super();d(this,"template");d(this,"type");d(this,"hotkey");d(this,"hotkeyModifier");d(this,"hotkeyModifierSymbol");d(this,"isPopoverVisible");d(this,"userAgent");d(this,"unsubscribe",()=>{});d(this,"renderOptionSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Option key"),l("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"}),l("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"})));d(this,"renderCtrlSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Ctrl key"),l("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"})));d(this,"renderWindowsMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Windows meta key"),l("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"})));d(this,"renderMacMetaSymbol",()=>l("svg",{version:"1.1",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 512 512",fill:"none"},l("title",null,"Mac meta key"),l("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()}handleOnClick(){A.getState().setPopoverVisibility(!0)}componentDidLoad(){const r=A.getState();this.hotkey=r.hotkey.toUpperCase(),this.hotkeyModifier=r.hotkeyModifier,this.isPopoverVisible=r.isPopoverVisible,this.userAgent=this.setUserAgent(),this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol(),this.unsubscribe=A.subscribe(s=>{this.hotkey=s.hotkey.toUpperCase(),this.hotkeyModifier=s.hotkeyModifier,this.hotkeyModifierSymbol=this.setHotkeyModifierSymbol()})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}setUserAgent(){const r=navigator.userAgent.toLowerCase();switch(!0){case r.includes("windows"):return"window";case r.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 l("div",{class:"searchcraft-popover-button-wrapper"},l("div",{class:"searchcraft-popover-button-input"},l("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"},l("title",null,"Search icon"),l("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"})),l("span",null,"Search")),l("div",{class:"searchcraft-popover-button-keycaps"},l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-modifier"},l("span",null,this.hotkeyModifierSymbol)),l("div",{class:"searchcraft-popover-button-keycaps-keycap searchcraft-popover-button-keycaps-keycap-key"},l("span",null,this.hotkey))))}renderSlot(){switch(this.type){case"skeuomorphic":return this.renderSkeuomorphicSlot();default:return l("div",null,l("slot",null))}}render(){return l("button",{key:"74e36b0593ba2cbb03f5ecff1434bc7056bf0db0",class:`searchcraft-popover-button ${this.type?` searchcraft-popover-button-${this.type}`:""}`,innerHTML:typeof this.template<"u"?this.template({isPopoverVisible:this.isPopoverVisible},{html:qe}):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],hotkey:[32],hotkeyModifier:[32],hotkeyModifierSymbol:[32],isPopoverVisible:[32],userAgent:[32]}]);function Ao(){if(typeof customElements>"u")return;["searchcraft-popover-button"].forEach(t=>{switch(t){case"searchcraft-popover-button":customElements.get(t)||customElements.define(t,_o);break}})}const Io=Ao,Mo=N(class extends D{constructor(){super();d(this,"searchResultsCount");d(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.searchResultsCount=A.getState().searchResultsCount,this.unsubscribe=A.subscribe(r=>{this.searchResultsCount=r.searchResultsCount})}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){return l("footer",{key:"e1344ae185ef1b8a83bb69ba88e2952ab1c75e70",class:"searchcraft-popover-footer"},l("p",{key:"51874f4ce490e4f164b999e8c6f89710702e73bd",class:"searchcraft-popover-footer-results-info"},this.searchResultsCount?`${ys(this.searchResultsCount)} Results Found`:" "),l("a",{key:"5476e24cc3fa7fa265bd2b5cba43c8a70d8609ca",class:"searchcraft-popover-footer-link",href:"https://searchcraft.io/",target:"_blank",rel:"noreferrer"},l("svg",{key:"0a4edf94e9e40a96a93a4e7ba1ffbd081e51b585",class:"searchcraft-popover-footer-link-image",width:"169",height:"16",viewBox:"0 0 169 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},l("title",{key:"67813a626922d709a4409028cb0f3f1ce3e2cfe8"},"Powered by Searchcraft"),l("path",{key:"bf9e46a5f9783edd7167c1c5c1256d0200053969",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",{searchResultsCount:[32]}]);function ks(){if(typeof customElements>"u")return;["searchcraft-popover-footer"].forEach(t=>{switch(t){case"searchcraft-popover-footer":customElements.get(t)||customElements.define(t,Mo);break}})}const Oo=ks,Fo=N(class extends D{constructor(){super();d(this,"item");d(this,"popoverResultMappings");d(this,"documentPosition",0);d(this,"title");d(this,"subtitle");d(this,"href");d(this,"imageSource");d(this,"imageAlt");d(this,"handleLinkClick",()=>{var a;const r=A.getState(),s=r.getSearchcraftCore();if(s){const o=this.documentPosition,n=r.searchTerm,i=r.searchClientResponseItems.length||0;(a=s.measureClient)==null||a.sendMeasureEvent("document_clicked",{document_position:o,number_of_documents:i,search_term:n})}});this.__registerHost()}mapValuesFromDocument(r){var s,a,o,n,i;this.title=Ye(r,(s=this.popoverResultMappings)==null?void 0:s.title),this.subtitle=Ye(r,(a=this.popoverResultMappings)==null?void 0:a.subtitle),this.href=Ye(r,(o=this.popoverResultMappings)==null?void 0:o.href),this.imageSource=Ye(r,(n=this.popoverResultMappings)==null?void 0:n.imageSource),this.imageAlt=Ye(r,(i=this.popoverResultMappings)==null?void 0:i.imageAlt)}connectedCallback(){this.item&&this.mapValuesFromDocument(this.item.document)}disconnectedCallback(){}render(){return l("div",{key:"63a2f070ce71cd1330105c03985e32cd1f228b29",class:"searchcraft-popover-list-item"},l("a",{key:"d9bb09248be9be235147acdfeed1a9f29cd123a2",class:"searchcraft-popover-list-item-link",href:this.href,onClick:this.handleLinkClick.bind(this)},this.imageSource&&l("div",{key:"6af7c3e754885730d8651a593f13b7b5b704a26d",class:"searchcraft-popover-list-item-image-wrapper"},l("img",{key:"74c7e53467efd83ae95439a7065c1de2748113f5",alt:this.imageAlt,src:this.imageSource,class:"searchcraft-popover-list-item-image"})),l("div",{key:"25a12e5cf582b248773005f5fb58f7a15304d2d1",class:"searchcraft-popover-list-item-content"},this.title&&l("p",{key:"8169f7730feb832178adbc9bdb14a089e955a2ad",class:"searchcraft-popover-list-item-content-title"},this.title),this.subtitle&&l("p",{key:"96812df1bab635e3865bdfdb31f133ca629d800e",class:"searchcraft-popover-list-item-content-subtitle"},this.subtitle))))}},[0,"searchcraft-popover-list-item",{item:[16],popoverResultMappings:[16],documentPosition:[2,"document-position"],title:[32],subtitle:[32],href:[32],imageSource:[32],imageAlt:[32]}]);function er(){if(typeof customElements>"u")return;["searchcraft-popover-list-item"].forEach(t=>{switch(t){case"searchcraft-popover-list-item":customElements.get(t)||customElements.define(t,Fo);break}})}const Lo=N(class extends D{constructor(){super();d(this,"popoverResultMappings");d(this,"searchClientResponseItems");d(this,"adClientResponseItems");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"config",(Os=A.getState().core)==null?void 0:Os.config);this.__registerHost()}renderWithADMAds(){var r,s;return l("div",{class:"searchcraft-popover-list-view"},(r=this.adClientResponseItems)==null?void 0:r.map(a=>l("searchcraft-ad",{adClientResponseItem:a,adSource:"adMarketplace",key:a.id,renderPosition:"top"})),(s=this.searchClientResponseItems)==null?void 0:s.map((a,o)=>l("searchcraft-popover-list-item",{item:a,key:a.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+o})))}renderWithCustomAds(){var c,h,u,p;const r=[],s=((c=this.config)==null?void 0:c.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((u=this.config)==null?void 0:u.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,i=this.searchClientResponseItems||[];for(let m=0;m<o;m++)r.push(l("searchcraft-ad",{adSource:"Custom",key:`${m}-ad`,renderPosition:"top"}));i.forEach((m,b)=>{if(s&&b%s===0&&b+s<i.length&&b>=s)for(let v=0;v<a;v++)r.push(l("searchcraft-ad",{adSource:"Custom",key:`${m.id}-ad-${v}`,renderPosition:"interstitial"}));r.push(l("searchcraft-popover-list-item",{item:m,key:m.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+b}))});for(let m=0;m<n;m++)r.push(l("searchcraft-ad",{adSource:"Custom",key:`${m}-ad`,renderPosition:"bottom"}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNativoAds(){var h,u,p,m,b;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((u=this.config)==null?void 0:u.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,i=((b=this.config)==null?void 0:b.nativoAdEndQuantity)||0,c=this.searchClientResponseItems||[];for(let v=0;v<n;v++)r.push(l("searchcraft-ad",{adSource:"Nativo",key:`${v}-ad`,renderPosition:"top"}));c.forEach((v,R)=>{if(a&&(R+s)%a===0&&R+a<c.length&&R>=a)for(let P=0;P<o;P++)r.push(l("searchcraft-ad",{adSource:"Nativo",key:`${v.id}-ad-${P}`,renderPosition:"interstitial"}));r.push(l("searchcraft-popover-list-item",{item:v,key:v.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+R}))});for(let v=0;v<i;v++)r.push(l("searchcraft-ad",{adSource:"Nativo",key:`${v}-ad`,renderPosition:"bottom"}));return l("div",{class:"searchcraft-popover-list-view"},r)}renderWithNoAds(){var r;return l("div",{class:"searchcraft-popover-list-view"},(r=this.searchClientResponseItems)==null?void 0:r.map((s,a)=>l("searchcraft-popover-list-item",{item:s,key:s.id,popoverResultMappings:this.popoverResultMappings,documentPosition:this.searchResultsPerPage*(this.searchResultsPage-1)+a})))}render(){var r;switch(((r=this.config)==null?void 0:r.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[0,"searchcraft-popover-list-view",{popoverResultMappings:[16],searchClientResponseItems:[16],adClientResponseItems:[16],searchResultsPage:[2,"search-results-page"],searchResultsPerPage:[2,"search-results-per-page"]}]);function Es(){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,Lo);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-popover-list-item":customElements.get(t)||er();break}})}const Do=N(class extends D{constructor(){super();d(this,"type","inline");d(this,"popoverResultMappings");d(this,"hotkey","k");d(this,"hotkeyModifier","meta");d(this,"isPopoverVisibleInState",!1);d(this,"unsubscribe");d(this,"searchClientResponseItems",[]);d(this,"adClientResponseItems",[]);d(this,"searchTerm");d(this,"isFocused",!1);d(this,"breakpointSm",576);d(this,"breakpointMd",768);d(this,"breakpointLg",992);d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"modalElement");d(this,"handleDocumentClick",r=>{this.hostElement.contains(r.target)||(this.isFocused=!1)});d(this,"handleDocumentKeyDown",r=>{if(r.key===this.hotkey&&this.handleHotkeyPressed(r),!!this.hostElement.contains(document.activeElement))switch(r.key){case"ArrowDown":case"ArrowUp":r.preventDefault(),this.focusOnNextListItem(r.key);break;case"Escape":A.getState().setPopoverVisibility(!1);break;default:return}});d(this,"handleInputInit",()=>{const r=this.hostElement.querySelector(".searchcraft-input-form-input");r==null||r.focus()});this.__registerHost()}get hostElement(){return this}componentDidLoad(){const r=getComputedStyle(document.documentElement);this.breakpointSm=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-sm").trim()),this.breakpointMd=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-md").trim()),this.breakpointLg=Number.parseFloat(r.getPropertyValue("--sc-breakpoint-lg").trim()),this.isPopoverVisibleInState=A.getState().isPopoverVisible,document.addEventListener("click",this.handleDocumentClick),document.addEventListener("keydown",this.handleDocumentKeyDown),this.unsubscribe=A.subscribe(s=>{this.isPopoverVisibleInState!==s.isPopoverVisible&&this.handlePopoverVisibilityChange(s.isPopoverVisible),this.searchClientResponseItems=[...s.searchClientResponseItems],this.adClientResponseItems=[...s.adClientResponseItems],this.searchTerm=s.searchTerm,this.searchResultsPage=s.searchResultsPage,this.searchResultsPerPage=s.searchResultsPerPage}),A.getState().setHotKeyAndHotKeyModifier(this.hotkey,this.hotkeyModifier)}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this),document.removeEventListener("click",this.handleDocumentClick),document.removeEventListener("keydown",this.handleDocumentKeyDown)}handlePopoverVisibilityChange(r){this.isPopoverVisibleInState=r,document.body.style.overflow=r?"hidden":"auto"}handleInputFocus(){this.isFocused=!0,this.type==="inline"&&window.visualViewport&&window.visualViewport.width<this.breakpointSm&&(A.getState().setPopoverVisibility(!0),this.modalElement||(this.modalElement=document.createElement("searchcraft-popover-form"),this.modalElement.popoverResultMappings=this.popoverResultMappings,this.modalElement.setAttribute("type","fullscreen"),document.body.appendChild(this.modalElement)))}handleModalBackdropClick(r){A.getState().setPopoverVisibility(!1)}handleHotkeyPressed(r){if(r.ctrlKey&&this.hotkeyModifier==="ctrl"||r.altKey&&this.hotkeyModifier==="alt"||r.metaKey&&this.hotkeyModifier==="meta")if(r.preventDefault(),this.type==="inline"&&!this.isPopoverVisibleInState){const s=this.hostElement.querySelector(".searchcraft-input-form-input");s==null||s.focus()}else A.getState().setPopoverVisibility(!this.isPopoverVisibleInState)}handleCancelButtonClick(){A.getState().setPopoverVisibility(!1)}focusOnNextListItem(r){var o,n;const s=Array.from(document.querySelectorAll(".searchcraft-popover-list-item-link")).filter(i=>!i.hasAttribute("disabled")&&i.offsetParent!==null),a=s.indexOf(document.activeElement);if(r==="ArrowDown")(o=s[(a+1)%s.length])==null||o.focus();else if(r==="ArrowUp")if(a>=1)(n=s[a-1])==null||n.focus();else{const i=document.querySelector(".searchcraft-input-form-input");i&&(i.focus(),requestAnimationFrame(()=>{i.selectionEnd=i.value.length,i.selectionStart=i.value.length}))}}get hasResultsToShow(){var r,s;return this.searchTerm&&((s=(r=this.searchTerm)==null?void 0:r.trim())==null?void 0:s.length)>0&&this.searchClientResponseItems.length>0}renderInlinePopover(){const r=this.hasResultsToShow&&this.isFocused;return l("div",{class:re("searchcraft-popover-form searchcraft-popover-form-inline",{"searchcraft-popover-form-active":r})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-inline-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this)})),r&&l("div",{class:"searchcraft-popover-form-inline-wrapper"},l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage}),l("searchcraft-popover-footer",null)))}renderModalPopover(){if(this.isPopoverVisibleInState)return l("div",{class:re("searchcraft-popover-form searchcraft-popover-form-modal",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-modal-backdrop",onClick:this.handleModalBackdropClick}),l("div",{class:"searchcraft-popover-form-modal-wrapper"},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-modal-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-modal-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-modal-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null)))}renderFullscreenPopover(){if(this.isPopoverVisibleInState)return l("div",{class:re("searchcraft-popover-form searchcraft-popover-form-fullscreen",{"searchcraft-popover-form-active":this.hasResultsToShow})},l("div",{class:"searchcraft-popover-form-input searchcraft-popover-form-fullscreen-input"},l("searchcraft-input-form",{onInputFocus:this.handleInputFocus.bind(this),onInputInit:this.handleInputInit.bind(this)}),l("button",{type:"button",class:"searchcraft-popover-form-cancel-button searchcraft-popover-form-fullscreen-cancel-button",onClick:this.handleCancelButtonClick.bind(this)},"Cancel")),l("div",{class:"searchcraft-popover-form-fullscreen-popover-list-view"},this.hasResultsToShow&&l("searchcraft-popover-list-view",{popoverResultMappings:this.popoverResultMappings,searchClientResponseItems:this.searchClientResponseItems,adClientResponseItems:this.adClientResponseItems,searchResultsPage:this.searchResultsPage,searchResultsPerPage:this.searchResultsPerPage})),l("searchcraft-popover-footer",null))}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"],isPopoverVisibleInState:[32],unsubscribe:[32],searchClientResponseItems:[32],adClientResponseItems:[32],searchTerm:[32],isFocused:[32],breakpointSm:[32],breakpointMd:[32],breakpointLg:[32],searchResultsPage:[32],searchResultsPerPage:[32],modalElement:[32]}]);function xs(){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,Do);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-button":customElements.get(t)||vt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-input-form":customElements.get(t)||Rs();break;case"searchcraft-input-label":customElements.get(t)||Jt();break;case"searchcraft-popover-footer":customElements.get(t)||ks();break;case"searchcraft-popover-form":customElements.get(t)||xs();break;case"searchcraft-popover-list-item":customElements.get(t)||er();break;case"searchcraft-popover-list-view":customElements.get(t)||Es();break}})}const No=xs,Ho=er,Uo=Es,zo=N(class extends D{constructor(){super();d(this,"template");d(this,"searchTerm");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"searchResultsCount");d(this,"count",0);d(this,"range",[0,0]);d(this,"responseTime","0");d(this,"unsubscribe",()=>{});this.__registerHost()}connectedCallback(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsCount=r.searchResultsCount,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=((r.searchResponseTimeTaken||0)*1e3).toFixed(2)})}disconnectedCallback(){this.unsubscribe&&this.unsubscribe()}render(){return!this.searchTerm||this.searchResultsCount===0?null:l("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:qe}):`${ys(this.count)} results found in ${this.responseTime}ms`)}},[0,"searchcraft-results-info",{template:[16],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],count:[32],range:[32],responseTime:[32]}]);function Bo(){if(typeof customElements>"u")return;["searchcraft-results-info"].forEach(t=>{switch(t){case"searchcraft-results-info":customElements.get(t)||customElements.define(t,zo);break}})}const Vo=Bo,jo=N(class extends D{constructor(){super();d(this,"item");d(this,"index");d(this,"documentPosition",0);d(this,"template");d(this,"templateHtml");d(this,"handleResultContainerClick",r=>{var u;const s=A.getState(),a=s.getSearchcraftCore();if(!r.target)return;const n=r.target.closest("a");if(!n||!((u=this.hostElement)!=null&&u.contains(n))||!a||!a.measureClient)return;const i=this.documentPosition,c=s.searchTerm,h=s.searchClientResponseItems.length||0;a.measureClient.sendMeasureEvent("document_clicked",{document_position:i,number_of_documents:h,search_term:c})});d(this,"handleKeyDown",()=>{});this.__registerHost()}get hostElement(){return this}connectedCallback(){var r;if(this.item)try{this.templateHtml=(r=this.template)==null?void 0:r.call(this,this.item.document,this.index,{html:qe,source_index:this.item.source_index})}catch(s){console.error("Invalid search result template:",s)}}render(){if(this.item)return typeof this.template>"u"?l("div",{class:"searchcraft-search-result searchcraft-search-result-no-template",onClick:this.handleResultContainerClick,onKeyDown:this.handleKeyDown},Object.entries(this.item.document).map(([r,s])=>l("p",{key:r},l("strong",null,r),": ",s))):l("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],templateHtml:[32]}]);function Ts(){if(typeof customElements>"u")return;["searchcraft-search-result"].forEach(t=>{switch(t){case"searchcraft-search-result":customElements.get(t)||customElements.define(t,jo);break}})}const Wo=Ts,Go=N(class extends D{constructor(){super();d(this,"initialQuery");d(this,"template");d(this,"adClientResponseItems",[]);d(this,"config");d(this,"initialSearchClientResponseItems");d(this,"isSearchInProgress",!0);d(this,"searchClientResponseItems");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"searchTerm","");d(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){var s;const r=A.getState();this.handleStateChange(r),this.searchClientResponseItems=r.searchClientResponseItems,this.searchTerm=r.searchTerm,this.config=(s=r.core)==null?void 0:s.config,r.afterInit=a=>{this.initialQuery&&a.setInitialQuery(this.initialQuery)},this.unsubscribe=A.subscribe(a=>this.handleStateChange(a))}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}handleStateChange(r){var s;this.adClientResponseItems=[...r.adClientResponseItems],this.config=(s=r.core)==null?void 0:s.config,this.initialSearchClientResponseItems=[...r.initialSearchClientResponseItems],this.isSearchInProgress=r.isSearchInProgress,this.searchClientResponseItems=[...r.searchClientResponseItems],this.searchResultsPage=r.searchResultsPage,this.searchResultsPerPage=r.searchResultsPerPage,this.searchTerm=r.searchTerm}renderEmptyState(){return l("div",{class:"searchcraft-search-results-empty-state"},l("slot",{name:"empty-search"}))}renderNoResultsFoundState(){return l("div",{class:"searchcraft-search-results"},l("div",{class:"searchcraft-search-results-error-message"},l("searchcraft-error-message",null,'No search results found for "',this.searchTerm,'" query.')))}renderWithADMAds(){var s,a,o;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},(o=this.adClientResponseItems)==null?void 0:o.map(n=>l("searchcraft-ad",{adSource:"adMarketplace",adClientResponseItem:n,key:n.id,renderPosition:"top"})),r.map((n,i)=>l("searchcraft-search-result",{key:n.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+i,index:i,item:n,template:this.template})))}renderWithCustomAds(){var c,h,u,p,m,b;const r=[],s=((c=this.config)==null?void 0:c.customAdInterstitialInterval)||0,a=((h=this.config)==null?void 0:h.customAdInterstitialQuantity)||1,o=((u=this.config)==null?void 0:u.customAdStartQuantity)||0,n=((p=this.config)==null?void 0:p.customAdEndQuantity)||0,i=(m=this.searchClientResponseItems)!=null&&m.length?this.searchClientResponseItems:(b=this.initialSearchClientResponseItems)!=null&&b.length?this.initialSearchClientResponseItems:[];for(let v=0;v<o;v++)r.push(l("searchcraft-ad",{adSource:"Custom",key:`${v}-ad`,renderPosition:"top"}));i.forEach((v,R)=>{if(s&&R%s===0&&R+s<i.length&&R>=s)for(let P=0;P<a;P++)r.push(l("searchcraft-ad",{adSource:"Custom",key:`${v.id}-ad-${P}`,renderPosition:"interstitial"}));r.push(l("searchcraft-search-result",{key:v.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+R,index:R,item:v,template:this.template}))});for(let v=0;v<n;v++)r.push(l("searchcraft-ad",{adSource:"Custom",key:`${v}-ad`,renderPosition:"bottom"}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNativoAds(){var h,u,p,m,b,v,R;const r=[],s=((h=this.config)==null?void 0:h.nativoAdInterstialStartIndex)||0,a=((u=this.config)==null?void 0:u.nativoAdInterstitialInterval)||0,o=((p=this.config)==null?void 0:p.nativoAdInterstitialQuantity)||1,n=((m=this.config)==null?void 0:m.nativoAdStartQuantity)||0,i=((b=this.config)==null?void 0:b.nativoAdEndQuantity)||0,c=(v=this.searchClientResponseItems)!=null&&v.length?this.searchClientResponseItems:(R=this.initialSearchClientResponseItems)!=null&&R.length?this.initialSearchClientResponseItems:[];for(let P=0;P<n;P++)r.push(l("searchcraft-ad",{adSource:"Nativo",key:`${P}-ad`,renderPosition:"top"}));c.forEach((P,L)=>{if(a&&(L+s)%a===0&&L+a<c.length&&L>=a)for(let $=0;$<o;$++)r.push(l("searchcraft-ad",{adSource:"Nativo",key:`${P.id}-ad-${$}`,renderPosition:"interstitial"}));r.push(l("searchcraft-search-result",{key:P.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+L,index:L,item:P,template:this.template}))});for(let P=0;P<i;P++)r.push(l("searchcraft-ad",{adSource:"Nativo",key:`${P}-ad`,renderPosition:"bottom"}));return l("div",{class:"searchcraft-search-results"},r)}renderWithNoAds(){var s,a;const r=(s=this.searchClientResponseItems)!=null&&s.length?this.searchClientResponseItems:(a=this.initialSearchClientResponseItems)!=null&&a.length?this.initialSearchClientResponseItems:[];return l("div",{class:"searchcraft-search-results"},r.map((o,n)=>l("searchcraft-search-result",{key:o.id,"document-position":this.searchResultsPerPage*(this.searchResultsPage-1)+n,index:n,item:o,template:this.template})))}render(){var a;const r=this.searchClientResponseItems||[],s=this.initialSearchClientResponseItems||[];if(this.searchTerm===""&&s.length===0&&!this.isSearchInProgress)return this.renderEmptyState();if(this.searchTerm.length>0&&r.length===0&&!this.isSearchInProgress)return this.renderNoResultsFoundState();switch(((a=this.config)==null?void 0:a.adSource)||"None"){case"adMarketplace":return this.renderWithADMAds();case"Custom":return this.renderWithCustomAds();case"Nativo":return this.renderWithNativoAds();default:return this.renderWithNoAds()}}},[4,"searchcraft-search-results",{initialQuery:[1,"initial-query"],template:[16],adClientResponseItems:[32],config:[32],initialSearchClientResponseItems:[32],isSearchInProgress:[32],searchClientResponseItems:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchTerm:[32]}]);function qo(){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,Go);break;case"searchcraft-ad":customElements.get(t)||gt();break;case"searchcraft-error-message":customElements.get(t)||bt();break;case"searchcraft-search-result":customElements.get(t)||Ts();break}})}const Yo=qo,Zo=N(class extends D{constructor(){super();d(this,"caption");d(this,"disabled",!1);d(this,"inputId");d(this,"label");d(this,"labelId");d(this,"name");d(this,"options",[]);d(this,"selectChange");d(this,"searchResultsPerPage");d(this,"setSearchResultsPage",()=>{});d(this,"setSearchResultsPerPage",()=>{});d(this,"handleSelectChange",r=>{this.selectChange.emit(r.target.value)});this.__registerHost(),this.selectChange=we(this,"selectChange")}handleGoToPage(r){this.setSearchResultsPage(r)}render(){return l("div",{key:"15ecbf48c824a161cd83bdab99dace8e44f1ab39",class:"searchcraft-select"},this.label&&l("label",{key:"aba433ae9c27c9405099cffcef923c3ad22d7fda",class:"searchcraft-select-label",id:this.labelId||`${this.inputId}-label`,htmlFor:this.inputId},this.label),l("div",{key:"8df8a2ff05924c9c55cdd6e3827cd927cddab82a",class:"searchcraft-select-input-wrapper"},l("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:r,value:s,selected:a})=>l("option",{key:s,value:s,selected:a},r))),l("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"},l("title",{key:"bced6b62378491d1d1c629b602d7d033d912c761"},"Select dropdown icon"),l("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&&l("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 Ps(){if(typeof customElements>"u")return;["searchcraft-select"].forEach(t=>{switch(t){case"searchcraft-select":customElements.get(t)||customElements.define(t,Zo);break}})}const Qo=N(class extends D{constructor(){super();d(this,"increment",20);d(this,"searchTerm");d(this,"searchResultsPage");d(this,"searchResultsPerPage");d(this,"searchResultsCount");d(this,"searchResultsPagesCount");d(this,"initialSearchResultsPerPage");d(this,"setSearchResultsPerPage",()=>{});d(this,"setSearchResultsPage",()=>{});d(this,"unsubscribe",()=>{});this.__registerHost()}componentDidLoad(){this.unsubscribe=A.subscribe(r=>{this.searchTerm=r.searchTerm,this.searchResultsPerPage=r.searchResultsPerPage,this.searchResultsPage=r.searchResultsPage,this.searchResultsCount=r.searchResultsCount,this.searchResultsPagesCount=Math.ceil(this.searchResultsCount/this.searchResultsPerPage),this.setSearchResultsPage=r.setSearchResultsPage,this.setSearchResultsPerPage=r.setSearchResultsPerPage}),this.initialSearchResultsPerPage=A.getState().searchResultsPerPage}disconnectedCallback(){var r;(r=this.unsubscribe)==null||r.call(this)}render(){if(!(!this.searchTerm||this.searchResultsPagesCount<=1))return l("div",{class:"searchcraft-search-results-per-page"},l("div",{class:"searchcraft-search-results-per-page-select"},l("label",{class:"searchcraft-search-results-per-page-select-label",htmlFor:"searchcraft-search-results-per-page-select-input"},"Results Per Page"),l("div",{class:"searchcraft-search-results-per-page-select-input"},l("searchcraft-select",{inputId:"searchcraft-search-results-per-page-select-input",name:"results-per-page",options:[...Array(5)].map((r,s)=>{const a=this.initialSearchResultsPerPage+Number(this.increment)*s;return{label:`${a}`,value:a}}),onSelectChange:r=>{this.setSearchResultsPerPage(Number(r.detail)),this.setSearchResultsPage(1)}}))))}},[0,"searchcraft-search-results-per-page",{increment:[8],searchTerm:[32],searchResultsPage:[32],searchResultsPerPage:[32],searchResultsCount:[32],searchResultsPagesCount:[32],initialSearchResultsPerPage:[32],setSearchResultsPerPage:[32],setSearchResultsPage:[32]}]);function Ko(){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,Qo);break;case"searchcraft-select":customElements.get(t)||Ps();break}})}const Xo=Ko,Jo=Ps,ei=Ss,ti=`[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}/*# sourceMappingURL=hologram.css.map */
25
+ `,ri=N(class extends D{constructor(){super(),this.__registerHost()}render(){return l("style",{key:"912dbad4e0aa5be21ed638cd20c276b530991454"},ti)}},[0,"searchcraft-theme"]);function si(){if(typeof customElements>"u")return;["searchcraft-theme"].forEach(t=>{switch(t){case"searchcraft-theme":customElements.get(t)||customElements.define(t,ri);break}})}const ai=si,ni=ws,$s=()=>{no(),io(),lo(),fo(),wo(),Eo(),xo(),$o(),Io(),Oo(),No(),Ho(),Uo(),Vo(),Wo(),Xo(),Yo(),Jo(),ei(),ai(),ni()};globalThis.__scDefineCustomElements__=$s;const _s={name:"@searchcraft/vue-sdk",version:"0.10.7"},tr="routerLink",As="navManager",oi="router",ii="aria",Ze=Symbol(),Is={default:Ze},Ms=e=>(e==null?void 0:e.split(" "))||[],ci=(e,t,r=[])=>{var s;return[...Array.from(((s=e.value)==null?void 0:s.classList)||[]),...r].filter((a,o,n)=>!t.has(a)&&n.indexOf(a)===o)},ge=(e,t,r=[],s=[],a,o)=>{t!==void 0&&t();const n=j.defineComponent((i,{attrs:c,slots:h,emit:u})=>{var L;const p=j.ref(),m=new Set(Ms(c.class)),b=j.getCurrentInstance(),R=((L=b==null?void 0:b.appContext)==null?void 0:L.provides[As])?j.inject(As):void 0,P=$=>{const{routerLink:ve}=i;if(ve!==Ze)if(R!==void 0){$.preventDefault();let oe={event:$};for(const Ee in i){const U=i[Ee];i.hasOwnProperty(Ee)&&Ee.startsWith(oi)&&U!==Ze&&(oe[Ee]=U)}R.navigate(oe)}else console.warn("Tried to navigate, but no router was found. Make sure you have mounted Vue Router.")};return()=>{i[a],Ms(c.class).forEach(U=>{m.add(U)});const $=i.onClick,ve=U=>{$!==void 0&&$(U),U.defaultPrevented||P(U)};let oe={ref:p,class:ci(p,m),onClick:ve};for(const U in i){const se=i[U];(i.hasOwnProperty(U)&&se!==Ze||U.startsWith(ii))&&(oe[U]=se);const z="on"+U.slice(0,1).toUpperCase()+U.slice(1),xe=c[z];p.value&&c.hasOwnProperty(z)&&"addEventListener"in p.value&&p.value.addEventListener(U,xe)}return tr in i&&i[tr]!==Ze&&(oe={...oe,href:i[tr]}),j.h(e,oe,h.default&&h.default())}});if(typeof n!="function"){let i=[],c={};c.ROUTER_LINK_VALUE=Is,r.forEach(h=>c[h]=Is),i=s,n.name=e,n.emits=i,n.props=c}return n},li=ge("searchcraft-filter-panel",()=>{},["items"]),ui=ge("searchcraft-input-form",()=>{},["autoSearch","buttonPlacement","buttonLabel","inputLabel","placeholderValue","placeholderBehavior","core","inputFocus","inputBlur","inputInit"],["inputFocus","inputBlur","inputInit"]),hi=ge("searchcraft-pagination",()=>{}),di=ge("searchcraft-popover-button",()=>{},["template","type"]),fi=ge("searchcraft-popover-form",()=>{},["type","popoverResultMappings","hotkey","hotkeyModifier"]),pi=ge("searchcraft-results-info",()=>{},["template"]),mi=ge("searchcraft-search-results",()=>{},["initialQuery","template"]),gi=ge("searchcraft-search-results-per-page",()=>{},["increment"]),vi=ge("searchcraft-theme",()=>{}),bi=mi,yi=li,Ci=ui,Si=di,wi=fi,Ri=pi,ki=vi,Ei=hi,xi=gi;class Ti extends On{constructor(t){super(t,{sdkName:_s.name,sdkVersion:_s.version})}}$s(),F.Searchcraft=Ti,F.SearchcraftFilterPanel=yi,F.SearchcraftInputForm=Ci,F.SearchcraftPagination=Ei,F.SearchcraftPopoverButton=Si,F.SearchcraftPopoverForm=wi,F.SearchcraftResultsInfo=Ri,F.SearchcraftSearchResults=bi,F.SearchcraftSearchResultsPerPage=xi,F.SearchcraftTheme=ki,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
26
26
  //# sourceMappingURL=index.umd.js.map