1var layout2="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6",layout3="col-6 col-sm-6 col-md-4 col-lg-4 col-xl-4",layout4="col-6 col-sm-6 col-md-4 col-lg-3 col-xl-3",layout5="col-6 col-sm-6 col-md-3 col-lg-3 col-xl-2",hideShowFiltersEvent=!1,clearAllFilterButton=!1;let clearAllButton=document.getElementById("yv-applied-filter-cross-all");var filters=document.getElementById("filterSideBar"),filterContainer=document.getElementById("CollectionProductsContainer");clearAllButton&&(clearAllFilterButton=!0);function changeGridLayout(){let parent=document.getElementById("CollectionProductsContainer"),gridLayouts=document.querySelectorAll(".sort-grid-icon");Array.from(gridLayouts).forEach(function(layoutItem){layoutItem.classList.remove("active")});var grid_layout_collection=Cookies.get("grid_layout_collection");parent&&gridLayouts.length>0&&(window.innerWidth<768?grid_layout_collection&&grid_layout_collection!="grid-layout-4"&&grid_layout_collection!="grid-layout-5"?(document.querySelector('.sort-grid-icon[data-value="'+grid_layout_collection+'"]').classList.add("active"),parent.setAttribute("data-view",grid_layout_collection)):(document.querySelector('.sort-grid-icon[data-value="grid-layout-2"]').classList.add("active"),parent.setAttribute("data-view","grid-layout-2")):window.innerWidth>=768&&window.innerWidth<992?grid_layout_collection&&grid_layout_collection!="grid-layout-4"&&grid_layout_collection!="grid-layout-5"?(document.querySelector('.sort-grid-icon[data-value="'+grid_layout_collection+'"]').classList.add("active"),parent.setAttribute("data-view",grid_layout_collection)):(document.querySelector('.sort-grid-icon[data-value="grid-layout-3"]').classList.add("active"),parent.setAttribute("data-view","grid-layout-3")):window.innerWidth>=992&&(grid_layout_collection?(document.querySelector('.sort-grid-icon[data-value="'+grid_layout_collection+'"]').classList.add("active"),parent.setAttribute("data-view",grid_layout_collection)):(document.querySelector('.sort-grid-icon[data-value="grid-layout-4"]').classList.add("active"),parent.setAttribute("data-view","grid-layout-4"))),updateGridView(parent))}function hideShowFilters(){var filterHeading=document.getElementById("filterHeading");window.innerWidth<768?filterContainer&&filterHeading&&filterHeading.classList.contains("filters-drawer-toggle")&&filterContainer.classList.add("filters-toggle"):filters&&(filters.classList.remove("active"),document.querySelector("body").classList.remove("open-filter-sort"),document.querySelector("body").classList.remove("open-filter-popup")),hideShowFiltersEvent==!1&&(filterHeading&&filterHeading.addEventListener("click",e=>{e.preventDefault(),window.innerWidth>767?filterContainer&&filterHeading&&filterHeading.classList.contains("filters-drawer-toggle")&&DOMAnimations.classToggle(filterContainer,"filters-toggle"):(filters.classList.add("active"),document.querySelector("body").classList.add("open-filter-popup"),document.querySelector("body").classList.add("open-filter-sort"))}),hideShowFiltersEvent=!0)}function hideFilters(){var cancelFiltes=document.getElementById("cancelFilters");cancelFiltes&&cancelFiltes.addEventListener("click",e=>{e.preventDefault(),filters.classList.remove("active"),document.querySelector("body").classList.remove("open-filter-popup"),document.querySelector("body").classList.remove("open-filter-sort")})}window.addEventListener("load",event=>{changeGridLayout(),hideShowFilters(),applyFilters(),sortByOptions(),showMoreFilters(),hideFilters(),sortBy()}),jQuery(document).on("shopify:section:load shopify:section:unload",function(event){layout2="col-6 col-sm-6 col-md-6 col-lg-6 col-xl-6",layout3="col-6 col-sm-6 col-md-4 col-lg-4 col-xl-4",layout4="col-6 col-sm-6 col-md-4 col-lg-3 col-xl-3",layout5="col-6 col-sm-6 col-md-3 col-lg-3 col-xl-2",hideShowFiltersEvent=!1;var clearAllFilterButton2=!1;let clearAllButton2=document.getElementById("yv-applied-filter-cross-all");filters=document.getElementById("filterSideBar"),filterContainer=document.getElementById("CollectionProductsContainer"),clearAllButton2&&(clearAllFilterButton2=!0),changeGridLayout(),applyFilters(),hideShowFilters(),sortByOptions(),showMoreFilters(),hideFilters(),sortBy()}),window.addEventListener("resize",function(event){changeGridLayout(),applyFilters(),hideShowFilters(),sortByVisibilityChange();var filters2=document.getElementById("filterSideBar");filters2&&window.innerWidth<768&&window.innerWidth>760&&(filters2.style.display="none",setTimeout(function(){filters2.style.display=""},500))});function showMoreFilters(){const filterForm=document.getElementById("FiltersForm");if(filterForm){var showMoreFilters2=filterForm.querySelectorAll(".filters-expand");showMoreFilters2&&Array.from(showMoreFilters2).forEach(function(showMoreFilter){showMoreFilter.addEventListener("click",e=>{e.preventDefault(),showMoreFilter.classList.contains("active")?(showMoreFilter.classList.remove("active"),DOMAnimations.slideUp(showMoreFilter.parentNode.querySelector(".more-options"),150),showMoreFilter.querySelector("span").textContent=showMoreText):(showMoreFilter.classList.add("active"),DOMAnimations.slideDown(showMoreFilter.parentNode.querySelector(".more-options"),150),showMoreFilter.querySelector("span").textContent=showLessText)})})}}function applyFilters(){var section=document.getElementById("CollectionProductsContainer");if(section){var sectionParent=section.closest(".shopify-section"),sectionId=section.dataset.id;const filterForm=document.getElementById("FiltersForm");if(!filterForm)return!1;var layouts=sectionParent.querySelectorAll(".sort-grid-icon");
1Array.from(layouts).forEach(function(layout){-layout.addEventListener("click",e=>{if(e.preventDefault(),!layout.classList.contains("active")){layout.classList.add("active");let allGrids=section.querySelectorAll(".aos-init");Array.from(allGrids).forEach(function(grid){grid.classList.remove("aos-animate"),grid.classList.remove("aos-init")}),setTimeout(function(){Array.from(layouts).forEach(function(layoutItem){layoutItem!=layout&&layoutItem.classList.remove("active")});var _thisLayout=layout.dataset.value;section.setAttribute("data-view",_thisLayout),updateGridView(section);var date=new Date;date.setTime(date.getTime()+parseInt(1440*60*1e3)),Cookies.set("grid_layout_collection",_thisLayout,{expires:date,path:"/"});let allImages=section.querySelectorAll(".lazyloaded");Array.from(allImages).forEach(function(image){image.classList.remove("lazyloaded"),image.classList.add("lazyload")})},800)}})});var priceRangeBars=filterForm.querySelectorAll(".mall-slider-handles");if(Array.from(priceRangeBars).forEach(function(rangeBar){var el=rangeBar,sliderEventListener="";el.noUiSlider?sliderEventListener=el.noUiSlider:sliderEventListener=noUiSlider.create(el,{step:1,connect:!0,start:[parseFloat(el.dataset.start)||0,parseFloat(el.dataset.end||el.dataset.max)],range:{min:[parseFloat(el.dataset.min)||0],max:[parseFloat(el.dataset.max)||100]}}),window.innerWidth>767&&sliderEventListener.on("change",function(values){var minRange=$(this)[0].options.range.min,maxRange=$(this)[0].options.range.max,minVal=parseFloat(values[0]),newformatMoney=moneyFormat;minVal>=minRange&&(section.querySelectorAll('input[name="filter.v.price.gte"]')[0].value=minVal);var maxVal=parseFloat(values[1]);maxVal<=maxRange&&(section.querySelectorAll('input[name="filter.v.price.lte"]')[0].value=maxVal),window.innerWidth>767&&getFilterData(rangeBar,sectionId)})}),window.innerWidth>767){var prices=filterForm.querySelectorAll("input[type=number]");Array.from(prices).forEach(function(price){price.addEventListener("change",()=>{getFilterData(price,sectionId)})});var inputs=filterForm.querySelectorAll("input[type=checkbox],input[type=radio]");Array.from(inputs).forEach(function(input){input.addEventListener("click",()=>{window.innerWidth>767&&getFilterData(input,sectionId)})})}else filterForm.addEventListener("submit",e=>{e.preventDefault(),getFilterData(filterForm,sectionId)});var removeFilters=sectionParent.querySelectorAll("a.yv-applied-filter-remove");Array.from(removeFilters).forEach(function(removeFilter){if(removeFilter.id=="yv-applied-filter-cross-all"&clearAllFilterButton==!1)return!1;clearAllFilterButton==!1,removeFilter.addEventListener("click",e=>{e.preventDefault();var _url=removeFilter.getAttribute("href");getFilterData(removeFilter,sectionId,_url)})})}}function sortByOptions(){var section=document.getElementById("CollectionProductsContainer"),sortBy2=document.querySelectorAll('[name="sort_by"][data-sort-by]');if(section){var sectionId=section.dataset.id;Array.from(sortBy2).forEach(function(sort){sort.addEventListener("change",e=>{e.preventDefault(),Array.from(sortBy2).forEach(function(sort2){sort2.parentNode.classList.remove("selected")}),sort.parentNode.classList.add("selected");var sortMenu=document.getElementById("sort__list");sortMenu&&sortMenu.classList.contains("active")&&(sortMenu.classList.remove("active"),window.innerWidth>767?DOMAnimations.slideUp(sortMenu):document.querySelector("body").classList.remove("open-filter-sort")),document.querySelector("body").classList.remove("open-filter-sort"),getFilterData(sort,sectionId)})})}}function sortByVisibilityChange(){var sortMenu=document.querySelector(".collection-sortby-selected"),sortList=document.getElementById("sort__list");sortMenu&&sortList&&(window.innerWidth>767?(sortList.classList.contains("active")?sortList.style.display="block":sortList.style.display="none",document.querySelector("body").classList.remove("open-filter-sort")):(sortList.style.display="block",sortList.classList.contains("active")?document.querySelector("body").classList.add("open-filter-sort"):document.querySelector("body").classList.remove("open-filter-sort")))}function sortBy(){var sortMenu=document.querySelector(".collection-sortby-selected");sortMenu&&sortMenu.addEventListener("click",e=>{e.preventDefault();var sortMenu2=document.getElementById("sort__list");
1sortMenu2.classList.contains("active")?(sortMenu2.classList.remove("active"),window.innerWidth>767?DOMAnimations.slideUp(sortMenu2):document.querySelector("body").classList.remove("open-filter-sort")):(sortMenu2.classList.add("active"),window.innerWidth>767?DOMAnimations.slideDown(sortMenu2):document.querySelector("body").classList.add("open-filter-sort"))});var closeSortMenu=document.querySelector(".close-sort");closeSortMenu&&closeSortMenu.addEventListener("click",e=>{e.preventDefault();var sortMenu2=document.getElementById("sort__list");window.innerWidth<768&&(sortMenu2.classList.remove("active"),document.querySelector("body").classList.remove("open-filter-sort"))})}function updateGridView(section){if(section){var mainSection=document.getElementById("CollectionProductsContainer"),_layout=mainSection.getAttribute("data-view"),productItems=section.querySelectorAll("[data-product-grid]");productItems.length>0&&Array.from(productItems).forEach(function(item){_layout=="grid-layout-2"?item.setAttribute("class",layout2):_layout=="grid-layout-3"?item.setAttribute("class",layout3):_layout=="grid-layout-4"?item.setAttribute("class",layout4):_layout=="grid-layout-5"&&item.setAttribute("class",layout5)}),animationStatus&&AOS&&AOS.refreshHard()}}function fetchFilterData(url){return fetch(url).then(response=>response.text())}const filterTitles=document.querySelectorAll(".yv-filter-title");
1filterTitles.forEach(title=>{title.addEventListener("click",function(){this.nextElementSibling.classList.toggle("active")})});function getFilterData(input,sectionId,remove){let allGrids=document.getElementById("CollectionProductsContainer").querySelectorAll(".aos-init");Array.from(allGrids).forEach(function(grid){grid.classList.remove("aos-animate"),grid.classList.remove("aos-init")});let filterForm=document.getElementById("FiltersForm");const formData=new FormData(filterForm);var searchParameters=new URLSearchParams(formData).toString(),clearAll=document.getElementById("yv-applied-filter-cross-all"),url=window.location.pathname+"?section_id="+sectionId+"&"+searchParameters,_updateUrl=window.location.pathname+"?"+searchParameters;remove&&(url=remove,_updateUrl=remove);const html=fetchFilterData(url).then(responseText=>{const resultData=new DOMParser().parseFromString(responseText,"text/html");var itemResultCount=resultData.querySelector(".products-count"),sortByHtml="";resultData.getElementById("toolbox-sort")&&(sortByHtml=resultData.getElementById("toolbox-sort").innerHTML);var html2=resultData.getElementById("CollectionProductsContainer"),resultClear=resultData.getElementById("yv-applied-filter-cross-all");resultClear?document.getElementById("yv-applied-filter-cross-all")?clearAllFilterButton=!1:(document.querySelector(".filter-heading-wrapper").appendChild(resultClear),clearAllFilterButton=!0):clearAll&&(clearAll.remove(),clearAllFilterButton=!1);var elmnt=document.getElementById("CollectionProductsContainer");if(updateGridView(html2),html2)elmnt.innerHTML=html2.innerHTML;else{let productResultContainer=elmnt.querySelector("[data-collection-products]");productResultContainer&&(productResultContainer.innerHTML=noResultFound)}document.querySelector("body").classList.remove("open-filter-sort"),document.querySelector("body").classList.remove("open-filter-popup"),filters=document.getElementById("filterSideBar"),filterContainer=elmnt;let inputId=input.getAttribute("id"),updateInput=document.getElementById(inputId);if(updateInput){updateInput.focus();let moreOption=updateInput.closest(".more-options");if(moreOption){moreOption.style.display="block";let moreOptionText=updateInput.closest(".yv-filter-content").querySelector(".filters-expand");moreOptionText&&(moreOptionText.classList.add("active"),moreOptionText.querySelector("span").innerHTML=showLessText)}}itemResultCount&&(document.querySelector(".products-count").innerHTML=itemResultCount.innerHTML),document.getElementById("toolbox-sort")&&(document.getElementById("toolbox-sort").innerHTML=sortByHtml),sortBy(),applyFilters(),showMoreFilters(),filters&&filters.querySelector('[name="sort_by"]')&&sortByOptions(),hideFilters(),animationStatus&&AOS&&AOS.refreshHard(),productHoverSlider(),input.getAttribute("name")!="sort_by"&&elmnt.closest(".yv-collection-container")&&elmnt.closest(".yv-collection-container").scrollIntoView({top:150,behavior:"smooth"}),history.pushState({},null,_updateUrl)})}let triggered=!1;function ScrollExecute(){var moreButon=$("#more").last(),nextUrl=moreButon.find("a").attr("href");screenVisibility(moreButon)&&triggered==!1&&(triggered=!0,$.ajax({url:nextUrl,type:"GET",beforeSend:function(){moreButon.find(".load").removeClass("hidden")}}).done(function(data){moreButon.remove();var e=document.createElement("div");e.innerHTML=$(data).find("#CollectionProductsContainer").html(),updateGridView(e),$("[data-collection-products]").append(e.querySelector("[data-collection-products]").innerHTML),productVariants(),gridPickUpAvailability(),productHoverSlider(),animationStatus&&AOS&&AOS.refreshHard(),triggered=!1}))}$(document).ready(function(){$(window).scroll(function(){ScrollExecute()})}); 2//# sourceMappingURL=/cdn/shop/t/32/assets/filters.js.map?v=180728593050237972601781097403
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.