(function($){var halo={initSlideshow:function(){var slickSlideshow=$("[data-init-slideshow]");slickSlideshow.length&&slickSlideshow.each(function(){var self=$(this),auto_playvideo=self.data("auto-video");if(self.find(".item-video").length){var tag=document.createElement("script");tag.src="https://www.youtube.com/iframe_api";var firstScriptTag=document.getElementsByTagName("script")[0];firstScriptTag.parentNode.insertBefore(tag,firstScriptTag)}if(auto_playvideo){let postMessageToPlayer2=function(player,command){player==null||command==null||(console.log(player.contentWindow),player.contentWindow.postMessage(JSON.stringify(command),"*"))},playPauseVideo2=function(slick,control){var currentSlide,player,video;if(currentSlide=slick.find(".slick-current .item "),$(window).width()>551?player=currentSlide.find("iframe.slide-pc").get(0):player=currentSlide.find("iframe.slide-mobile").get(0),currentSlide.hasClass("slide-youtube")){let onPlayerReady2=function(event){event.target.playVideo()},onPlayerStateChange2=function(event){event.data===0&&(postMessageToPlayer2(player,{event:"command",func:"playVideo"}),self.slick("slickPlay"),self.slick("next"))},onYouTubePlayerAPIReady2=function(){player1=new YT.Player(id,{videoId:video_id,events:{onReady:onPlayerReady2,onStateChange:onPlayerStateChange2}})};var onPlayerReady=onPlayerReady2,onPlayerStateChange=onPlayerStateChange2,onYouTubePlayerAPIReady=onYouTubePlayerAPIReady2;if($(window).width()>551)var id=currentSlide.find("iframe.slide-pc").attr("id"),video_id=currentSlide.find("iframe.slide-pc").data("video-id");else var id=currentSlide.find("iframe.slide-mobile").attr("id"),video_id=currentSlide.find("iframe.slide-mobile").data("video-id");control==="play"?(postMessageToPlayer2(player,{event:"command",func:"playVideo"}),self.slick("slickPause"),$(player).on("ended",function(){postMessageToPlayer2(player,{event:"command",func:"playVideo"}),self.slick("slickPlay"),self.slick("next")})):postMessageToPlayer2(player,{event:"command",func:"pauseVideo"});var player1;onYouTubePlayerAPIReady2()}else currentSlide.hasClass("slide-video")&&(video=currentSlide.find("video").get(0),video!=null&&(control==="play"?(video.play(),self.slick("slickPause"),$(video).on("ended",function(){self.slick("slickPlay"),self.slick("next")})):video.pause()))};var postMessageToPlayer=postMessageToPlayer2,playPauseVideo=playPauseVideo2;self.on("init",function(slick){slick=$(slick.currentTarget),setTimeout(function(){playPauseVideo2(slick,"play")},1e3)}),self.on("beforeChange",function(event,slick){slick=$(slick.$slider),playPauseVideo2(slick,"pause"),self.on("mouseenter focus",function(event2,slick2){$(".home-slideshow .slideshow").addClass("over_hover")})}),self.on("afterChange",function(event,slick){$(".item.slick-slide:not(.slick-current) .fluid-width-video-wrapper .video").css("display","none"),$(".slick-current .fluid-width-video-wrapper .video").css("display","block"),slick=$(slick.$slider),playPauseVideo2(slick,"play")})}if(self.not(".slick-initialized")){if(self.data("dots")=="none")var dots=!1;else var dots=!0;if(self.data("dots")=="number")var arrowsMobile=!0,customPaging=(self2,i)=>{let index=i+1;var count=self2.slideCount;return''+index+"/"+count+""};else var arrowsMobile=!1;self.slick({dots,slidesToScroll:1,verticalSwiping:!1,fade:self.data("fade"),cssEase:"ease",adaptiveHeight:!0,autoplay:self.data("autoplay"),autoplaySpeed:self.data("autoplay-speed"),arrows:self.data("arrows"),nextArrow:window.arrows.icon_next,prevArrow:window.arrows.icon_prev,customPaging,rtl:window.rtl_slick,speed:self.data("speed")||500,responsive:[{breakpoint:1280,settings:{arrows:arrowsMobile,customPaging,dots:!0}},{breakpoint:768,settings:{arrows:arrowsMobile,customPaging,dots:!0}}]})}})}};halo.initSlideshow(),$("body").hasClass("cursor-fixed__show")&&(window.sharedFunctionsAnimation.onEnterButton(),window.sharedFunctionsAnimation.onLeaveButton())})(jQuery); //# sourceMappingURL=/cdn/shop/t/2/assets/halo.slide-show.js.map?v=73673088250872529601721749077