1"use strict";(self.webpackChunkaem_maven_archetype=self.webpackChunkaem_maven_archetype||[]).push([["components-contentcard-content-blocks-container-swiping-js"],{23373:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});var i=n(51236),r=n(90150),o=n(71202),a=n(67808),s=n(31695);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function d(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,h(i.key),i)}}function h(e){var t=function(e,t){if("object"!=l(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t||"default");if("object"!=l(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==l(t)?t:t+""}var p=function(){return e=function e(t){var n,i;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this._$window=$(window),this._carousel=null,this._initialSlide=0,this._carouselResizeAdded=!1,this._carouselMaxTransition=500,this._ctaEqualHeightsResizeAdded=!1,this.uiSelectors={tabbedContainer:this.element.closest(".cmp-tabbedContainer"),contentCards:this.element.querySelector(".cmp-contentCards"),contentCardsCarousel:this.element.querySelector(".cmp-contentCardsCarousel"),contentCardsInner:this.element.querySelector(".cmp-contentCardsInner"),gridItem:u(this.element.querySelectorAll(".cmp-contentCardsInner .gridEl")),contentCardImage:u(this.element.querySelectorAll(".cmp-ContentCard .imageContainer")),contentCardTextTop:u(this.element.querySelectorAll(".cmp-ContentCard .textContainerTop"))},this.desktopCarouselEnabled="true"===(null===(n=this.element.dataset)||void 0===n?void 0:n.desktopCarousel),this.mobileCarouselEnabled="true"===(null===(i=this.element.dataset)||void 0===i?void 0:i.mobileCarousel),this._init()},t=[{key:"_init",value:function(){var e,t,n=this;if(!this.element.dataset.carouselCheckInit){this.uiSelectors.contentCardsCarousel.classList.add("swiper-container"),this.uiSelectors.contentCardsInner.classList.add("swiper-wrapper"),this.uiSelectors.gridItem.forEach(function(e){e.classList.add("swiper-slide")}),this.uiSelectors.contentCardsCarousel.insertAdjacentHTML("beforeend",'<div class="cmp-ContentBlocksContainer__swiper-ui"/>');var o=(null===(e=this.element.dataset)||void 0===e?void 0:e.labelPrevious)||"",a=(null===(t=this.element.dataset)||void 0===t?void 0:t.labelNext)||"",l='\n <div class="swiper-scrollbar"></div>\n <button aria-label="'.concat(o,'" class="cmp-ContentBlocksContainer__previous icon-chevron-down swiper-button swiper-button--prev"></button>\n <button aria-label="').concat(a,'" class="cmp-ContentBlocksContainer__next icon-chevron-down swiper-button swiper-button--next"></button>\n ');this.element.querySelector(".cmp-ContentBlocksContainer__swiper-ui").innerHTML=l,i.A.use([r.Vx,r.Ze]),enquire.register("screen and (max-width: ".concat(s.EW.tablet-1,"px)"),{match:function(){return n._handleCarouselInit("mobile")}}),enquire.register("screen and (min-width: ".concat(s.EW.tablet,"px) and (max-width: ").concat(s.EW.desktop-1,"px)"),{match:function(){return n._handleCarouselInit("tablet")}}),enquire.register("screen and (min-width: ".concat(s.EW.desktop,"px)"),{match:function(){return n._handleCarouselInit("desktop")}}),window.addEventListener("orientationchange",function(){return n._carouselOrientationChange()}),window.addEventListener("load",function(){n._carouselResize(),n._positionCarouselScrollbar()}),this._carouselResizeAdded||(this._$window.smartresize(this._carouselResize.bind(this)),this._carouselResizeAdded=!0);var u=this.element;new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting&&n._positionCarouselScrollbar()})}).observe(u),this.element.dataset.carouselCheckInit=!0}}},{key:"_carouselEnabledAtCurrentViewport",value:function(){return!("desktop"!==this.viewport||!this.desktopCarou
1selEnabled)||!("desktop"===this.viewport||!this.mobileCarouselEnabled)}},{key:"_handleCarouselInit",value:function(e){if(this._destroyCarousel(),this.viewport=e,this._carouselEnabledAtCurrentViewport()){var t=u(this.uiSelectors.gridItem).length;this.momentumRatio=1.5,"mobile"===e&&(this.momentumRatio=this.uiSelectors.contentCards.getAttribute("data-total")>3?.4:.1);var n,i=1;"tablet"===e&&(i=2),"desktop"===e&&(i=(null===(n=this.uiSelectors.contentCards.dataset)||void 0===n?void 0:n.total)||4),t<=i||(this._createCarousel(i),this._positionCarouselScrollbar(),this._initCtaEqualHeights(),this._bindExternalEvents())}}},{key:"_bindExternalEvents",value:function(){var e=this,t=this._onHiddenCarouselLoaded.bind(this);document.addEventListener("Questionnaire:cbc-ready",t),this.uiSelectors.tabbedContainer&&this.uiSelectors.tabbedContainer.querySelector(".DxTabs").addEventListener("DxTabs:beforefadein",function(n){var i=n.detail.selectedPanel,r=e.element.closest(".cmp-tabs__tabpanel").id;i.id===r&&t()})}},{key:"_createCarousel",value:function(e){var t=this;this.isCarousel=!0,this.element.classList.add("cmp-ContentBlocksContainer--carousel");var n=this.element.querySelector(".swiper-scrollbar");this._carousel=new i.A(this.uiSelectors.contentCardsCarousel,{differentSlideWidths:!0,freeMode:!site.rtl,freeModeSticky:!0,freeModeMinimumVelocity:0,freeModeMomentumRatio:this.momentumRatio,freeModeMomentumBounce:!1,watchSlidesProgress:!0,watchSlidesVisibility:!0,slidesPerView:e,scrollbar:{el:n,draggable:!0,hide:!1},navigation:{prevEl:this.element.querySelector(".cmp-ContentBlocksContainer__previous"),nextEl:this.element.querySelector(".cmp-ContentBlocksContainer__next")},loop:!1,spaceBetween:5}),this._improveSliderA11Y(),(0,a.sj)(this._carousel),this._carousel.on("transitionStart",this._carouselSetSwiping.bind(this,"true")),this._carousel.on("transitionEnd",function(){t._carouselSetSwiping("false"),t._improveSliderA11Y()}),n.addEventListener("click",function(e){e.target.classList.contains("swiper-scrollbar-drag")||t._improveSliderA11Y()});var r=function(){setTimeout(function(){t._improveSliderA11Y()},10)};this._carousel.on("reachBeginning",function(){return r()}),this._carousel.on("reachEnd",function(){return r()})}},{key:"_destroyCarousel",value:function(){this.isCarousel&&(this.isCarousel=!1,this.element.classList.remove("cmp-ContentBlocksContainer--carousel"),this._carousel.destroy(!0,!0))}},{key:"_onHiddenCarouselLoaded",value:function(){this._carousel&&this._carousel.destroy(!0,!0),this._handleCarouselInit(this.viewport),this._positionCarouselScrollbar(),this._initCtaEqualHeights()}},{key:"_improveSliderA11Y",value:function(){var e=this,t=this.element.querySelector(".swiper-slide-prev");t&&t.classList.remove("swiper-slide-visible"),u(this._carousel.slides).forEach(function(t){t.classList.contains(e._carousel.params.slideVisibleClass)?e.constructor._showSlideToScreenReaders(t):e.constructor._hideSlideFromScreenReaders(t)})}},{key:"_initCtaEqualHeights",value:function(){var e=this;this.uiSelectors.contentCardTextTop.forEach(function(e){e.style.height=""}),$(this.uiSelectors.contentCardTextTop).equalHeights(),this._ctaEqualHeightsResizeAdded||(this._$window.smartresize(function(){window.setTimeout(e._initCtaEqualHeights.bind(e),100)}),this._ctaEqualHeightsResizeAdded=!0)}},{key:"_carouselSetSwiping",value:function(e){this.element.setAttribute("data-swiping",e)}},{key:"_carouselResize",value:function(){this._carousel&&this._positionCarouselScrollbar()}},{key:"_carouselOrientationChange",value:function(){this._carousel.update(),this._positionCarouselScrollbar()}},{key:"_positionCarouselScrollbar",value:function(){var e=this,t=this.uiSelectors.contentCards.querySelector(".swiper-slide .imageContainer"),n=this.uiSelectors.contentCards.querySelectorAll(".swiper-slide .imageContainer img"),i=this.uiSelectors.contentCards.querySelector(".cmp-ContentBlocksContainer__swiper-ui"),r=0,o=!1,a=[],s=this.uiSelectors.contentCards.querySelectorAll(".cmp-content-card-toggle");s&&s.length>0&&s.forEach(function(e){if(!e.querySelector(".cmp-content-card-toggle__wrapper").classList.contains("display-none")){o=!0;var t=parseInt(getComputedStyle(e).getPropertyValue("height"),10),n=parseInt(getComputedStyle(e).getPropertyValue("margin-bottom"),10);r=t+n}}),setTimeout(function(){var s=0,l=t.querySelector(".icon");if(e.uiSelectors.contentCardsInner.style.marginTop="0px",n&&n.length>0)a=Array.from(n).map(function(e){return parseInt(getComputedStyle(e).getPropertyValue("height"),10)}),s=Math.max.apply(Math,a)+(o?r:0);else if(l){var u=parseInt(getComputedStyle(l,":before").getPropertyValue("height"),10);s=parseInt(getComputedStyle(t).getPropertyValue("height"),10)-u}else e.uiSelectors.contentCardsInner.style.marginTop="32px",s=-48;i.style.top=s+"px",0===s&&(i.style.marginTop="0px")},0)}}],n=[{key:"_hideSlideFromScreenReaders",value:function(e){var t=(0,o.oj)(e);e.setAttribute("aria-hidden","true"),t.forEach(function(e){e.setAttribute("tabindex","-1")})}},{key:"_showSlideToScreenReaders",value:function(e){var t=(0,o.oj)(e);e.removeAttribute("aria-hidden"),t.forEach(function(e){e.removeAttribute("tabindex")})}}],t&&d(e.prototype,t),n&&d(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,n}()},67808:function(e,t,n){n.d(t,{Lx:function(){return a},Tp:function(){return s},c:function(){return o},sj:function(){return l}});var i=n(69805),r=n(71202),o=function(e){if(e.wrapperEl){var t=(0,r.oj)(e.wrapperEl);t.forEach(function(e){var t=e.getAttribute("tabindex");t&&e.setAttribute("data-swiper-tabindex",t)});
1var n=[].slice.call(e.slides),i=function(){n.forEach(function(e){!function(e,t){e.style.visibility=t}(e,"visible"),e.setAttribute("aria-hidden","true")}),t.forEach(function(e){return e.setAttribute("tabindex",-1)})},o=function(){n.forEach(function(e){e.setAttribute("aria-hidden","false"),e.removeAttribute("aria-hidden")}),t.forEach(function(e){var t=e.getAttribute("data-swiper-tabindex");e.removeAttribute("tabindex"),t&&e.setAttribute("tabindex",t)})};e.el.addEventListener("onSlideChangeTransitionStart",function(e){return i()}),e.el.addEventListener("onTouchMove",function(e){return i()}),e.el.addEventListener("onSlideChangeTransitionEnd",function(){return o()}),e.el.addEventListener("onTouchEnd",function(){setTimeout(function(){o()},1e3)})}},a=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var n=Object.assign({},{pagination:null,arialiveOnFocusIn:!0,labels:{},isBlack:!1},t);!function(e,t){var n=e,i=t.paginationObject;if(i){n.dxPagination=i;var r=function(e){var i,r;return null!==(i=null===(r=t.getLogicalSlideIndex)||void 0===r?void 0:r.call(t,e))&&void 0!==i?i:n.realIndex},o=i.getElement();o&&(o.addEventListener("afterChange",function(e){var t=e.detail.eventType,r=i.options.events,o=r.gotoNext,a=r.gotoPrevious;(!n.animating||t!==o&&t!==a)&&(t!==o?t!==a?n.slideToLoop(parseInt(e.detail.pipTo,10),500,!1):n.slidePrev(500,!1):n.slideNext(500,!1))},!1),o.addEventListener("liveRegionUpdate",function(e){var t=n.a11y.liveRegion[0],i=e.detail&&e.detail.text;t&&i&&(t.innerHTML=i)},!1)),n.el.addEventListener("focusin",function(e){if(!n.params.disablePauseOnPaginationFocus){var t=e.target.classList.contains("video"),r=e.target.classList.contains("swiper-button--next"),o=e.target.classList.contains("swiper-button--prev");r||o||t||"running"===i.getPlayingStatus()&&i.pause()}},!1);var a=function(){n.el.removeEventListener("onSlideChangeTransitionEnd",a,!1);var e=r(n.activeIndex);e!==i.activeIndex&&i.updateActiveSlideByIndex(e)},s=n.navigation.nextEl,l=n.navigation.prevEl;s&&s.addEventListener("click",function(){return n.el.addEventListener("onSlideChangeTransitionEnd",a,!1)}),l&&l.addEventListener("click",function(){return n.el.addEventListener("onSlideChangeTransitionEnd",a,!1)}),n.el.addEventListener("onTouchMove",function(){return n.el.addEventListener("onSlideChangeTransitionEnd",a,!1)}),n.el.addEventListener("onSlideChangeTransitionStart",function(e){var n,i;t.getLogicalSlideIndex||null===(n=t.paginationObject)||void 0===n||null===(i=n.updateActiveSlideByIndex)||void 0===i||i.call(n,r(e.detail.activeIndex))})}}(e,n),function(e){e.on("init",function(){return(0,r.le)(e.el,"onInit")}),e.on("slideChangeTransitionStart",function(t){return(0,r.le)(e.el,"onSlideChangeTransitionStart",t)}),e.on("slideChangeTransitionEnd",function(){return(0,r.le)(e.el,"onSlideChangeTransitionEnd")}),e.on("slidePrevTransitionEnd",function(){return(0,r.le)(e.el,"onSlidePrevTransitionEnd")}),e.on("slideNextTransitionEnd",function(){return(0,r.le)(e.el,"onSlideNextTransitionEnd")}),e.on("touchStart",function(){return(0,r.le)(e.el,"onTouchStart")}),e.on("touchEnd",function(){return(0,r.le)(e.el,"onTouchEnd")}),e.on("touchMove",function(t){return(0,r.le)(e.el,"onTouchMove",t)})}(e),o(e),function(e){e.originalParams.autoplay.enabled&&(e.el.addEventListener("focusin",function(){return e.autoplay.stop()},!1),e.el.addEventListener("focusout",function(){return e.autoplay.start()},!1))}(e),function(e,t){var n=e.a11y.liveRegion[0];t.arialiveOnFocusIn&&n&&(n.removeAttribute("aria-live"),e.el.parentNode.addEventListener("focusin",function(){return n.setAttribute("aria-live","polite")}),e.el.parentNode.addEventListener("focusout",function(){return n.removeAttribute("aria-live")}))}(e,n),function(e,t){var n=e.navigation.prevEl,i=e.navigation.nextEl;if(n&&i){var r=t.labels,o=t.isBlack?"#000000":"#FFFFFF",a='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 14 24" style="enable-background:new 0 0 14 24;" xml:space="preserve">\n <style type="text/css">.st0--swiper-pagination{fill-rule:evenodd;clip-rule:evenodd;fill:'.concat(o,';}</style><polygon class="st0--swiper-pagination" points="12.7,0 0,12 12.7,24 14,22.5 2.9,12 14,1.5 "/>\n </svg>\n '),s='\n <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 14 24" style="enable-background:new 0 0 14 24;" xml:space="preserve">\n <style type="text/css">.st0--swiper-pagination{fill-rule:evenodd;clip-rule:evenodd;fill:'.concat(o,';}</style><polygon class="st0--swiper-pagination" points="1.3,24 14,12 1.3,0 0,1.5 11.1,12 0,22.5 "/>
1\n </svg>\n '),l=function(e,t,n){n&&e.setAttribute("aria-label",n);var i=document.createElement("div");i.innerHTML=t,e.appendChild(i.querySelector("svg"))};l(n,a,r.previous),l(i,s,r.next)}}(e,n)}},s=function(e){var t=e,n=t.navigation.prevEl,i=t.navigation.nextEl;n&&(n.innerHTML=""),i&&(i.innerHTML=""),t.dxPagination&&t.dxPagination.Pagination("destroy"),t.destroy(),t=null},l=function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).paginationObject,n=e.navigation.nextEl,r=e.navigation.prevEl,o=function(n){(n.which||n.keyCode)===i.D.RETURN&&(n.preventDefault(),t&&t.updateActiveSlideByIndex(e.realIndex))};n.addEventListener("keydown",function(e){return o(e)}),r.addEventListener("keydown",function(e){return o(e)})}}}]);
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.