1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[5330,7755],{7769:(t,e,i)=>{i.r(e),i.d(e,{default:()=>l});var r=i(21464);const s='[data-module="ScrollSlider"]';class l{static setup(t=s){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{new l(t),t.dataset.moduleInitialized="true"})}constructor(t,e={}){this.element=t,this.options=e,this.options=(0,r.$E)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.isRtl=null!=document.dir?"rtl"===document.dir:"rtl"==document.getElementsByTagName("html")[0].getAttribute("dir"),this.leftBtn=this.element.querySelector(this.options.arrowLeft),this.rightBtn=this.element.querySelector(this.options.arrowRight),this.scrollBarContainer=this.element.querySelector(this.options.scrollContent),this.scrollBarContainer&&this.init()}init(){document.addEventListener("ScrollSlider:reset",()=>this.showArrows()),window.addEventListener("resize",(0,r.sg)(()=>this.showArrows(),200)),this.scrollBarContainer.addEventListener("scroll",()=>this.checkArrows()),this.arrowHandlers()}arrowHandlers(){this.arrowHandlersMouseEvent(this.leftBtn,this.isRtl?50:-50),this.arrowHandlersMouseEvent(this.rightBtn,this.isRtl?-50:50)}arrowHandlersMouseEvent(t,e){t.addEventListener("click",()=>{this.scrollElement(e)},{passive:!0}),t.addEventListener("mousedown",()=>{this.setIntervalToScroll(e)},{passive:!0}),t.addEventListener("mouseup",()=>{clearInterval(this.intervalToScroll)},{passive:!0}),t.addEventListener("touchstart",()=>{this.setIntervalToScroll(e)},{passive:!0})}setIntervalToScroll(t){this.intervalToScroll&&clearInterval(this.intervalToScroll),this.intervalToScroll=setInterval(()=>this.scrollElement(t),100)}scrollElement(t){this.scrollBarContainer.scrollBy({top:0,left:t,behavior:"smooth"})}showArrows(){this.element.classList.remove("nx-scroll-slider--active"),this.scrollBarWidth=this.scrollBarContainer.offsetWidth,this.elementWidth=this.element.offsetWidth,this.scrollBarWidth>=this.elementWidth&&this.element.classList.add("nx-scroll-slider--active")}checkArrows(){0==this.scrollBarContainer.scrollLeft?this.leftBtn.classList.add("nx-arrow--hidden"):this.leftBtn.classList.remove("nx-arrow--hidden"),this.scrollBarWidth-this.elementWidth-5>=Math.abs(this.scrollBarContainer.scrollLeft)?this.rightBtn.classList.remove("nx-arrow--hidden"):this.rightBtn.classList.add("nx-arrow--hidden")}getDefaultOptions(){return{scrollContent:".nx-filter-navigation__list",arrowLeft:".nx-filter-navigation__arrow--left",arrowRight:".nx-filter-navigation__arrow--right"}}}l.setup(s)},94364:(t,e,i)=>{i.r(e),i.d(e,{default:()=>o});var r=i(21464),s=i(930),l=i(7769),a=i(50436);const n='[data-module="SliderTagfilter"]';class o extends a.default{static setup(t=n){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{window.requestAnimationFrame(()=>{setTimeout(function(){t.dataset.moduleInitialized||(new o(t),t.dataset.moduleInitialized="true")})})})}constructor(t,e){super(t,e),this.getParentElements(),this.tagMapping=this.getTagmapping(),this.tagMapping.flat().length&&(this.teaserFilterbarElement.children.length||(this.createFilterbar(),this.mapTagsToSliderElements(),this.initScrollSlider(),this.addHandlerOnTagfilterButtonsClick()))}createFilterbar(){var t;const e=(0,s.g_)(this.getTagsWithCounts());null===(t=this.teaserFilterbarElement)||void 0===t||t.appendChild(e)}getParentElements(){var t;this.parentSection=this.element.closest("section"),this.teaserFilterbarElement=null===(t=this.parentSection)||void 0===t?void 0:t.querySelector(".nx-teasers-tagfilter-bar")}getTagmapping(){var t,e;const i=null===(t=this.parentSection)||void 0===t?void 0:t.getAttribute("data-tagmapping");return(null===(e=this.parentSection)||void 0===e?void 0:e.getAttribute("data-tagmapping"))?JSON.parse(i):null}initScrollSlider(){new l.default(this.teaserFilterbarElement,{scrollContent:".nx-teasers-tagfilter__list",arrowLeft:".nx-teasers-tagfilter-bar__arrow--left",arrowRight:".nx-teasers-tagfilter-bar__arrow--right"}),this.initHorizontalScrolling(this.teaserFilterbarElement.querySelector(".nx-teasers-tagfilter__list")),document.dispatchEvent(new CustomEvent("ScrollSlider:reset"))}addHandlerOnTagfilterButtonsClick(){this.tagfilterButtons=this.teaserFilterbarElement.querySelectorAll(".nx-teasers-tagfilter__item"),this.tagfilterButtons.forEach(t=>t.addEventListener("click",this.onTagfilterButtonClick.bind(this)))}onTagfilterButtonClick(t){const e=t.target.title;if(!e)return;const i=t.target;let r=[];i.classList.contains("nx-teasers-tagfilter__item--active")?(i.classList.remove("nx-teasers-tagfilter__item--active"),r=this.allSliderItems):(this.teaserFilterbarElement.querySelectorAll(".nx-teasers-tagfilter__item").forEach(t=>t.classList.remove("nx-teasers-tagfilter__item--active")),i.classList.add("nx-teasers-tagfilter__item--active"),r=this.allSliderItems.filter(t=>{var i;return null===(i=t.getAttribute("data-tags"))||void 0===i?void 0:i.includes(e)})),this.rebuildSliderWithNewItems(r)}rebuildSliderWithNewItems(t){var e;null===(e=this.slider)||void 0===e||e.destroy();this.parentSection.querySelector(".nx-slider").replaceChildren(...t),this.slider=this.slider.rebuild()}initHorizontalScrolling(t){(0,r.aO)(t)}getTagsWithCounts(){const t=this.tagMapping.flat();return[...new Set(t)].reduce((e,i)=>{if(i){const r=t.filter(t=>t===i).length;e[i]=r}return e},{})}mapTagsToSliderElements(){Array.from(this.allSliderItems).forEac
1h((t,e)=>{t.setAttribute("data-tags",this.tagMapping[e])})}}o.setup(n)}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/SliderTagfilter.c1c4bfb6.js.2dcce693.map
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.