@abtasty/search 0.0.2-11 → 0.0.2-12

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.
Files changed (2) hide show
  1. package/dist/main.js +1 -1
  2. package/package.json +2 -2
package/dist/main.js CHANGED
@@ -1 +1 @@
1
- !function(){"use strict";const t=()=>{let t;return window.ABTasty||window.ABTASTY_S?(window.ABTASTY_S?.USER?.accountIdentifier?.length?t=window.ABTASTY_S.USER.accountIdentifier:"function"==typeof window.ABTasty?.getAccountSettings?t=window.ABTasty.getAccountSettings().identifier:window.ABTasty?.accountSettings&&(t=window.ABTasty.accountSettings.identifier),t):t},e=()=>Object.prototype.hasOwnProperty.call(top,"ABTastyEditor"),a=t=>(t=>{if("string"!=typeof t||!t.trim().length)return null;const[e,a,s]=t.split("[]").map(t=>t.trim()),i=Boolean(s)?s:t,r=a?document.querySelector(e)?.[a]:document;return r?r.querySelector(i):null})(t),s=(t,e)=>{const s=document.querySelector("body")||document.documentElement,i={childList:!0,subtree:!0,attributes:!0},r=()=>n.disconnect(),n=new MutationObserver(()=>{const s=a(e);return s&&!r()&&t(s)});return{clear:r,observe:(t=s)=>n.observe(t,i)}},i=()=>{},r=(t,n)=>{const o=a(t),c={selector:t,clear:i,observe:i};if(o)return setTimeout(()=>n(o),0),c;if(e())return setTimeout(()=>r(t,n),1e3),c;if(t.includes("[]"))return((t,e)=>{const[i,r]=e.split("[]").map(t=>t.trim()),n=a(i),o=n?.[r],{clear:c,observe:l}=s(t,e),h=()=>{const s=a(e);return s&&!d()&&t(s)},d=()=>{c(),n?.removeEventListener("load",h)},b=()=>{l(o),"iframe"===n?.localName&&n.addEventListener("load",h)};return b(),{selector:e,clear:d,observe:b}})(n,t);const{clear:l,observe:h}=s(n,t);return h(),{selector:t,clear:l,observe:h}},n="https://ms-839f1388554f-19719.fra.meilisearch.io",o=`${n}/indexes/${DATA.meilisearchIndex||t()}/search`,c=`${n}/multi-search`,l=["hasbro","lego","mattel"],h={"Content-Type":"application/json",Authorization:"Bearer 1b3d6acfb9eac2780cd20a30ce8728a565960d213b0729b01d9b5e9fdcd3f77b"};function d(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function b(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?d(Object(a),!0).forEach(function(e){g(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function g(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const u=t=>{for(;t.firstChild;)t.removeChild(t.lastChild)},m=function(t,e){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object.entries(t).reduce((t,e)=>{let[s,i]=e;return t[s]&&(Array.isArray(t[s].values)?t[s]=b(b({},i),{},{values:t[s].values.map(t=>{let[e,s]=t;const r=i.values.find(t=>{let[a]=t;return a===e});return r?[e,r[1]]:[e,a?0:s]})}):t[s]=b(b({},i),{},{min:t[s].values.min,max:t[s].values.max})),t},b({},e))};class p{constructor(t){let{baseContainer:e,baseClassName:a,target:s,onInput:i,closeSearchWidget:r}=t;this.baseContainer=e,this.baseClassName=a,this.target=s,this.onInput=i,this.closeSearchWidget=r,this.inputId=`${this.baseClassName}-search-input`,this.searchBarContainer=this.getSearchBarContainer(),this.searchBarLabel=this.getSearchBarLabel(),this.searchBar=this.getSearchBar(),this.searchInput=this.getSearchInput(),this.renderSearchBar()}getSearchBarContainerHeight(){const t=this.target.closest("header");if(t){const e=t.getBoundingClientRect().height;return Math.max(e,150)+"px"}return"auto"}getCurrentSearchBarContainerHeight(){return this.searchBarContainer.getBoundingClientRect().height}resetSearchBarHeight(){this.searchBarContainer.style.minHeight=this.getSearchBarContainerHeight()}focusInput(){this.searchInput.focus()}getSearchBarContainer(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-bar-container`,t.style.minHeight=this.getSearchBarContainerHeight(),t}getSearchBarLabel(){const{searchLabel:t}=DATA,e=document.createElement("label");return e.className=`${this.baseClassName}-search-input-label`,e.innerHTML=t,e.htmlFor=this.inputId,e}getSearchBarAndCloseButtonContainer(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-bar-close-button-container`,t}getSearchBar(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-bar`,t}getSearchInput(){const t=document.createElement("input");return t.id=this.inputId,t.className=`${this.baseClassName}-search-input`,t.oninput=this.onInput,t}getSearchCloseButton(){const t=document.createElement("button");t.className=`${this.baseClassName}-close-icon-container`,t.onclick=this.closeSearchWidget;const e=document.createElement("i");return e.className=`${this.baseClassName}-close-icon`,t.appendChild(e),t}renderSearchBar(){this.searchBar.appendChild(this.searchInput);const t=this.getSearchBarAndCloseButtonContainer();t.append(this.searchBar,this.getSearchCloseButton()),this.searchBarContainer.appendChild(this.searchBarLabel),this.searchBarContainer.appendChild(t),this.baseContainer.appendChild(this.searchBarContainer)}}function f(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function y(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?f(Object(a),!0).forEach(function(e){w(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function w(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const v={text:"",filters:{},sort:["relevance"],page:0,totalPages:0,totalHits:0},x=function(){let t=y({},v);return y({get state(){return t},isNoFiltersAndNoSort:()=>0===Object.keys(t.filters).length&&"relevance"===t.sort[0]},{logState(t){},setText(e){t.text=e,this.logState("setText")},setPage(e){t.page=e,this.logState("setPage")},setTotalPages(e){t.totalPages=e,this.logState("setTotalPages")},setTotalHits(e){t.totalHits=e,this.logState("setTotalHits")},setSort(e){t.sort=""===e?[]:[e],this.logState("setSort")},onFilterChange(e,a,s){t.page=0,void 0!==s.checked?this.updateFilterArray(e,a,s.checked):this.updateRangeFilter(e,s.min,s.max),this.logState("onFilterChange")},updateRangeFilter(e,a,s){t.filters[e]=[{operator:">",value:a},{operator:"<",value:s}],this.logState("updateRangeFilter")},updateFilterArray(e,a,s){s?t.filters[e]=[...t.filters[e]||[],a]:(t.filters[e].length&&(t.filters[e]=t.filters[e].filter(t=>t!==a)),0===t.filters[e].length&&delete t.filters[e]),this.logState("updateFilterArray")},resetFiltersAndPagination(){this.resetFilters(),this.resetPagination(),this.logState("resetFiltersAndPagination")},resetFilters(){t.filters={},this.logState("resetFilters")},resetPagination(){t.page=0,t.totalPages=0,this.logState("resetPagination")},resetSort(){t.sort=["relevance"],this.logState("resetSort")},reset(){t=y({},v),this.logState("reset")}})}();class C{constructor(t){let{id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r}=t;this.id=e,this.facet=a,this.baseClassName=s,this.facetsListContainer=i,this.onFiltersChange=r,this.facetContentContainers=this.createFacetContainers(),this.facetsListContainer.insertBefore(this.facetContentContainers.facetContainer,this.facetsListContainer.lastChild.previousElementSibling)}createFacetContainers(){const{facetsTranslationKeys:t}=DATA,e=t?JSON.parse(t):{},a=`${(s=this.facet.title).charAt(0).toUpperCase()}${s.slice(1)}`;var s;const i=e[a]??a,r=document.createElement("details");r.className=`${this.baseClassName}-search-facet`,r.open=!0;const n=document.createElement("summary");n.innerHTML=`\n\t\t\t<span>${i}</span>\n\t\t\t<div class="${this.baseClassName}-search-facet-arrow" />\n\t\t`;const o=document.createElement("div");return o.className=`${this.baseClassName}-search-facet-content ${this.facet.type}-facet`,r.append(n,o),{facetContainer:r,facetContent:o}}getFacetContainers(){return this.facetContentContainers}}class S extends C{constructor(t){let{id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r}=t;super({id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r});const{facetContent:n,facetContainer:o}=this.getFacetContainers();this.facetContent=n,this.facetContainer=o,this.facetList=this.getFacetListElement(),this.onFiltersChange=r,this.showAll=!1,this.facetContent.append(this.facetList)}createFacetContent(){const t=this.facet.values.sort((t,e)=>{let[a,s]=t,[i,r]=e;return r-s}).sort((t,e)=>{let[a,s]=t,[i,r]=e;const n=(x.state.filters[this.facet.title]||[]).includes(a),o=(x.state.filters[this.facet.title]||[]).includes(i);return n===o?r-s:o-n}),e=this.showAll?t:t.slice(0,10),a=[];for(const[t,s]of e){const e=this.getFacetListItemElement({name:t,count:s});a.push(e)}if(this.facetList.append(...a),this.facet.values.length>10){const t=document.createElement("button");t.className=`${this.baseClassName}-search-facet-show-more`,t.innerHTML="Show "+(this.showAll?"less":"more"),t.onclick=()=>{this.showAll=!this.showAll,this.updateFacetContent()},this.facetList.append(t)}}getFacetListElement(){const t=document.createElement("ul");return t.style.padding="0",t}getFacetListItemElement(t){const{name:e,count:a}=t,s=document.createElement("li");s.className=`${this.baseClassName}-search-facet-list-item`,s.id=`${this.baseClassName}-search-facet-list-item-${e.replace(" ","-").toLowerCase()}`;const i=(x.state.filters[this.facet.title]||[]).includes(e),r=document.createElement("label");r.className=`${this.baseClassName}-search-facet-checkbox-container ${i||0!==a?"":"disabled"} ${i?"checked":""}`,r.innerHTML=`${e} (${a})`;const n=document.createElement("span");n.className=`${this.baseClassName}-search-facet-checkbox-checkmark`;const o=document.createElement("input");return o.disabled=!i&&0===a,o.checked=i,o.type="checkbox",o.onclick=()=>{const t=o.checked;this.onFiltersChange({facetType:"list",facetKey:this.facet.title,facetValue:e,options:{checked:t}})},r.appendChild(o),r.appendChild(n),s.appendChild(r),s}updateFacetContent(){u(this.facetList),0!==this.facet.values.length&&this.createFacetContent()}updateFacet(t){this.facet={title:this.facet.title,type:this.facet.type,values:t.values},this.showAll=!1,this.updateFacetContent()}}class k{constructor(t){let{baseClassName:e,currentRange:a,min:s,max:i,onRangeChange:r}=t;this.baseClassName=e,this.currentRange=a||{min:s,max:i},this.min=s,this.max=i,this.onRangeChange=r}render(){const t=document.createElement("div");t.className=`${this.baseClassName}-range-slider`;const e=document.createElement("div");e.className="range-progress";const a=document.createElement("div");a.className="range-handle";const s=document.createElement("div");s.className="range-handle";const i=document.createElement("div");if(i.className=`${this.baseClassName}-range-values`,this.min===this.max)return a.style.left="0%",s.style.left="100%",e.style.left="0%",e.style.width="100%",a.style.pointerEvents="none",s.style.pointerEvents="none",i.innerHTML=`\n\t\t\t\t<span>${this.min}</span>\n\t\t\t\t<span>${this.max}</span>\n\t\t\t`,t.append(e,a,s),{rangeContainer:t,valuesContainer:i};const r=(this.currentRange.min-this.min)/(this.max-this.min)*100,n=(this.currentRange.max-this.min)/(this.max-this.min)*100;a.style.left=`${r}%`,s.style.left=`${n}%`,e.style.left=`${r}%`,e.style.width=n-r+"%",i.innerHTML=`\n\t\t\t<span>${this.currentRange.min}</span>\n\t\t\t<span>${this.currentRange.max}</span>\n\t\t`,t.append(e,a,s);let o=!1,c=null,l=0,h=0;const d=()=>{const t=parseFloat(a.style.left),e=parseFloat(s.style.left),r=(this.min+t/100*(this.max-this.min)).toFixed(2),n=(this.min+e/100*(this.max-this.min)).toFixed(2);return i.innerHTML=`\n\t\t\t\t<span>${r}</span>\n\t\t\t\t<span>${n}</span>\n\t\t\t`,{minValue:r,maxValue:n}},b=t=>{t.preventDefault(),o=!0,c=t.target,l=t.clientX,h=parseFloat(c.style.left)},g=i=>{if(!o)return;i.preventDefault();const r=i.clientX-l,n=t.offsetWidth;let b=h+r/n*100;b=c===a?Math.max(0,Math.min(b,parseFloat(s.style.left))):Math.max(parseFloat(a.style.left),Math.min(b,100)),b=.8*Math.round(b/.8),c.style.left=`${b}%`,(()=>{const t=parseFloat(a.style.left),i=parseFloat(s.style.left);e.style.left=`${t}%`,e.style.width=i-t+"%"})(),d()},u=()=>{if(!o)return;o=!1,c=null;const{minValue:t,maxValue:e}=d();this.currentRange={min:t,max:e},this.onRangeChange(this.currentRange)};return[a,s].forEach(t=>{t.addEventListener("mousedown",b),document.addEventListener("mousemove",g),document.addEventListener("mouseup",u)}),{rangeContainer:t,valuesContainer:i}}}class F extends C{constructor(t){let{id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r}=t;super({id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r});const{facetContent:n,facetContainer:o}=this.getFacetContainers();this.facetContent=n,this.facetContainer=o,this.onFiltersChange=r,this.filterRange=new k({baseClassName:this.baseClassName,currentRange:{min:this.facet.values.min,max:this.facet.values.max},min:this.facet.values.min,max:this.facet.values.max,onRangeChange:t=>{this.onFiltersChange({facetType:"range",facetKey:this.facet.title,options:t})}})}createFacetContent(){const{rangeContainer:t,valuesContainer:e}=this.filterRange.render();this.facetContent.append(t,e)}updateFacetContent(){u(this.facetContent),void 0!==this.facet.values.min&&void 0!==this.facet.values.max&&(this.filterRange=new k({baseClassName:this.baseClassName,currentRange:{min:this.facet.values.min,max:this.facet.values.max},min:this.facet.values.min,max:this.facet.values.max,onRangeChange:t=>{this.onFiltersChange({facetType:"range",facetKey:this.facet.title,options:t})}}),this.createFacetContent())}updateFacet(t){this.facet={title:this.facet.title,type:this.facet.type,values:t.values},this.updateFacetContent()}}class N{constructor(t){let{baseClassName:e,sortOptions:a,onSortChange:s}=t;this.baseClassName=e,this.onSortChange=s,this.sortOptions=a,this.element=this.getSortFacetElement()}getSortOptionsElements(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-sort-options`;for(const e of this.sortOptions){const a=document.createElement("button");a.classList.add(`${this.baseClassName}-search-sort-option`),(""===e.value&&0===x.state.sort.length||x.state.sort.includes(e.value))&&(a.classList.add("active"),a.disabled=!0),a.innerHTML=e.label,a.dataset.value=e.value,a.onclick=()=>this.onSortChange(e.value),t.appendChild(a)}return t}getSortFacetElement(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-sort-facet`;const e=document.createElement("label");return e.className=`${this.baseClassName}-search-sort-label`,e.textContent="Sort by:",t.appendChild(e),t.appendChild(this.getSortOptionsElements()),t}update(t){this.element.querySelectorAll(".active").forEach(t=>{t.classList.remove("active"),t.disabled=!1});const e=this.element.querySelector(`[data-value="${t[0]||"relevance"}"]`);e&&(e.classList.add("active"),e.disabled=!0)}}class E{constructor(t){let{baseClassName:e,baseContainer:a,searchBar:s,onFiltersChange:i,onFiltersReset:r,onSortChange:n,sortOptions:o}=t;this.baseClassName=e,this.baseContainer=a,this.searchBar=s,this.onFiltersChange=i,this.onFiltersReset=r,this.onSortChange=n,this.sortOptions=o,this.facets=[],this.facetsListContainer=this.getFacetsListContainer()}setMaxHeight(t){this.facetsListContainer.style.maxHeight=t}getFacetsListContainer(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-facets-list`;const e=document.createElement("button");e.className=`${this.baseClassName}-search-facets-list-close-button`,e.onclick=this.closeFilters.bind(this);const a=document.createElement("i");a.className=`${this.baseClassName}-close-icon`,e.appendChild(a),this.sortFacet=new N({baseClassName:this.baseClassName,sortOptions:this.sortOptions,onSortChange:this.onSortChange});const s=document.createElement("button");s.className=`${this.baseClassName}-search-facets-list-reset-button`,s.innerHTML="Reset",s.onclick=this.onFiltersReset.bind(this);const i=document.createElement("button");return i.className=`${this.baseClassName}-search-facets-list-bottom-close-button`,i.innerHTML="Close",i.onclick=this.closeFilters.bind(this),t.append(e,this.sortFacet.element,s,i),t}renderFacets(t){[...this.facetsListContainer.children].forEach(t=>{t.tagName.toLowerCase()==="details".toLowerCase()&&t.parentNode.removeChild(t)}),this.facets=[];for(const[e,a]of Object.entries(t)){if(0===a.values.length||1===a.values.length)continue;const t={id:e,facet:{title:e,values:a.values,type:a.type},baseClassName:this.baseClassName,facetsListContainer:this.facetsListContainer,onFiltersChange:this.onFiltersChange},s=new("range"===a.type?F:S)(t);this.facets.push(s)}this.facets.forEach(t=>{t.createFacetContent()}),this.baseContainer.appendChild(this.facetsListContainer)}updateRangeFacets(t){this.facets.filter(t=>t instanceof F).forEach(e=>{e.updateFacet(t[e.id])})}updateListFacets(t){this.facets.filter(t=>t instanceof S).forEach(e=>{e.updateFacet(t[e.id])})}updateFacets(t){this.updateRangeFacets(t),this.updateListFacets(t)}openFilters(){const t=this.baseContainer.parentElement,e=document.createElement("div");e.className=`${this.baseClassName}-search-facets-list-overlay`,e.onclick=this.closeFilters.bind(this),t.insertAdjacentElement("afterbegin",e),this.facetsListContainer.classList.add("open")}closeFilters(){this.facetsListContainer.classList.remove("open");const t=this.baseContainer.parentElement.firstChild;this.baseContainer.parentElement.removeChild(t)}}class A{constructor(t){let{result:e,index:a,baseClassName:s}=t;this.result=e,this.index=a,this.baseClassName=s}getSearchResultElement(){const t=document.createElement("a");return t.className=`${this.baseClassName}-search-result-container`,t.href=this.result.link,t.target="_blank",t.rel="noreferrer",t.innerHTML=`\n <div class="${this.baseClassName}-search-result result-${this.index}">\n <img loading="lazy" src="${this.result.img_link}" />\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class="${this.baseClassName}-search-result-name">${this.result.name}</div>\n\t\t\t\t\t\t<div class="${this.baseClassName}-search-result-price">${this.result.price}€</div>\n\t\t\t\t\t</div>\n </div\n\t\t`,t}}class T{constructor(t){let{baseClassName:e,sortOptions:a,infos:s,onSortChange:i,openFilters:r}=t;this.baseClassName=e,this.onSortChange=i,this.sortOptions=a,this.infos=s,this.openFilters=r,this.infosElement=this.getInfosElement(),this.sortLabelElement=this.getSortLabelElement(),this.sortSelectElement=this.getSortSelectElement(),this.sortAndFiltersButtonElement=this.getSortAndFiltersButtonElement(),this.infosAndSortContainer=this.getInfoAndSortContainerElement(),this.infosAndSortContainer.appendChild(this.infosElement),this.infosAndSortContainer.appendChild(this.sortAndFiltersButtonElement),this.setSortOptions()}getInfoAndSortContainerElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-info-and-sort`,t}getInfosElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-infos`,t.style.whiteSpace="nowrap",t.innerHTML=`\n\t\t\t<span><strong>${this.infos.totalHits}</strong> items</span>\n\t\t`,t}getSortLabelElement(){const t=document.createElement("label");return t.className=`${this.baseClassName}-search-sort-label`,t.textContent="Sort by:",t.htmlFor=`${this.baseClassName}-search-sort-select`,t}getSortSelectElement(){const t=document.createElement("select");return t.className=`${this.baseClassName}-search-sort-select`,t.id=`${this.baseClassName}-search-sort-select`,t.name=`${this.baseClassName}-search-sort-select`,t.onchange=this.handleSortChange.bind(this),t}getSortElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-sort`,t.appendChild(this.sortLabelElement),t.appendChild(this.sortSelectElement),t}getFiltersButtonElement(){const t=document.createElement("button");return t.className=`${this.baseClassName}-search-filters-button`,t.innerHTML="Filters",t.onclick=this.openFilters.bind(this),t}getSortAndFiltersButtonElement(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-sort-and-filters-button-container`;const e=this.getSortElement(),a=this.getFiltersButtonElement();return t.appendChild(e),t.appendChild(a),t}setSortOptions(){this.sortSelectElement.childElementCount&&removeChildren(this.sortSelectElement);for(const t of this.sortOptions){const e=document.createElement("option");e.value=t.value,e.textContent=t.label,this.sortSelectElement.appendChild(e)}}handleSortChange(t){const e=t.target.value;this.onSortChange(e)}updateInfos(t){this.infos=t,this.infosElement.innerHTML=`\n\t\t\t<span><strong>${this.infos.totalHits}</strong> items</span>\n\t\t`}updateSort(t){this.sortSelectElement.value=t[0]||"relevance"}updateSortOptions(t){this.sortOptions=t,this.setSortOptions()}}class R{hasTriggeredSeeMore=!1;constructor(t){let{baseContainer:e,baseClassName:a,searchBar:s,onFiltersChange:i,onSortChange:r,onSeeMore:n,onFiltersReset:o}=t;this.baseContainer=e,this.baseClassName=a,this.searchBar=s,this.onFiltersChange=i,this.onSortChange=r,this.onSeeMore=n,this.onFiltersReset=o,this.sortOptions=[{value:"relevance",label:"Relevance"},{value:"price:asc",label:"↑ Price"},{value:"price:desc",label:"↓ Price"}],this.searchResultContainer=this.getSearchResultContainerElement(),this.searchResultListContainer=this.getSearchResultListContainerElement(),this.searchResultList=this.getSearchResultListElement(),this.facetsList=new E({searchBar:this.searchBar,baseContainer:this.searchResultContainer,baseClassName:this.baseClassName,onFiltersChange:this.onFiltersChange,onFiltersReset:this.onFiltersReset,onSortChange:this.onSortChange,sortOptions:this.sortOptions}),this.infoAndSort=new T({baseClassName:this.baseClassName,infos:{totalHits:x.state.totalHits},sortOptions:this.sortOptions,onSortChange:this.onSortChange,openFilters:this.openFilters.bind(this)}),new MutationObserver(this.mutationCallback.bind(this)).observe(this.searchResultContainer,{childList:!0})}mutationCallback(t){for(const e of t)if("childList"===e.type)if(!e.target.childNodes.length||"0px"!==this.searchResultContainer.style.maxHeight&&""!==this.searchResultContainer.style.maxHeight)0===e.target.childNodes.length&&(this.searchResultListContainer.style.maxHeight="0px",this.facetsList.setMaxHeight("0px"));else{const t=`calc(100vh - ${this.searchBar.getCurrentSearchBarContainerHeight()||0}px)`;this.searchResultListContainer.style.maxHeight=t,this.facetsList.setMaxHeight(t)}}scrollToTop(){this.searchResultList.scrollTop=0}openFilters(){this.facetsList.openFilters()}clearSearchResults(){u(this.searchResultList),u(this.searchResultListContainer),u(this.searchResultContainer),this.searchResultContainer.classList.remove("visible","no-results")}getSearchResultContainerElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-result-container`,t}getSearchResultListContainerElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-result-list-container`,t.addEventListener("scroll",t=>{const e=t.target.scrollTop+t.target.clientHeight>=t.target.scrollHeight-500;!this.hasTriggeredSeeMore&&e&&x.state.page<x.state.totalPages&&(this.hasTriggeredSeeMore=!0,this.onSeeMore())}),t}getSearchResultListElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-result-list`,t}updateSearchResults(t){if(u(this.searchResultList),this.searchResultContainer.classList.remove("no-results"),this.infoAndSort.updateInfos({totalHits:x.state.totalHits}),t.length)for(const[e,a]of t.entries()){const t=new A({result:a,index:e,searchResultContainer:this.searchResultList,baseClassName:this.baseClassName});this.searchResultList.appendChild(t.getSearchResultElement())}else{const t=document.createElement("div");t.className=`${this.baseClassName}-search-no-result`,t.innerHTML="No results found",this.searchResultContainer.classList.add("no-results"),this.searchResultList.appendChild(t)}this.hasTriggeredSeeMore=!1}renderSearchResults(t,e){if(this.baseContainer.classList.add("search-completed"),this.clearSearchResults(),this.infoAndSort.updateInfos({totalHits:x.state.totalHits}),t.length){this.facetsList.renderFacets(e);for(const[e,a]of t.entries()){const t=new A({result:a,index:e,searchResultContainer:this.searchResultList,baseClassName:this.baseClassName});this.searchResultList.appendChild(t.getSearchResultElement())}this.searchResultListContainer.appendChild(this.infoAndSort.infosAndSortContainer),this.searchResultListContainer.appendChild(this.searchResultList),this.searchResultContainer.appendChild(this.searchResultListContainer),this.baseContainer.appendChild(this.searchResultContainer)}else{const t=document.createElement("div");t.className=`${this.baseClassName}-search-no-result`,t.innerHTML="No results found",this.searchResultContainer.classList.add("no-results"),this.searchResultContainer.appendChild(t)}this.searchResultContainer.classList.add("visible"),this.baseContainer.appendChild(this.searchResultContainer),this.hasTriggeredSeeMore=!1}}function L(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function $(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?L(Object(a),!0).forEach(function(e){O(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):L(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function O(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const P={results:[],facets:{},selectedFacets:{}},j=(()=>{let t=$({},P);return $({get state(){return t}},{logState(t){},addResults(e){t.results=[...t.results,...e.sort((t,e)=>((t,e)=>{const a=t.toLowerCase(),s=e.toLowerCase();return l.some(t=>a.includes(t))&&!l.some(t=>s.includes(t))?-1:l.some(t=>s.includes(t))&&!l.some(t=>a.includes(t))?1:0})(t.name,e.name))],this.logState("addResults")},setFacets(e){t.facets=e,this.logState("setFacets")},addRangeToSelectedFacets(e,a){t.selectedFacets[e]={type:a.type,values:a.values},this.logState("addRangeToSelectedFacets")},addListToSelectedFacets(e,a){if(a){const s=a.values[0],i=a.values[1],r=t.selectedFacets[e];if(r){const t=r.values.findIndex(t=>{let[e]=t;return e===s});t>-1?r.values[t]=[s,r.values[t][1]+i]:r.values.push([s,i])}else t.selectedFacets[e]={type:a.type,values:[[s,i]]}}this.logState("addListToSelectedFacets")},removeSelectedFacet(e,a){const s=t.selectedFacets[e];s&&(s.values=s.values.filter(t=>{let[e]=t;return e!==a})),0===s.values.length&&delete t.selectedFacets[e],this.logState("removeSelectedFacet")},updateSelectedFacets(e){const a=m(e,t.selectedFacets,!0);t.selectedFacets=a,this.logState("updateSelectedFacets")},updateFacets(e){t.facets=m(e,t.facets,!0),this.logState("updateFacets")},setSelectedFacets(e){t.selectedFacets=e,this.logState("setSelectedFacets")},clearResults(){t.results=[],this.logState("clearResults")},reset(){t=$({},P),this.logState("reset")}})})();function B(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function I(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?B(Object(a),!0).forEach(function(e){D(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):B(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function D(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const M=function(t){let e=[];for(const a in t){const s=t[a];if(Array.isArray(s))if("object"==typeof s[0]){const t=s.map(t=>`${a} ${t.operator} ${t.value}`);e.push(`(${t.join(" AND ")})`)}else{const t=s.map(t=>`"${a}" = "${t}"`);e.push(`(${t.join(" OR ")})`)}}return e.join(" AND ")},H=function(t){const{facetDistribution:e,facetStats:a}=t;let s={};for(const t in e)a&&a[t]?s[t]={type:"range",values:{min:a[t].min,max:a[t].max}}:s[t]={type:"list",values:Object.entries(e[t])};return s},z=t=>{const e=DATA.language,a=[];for(const s of t){let t=s.title,i=s.link;e&&(s.localized_title&&(t=JSON.parse(s.localized_title)[e]??s.title),s.localized_link&&(i=JSON.parse(s.localized_link)[e]??s.link)),i&&s.img_link&&s.price&&a.push({name:t,link:i,img_link:s.img_link,price:s.price,category:s.category,brand:s.brand})}return a},W=t=>{let{text:e,filters:a,sort:s,page:i}=t;return JSON.stringify({q:e,filter:M(a),facets:["*"],hitsPerPage:50,page:i+1,sort:"relevance"===s[0]?[]:s})},_=t=>({hits:z(t.hits),facets:H(t),page:t.page,totalPages:t.totalPages,totalHits:t.totalHits}),q=/.+\/([^.]+)\.(otf|ttf)$/,J=(t,e)=>t&&"inherit"!==t?`font-family:${t}_${e.match(q)?e.match(q)[1]:""};`:e||"",U=()=>{const{primaryColor:t,secondaryColor:e,tertiaryColor:a,searchBarTitleAlign:s,searchBarTitleFontName:i,searchBarTitleFontSize:r,searchBarTitleFontStyle:n,searchBarTitleCustomFontColor:o,searchBarTitleTextColor:c,searchBarInputAlign:l,searchBarInputFontName:h,searchBarInputFontSize:d,searchBarInputFontStyle:b,searchBarInputCustomFontColor:g,searchBarInputTextColor:u}=DATA;return["div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-container {",`background-color: ${t};`,"}","div.abtasty-search-widget-container i.abtasty-search-widget-close-icon {",`background-color: ${t};`,"}","div.abtasty-search-widget-container label.abtasty-search-widget-search-input-label {",`text-align: ${s};`,J(i,n),`font-size: ${r}px;`,`color: ${o?c:e};`,"}","div.abtasty-search-widget-container input.abtasty-search-widget-search-input {",`text-align: ${l};`,J(h,b),`font-size: ${d}px;`,`color: ${g?u:a};`,"}"].join("")},X=()=>{const{primaryColor:t,secondaryColor:e,tertiaryColor:a,facetSectionTitleAlign:s,facetSectionTitleFontName:i,facetSectionTitleFontSize:r,facetSectionTitleFontStyle:n,facetSectionTitleCustomFontColor:o,facetSectionTitleTextColor:c,facetTitleAlign:l,facetTitleFontName:h,facetTitleFontSize:d,facetTitleFontStyle:b,facetTitleCustomFontColor:g,facetTitleTextColor:u}=DATA;return["div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary {",`text-align: ${s};`,J(i,n),`font-size: ${r}px;`,`color: ${o?c:t};`,"}","div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container {",`text-align: ${l};`,J(h,b),`font-size: ${d}px;`,`color: ${g?u:a};`,"}","div.abtasty-search-widget-container button.abtasty-search-widget-search-facet-show-more {",`color: ${t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-range-slider {",`background-color: ${e};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button,","div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-progress {",`background-color: ${t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button {",`background-color: ${t};`,`color: ${e};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-handle {",`background-color: ${t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-range-values {",`color: ${a};`,"}"].join("")},Z=()=>{const{primaryColor:t,tertiaryColor:e,searchResultNameAlign:a,searchResultNameFontName:s,searchResultNameFontSize:i,searchResultNameFontStyle:r,searchResultNameCustomFontColor:n,searchResultNameTextColor:o,searchResultPriceAlign:c,searchResultPriceFontName:l,searchResultPriceFontSize:h,searchResultPriceFontStyle:d,searchResultPriceCustomFontColor:b,searchResultPriceTextColor:g}=DATA;return["div.abtasty-search-widget-container div.abtasty-search-widget-search-result-name {",`text-align: ${a};`,J(s,r),`font-size: ${i}px;`,`color: ${n?o:t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-search-result-price {",`text-align: ${c};`,J(l,d),`font-size: ${h}px;`,`color: ${b?g:e};`,"}"].join("")};class G{constructor(t){let{target:e,rootElement:a}=t;this.baseClassName="abtasty-search-widget",this.target=e,this.rootElement=a,this.searchOpen=!1,this.searchWidgetContainer=this.getSearchWidgetContainerElement(),this.searchBar=new p({baseContainer:this.searchWidgetContainer,baseClassName:this.baseClassName,target:this.target,onInput:this.debouncedOnInput.bind(this),closeSearchWidget:this.closeSearchWidget.bind(this)}),this.searchResultsList=new R({baseClassName:this.baseClassName,baseContainer:this.searchWidgetContainer,searchBar:this.searchBar,onFiltersChange:this.onFiltersChange.bind(this),onSeeMore:this.onSeeMore.bind(this),onSortChange:this.onSortChange.bind(this),onFiltersReset:this.onFiltersReset.bind(this)})}insertIn(t,e){t.insertAdjacentElement(e,this.searchWidgetContainer)}remove(){this.rootElement.querySelector("body").removeChild(this.searchWidgetContainer)}openSearchWidget(){if(this.searchOpen)return;const t=this.rootElement.querySelector("body");this.rootElement.querySelector("html").classList.add("search-open"),this.insertIn(t,"afterbegin"),this.searchBar.focusInput(),this.searchOpen=!0}closeSearchWidget(){this.rootElement.querySelector("html").classList.remove("search-open"),this.searchOpen=!1,this.remove()}onFiltersReset=()=>{x.isNoFiltersAndNoSort()||(x.resetFiltersAndPagination(),x.resetSort(),this.onSearch())};onFiltersChange=t=>{let{facetType:e,facetKey:a,facetValue:s,options:i}=t;"range"===e?this.onRangeChange(a,i.min,i.max):this.onListCheckboxChange(a,s,i.checked)};onSortChange=async t=>{x.setPage(0),j.clearResults(),x.setSort(t),this.searchResultsList.scrollToTop();const e=await(async()=>{try{const t=await fetch(o,{method:"POST",headers:h,body:W(x.state)}),e=await t.json();return{results:_(e).hits}}catch(t){return window.console.error(t),{results:[]}}})();if(!e)return;const{results:a}=e;j.addResults(a),this.searchResultsList.updateSearchResults(j.state.results),this.searchResultsList.facetsList.sortFacet.update(x.state.sort),this.searchResultsList.infoAndSort.updateSort(x.state.sort)};onRangeChange=async(t,e,a)=>{x.resetPagination(),j.clearResults(),x.updateRangeFilter(t,e,a);const s=await this.onSearchWithFilters();if(!s)return;const{results:i,facets:r,totalPages:n,totalHits:o}=s;j.addResults(i),r[t]&&delete r[t],j.updateFacets(r),j.addRangeToSelectedFacets(t,{type:"range",values:{min:e,max:a}}),x.setTotalPages(n),x.setTotalHits(o),this.searchResultsList.updateSearchResults(j.state.results),this.searchResultsList.facetsList.updateListFacets(j.state.facets)};onListCheckboxChange=async(t,e,a)=>{x.resetPagination(),j.clearResults(),x.updateFilterArray(t,e,a);const s=await this.onSearchWithFilters();if(!s)return;const{results:i,facets:r,totalPages:n,totalHits:o}=s;if(j.addResults(i),j.updateFacets(r),a){const a=r[t]?.values.find(t=>{let[a]=t;return a===e});j.addListToSelectedFacets(t,{type:"list",values:a||[e,0]})}else j.removeSelectedFacet(t,e);x.setTotalPages(n),x.setTotalHits(o),this.searchResultsList.updateSearchResults(j.state.results),this.searchResultsList.facetsList.updateFacets(j.state.facets)};onInput=t=>{x.setText(t.target.value),t.target.value.length?((Object.keys(x.state.filters).length||x.state.page>0)&&x.resetFiltersAndPagination(),this.onSearch()):(this.searchWidgetContainer.classList.remove("search-completed"),this.searchResultsList.clearSearchResults())};onSeeMore=async()=>{x.setPage(x.state.page+1);const t=await(async()=>{try{const t=await fetch(o,{method:"POST",headers:h,body:W(x.state)}),e=await t.json(),a=_(e);return{results:a.hits,totalPages:a.totalPages}}catch(t){return window.console.error(t),null}})();if(!t)return;const{results:e,totalPages:a}=t;j.addResults(e),x.setTotalPages(a),this.searchResultsList.updateSearchResults(j.state.results)};async onSearchWithFilters(){const{text:e}=x.state;return this.searchResultsList.scrollToTop(),e?await(async()=>{const e=(t=>{const e=[],{text:a,filters:s,page:i,sort:r}=x.state;return e.push({indexUid:t,q:a,filter:M(s),hitsPerPage:50,page:i+1,sort:"relevance"===r[0]?[]:r}),Object.entries(j.state.facets).forEach(i=>{let[r]=i;const n=I({},s);delete n[r],e.push({indexUid:t,q:a,filter:M(n),facets:[r],hitsPerPage:0})}),JSON.stringify({queries:e})})(DATA.meilisearchIndex||t());try{const t=await fetch(c,{method:"POST",headers:h,body:e}),a=(t=>{const{results:e}=t,a=e.slice(1).reduce((t,e)=>{const a=H(e);return I(I({},t),a)},{});return{hits:z(e[0].hits),facets:a,page:e[0].page,totalPages:e[0].totalPages,totalHits:e[0].totalHits}})(await t.json());return{results:a.hits,facets:a.facets,totalPages:a.totalPages,page:a.page,totalHits:a.totalHits}}catch(t){return window.console.error(t),null}})():(this.searchWidgetContainer.classList.remove("search-completed"),null)}onSearch=async()=>{const{text:t}=x.state;if(j.clearResults(),this.searchResultsList.scrollToTop(),t)try{const t=await(async()=>{try{const t=await fetch(o,{method:"POST",headers:h,body:W(x.state)}),e=await t.json(),a=_(e);return{results:a.hits,facets:a.facets,totalPages:a.totalPages,page:a.page,totalHits:a.totalHits}}catch(t){return window.console.error(t),{results:[],facets:{},totalPages:0,page:0,totalHits:0}}})(),{results:e,facets:a,totalPages:s,totalHits:i}=t;j.addResults(e),j.setFacets(a),x.setTotalPages(s),x.setTotalHits(i),this.searchResultsList.renderSearchResults(e,a)}catch(t){window.console.error(t)}else this.searchWidgetContainer.classList.remove("search-completed")};debouncedOnInput=(()=>(t=>{let e=null;return function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];window.clearTimeout(e),e=window.setTimeout(()=>{t(...s)},150)}})(this.onInput.bind(this)))();getSearchWidgetContainerElement(){const t=document.createElement("div"),e=document.createElement("style");t.className=`${this.baseClassName}-container`;const[a,s,i]=[U(),Z(),X()],r=document.createTextNode("html.search-open{height:100vh;overflow:hidden;padding:0}div.abtasty-search-widget-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:hsla(0,0%,100%,.5);bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:inherit;height:100vh;left:0;position:fixed;right:0;top:0;width:100vw;z-index:9999}div.abtasty-search-widget-container button:not(:disabled):hover{opacity:.5}div.abtasty-search-widget-container i{display:inline-block;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}div.abtasty-search-widget-container.search-completed{background-color:#fff}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:#0c4884;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:22.5px 100px;position:sticky;top:0}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar{background-color:#fff;border-radius:12px;margin-top:12px;padding:12px;width:100%}div.abtasty-search-widget-container label.abtasty-search-widget-search-input-label{color:#fff;font-size:16px;font-weight:700;line-height:17px;margin-left:auto;margin-right:auto;margin-top:auto}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;line-height:unset}div.abtasty-search-widget-container input.abtasty-search-widget-search-input{border:unset;font-size:1.6em;font-weight:700;outline:0;padding:unset;width:100%}div.abtasty-search-widget-container button.abtasty-search-widget-close-icon-container{background-color:#fff!important;border:none;border-radius:100%;cursor:pointer!important;margin-top:12px;padding:8px;-webkit-transform:translateX(150%);transform:translateX(150%);vertical-align:middle}div.abtasty-search-widget-container i.abtasty-search-widget-close-icon{background-color:#0c4884;height:28px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512' fill='rgba(0, 0, 0, 0.999)'%3E%3Cpath d='M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25-6.2 6.25-14.4 9.35-22.6 9.35s-16.38-3.125-22.62-9.375L160 301.3 54.63 406.6C48.38 412.9 40.19 416 32 416s-16.37-3.1-22.625-9.4c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512' fill='rgba(0, 0, 0, 0.999)'%3E%3Cpath d='M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25-6.2 6.25-14.4 9.35-22.6 9.35s-16.38-3.125-22.62-9.375L160 301.3 54.63 406.6C48.38 412.9 40.19 416 32 416s-16.37-3.1-22.625-9.4c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z'/%3E%3C/svg%3E\");vertical-align:middle;width:28px}div.abtasty-search-widget-container i.abtasty-search-widget-search-icon{background-color:#fff;height:12.5px;margin-right:6px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='rgba(74, 76, 83, 0.999)'%3E%3Cpath d='M500.3 443.7 380.6 324c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723 99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9 53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0 15.606-15.64 15.606-41.04.006-56.64zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128-57.42 128-128 128-128-57.4-128-128z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' fill='rgba(74, 76, 83, 0.999)'%3E%3Cpath d='M500.3 443.7 380.6 324c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723 99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9 53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0 15.606-15.64 15.606-41.04.006-56.64zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128-57.42 128-128 128-128-57.4-128-128z'/%3E%3C/svg%3E\");width:12.5px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container{display:none}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible{-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-list-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow-y:auto;overscroll-behavior:none;padding:16px 16px 50px}div.abtasty-search-widget-container div.abtasty-search-widget-search-info-and-sort{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort label.abtasty-search-widget-search-sort-label{margin-right:12px;white-space:nowrap}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort select{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border:1px solid #caced1;border-radius:4px;color:#000;cursor:pointer;font-size:16px;outline:none;padding:.675em 2em .675em 1em;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort:after,div.abtasty-search-widget-container div.abtasty-search-widget-search-sort:before{content:\"\";pointer-events:none;position:absolute;right:16px;right:1rem}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort:before{border-bottom:.3rem solid #000;border-left:.3rem solid transparent;border-right:.3rem solid transparent;top:35%}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort:after{border-left:.3rem solid transparent;border-right:.3rem solid transparent;border-top:.3rem solid #000;top:55%}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-and-filters-button-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-pack:end;-ms-flex-pack:end;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;justify-content:end;width:100%}div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button{background-color:#fff;border:1px solid #caced1;border-radius:4px;color:#000;cursor:pointer;display:none;font-size:16px;margin-left:12px;outline:none;padding:.675em}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-list{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:grid;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;justify-content:center;margin-top:16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible.no-results div.abtasty-search-widget-search-result-list-container{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(5,minmax(0,1fr))}div.abtasty-search-widget-container div.abtasty-search-widget-search-no-result{font-size:38px;font-weight:700;margin-left:auto;margin-right:auto;margin-top:82px;text-align:center}div.abtasty-search-widget-container a.abtasty-search-widget-search-result-container{color:unset!important;text-decoration:none!important}div.abtasty-search-widget-container div.abtasty-search-widget-search-result{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:justify;-ms-flex-pack:justify;border-radius:12px;-webkit-box-shadow:0 2px 8px 0 rgba(0,0,0,.11);box-shadow:0 2px 8px 0 rgba(0,0,0,.11);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:400px;justify-content:space-between;padding:18px;width:auto}div.abtasty-search-widget-container div.abtasty-search-widget-search-result img{aspect-ratio:400/450;height:60%;margin-bottom:12px;margin-left:auto;margin-right:auto;-o-object-fit:contain;object-fit:contain;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-name{-webkit-line-clamp:3;-webkit-box-orient:vertical;color:#0d4884;display:-webkit-box;font-size:1em;font-weight:700;height:4.5em;line-height:1.5em;margin-bottom:8px;max-height:4.5em;min-height:4.5em;overflow:hidden;text-decoration:none!important}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-price{color:#404040;font-size:1.833em;font-weight:bolder;line-height:normal;margin-top:auto;text-decoration:none!important}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list{-webkit-box-sizing:border-box;box-sizing:border-box;min-width:240px;overflow-y:auto;overscroll-behavior:none;padding-bottom:50px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-overlay{background-color:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:1}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:rgba(0,0,0,.067);display:none;-ms-flex-direction:column;flex-direction:column}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet label.abtasty-search-widget-search-sort-label{margin-left:18px;margin-top:18px;white-space:nowrap}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet div.abtasty-search-widget-search-sort-options{-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;padding:12px 18px}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet button.abtasty-search-widget-search-sort-option{border:1px solid #caced1;border-radius:50rem;padding:.2em .675em;white-space:nowrap}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet button.abtasty-search-widget-search-sort-option.active{background-color:#0c4884;color:#fff}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:#0c4884;border:none;cursor:pointer;display:none;margin-left:auto;padding:8px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-reset-button{-webkit-box-pack:center;-ms-flex-pack:center;border:2px solid #0c4884;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;justify-content:center;margin-left:auto;margin-right:auto;padding:8px;width:85%}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-reset-button{background-color:transparent;color:#0c4884;display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button{background-color:#0c4884;color:#fff;display:none;margin-top:12px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button i.abtasty-search-widget-close-icon{background-color:#fff}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-content{padding-left:18px;padding-right:18px}div.abtasty-search-widget-container button.abtasty-search-widget-search-facet-show-more{background-color:transparent;border:none;color:#0c4884;font-size:14px;font-weight:700;margin-bottom:12px;padding:0;text-decoration:underline}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-content.range-facet{margin-bottom:12px;padding-right:18px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-list-item-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;justify-content:space-between}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-list-item-container div.checkbox{margin:unset}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container{cursor:pointer;display:block;font-size:14px;font-weight:400;line-height:14px;margin-bottom:12px;padding-left:30px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container.checked,div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container:hover:not(.disabled){font-weight:700}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container.disabled{cursor:not-allowed}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input{cursor:pointer;height:0;opacity:0;position:absolute;width:0}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container.disabled input{cursor:not-allowed}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input[type=checkbox]:before{content:none!important}div.abtasty-search-widget-container span.abtasty-search-widget-search-facet-checkbox-checkmark{background-color:transparent;border:1px solid #000;border-radius:4px;height:15px;left:0;position:absolute;top:0;width:15px}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input:checked~span.abtasty-search-widget-search-facet-checkbox-checkmark{background-color:#0c4884;font-weight:700}div.abtasty-search-widget-container span.abtasty-search-widget-search-facet-checkbox-checkmark:after{content:\"\";display:none;position:absolute}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input:checked~span.abtasty-search-widget-search-facet-checkbox-checkmark:after{display:block}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container span.abtasty-search-widget-search-facet-checkbox-checkmark:after{border:solid #fff;border-width:0 2px 2px 0;height:8px;left:4.5px;top:1.5px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:4px}div.abtasty-search-widget-container li.abtasty-search-widget-search-facet-list-item{margin-bottom:12px;margin-top:12px}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:rgba(0,0,0,.067);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:16px;font-weight:700;justify-content:space-between;padding:13.5px 18px}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary:before{content:none}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary div.abtasty-search-widget-search-facet-arrow:before{content:\"\\276F\"}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary div.abtasty-search-widget-search-facet-arrow{-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:center;transform-origin:center}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet[open] summary div.abtasty-search-widget-search-facet-arrow{-webkit-transform:rotate(270deg);transform:rotate(270deg)}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-content ul{list-style:none}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider{background-color:#e0e0e0;border-radius:5px;height:5px;margin:20px 0;position:relative;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-progress{background-color:#0c4884;border-radius:5px;height:100%;position:absolute;z-index:1}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-handle{background-color:#0c4884;border:2px solid #fff;border-radius:50%;-webkit-box-shadow:0 2px 4px rgba(0,0,0,.2);box-shadow:0 2px 4px rgba(0,0,0,.2);cursor:pointer;height:20px;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:20px;z-index:2}div.abtasty-search-widget-container div.abtasty-search-widget-range-values{-webkit-box-pack:justify;-ms-flex-pack:justify;color:#404040;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;justify-content:space-between;margin-top:10px}div.abtasty-search-widget-container div.abtasty-search-widget-range-values span{font-weight:600}div.abtasty-search-widget-container button.abtasty-search-widget-filters-button{background-color:#fff!important;border:none;border-radius:100%;cursor:pointer!important;display:none;margin-top:12px;padding:11px;-webkit-transform:translateX(-15%);transform:translateX(-15%);vertical-align:middle}div.abtasty-search-widget-container i.abtasty-search-widget-filters-icon{background-color:#0c4884;height:22px;-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDE4IDE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM0OTRjNGUiIGQ9Ik0xNyA1SDFhMSAxIDAgMCAxIDAtMmgxNmExIDEgMCAwIDEgMCAyem0wIDVIMWExIDEgMCAwIDEgMC0yaDE2YTEgMSAwIDAgMSAwIDJ6bTAgNUgxYTEgMSAwIDAgMSAwLTJoMTZhMSAxIDAgMCAxIDAgMnoiLz48L3N2Zz4=\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDE4IDE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM0OTRjNGUiIGQ9Ik0xNyA1SDFhMSAxIDAgMCAxIDAtMmgxNmExIDEgMCAwIDEgMCAyem0wIDVIMWExIDEgMCAwIDEgMC0yaDE2YTEgMSAwIDAgMSAwIDJ6bTAgNUgxYTEgMSAwIDAgMSAwLTJoMTZhMSAxIDAgMCAxIDAgMnoiLz48L3N2Zz4=\");vertical-align:middle;width:22px}@media (max-width:1199.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (max-width:991.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (max-width:767.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(2,minmax(0,1fr))}div.abtasty-search-widget-container div.abtasty-search-widget-search-result{height:300px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result img{height:50%}}@media (max-width:575.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-container{padding:22.5px}div.abtasty-search-widget-container button.abtasty-search-widget-close-icon-container{-webkit-transform:translateX(15%);transform:translateX(15%)}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible div.abtasty-search-widget-search-result-list-container{width:100vw}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(1,minmax(0,1fr))}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet{display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort{display:none}div.abtasty-search-widget-container button.abtasty-search-widget-filters-button,div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button{display:block}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list{background-color:#fff;bottom:0;left:0;max-height:unset!important;min-width:unset;overflow-x:hidden;position:absolute;top:0;-webkit-transition:.5s;transition:.5s;width:0;z-index:1}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button{display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-overlay{display:block}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list.open{width:240px}}@media (max-width:374.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list.open{width:100%}}");return e.appendChild(r),e.textContent+=[a,s,i].join(""),t.insertAdjacentElement("afterbegin",e),t}}(()=>{const{elementReferrer:t}=DATA;return(t=>{const a=(()=>{if(e()||(()=>{const t=!!document.getElementById("ABTastyPreviewBar"),e=location.href.includes("ab_project=preview");return t||e})())return!1;const t=ABTasty.getTestsOnPage()[TEST_ID];return!!t&&Object.keys(t.targetings.qaParameters).length>0})(),s=window.document.cookie.includes("abTastyDebug=")||!0===window.abTastyDebug;if(a||s){const e=(()=>{const t=(()=>{const{type:t}=DATA;return`${PACKAGE.replace("@abtasty/","")}${t?`_${t}`:""}`})();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`.split("-").join(" ")})();window.console.log(`%c${e} - ${a?"QA":"Debug"} Mode for campaign ${TEST_ID} %c ${t}`,"background-color: #D6FF01; color: #3100be; padding: 3px 0 3px 10px; border-radius: 5px 0 0 5px; font-weight: bold;","background-color: #3100be; color: white; padding: 3px 10px 3px 0; border-radius: 0 5px 5px 0;")}})("Widget launch"),(()=>{const t=[{name:DATA.facetTitleFontName,style:DATA.facetTitleFontStyle},{name:DATA.searchBarTitleFontName,style:DATA.searchBarTitleFontStyle},{name:DATA.searchBarInputFontName,style:DATA.searchBarInputFontStyle},{name:DATA.facetSectionTitleFontName,style:DATA.facetSectionTitleFontStyle},{name:DATA.searchResultNameFontName,style:DATA.searchResultNameFontStyle},{name:DATA.searchResultPriceFontName,style:DATA.searchResultPriceFontStyle}];for(const{name:e,style:a}of t){if(!e||"inherit"===e||!/otf|ttf/g.test(a))continue;const t=document.createElement("style"),s=a.match(q)?a.match(q)[1]:"";t.innerHTML=`@font-face { font-family: '${e}_${s}'; src: url('${a}'); font-display: swap; }`,document.head.appendChild(t)}})(),new Promise(s=>{r(t,()=>{const i=a(t),r=i.getRootNode();i.style.position="relative";const n=document.createElement("div");n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.right="0",n.style.bottom="0",n.style.backgroundColor="transparent",n.style.cursor="pointer",n.onclick=t=>{t?.preventDefault?.(),t?.stopPropagation?.(),new G({target:i,rootElement:r}).openSearchWidget()},i.appendChild(n),e()&&n.onclick(),s()})})})().then(()=>{})}();
1
+ !function(){"use strict";const t=()=>{let t;return window.ABTasty||window.ABTASTY_S?(window.ABTASTY_S?.USER?.accountIdentifier?.length?t=window.ABTASTY_S.USER.accountIdentifier:"function"==typeof window.ABTasty?.getAccountSettings?t=window.ABTasty.getAccountSettings().identifier:window.ABTasty?.accountSettings&&(t=window.ABTasty.accountSettings.identifier),t):t},e=()=>Object.prototype.hasOwnProperty.call(top,"ABTastyEditor"),a=t=>(t=>{if("string"!=typeof t||!t.trim().length)return null;const[e,a,s]=t.split("[]").map(t=>t.trim()),i=Boolean(s)?s:t,r=a?document.querySelector(e)?.[a]:document;return r?r.querySelector(i):null})(t),s=(t,e)=>{const s=document.querySelector("body")||document.documentElement,i={childList:!0,subtree:!0,attributes:!0},r=()=>n.disconnect(),n=new MutationObserver(()=>{const s=a(e);return s&&!r()&&t(s)});return{clear:r,observe:(t=s)=>n.observe(t,i)}},i=()=>{},r=(t,n)=>{const o=a(t),c={selector:t,clear:i,observe:i};if(o)return setTimeout(()=>n(o),0),c;if(e())return setTimeout(()=>r(t,n),1e3),c;if(t.includes("[]"))return((t,e)=>{const[i,r]=e.split("[]").map(t=>t.trim()),n=a(i),o=n?.[r],{clear:c,observe:l}=s(t,e),h=()=>{const s=a(e);return s&&!d()&&t(s)},d=()=>{c(),n?.removeEventListener("load",h)},b=()=>{l(o),"iframe"===n?.localName&&n.addEventListener("load",h)};return b(),{selector:e,clear:d,observe:b}})(n,t);const{clear:l,observe:h}=s(n,t);return h(),{selector:t,clear:l,observe:h}},n="https://ms-839f1388554f-19719.fra.meilisearch.io",o=`${n}/indexes/${DATA.meilisearchIndex||t()}/search`,c=`${n}/multi-search`,l=["hasbro","lego","mattel"],h={"Content-Type":"application/json",Authorization:"Bearer 1b3d6acfb9eac2780cd20a30ce8728a565960d213b0729b01d9b5e9fdcd3f77b"};function d(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function b(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?d(Object(a),!0).forEach(function(e){g(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):d(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function g(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const u=t=>{for(;t.firstChild;)t.removeChild(t.lastChild)},m=function(t,e){let a=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Object.entries(t).reduce((t,e)=>{let[s,i]=e;return t[s]&&(Array.isArray(t[s].values)?t[s]=b(b({},i),{},{values:t[s].values.map(t=>{let[e,s]=t;const r=i.values.find(t=>{let[a]=t;return a===e});return r?[e,r[1]]:[e,a?0:s]})}):t[s]=b(b({},i),{},{min:t[s].values.min,max:t[s].values.max})),t},b({},e))};class p{constructor(t){let{baseContainer:e,baseClassName:a,target:s,onInput:i,closeSearchWidget:r,resetSearch:n}=t;this.baseContainer=e,this.baseClassName=a,this.target=s,this.onInput=i,this.closeSearchWidget=r,this.resetSearch=n,this.inputId=`${this.baseClassName}-search-input`,this.searchBarContainer=this.getSearchBarContainer(),this.searchBarLabel=this.getSearchBarLabel(),this.searchBar=this.getSearchBar(),this.searchInput=this.getSearchInput(),this.renderSearchBar()}getSearchBarContainerHeight(){const t=this.target.closest("header");if(t){const e=t.getBoundingClientRect().height;return Math.max(e,150)+"px"}return"auto"}getCurrentSearchBarContainerHeight(){return this.searchBarContainer.getBoundingClientRect().height}resetSearchBarHeight(){this.searchBarContainer.style.minHeight=this.getSearchBarContainerHeight()}focusInput(){this.searchInput.focus()}resetInput(){this.searchInput.value=""}setResetIconVisibility(t){this.resetSearchBarButton.style.display=t?"block":"none"}getSearchBarContainer(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-bar-container`,t}getSearchBarLabel(){const{searchLabel:t}=DATA,e=document.createElement("label");return e.className=`${this.baseClassName}-search-input-label`,e.innerHTML=t,e.htmlFor=this.inputId,e}getSearchBarAndCloseButtonContainer(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-bar-close-button-container`,t}getSearchBar(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-bar`;const e=document.createElement("i");return e.className=`${this.baseClassName}-search-icon`,t.appendChild(e),t}getSearchInput(){const t=document.createElement("input");return t.id=this.inputId,t.className=`${this.baseClassName}-search-input`,t.oninput=this.onInput,t}getSearchCloseButton(){const t=document.createElement("button");t.className=`${this.baseClassName}-close-icon-container`,t.onclick=this.closeSearchWidget;const e=document.createElement("i");return e.className=`${this.baseClassName}-close-icon`,t.appendChild(e),t}renderSearchBar(){const t=document.createElement("button");t.className=`${this.baseClassName}-reset-search-bar`,t.onclick=this.resetSearch;const e=document.createElement("i");e.className=`${this.baseClassName}-close-icon`,t.appendChild(e),this.resetSearchBarButton=t,this.searchBar.appendChild(this.searchInput),this.searchBar.appendChild(this.resetSearchBarButton);const a=this.getSearchBarAndCloseButtonContainer();a.append(this.searchBar,this.getSearchCloseButton()),this.searchBarContainer.appendChild(a),this.baseContainer.appendChild(this.searchBarContainer)}}function f(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function w(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?f(Object(a),!0).forEach(function(e){y(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):f(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function y(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const v={text:"",filters:{},sort:["relevance"],page:0,totalPages:0,totalHits:0},x=function(){let t=w({},v);return w({get state(){return t},isNoFiltersAndNoSort:()=>0===Object.keys(t.filters).length&&"relevance"===t.sort[0]},{logState(e){JSON.parse(JSON.stringify(t))},setText(e){t.text=e,this.logState("setText")},setPage(e){t.page=e,this.logState("setPage")},setTotalPages(e){t.totalPages=e,this.logState("setTotalPages")},setTotalHits(e){t.totalHits=e,this.logState("setTotalHits")},setSort(e){t.sort=""===e?[]:[e],this.logState("setSort")},onFilterChange(e,a,s){t.page=0,void 0!==s.checked?this.updateFilterArray(e,a,s.checked):this.updateRangeFilter(e,s.min,s.max),this.logState("onFilterChange")},updateRangeFilter(e,a,s){t.filters[e]=[{operator:">=",value:a},{operator:"<=",value:s}],this.logState("updateRangeFilter")},removeRangeFilter(e){delete t.filters[e],this.logState("removeRangeFilter")},updateFilterArray(e,a,s){s?t.filters[e]=[...t.filters[e]||[],a]:(t.filters[e].length&&(t.filters[e]=t.filters[e].filter(t=>t!==a)),0===t.filters[e].length&&delete t.filters[e]),this.logState("updateFilterArray")},resetFiltersAndPagination(){this.resetFilters(),this.resetPagination(),this.logState("resetFiltersAndPagination")},resetFilters(){t.filters={},this.logState("resetFilters")},resetPagination(){t.page=0,t.totalPages=0,this.logState("resetPagination")},resetSort(){t.sort=["relevance"],this.logState("resetSort")},reset(){t=w({},v),this.logState("reset")}})}();class C{constructor(t){let{id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r}=t;this.id=e,this.facet=a,this.baseClassName=s,this.facetsListContainer=i,this.onFiltersChange=r,this.facetContentContainers=this.createFacetContainers(),this.facetsListContainer.insertBefore(this.facetContentContainers.facetContainer,this.facetsListContainer.lastChild)}createFacetContainers(){const{facetsTranslationKeys:t}=DATA,e=t?JSON.parse(t):{},a=`${(s=this.facet.title).charAt(0).toUpperCase()}${s.slice(1)}`;var s;const i=e[a]??a,r=document.createElement("details");r.className=`${this.baseClassName}-search-facet`,r.open=!0;const n=document.createElement("summary");n.innerHTML=`\n\t\t\t<span>${i}</span>\n\t\t\t<div class="${this.baseClassName}-search-facet-arrow">\n <svg width="14" height="8" viewBox="0 0 14 8" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M1.04951 7.55342C0.837905 7.44427 0.664506 7.23215 0.599514 7.00293C0.581178 6.93825 0.572874 6.8248 0.579306 6.72657C0.601746 6.38349 0.419705 6.58327 3.63323 3.37487C6.89349 0.119802 6.61624 0.367433 7.00022 0.367433C7.38419 0.367433 7.10695 0.119802 10.3672 3.37487C13.6501 6.65253 13.4202 6.39573 13.4202 6.78523C13.4202 6.96849 13.4118 7.00722 13.3413 7.15046C13.1287 7.58246 12.6239 7.75732 12.1892 7.54958C12.1021 7.50794 11.4956 6.91619 9.53822 4.96288L7.00022 2.43019L4.46222 4.96288C2.50749 6.91353 1.8983 7.50796 1.81149 7.54946C1.57821 7.66094 1.26117 7.66257 1.04951 7.55342Z" fill="%232A2A3C"/>\n </svg>\n </div>\n\t\t`;const o=document.createElement("div");return o.className=`${this.baseClassName}-search-facet-content ${this.facet.type}-facet`,r.append(n,o),{facetContainer:r,facetContent:o}}getFacetContainers(){return this.facetContentContainers}}class S extends C{constructor(t){let{id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r}=t;super({id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r});const{facetContent:n,facetContainer:o}=this.getFacetContainers();this.facetContent=n,this.facetContainer=o,this.facetList=this.getFacetListElement(),this.onFiltersChange=r,this.showAll=!1,this.facetContent.append(this.facetList)}createFacetContent(){const t=this.facet.values.sort((t,e)=>{let[a,s]=t,[i,r]=e;const n=(x.state.filters[this.facet.title]||[]).includes(a),o=(x.state.filters[this.facet.title]||[]).includes(i);return n===o?r-s:o-n}),e=this.showAll?t:t.slice(0,10),a=[];for(const[t,s]of e){const e=this.getFacetListItemElement({name:t,count:s});a.push(e)}if(this.facetList.append(...a),this.facet.values.length>10){const t=document.createElement("button");t.className=`${this.baseClassName}-search-facet-show-more`,t.innerHTML="See "+(this.showAll?"less":"more"),t.onclick=()=>{this.showAll=!this.showAll,this.updateFacetContent()},this.facetList.append(t)}}getFacetListElement(){return document.createElement("ul")}getFacetListItemElement(t){const{name:e,count:a}=t,s=document.createElement("li");s.className=`${this.baseClassName}-search-facet-list-item`,s.id=`${this.baseClassName}-search-facet-list-item-${e.replace(" ","-").toLowerCase()}`;const i=(x.state.filters[this.facet.title]||[]).includes(e),r=document.createElement("label");r.className=`${this.baseClassName}-search-facet-checkbox-container ${i||0!==a?"":"disabled"} ${i?"checked":""}`,r.innerHTML=`${e} (${a})`;const n=document.createElement("span");n.className=`${this.baseClassName}-search-facet-checkbox-checkmark`;const o=document.createElement("input");return o.disabled=!i&&0===a,o.checked=i,o.type="checkbox",o.onclick=()=>{const t=o.checked;this.onFiltersChange({facetType:"list",facetKey:this.facet.title,facetValue:e,options:{checked:t}})},r.appendChild(o),r.appendChild(n),s.appendChild(r),s}updateFacetContent(){u(this.facetList),0!==this.facet.values.length&&this.createFacetContent()}updateFacet(t){this.facet={title:this.facet.title,type:this.facet.type,values:t.values},this.showAll=!1,this.updateFacetContent()}}class k{constructor(t){let{baseClassName:e,currentRange:a,min:s,max:i,onRangeChange:r}=t;this.baseClassName=e,this.currentRange=a||{min:s,max:i},this.min=s,this.max=i,this.onRangeChange=r}render(){const t=document.createElement("div");t.className=`${this.baseClassName}-range-slider`;const e=document.createElement("div");e.className="range-progress";const a=document.createElement("div");a.className="steps-container";for(let t=0;t<20;t++){const t=document.createElement("div");t.className="step-bar",a.appendChild(t)}const s=document.createElement("div");s.className="range-handle";const i=document.createElement("div");i.className="range-handle-value",s.appendChild(i);const r=document.createElement("div");r.className="range-handle";const n=document.createElement("div");n.className="range-handle-value",r.appendChild(n);const o=document.createElement("div");if(o.className=`${this.baseClassName}-range-values`,this.min===this.max)return s.style.left="0%",r.style.left="100%",e.style.left="0%",e.style.width="100%",s.style.pointerEvents="none",r.style.pointerEvents="none",i.textContent=this.min,n.textContent=this.max,o.innerHTML=`\n\t\t\t\t<span>${this.min}</span>\n\t\t\t\t<span>${this.max}</span>\n\t\t\t`,t.append(a,e,s,r),{rangeContainer:t,valuesContainer:o};const c=(this.currentRange.min-this.min)/(this.max-this.min)*100,l=(this.currentRange.max-this.min)/(this.max-this.min)*100;s.style.left=`${c}%`,r.style.left=`${l}%`,e.style.left=`${c}%`,e.style.width=l-c+"%",i.textContent=this.currentRange.min,n.textContent=this.currentRange.max,o.innerHTML=`\n\t\t\t<span>${this.currentRange.min}</span>\n\t\t\t<span>${this.currentRange.max}</span>\n\t\t`,t.append(a,e,s,r);let h=!1,d=null,b=0,g=0;const u=()=>{const t=parseFloat(s.style.left),e=parseFloat(r.style.left),a=(this.min+t/100*(this.max-this.min)).toFixed(2),o=(this.min+e/100*(this.max-this.min)).toFixed(2);return i.textContent=a,n.textContent=o,{minValue:a,maxValue:o}},m=t=>{t.preventDefault(),h=!0,d=t.target.closest(".range-handle"),b=t.clientX,g=parseFloat(d.style.left)},p=a=>{if(!h)return;a.preventDefault();const i=a.clientX-b,n=t.offsetWidth;let o=g+i/n*100;o=d===s?Math.max(0,Math.min(o,parseFloat(r.style.left))):Math.max(parseFloat(s.style.left),Math.min(o,100));const c=100/19;o=Math.round(o/c)*c,d.style.left=`${o}%`,(()=>{const t=parseFloat(s.style.left),a=parseFloat(r.style.left);e.style.left=`${t}%`,e.style.width=a-t+"%"})(),u()},f=()=>{if(!h)return;h=!1,d=null;const{minValue:t,maxValue:e}=u();this.currentRange={min:t,max:e},this.onRangeChange(this.currentRange)};return[s,r].forEach(t=>{t.addEventListener("mousedown",m),document.addEventListener("mousemove",p),document.addEventListener("mouseup",f)}),{rangeContainer:t,valuesContainer:o}}}class N extends C{constructor(t){let{id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r}=t;super({id:e,facet:a,baseClassName:s,facetsListContainer:i,onFiltersChange:r});const{facetContent:n,facetContainer:o}=this.getFacetContainers();this.facetContent=n,this.facetContainer=o,this.onFiltersChange=r,this.filterRange=new k({baseClassName:this.baseClassName,currentRange:{min:this.facet.values.min,max:this.facet.values.max},min:this.facet.values.min,max:this.facet.values.max,onRangeChange:t=>{this.onFiltersChange({facetType:"range",facetKey:this.facet.title,options:t})}})}createFacetContent(){const{rangeContainer:t,valuesContainer:e}=this.filterRange.render();this.facetContent.append(t,e)}updateFacetContent(){u(this.facetContent),void 0!==this.facet.values.min&&void 0!==this.facet.values.max&&(this.filterRange=new k({baseClassName:this.baseClassName,currentRange:{min:this.facet.values.min,max:this.facet.values.max},min:this.facet.values.min,max:this.facet.values.max,onRangeChange:t=>{this.onFiltersChange({facetType:"range",facetKey:this.facet.title,options:t})}}),this.createFacetContent())}updateFacet(t){this.facet={title:this.facet.title,type:this.facet.type,values:t.values},this.updateFacetContent()}}class E{constructor(t){let{baseClassName:e,sortOptions:a,onSortChange:s}=t;this.baseClassName=e,this.onSortChange=s,this.sortOptions=a,this.element=this.getSortFacetElement()}getSortOptionsElements(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-sort-options`;for(const e of this.sortOptions){const a=document.createElement("button");a.classList.add(`${this.baseClassName}-search-sort-option`),(""===e.value&&0===x.state.sort.length||x.state.sort.includes(e.value))&&(a.classList.add("active"),a.disabled=!0),a.innerHTML=e.label,a.dataset.value=e.value,a.onclick=()=>this.onSortChange(e.value),t.appendChild(a)}return t}getSortFacetElement(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-sort-facet`;const e=document.createElement("label");return e.className=`${this.baseClassName}-search-sort-label`,e.textContent="Sort by:",t.appendChild(e),t.appendChild(this.getSortOptionsElements()),t}update(t){this.element.querySelectorAll(".active").forEach(t=>{t.classList.remove("active"),t.disabled=!1});const e=this.element.querySelector(`[data-value="${t[0]||"relevance"}"]`);e&&(e.classList.add("active"),e.disabled=!0)}}class F{constructor(t){let{baseClassName:e,infos:a}=t;this.baseClassName=e,this.infos=a,this.element=this.getInfosElement()}getInfosElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-infos`,t.style.whiteSpace="nowrap",t.innerHTML=`\n\t\t\t<span><strong>${this.infos.totalHits}</strong> Results found</span>\n\t\t`,t}updateInfos(t){this.infos=t,this.element.innerHTML=`\n\t\t\t<span><strong>${this.infos.totalHits}</strong> Results found</span>\n\t\t`}}function A(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function R(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?A(Object(a),!0).forEach(function(e){L(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):A(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function L(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const T={results:[],facets:{},selectedFacets:{}},$=(()=>{let t=R({},T);return R({get state(){return t}},{logState(e){JSON.parse(JSON.stringify(t))},addResults(e){t.results=[...t.results,...e.sort((t,e)=>((t,e)=>{const a=t.toLowerCase(),s=e.toLowerCase();return l.some(t=>a.includes(t))&&!l.some(t=>s.includes(t))?-1:l.some(t=>s.includes(t))&&!l.some(t=>a.includes(t))?1:0})(t.name,e.name))],this.logState("addResults")},setFacets(e){t.facets=e,this.logState("setFacets")},addRangeToSelectedFacets(e,a){t.selectedFacets[e]={type:a.type,values:a.values},this.logState("addRangeToSelectedFacets")},addListToSelectedFacets(e,a){if(a){const s=a.values[0],i=a.values[1],r=t.selectedFacets[e];if(r){const t=r.values.findIndex(t=>{let[e]=t;return e===s});t>-1?r.values[t]=[s,r.values[t][1]+i]:r.values.push([s,i])}else t.selectedFacets[e]={type:a.type,values:[[s,i]]}}this.logState("addListToSelectedFacets")},removeSelectedFacet(e,a){const s=t.selectedFacets[e];s&&(Array.isArray(s.values)?s.values=s.values.filter(t=>{let[e]=t;return e!==a}):s.values=[]),0===s.values.length&&delete t.selectedFacets[e],this.logState("removeSelectedFacet")},updateSelectedFacets(e){const a=m(e,t.selectedFacets,!0);t.selectedFacets=a,this.logState("updateSelectedFacets")},updateFacets(e){t.facets=m(e,t.facets,!0),this.logState("updateFacets")},setSelectedFacets(e){t.selectedFacets=e,this.logState("setSelectedFacets")},clearResults(){t.results=[],this.logState("clearResults")},reset(){t=R({},T),this.logState("reset")}})})();class O{constructor(t){let{baseClassName:e,baseContainer:a,searchBar:s,onFiltersChange:i,onFiltersReset:r,onSortChange:n,sortOptions:o}=t;this.baseClassName=e,this.baseContainer=a,this.searchBar=s,this.onFiltersChange=i,this.onFiltersReset=r,this.onSortChange=n,this.sortOptions=o,this.facets=[],this.facetsListContainer=this.getFacetsListContainer()}setMaxHeight(t){this.facetsListContainer.style.maxHeight=t}getFacetsListContainer(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-facets-list`;const e=document.createElement("button");e.className=`${this.baseClassName}-search-facets-list-close-button`,e.onclick=this.closeFilters.bind(this);const a=document.createElement("i");a.className=`${this.baseClassName}-close-icon`,e.appendChild(a),this.sortFacet=new E({baseClassName:this.baseClassName,sortOptions:this.sortOptions,onSortChange:this.onSortChange});const s=document.createElement("div");s.className=`${this.baseClassName}-search-facets-list-bottom-buttons-container`;const i=document.createElement("button");i.className=`${this.baseClassName}-search-facets-list-reset-button`,i.innerHTML="Clear results",i.onclick=this.onFiltersReset.bind(this);const r=document.createElement("div");r.className=`${this.baseClassName}-search-facets-list-header`,this.searchInfos=new F({baseClassName:this.baseClassName,infos:{totalHits:x.state.totalHits}});const n=document.createElement("button");return n.className=`${this.baseClassName}-search-facets-list-bottom-close-button`,n.innerHTML="Show results",n.onclick=this.closeFilters.bind(this),r.append(this.searchInfos.element,e),s.append(i,n),t.append(r,this.sortFacet.element,s),t}renderFacets(t){[...this.facetsListContainer.children].forEach(t=>{t.tagName.toLowerCase()==="details".toLowerCase()&&t.parentNode.removeChild(t)}),this.facets=[];for(const[e,a]of Object.entries(t)){if(0===a.values.length||1===a.values.length)continue;const t={id:e,facet:{title:e,values:a.values,type:a.type},baseClassName:this.baseClassName,facetsListContainer:this.facetsListContainer,onFiltersChange:this.onFiltersChange},s=new("range"===a.type?N:S)(t);this.facets.push(s)}this.facets.forEach(t=>{t.createFacetContent()}),this.baseContainer.appendChild(this.facetsListContainer)}updateRangeFacets(t){this.facets.filter(t=>t instanceof N).forEach(e=>{e.updateFacet(t[e.id])})}updateListFacets(t){this.facets.filter(t=>t instanceof S).forEach(e=>{e.updateFacet(t[e.id])})}updateFacets(t){this.updateRangeFacets(t),this.updateListFacets(t)}openFilters(){const t=this.baseContainer.parentElement,e=document.createElement("div");e.className=`${this.baseClassName}-search-facets-list-overlay`,e.onclick=this.closeFilters.bind(this),t.insertAdjacentElement("afterbegin",e),this.facetsListContainer.classList.add("open")}closeFilters(){this.facetsListContainer.classList.remove("open");const t=this.baseContainer.parentElement.firstChild;this.baseContainer.parentElement.removeChild(t)}}class j{constructor(t){let{result:e,index:a,baseClassName:s}=t;this.result=e,this.index=a,this.baseClassName=s}getSearchResultElement(){const t=document.createElement("a");return t.className=`${this.baseClassName}-search-result-container`,t.href=this.result.link,t.target="_blank",t.rel="noreferrer",t.innerHTML=[`<div class="${this.baseClassName}-search-result result-${this.index}">`,`<img loading="lazy" src="${this.result.img_link}" />`,"<div>",`<div class="${this.baseClassName}-search-result-name">${this.result.name}</div>`,this.result.brand?`<div class="${this.baseClassName}-search-result-brand">${this.result.brand}</div>`:"",`<div class="${this.baseClassName}-search-result-price">${this.result.price}€</div>`,"</div>","</div>"].join("\n"),t}}class I{constructor(t){let{baseClassName:e,sortOptions:a,infos:s,onSortChange:i,openFilters:r}=t;this.baseClassName=e,this.onSortChange=i,this.sortOptions=a,this.infos=s,this.openFilters=r,this.searchInfos=new F({baseClassName:e,infos:s}),this.sortLabelElement=this.getSortLabelElement(),this.sortSelectElement=this.getSortSelectElement(),this.sortAndFiltersButtonElement=this.getSortAndFiltersButtonElement(),this.infosAndSortContainer=this.getInfoAndSortContainerElement(),this.infosAndSortContainer.appendChild(this.searchInfos.element),this.infosAndSortContainer.appendChild(this.sortAndFiltersButtonElement),this.setSortOptions()}getInfoAndSortContainerElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-info-and-sort`,t}getSortLabelElement(){const t=document.createElement("label");return t.className=`${this.baseClassName}-search-sort-label`,t.textContent="Sort by:",t.htmlFor=`${this.baseClassName}-search-sort-select`,t}getSortSelectElement(){const t=document.createElement("select");return t.className=`${this.baseClassName}-search-sort-select`,t.id=`${this.baseClassName}-search-sort-select`,t.name=`${this.baseClassName}-search-sort-select`,t.onchange=this.handleSortChange.bind(this),t}getSortElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-sort`,t.appendChild(this.sortLabelElement),t.appendChild(this.sortSelectElement),t}getFiltersButtonElement(){const t=document.createElement("button");t.className=`${this.baseClassName}-search-filters-button`;const e=document.createElement("i");e.className=`${this.baseClassName}-search-filters-button-icon`;const a=document.createElement("span");return a.className=`${this.baseClassName}-search-filters-button-text`,a.textContent="Filters",t.append(e,a),t.onclick=this.openFilters.bind(this),this.filtersButtonTextElement=a,t}getSortAndFiltersButtonElement(){const t=document.createElement("div");t.className=`${this.baseClassName}-search-sort-and-filters-button-container`;const e=this.getSortElement();return this.filtersButtonElement=this.getFiltersButtonElement(),t.appendChild(e),t.appendChild(this.filtersButtonElement),t}setSortOptions(){this.sortSelectElement.childElementCount&&removeChildren(this.sortSelectElement);for(const t of this.sortOptions){const e=document.createElement("option");e.value=t.value,e.textContent=t.label,this.sortSelectElement.appendChild(e)}}handleSortChange(t){const e=t.target.value;this.onSortChange(e)}updateSort(t){this.sortSelectElement.value=t[0]||"relevance"}updateSortOptions(t){this.sortOptions=t,this.setSortOptions()}updateFiltersInfo(t){let e=0;for(const a of Object.values(t))"object"==typeof a[0]?e++:e+=a.length;e?(this.filtersButtonElement.classList.add("active"),this.filtersButtonTextElement.textContent=`${e} Filter${e>1?"s":""}`):(this.filtersButtonElement.classList.remove("active"),this.filtersButtonTextElement.textContent="Filters")}}class P{hasTriggeredSeeMore=!1;constructor(t){let{baseContainer:e,baseClassName:a,searchBar:s,onFiltersChange:i,onSortChange:r,onSeeMore:n,onFiltersReset:o}=t;this.baseContainer=e,this.baseClassName=a,this.searchBar=s,this.onFiltersChange=i,this.onSortChange=r,this.onSeeMore=n,this.onFiltersReset=o,this.sortOptions=[{value:"relevance",label:"Relevance"},{value:"price:asc",label:"↑ Price"},{value:"price:desc",label:"↓ Price"}],this.searchResultContainer=this.getSearchResultContainerElement(),this.searchResultListContainer=this.getSearchResultListContainerElement(),this.searchResultList=this.getSearchResultListElement(),this.facetsList=new O({searchBar:this.searchBar,baseContainer:this.searchResultContainer,baseClassName:this.baseClassName,onFiltersChange:this.onFiltersChange,onFiltersReset:this.onFiltersReset,onSortChange:this.onSortChange,sortOptions:this.sortOptions}),this.infoAndSort=new I({baseClassName:this.baseClassName,infos:{totalHits:x.state.totalHits},sortOptions:this.sortOptions,onSortChange:this.onSortChange,openFilters:this.openFilters.bind(this)}),new MutationObserver(this.mutationCallback.bind(this)).observe(this.searchResultContainer,{childList:!0})}mutationCallback(t){for(const e of t)if("childList"===e.type)if(!e.target.childNodes.length||"0px"!==this.searchResultContainer.style.maxHeight&&""!==this.searchResultContainer.style.maxHeight)0===e.target.childNodes.length&&(this.searchResultListContainer.style.maxHeight="0px",this.facetsList.setMaxHeight("0px"));else{const t=`calc(100vh - ${this.searchBar.getCurrentSearchBarContainerHeight()||0}px)`;this.searchResultListContainer.style.maxHeight=t,this.facetsList.setMaxHeight(t)}}scrollToTop(){this.searchResultList.scrollTop=0}openFilters(){this.facetsList.openFilters()}clearSearchResults(){u(this.searchResultList),u(this.searchResultListContainer),u(this.searchResultContainer),this.searchResultContainer.classList.remove("visible","no-results")}getSearchResultContainerElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-result-container`,t.addEventListener("scroll",t=>{const e=t.target.scrollTop+t.target.clientHeight>=t.target.scrollHeight-500;!this.hasTriggeredSeeMore&&e&&x.state.page+1<x.state.totalPages&&(this.hasTriggeredSeeMore=!0,this.onSeeMore())}),t}getSearchResultListContainerElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-result-list-container`,t}getSearchResultListElement(){const t=document.createElement("div");return t.className=`${this.baseClassName}-search-result-list`,t}updateSearchResults(t){if(u(this.searchResultList),this.searchResultContainer.classList.remove("no-results"),this.infoAndSort.searchInfos.updateInfos({totalHits:x.state.totalHits}),this.facetsList.searchInfos.updateInfos({totalHits:x.state.totalHits}),t.length)for(const[e,a]of t.entries()){const t=new j({result:a,index:e,searchResultContainer:this.searchResultList,baseClassName:this.baseClassName});this.searchResultList.appendChild(t.getSearchResultElement())}else{const t=document.createElement("div");t.className=`${this.baseClassName}-search-no-result`,t.innerHTML="No results found",this.searchResultContainer.classList.add("no-results"),this.searchResultList.appendChild(t)}this.hasTriggeredSeeMore=!1}renderSearchResults(t,e){if(this.baseContainer.classList.add("search-completed"),this.clearSearchResults(),this.infoAndSort.searchInfos.updateInfos({totalHits:x.state.totalHits}),this.facetsList.searchInfos.updateInfos({totalHits:x.state.totalHits}),t.length){this.facetsList.renderFacets(e);for(const[e,a]of t.entries()){const t=new j({result:a,index:e,searchResultContainer:this.searchResultList,baseClassName:this.baseClassName});this.searchResultList.appendChild(t.getSearchResultElement())}this.searchResultListContainer.appendChild(this.infoAndSort.infosAndSortContainer),this.searchResultListContainer.appendChild(this.searchResultList),this.searchResultContainer.appendChild(this.searchResultListContainer),this.baseContainer.appendChild(this.searchResultContainer)}else{const t=document.createElement("div");t.className=`${this.baseClassName}-search-no-result`,t.innerHTML="No results found",this.searchResultContainer.classList.add("no-results"),this.searchResultContainer.appendChild(t)}this.searchResultContainer.classList.add("visible"),this.baseContainer.appendChild(this.searchResultContainer),this.hasTriggeredSeeMore=!1}}function B(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}return a}function M(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?B(Object(a),!0).forEach(function(e){D(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):B(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function D(t,e,a){return(e=function(t){var e=function(t){if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var a=e.call(t,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const H=function(t){let e=[];for(const a in t){const s=t[a];if(Array.isArray(s))if("object"==typeof s[0]){const t=s.map(t=>`${a} ${t.operator} ${t.value}`);e.push(`(${t.join(" AND ")})`)}else{const t=s.map(t=>`"${a}" = "${t}"`);e.push(`(${t.join(" OR ")})`)}}return e.join(" AND ")},z=function(t){const{facetDistribution:e,facetStats:a}=t;let s={};for(const t in e)a&&a[t]?s[t]={type:"range",values:{min:a[t].min,max:a[t].max}}:s[t]={type:"list",values:Object.entries(e[t])};return s},W=t=>{const e=DATA.language,a=[];for(const s of t){let t=s.title,i=s.link;e&&(s.localized_title&&(t=JSON.parse(s.localized_title)[e]??s.title),s.localized_link&&(i=JSON.parse(s.localized_link)[e]??s.link)),i&&s.img_link&&s.price&&a.push({name:t,link:i,img_link:s.img_link,price:s.price,category:s.category,brand:s.brand})}return a},Z=t=>{let{text:e,filters:a,sort:s,page:i}=t;return JSON.stringify({q:e,filter:H(a),facets:["*"],hitsPerPage:50,page:i+1,sort:"relevance"===s[0]?[]:s})},_=t=>({hits:W(t.hits),facets:z(t),page:t.page,totalPages:t.totalPages,totalHits:t.totalHits}),q=/.+\/([^.]+)\.(otf|ttf)$/,J=(t,e)=>t&&"inherit"!==t?`font-family:${t}_${e.match(q)?e.match(q)[1]:""};`:e||"",V=()=>{const{primaryColor:t,secondaryColor:e,tertiaryColor:a,searchBarTitleAlign:s,searchBarTitleFontName:i,searchBarTitleFontSize:r,searchBarTitleFontStyle:n,searchBarTitleCustomFontColor:o,searchBarTitleTextColor:c,searchBarInputAlign:l,searchBarInputFontName:h,searchBarInputFontSize:d,searchBarInputFontStyle:b,searchBarInputCustomFontColor:g,searchBarInputTextColor:u}=DATA;return["div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-container {",`border-bottom-color: ${t};`,"}","div.abtasty-search-widget-container i.abtasty-search-widget-close-icon {",`background-color: ${t};`,"}","div.abtasty-search-widget-container label.abtasty-search-widget-search-input-label {",`text-align: ${s};`,J(i,n),`font-size: ${r}px;`,`color: ${o?c:e};`,"}","div.abtasty-search-widget-container input.abtasty-search-widget-search-input {",`text-align: ${l};`,J(h,b),`font-size: ${d}px;`,`color: ${g?u:a};`,"}"].join("")},X=()=>{const{primaryColor:t,secondaryColor:e,tertiaryColor:a,facetSectionTitleAlign:s,facetSectionTitleFontName:i,facetSectionTitleFontSize:r,facetSectionTitleFontStyle:n,facetSectionTitleCustomFontColor:o,facetSectionTitleTextColor:c,facetTitleAlign:l,facetTitleFontName:h,facetTitleFontSize:d,facetTitleFontStyle:b,facetTitleCustomFontColor:g,facetTitleTextColor:u}=DATA;return["div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary {",`text-align: ${s};`,J(i,n),`font-size: ${r}px;`,`color: ${o?c:t};`,"}","div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container {",`text-align: ${l};`,J(h,b),`font-size: ${d}px;`,`color: ${g?u:a};`,"}","div.abtasty-search-widget-container button.abtasty-search-widget-search-facet-show-more {",`color: ${t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-range-slider {",`background-color: ${e};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button,","div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-progress {",`background-color: ${t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button {",`background-color: ${t};`,`color: ${e};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-range-values {",`color: ${a};`,"}"].join("")},U=()=>{const{primaryColor:t,tertiaryColor:e,searchResultNameAlign:a,searchResultNameFontName:s,searchResultNameFontSize:i,searchResultNameFontStyle:r,searchResultNameCustomFontColor:n,searchResultNameTextColor:o,searchResultPriceAlign:c,searchResultPriceFontName:l,searchResultPriceFontSize:h,searchResultPriceFontStyle:d,searchResultPriceCustomFontColor:b,searchResultPriceTextColor:g}=DATA;return["div.abtasty-search-widget-container div.abtasty-search-widget-search-result-name {",`text-align: ${a};`,J(s,r),`font-size: ${i}px;`,`color: ${n?o:t};`,"}","div.abtasty-search-widget-container div.abtasty-search-widget-search-result-price {",`text-align: ${c};`,J(l,d),`font-size: ${h}px;`,`color: ${b?g:e};`,"}"].join("")};class G{constructor(t){let{target:e,rootElement:a}=t;this.baseClassName="abtasty-search-widget",this.target=e,this.rootElement=a,this.searchOpen=!1,this.searchWidgetContainer=this.getSearchWidgetContainerElement(),this.searchBar=new p({baseContainer:this.searchWidgetContainer,baseClassName:this.baseClassName,target:this.target,onInput:this.debouncedOnInput.bind(this),closeSearchWidget:this.closeSearchWidget.bind(this),resetSearch:this.onSearchReset.bind(this)}),this.searchResultsList=new P({baseClassName:this.baseClassName,baseContainer:this.searchWidgetContainer,searchBar:this.searchBar,onFiltersChange:this.onFiltersChange.bind(this),onSeeMore:this.onSeeMore.bind(this),onSortChange:this.onSortChange.bind(this),onFiltersReset:this.onFiltersReset.bind(this)})}insertIn(t,e){t.insertAdjacentElement(e,this.searchWidgetContainer)}remove(){this.rootElement.querySelector("body").removeChild(this.searchWidgetContainer)}openSearchWidget(){if(this.searchOpen)return;const t=this.rootElement.querySelector("body");this.rootElement.querySelector("html").classList.add("search-open"),this.insertIn(t,"afterbegin"),this.searchBar.focusInput(),this.searchOpen=!0}closeSearchWidget(){this.rootElement.querySelector("html").classList.remove("search-open"),this.searchOpen=!1,this.remove()}onSearchReset=()=>{x.reset(),$.reset(),this.searchResultsList.clearSearchResults(),this.searchBar.resetInput(),this.searchBar.setResetIconVisibility(!1),this.searchBar.focusInput()};onFiltersReset=()=>{x.isNoFiltersAndNoSort()||(x.resetFiltersAndPagination(),x.resetSort(),this.searchResultsList.infoAndSort.updateFiltersInfo({}),this.onSearch())};onFiltersChange=t=>{let{facetType:e,facetKey:a,facetValue:s,options:i}=t;"range"===e?this.onRangeChange(a,i.min,i.max):this.onListCheckboxChange(a,s,i.checked)};onSortChange=async t=>{x.setPage(0),$.clearResults(),x.setSort(t),this.searchResultsList.scrollToTop();const e=await(async()=>{try{const t=await fetch(o,{method:"POST",headers:h,body:Z(x.state)}),e=await t.json();return{results:_(e).hits}}catch(t){return window.console.error(t),{results:[]}}})();if(!e)return;const{results:a}=e;$.addResults(a),this.searchResultsList.updateSearchResults($.state.results),this.searchResultsList.facetsList.sortFacet.update(x.state.sort),this.searchResultsList.infoAndSort.updateSort(x.state.sort)};onRangeChange=async(t,e,a)=>{x.resetPagination(),$.clearResults();const{min:s,max:i}=$.state.facets[t]?.values,r=s===Number(e)&&i===Number(a);r?x.removeRangeFilter(t):x.updateRangeFilter(t,e,a);const n=await this.onSearchWithFilters();if(!n)return;const{results:o,facets:c,totalPages:l,totalHits:h}=n;$.addResults(o),c[t]&&delete c[t],$.updateFacets(c),r?$.removeSelectedFacet(t):$.addRangeToSelectedFacets(t,{type:"range",values:{min:e,max:a}}),x.setTotalPages(l),x.setTotalHits(h),this.searchResultsList.updateSearchResults($.state.results),this.searchResultsList.facetsList.updateListFacets($.state.facets),this.searchResultsList.infoAndSort.updateFiltersInfo(x.state.filters)};onListCheckboxChange=async(t,e,a)=>{x.resetPagination(),$.clearResults(),x.updateFilterArray(t,e,a);const s=await this.onSearchWithFilters();if(!s)return;const{results:i,facets:r,totalPages:n,totalHits:o}=s;if($.addResults(i),$.updateFacets(r),a){const a=r[t]?.values.find(t=>{let[a]=t;return a===e});$.addListToSelectedFacets(t,{type:"list",values:a||[e,0]})}else $.removeSelectedFacet(t,e);x.setTotalPages(n),x.setTotalHits(o),this.searchResultsList.updateSearchResults($.state.results),this.searchResultsList.facetsList.updateFacets($.state.facets),this.searchResultsList.infoAndSort.updateFiltersInfo(x.state.filters)};onInput=t=>{x.setText(t.target.value),t.target.value.length?(this.searchBar.setResetIconVisibility(!0),(Object.keys(x.state.filters).length||x.state.page>0)&&x.resetFiltersAndPagination(),this.onSearch()):(this.searchWidgetContainer.classList.remove("search-completed"),this.searchResultsList.clearSearchResults(),this.searchBar.setResetIconVisibility(!1))};onSeeMore=async()=>{x.setPage(x.state.page+1);const t=await(async()=>{try{const t=await fetch(o,{method:"POST",headers:h,body:Z(x.state)}),e=await t.json(),a=_(e);return{results:a.hits,totalPages:a.totalPages}}catch(t){return window.console.error(t),null}})();if(!t)return;const{results:e,totalPages:a}=t;$.addResults(e),x.setTotalPages(a),this.searchResultsList.updateSearchResults($.state.results)};async onSearchWithFilters(){const{text:e}=x.state;return this.searchResultsList.scrollToTop(),e?await(async()=>{const e=(t=>{const e=[],{text:a,filters:s,page:i,sort:r}=x.state;return e.push({indexUid:t,q:a,filter:H(s),hitsPerPage:50,page:i+1,sort:"relevance"===r[0]?[]:r}),Object.entries($.state.facets).forEach(i=>{let[r]=i;const n=M({},s);delete n[r],e.push({indexUid:t,q:a,filter:H(n),facets:[r],hitsPerPage:0})}),JSON.stringify({queries:e})})(DATA.meilisearchIndex||t());try{const t=await fetch(c,{method:"POST",headers:h,body:e}),a=(t=>{const{results:e}=t,a=e.slice(1).reduce((t,e)=>{const a=z(e);return M(M({},t),a)},{});return{hits:W(e[0].hits),facets:a,page:e[0].page,totalPages:e[0].totalPages,totalHits:e[0].totalHits}})(await t.json());return{results:a.hits,facets:a.facets,totalPages:a.totalPages,page:a.page,totalHits:a.totalHits}}catch(t){return window.console.error(t),null}})():(this.searchWidgetContainer.classList.remove("search-completed"),null)}onSearch=async()=>{const{text:t}=x.state;if($.clearResults(),this.searchResultsList.scrollToTop(),t)try{const t=await(async()=>{try{const t=await fetch(o,{method:"POST",headers:h,body:Z(x.state)}),e=await t.json(),a=_(e);return{results:a.hits,facets:a.facets,totalPages:a.totalPages,page:a.page,totalHits:a.totalHits}}catch(t){return window.console.error(t),{results:[],facets:{},totalPages:0,page:0,totalHits:0}}})(),{results:e,facets:a,totalPages:s,totalHits:i}=t;$.addResults(e),$.setFacets(a),x.setTotalPages(s),x.setTotalHits(i),this.searchResultsList.renderSearchResults(e,a)}catch(t){window.console.error(t)}else this.searchWidgetContainer.classList.remove("search-completed")};debouncedOnInput=(()=>(t=>{let e=null;return function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];window.clearTimeout(e),e=window.setTimeout(()=>{t(...s)},150)}})(this.onInput.bind(this)))();getSearchWidgetContainerElement(){const t=document.createElement("div"),e=document.createElement("style");e.setAttribute("abtasty-script-added","true"),t.className=`${this.baseClassName}-container`;const[a,s,i]=[V(),U(),X()],r=document.createTextNode("html.search-open{height:100vh;overflow:hidden;padding:0}div.abtasty-search-widget-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:#fff;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:inherit;height:100vh;left:0;position:fixed;right:0;top:0;width:100vw;z-index:9999}div.abtasty-search-widget-container button:not(:disabled):hover{opacity:.5}div.abtasty-search-widget-container i{display:inline-block;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}div.abtasty-search-widget-container.search-completed{background-color:#fff}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;line-height:unset;margin-left:auto;margin-right:auto;max-width:1320px;padding:0 32px;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:#fff;border-bottom:1px solid #d8d8e2;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:24px 0;position:sticky;top:0}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;align-items:center;background-color:#fff;border:1px solid #a18cde;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-right:24px;padding:12px;width:100%}div.abtasty-search-widget-container label.abtasty-search-widget-search-input-label{color:#fff;font-size:16px;font-weight:700;line-height:17px;margin-left:auto;margin-right:auto;margin-top:auto}div.abtasty-search-widget-container input.abtasty-search-widget-search-input{border:unset;font-size:13px;font-weight:700;outline:0;padding:unset;width:100%}div.abtasty-search-widget-container button.abtasty-search-widget-reset-search-bar{background-color:#fff;border:none;cursor:pointer;display:none;padding:0}div.abtasty-search-widget-container button.abtasty-search-widget-reset-search-bar i.abtasty-search-widget-close-icon{background-color:#2a2a3c;height:14px;width:14px}div.abtasty-search-widget-container button.abtasty-search-widget-close-icon-container{background-color:#fff!important;border:none;border-radius:100%;cursor:pointer!important;padding:8px;vertical-align:middle}div.abtasty-search-widget-container i.abtasty-search-widget-close-icon{background-color:#d8d8e2;height:28px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512' fill='rgba(0, 0, 0, 0.999)'%3E%3Cpath d='M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25-6.2 6.25-14.4 9.35-22.6 9.35s-16.38-3.125-22.62-9.375L160 301.3 54.63 406.6C48.38 412.9 40.19 416 32 416s-16.37-3.1-22.625-9.4c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 512' fill='rgba(0, 0, 0, 0.999)'%3E%3Cpath d='M310.6 361.4c12.5 12.5 12.5 32.75 0 45.25-6.2 6.25-14.4 9.35-22.6 9.35s-16.38-3.125-22.62-9.375L160 301.3 54.63 406.6C48.38 412.9 40.19 416 32 416s-16.37-3.1-22.625-9.4c-12.5-12.5-12.5-32.75 0-45.25l105.4-105.4L9.375 150.6c-12.5-12.5-12.5-32.75 0-45.25s32.75-12.5 45.25 0L160 210.8l105.4-105.4c12.5-12.5 32.75-12.5 45.25 0s12.5 32.75 0 45.25l-105.4 105.4L310.6 361.4z'/%3E%3C/svg%3E\");vertical-align:middle;width:28px}div.abtasty-search-widget-container i.abtasty-search-widget-search-icon{background-color:#2a2a3c;height:15px;margin-right:6px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.48.545a6.397 6.397 0 0 0-2.315.615A6.463 6.463 0 0 0 1.16 4.165a6.41 6.41 0 0 0 4.28 9.005 6.668 6.668 0 0 0 2.392.116 6.434 6.434 0 0 0 3.096-1.332l.12-.095 1.768 1.764c1.932 1.927 1.815 1.82 2.028 1.843a.575.575 0 0 0 .622-.631c-.024-.206.074-.098-1.843-2.019l-1.765-1.768.072-.088a6.73 6.73 0 0 0 .791-1.255 6.23 6.23 0 0 0 .618-2.929 6.213 6.213 0 0 0-.749-2.86A6.407 6.407 0 0 0 6.48.546Zm.016 1.146A5.266 5.266 0 0 0 1.72 6.236a7.775 7.775 0 0 0-.024 1.174 5.267 5.267 0 0 0 8.2 3.885 5.296 5.296 0 0 0 2.154-3.087c.106-.426.148-.789.148-1.272 0-.5-.043-.854-.158-1.302a5.259 5.259 0 0 0-1.227-2.258 5.254 5.254 0 0 0-3.318-1.672c-.2-.021-.79-.029-.998-.013Z' fill='%232A2A3C'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='16' height='16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M6.48.545a6.397 6.397 0 0 0-2.315.615A6.463 6.463 0 0 0 1.16 4.165a6.41 6.41 0 0 0 4.28 9.005 6.668 6.668 0 0 0 2.392.116 6.434 6.434 0 0 0 3.096-1.332l.12-.095 1.768 1.764c1.932 1.927 1.815 1.82 2.028 1.843a.575.575 0 0 0 .622-.631c-.024-.206.074-.098-1.843-2.019l-1.765-1.768.072-.088a6.73 6.73 0 0 0 .791-1.255 6.23 6.23 0 0 0 .618-2.929 6.213 6.213 0 0 0-.749-2.86A6.407 6.407 0 0 0 6.48.546Zm.016 1.146A5.266 5.266 0 0 0 1.72 6.236a7.775 7.775 0 0 0-.024 1.174 5.267 5.267 0 0 0 8.2 3.885 5.296 5.296 0 0 0 2.154-3.087c.106-.426.148-.789.148-1.272 0-.5-.043-.854-.158-1.302a5.259 5.259 0 0 0-1.227-2.258 5.254 5.254 0 0 0-3.318-1.672c-.2-.021-.79-.029-.998-.013Z' fill='%232A2A3C'/%3E%3C/svg%3E\");width:15px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container{display:none;overflow-y:auto}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible{-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin-left:auto;margin-right:auto;max-width:1320px;padding:0 32px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-list-container{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-sizing:border-box;box-sizing:border-box;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;padding:32px 0 50px 32px}div.abtasty-search-widget-container div.abtasty-search-widget-search-info-and-sort{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort{-webkit-box-align:baseline;-ms-flex-align:baseline;align-items:baseline;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:13px;font-weight:400;position:relative}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort label.abtasty-search-widget-search-sort-label{color:#2a2a3c;margin-right:8px;white-space:nowrap}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort select{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;color:#2a2a3c;cursor:pointer;outline:none;padding-right:2.5em;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort:after{bottom:5%;content:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='10' height='6' fill='%232A2A3C' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.967.631a.617.617 0 0 1 .3.367.627.627 0 0 1 .014.184c-.015.229.106.096-2.036 2.235C5.07 5.587 5.256 5.422 5 5.422s-.071.165-2.244-2.005C.566 1.232.72 1.403.72 1.143A.41.41 0 0 1 .773.9.573.573 0 0 1 1.54.634c.058.027.462.422 1.767 1.724L5 4.047l1.692-1.689C7.995 1.058 8.402.661 8.46.634A.612.612 0 0 1 8.967.63Z'/%3E%3C/svg%3E\");pointer-events:none;position:absolute;right:16px;right:1rem}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-and-filters-button-container{-webkit-box-align:center;-ms-flex-align:center;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-pack:end;-ms-flex-pack:end;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;justify-content:end;width:100%}div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button{background-color:#fff;border:1px solid #d8d8e2;border-radius:4px;color:#2a2a3c;cursor:pointer;display:none;font-size:14px;font-weight:700;margin-left:12px;outline:none;padding:8px}div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button.active{color:#3100bf}div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button i.abtasty-search-widget-search-filters-button-icon{background-color:#2a2a3c;height:19px;margin-right:8px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='20' height='20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.19.688a.715.715 0 0 0-.473.96c.022.05 1.512 2.15 3.31 4.67l3.273 4.58.005 3.956.005 3.956.051.11a.86.86 0 0 0 .316.338.76.76 0 0 0 .59.032c.124-.052 4.2-2.78 4.26-2.85.03-.036.08-.112.109-.168l.054-.102.005-2.636.005-2.637 3.272-4.58c1.8-2.519 3.29-4.622 3.314-4.673a.6.6 0 0 0 .043-.264.5.5 0 0 0-.061-.3.7.7 0 0 0-.449-.388c-.096-.029-.923-.032-8.818-.03C3.188.663 1.268.669 1.19.688m1.603 1.437c.008.014 1.319 1.85 2.912 4.08s2.921 4.103 2.95 4.16l.055.105.005 3.407c.003 1.974.013 3.403.023 3.4s.585-.385 1.279-.847l1.261-.84.006-2.56.006-2.56.054-.105a407 407 0 0 1 2.95-4.16l2.913-4.08c.012-.02-1.434-.025-7.207-.025s-7.22.005-7.207.025' fill='%232A2A3C'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='20' height='20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M1.19.688a.715.715 0 0 0-.473.96c.022.05 1.512 2.15 3.31 4.67l3.273 4.58.005 3.956.005 3.956.051.11a.86.86 0 0 0 .316.338.76.76 0 0 0 .59.032c.124-.052 4.2-2.78 4.26-2.85.03-.036.08-.112.109-.168l.054-.102.005-2.636.005-2.637 3.272-4.58c1.8-2.519 3.29-4.622 3.314-4.673a.6.6 0 0 0 .043-.264.5.5 0 0 0-.061-.3.7.7 0 0 0-.449-.388c-.096-.029-.923-.032-8.818-.03C3.188.663 1.268.669 1.19.688m1.603 1.437c.008.014 1.319 1.85 2.912 4.08s2.921 4.103 2.95 4.16l.055.105.005 3.407c.003 1.974.013 3.403.023 3.4s.585-.385 1.279-.847l1.261-.84.006-2.56.006-2.56.054-.105a407 407 0 0 1 2.95-4.16l2.913-4.08c.012-.02-1.434-.025-7.207-.025s-7.22.005-7.207.025' fill='%232A2A3C'/%3E%3C/svg%3E\");width:19px}div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button.active i.abtasty-search-widget-search-filters-button-icon{background-color:#3100bf}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-list{display:grid;gap:24px;margin-top:16px;padding-bottom:50px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible.no-results div.abtasty-search-widget-search-result-list-container{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(3,minmax(0,1fr))}div.abtasty-search-widget-container div.abtasty-search-widget-search-no-result{font-size:38px;font-weight:700;margin-left:auto;margin-right:auto;margin-top:82px;text-align:center}div.abtasty-search-widget-container a.abtasty-search-widget-search-result-container{color:unset!important;text-decoration:none!important}div.abtasty-search-widget-container div.abtasty-search-widget-search-result{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:justify;-ms-flex-pack:justify;border:1px solid #d8d8e2;border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:400px;justify-content:space-between;padding:18px;width:auto}div.abtasty-search-widget-container div.abtasty-search-widget-search-result:hover{border-color:#a18cde}div.abtasty-search-widget-container div.abtasty-search-widget-search-result img{aspect-ratio:400/450;height:60%;margin-bottom:12px;margin-left:auto;margin-right:auto;-o-object-fit:contain;object-fit:contain;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-name{-webkit-line-clamp:3;-webkit-box-orient:vertical;color:#2a2a3c;display:-webkit-box;font-size:1em;font-weight:700;height:4.5em;line-height:1.5em;margin-bottom:8px;max-height:4.5em;min-height:4.5em;overflow:hidden;text-decoration:none!important}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-price{color:#2a2a3c;font-size:1.833em;font-weight:bolder;line-height:normal;margin-top:auto;text-decoration:none!important}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list{-webkit-box-sizing:border-box;box-sizing:border-box;min-width:240px;overflow-y:auto;overscroll-behavior:none;padding:16px 16px 50px 0;position:sticky;top:0}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-overlay{background-color:rgba(0,0,0,.5);bottom:0;display:none;left:0;position:absolute;right:0;top:0;z-index:1}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet{-webkit-box-orient:vertical;-webkit-box-direction:normal;background-color:#f3f3f7;display:none;-ms-flex-direction:column;flex-direction:column}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet label.abtasty-search-widget-search-sort-label{margin-left:16px;margin-top:16px;white-space:nowrap}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet div.abtasty-search-widget-search-sort-options{-webkit-box-orient:horizontal;-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:8px;padding:16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet button.abtasty-search-widget-search-sort-option{border:1px solid #d8d8e2;border-radius:50rem;padding:.2em .675em;white-space:nowrap}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet button.abtasty-search-widget-search-sort-option.active{background-color:#3100bf;color:#fff}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-header{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:none;-ms-flex-direction:row;flex-direction:row;justify-content:space-between;padding:16px 8px 16px 16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;border:none;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:auto;padding:8px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-bottom-buttons-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;background-color:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;gap:8px;padding:16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-reset-button{-webkit-box-pack:center;-ms-flex-pack:center;border:2px solid #3100bf;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;cursor:pointer;justify-content:center;padding:8px;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-reset-button{background-color:transparent;border:2px solid transparent;color:#d8d8e2;display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button{background-color:#3100bf;color:#fff;display:none}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-close-button i.abtasty-search-widget-close-icon{background-color:#2a2a3c;height:14px;width:14px}div.abtasty-search-widget-container button.abtasty-search-widget-search-facet-show-more{background-color:transparent;border:none;color:#3100bf;cursor:pointer;font-size:14px;font-weight:700;margin-bottom:16px;padding:0;text-decoration:underline}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-content.range-facet{margin-bottom:16px;padding-left:10px;padding-right:10px;padding-top:20px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-list-item-container{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;justify-content:space-between}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-list-item-container div.checkbox{margin:unset}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container{cursor:pointer;display:block;font-size:13px;font-weight:400;line-height:normal;padding-left:24px;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container.checked,div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container:hover:not(.disabled){font-weight:700}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container.disabled{cursor:not-allowed}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input{cursor:pointer;height:0;opacity:0;position:absolute;width:0}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container.disabled input{cursor:not-allowed}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input[type=checkbox]:before{content:none!important}div.abtasty-search-widget-container span.abtasty-search-widget-search-facet-checkbox-checkmark{background-color:transparent;border:1px solid #000;border-radius:6px;height:16px;left:0;position:absolute;top:0;width:16px}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input:checked~span.abtasty-search-widget-search-facet-checkbox-checkmark{background-color:#3100bf;font-weight:700}div.abtasty-search-widget-container span.abtasty-search-widget-search-facet-checkbox-checkmark:after{content:\"\";display:none;position:absolute}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container input:checked~span.abtasty-search-widget-search-facet-checkbox-checkmark:after{display:block}div.abtasty-search-widget-container label.abtasty-search-widget-search-facet-checkbox-container span.abtasty-search-widget-search-facet-checkbox-checkmark:after{border:solid #fff;border-width:0 2px 2px 0;height:8px;left:4.5px;top:1.5px;-webkit-transform:rotate(45deg);transform:rotate(45deg);width:4px}div.abtasty-search-widget-container ul li.abtasty-search-widget-search-facet-list-item{margin-bottom:16px;margin-top:16px}div.abtasty-search-widget-container ul li.abtasty-search-widget-search-facet-list-item:first-of-type{margin-top:8px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list details.abtasty-search-widget-search-facet:not(:last-of-type){border-bottom:1px solid #d8d8e2}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-pack:justify;-ms-flex-pack:justify;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:16px;font-weight:700;justify-content:space-between;padding:16px 2px 16px 0}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary:before{content:none}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary div.abtasty-search-widget-search-facet-arrow svg{fill:#2a2a3c}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet summary div.abtasty-search-widget-search-facet-arrow{-webkit-transform-origin:center;transform-origin:center}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet[open] summary div.abtasty-search-widget-search-facet-arrow{-webkit-transform:rotate(180deg);transform:rotate(180deg)}div.abtasty-search-widget-container div.abtasty-search-widget-search-facet-content ul{list-style:none;margin:0;padding:0}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider{background-color:#e0e0e0;border-radius:5px;height:5px;margin:20px 0;position:relative;width:100%}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-progress{background-color:#3100bf;border-radius:5px;height:100%;position:absolute;z-index:1}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-handle{background-color:#fff;border:1px solid #d8d8e2;border-radius:50%;cursor:pointer;height:24px;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);width:24px;z-index:2}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.range-handle-value{background-color:#3100bf;border-radius:4px;color:#fff;left:50%;min-width:50px;padding:4px;position:absolute;text-align:center;top:-34px;-webkit-transform:translateX(-50%);transform:translateX(-50%)}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.steps-container{-webkit-box-pack:justify;-ms-flex-pack:justify;bottom:-16px;display:-webkit-box;display:-ms-flexbox;display:flex;justify-content:space-between;left:0;padding:0;position:absolute;right:0}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.steps-container div.step-bar{background-color:#d8d8e2;width:2px}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.steps-container div.step-bar:first-child,div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.steps-container div.step-bar:last-child{height:8px}div.abtasty-search-widget-container div.abtasty-search-widget-range-slider div.steps-container div.step-bar:not(:first-child):not(:last-child){height:6px}div.abtasty-search-widget-container div.abtasty-search-widget-range-values{-webkit-box-pack:justify;-ms-flex-pack:justify;color:#2a2a3c;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:14px;justify-content:space-between;margin-top:10px}div.abtasty-search-widget-container div.abtasty-search-widget-range-values span{font-size:12px;font-weight:400}div.abtasty-search-widget-container div.abtasty-search-widget-range-values span:first-child{margin-right:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}div.abtasty-search-widget-container div.abtasty-search-widget-range-values span:last-child{margin-left:-50%;-webkit-transform:translateX(50%);transform:translateX(50%)}div.abtasty-search-widget-container button.abtasty-search-widget-filters-button{background-color:#fff!important;border:none;border-radius:100%;cursor:pointer!important;display:none;margin-top:12px;padding:11px;-webkit-transform:translateX(-15%);transform:translateX(-15%);vertical-align:middle}div.abtasty-search-widget-container i.abtasty-search-widget-filters-icon{background-color:#2a2a3c;height:22px;-webkit-mask-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDE4IDE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM0OTRjNGUiIGQ9Ik0xNyA1SDFhMSAxIDAgMCAxIDAtMmgxNmExIDEgMCAwIDEgMCAyem0wIDVIMWExIDEgMCAwIDEgMC0yaDE2YTEgMSAwIDAgMSAwIDJ6bTAgNUgxYTEgMSAwIDAgMSAwLTJoMTZhMSAxIDAgMCAxIDAgMnoiLz48L3N2Zz4=\");mask-image:url(\"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iODAwIiBoZWlnaHQ9IjgwMCIgdmlld0JveD0iMCAwIDE4IDE4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiM0OTRjNGUiIGQ9Ik0xNyA1SDFhMSAxIDAgMCAxIDAtMmgxNmExIDEgMCAwIDEgMCAyem0wIDVIMWExIDEgMCAwIDEgMC0yaDE2YTEgMSAwIDAgMSAwIDJ6bTAgNUgxYTEgMSAwIDAgMSAwLTJoMTZhMSAxIDAgMCAxIDAgMnoiLz48L3N2Zz4=\");vertical-align:middle;width:22px}@media (max-width:1199.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container,div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible{max-width:1140px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (max-width:991.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container,div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible{max-width:960px}}@media (max-width:767.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container,div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible{max-width:720px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible:not(.no-results) div.abtasty-search-widget-search-result-list{grid-template-columns:repeat(1,minmax(0,1fr))}div.abtasty-search-widget-container div.abtasty-search-widget-search-result{height:300px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result img{height:50%}}@media (max-width:575.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container,div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse;max-width:100%;padding:0 16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-container{padding:7.5px 0}div.abtasty-search-widget-container i.abtasty-search-widget-search-icon{display:none}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar-close-button-container i.abtasty-search-widget-close-icon{height:24px;-webkit-mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.833 7.254c.017.054.058.14.091.192.034.052 1.36 1.39 2.949 2.976 3.247 3.241 2.972 2.995 3.356 2.996.171 0 .226-.01.34-.063.45-.209.636-.72.426-1.168-.04-.085-.54-.599-2.155-2.217L3.738 7.864h9.313c6.6 0 9.355-.008 9.456-.026a.86.86 0 0 0 .63-.498c.053-.113.063-.17.063-.34s-.01-.227-.063-.34a.86.86 0 0 0-.63-.498c-.101-.019-2.856-.026-9.456-.026H3.738L5.84 4.03c1.615-1.618 2.114-2.132 2.155-2.217A.865.865 0 0 0 7.569.644C7.455.591 7.4.581 7.23.581 6.845.583 7.12.337 3.873 3.578 2.285 5.163.958 6.502.925 6.552a.897.897 0 0 0-.092.702Z' fill='%232A2A3C'/%3E%3C/svg%3E\");mask-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg width='24' height='14' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M.833 7.254c.017.054.058.14.091.192.034.052 1.36 1.39 2.949 2.976 3.247 3.241 2.972 2.995 3.356 2.996.171 0 .226-.01.34-.063.45-.209.636-.72.426-1.168-.04-.085-.54-.599-2.155-2.217L3.738 7.864h9.313c6.6 0 9.355-.008 9.456-.026a.86.86 0 0 0 .63-.498c.053-.113.063-.17.063-.34s-.01-.227-.063-.34a.86.86 0 0 0-.63-.498c-.101-.019-2.856-.026-9.456-.026H3.738L5.84 4.03c1.615-1.618 2.114-2.132 2.155-2.217A.865.865 0 0 0 7.569.644C7.455.591 7.4.581 7.23.581 6.845.583 7.12.337 3.873 3.578 2.285 5.163.958 6.502.925 6.552a.897.897 0 0 0-.092.702Z' fill='%232A2A3C'/%3E%3C/svg%3E\");width:24px}div.abtasty-search-widget-container div.abtasty-search-widget-search-bar{border:none}div.abtasty-search-widget-container input.abtasty-search-widget-search-input{font-size:14px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-list-container{padding-left:0;padding-top:16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-container.visible div.abtasty-search-widget-search-result-list-container{width:100vw}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort-facet{display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-sort{display:none}div.abtasty-search-widget-container button.abtasty-search-widget-filters-button{display:block}div.abtasty-search-widget-container button.abtasty-search-widget-search-filters-button{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-bottom-buttons-container{border-top:1px solid #d8d8e2;bottom:0;position:fixed;z-index:2}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-bottom-buttons-container{max-height:unset!important;min-width:unset;overflow-x:hidden;right:-325px;-webkit-transition:.5s;transition:.5s;width:325px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list{background-color:#fff;bottom:0;overflow-x:hidden;padding:0 0 100px;position:absolute;right:-325px;top:0;z-index:1}div.abtasty-search-widget-container details.abtasty-search-widget-search-facet{margin:0 16px}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list button.abtasty-search-widget-search-facets-list-bottom-close-button,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list div.abtasty-search-widget-search-facets-list-header{display:-webkit-box;display:-ms-flexbox;display:flex}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list-overlay{display:block}div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list.open,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list.open div.abtasty-search-widget-search-facets-list-bottom-buttons-container{right:0}div.abtasty-search-widget-container div.abtasty-search-widget-search-result{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-box-pack:start;-ms-flex-pack:start;-ms-flex-direction:row;flex-direction:row;height:94px;justify-content:flex-start;padding:12px}div.abtasty-search-widget-container div.abtasty-search-widget-search-result img{aspect-ratio:unset;height:auto;margin-bottom:0;margin-left:0;margin-right:12px;min-width:33%;width:unset}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-name{font-size:13px;max-height:3em;min-height:3em}div.abtasty-search-widget-container div.abtasty-search-widget-search-result-price{font-size:18px}}@media (max-width:374.98px){div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list.open,div.abtasty-search-widget-container div.abtasty-search-widget-search-facets-list.open div.abtasty-search-widget-search-facets-list-bottom-buttons-container{width:100%}}");return e.appendChild(r),e.textContent+=[a,s,i].join(""),t.insertAdjacentElement("afterbegin",e),t}}(()=>{const{elementReferrer:t}=DATA;return(t=>{const a=(()=>{if(e()||(()=>{const t=!!document.getElementById("ABTastyPreviewBar"),e=location.href.includes("ab_project=preview");return t||e})())return!1;const t=ABTasty.getTestsOnPage()[TEST_ID];return!!t&&Object.keys(t.targetings.qaParameters).length>0})(),s=window.document.cookie.includes("abTastyDebug=")||!0===window.abTastyDebug;if(a||s){const e=(()=>{const t=(()=>{const{type:t}=DATA;return`${PACKAGE.replace("@abtasty/","")}${t?`_${t}`:""}`})();return`${t.charAt(0).toUpperCase()}${t.slice(1)}`.split("-").join(" ")})();window.console.log(`%c${e} - ${a?"QA":"Debug"} Mode for campaign ${TEST_ID} %c ${t}`,"background-color: #D6FF01; color: #3100be; padding: 3px 0 3px 10px; border-radius: 5px 0 0 5px; font-weight: bold;","background-color: #3100be; color: white; padding: 3px 10px 3px 0; border-radius: 0 5px 5px 0;")}})("Widget launch"),(()=>{const t=[{name:DATA.facetTitleFontName,style:DATA.facetTitleFontStyle},{name:DATA.searchBarTitleFontName,style:DATA.searchBarTitleFontStyle},{name:DATA.searchBarInputFontName,style:DATA.searchBarInputFontStyle},{name:DATA.facetSectionTitleFontName,style:DATA.facetSectionTitleFontStyle},{name:DATA.searchResultNameFontName,style:DATA.searchResultNameFontStyle},{name:DATA.searchResultPriceFontName,style:DATA.searchResultPriceFontStyle}];for(const{name:e,style:a}of t){if(!e||"inherit"===e||!/otf|ttf/g.test(a))continue;const t=document.createElement("style"),s=a.match(q)?a.match(q)[1]:"";t.innerHTML=`@font-face { font-family: '${e}_${s}'; src: url('${a}'); font-display: swap; }`,document.head.appendChild(t)}})(),new Promise(s=>{r(t,()=>{const i=a(t),r=i.getRootNode();i.style.position="relative";const n=document.createElement("div");n.style.position="absolute",n.style.top="0",n.style.left="0",n.style.right="0",n.style.bottom="0",n.style.backgroundColor="transparent",n.style.cursor="pointer",n.onclick=t=>{t?.preventDefault?.(),t?.stopPropagation?.(),new G({target:i,rootElement:r}).openSearchWidget()},i.appendChild(n);const o=!!document.querySelector(".abtasty-search-widget-container");e()&&!o&&n.onclick(),s()})})})().then(()=>{})}();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abtasty/search",
3
3
  "description": "Search Widget MVP",
4
- "version": "0.0.2-11",
4
+ "version": "0.0.2-12",
5
5
  "form": "dist/form.js",
6
6
  "main": "dist/main.js",
7
7
  "type": "module",
@@ -44,5 +44,5 @@
44
44
  "rollup": "^4.12.0",
45
45
  "rollup-plugin-postcss": "^4.0.2"
46
46
  },
47
- "stableVersion": "0.0.2-10"
47
+ "stableVersion": "0.0.2-11"
48
48
  }