PageSourceSearch

https://lata.shop/cdn/shop/t/75/assets/boost-pfs-filter.js?v=20316796357900678201790869875

js lata.shop collected 2026-10-04 07:54:47 UTC 13,195 bytes, 2 lines download raw bytes

1if(typeof boostPFSThemeConfig!="undefined")var boostPFSFilterConfig={general:{limit:boostPFSConfig.custom.products_per_page,loadProductFirst:!0}};(function(){BoostPFS.inject(this),ProductGridItem.prototype.compileTemplate=function(data){data||(data=this.data);var images=data.images_info,soldOut=!data.available,onSale=data.compare_at_price_min>data.price_min,priceVaries=data.price_min!=data.price_max,firstVariant=data.variants[0];if(Utils.getParam("variant")!==null&&Utils.getParam("variant")!=""){var paramVariant=data.variants.filter(function(e){return e.id==Utils.getParam("variant")});typeof paramVariant[0]!="undefined"&&(firstVariant=paramVariant[0])}else for(var i=0;i<data.variants.length;i++)if(data.variants[i].available){firstVariant=data.variants[i];break}var itemHtml=boostPFSTemplate.productGridItemHtml,gridMobileClass="",gridItemWidthClass="",itemGridDetailStyleClass="",itemSoldOutClass="",itemSaleClass="",itemGridImageSizeClass=boostPFSTemplate.gridImageSizeHtml,itemGridAlignClass="",itemLabels="",itemGridSecondHoverClass="",itemRatio=boostPFSTemplate.itemRatioHtml,itemStyle='style="padding-bottom:100%;"',itemImages="",itemVendor=boostPFSTemplate.itemVendorHtml,itemSwatch=buildSwatch(data),itemReviews=boostPFSTemplate.itemReviewsHtml;boostPFSConfig.custom.hasOwnProperty("grid_mobile")&&(gridMobileClass=boostPFSConfig.custom.grid_mobile),itemHtml=itemHtml.replace(/{{grid_mobile}}/g,gridMobileClass),boostPFSConfig.custom.hasOwnProperty("grid_item_width")&&(gridItemWidthClass=boostPFSConfig.custom.grid_item_width),itemHtml=itemHtml.replace(/{{grid_item_width}}/g,gridItemWidthClass),boostPFSConfig.custom.hasOwnProperty("product_grid_detail_style")&&boostPFSConfig.custom.product_grid_detail_style=="hover"&&(itemGridDetailStyleClass="product--details-hover"),itemHtml=itemHtml.replace(/{{itemGridDetailStyleClass}}/g,itemGridDetailStyleClass),soldOut&&(itemSoldOutClass="product--sold-out"),itemHtml=itemHtml.replace(/{{itemSoldOutClass}}/g,itemSoldOutClass),onSale&&(itemSaleClass="product--sale"),itemHtml=itemHtml.replace(/{{itemSaleClass}}/g,itemSaleClass),itemHtml=itemHtml.replace(/{{itemGridImageSizeClass}}/g,itemGridImageSizeClass),boostPFSConfig.custom.hasOwnProperty("product_grid_align")&&(itemGridAlignClass=boostPFSConfig.custom.product_grid_align),itemHtml=itemHtml.replace(/{{itemGridAlignClass}}/g,itemGridAlignClass);var customLabel=!1,newLabel=!1;if(boostPFSConfig.custom.hasOwnProperty("product_grid_label")&&boostPFSConfig.custom.product_grid_label){if(boostPFSConfig.custom.product_grid_label_collection!=""&&data.collections.length>0){for(var i=0;i<data.collections.length;i++)if(data.collections[i].handle==boostPFSConfig.custom.product_grid_label_collection){customLabel=!0;break}}var dateNow=boostPFSConfig.custom.date_now,dateCreatedAt=Date.parse(data.created_at)/1e3,timeAgo=(dateNow-dateCreatedAt)/86400;timeAgo<boostPFSConfig.custom.product_grid_label_new_days&&(newLabel=!0),soldOut?itemLabels+=boostPFSTemplate.soldOutLabelHtml:customLabel?itemLabels+=boostPFSTemplate.customLabelHtml:onSale?itemLabels!=boostPFSTemplate.saleLabelHtml.replace(/{{itemSalePercent}}/,data.percent_sale_min):newLabel&&boostPFSConfig.custom.hasOwnProperty("product_grid_label_new")&&boostPFSConfig.custom.product_grid_label_new&&(itemLabels+=boostPFSTemplate.newLabelHtml)}itemHtml=itemHtml.replace(/{{itemLabels}}/g,itemLabels),boostPFSConfig.custom.hasOwnProperty("product_grid_second_hover")&&boostPFSConfig.custom.product_grid_second_hover==!0&&images.length>1&&(itemGridSecondHoverClass="product__media--hover"),itemHtml=itemHtml.replace(/{{itemGridSecondHoverClass}}/g,itemGridSecondHoverClass),itemHtml=itemHtml.replace(/{{itemRatio}}/g,itemRatio),images.length>0&&(itemStyle='style="padding-bottom:'+Math.round(images[0].height/images[0].width*100)+'%;"'),itemHtml=itemHtml.replace(/{{itemStyle}}/g,itemStyle);for(var imageSrc=images.length>0?images[0].src:boostPFSConfig.general.no_image_url,imageRange=[180,360,540,720,900,1080,1296,1512],imageHoverSrcSet="",imageSrcSet="",imageAspectRatio=images.length>0?images[0].width/images[0].height:1,imageHoverAspectRatio=images.length>1?images[1].width/images[1].height:1,i=0;i<imageRange.length;i++)imageSrcSet+=Utils.optimizeImage(imageSrc,imageRange[i]+"x")+" "+imageRange[i]+"w "+Math.round(imageRange[i]/imageAspectRatio)+"h",images.length>1&&(imageHoverSrcSet+=Utils.optimizeImage(images[1].src,imageRange[i]+"x")+" "+imageRange[i]+"w "+Math.round(imageRange[i]/imageHoverAspectRatio)+"h"),i<imageRange.length-1&&(imageSrcSet+=", ",images.length>1&&(imageHoverSrcSet+=", "));boostPFSConfig.custom.hasOwnProperty("product_grid_second_hover")&&boostPFSConfig.custom.product_grid_second_hover==!0&&images.length>1&&(itemImages+='<img class="product__img-hover" src="'+Utils.optimizeImage(images[1].src,"300x")+'" srcset="'+imageHoverSrcSet+'" sizes="'+boostPFSConfig.custom.image_sizes+'" width="300" height="'+Math.round(300/imageHoverAspectRatio)+'" alt="{{itemTitle}}" loading="lazy" />'),itemImages+='<img class="product__img" src="'+Utils.optimizeImage(imageSrc,"300x")+'" srcset="'+imageSrcSet+'" sizes="'+boostPFSConfig.custom.image_sizes+'" width="300" height="'+Math.round(300/imageAspectRatio)+'" alt="{{itemTitle}}" loading="lazy" />',itemHtml=itemHtml.replace(/{{itemImages}}/g,itemImages);var itemQuickBuy="";boostPFSConfig.custom.product_grid_quick_buy!="disabled"&&(itemQuickBuy+='<div class="product-btn product-btn--'+boostPFSConfig.custom.product_grid_quick_buy+'">',soldOut?itemQuickBuy+='<a href="{{itemUrl}}" class="c-btn c-btn--full c-btn--light c-btn--small-tab product-btn__btn">'+boostPFSConfig.label.sold_out+"</a>":data.variants.length>1?itemQuickBuy+='<a href="{{itemUrl}}" class="c-btn c-btn--full c-btn--primary c-btn--arrow c-btn--small-tab product-btn__btn">'+boostPFSConfig.label.select_options+"</a>
1":(itemQuickBuy+='<form method="post" action="/cart/add" id="product_form_{{itemId}}" accept-charset="UTF-8" class="js-product-form" enctype="multipart/form-data">',itemQuickBuy+='<input type="hidden" name="form_type" value="product">',itemQuickBuy+='<input type="hidden" name="utf8" value="\u2713">',itemQuickBuy+='<input type="hidden" name="id" value="'+firstVariant.id+'" />',itemQuickBuy+='<button type="submit" name="add" class="c-btn c-btn--full c-btn--primary c-btn--small-tab product-btn__btn js-product-add">',itemQuickBuy+='<span class="js-product-add-text">'+boostPFSConfig.label.add_to_cart+"</span>",itemQuickBuy+="</button>",itemQuickBuy+="</form>"),itemQuickBuy+="</div>"),itemHtml=itemHtml.replace(/{{itemQuickBuy}}/g,itemQuickBuy),itemHtml=itemHtml.replace(/{{itemVendor}}/g,itemVendor);var itemPrice="";return boostPFSConfig.custom.product_grid_price&&(itemPrice+='<p class="product__price h5 boost-pfs-filter">',soldOut?(console.log(data.id===7026533728441),itemPrice+='<span class="product__price-price product__price-price--sold">'+(data.id===7026533728441?"Coming back in the fall":boostPFSConfig.label.sold_out)+"</span>"):onSale?(itemPrice+='<span class="product__price-price"><span class="money">'+Utils.formatMoney(data.price_min)+"</span></span>",itemPrice+='<strike class="product__price-cross"><span class="money">'+Utils.formatMoney(data.compare_at_price_min)+"</span></strike>"):itemPrice+='<span class="product__price-price"><span class="money">'+(Utils.formatMoney(data.price_min)+(data.id==6812382363833||data.id==7147167416505?"/month":""))+"</span></span>",itemPrice+="</p>"),itemHtml=itemHtml.replace(/{{itemPrice}}/g,itemPrice),itemHtml=itemHtml.replace(/{{itemSwatch}}/g,itemSwatch),(typeof Integration=="undefined"||!Integration.hascompileTemplate("reviews"))&&(itemHtml=itemHtml.replace(/{{itemReviews}}/g,itemReviews)),itemHtml=itemHtml.replace(/{{itemReviews}}/g,itemReviews),itemHtml=itemHtml.replace(/{{itemVendor}}/g,data.vendor),itemHtml=itemHtml.replace(/{{itemId}}/g,data.id),itemHtml=itemHtml.replace(/{{itemHandle}}/g,data.handle),itemHtml=itemHtml.replace(/{{itemTitle}}/g,data.title),itemHtml=itemHtml.replace(/{{itemUrl}}/g,Utils.buildProductItemUrl(data)),itemHtml};function buildSwatch(data){var html="",swatchItems=[];if(boostPFSConfig.custom.product_grid_swatch){var colorKeys=["color","colour"],colorValues=[];
1data.variants.forEach(function(variant){var colorValue=null;if(variant.merged_options.forEach(function(merged_option){var key=merged_option.split(":")[0].toLowerCase(),value=merged_option.split(":")[1].toLowerCase();colorKeys.indexOf(key)!=-1&&colorValues.indexOf(value)==-1&&(colorValues.push(value),colorValue=value)}),colorValue){var slugifyColor=Utils.slugify(colorValue),backgroundImage=boostPFSAppConfig.general.asset_url.replace(/boost-pfs.js/,slugifyColor+"_68x.png"),backgroundColor=slugifyColor.replace("-",""),swatchItem='<li class="product__swatch__item js-product-swatch-item o-list-inline__item" data-variant-image="{{variantImage}}" data-variant-url="{{variantUrl}}"><span class="product__swatch__graphic {{whiteBorderClass}}" style="background-color: {{backgroundColor}}; background-image: url({{backgroundImage}})"></span><span class="u-hidden-visually">{{colorValue}}</span></li>';swatchItem=swatchItem.replace(/{{variantImage}}/g,variant.image?variant.image:data.images_info[0].src),swatchItem=swatchItem.replace(/{{variantUrl}}/g,"{{itemUrl}}?variant="+variant.id),swatchItem=swatchItem.replace(/{{whiteBorderClass}}/g,colorValue.toLowerCase().trim()=="white"?"product__swatch__graphic--white":""),swatchItem=swatchItem.replace(/{{backgroundColor}}/g,backgroundColor),swatchItem=swatchItem.replace(/{{backgroundImage}}/g,backgroundImage),swatchItem=swatchItem.replace(/{{colorValue}}/g,colorValue),swatchItems.push(swatchItem)}}),swatchItems.length>0&&(html='<div class="product__swatch"><ul class="product__swatch__items o-list-inline">'+swatchItems.join(" ")+"</ul></div>")}return html}ProductPaginationDefault.prototype.compileTemplate=function(totalProduct){totalProduct||(totalProduct=this.totalProduct);var currentPage=parseInt(Globals.queryParams.page),totalPage=Math.ceil(totalProduct/Globals.queryParams.limit);if(totalPage>1){var paginationHtml=boostPFSTemplate.paginateHtml,previousHtml=currentPage>1?boostPFSTemplate.previousHtml:"";previousHtml=previousHtml.replace(/{{itemUrl}}/g,Utils.buildToolbarLink("page",currentPage,currentPage-1)),paginationHtml=paginationHtml.replace(/{{previous}}/g,previousHtml);var nextHtml=currentPage<totalPage?boostPFSTemplate.nextHtml:"";nextHtml=nextHtml.replace(/{{itemUrl}}/g,Utils.buildToolbarLink("page",currentPage,currentPage+1)),paginationHtml=paginationHtml.replace(/{{next}}/g,nextHtml);for(var beforeCurrentPageArr=[],iBefore=currentPage-1;iBefore>currentPage-3&&iBefore>0;iBefore--)beforeCurrentPageArr.unshift(iBefore);currentPage-4>0&&beforeCurrentPageArr.unshift("..."),currentPage-4>=0&&beforeCurrentPageArr.unshift(1),beforeCurrentPageArr.push(currentPage);for(var afterCurrentPageArr=[],iAfter=currentPage+1;iAfter<currentPage+3&&iAfter<=totalPage;iAfter++)afterCurrentPageArr.push(iAfter);currentPage+3<totalPage&&afterCurrentPageArr.push("..."),currentPage+3<=totalPage&&afterCurrentPageArr.push(totalPage);for(var pageItemsHtml="",pageArr=beforeCurrentPageArr.concat(afterCurrentPageArr),iPage=0;iPage<pageArr.length;iPage++)pageArr[iPage]=="..."?pageItemsHtml+=boostPFSTemplate.pageItemRemainHtml:pageItemsHtml+=pageArr[iPage]==currentPage?boostPFSTemplate.pageItemSelectedHtml:boostPFSTemplate.pageItemHtml,pageItemsHtml=pageItemsHtml.replace(/{{itemTitle}}/g,pageArr[iPage]),pageItemsHtml=pageItemsHtml.replace(/{{itemUrl}}/g,Utils.buildToolbarLink("page",currentPage,pageArr[iPage]));return paginationHtml=paginationHtml.replace(/{{pageItems}}/g,pageItemsHtml),paginationHtml}return""},ProductSorting.prototype.compileTemplate=function(){if(boostPFSTemplate.hasOwnProperty("sortingHtml")){var sortingArr=Utils.getSortingList();if(sortingArr){var sortingItemsHtml="";for(var k in sortingArr)sortingItemsHtml+='<option value="'+k+'">'+sortingArr[k]+"</option>";var html=boostPFSTemplate.sortingHtml.replace(/{{sortingItems}}/g,sortingItemsHtml);return html}}},ProductList.prototype.afterRender=function(data,eventType){},Filter.prototype.afterRender=function(data){data||(data=this.data);var numSelectedFilter=jQ(".boost-pfs-filter-tree .boost-pfs-filter-selected-items .boost-pfs-filter-option-label").length;numSelectedFilter?jQ(".js-collection-draw-trigger").html(boostPFSConfig.label.filter+" ("+numSelectedFilter+")"):jQ(".js-collection-draw-trigger").html(boostPFSConfig.label.filter),window.SPR&&(SPR.initDomEls(),SPR.loadBadges()),window.sr&&typeof window.sr.reveal=="function"&&sr.reveal(".product-top"),window.theme&&(typeof window.theme.selectWrapper=="function"&&theme.selectWrapper(),typeof window.theme.ajaxCartInit=="function"&&theme.ajaxCartInit(),typeof window.theme.productC
1ollSwatch=="function"&&theme.productCollSwatch())};function reinitScrollbar(){typeof SimpleBar=="function"&&jQ("[data-simplebar]").each(function(i,element){var simpleBar=new SimpleBar(element);simpleBar.recalculate()})}jQ(".js-collection-draw-trigger").on("click",function(){setTimeout(reinitScrollbar,500)})})();
2//# sourceMappingURL=/cdn/shop/t/75/assets/boost-pfs-filter.js.map?v=20316796357900678201790869875

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.