PageSourceSearch

https://articlesofstyle.com/cdn/shop/t/86/assets/ProductJs.js?v=157715558792605738191788167159

js articlesofstyle.com collected 2026-09-24 19:31:06 UTC 26,657 bytes, 2 lines download raw bytes

1function floatToString(t,e){var o=t.toFixed(e).toString();return o.match(/^\.\d+/)?"0"+o:o}typeof window.Shopify=="undefined"&&(window.Shopify={}),Shopify.each=function(t,e){for(var o=0;o<t.length;o++)e(t[o],o)},Shopify.map=function(t,e){for(var o=[],i=0;i<t.length;i++)o.push(e(t[i],i));return o},Shopify.arrayIncludes=function(t,e){for(var o=0;o<t.length;o++)if(t[o]==e)return!0;return!1},Shopify.uniq=function(t){for(var e=[],o=0;o<t.length;o++)Shopify.arrayIncludes(e,t[o])||e.push(t[o]);return e},Shopify.isDefined=function(t){return t!==void 0},Shopify.getClass=function(t){return Object.prototype.toString.call(t).slice(8,-1)},Shopify.extend=function(t,e){function o(){}o.prototype=e.prototype,t.prototype=new o,t.prototype.constructor=t,t.baseConstructor=e,t.superClass=e.prototype},Shopify.locationSearch=function(){return window.location.search},Shopify.locationHash=function(){return window.location.hash},Shopify.replaceState=function(t){window.history.replaceState({},document.title,t)},Shopify.urlParam=function(t){var e=RegExp("[?&]"+t+"=([^&#]*)").exec(Shopify.locationSearch());return e&&decodeURIComponent(e[1].replace(/\+/g," "))},Shopify.newState=function(t,e){return(Shopify.urlParam(t)?Shopify.locationSearch().replace(RegExp("("+t+"=)[^&#]+"),"$1"+e):Shopify.locationSearch()===""?"?"+t+"="+e:Shopify.locationSearch()+"&"+t+"="+e)+Shopify.locationHash()},Shopify.setParam=function(t,e){Shopify.replaceState(Shopify.newState(t,e))},Shopify.Product=function(t){Shopify.isDefined(t)&&this.update(t)},Shopify.Product.prototype.update=function(t){for(property in t)this[property]=t[property]},Shopify.Product.prototype.optionNames=function(){return Shopify.getClass(this.options)=="Array"?this.options:[]},Shopify.Product.prototype.optionValues=function(t){if(!Shopify.isDefined(this.variants))return null;var e=Shopify.map(this.variants,function(e2){var o="option"+(t+1);return e2[o]==null?null:e2[o]});return e[0]==null?null:Shopify.uniq(e)},Shopify.Product.prototype.getVariant=function(t){var e=null;return t.length!=this.options.length||Shopify.each(this.variants,function(o){for(var i=!0,r=0;r<t.length;r++)o["option"+(r+1)]!=t[r]&&(i=!1);if(i==1)return void(e=o)}),e},Shopify.Product.prototype.getVariantById=function(t){for(var e=0;e<this.variants.length;e++){var o=this.variants[e];if(t==o.id)return o}return null},Shopify.money_format="$",Shopify.formatMoney=function(t,e){function o(t2,e2){return t2===void 0?e2:t2}function i(t2,e2,i2,r2){if(e2=o(e2,2),i2=o(i2,","),r2=o(r2,"."),isNaN(t2)||t2==null)return 0;t2=(t2/100).toFixed(e2);var n2=t2.split(".");return n2[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+i2)+(n2[1]?r2+n2[1]:"")}typeof t=="string"&&(t=t.replace(".",""));var r="",n=/\{\{\s*(\w+)\s*\}\}/,a=e||this.money_format;switch(a.match(n)[1]){case"amount":r=i(t,2);break;case"amount_no_decimals":r=i(t,0);break;case"amount_with_comma_separator":r=i(t,2,".",",");break;case"amount_with_space_separator":r=i(t,2," ",",");break;case"amount_with_period_and_space_separator":r=i(t,2," ",".");break;case"amount_no_decimals_with_comma_separator":r=i(t,0,".",",");break;case"amount_no_decimals_with_space_separator":r=i(t,0," ");break;case"amount_with_apostrophe_separator":r=i(t,2,"'",".")}return a.replace(n,r)},Shopify.OptionSelectors=function(t,e){return this.selectorDivClass="selector-wrapper",this.selectorClass="single-option-selector",this.variantIdFieldIdSuffix="-variant-id",this.variantIdField=null,this.historyState=null,this.selectors=[],this.domIdPrefix=t,this.product=new Shopify.Product(e.product),this.onVariantSelected=Shopify.isDefined(e.onVariantSelected)?e.onVariantSelected:function(){},this.replaceSelector(t),this.initDropdown(),e.enableHistoryState&&(this.historyState=new Shopify.OptionSelectors.HistoryState(this)),!0},Shopify.OptionSelectors.prototype.initDropdown=function(){var t={initialLoad:!0};if(!this.selectVariantFromDropdown(t)){var e=this;setTimeout(function(){e.selectVariantFromParams(t)})}},Shopify.OptionSelectors.prototype.fireOnChangeForFirstDropdown=function(t){this.selectors[0].element.onchange(t)},Shopify.OptionSelectors.prototype.selectVariantFromParamsOrDropdown=function(t){this.selectVariantFromParams(t)||this.selectVariantFromDropdown(t)},Shopify.OptionSelectors.prototype.replaceSelector=function(t){var e=document.getElementById(t),o=e.parentNode;Shopify.each(this.buildSelectors(),function(t2){o.insertBefore(t2,e)}),e.style.display="none",this.variantIdField=e},Shopify.OptionSelectors.prototype.selectVariantFromDropdown=function(t){var e=document.getElementById(this.domIdPrefix).querySelector("[selected]");if(e||(e=document.getElementById(this.domIdPrefix).querySelector('[selected="selected"]')),!e)return!1;var o=e.value;return this.selectVariant(o,t)},Shopify.OptionSelectors.prototype.selectVariantFromParams=function(t){var e=Shopify.urlParam("variant");return this.selectVariant(e,t)},Shopify.OptionSelectors.prototype.selectVariant=function(t,e){var o=this.product.getVariantById(t);if(o==null)return!1;for(var i=0;i<this.selectors.length;i++){var r=this.selectors[i].element,n=r.getAttribute("data-option"),a=o[n];a!=null&&this.optionExistInSelect(r,a)&&(r.value=a)}return typeof jQuery!="undefined"?jQuery(this.selectors[0].element).trigger("change",e):this.selectors[0].element.onchange(e),!0},Shopify.OptionSelectors.prototype.optionExistInSelect=function(t,e){for(var o=0;o<t.options.length;o++)if(t.options[o].value==e)return!0},Shopify.OptionSelectors.prototype.insertSelectors=function(t,e){Shopify.isDefined(e)&&this.setMessageElement(e),this.domIdPrefix="product-"+this.product.id+"-variant-selector";var o=document.getElementById(t);Shopify.each(this.buildSelectors(),function(t2){o.appendChild(t2)})},Shopify.OptionSelectors.prototype.buildSelectors=function(){for(var t=0;t<this.product.optionNames().length;t++){var e=new Shopify.SingleOptionSelector(this,t,this.product.optionNames()[t],this.product.optionValues(t));e.element.disabled=!1,this.selectors.push(e)}var o=this.selectorDivClass,i=this.product.optionNames();return Shopify.map(this.selectors,function(t2){var e2=document.createElement("div");if(e2.setAttribute("class",o),i.length>1){var r=document.createElement("label");
1r.htmlFor=t2.element.id,r.innerHTML=t2.name,e2.appendChild(r)}return e2.appendChild(t2.element),e2})},Shopify.OptionSelectors.prototype.selectedValues=function(){for(var t=[],e=0;e<this.selectors.length;e++){var o=this.selectors[e].element.value;t.push(o)}return t},Shopify.OptionSelectors.prototype.updateSelectors=function(t,e){var o=this.selectedValues(),i=this.product.getVariant(o);i?(this.variantIdField.disabled=!1,this.variantIdField.value=i.id):this.variantIdField.disabled=!0,this.onVariantSelected(i,this,e),this.historyState!=null&&this.historyState.onVariantChange(i,this,e)},Shopify.OptionSelectorsFromDOM=function(t,e){var o=e.optionNames||[],i=e.priceFieldExists||!0,r=e.delimiter||"/",n=this.createProductFromSelector(t,o,i,r);e.product=n,Shopify.OptionSelectorsFromDOM.baseConstructor.call(this,t,e)},Shopify.extend(Shopify.OptionSelectorsFromDOM,Shopify.OptionSelectors),Shopify.OptionSelectorsFromDOM.prototype.createProductFromSelector=function(t,e,o,i){if(!Shopify.isDefined(o))var o=!0;if(!Shopify.isDefined(i))var i="/";var r=document.getElementById(t),n=r.childNodes,a=(r.parentNode,e.length),s=[];Shopify.each(n,function(t2){if(t2.nodeType==1&&t2.tagName.toLowerCase()=="option"){var r2=t2.innerHTML.split(new RegExp("\\s*\\"+i+"\\s*"));e.length==0&&(a=r2.length-(o?1:0));var n2=r2.slice(0,a),p2=o?r2[a]:"",l2=(t2.getAttribute("value"),{available:!t2.disabled,id:parseFloat(t2.value),price:p2,option1:n2[0],option2:n2[1],option3:n2[2]});s.push(l2)}});var p={variants:s};if(e.length==0){p.options=[];for(var l=0;l<a;l++)p.options[l]="option "+(l+1)}else p.options=e;return p},Shopify.SingleOptionSelector=function(t,e,o,i){this.multiSelector=t,this.values=i,this.index=e,this.name=o,this.element=document.createElement("select");for(var r=0;r<i.length;r++){var n=document.createElement("option");n.value=i[r],n.innerHTML=i[r],this.element.appendChild(n)}return this.element.setAttribute("class",this.multiSelector.selectorClass),this.element.setAttribute("data-option","option"+(e+1)),this.element.id=t.domIdPrefix+"-option-"+e,this.element.onchange=function(o2,i2){i2=i2||{},t.updateSelectors(e,i2)},!0},Shopify.Image={preload:function(t,e){for(var o=0;o<t.length;o++){var i=t[o];this.loadImage(this.getSizedImageUrl(i,e))}},loadImage:function(t){new Image().src=t},switchImage:function(t,e,o){if(t&&e){var i=this.imageSize(e.src),r=this.getSizedImageUrl(t.src,i);o?o(r,t,e):e.src=r}},imageSize:function(t){var e=t.match(/.+_((?:pico|icon|thumb|small|compact|medium|large|grande)|\d{1,4}x\d{0,4}|x\d{1,4})[_\.@]/);return e!==null?e[1]:null},getSizedImageUrl:function(t,e){if(e==null)return t;if(e=="master")return this.removeProtocol(t);var o=t.match(/\.(jpg|jpeg|gif|png|bmp|bitmap|tiff|tif)(\?v=\d+)?$/i);if(o!=null){var i=t.split(o[0]),r=o[0];return this.removeProtocol(i[0]+"_"+e+r)}return null},removeProtocol:function(t){return t.replace(/http(s)?:/,"")}},Shopify.OptionSelectors.HistoryState=function(t){this.browserSupports()&&this.register(t)},Shopify.OptionSelectors.HistoryState.prototype.register=function(t){window.addEventListener("popstate",function(){t.selectVariantFromParamsOrDropdown({popStateCall:!0})})},Shopify.OptionSelectors.HistoryState.prototype.onVariantChange=function(t,e,o){this.browserSupports()&&(!t||o.initialLoad||o.popStateCall||Shopify.setParam("variant",t.id))},Shopify.OptionSelectors.HistoryState.prototype.browserSupports=function(){return window.history&&window.history.replaceState};var ProductJs=function(item,product){var optionsMap={},optionsMapAll={},productJs=this,slidesQtyDkp;product.images.length>1&&product.type!=="Style Guide"?slidesQtyDkp=2:slidesQtyDkp=1;var thumbsSettingVertical,thumbsSettingVerticalSwiping,thumbsSettingPrevArrow,thumbsSettingNextArrow;item.find(".thumbs").hasClass("horizontal")?(thumbsSettingVertical=!1,thumbsSettingVerticalSwiping=!1,thumbsSettingPrevArrow='<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-left left-arrow" viewB
1ox="0 0 32 32"><path fill="#41505b" d="M24.333 28.205l-1.797 1.684L7.666 16l14.87-13.889 1.797 1.675L11.269 16z"/></svg>',thumbsSettingNextArrow='<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-right right-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M7.667 3.795l1.797-1.684L24.334 16 9.464 29.889l-1.797-1.675L20.731 16z"/></svg>'):(thumbsSettingVertical=!0,thumbsSettingVerticalSwiping=!0,thumbsSettingPrevArrow='<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-up up-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M26.984 23.5l1.516-1.617L16 8.5 3.5 21.883 5.008 23.5 16 11.742z"/></svg>',thumbsSettingNextArrow='<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-down down-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M26.984 8.5l1.516 1.617L16 23.5 3.5 10.117 5.008 8.5 16 20.258z"/></svg>'),productJs.config={gallery:{galleryGroupByOptions:"color".split(",").map(function(s){return s.trim()}).filter(function(v){return v!==""}),galleryGroupMatchMode:4,slickMainOptions:{slidesToShow:slidesQtyDkp,slidesToScroll:1,speed:700,waitForAnimate:!1,prevArrow:'<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-left left-arrow" viewB
1ox="0 0 32 32"><path fill="#41505b" d="M24.333 28.205l-1.797 1.684L7.666 16l14.87-13.889 1.797 1.675L11.269 16z"/></svg>',nextArrow:'<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-right right-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M7.667 3.795l1.797-1.684L24.334 16 9.464 29.889l-1.797-1.675L20.731 16z"/></svg>',responsive:[{breakpoint:900,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1,dots:!0}},{breakpoint:600,settings:{slidesToShow:1,slidesToScroll:1,arrows:!1,dots:!0}}]},slickThumbsOptions:{autoplay:!1,speed:700,slidesToShow:5,slidesToScroll:1,infinite:!1,vertical:thumbsSettingVertical,verticalSwiping:thumbsSettingVerticalSwiping,prevArrow:thumbsSettingPrevArrow,nextArrow:thumbsSettingNextArrow,waitForAnimate:!1,responsive:[{breakpoint:900,settings:{slidesToShow:3,slidesToScroll:1,vertical:!1,verticalSwiping:!1,prevArrow:'<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-left left-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M24.333 28.205l-1.797 1.684L7.666 16l14.87-13.889 1.797 1.675L11.269 16z"/></svg>',nextArrow:'<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-right right-arrow" viewB
1ox="0 0 32 32"><path fill="#41505b" d="M7.667 3.795l1.797-1.684L24.334 16 9.464 29.889l-1.797-1.675L20.731 16z"/></svg>'}},{breakpoint:600,settings:{slidesToShow:6,slidesToScroll:1,vertical:!1,verticalSwiping:!1,prevArrow:'<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-left left-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M24.333 28.205l-1.797 1.684L7.666 16l14.87-13.889 1.797 1.675L11.269 16z"/></svg>',nextArrow:'<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-arrow-right right-arrow" viewBox="0 0 32 32"><path fill="#41505b" d="M7.667 3.795l1.797-1.684L24.334 16 9.464 29.889l-1.797-1.675L20.731 16z"/></svg>'}}]}}};var init=function(){item.hasClass("initialized")||(item.data("productjs",productJs),initVariantStatus(),initializeVariantSelector(),item.on("galleryLoaded",function(){item.data("fullLoaded",!0),item.trigger("productLoaded")}),initGallery(),item.addClass("initialized"))},initVariantStatus=function(){$.each(product.variants,function(key,variant){variant.available?variant.status="available":variant.status="soldout"})};productJs.slickFilterThumbs=function(slickOptions,objectOptions,optionsContainer,gallery){var galleryOptions=productJs.config.gallery,groupOptionProperties=[];if($(galleryOptions.galleryGroupByOptions).each(function(ix,e){$(objectOptions).each(function(ix2,e2){Simplistic.handleize(e)==Simplistic.handleize(e2)&&groupOptionProperties.push("option"+(1+ix2))})}),groupOptionProperties.length>0){gallery.slick("slickUnfilter"),gallery.find(".slideVisible").removeClass("slideVisible");var slideSelector="";$(groupOptionProperties).each(function(ix,e){var part1Selector="",part2Selector="";(slideSelector==""||galleryOptions.galleryGroupMatchMode>=2)&&(part1Selector+=" .slide"),part1Selector+="[data-"+Simplistic.handleize(galleryOptions.galleryGroupByOptions[ix])+'*="_'+Simplistic.handleize(optionsContainer[e])+'_"]',galleryOptions.galleryGroupMatchMode==4&&(part2Selector=", "+part1Selector,$(groupOptionProperties).each(function(ix2,e2){e2!=e&&(part1Selector+=":not([data-"+Simplistic.handleize(galleryOptions.galleryGroupByOptions[ix2])+"])",part2Selector+="[data-"+Simplistic.handleize(galleryOptions.galleryGroupByOptions[ix2])+'*="_'+Simplistic.handleize(optionsContainer[e2])+'_"]')})),slideSelector+=(slideSelector==""||galleryOptions.galleryGroupMatchMode==1?"":", ")+part1Selector+part2Selector});var withoutAltSelector=" .slide";$(galleryOptions.galleryGroupByOptions).each(function(){withoutAltSelector+=":not([data-"+Simplistic.handleize(this)+"])"}),slideSelector+=", "+withoutAltSelector;var sortCompare=function(a,b){if(akey=$(a).attr("data-index"),bkey=$(b).attr("data-index"),akey==bkey)return 0;if(akey<bkey)return-1;if(akey>bkey)return 1};gallery.find(slideSelector).sortDomElements(sortCompare).addClass("slideVisible"),gallery.slick("slickFilter",".slideVisible"),gallery.slick("slickGoTo",0,!0)}};var initializeVariantSelector=function(){var variantSelectorId="product-select-"+product.id,selectCallback=onVariantSelected();new Shopify.OptionSelectors(variantSelectorId,{product:product,onVariantSelected:selectCallback}),product.options.length>1?(product.variants.length>1&&linkOptionSelectors(product),product.options.length==1&&product.options[0]!="Title"&&item.find(".selector-wrapper:eq(0)").prepend("<label>"+product.options[0]+"</label>"),item.find(".selector-wrapper label").append(":")):product.variants.length>1&&item.find(".select-variant").change(function(){var variantSelected=!1;$.each(product.variants,function(key,variant){if(variant.id==item.find(".select-variant").val()){variantSelected=variant;return}}),selectCallback(variantSelected,null)}),item.find(".swatch :radio").change(function(){var optionIndex=$(this).closest(".swatch").attr("data-option-index"),optionValue=$(this).val();$(this).closest("form").find(".single-option-selector").eq(optionIndex).val(optionValue).trigger("change")}),product.variants.length==1?selectCallback(product.variants[0],null):productJs.setVariant(productJs.getFirstAvailableVariant())};productJs.getFirstAvailableVariant=function(){for(var i=0;i<product.variants.length;i++)if(product.variants[i].available)return product.variants[i]},productJs.getVariantBySku=function(sku){for(var i=0;i<product.variants.length;i++)if(product.variants[i].sku==sku)return product.variants[i]},productJs.getVariantById=function(id){for(var i=0;i<product.variants.length;i++)if(product.variants[i].id==id)return product.variants[i]},productJs.getCurrentVariant=function(){var variantId=item.find("[name=id]").val();return variantId!=""?productJs.getVariantById(variantId):!1},productJs.getProduct=function(){return product},productJs.setVariant=function(variant){variant&&(isNaN(variant)||(variant=productJs.getVariantById(variant)),item.find(".single-option-selector").each(function(){var selector=this,option=$(selector).data("option");$(selector).find("option").each(function(){if(this.value==variant[option]){$(selector).val(this.value);return}})}),item.find(".single-option-selector:first").trigger("change"))};var onVariantSelected=function(){return function(variant,selector){if(variant&&variant.id){for(var form=item.find("form"),i=0,length=variant.options.length;i<length;i++){var radioButton=form.find('.swatch[data-option-index="'+i+'"] :radio[value="'+variant.options[i]+'"]');radioButton.length>0&&(radioButton.get(0).checked=!0,$(radioButton).closest(".swatch").find(".head span").html($(radioButton).val()))}if(item.find('[data-price="deal"]').html(Shopify.formatMoney(variant.price,Simplistic.formatMoney).replace(".00","").replace(" ","")),item.find(".product-bottom-bar .price .deal span").html(Shopify.formatMoney(variant.price,Simplistic.formatMoney).replace(".00","").replace(" ","")),variant.compare_at_price!=null){var retailPrice=Shopify.formatMoney(variant.compare_at_price,Simplistic.formatMoney).replace(".00","").replace(" ",""),percentDiscount=Math.round((variant.compare_at_price-variant.price)*100/variant.compare_at_price),moneyDiscount=Shopify.formatMoney(variant.compare_at_price-variant.price,Simplistic.formatMoney).replace(".00","").replace(" ","");item.find('[data-price="retail"]').html(retailPrice),item.find('[data-price="off-percent"]').html(percentDiscount+"%"),item.find('[data-price="off-amount"]').html(moneyDiscount)}filterImages(variant),updateFabricImage(product,variant),item.find("#product-"+product.id+"-variant").val(variant.id)}else item.find("#product-"+product.id+"-variant").val("");updateButtons(variant),updateCutomizationEngineButtonLink(variant),$(item).trigger("variantChange",[variant])}},filterImages=function(variant,notSwitchImg){variant&&(variant.featured_image,item.find(".main-images .slick-track").length>0&&(productJs.slickFilterThumbs(productJs.config.gallery.slickMainOptions,product.options,variant,item.find(".main-images")),variant.featured_image&&switchMainImage(variant.featured_image.src.replace("https:",""))),item.find(".thumbs .slick-track").length>0&&productJs.slickFilterThumbs(productJs.config.gallery.slickThumbsOptions,product.options,variant,item.find(".thumbs")))},updateFabricImage=function(product2,variant){if(variant){var option_index;$.each(product2.options,function(index,value){value.toLowerCase()=="color"&&(option_index=index)}),$(".about-fabric .img").hide(),$('.about-fabric .img[data-color="'+variant.options[option_index]+'"]').show()}},updateCutomizationEngineButtonLink=function(variant){if($(".customizable-btn").length>0){var url="https://articlesofstyle.com/products/"+product.handle+"?view=customize&variant="+variant.id;item.find(".customizable-btn").attr("href",url)}},updateButtons=function(variant){var status;product.available?status=variant?variant.status:"available":status="soldout";var PDPButtonsContainer=$(".product-buttons-container");switch($(".buttons-wrapper .add-button, .buttons-wrapper .sold-out-button, .soldout-product-message").hide(),PDPButtonsContainer.find(".content-available, .content-soldout, .quantity-box").hide(),status){case"available":$(".buttons-wrapper .add-button").show(),PDPButtonsContainer.find(".content-available, .quantity-box").show();break;case"soldout":$(".buttons-wrapper .sold-out-button").show(),$(".soldout-product-message").show(),PDPButtonsContainer.find(".content-soldout").show();break}},switchMainImage=function(newImageSrc){if(item.find(".main-images .slick-track").length>0){var newImageSrcClean=newImageSrc.split("?")[0],index=item.find(".main-images .slide:not(.slick-cloned) .large-thumb").index(item.find('.main-images .slide:not(.slick-cloned) .large-thumb[data-cleansrc="'+newImageSrcClean+'"]'));index>
1=0&&item.find(".main-images").slick("goTo",index)}},initGallery=function(){var mainGalleryLoaded=!1,thumbsGalleryLoaded=!1;if(item.find(".main-images").on("beforeChange",function(event,slick,currentSlide,nextSlide){item.find(".thumbs.switch .slide").removeClass("active"),item.find(".thumbs.switch .slide:not(.slick-cloned):eq("+nextSlide+")").addClass("active");var slidesToShow=item.find(".thumbs.switch").slick("slickGetOption","slidesToShow");slidesToShow==1?item.find(".thumbs.switch").slick("slickGoTo",nextSlide):item.find(".thumbs.switch").slick("slickGoTo",nextSlide-Math.floor((slidesToShow-1)/2))}),Simplistic.onImagesLoaded(item.find(".main-images img"),function(){item.find(".main-images").slick(productJs.config.gallery.slickMainOptions),filterImages(productJs.getCurrentVariant(),!0),mainGalleryLoaded=!0,mainGalleryLoaded&&thumbsGalleryLoaded&&item.trigger("galleryLoaded")}),item.find(".thumbs.switch a.gallery").on("click",function(e){e.preventDefault(),switchMainImage($(this).attr("href"));var variantId=$(this).attr("variant-id");variantId&&variantId!=""&&product.options.length<=1&&productJs.setVariant(variantId)}),Simplistic.onImagesLoaded(item.find(".thumbs .thumb-item img"),function(){item.find(".thumbs").slick(productJs.config.gallery.slickThumbsOptions),item.find(".thumbs .slide:not(.slick-cloned):eq(0)").addClass("active"),filterImages(productJs.getCurrentVariant(),!0),thumbsGalleryLoaded=!0,mainGalleryLoaded&&thumbsGalleryLoaded&&item.trigger("galleryLoaded")}),item.find(".product-gallery").hasClass("zoom-in")&&!isMobile.any&&item.find(".active-wrapper img").each(function(){var mainProductImage=$(this);if(mainProductImage.length>0){var zoomedSrc=$(this).data("file");$(this).wrap('<span style="display:block"></span>').css("display","block").parent().zoom({url:zoomedSrc,callback:function(){item.find("#active-wrapper img.zoomImg").prop("alt","")}})}}),$(".active-wrapper a.productImage").length>0){var dataArray=new Array,photoSwipeApplied=!1;item.find(".active-wrapper a.productImage").each(function(){var dataColor=$(this).data("color");typeof dataColor!="undefined"&&dataArray.indexOf(dataColor)<0&&(dataArray.push(dataColor),item.find(".active-wrapper a.productImage[data-color="+dataColor+"]").photoSwipe(),photoSwipeApplied=!0)}),photoSwipeApplied||item.find(".active-wrapper a.productImage").photoSwipe()}},updateOptionsInSelector=function(selectorIndex){switch(selectorIndex){case 0:var key="root",selector=item.find(".single-option-selector:eq(0)");break;case 1:var key=item.find(".single-option-selector:eq(0)").val(),selector=item.find(".single-option-selector:eq(1)");break;case 2:var key=item.find(".single-option-selector:eq(0)").val();key+=" / "+item.find(".single-option-selector:eq(1)").val();var selector=item.find(".single-option-selector:eq(2)")}var initialValue=selector.val();selector.empty();var options=optionsMapAll[key];if(options)for(var i=0;i<options.length;i++){var option=options[i],newOption=jQuery("<option></option>").val(option).html(option);selector.append(newOption)}var availableOptions=optionsMap[key],existingOptions=optionsMapAll[key];item.find('.swatch[data-option-index="'+selectorIndex+'"] .swatch-element').each(function(){jQuery.inArray($(this).attr("data-value"),existingOptions)!==-1?(jQuery.inArray($(this).attr("data-value"),availableOptions)!==-1?$(this).removeClass("soldout").find(":radio").removeAttr("checked"):$(this).addClass("soldout").find(":radio").removeAttr("checked"),$(this).show()):$(this).hide()}),jQuery.inArray(initialValue,availableOptions)!==-1&&selector.val(initialValue),selector.trigger("change")},linkOptionSelectors=function(product2){for(var i=0;i<product2.variants.length;i++){var variant=product2.variants[i];if(optionsMapAll.root=optionsMapAll.root||[],optionsMapAll.root.push(variant.option1),optionsMapAll.root=Shopify.uniq(optionsMapAll.root),product2.options.length>1){var key=variant.option1;optionsMapAll[key]=optionsMapAll[key]||[],optionsMapAll[key].push(variant.option2),optionsMapAll[key]=Shopify.uniq(optionsMapAll[key])}if(product2.options.length===3){var key=variant.option1+" / "+variant.option2;optionsMapAll[key]=optionsMapAll[key]||[],optionsMapAll[key].push(variant.option3),optionsMapAll[key]=Shopify.uniq(optionsMapAll[key])}if(variant.available){if(optionsMap.root=optionsMap.root||[],optionsMap.root.push(variant.option1),optionsMap.root=Shopify.uniq(optionsMap.root),product2.options.length>1){var key=variant.option1;optionsMap[key]=optionsMap[key]||[],optionsMap[key].push(variant.option2),optionsMap[key]=Shopify.uniq(optionsMap[key])}if(product2.options.length===3){var key=variant.option1+" / "+variant.option2;optionsMap[key]=optionsMap[key]||[],optionsMap[key].push(variant.option3),optionsMap[key]=Shopify.uniq(optionsMap[key])}}}updateOptionsInSelector(0),product2.options.length>1&&updateOptionsInSelector(1),product2.options.length===3&&updateOptionsInSelector(2),item.find(".single-option-selector:eq(0)").change(function(){return updateOptionsInSelector(1),product2.options.length===3&&updateOptionsInSelector(2),!0}),item.find(".single-option-selector:eq(1)").change(function(){return product2.options.length===3&&updateOptionsInSelector(2),!0})};return init()};
2//# sourceMappingURL=/cdn/shop/t/86/assets/ProductJs.js.map?v=15771555879260573819178816
27159

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.