function main(){const needResourceList=[window.$,window.jQuery,window.Swiper,window.Lazyload];if(needResourceList.filter(Boolean).length!==needResourceList.length)return setTimeout(main,240);const prods=window.prods;let rootEle=document.getElementById("root");rootEle.style.zoom="normal";let scale=rootEle.clientWidth/1080;rootEle.style.zoom=scale,window.addEventListener("resize",function(){rootEle.style.zoom="normal";let scale2=rootEle.clientWidth/1080;rootEle.style.zoom=scale2});var lazy=new Lazyload({distance:500});jQuery("#nav1").slide({mainCell:".nav11",autoPlay:!0,effect:"leftMarquee",interTime:7,easing:"swing"}),jQuery("#nav22").slide({mainCell:".nav22",autoPlay:!0,effect:"leftMarquee",interTime:8});function getRandomNum(n,m){return Math.floor((n+1-m)*Math.random()+m)}let endTimeG;function cutDownTime(){let nowTime=new Date,leftTime=new Date(endTimeG).getTime()-nowTime.getTime(),leftH=Math.floor(leftTime/(1e3*60*60)%24),leftM=Math.floor(leftTime/(1e3*60)%60),leftS=Math.floor(leftTime/1e3%60);return leftH=leftH>=10?leftH:"0"+leftH,leftM=leftM>=10?leftM:"0"+leftM,leftS=leftS>=10?leftS:"0"+leftS,{hour:leftH,minute:leftM,second:leftS}}function getCutDownTime(){let rHour=getRandomNum(4,12),curTime=new Date;endTimeG=curTime.setHours(curTime.getHours()+rHour),setInterval(function(){let cutDownTimeText=cutDownTime();$(".sp_top_cut_down .sp_left_view .sp_hour").html(cutDownTimeText.hour),$(".sp_top_cut_down .sp_left_view .sp_minute").html(cutDownTimeText.minute),$(".sp_top_cut_down .sp_left_view .sp_second").html(cutDownTimeText.second)},1e3)}getCutDownTime();var main_id="";$(".emitCheckout").click(function(){console.log("1111"),main_id=$(this).data("id")});function getPopProdId(){let selectVals=[];return $(".overbuy_wrap .sp-subopt.active").each(function(){selectVals.push($(this).data("val"))}),popProduct.filter(item=>{let option1=selectVals[0],option2=null,option3=null;return selectVals[1]&&(option2=selectVals[1]),selectVals[2]&&(option3=selectVals[2]),item.option1==option1&&item.option2==option2&&item.option3==option3})[0]}$(".overbuy-select div").click(function(){$(this).siblings().removeClass("active"),$(this).addClass("active");let cur=getPopProdId();if(cur){$(".main-btn").removeClass("overbuy_disabled");let _price=parseFloat(cur.price/100).toFixed(2),_compare_at_price=parseFloat(cur.compare_at_price/100).toFixed(2);$(".overbuy_price span").eq(0).html("\u20AC"+_price),$(".overbuy_price span").eq(1).html("\u20AC"+_compare_at_price)}else $(".main-btn").addClass("overbuy_disabled")}),window.emitSubmit=function(_type){let num=1;if(_type=="all"){let _id=getPopProdId()?.id;if(!_id)return;console.log(_id),window.location.href=`/cart/${main_id}:${num},${_id}:1`}else window.location.href=`/cart/${main_id}:${num}`},new Swiper("#banner1",{autoplay:!0,autoplay:{disableOnInteraction:!1},spaceBetween:10,slidesPerView:"auto"}),new Swiper("#swiper2",{autoplay:!0,autoplay:{disableOnInteraction:!1},pagination:{el:".pagination1",type:"bullets",clickable:!0}}),$(".buy").click(function(){const offsetTop=document.getElementById("shopping").offsetTop;window.scroll({top:(offsetTop+280)*$("div#root").css("zoom"),behavior:"smooth"})})}main();
//# sourceMappingURL=/cdn/shop/t/20/assets/k3-1.js.map?v=178990542984079792591776839814
