var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.arrayIteratorImpl=function(e){var f=0;return function(){return f<e.length?{done:!1,value:e[f++]}:{done:!0}}};$jscomp.arrayIterator=function(e){return{next:$jscomp.arrayIteratorImpl(e)}};$jscomp.makeIterator=function(e){var f="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return f?f.call(e):$jscomp.arrayIterator(e)};$jscomp.arrayFromIterator=function(e){for(var f,c=[];!(f=e.next()).done;)c.push(f.value);return c};
$jscomp.arrayFromIterable=function(e){return e instanceof Array?e:$jscomp.arrayFromIterator($jscomp.makeIterator(e))};
(function(){var e=window.sg.common.$q,f="undefined"!==typeof digitalData&&digitalData&&digitalData.page&&digitalData.page.pageInfo&&digitalData.page.pageInfo.pageTrack||"page track",c=function(a){this.els={el:a,contentsWrapEl:a.querySelector(".key-feature-tab__contents"),headerWrapEl:a.querySelector(".key-feature-tab__header-wrap"),contentsTitleEl:a.querySelector(".key-feature-tab__title"),tabEl:a.querySelector(".tab"),tabTitleEls:a.querySelectorAll(".tab__item-title"),containerEl:a.querySelector(".key-feature-tab__container"),
slideEls:a.querySelectorAll(".key-feature-tab__slide"),innerWrapEls:a.querySelectorAll(".key-feature-tab__inner-wrap"),ctaEls:a.querySelectorAll(".cta"),videoCtaEls:a.querySelectorAll(".key-feature-tab__cta--video"),popupVideoEl:a.querySelector(".popup-video")};this.handler={clickableState:this.handleClickableState.bind(this),restoreFromClickable:this.restoreFromClickable.bind(this)};this.lazyLoad=window.sg.common.lazyLoad;this.tab=window.sg.common.tab;this.video=window.sg.common.video;this.popupVideo=
window.sg.common.popupVideo;this.isVisible=window.sg.common.utils.isVisible;this.getCurrentDevice=window.sg.common.utils.getCurrentDevice;this.isKeyFeatureTabShow=!1;this.moveStartX=0;this.isMoving=!1;this.swiperJumpDirection="";this.isSwiperTransitionUse=!0;this.tabSelect=this.swiperMove=this.isSwiping=!1;this.applyVideoControlEvent=!0;this.isRtl=window.sg.common.utils.isRtl;this.isBannerClick=!1;this.init()};c.prototype.init=function(){c.instances.has(this.els.el)||(c.instances.set(this.els.el,
this),this.swiper=new Swiper(this.els.containerEl,{speed:500}),this.setAccessibility(),this.prepareInteraction(),this.setHeaderTextColor(0),this.bindEvents(),this.checkKeyFeatureTabShow(),this.setCarouselHeight(),this.setClickableAreaByActiveSlide(),this.setClickableSlidesAriaAttr(),this.setClickableAccessibility())};c.prototype.checkKeyFeatureTabShow=function(){this.isVisible(this.els.el)&&!this.isKeyFeatureTabShow?(this.isKeyFeatureTabShow=!0,this.lazyLoad.setLazyLoad(),this.playVideo()):!this.isVisible(this.els.el)&&
this.isKeyFeatureTabShow&&(this.isKeyFeatureTabShow=!1,this.pauseVideo())};c.prototype.playVideo=function(){if(this.applyVideoControlEvent){var a=this.swiper.slides[this.swiper.activeIndex].querySelector(".key-feature-tab__background-wrap .video");a&&this.video.play(a);(a=this.swiper.slides[this.swiper.activeIndex].querySelector(".key-feature-tab__inner-wrap .video"))&&this.video.play(a)}};c.prototype.stopVideo=function(){if(this.applyVideoControlEvent){var a=this.swiper.slides[this.swiper.activeIndex].querySelector(".key-feature-tab__background-wrap .video video");
a&&(a.pause(),a.currentTime=0);if(a=this.swiper.slides[this.swiper.activeIndex].querySelector(".key-feature-tab__inner-wrap .video video"))a.pause(),a.currentTime=0}};c.prototype.pauseVideo=function(){if(this.applyVideoControlEvent){var a=this.swiper.slides[this.swiper.activeIndex].querySelector(".key-feature-tab__background-wrap .video video");a&&a.pause();(a=this.swiper.slides[this.swiper.activeIndex].querySelector(".key-feature-tab__inner-wrap .video video"))&&a.pause()}};c.prototype.setHeaderTextColor=
function(){var a="",b=this.els.innerWrapEls[this.swiper.activeIndex];this.els.headerWrapEl.classList.remove("text-color--black");this.els.headerWrapEl.classList.remove("text-color--white");this.els.headerWrapEl.classList.remove("text-shadow");b.classList.contains("text-color--black")?a="text-color--black":b.classList.contains("text-color--white")&&(a="text-color--white");this.els.headerWrapEl.classList.add(a);b.classList.contains("text-shadow")&&this.els.headerWrapEl.classList.add("text-shadow")};
c.prototype.bindEvents=function(){var a=this;this.els.tabEl.addEventListener("tabSelect",function(b){a.swiperMove?a.swiperMove=!1:(a.tab.setSelectDisabled(a.els.tabEl,!0),a.stopVideo(),a.tabSelect=!0,b.detail>a.swiper.activeIndex+1?(a.swiper.realPrevIndex=a.swiper.activeIndex,a.swiper.slides[b.detail].insertAdjacentElement("beforebegin",a.swiper.slides[a.swiper.activeIndex]),a.swiper.update(),a.isSwiperTransitionUse=!1,a.swiper.slideTo(b.detail-1,0),a.swiper.update(),a.isSwiperTransitionUse=!0,a.swiperJumpDirection=
"right"):b.detail<a.swiper.activeIndex-1&&(a.swiper.realPrevIndex=a.swiper.activeIndex,a.swiper.slides[b.detail].insertAdjacentElement("afterend",a.swiper.slides[a.swiper.activeIndex]),a.swiper.update(),a.isSwiperTransitionUse=!1,a.swiper.slideTo(b.detail+1,0,!1),a.swiper.update(),a.isSwiperTransitionUse=!0,a.swiperJumpDirection="left"),a.swiper.slideTo(b.detail))});this.swiper.on("slideChange",function(){a.isSwiperTransitionUse&&(a.applyVideoControlEvent=!1,a.lazyLoad.setLazyLoad(),a.els.slideEls.forEach(function(a){a.classList.remove("key-feature-tab__slide--active-left-side");
a.classList.remove("key-feature-tab__slide--active-right-side")}),a.els.headerWrapEl.classList.add("key-feature-tab__header-wrap--interaction"),setTimeout(function(){a.els.headerWrapEl.classList.remove("key-feature-tab__header-wrap--interaction")},600),a.setHeaderTextColor(),a.tabSelect?a.tabSelect=!1:(a.swiperMove=!0,a.tab.selectTab(a.els.tabEl,a.swiper.activeIndex)));a.setClickableAccessibility()});this.swiper.on("slideChangeTransitionEnd",function(){a.isSwiperTransitionUse&&(a.lazyLoad.setLazyLoad(),
a.applyVideoControlEvent=!0,a.prepareInteraction(),"right"===a.swiperJumpDirection?(a.swiper.slides[a.swiper.realPrevIndex].insertAdjacentElement("beforebegin",a.swiper.slides[a.swiper.activeIndex-1]),a.swiper.update()):"left"===a.swiperJumpDirection&&(a.swiper.slides[a.swiper.realPrevIndex].insertAdjacentElement("afterend",a.swiper.slides[a.swiper.activeIndex+1]),a.swiper.update()),a.setAccessibility(),a.isSwiping&&"mobile"!==a.getCurrentDevice()||a.playVideo(),a.isSwiping=!1,a.swiperJumpDirection=
"",a.tab.setSelectDisabled(a.els.tabEl,!1));a.setClickableAreaByActiveSlide()});this.els.containerEl.addEventListener("mousedown",function(b){a.slideMoveStart(b)});this.els.containerEl.addEventListener("mousemove",function(b){a.slideMoving(b)});this.els.containerEl.addEventListener("mouseup",function(b){a.slideMoveEnd(b)});this.els.containerEl.addEventListener("touchstart",function(b){a.slideMoveStart(b)});this.els.containerEl.addEventListener("touchmove",function(b){a.slideMoving(b)});this.els.containerEl.addEventListener("touchend",
function(b){a.slideMoveEnd(b)});this.els.slideEls.forEach(function(b){b.addEventListener("mouseenter",function(){a.pauseVideo()});b.addEventListener("mouseleave",function(){a.playVideo()})});this.els.innerWrapEls.forEach(function(b){b.querySelectorAll(".cta").forEach(function(b){b.addEventListener("focus",function(){a.pauseVideo()});b.addEventListener("focusout",function(){a.playVideo()})})});this.els.videoCtaEls.forEach(function(b,d){b.addEventListener("click",function(){a.applyVideoControlEvent=
!1;a.popupVideo.open(a.els.popupVideoEl,d,a.getFocusTargetElByCta(b))})});this.els.ctaEls.forEach(function(b){b.addEventListener("click",function(){a.getFocusTargetElByCta(b).focus()})});this.els.popupVideoEl&&this.els.popupVideoEl.addEventListener("popupVideoClose",function(){a.applyVideoControlEvent=!0});document.addEventListener("scroll",function(){a.checkKeyFeatureTabShow()});window.addEventListener("resize",function(){a.applyVideoControlEvent&&a.checkKeyFeatureTabShow();a.setCarouselHeight()});
e(this.els.el).off("click",this.handler.clickableState).on("click",this.handler.clickableState);e(this.els.el).off("keydown",this.handler.clickableState).on("keydown",this.handler.clickableState);window.addEventListener("orientationchange",function(){a.applyVideoControlEvent&&a.checkKeyFeatureTabShow()});this.els.el.querySelectorAll(".video").forEach(function(a){a.addEventListener("videoInit",function(){a.querySelectorAll("video:not([controls])").forEach(function(a){a.setAttribute("tabindex",-1);
a.setAttribute("aria-hidden",!0)})})})};c.prototype.slideMoveStart=function(a){this.moveStartX=a.offsetX?a.offsetX:a.touches[0].pageX;this.isMoving=!0};c.prototype.slideMoving=function(a){if(this.isMoving){var b=(a.offsetX?a.offsetX:a.touches[0].pageX)-this.moveStartX;(-20>=b||20<=b)&&a.preventDefault()}};c.prototype.slideMoveEnd=function(a){a=(a.offsetX?a.offsetX:a.changedTouches[0].pageX)-this.moveStartX;this.isRtl()?50<=a&&!this.swiper.isEnd?(this.stopVideo(),this.isSwiping=!0,this.swiper.slideTo(this.swiper.activeIndex+
1)):-50>=a&&!this.swiper.isBeginning&&(this.stopVideo(),this.isSwiping=!0,this.swiper.slideTo(this.swiper.activeIndex-1)):-50>=a&&!this.swiper.isEnd?(this.stopVideo(),this.isSwiping=!0,this.swiper.slideTo(this.swiper.activeIndex+1)):50<=a&&!this.swiper.isBeginning&&(this.stopVideo(),this.isSwiping=!0,this.swiper.slideTo(this.swiper.activeIndex-1));this.moveStartX=0;this.isMoving=!1};c.prototype.handleClickableState=function(a){var b=this.swiper.slides[this.swiper.activeIndex],d=b.querySelector('[data-clickable-target\x3d"true"]');
if(this.isSlideClickableState(b)&&!this.isSwiping&&this.isClickableEl(a.target)&&d&&(!a.keyCode||13===a.keyCode)){this.isBannerClick=!0;d.removeEventListener("mousedown",this.handler.restoreFromClickable);d.removeEventListener("touchstart",this.handler.restoreFromClickable);a=d.getAttribute("an-tr")||"";var c=d.getAttribute("an-la")||"",e=d.getAttribute("data-gbm-value")||"",g=b.getAttribute("data-tab-index")||"",h=this.els.contentsTitleEl.getAttribute("data-contents-title")||"",k=this.els.tabTitleEls[g-
1].getAttribute("data-tab-title")||"",l=b.querySelector(".key-feature-tab__headline").getAttribute("data-headline-text")||"";"home"===f?(b="co07_key feature tab-"+f+"-cta-homecontent_click",e="product marketing:"+e+":kv"+g+":"+h+":"+k+":"+l+":banner click"):(b="co07_key feature tab-"+f+"-cta-content_click",e=h+":"+k+":"+l+":banner click");a!==b&&d.setAttribute("data-cta-an-tr",a);c!==e&&d.setAttribute("data-cta-an-la",c);d.setAttribute("an-tr",b);d.setAttribute("an-la",e);d.click();d.addEventListener("mousedown",
this.handler.restoreFromClickable);d.addEventListener("touchstart",this.handler.restoreFromClickable);this.isBannerClick=!1}};c.prototype.restoreFromClickable=function(a){a=a.currentTarget;this.restoreCtaTagging(a);a.removeEventListener("mousedown",this.handler.restoreFromClickable);a.removeEventListener("touchstart",this.handler.restoreFromClickable)};c.prototype.restoreCtaTagging=function(a){var b=a.getAttribute("data-cta-an-tr")||"",d=a.getAttribute("data-cta-an-la")||"";b&&a.setAttribute("an-tr",
b);d&&a.setAttribute("an-la",d)};c.prototype.prepareInteraction=function(){var a=this;this.els.slideEls.forEach(function(b,d){d<a.swiper.activeIndex?b.classList.add("key-feature-tab__slide--active-left-side"):d>a.swiper.activeIndex&&b.classList.add("key-feature-tab__slide--active-right-side")})};c.prototype.setAccessibility=function(){var a=this;Array.from(this.swiper.slides).forEach(function(b,d){d===a.swiper.activeIndex?(b.removeAttribute("aria-hidden"),b.querySelectorAll(".cta").forEach(function(a){a.removeAttribute("tabindex");
a.removeAttribute("aria-hidden")})):(b.setAttribute("aria-hidden","true"),b.querySelectorAll(".cta").forEach(function(a){a.setAttribute("tabindex","-1");a.setAttribute("aria-hidden","true")}))})};c.prototype.setCarouselHeight=function(){if(1440>this.els.el.offsetWidth){var a=0;"desktop"===this.getCurrentDevice()?a=810*this.els.el.offsetWidth/1440:"mobile"===this.getCurrentDevice()&&(a=640*this.els.el.offsetWidth/360);this.els.slideEls.forEach(function(b){b.querySelector(".key-feature-tab__slide-inner").style.height=
a+"px"})}else this.els.slideEls.forEach(function(a){a.querySelector(".key-feature-tab__slide-inner").removeAttribute("style")})};c.prototype.isSlideClickableState=function(a){return"true"===a.getAttribute("data-clickable-state")};c.prototype.isSlideClickableAreaContents=function(a){return"contents"===a.getAttribute("data-clickable-area")};c.prototype.isClickableEl=function(a){var b=[".tab__item",".cta",".popup-video"],d=[];this.isSlideClickableAreaContents(this.swiper.slides[this.swiper.activeIndex])?
(b.push(".key-feature-tab__header-wrap",".key-feature-tab__text-wrap",".key-feature-tab__background-wrap",".key-feature-tab__cta-wrap"),d.push("key-feature-tab__inner-wrap","key-feature-tab__contents")):b.push(".key-feature-tab__media-wrap");return!b.find(function(b){return a.closest(b)})&&!d.find(function(b){return a.classList.contains(b)})};c.prototype.setClickableAreaByActiveSlide=function(){var a=this.swiper.slides[this.swiper.activeIndex];this.els.contentsWrapEl.classList.remove("clickable-area--contents");
this.els.contentsWrapEl.classList.remove("clickable-area--background");this.isSlideClickableState(a)&&(this.isSlideClickableAreaContents(a)?this.els.contentsWrapEl.classList.add("clickable-area--contents"):this.els.contentsWrapEl.classList.add("clickable-area--background"))};c.prototype.setClickableSlidesAriaAttr=function(){var a=this;this.els.slideEls.forEach(function(b){var d=b.querySelector('[data-clickable-target\x3d"true"]');if(d){var c=d.getAttribute("data-link-title")||"";b=a.isSlideClickableAreaContents(b)?
b.querySelector(".key-feature-tab__media-wrap"):b.querySelector(".key-feature-tab__background-wrap");var e=c?c:"";"_blank"===d.getAttribute("target")&&(e=c?"Open in a new window : "+c:"Open in a new window");e&&b.setAttribute("aria-label",e)}})};c.prototype.setClickableAccessibility=function(){var a=this;this.els.slideEls.forEach(function(b,c){a.isSlideClickableState(b)&&(b=a.isSlideClickableAreaContents(b)?b.querySelector(".key-feature-tab__media-wrap"):b.querySelector(".key-feature-tab__background-wrap"),
c===a.swiper.activeIndex?b.setAttribute("tabindex",0):b.setAttribute("tabindex",-1))})};c.prototype.getFocusTargetElByCta=function(a){var b=a.getAttribute("data-clickable-target")||0,c=a.closest(".key-feature-tab__slide");b&&this.isBannerClick&&(b=c.getAttribute("data-clickable-area")||"","contents"===b&&(a=c.querySelector(".key-feature-tab__media-wrap")),"background"===b&&(a=c.querySelector(".key-feature-tab__background-wrap")));return a};c.instances=new WeakMap;var g={initAll:function(){[].concat($jscomp.arrayFromIterable(document.querySelectorAll(".key-feature-tab"))).forEach(function(a){c.instances.has(a)||
new c(a)})}};window.sg.components.keyFeatureTab=g;e.ready(function(){return g.initAll()})})();