PageSourceSearch

https://rampagecoffee.com/cdn/shop/t/33/assets/ktjs_product_sg.js?v=23426533907182324661718843188

js rampagecoffee.com collected 2026-09-26 10:56:17 UTC 61,058 bytes, 2 lines download raw bytes

1window.slate=window.slate||{},slate.Variants=(function(){function Variants(options){this.$container=options.$container,this.product=options.product,this.singleOptionSelector=options.singleOptionSelector,this.originalSelectorId=options.originalSelectorId,this.enableHistoryState=options.enableHistoryState,this.currentVariant=this._getVariantFromOptions(),this.template=this.originalSelectorId.replace("#ProductSelect-",""),$(this.singleOptionSelector,this.$container).on("change",this._onSelectChange.bind(this))}return Variants.prototype=_.assignIn({},Variants.prototype,{_getCurrentOptions:function(){var currentOptions=_.map($(this.singleOptionSelector,this.$container),function(element){var $element=$(element),type=$element.attr("type"),currentOption={};return type==="radio"||type==="checkbox"?$element[0].checked?(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption):!1:(currentOption.value=$element.val(),currentOption.index=$element.data("index"),currentOption)});return currentOptions=_.compact(currentOptions),currentOptions},_getVariantFromOptions:function(){var selectedValues=this._getCurrentOptions(),variants=this.product.variants,found=_.find(variants,function(variant){return selectedValues.every(function(values){return _.isEqual(variant[values.index],values.value)})});return found},_onSelectChange:function(){var variant=this._getVariantFromOptions();this.$container.trigger({type:"variantChange",variant}),variant&&(this.$container.trigger({type:"updateVariant",variant}),this._updateMasterSelect(variant),this._updateImages(variant),this._updatePrice(variant),this._updateSKU(variant),this.currentVariant=variant,this.enableHistoryState&&this._updateHistoryState(variant))},_updateImages:function(variant){if($(".color_sw.selected .swatch").length!=0)var firstVariantImage=$(".color_sw.selected .swatch").css("background-image").replace("_small_crop_center","").replace(/(url\(|\)|'|")/gi,"");var variantImage=variant.featured_media||{},currentVariantImage=$(".p-sgl__photos-"+this.template+" .swiper-slide-active").attr("data-src")||{};!variant.featured_media&&firstVariantImage==null||variantImage.src===currentVariantImage&&firstVariantImage==null||this.$container.trigger({type:"variantImageChange",variant})},_updatePrice:function(variant){variant.price===this.currentVariant.price&&variant.compare_at_price===this.currentVariant.compare_at_price||this.$container.trigger({type:"variantPriceChange",variant})},_updateSKU:function(variant){variant.sku!==this.currentVariant.sku&&this.$container.trigger({type:"variantSKUChange",variant})},_updateHistoryState:function(variant){if(!(!history.replaceState||!variant)){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+variant.id;window.history.replaceState({path:newurl},"",newurl)}},_updateMasterSelect:function(variant){$(this.originalSelectorId,this.$container).val(variant.id)}}),Variants})(),theme.Product=(function(){function Product(container){var $container=this.$container=$(container),sectionId=$container.attr("data-section-id"),productsectionId=$container.attr("data-product-id");if(theme.ktCountdown(container),this.settings={enableHistoryState:$container.data("enable-history-state")||!1,imageSize:"720x720",sectionId,zoomEnabled:$container.data("use-zoom"),thumbEnabled:$container.data("use-thumb"),imagesLayout:$container.data("images-layout"),ajaxCart:$container.data("enable-ajax-cart")||!1},this.selectors={template:"#ProductSection-"+sectionId,addToCart:"#AddToCart-"+sectionId,addToCartText:"#AddToCartText-"+sectionId,comparePrice:"#ComparePrice-"+sectionId,originalPrice:"#ProductPrice-"+sectionId,variesPrice:"#ProductVaries-"+sectionId,unitPrice:"#UnitPrice-"+sectionId,SKU:".variant-sku",originalSelectorId:"#ProductSelect-"+sectionId,productPhotosWrapper:".photos-wrapper-"+sectionId,productPhotos:".p-sgl__photos-"+sectionId,productPhotoImages:".p-sgl__photo--"+sectionId,productThumbsWrapper:".thumbs-wrapper-"+sectionId,productThumbs:".p-sgl__thumbs-"+sectionId,productThumbImages:".p-sgl__thumb--"+sectionId,singleOptionSelector:".sgl-opt-selector-"+sectionId,dataSettings:".datasettings--"+sectionId,dataJs:".datajs--"+sectionId,cartForm:"#cart
1-form--"+sectionId,progressBar:".progress_bar-"+sectionId,realTime:".realTime-"+sectionId,dateFromTo:".prd_delivery-"+sectionId,shipBL:".shipBL-"+sectionId,storeAvailabilityContainer:"[data-store-avai-container]"},!!$("#ProductJson-"+sectionId).html()){this.productSingleObject=JSON.parse(document.getElementById("ProductJson-"+sectionId).innerHTML),this.previewImage=_.map(this.productSingleObject.media,"preview_image"),this.modelsObject=JSON.parse(document.getElementById("ModelJson-"+sectionId).innerHTML),this.dataSettings=$(this.selectors.dataSettings).data(),this.dataSettings.progressBar=$(this.selectors.progressBar).length,this.dataSettings.realTime=$(this.selectors.realTime).length,this.dataSettings.dateFromTo=$(this.selectors.dateFromTo).length,this.dataJs=$(this.selectors.dataJs).data(),this.currentMedia="",this.storeAvailabilityContainer=$container.find(this.selectors.storeAvailabilityContainer)[0],this.storeAvailabilityContainer&&this._initStoreAvailability();var self=this;sectionId=="quickview-template"?setTimeout(function(){self._initBreakpoints()},400):this.settings.imagesLayout==="masonry"&&theme.window_W>=992?($(self.selectors.productThumbImages).length>=1&&$(self.selectors.productThumbsWrapper+":not(.first)").addClass("has-its"),$(self.selectors.productPhotoImages).length>=1&&$(self.selectors.productPhotosWrapper+":not(.first)").addClass("has-its"),this._initIsotope(),self._initPhotoSwipeFromDOM(),self._initPhotoZoom(!1),$(self.selectors.template+" iframe#resize-info-product").length>0&&(this._initStickySummary(),self._onReSizeInfo())):this._initBreakpoints(),this._stringOverrides(),this._initVariants(),this._initImageSwitch(),this._initSwatch(),this.dataJs.imgspos360.length>0&&this._create360(),this.dataSettings.useMaxheight&&($(self.selectors.template+" iframe#resize-image-product").length>0||$(self.selectors.template+" iframe#resize-image-product-qv").length>0)&&this._onReSizeImages(),this.dataSettings.stickyatc&&this._stickyAddCart(),this._AjaxForm(),theme.gadget.shipTo&&theme.gadget.shipToCs==!1&&this._shipTo(this.selectors.shipBL),this.dataSettings.progressBar&&this._stockCountdown().init(this.selectors.progressBar),this.dataSettings.realTime&&this._realTimeVisitor(this.selectors.realTime),this.dataSettings.dateFromTo&&this._dateFromTo(this.selectors.dateFromTo),$(self.selectors.template+" .table-products").length>0&&this._responTableGroup(),this.variants.currentVariant.featured_media&&this.variants.currentVariant.featured_media.preview_image&&(this.currentMedia=this.variants.currentVariant.featured_media.preview_image)}}return Product.prototype=_.assignIn({},Product.prototype,{_stringOverrides:function(){theme.productStrings=theme.productStrings||{},$.extend(theme.strings,theme.productStrings)},_initStoreAvailability:function(){this.storeAvailability=new theme.StoreAvailability(this.storeAvailabilityContainer)},_initBreakpoints:function(){var self=this,current_window_width=theme.window_W;KT.loadScript("swiper",function(e,l){l=="ok"&&($(self.selectors.productThumbImages).length>=1&&self._initThumbnailSlider(),$(self.selectors.productPhotoImages).length>=1&&self._initPhotoSlider(),$(window).on("resize",function(){(current_window_width>=576&&theme.window_W<576||current_window_width<576&&theme.window_W>=576)&&(self.dataSettings.useThumbVertical&&(typeof self.thumbSlider=="object"?self.thumbSlider.changeDirection():$(self.selectors.productThumbImages).length>=1&&self._initThumbnailSlider()),current_window_width=theme.window_W)}))})},_initIsotope:function(){var self=this;KT.loadScript("isotope",function(e,l){if(l=="ok"){var $grid=$(self.selectors.productPhotos).isotope({initLayout:!1,itemSelector:".p-sgl__photos-item",percentPosition:!0,masonry:{columnWidth:".grid-sizer"}});$grid.one("arrangeComplete",function(){self._mediaSlider(!1)}),$grid.isotope()}})},_initSwatch:function(){var self=this;$(self.$container).on("click",".--js-opt",function(e){e.preventDefault();var $this=$(this);goto=!0,optionIndex=$this.parents(".--js-selector").data("js-opt"),optionValue=$this.data("value");var selector=self.selectors.template+' .--js-selector[data-js-opt="'+optionIndex+'"]',$selector=$(selector);$(selector+" .--js-opt").removeClass("selected"),$(selector+' .--js-opt[data-value="'+optionValue+'"]').addClass("selected"),$selector.find(".fake_select.variant_image").length&&($selector.find(".fake_select.variant_image li").removeClass("selected"),$selector.find('.fake_select.variant_image li[data-value="'+optionValue+'"]').addClass("selected")),$(".fake_select.show").removeClass("show"),$selector.removeClass("op_pre_select error"),$(self.selectors.cartForm+" #SglOptSelector-"+optionIndex).val(optionValue).trigger("change"),$(".kt-stickyAddCart .swatch-on-grid._"+_snakeCase(optionValue)+" .swatch").trigger("click")})},_initVariants:function(){var self=this,options={$container:this.$container,enableHistoryState:this.$container.data("enable-history-state")||!1,singleOptionSelector:this.selectors.singleOptionSelector,originalSelectorId:this.selectors.originalSelectorId,product:this.productSingleObject};if(_.filter(theme.function.productOptionStyle,{op_pre_select:!0}).length&&(options.enableHistoryState=!1),this.variants=new slate.Variants(options),this.storeAvailability&&this.variants.currentVariant.available&&this.storeAvailability.updateContent(this.variants.currentVariant.id),this.$container.on("variantChange",this._updateAddToCart.bind(this)),this.$container.on("variantImageChange",this._updateImages.bind(this)),this.$container.on("variantPriceChange",this._updatePrice.bind(this)),this.$container.on("variantSKUChange",this._updateSKU.bind(this)),!this.dataJs.dfVariant){this.dataJs.dfVariant=!0;var option=this.variants.currentVariant.option1,check_option=0,optitonSelector1="SglOptSelector-0--"+self.settings.sectionId,optitonSelector2="SglOptSelector-1--"+self.settings.sectionId,optitonSelector3="SglOptSelector-2--"+self.settings.sectionId;_.forEach(self.productSingleObject.variants,function(variant){$.each($("#"+optitonSelector1+" option"),function(index,el){variant.option1!==option&&(check_option=0,option=variant.option1),check_option==0&&$(this).val()==variant.option1&&($(this).attr({"data-first-variant":$(self.selectors.originalSelectorId+' option[value="'+variant.id+'"]').data("value")}),variant.featured_image&&$(this).attr("data-featured-image",variant.featured_image.src),check_option++)})}),$.each($(".sgl-opt-selector-"+self.settings.sectionId),function(index,el){var $this=$(this),$selector=$('.--js-selector[data-js-opt="'+$this.data("js-selector")+'"]').first(),settings_op=_.find(theme.function.productOptionStyle,{name:$selector.data("n-opt")});settings_op!==void 0&&(settings_op.style==="combobox with_out_variant_image"||settings_op.color_watched&&self.dataSettings.swatchStyle!=="color")&&$.each($selector.find(".--js-opt"),function(idx,el2){var $this_=$(this),featuredImage=$this.find('option[value="'+$this_.attr("data-value")+'"]').attr("data-featured-image");if(featuredImage!==void 0){if(settings_op.style==="combobox with_out_variant_image"){var fileExt=_.last(featuredImage.split(".")),featuredImage=featuredImage.replace("."+fileExt,"_150x150_crop_center."+fileExt);$('[data-n-opt="'+$selector.data("n-opt")+'"] .--js-opt[data-value="'+$this_.attr("data-value")+'"]').find("img").attr("data-src",featuredImage).addClass("lazyload")}else if(settings_op.color_watched&&self.dataSettings.swatchStyle!=="color"){var fileExt=_.last(featuredImage.split(".")),featuredImage=featuredImage.replace("."+fileExt,"_100x100."+fileExt);$('[data-n-opt="'+$selector.data("n-opt")+'"] .--js-opt[data-value="'+$this_.attr("data-value")+'"]').find(".swatch").css({"background-image":'url("'+featuredImage
1+'")',"background-color":"transparent"})}}})}),this._initVariant(this.variants.currentVariant),this.$container.on("updateVariant",this._updateVariant.bind(this))}},_AjaxForm:function(){var self=this,$form=$(self.selectors.cartForm),itemGroup=new Array;$(document).on("change",".group-product .product-form__variants",function(){var $item=$(this).parents(".itemGroupProducts"),$option=$(this).find("option:selected"),pr=parseInt($option.attr("data-price")),cpr=parseInt($option.attr("data-c-price"));$item.find('[name="qty_group"]').attr({"data-id":$(this).val(),"data-price":pr,"data-c-price":cpr}),$item.find(".price ins").html(theme.Currency.formatMoney(pr,theme.moneyFormat)),pr!==cpr?$item.find(".price del").html(theme.Currency.formatMoney(cpr,theme.moneyFormat)).removeClass("d-none"):$item.find(".price del").addClass("d-none")}),$form.on("change",function(event){event.preventDefault();var itemsGroup=$form.find('[name="qty_group"]').length,crr_pr=self.variants.currentVariant.price,crr_c_pr=self.variants.currentVariant.compare_at_price||0;self.$container.hasClass("product-mix-a-match")&&(crr_pr=0,crr_c_pr=0),itemGroup=_.filter($(this).serializeArray(),{name:"qty_group",value:"0"}),itemsGroup!==itemGroup.length?($.each($form.find('[name="qty_group"]'),function(idx,el){var qty=$(this).val(),price=parseInt($(this).attr("data-price")),c_price=parseInt($(this).attr("data-c-price"));crr_pr=crr_pr+price*qty,crr_c_pr=crr_c_pr+c_price*qty}),$(".subtt_gr--"+self.settings.sectionId+" .subtt_gr-money").html(theme.Currency.formatMoney(crr_pr,theme.moneyFormat)),crr_pr!==crr_c_pr?$(".subtt_gr--"+self.settings.sectionId+" .subtt_gr-c-money").html(theme.Currency.formatMoney(crr_c_pr,theme.moneyFormat)).removeClass("d-none"):$(".subtt_gr--"+self.settings.sectionId+" .subtt_gr-c-money").addClass("d-none"),$form.addClass("may-add"),$(".subtt_gr--"+self.settings.sectionId).show()):($form.removeClass("may-add"),$(".subtt_gr--"+self.settings.sectionId).hide())}),this.settings.ajaxCart?$(document).on("submit",self.selectors.cartForm,function(e){if(e.preventDefault(),$(self.selectors.addToCart).removeClass("loaded").addClass("loading"),$(self.selectors.template).find(".op_pre_select").length>0)return $(self.selectors.template).find(".op_pre_select").addClass("error flash"),setTimeout(function(){$(self.selectors.template).find(".op_pre_select").removeClass("flash")},1e3),$(".btn.loading").removeClass("loading"),!1;if($form.find(".itemGroupProducts").length>0){var queue=[];$form.find('[name="quantity"]').length>0&&queue.push({id:parseInt($form.find('[name="id"]').val()),quantity:parseInt($form.find('[name="quantity"]').val())}),$(self.selectors.cartForm+' .itemGroupProducts [name="qty_group"]').each(function(){queue.push({id:parseInt($(this).attr("data-id")),quantity:parseInt($(this).val(),10)||0})}),Shopify.KT_addItems(queue)}else Shopify.KT_addItemFromForm("cart-form--"+self.settings.sectionId)}):this.settings.ajaxCart==!1&&$(document).on("submit",self.selectors.cartForm,function(e){if($(self.selectors.addToCart).removeClass("loaded").addClass("loading"),$(self.selectors.template).find(".op_pre_select").length>0)return e.preventDefault(),$(self.selectors.template).find(".op_pre_select").addClass("error flash"),setTimeout(function(){$(self.selectors.template).find(".op_pre_select").removeClass("flash")},1e3),$(".btn.loading").removeClass("loading"),!1;if($form.find(".itemGroupProducts").length>0){e.preventDefault();var queue=[];$form.find('[name="quantity"]').length>0&&queue.push({id:parseInt($form.find('[name="id"]').val()),quantity:parseInt($form.find('[name="quantity"]').val())}),$(self.selectors.cartForm+' .itemGroupProducts [name="qty_group"]').each(function(){queue.push({id:parseInt($(this).attr("data-id")),quantity:parseInt($(this).val(),10)||0})});var ajax={type:"POST",url:Shopify.root_url+"/cart/add.js",data:{items:queue},dataType:"json",success:function(e2){window.location.href=Shopify.root_url+"/cart"},error:function(e2){alert("error")}};$.ajax(ajax)}else return})},_initVariant:function(currentVariant){var self=this,options2=new Array,options3=new Array,option=currentVariant.option1,check_option=0,optitonSelector1="SglOptSelector-0--"+self.settings.sectionId,optitonSelector2="SglOptSelector-1--"+self.settings.sectionId,optitonSelector3="SglOptSelector-2--"+self.settings.sectionId;$.each($(".sgl-opt-selector-"+self.settings.sectionId+" option"),function(index,el){$(this).text($(this).val())}),$("._soulout").removeClass("_soulout"),$("._unavailable").removeClass("_unavailable"),$(".kt_flash_lable").text(""),_.forEach(self.productSingleObject.variants,function(value){value.option1===currentVariant.option1&&(options2.push(value.option2),value.option2===currentVariant.option2&&options3.push(value.option3)),value.available==!1&&(value.option1==currentVariant.option1&&value.option2==currentVariant.option2?$.each($("#"+optitonSelector3+" option"),function(index,el){value.option3==$(this).attr("value")&&$('[data-js-opt="2--'+self.settings.sectionId+'"] [data-value="'+value.option3+'"]').addClass("_soulout")}):value.option1==currentVariant.option1&&value.option3==currentVariant.option3&&$.each($("#"+optitonSelector2+" option"),function(index,el){value.option2==$(this).attr("value")&&$('[data-js-opt="1--'+self.settings.sectionId+'"] [data-value="'+value.option2+'"]').addClass("_soulout")}))}),options2=$.unique(options2),options3=$.unique(options3),$.each($("#"+optitonSelector2+" option"),function(index,el){if(_.indexOf(options2,$(this).attr("value"))==-1)$('[data-js-opt="1--'+self.settings.sectionId+'"] [data-value="'+$
1(this).val()+'"]').addClass("_unavailable").find(".kt_flash_lable").text(" - Unavailable");else if(self.dataSettings.swatchStyle!=="color"){var variant=_.filter(self.productSingleObject.variants,{option1:currentVariant.option1,option2:$(this).attr("value"),option3:currentVariant.option3}),featuredImage=variant[0].featured_image!==null?variant[0].featured_image.src:void 0;if(featuredImage!==void 0){var fileExt=_.last(featuredImage.split(".")),featuredImage=featuredImage.replace("."+fileExt,"_100x100_crop_center."+fileExt);$('[data-js-opt="1--'+self.settings.sectionId+'"] [data-value="'+$(this).val()+'"] .swatch').css("background-image",'url("'+featuredImage+'")')}}}),$.each($("#"+optitonSelector3+" option"),function(index,el){if(_.indexOf(options3,$(this).attr("value"))==-1)$('[data-js-opt="2--'+self.settings.sectionId+'"] [data-value="'+$(this).val()+'"]').addClass("_unavailable").find(".kt_flash_lable").text(" - Unavailable");else if(self.dataSettings.swatchStyle!=="color"){var variant=_.filter(self.productSingleObject.variants,{id:currentVariant.id}),featuredImage=variant[0].featured_image!==null?variant[0].featured_image.src:void 0;if(featuredImage!==void 0){var fileExt=_.last(featuredImage.split(".")),featuredImage=featuredImage.replace("."+fileExt,"_100x100_crop_center."+fileExt);$('[data-js-opt="2--'+self.settings.sectionId+'"] [data-value="'+$(this).val()+'"] .swatch').css("background-image",'url("'+featuredImage+'")')}}})},_initImageSwitch:function(){if($(this.selectors.productThumbImages).length){var self=this;$(self.$container).on("click",this.selectors.productThumbImages,function(evt){evt.preventDefault();var $el=$(this),template=self.selectors.template;if(typeof $el.attr("data-id")<"u"&&$el.attr("data-id")!==""){var varaintsByMedia=_.filter(self.productSingleObject.variants,function(variant){if(variant.featured_image&&variant.featured_image.variant_ids.includes(parseInt($el.attr("data-id"))))return variant});if(varaintsByMedia.length>1)$(template+' .--js-opt[data-value="'+varaintsByMedia[0].option1+'"]').first().trigger("click");else{goto=!1,$(template+" .fake_select li").removeClass("selected"),$(varaintsByMedia[0].options).each(function(index,opiton){var options_change=$(template+' option[value="'+opiton+'"]').val(),$options_change_=$(template+' option[value="'+opiton+'"]').parent();$(template+" .fake_select li._"+_handleize(opiton)).addClass("selected"),opiton!=self.productSingleObject.title&&$('[data-js-opt="'+index+"--"+self.settings.sectionId+'"]').hasClass("op_pre_select")===!1&&$(template+' label[data-change-label="SglOptSelector-'+index+"--"+self.settings.sectionId+'"] .js-change-label').text(opiton),options_change!=$options_change_.val()&&$options_change_.val(options_change).trigger("change")});var val_id=$el.attr("data-id");if($(this).parents("div.product-page").data("enable-history-state")==!0&&_.filter(theme.function.productOptionStyle,{op_pre_select:!0}).length<=0){var newurl=window.location.protocol+"//"+window.location.host+window.location.pathname+"?variant="+val_id;window.history.replaceState({path:newurl},"",newurl)}}}})}},_initThumbnailSlider:function(){var self=this,current_window_width=$(window).width();if($(self.selectors.productThumbsWrapper+":not(.first)").addClass("has-its"),self.thumbnailOptions)optionsThumbs=self.thumbnailOptions;else{var optionsThumbs=$(self.selectors.productThumbsWrapper).data();optionsThumbs.speed=500,optionsThumbs.watchSlidesVisibility=!0,optionsThumbs.grabCursor=!0,optionsThumbs.watchOverflow=!0,optionsThumbs.initialSlide=initialSlide||0,self.dataSettings.useThumbVertical&&current_window_width>=576&&(optionsThumbs.direction="vertical",optionsThumbs.slidesPerView="auto"),self.thumbnailOptions=optionsThumbs}self.thumbSlider=new Swiper(self.selectors.productThumbsWrapper,optionsThumbs)},_destroyThumbnailSlider:function(){this.thumbSlider.destroy(),this.thumbSlider=void 0,this.thumbnailOptions=void 0},_initPhotoSlider:function(){var self=this,videos={};$(self.selectors.productPhotosWrapper).addClass("has-its");var btnGroup=$(self.selectors.template+" .product-detail-image .btn-group");if(self.itsVisible=!1,self.photoOptions)options=self.photoOptions;else{var options=$(self.selectors.productPhotosWrapper).data();options.speed=500,options.watchSlidesVisibility=!0,options.grabCursor=!0,options.watchOverflow=!0,options.initialSlide=initialSlide||0,options.navigation={nextEl:".sw-btn-next-"+self.settings.sectionId,prevEl:".sw-btn-prev-"+self.settings.sectionId},options.pagination={el:".swiper-pagination",type:"bullets"},$(self.selectors.productThumbsWrapper).hasClass("oneImageThumb")===!1&&(options.thumbs={swiper:self.thumbSlider},theme.function.use_thumb_hidden_on_mb&&theme.window_W<768&&(options.thumbs=null)),self.productSingleObject.media.length>self.productSingleObject.images.length&&(options.simulateTouch=!1),options.on={init:function(swiper){initialSlide=0;
1var autoplay=!0,itemCrr=$(swiper.slides[swiper.activeIndex]);if((itemCrr.find("video").length<=0||itemCrr.find(".bgndVideo").length<=0)&&(autoplay=!1),self._mediaSlider(autoplay),self._initPhotoSwipeFromDOM(),self._initPhotoZoom(!0),btnGroup.length>0){btnGroup.css("z-index","-1");for(var i=swiper.activeIndex;i<swiper.activeIndex+swiper.visibleSlidesIndexes.length;i++)if($(swiper.slides[i]).hasClass("gallery-image"))return btnGroup.css("z-index","1"),!0}},slideChange:function(swiper){if(self.itsVisible||($(self.selectors.productPhotosWrapper).addClass("its-visible"),self.itsVisible=!0),swiper.thumbs.swiper){var thumbsSwiper=swiper.thumbs.swiper,crridx=swiper.activeIndex,slides=thumbsSwiper.slides.length;crridx===thumbsSwiper.visibleSlidesIndexes[thumbsSwiper.visibleSlidesIndexes.length-1]&&crridx<slides&&self.thumbSlider.translateTo(-1*thumbsSwiper.snapGrid[thumbsSwiper.visibleSlidesIndexes[1]],300,!1),crridx===thumbsSwiper.visibleSlidesIndexes[0]&&crridx!==0&&self.thumbSlider.translateTo(-1*thumbsSwiper.snapGrid[thumbsSwiper.visibleSlidesIndexes[0]-1],300,!1)}typeof jQuery.fn.YTPlayer=="function"&&$.each($(self.selectors.productPhotosWrapper+" .bgndVideo"),function(){$(this).YTPPause()}),$.each($(self.selectors.productPhotosWrapper+" video"),function(){$(this).trigger("pause")});var itemCrr=$(swiper.slides[swiper.activeIndex]);if(itemCrr.find(".lazyloading:not(.lazyload)").addClass("lazyload"),itemCrr.find(".plyr__video-wrapper video").length>0?$(itemCrr).find("video").trigger("play"):itemCrr.find(".bgndVideo.mb_YTPlayer").length>0?itemCrr.find(".bgndVideo.mb_YTPlayer").YTPPlay():itemCrr.find("model-viewer").length>0&&(itemCrr.find("model-viewer").trigger("click"),$(self.selectors.template+" .view-in-space").attr("data-shopify-model3d-id",itemCrr.find("model-viewer").attr("data-model-id"))),theme.is_mobile==!1&&self.settings.zoomEnabled&&typeof $.fn.zoom=="function"&&($(self.selectors.template+" .photos-wrapper .p-sgl__photos-item").trigger("zoom.destroy"),$.each($(self.selectors.template+" .photos-wrapper .gallery-image.swiper-slide-visible"),function(index,val){$(this).zoom({url:$(this).attr("data-src")})})),btnGroup.length>0){btnGroup.css("z-index","-1");for(var i=swiper.activeIndex;i<swiper.activeIndex+swiper.visibleSlidesIndexes.length;i++)if($(swiper.slides[i]).hasClass("gallery-image"))return btnGroup.css("z-index","1"),!0}}},self.photoOptions=options}self.photoSlider=new Swiper(self.selectors.productPhotosWrapper+":not(.first)",options)},_mediaSlider:function(autoplay){var self=this;if($(self.selectors.productPhotosWrapper+" .plyr__video-wrapper video").length>0||$(self.selectors.productPhotosWrapper+" .bgndVideo.mb_YTPlayer").length>0||$(self.selectors.productPhotosWrapper+" .shopify-model-viewer-ui").length>0)return!0;self.dataSettings.video5&&(KT.loadScript("plyr",function(e,l){l=="ok"&&$.each($(self.selectors.productPhotosWrapper+":not(.first) video"),function(index,el){var player=new Shopify.Plyr($(this),{loop:{active:!0},autoplay})})}),autoplay=!1),self.dataSettings.externalVideo&&(KT.loadScript("YTPlayer",function(e,l){l=="ok"&&$.each($(self.selectors.productPhotosWrapper+":not(.first) .bgndVideo"),function(index,el){$(this).YTPlayer({autoPlay:autoplay})})}),autoplay=!1),self.dataSettings.model&&(KT.loadScript("shopify-xr",function(e,l){l=="ok"&&(ShopifyXR.addModels(self.modelsObject),ShopifyXR.setupXRElements())}),KT.loadScript("model-viewer-ui",function(e,l){l=="ok"&&$.each($(self.selectors.productPhotosWrapper+":not(.first) model-viewer"),function(index,el){var modelViewerUi=new Shopify.ModelViewerUI(this)})}))},_destroyPhotoSlider:function(){this.photoSlider.destroy(),this.photoSlider=void 0,this.photoOptions=void 0}
1,_updateVariant:function(evt){var variant=evt.variant,dataJs=this.dataJs;if($(".prd-mirror-"+this.productSingleObject.id).length>0&&$(".prd-mirror-"+this.productSingleObject.id).val(variant.id).trigger("change"),this._initVariant(variant),!(variant.featured_media==null||variant.featured_media==null)&&this.dataSettings.gallery&&dataJs.curpos.join(",")!=dataJs.imgspos){if(this.currentMedia.src==variant.featured_media.preview_image.src)return;this.currentMedia=variant.featured_media.preview_image,this._updateGallery(variant)}},_updateAddToCart:function(evt){var variant=evt.variant,self=this,template=self.selectors.template,sectionId=self.settings.sectionId;if(variant){this.storeAvailability&&this.storeAvailability.updateContent(evt.variant.id);var variantOption=$(template+' option[value="'+variant.id+'"]');variant.inventory_quantity=parseInt(variantOption.data("inventory-quantity")),variant.incoming=variantOption.data("incoming"),$("#SglOptSelector-0--"+sectionId)!==void 0&&$('[data-js-opt="0--'+sectionId+'"]').hasClass("op_pre_select")==!1&&$('label[data-change-label="0--'+sectionId+'"] .js-change-label').html($("#SglOptSelector-0--"+sectionId).val()),$("#SglOptSelector-1--"+sectionId)!==void 0&&$('[data-js-opt="1--'+sectionId+'"]').hasClass("op_pre_select")==!1&&$('label[data-change-label="1--'+sectionId+'"] .js-change-label').html($("#SglOptSelector-1--"+sectionId).val()),$("#SglOptSelector-2--"+sectionId)!==void 0&&$('[data-js-opt="2--'+sectionId+'"]').hasClass("op_pre_select")==!1&&$('label[data-change-label="2--'+sectionId+'"] .js-change-label').html($("#SglOptSelector-2--"+sectionId).val()),$(this.selectors.productPrices).removeClass("visibility-hidden").attr("aria-hidden","true"),variant.available?(self.dataSettings.useQty&&$(template).find(".item-quantity--"+sectionId).show(),$(template).find(".kt_progress_bar").slideDown(),$(".fbt-item #ip_"+self.productSingleObject.id+":not(:checked)").removeAttr("disabled").trigger("click").attr("disabled","disabled"),$(".notify-"+self.productSingleObject.id).slideUp(),variant.inventory_quantity>0&&variant.inventory_management!==null&&($("#qty-"+sectionId).attr("max",variant.inventory_quantity).trigger("change"),this.dataSettings.progressBar&&($(self.selectors.progressBar).attr("data-remaining_items",variant.inventory_quantity),self._stockCountdown().updateMeter(self.selectors.progressBar,variant.inventory_quantity,!0)))):($(".notify-"+self.productSingleObject.id).slideDown(),$(".fbt-item #ip_"+self.productSingleObject.id+":checked").removeAttr("disabled").trigger("click").attr("disabled","disabled"),$(template).find(".item-quantity--"+sectionId).hide(),$(template).find(".kt_progress_bar").slideUp()),variant.available||variant.incoming?($(this.selectors.addToCart).prop("disabled",!1),variant.inventory_quantity<=0&&variant.inventory_management==="shopify"&&variant.incoming||!variant.inventory_quantity&&variant.incoming?($(".preOrder--"+sectionId).slideDown().find("span").html(variant.incoming),$(this.selectors.addToCartText).text(theme.strings.preOrder)):($(".preOrder--"+sectionId).slideUp(),$(this.selectors.addToCartText).text(theme.strings.addToCart)),$(template).find(".shopifyPaymentButton").show()):($(this.selectors.addToCart).prop("disabled",!0),$(this.selectors.addToCartText).text(theme.strings.soldOut),$(template).find(".shopifyPaymentButton").hide())}else if(goto==!0){$("[data-op-pre-select]").each(function(index,el){let $this=$(this);$this.addClass("op_pre_select"),$this.find(".js-change-label").html(theme.productStrings.label_select+$this.attr("data-n-opt").toLowerCase())});var option1=$("#SglOptSelector-0--"+sectionId).val(),option1_cr=option1,options=$("#SglOptSelector-0--"+sectionId+' option[value="'+option1+'"]').attr("data-first-variant").split(" / ");$(template+" .fake_select li").removeClass("selected"),$(options).each(function(index,option){if(options.length==3&&index==1&&optionIndex=="SglOptSelector-1--"+sectionId&&(option=optionValue),options.length==3&&index==2&&optionIndex=="SglOptSelector-1--"+sectionId){var vr_available=_.find(self.productSingleObject.variants,{option1,option2:optionValue});option=vr_available.option3}if(index===0&&option!==option1_cr)$(template+' .fake_select li[data-value="'+option1_cr+'"]').addClass("selected");else{var options_change=$(template+" option[value='"+option+"']").val(),$options_change_=$(template+" option[value='"+option+"']").parent();$(template+' .fake_select li[data-value="'+option+'"]').addClass("selected"),$('label[data-change-label="'+index+"--"+sectionId+'"] .js-change-label').html(option),options_change!=$options_change_.val()&&$options_change_.val(options_change).change()}})}},_updateImages:function(evt){var self=this,variant=evt.variant;if(variant.featured_media!=null){var variantImage=variant.featured_media.preview_image.src;if(variantImage!=null&&goto==!0){var $photo=$(this.selectors.productPhotos+' .p-sgl__photos-item[data-src="'+theme.Images.removeProtocol(variantImage)+'"]');slideIndex=$photo.index(),self.photoSlider!==void 0&&self.photoSlider.slideTo(slideIndex,300,!1)}}},_updateGallery:function(variant){var self=this,dataJs=this.dataJs,imgPos=variant.featured_media?_.indexOf(_.map(self.previewImage,"src"),variant.featured_media.preview_image.src)+1:parseInt($(this.selectors.dataJs).attr("data-vrimgpos")),imgspr=dataJs.imgspos.split(","),imgsArray=_.map(self.previewImage,"src"),htmlPhotoImages="";if($(self.selectors.productThumbImages).length>=1)var htmlThumbImages="";var last_imgPos=$(this.selectors.dataJs).attr("data-vrimgpos");if(_.indexOf(imgspr,imgPos.toString())==-1&&last_imgPos==imgPos.toString())return!0;var imgsPos=[];
1_.forEach(imgspr,function(value,idx0){if(parseInt(value)>=imgPos)return parseInt(value)==imgsArray.length?(imgsPos.push(parseInt(imgspr[idx0])),imgsPos.push(parseInt(value)),!1):(imgsPos.push(parseInt(value)),imgsPos.push(parseInt(imgspr[idx0+1])),!1)});var newgallery=!1;if($.unique($.merge(JSON.parse($(this.selectors.dataJs).attr("data-curpos")),imgsPos)).length>2&&(newgallery=!0),parseInt(imgsPos[0])==parseInt(imgsPos[1])&&(newgallery=!0),imgspr.length<=0&&!newgallery)return!0;$(this.selectors.dataJs).attr("data-curpos","["+imgsPos[0]+","+imgsPos[1]+"]"),$(this.selectors.dataJs).attr("data-vrimgpos",imgPos);var imgsprw=_.map(self.previewImage,"width"),imgsprh=_.map(self.previewImage,"height");if($(this.selectors.productThumbs).length>0)var image_size=theme.Images.imageSize($(this.selectors.productThumbs+" .p-sgl__thumb-image:first").attr("src"))||theme.Images.imageSize($(this.selectors.productThumbs+" .p-sgl__thumb-image:first").attr("data-src"));var image_size_=image_size||"220x220",count_img=positionIdx=0,kt_visible=!1;if(theme.function.productImgType==="normal")var featured_image=self.productSingleObject.media[0].preview_image,a_ratioW=featured_image.width,a_ratioH=featured_image.height;_.forEach(self.productSingleObject.media,function(media,idx){if(parseInt(imgsPos[1])<idx+1)return!0;if(kt_visible=!1,parseInt(imgsPos[0])<=idx+1&&parseInt(imgsPos[1])>idx+1&&(kt_visible=!0),parseInt(imgsPos[0])==parseInt(imgsPos[1])&&parseInt(imgsPos[0]==idx+1)&&(kt_visible=!0),parseInt(imgsPos[0])==parseInt(imgsPos[1])&&parseInt(imgsPos[0])==idx+1&&parseInt(imgsPos[1])==imgsArray.length&&(kt_visible=!0),imgspr[imgspr.length-2]!==imgspr[imgspr.length-1]&&parseInt(imgsPos[1])==idx+1&&parseInt(imgsPos[1])==imgsArray.length&&(kt_visible=!0),kt_visible==!0){var fileExt=_.last(media.preview_image.src.split(".")),img_url_photo=media.preview_image.src.replace("."+fileExt,"_{width}x."+fileExt);if($(self.selectors.productThumbs).length>0)var img_url_thumb=media.preview_image.src.replace("."+fileExt,"_"+image_size+"."+fileExt);var varaintsByMedia=_.filter(self.productSingleObject.variants,function(variant2){if(variant2.featured_media&&variant2.featured_media.preview_image.src==media.preview_image.src)return variant2}),productImgType=theme.function.productImgType==="stretch"?" is-cover":"",positionCss=" one_hundred";count_img!==0&&(positionCss=" sixties",(positionIdx==1||positionIdx==2)&&(positionCss=" forty",positionIdx==2&&(positionIdx=-1)),positionIdx++);var image_fit=theme.function.productImgType==="stretch"?theme.Images.imgFit(media.preview_image.width,media.preview_image.height,a_ratioW,a_ratioH):"",alt=varaintsByMedia.length>0?' title="'+varaintsByMedia[0].title+'"':"",id=varaintsByMedia.length>0?' data-id="'+varaintsByMedia[0].id+'"':"";switch(htmlPhotoImages+='<div class="swiper-slide p-sgl__photos-item  gallery-'+media.media_type+productImgType+positionCss+'" data-src="'+media.preview_image.src+'">',htmlPhotoImages+='<div class="p-sgl__photo p-sgl__photo-'+idx+" p-sgl__photo--"+self.settings.sectionId+' aspectRatio" data-src="'+media.preview_image.src+'"'+alt+id+">",media.media_type!=="external_video"&&(htmlPhotoImages+='<img width="'+media.preview_image.width+'" height="'+media.preview_image.height+'" class="p-sgl__photo-image lazyload mll-lz '+image_fit+'"',htmlPhotoImages+=' src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="',htmlPhotoImages+=' data-srcbase="'+media.preview_image.src.replace("."+fileExt,"_"+image_size_+"."+fileExt)+'"',htmlPhotoImages+=' data-src="'+img_url_photo+'" data-widths="[335, 550, 720, 900, 1080]"',htmlPhotoImages+=' data-aspectratio="'+media.preview_image.width/media.preview_image.height+'"',htmlPhotoImages+=' data-srcfix="'+media.preview_image.src+'"',media.media_type==="image"&&(htmlPhotoImages+=' data-size="'+media.preview_image.width+"x"+media.preview_image.height+'"'),htmlPhotoImages+=' data-sizes="auto" style="padding-bottom: '+1/media.aspect_ratio*100+'%">'),media.media_type){case"external_video":htmlPhotoImages+='<div class="video_content video_content_'+media.id+' embed-responsive embed-responsive-16by9">',htmlPhotoImages+='<div class="position-absolute" style="top: 0;left: 0;width: 100%;height: 100%;">',htmlPhotoImages+='<div class="position-relative" style="width: 100%;height: 100%;">',media.host=="youtube"?htmlPhotoImages+=`<div class="bgndVideo" data-property="{videoURL:'https://www.youtube.com/watch?v=`+media.external_id+`', quality:'highres', stopM
1ovieOnBlur: false, containment: 'self', vol: 100}"></div>`:htmlPhotoImages+='<iframe src="https://player.vimeo.com/video/'+media.external_id+'?autoplay=1&loop=1&title=0&byline=0&portrait=0" frameborder="0" allow="autoplay; fullscreen; picture-in-picture" allowfullscreen></iframe>',htmlPhotoImages+="</div>",htmlPhotoImages+="</div>",htmlPhotoImages+="</div>";break;case"video":htmlPhotoImages+='<div class="video_content video_content_'+media.id+'">',htmlPhotoImages+='<video playsinline="playsinline" controls="controls" loop="loop" preload="none" class="video-element" aria-label="'+self.productSingleObject.title+'" poster="'+media.preview_image.src.replace("."+fileExt,"_720x."+fileExt)+'">',$.each(media.sources,function(index,source){htmlPhotoImages+='<source src="'+source.url+'" type="'+source.mime_type+'">'}),htmlPhotoImages+='<img src="'+media.preview_image.src.replace("."+fileExt,"_720x."+fileExt)+'">',htmlPhotoImages+="</video>",htmlPhotoImages+="</div>";break;case"model":htmlPhotoImages+='<div class="video_content model_content model_content_'+media.id+'">',htmlPhotoImages+='<model-viewer reveal="interaction" toggleable="true" data-model-id="'+media.id+'" src="'+media.sources[0].url+'" camera-controls="true" data-shopify-feature="0.8" alt="'+self.productSingleObject.title+'" poster="'+media.preview_image.src.replace("."+fileExt,"_720x."+fileExt)+'"></model-viewer>
1',htmlPhotoImages+="</div>";break;default:}if(theme.function.productImgType==="normal"&&self.settings.imagesLayout==="masonry"&&(htmlPhotoImages+='<style media="(min-width: 992px)">.product-page .aspectRatio.p-sgl__photo-'+idx+"{padding-bottom:"+1/media.preview_image.aspect_ratio*100+"%}</style>"),htmlPhotoImages+="</div></div>",$(self.selectors.productThumbs).length>0){switch(htmlThumbImages+='<div class="swiper-slide p-sgl__thumbs-item gallery-'+media.media_type+productImgType+'" data-src="'+media.preview_image.src+'">',htmlThumbImages+='<div class="p-sgl__thumb p-sgl__thumb--'+self.settings.sectionId+' aspectRatio" data-src="'+media.preview_image.src+'"'+alt+id+">",htmlThumbImages+='<img class="p-sgl__thumb-image lazyload mll-lz '+image_fit+'" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="'+img_url_thumb+'" alt="'+self.productSingleObject.title+'" style="padding-bottom: '+1/media.aspect_ratio*100+'%">',media.media_type){case"external_video":htmlThumbImages+='<div class="btn play"><i class="fkt-play m-0i" aria-hidden="true"></i></div>';break;case"video":htmlThumbImages+='<div class="btn play"><i class="fkt-play m-0i" aria-hidden="true"></i></div>';break;case"model":htmlThumbImages+='<div class="btn play p-0i"><svg aria-hidden="true" focusable="false" role="presentation" class="icon icon--full-color icon-3d-badge-full-color" viewBox="0 0 26 26"><path class="icon-3d-badge-full-color-element" d="M19.13 8.28L14 5.32a2 2 0 0 0-2 0l-5.12 3a2 2 0 0 0-1 1.76V16a2 2 0 0 0 1 1.76l5.12 3a2 2 0 0 0 2 0l5.12-3a2 2 0 0 0 1-1.76v-6a2 2 0 0 0-.99-1.72zm-6.4 11.1l-5.12-3a.53.53 0 0 1-.26-.38v-6a.53.53 0 0 1 .27-.46l5.12-3a.53.53 0 0 1 .53 0l5.12 3-4.72 2.68a1.33 1.33 0 0 0-.67 1.2v6a.53.53 0 0 1-.26 0z" opacity=".6" style="isolation:isolate"></path></svg></div>';break;default:}htmlThumbImages+="</div></div>"}count_img++}});var templateImages=self.selectors.template;if(self.settings.imagesLayout==="masonry"&&theme.window_W>=992)$(self.selectors.productPhotos+" .p-sgl__photos-item").each(function(index,el){$(self.selectors.productPhotos).isotope("remove",this),index+1==$(self.selectors.productPhotos+" .p-sgl__photos-item").length&&($(self.selectors.productPhotos).append(htmlPhotoImages),$.each($(self.selectors.productPhotos+" .p-sgl__photos-item"),function(index2,val){$(this).attr("style")==null&&$(self.selectors.productPhotos).isotope("appended",$(this)).isotope("layout"),index2+1==$(self.selectors.productPhotos+" .p-sgl__photos-item").length&&self._mediaSlider(!1)}))});else{var thumbs=$("#product-thumb-slide--"+self.settings.sectionId),photos=$("#product-photo-slide--"+self.settings.sectionId);thumbs.data("vertical")&&(count_img>1?(thumbs.removeClass("oneImageThumb"),photos.removeClass("oneImagePhoto")):(thumbs.addClass("oneImageThumb"),photos.addClass("oneImagePhoto"))),typeof self.thumbSlider=="object"&&(self.thumbSlider.removeAllSlides(),self.thumbSlider.appendSlide(htmlThumbImages)),self.photoSlider.removeAllSlides(),self.photoSlider.appendSlide(htmlPhotoImages),self._mediaSlider(!1)}},_updatePrice:function(evt){var variant=evt.variant,self=this,template=self.selectors.template;if($(this.selectors.originalPrice).html(theme.Currency.formatMoney(variant.price,theme.moneyFormat)),$(this.selectors.originalPrice.replace("#",".")).html(theme.Currency.formatMoney(variant.price,theme.moneyFormat)),variant.compare_at_price>variant.price?($(this.selectors.comparePrice).html(theme.Currency.formatMoney(variant.compare_at_price,theme.moneyFormat)).removeClass("d-none"),$(this.selectors.comparePrice.replace("#",".")).html(theme.Currency.formatMoney(variant.compare_at_price,theme.moneyFormat)).removeClass("d-none"),$(this.selectors.originalPriceWrapper).addClass(this.selectors.saleClasses),$(this.selectors.saleLabel).removeClass("d-none")):($(this.selectors.comparePrice).addClass("d-none"),$(this.selectors.comparePrice.replace("#",".")).addClass("d-none"),$(this.selectors.saleLabel).addClass("d-none"),$(this.selectors.originalPriceWrapper).removeClass(this.selectors.saleClasses)),variant.unit_price){$(this.selectors.unitPrice).show().removeClass("d-none"),$(this.selectors.unitPrice.replace("#",".")).show().removeClass("d-none");var unit_price_base_unit=variant.unit_price_measurement.quantity_value+variant.unit_price_measurement.quantity_unit;unit_price_base_unit+=' (<span class="unit_price">'+theme.Currency.formatMoney(variant.unit_price,theme.moneyFormat)+"</span>
1 / ",unit_price_base_unit+='<span class="base_unit">',variant.unit_price_measurement&&(variant.unit_price_measurement.reference_value!=1&&(unit_price_base_unit+=variant.unit_price_measurement.reference_value),unit_price_base_unit+=variant.unit_price_measurement.reference_unit),unit_price_base_unit+="</span>",unit_price_base_unit+="</span>)",$(this.selectors.unitPrice).html(unit_price_base_unit),$(this.selectors.unitPrice.replace("#",".")).html(unit_price_base_unit)}else $(this.selectors.unitPrice).hide().addClass("d-none"),$(this.selectors.unitPrice.replace("#",".")).hide().addClass("d-none");$(".fbt-item .ktlz-form-pid-"+self.productSingleObject.id).length>0&&($(".fbt-item .ktlz-form-pid-"+self.productSingleObject.id+" ins").html(theme.Currency.formatMoney(variant.price,theme.moneyFormat)),variant.compare_at_price>variant.price?$(".fbt-item .ktlz-form-pid-"+self.productSingleObject.id+" del").html(theme.Currency.formatMoney(variant.compare_at_price,theme.moneyFormat)):$(".fbt-item .ktlz-form-pid-"+self.productSingleObject.id+" del").html("")),theme.function.multiCurrency==!0&&localStorageCurrency!==null&&localStorageCurrency!==shopCry&&Kt_currency.convertAll(shopCry,localStorageCurrency,"span.money")},_updateSKU:function(evt){var variant=evt.variant;$(this.selectors.SKU).html(variant.sku)},_onReSizeImages:function(){var self=this,iframe=$(self.selectors.template+" iframe#resize-image-product");self.selectors.template=="#ProductSection-quickview-template"&&(iframe=$(self.selectors.template+" iframe#resize-image-product-qv"));function maxHeight(){$(window).width()>=768?(self.selectors.template=="#ProductSection-product-template"&&self.dataSettings.useMaxheight&&$(self.selectors.template+" .content-summary").css("max-height",iframe.height()),self.selectors.template=="#ProductSection-quickview-template"&&$("#md_qvModal .content-summary").css("max-height",iframe.height())):$(".content-summary").css("max-height","")}maxHeight(),iframe.each(function(){$(this.contentWindow||this).resize($.throttle(150,maxHeight))})},_initPhotoZoom:function(slide){var self=this;theme.is_mobile==!1&&self.settings.zoomEnabled&&KT.loadScript("zoom",function(e,l){if(l=="ok"){var selector=self.selectors.template+" .photos-wrapper .gallery-image";slide&&(selector=self.selectors.template+" .photos-wrapper .gallery-image.swiper-slide-visible"),$.each($(selector),function(index,val){var $this=$(this);$this.zoom({url:$this.attr("data-src")})}),$(self.$container).on("click","img.zoomImg",function(event){event.preventDefault(),$(self.selectors.template+' img[data-srcfix="'+theme.Images.removeProtocol(event.target.currentSrc)+'"]').trigger("click")})}})},_initPhotoSwipeFromDOM:function(){var self=this;self.dataSettings.wide&&KT.loadScript("photo-swipe",function(e,l){l=="ok"&&theme.initPhotoSwipeFromDOM(self.selectors.template+" .photos-wrapper",".p-sgl__photo","IMG",function(currentIndex,currentItem){if($(self.selectors.template+" .photos-wrapper .p-sgl__photos-item").length!==0&&self.photoSlider!==void 0){var itemSlick=$(self.selectors.template+" .photos-wrapper").find('.p-sgl__photos-item[data-src~="'+currentItem.src+'"]');if($(itemSlick).length!==0){var slideIndex2=$(itemSlick).closest(".p-sgl__photos-item").index();self.photoSlider.slideTo(slideIndex2,300)}}})})},_stickyAddCart:function(){var self=this;$(document).on("click",".kt-stickyAddCart .toggle, .kt-stickyAddCart .close",function(){$("#form_variants").slideToggle(),$("body").toggleClass("show-stickyAddCart"),!(theme.window_W>=768)&&$(".kt-stickyAddCart .infor").slideToggle()});var stickyAddCart=function(){var scrollTop=$(window).scrollTop(),$this=$(".kt-stickyAddCart");if(scrollTop>$(self.selectors.addToCart).offset().top+60&&$(".kt-stickyAddCart").hasClass("fixed")===!1){var headerHeight=$('header[data-header-sticky="true"] .content_header').outerHeight()||0;$this.addClass("fixed"),$(".kt-stickyAddCart .position-fixed").hasClass("top")&&(theme.window_W<767&&(headerHeight=0),$(".kt-stickyAddCart .position-fixed.top").css("top",headerHeight+"px"))}else scrollTop<=$(self.selectors.addToCart).offset().top&&$(".kt-stickyAddCart").hasClass("fixed")&&($this.removeClass("fixed"),$(".show-stickyAddCart #form_variants").slideToggle(),$("body").removeClass("show-stickyAddCart"),$(".kt-stickyAddCart .position-fixed").hasClass("top")&&$(".kt-stickyAddCart .position-fixed.top").css("top","-100%"))};$(window).scroll($.throttle(100,stickyAddCart))},_initStickySummary:function(){var self=this,thissummary=$(".summary.entry-summary"),thissummaryw=thissummary.width(),thissummaryo=thissummary.offset(),scrollTop=$(window).scrollTop(),mirrorHeight=$(".product-images").height(),thisposition=scrollTop+thissummary[0].getBoundingClientRect().top+thissummary.height(),thisposition_max=scrollTop+thissummary[0].getBoundingClientRect().top+(thissummary.outerHeight()-thissummary.height());function sticky(){var $window=$(window);if(!(theme.window_W<992)){scrollTop=$window.scrollTop(),mirrorHeight=$(".product-images").height();var thissummaryh2=thissummary.outerHeight();if(mirrorHeight>scrollTop+thissummaryh2-thisposition_max)if(scrollTop+theme.window_H-200>=thisposition&&thissummary.hasClass("fixed")==!1){var transalte2=$('header[data-header-sticky="true"]').length>0?85:20;thissummary.not(".fixed").addClass("fixed").removeClass("maxscroll").css({top:transalte2+"px",width:thissummaryw+"px",transform:"none"})}else scrollTop+theme.window_H-200<thisposition&&thissummary.hasClass("fixed")&&thissummary.removeClass("fixed maxscroll").removeAttr("style");else if(thissummary.hasClass("maxscroll")==!1&&mirrorHeight<=thissummaryh2+thissummary.offset().top){var transalte2=mirrorHeight-thissummaryh2-10;thissummary.addClass("maxscroll").removeClass("fixed").removeAttr("style").css({transform:"translate3d(0px,"+transalte2+"px,0px)","-webkit-transform":"translate3d(0px,"+transalte2+"px,0px)","moz-transform":"translate3d(0px,"+transalte2+"px,0px)","-ms-transform":"translate3d(0px,"+transalte2+"px,0px)","-o-transform":"translate3d(0px,"+transalte2+"px,0px)"})}}}function transalte(){thissummaryh=$(".summary.entry-summary").outerHeight(),thissummary!==void 0&&$(window).width()>=992&&thissummary.hasClass("fixed")&&thissummary.removeClass("fixed maxscroll").removeAttr("style")}$(window).scroll($.throttle(90,sticky));var iframe=$(self.selectors.template+" iframe#resize-info-product");iframe.each(function(){$(this.contentWindow||this).resize($.throttle(150,transalte))})},_onReSizeInfo:function(refresh){var self=this,thissummary=$(".summary.entry-summary"),thissummaryw=thissummary.width(),thissummaryo=thissummary.offset(),scrollTop=$(window).scrollTop(),mirrorHeight=$(".product-images").height(),m_p=thissummary.outerHeight()-thissummary.height(),thisposition=scrollTop+thissummaryo.top+m_p+thissummary.height(),thisposition_max=scrollTop+thissummaryo.top+m_p,thissummaryh2=thissummary.outerHeight();function sticky(){var $window=$(window);if(!(theme.window_W<992)){if(scrollTop=$window.scrollTop(),mirrorHeight=$(".product-images").height(),thissummaryh2=thissummary.outerHeight(),mirrorHeight>scrollTop+thissummaryh2-thisposition_max)if(scrollTop+theme.window_H-200>=thisposition&&$(".summary.entry-summary").hasClass("fixed")==!1){var transalte2=$('header[data-header-sticky="true"]').length>0?85:20;thissummary.not(".fixed").addClass("fixed").removeClass("maxscroll").css({top:transalte2+"px",width:thissummaryw+"px",transform:"none"})}else scrollTop+theme.window_H-200<thisposition&&thissummary.hasClass("fixed")&&thissummary.removeClass("fixed maxscroll").removeAttr("style");else if(thissummary.hasClass("maxscroll")==!1&&mirrorHeight<=thissummaryh2+thissummary.offset().top){var transalte2=mirrorHeight-thissummaryh2-10;thissummary.addClass("maxscroll").removeClass("fixed").removeAttr("style").css({transform:"translate3d(0px,"+transalte2+"px,0px)","-webkit-transform":"translate3d(0px,"+transalte2+"px,0px)","moz-transform":"translate3d(0px,"+transalte2+"px,0px)","-ms-transform":"translate3d(0px,"+transalte2+"px,0px)","-o-transform":"translate3d(0px,"+transalte2+"px,0px)"})}}}function transalte(){thissummaryh2=$(".summary.entry-summary").outerHeight(),thissummary!==void 0&&$(window).width()>=992&&thissummary.hasClass("fixed")&&thissummary.removeClass("fixed maxscroll").removeAttr("style")}sticky(),$(window).scroll($.throttle(90,sticky));var iframe=$(self.selectors.template+" iframe#resize-info-product");iframe.each(function(){$(this.contentWindow||this).resize($.throttle(150,transalte))})},_create360:function(variant){var dataJs=this.dataJs,self=this,imgsPos360=dataJs.imgspos360.split(","),imgsArray=_.map(self.previewImage,"src"),imgsprw=_.map(self.previewImage,"width"),imgsprh=_.map(self.previewImage,"height"),files=[];
1_.forEach(imgsArray,function(value,idx){if(parseInt(imgsPos360[0])<=idx+1&&idx+1<parseInt(imgsPos360[1])){var file=value;files.push(file)}}),KT.loadScript("threesixty",function(e,l){l=="ok"&&(theme.imgs360(files,imgsPos360,imgsprw[imgsPos360[0]],imgsprh[imgsPos360[0]],self.id),$(".kt_open360_"+self.id).removeClass("d-none"))})},_shipTo:function(){function buildRates(data){sessionStorage.setItem("kt-shipping-rates",data);var list_shipping="",data=JSON.parse(data.replace("<!-- BEGIN template --><!-- cart.listShipping -->","").replace("<!-- END template -->",""));$(".shipByLocation .flag").html('<img width="26" height="19.5" class="lazyload" src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" data-src="'+data.flag+'" alt="'+data.code+'">'),data.shipping_rates=JSON.parse(data.shipping_rates),$.each(data.shipping_rates,function(index,val){var p_mr=index<data.shipping_rates.length-1?' class="mb-1"':"";list_shipping+="<p"+p_mr+">",list_shipping+='<i class="fkt-check pr-2"></i>',val.min_order_subtotal!==void 0&&val.min_order_subtotal!==null?(list_shipping+=val.name+" "+theme.function.textInListShipping+" "+val.min_order_subtotal,val.max_order_subtotal!==null&&(list_shipping+=" - "+val.max_order_subtotal)):val.weight_low!==void 0&&val.weight_low!==null?(list_shipping+=val.name+" "+theme.function.textInListShipping+" "+val.weight_low+" kg",val.weight_high!==null&&(list_shipping+=" - "+val.weight_high+" kg")):list_shipping+=val.name,list_shipping+='. <span style="color: #F44336">+ '+val.price+"</span>",list_shipping+="</p>"}),$(".shipByLocation .list").html(list_shipping),Shopify.currency!==void 0&&shopCry!==Shopify.currency.active&&KT.loadScript("shopify-currency",function(e,l){l=="ok"&&KT.loadScript("shipping",function(e2,l2){l2=="ok"&&Kt_currency.convertAll(shopCry,Shopify.currency.active,".shipByLocation span.money")})}),$(".shipByLocation").slideDown(),!($(".shipping_rates .shipByLocation").length<=0)&&$(".shipping_rates").show()}function checkLocation(location_code){$.ajax({type:"get",url:Shopify.root_url+"/cart?view=listShipping&q="+location_code}).done(function(data){data!=""&&buildRates(data)}).fail(function(){console.log("error checkLocation")}).always(function(data){})}function getLocation(){$.ajax({type:"get",url:"https://api.teathemes.net/currency"}).done(function(data){var location={name:data.registered_country.names.en,code:data.countryCode};localStorage.setItem("kt-location",JSON.stringify(location)),checkLocation(data.countryCode),$(".shipByLocation .name_country").html(data.registered_country.names.en)}).fail(function(){console.log("error getLocation")}).always(function(data){})}var kt_location=localStorage.getItem("kt-location");if(localStorage.getItem("kt-location")!==null){$(".shipByLocation .name_country").html(JSON.parse(localStorage.getItem("kt-location")).name);var kt_shipping_rates=sessionStorage.getItem("kt-shipping-rates");kt_shipping_rates!==null?buildRates(kt_shipping_rates):checkLocation(JSON.parse(localStorage.getItem("kt-location")).code)}else getLocation()},_stockCountdown:function(){var total_items=70,check_stock=!1,timer=null,timerinterval=null,min_of_remaining_items=1,decrease_after=1.7,decrease_after_first_item=.17,min_items_left=0,max_items_left=0,remaining_items=0,stock_bg_process=0;function randomIntFromInterval(min,max){return Math.floor(Math.random()*(max-min+1)+min)}function progressbar(container){updateMeter(container,remaining_items),timer=setTimeout(function(){updateMeter(container)},1e3*60*decrease_after_first_item),timerinterval=setInterval(function(){updateMeter(container)},6e3*decrease_after)}function updateMeter(container,remaining_items_,important){var $container=$(container),remaining_items_=remaining_items_;if(remaining_items_==null&&(remaining_items_=remaining_items-1,remaining_items<min_of_remaining_items&&(remaining_items=remaining_items_,remaining_items_=randomIntFromInterval(min_items_left,max_items_left))),remaining_items_>max_items_left)return!1;var content=theme.productStrings.stockMessage[0]+' <span class="count">'+remaining_items_+"</span> "+theme.productStrings.stockMessage[1];$container.addClass("items-count").find("p").html(content);var stock_bg_process2=stock_bg_process2||$container.data().stockBgProcess;$container.find(".count").css({"background-color":stock_bg_process2,color:"#fff"}),setTimeout(function(){$container.find(".count").css({"background-color":"#fff",color:stock_bg_process2})},400),$container.find(".count").text(remaining_items_);var width=100*remaining_items_/total_items;remaining_items_<10&&$container.find(".progress").addClass("less-than-ten"),setTimeout(function(){$container.find(".progress-bar").css("width",width+"%").attr("aria-valuenow",width)},300),max_items_left=remaining_items_,remaining_items=remaining_items_,max_items_left<=min_items_left&&clearTimeout(timerinterval)}function init(container){var $container=$(container),data=$container.data();min_items_left=parseInt(data.stockFrom),max_items_left=parseInt(data.stockTo),remaining_items=parseInt(data.remainingItems)||randomIntFromInterval(min_items_left,max_items_left),stock_bg_process=data.stockBgProcess,progressbar(container)}return{init,progressbar,updateMeter}},_realTimeVisitor:function(el){var $el=$(el);$(function(a){var min=1,max=$el.find(".counter_real_time").attr("data-counter-max"),t=1,r=max;t=Math.ceil(t),r=Math.floor(r);
1var o=Math.floor(Math.random()*(r-t+1))+t,n=["1","2","4","3","6","10","-1","-3","-2","-4","-6"],h="",e="",l=["10","20","15"],h="",e="",M="";setInterval(function(){if(h=Math.floor(Math.random()*n.length),e=n[h],o=parseInt(o)+parseInt(e),min>=o){M=Math.floor(Math.random()*l.length);var a2=l[M];o+=a2}(o<1||o>max)&&(o=Math.floor(Math.random()*(r-t+1))+t),$el.find("#number_counter>span").html(parseInt(o)),$el.show()},parseInt($el.find(".counter_real_time").attr("data-interval-time")))})},_dateFromTo:function(el){var $el=$(el);KT.loadScript("moment",function(e,l){l=="ok"&&dateFromTo()});function dateFromTo(){var data=theme.function.product_delivery,fromDays=parseInt(data.fromDate),toDays=parseInt(data.toDate);KT.loadScript("momentlocale",function(e,l){if(l=="ok"){moment.locale(shopLocale);var fromDate=moment().add(fromDays,"days");if(data.offSaturday&&fromDate.format("d")=="6"&&(fromDays++,fromDate=moment().add(fromDays,"days")),data.offSunday&&fromDate.format("d")=="0"&&(fromDays=fromDays+2,fromDate=moment().add(fromDays,"days")),toDays>fromDays){var toDate=moment().add(toDays,"days");data.offSaturday&&toDate.format("d")=="6"&&(toDays++,toDate=moment().add(toDays,"days")),data.offSunday&&toDate.format("d")=="0"&&(toDays=toDays+2,toDate=moment().add(toDays,"days"))}if($.each(data.offDays,function(index,val){var valD=val.split("/")[1],valM=val.split("/")[0],valY=val.split("/")[2];fromDate.format("DD")===valD&&fromDate.format("MM")===valM&&(fromDate.format("YYYY")==="****"||fromDate.format("YYYY")===valY)&&(fromDays++,fromDate=moment().add(fromDays,"days")),toDays>fromDays&&toDate.format("DD")===valD&&toDate.format("MM")===valM&&(toDate.format("YYYY")==="****"||toDate.format("YYYY")===valY)&&(toDays++,toDate=moment().add(toDays,"days"))}),$(".product_delivery .timeDay").length>0){var $this=$(".product_delivery .timeDay");$el.append("<style>span.timeDay{display: inline-block}.timeDay .block{display: inline-block}.timeDay span.label{padding: 0 4px}</style>"),KT.loadScript("countdown",function(e2,l2){if(l2=="ok"){var date=moment().endOf("day").format(),html='<div class="block cdhrs"><span class="flip-top">00</span><span class="label">'+theme.strings.cdhrs+"</span></div>";html+='<div class="block cdmins"><span class="flip-top">00</span><span class="label">'+theme.strings.cdmin+"</span></div>",$this.html(html);var $thisHrs=$this.find(".cdhrs .flip-top"),$thisMins=$this.find(".cdmins .flip-top"),$thisSecs=$this.find(".cdsecs .flip-top");$this.countdown(moment(date).toDate()).on("update.countdown",function(event){$thisHrs.text(event.strftime("%H")),$thisMins.text(event.strftime("%M"))}).on("finish.countdown",function(event){$this.parent().remove()})}})}if($el.find(".fromDate").html(fromDate.format(theme.deliveryFormatDate)),toDays>fromDays&&($el.find(".toDate i").html(toDate.format(theme.deliveryFormatDate)),$el.find(".toDate").removeClass("d-none")),$el.slideDown(),$el.parents(".shipping_rates").length<=0)return;$el.parents(".shipping_rates").show()}})}},_responTableGroup:function(){var self=this;$(self.selectors.template+" .table-products").scroll($.throttle(100,function(){var $this=$(this);$(this).scrollLeft()>=80&&$(this).hasClass("mini")==!1?$this.addClass("mini"):$(this).scrollLeft()<80&&$(this).hasClass("mini")&&$this.removeClass("mini")}))},onUnload:function(){this.$container.off(),this.$container.find(".kt_countdown").off()}}),Product})(),theme.StoreAvailability=(function(){var selectors={modal:"[data-store-availability-modal-open]",modalProductTitle:"[data-store-avai-modal-product-title]",modalVariantTitle:"[data-store-avai-modal-variant-title]"},classes={hidden:"d-none"};function StoreAvailability(container){this.$container=$(container),this.$data=this.$container.data(),this.productTitle=this.$data.productTitle,this.hasOnlyDefaultVariant=this.$data.hasOnlyDefaultVariant}return StoreAvailability.prototype=Object.assign({},StoreAvailability.prototype,{updateContent:function(variantId){var variantSectionUrl=this.$data.baseUrl+"variants/"+variantId+"/?section_id=store-availability",self=this;$.ajax({url:variantSectionUrl,type:"GET",dataType:"html",success:function(response){response=response.split("<!--lz_sc-->")[1].split("<!-- modal -->"),self.$container.html(response[0]);var $modal=$("#store-avai-modal-"+variantId);if($modal.length<=0){$(".content_for_extension").append(response[1]),$modal=$("#store-avai-modal-"+variantId);var modalProductTitle=$modal.find(selectors.modalProductTitle);
1if(modalProductTitle.text(self.productTitle),self.hasOnlyDefaultVariant){var modalVariantTitle=$modal.find(selectors.modalVariantTitle);modalVariantTitle.addClass(classes.hidden)}}}})}}),StoreAvailability})();
2//# sourceMappingURL=/cdn/shop/t/33/assets/ktjs_product_sg.js.map?v=23426533907182324661718843188

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.