'use strict';var isAutoCarouselAnimationOn=!0;function isElementInView(b){b=b.getBoundingClientRect();return 0e.classList.contains("active")),l=b.querySelector(".autoplay-feature-controls").offsetHeight;var g=b.getElementsByClassName("autoplay-feature-item");Array.from(g).forEach((e,p)=>{e.classList.add("active");const q=e.querySelector(".card").offsetHeight,r=e.querySelector(".card-body").offsetHeight,t=e.querySelector(".autoplay-feature-media-container").offsetHeight, u=e.querySelector(".autoplay-feature-media-container .autoplay-feature-media").offsetHeight;a=Math.max(a,t);c=Math.max(c,q);f=Math.max(f,u);d=Math.max(d,r);p!==n&&e.classList.remove("active")});g=d-f;let v=a-f;const h=b.querySelector(".custom-carousel-controls"),k=b.querySelectorAll(".autoplay-feature-inner .autoplay-feature-item");b=b.querySelector(".autoplay-feature-controls");k.forEach(e=>e.style.height="");k.forEach(e=>e.style.height=c+"px");1084<=m&&(b.style.position="",b.style.bottom="",h&& (h.style.height=""),k.forEach(e=>e.style.height=""),0>g&&(b.style.position="relative",b.style.bottom=Math.abs(g)+"px",h.style.height=h&&Math.abs(g)<=l?l-Math.abs(g)+"px":"1px"));860<=m&&1083.99>=m&&(b.style.position="",b.style.bottom="",h&&(h.style.height=""),k.forEach(e=>e.style.height=""),k.forEach(e=>e.style.height=c+"px"),0=l-g&&(h.style.height="1px")):0>=g&&(b.style.position="",b.style.bottom=""));859.99>= m&&(b.style.position="",b.style.bottom="",h&&(h.style.height=""),k.forEach(e=>e.style.height=""))} function AutoCarousel(b){this.carousel=b;this.carouselItem=this.carousel.querySelectorAll(".autoplay-feature-item");this.carouselProgressBar=this.carousel.querySelectorAll(".autoplay-progress-bar");this.nextControl=this.carousel.querySelector(".autoplay-control-next");this.prevControl=this.carousel.querySelector(".autoplay-control-prev");this.playPauseBtn=this.carousel.querySelector(".autoplay-toggle-btn");this.autoplayDelay=1E3*parseInt(this.carousel.getAttribute("data-autoplay-delay"));this.autoplayInterval= null;this.current=0;this.wasManuallyStarted=this.wasManuallyStopped=this.isAutoplaying=!1;this.passedTime=0;this.resumeTimeout=null;this.lastStartTime=Date.now();this.updateScreenReaderText=function(){var a=this.carouselItem.length,c=this.carouselItem[this.current].getAttribute("data-slide-title")||"Slide";a=`Slide ${this.current+1} of ${a}. ${c}`;this.carousel.querySelector("#status-msg").textContent=a};this.replayVideo=function(){this.carousel.querySelectorAll(".autoplay-feature-video .feature-video").forEach(function(c){c.pause(); c.currentTime=0});var a=this.carouselItem[this.current].querySelector(".autoplay-feature-video .feature-video");a&&a.play()};this.updateCarousel=function(){this.carouselItem.forEach((a,c)=>{c===this.current?(a.classList.add("active"),a.removeAttribute("aria-hidden")):(a.classList.remove("active"),a.setAttribute("aria-hidden","true"))});0===this.current?this.carouselProgressBar.forEach((a,c)=>{0===c?a.classList.add("active"):a.classList.remove("active")}):this.carouselProgressBar.forEach((a,c)=>{c<= this.current?a.classList.add("active"):a.classList.remove("active")});this.updateGradient();this.replayVideo()};this.startAutoplayInterval=function(a=!0){clearTimeout(this.resumeTimeout);clearInterval(this.autoplayInterval);this.resumeTimeout=null;a&&(this.passedTime=0);a=this.autoplayDelay-this.passedTime;0{this.nextItem();this.startAutoplayInterval()},a):this.autoplayInterval=setInterval(this.nextItem.bind(this),this.autoplayDelay);this.isAutoplaying= !0;this.lastStartTime=Date.now()};this.stopAutoplay=function(a=!0){clearInterval(this.autoplayInterval);clearTimeout(this.resumeTimeout);this.resumeTimeout=this.autoplayInterval=null;this.isAutoplaying=!1;a&&(this.passedTime=Date.now()-this.lastStartTime)};this.nextItem=function(){this.current=(this.current+1)%this.carouselItem.length;this.updateCarousel();this.lastStartTime=Date.now()};this.prevItem=function(){this.current=0===this.current?this.carouselItem.length-1:this.current-1;this.updateCarousel(); this.lastStartTime=Date.now()};this.handleNextClick=function(){var a=this.isAutoplaying;this.stopAutoplay(!1);this.nextItem();this.updateScreenReaderText();a&&this.startAutoplayInterval(!1)};this.handlePrevClick=function(){var a=this.isAutoplaying;this.stopAutoplay(!1);this.prevItem();this.updateScreenReaderText();a&&this.startAutoplayInterval(!1)};this.toggleAutoplay=function(){var a=this.playPauseBtn;this.isAutoplaying?(this.stopAutoplay(),a.querySelector(".glyph").classList.remove("glyph-pause"), a.querySelector(".glyph").classList.add("glyph-play"),a.setAttribute("aria-label",this.playPauseBtn.getAttribute("data-play-text")),a.setAttribute("data-bi-cN",this.playPauseBtn.getAttribute("data-play-text")),this.wasManuallyStopped=!0):(this.startAutoplayInterval(!1),a.querySelector(".glyph").classList.remove("glyph-play"),a.querySelector(".glyph").classList.add("glyph-pause"),a.setAttribute("aria-label",this.playPauseBtn.getAttribute("data-pause-text")),a.setAttribute("data-bi-cN",this.playPauseBtn.getAttribute("data-pause-text")), this.wasManuallyStopped=!1,this.wasManuallyStarted=!0)};this.updateGradient=function(){var a=this.carousel.querySelectorAll(".autoplay-progress-bar");a.forEach(d=>{d.style.background="";d.style.backgroundSize="";d.style.backgroundPosition="";d.classList.remove("active")});for(var c=0;c<=this.current;c++)a[c].classList.add("active"),a[c].style.background="linear-gradient(88deg, #029CCF -17.09%, #0167B8 100.29%)",a[c].style.backgroundSize=100*(this.current+1)+"% 100%",a[c].style.backgroundPosition= 100/(this.current+1)*c+"% 0"};this.carousel.querySelector(".autoplay-feature-controls").classList.remove("d-none");this.nextControl.addEventListener("click",this.handleNextClick.bind(this));this.prevControl.addEventListener("click",this.handlePrevClick.bind(this));this.playPauseBtn.addEventListener("click",this.toggleAutoplay.bind(this));window.addEventListener("resize",function(){860<=window.innerWidth&&(b.querySelector(".autoplay-feature-controls").style.visibility="hidden");setTimeout(function(){findTallestCardBody(b); 860<=window.innerWidth&&(b.querySelector(".autoplay-feature-controls").style.visibility="visible")},500)});findTallestCardBody(b);this.updateCarousel();this.updateScreenReaderText()} document.addEventListener("DOMContentLoaded",function(){function b(){a.forEach(function(c){handleCarouselAnimation(c)})}var a=document.querySelectorAll(".autoplay-feature-carousel");a.forEach(function(c){var d=new AutoCarousel(c);c.autoCarousel=d});document.querySelector("body.animation-off:not(.animation-toggle)")&&(a.forEach(function(c){var d=c.autoCarousel;c=c.querySelector(".autoplay-toggle-btn");var f=c.querySelector(".glyph");d&&d.stopAutoplay();f.classList.remove("glyph-pause");f.classList.add("glyph-play"); c.setAttribute("aria-label",c.getAttribute("data-play-text"));c.setAttribute("data-bi-cN",c.getAttribute("data-play-text"))}),isAutoCarouselAnimationOn=!1);window.addEventListener("scroll",b);window.addEventListener("resize",b);b()}); document.addEventListener("AEM_ANIMATION_ENABLED",function(b){isAutoCarouselAnimationOn=b.detail;document.querySelectorAll(".autoplay-feature-carousel").forEach(function(a){var c=a.autoCarousel,d=a.querySelector(".autoplay-toggle-btn"),f=d.querySelector(".glyph");void 0!==c&&(isAutoCarouselAnimationOn?(f.classList.remove("glyph-play"),f.classList.add("glyph-pause"),d.setAttribute("aria-label",d.getAttribute("data-pause-text")),d.setAttribute("data-bi-cN",d.getAttribute("data-pause-text")),isElementInView(a)&& c.startAutoplayInterval(!1),c.wasManuallyStopped=!1):(c.stopAutoplay(!0),f.classList.remove("glyph-pause"),f.classList.add("glyph-play"),d.setAttribute("aria-label",d.getAttribute("data-play-text")),d.setAttribute("data-bi-cN",d.getAttribute("data-play-text")),c.wasManuallyStopped=!0))})});