1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[3699,5883],{1001:(t,e,i)=>{i.r(e),i.d(e,{default:()=>r});var s=i(21464);class r{constructor(t,e={}){this.container=t,this.options=e,this.active=this.container.className.includes("active"),this.options=(0,s.$E)(this.container,Object.assign(this.getDefaultOptions(),this.options)),this.init()}init(){return this.setElementHeight(this.container,this.getSuitableHeight()),this.setOnResizeHandler(),this}saveInitialHeight(){return this.height=this.getElementHeight(this.container),this}getElementHeight(t){return t.offsetHeight}getSuitableHeight(){return this.active?"":this.options.collapsedHeight+"px"}setElementHeight(t,e){return t.style.maxHeight=null!=e?e:"",this}toggleState(){return this.active=!this.active,this}getDefaultOptions(){return{collapsedHeight:115}}setOnResizeHandler(){return NiveaX.addToEventStore("resize",()=>(0,s.Ys)(()=>this.onResize(),300),window),this}onResize(){const t=this.getSuitableHeight();this.setElementHeight(this.container,t)}setCollapsedHeight(t){return this.options.collapsedHeight=t,this}toggle(){return this.toggleState().setElementHeight(this.container,this.getSuitableHeight()),this}isActive(){return this.active}needToBeShown(){return this.height>1.25*this.options.collapsedHeight}clear(){return this.setElementHeight(this.container).saveInitialHeight(),this}render(){const t=this.getSuitableHeight();return this.setElementHeight(this.container,t),this}getContainer(){return this.container}}},27329:(t,e,i)=>{i.r(e),i.d(e,{default:()=>a});var s=i(1001),r=i(21464),n=i(98684);const l='[data-module="FilterNavigation"]';class a{static setup(t=l){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{new a(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.primeLevel=this.element.querySelector(this.options.primeLayerSelector),this.layerItems=this.getLayerItems(this.element,this.options.layerItemSelector),this.layerLists=Array.from(this.element.querySelectorAll(this.options.layerListSelector)),this.layersStructure=this.getLayersStructure(this.layerItems),this.options.state=(0,r.WQ)(),this.init()}init(){return this.initHorizontalScrolling(this.layerLists).initExpanderFirtAndLast().addHandlerOnLayerItemsClick().recoverFilterNav().togglePrimeLayer(),this.element.querySelector(".nx-filter-navigation--display-all")&&this.initHeightObserver(),this}initHeightObserver(){const t=(0,r.sg)(()=>{const t=this.element.querySelector(".nx-filter-navigation__level--active");t&&requestAnimationFrame(()=>{this.element.style.height=`${t.offsetHeight}px`})},50),e=new MutationObserver(e=>{e.forEach(e=>{"attributes"===e.type&&"class"===e.attributeName&&t()})}),i=new ResizeObserver(()=>{t()});return Array.from(this.element.children).forEach(t=>{e.observe(t,{attributes:!0}),i.observe(t)}),i.observe(this.element),t(),this}togglePrimeLayer(){return Array.from(this.element.querySelectorAll(this.options.layerSelector)).map(t=>t.getAttribute("data-key")).filter(t=>null!=t).some(t=>this.options.state.hasOwnProperty(t))||this.toggleLayer(this.primeLevel.id),this}initExpanderFirtAndLast(){return this.layersStructure[this.primeLevel.id]=new s.default(this.primeLevel,{collapsedHeight:this.primeLevel.offsetHeight}),this}initHorizontalScrolling(t){return t.forEach(t=>(0,r.aO)(t)),this}getChildLayerID(t){return t.dataset.id}getCurrentLayerID(t){return this.getCurrentLayer(t).id}getCurrentLayer(t){return t.closest(this.options.layerSelector)}getParentLayerID(t){return this.getCurrentLayer(t).dataset.parentId}getParentLayer(t){return document.getElementById(this.getParentLayerID(t))}getLayerItems(t,e){return Array.from(t.querySelectorAll(e))}getLayersStructure(t){return t.reduce((t,e)=>{const i=this.getChildLayerID(e),r=document.getElementById(i);return!t[i]&&r&&(t[i]=new s.default(r,{collapsedHeight:0})),t},{})}addHandlerOnLayerItemsClick(){return Array.from(this.element.querySelectorAll(".nx-filter-navigation__item--all")).forEac
1h(t=>t.addEventListener("click",()=>this.goToPreviousLevel())),this.layerItems.forEach(t=>t.addEventListener("click",this.onLayerItemClick.bind(this))),this}onLayerItemClick(t){var e,i,s;const r=this._lastActiveItem=t.currentTarget,n=this.getChildLayerID(r),l=Array.from(r.parentElement.querySelectorAll(`${this.options.layerItemSelector}.${this.options.activeClass}`)).filter(t=>t!==r),a=null===(e=r.querySelector(".nx-filter-navigation__count"))||void 0===e?void 0:e.textContent,o=null===(i=r.querySelector("svg, img"))||void 0===i?void 0:i.cloneNode(!0),h=null===(s=this._lastActiveItem.parentElement)||void 0===s?void 0:s.querySelector(`${this.options.backBtn}`);this.removePrevActiveSibls(l),r.classList.toggle(this.options.activeClass);const c=r.classList.contains(this.options.activeClass);if(n)this.runUpdateCB(),this.toggleLayer(this.getCurrentLayerID(r)),this.toggleLayer(n,!0),this.showBackButton(n,r.dataset.key,r.textContent,a,o);else if(this.options.updateCB1(),c)this.disableBackBtn(h);else{this.enableBackBtn(h);const t=this.getParentLayer(this._lastActiveItem),e=t?this.getActiveItem(t):null;this._lastActiveItem=e}}disableBackBtn(t){t.classList.add("nx-back-btn--disabled")}enableBackBtn(t){t.classList.remove("nx-back-btn--disabled")}removePrevActiveSibls(t){t.forEach(t=>(0,n.vy)(t,this.options.activeClass))}showBackButton(t,e,i,s,r){var n,l;const a=null===(n=document.getElementById(`${t}`))||void 0===n?void 0:n.querySelector(".nx-filter-navigation__item--all"),o=null==a?void 0:a.querySelector(".nx-filter-navigation__text"),h=null==a?void 0:a.querySelector(".nx-filter-navigation__back-btn"),c=null==a?void 0:a.querySelector(".nx-filter-navigation__count");a.setAttribute("data-key",e),o&&i&&(o.textContent=i),c&&s&&(c.textContent=s),o&&c&&o.appendChild(c);const u=null==a?void 0:a.querySelector(".nx-filter-navigation__item-content");null===(l=null==u?void 0:u.querySelector("svg, img"))||void 0===l||l.remove(),r&&u&&u.prepend(r),!h&&(null==a||a.prepend(this.getBackBtnArrow()))}recoverFilterNav(){var t,e;const i=Array.from(this.element.querySelectorAll(this.options.layerSelector));let s=!1;const r=[];for(let t=i.length-1;t>=0;t--){let e=i[t].getAttribute("data-key"),s=i[t].querySelector(`${this.options.layerItemSelector}[data-key="${this.options.state[e]}"]`);this.options.state.hasOwnProperty(e)&&(s.classList.add(this.options.activeClass),r.push(s))}for(let n=i.length-1;n>=0;n--){let l=i[n].getAttribute("data-key"),a=i[n].querySelector(`${this.options.layerItemSelector}[data-key="${this.options.state[l]}"]`);if(this.options.state.hasOwnProperty(l)){const i=this.getCurrentLayerID(a),n=this.getChildLayerID(a),l=null===(t=a.querySelector(".nx-filter-navigation__count"))||void 0===t?void 0:t.textContent,o=null===(e=a.querySelector("svg, img"))||void 0===e?void 0:e.cloneNode(!0);if(!s){if(n)this.toggleLayer(n,!0),this.showBackButton(n,a.dataset.key,a.textContent,l,o);else{a.classList.remove(this.options.activeClass);const t=r.find(t=>t.classList.contains(this.options.activeClass));this.toggleLayer(i,!0),t&&this.showBackButton(i,t.dataset.key,t.querySelector(".nx-filter-navigation__text").textContent,l,o)}this._lastActiveItem=a,s=!s}}}return setTimeout(()=>{r.filter(t=>{0==t.classList.contains(this.options.activeClass)&&t.click()})},500),this}toggleLayer(t,e){const i=this.layersStructure[t],s=i&&i.getContainer();return s&&(i.toggle(),s.classList.toggle("nx-filter-navigation__level--active")),this}hasLayerVisibleItems(t){var e;return t&&(null===(e=Array.from(t.querySelectorAll(this.options.layerItemSelector)))||void 0===e?void 0:e.some(t=>!1===t.hidden))}goToPreviousLevel(){var t,e;if(!this._lastActiveItem)return;const i=this.getParentLayer(this._lastActiveItem),s=i?this.getActiveItem(i):null,r=this.getChildLayerID(this._lastActiveItem),n=!r,l=this.getCurrentLayerID(this._lastActiveItem),a=null==s?void 0:s.querySelector(".nx-filter-navigation__text").textContent,o=null===(t=null==s?void 0:s.querySelector("svg, img"))||void 0===t?void 0:t.cloneNode(!0);return this.deleteActFilterBubble(),this.clearLayer(this.getCurrentLayer(this._lastActiveItem)),this.enableBackBtn(null===(e=this._lastActiveItem.parentElement)||void 0===e?void 0:e.querySelector(`${this.options.backBtn}`)),n||(this.toggleLayer(l),this.toggleLayer(r),this.primeLevel.id!=l&&this.showBackButton(l,null==s?void 0:s.dataset.key,a,null,o)),this.runUpdateCB(),this._lastActiveItem=s,this}clearLayer(t){var e;return null===(e=this.getActiveItem(t))||void 0===e||e.classList.remove(this.options.activeClass),this}deleteActFilterBubble(){const t=this._lastActiveItem.dataset.key,e=null===document||void 0===document?void 0:document.querySelector(`.nx-active-filters__item[data-input-name="${t}"]`);e&&(0,r.N0)(e.inputElement,!1)}getActiveItem(t){return t.querySelector(`${this.options.layerItemSelector}.${this.options.activeClass}`)}runUpdateCB(){return this.options.updateCB(),this}
1getBackBtnArrow(){return(0,n.Uo)('\n <span class="nx-filter-navigation__back-btn" >\n <svg xmlns="http://www.w3.org/2000/svg" width="10" height="16" viewBox="0 0 10 16" fill="none">\n <path class="nx-icon-arrow-left" d="M7.88912 15.7601L7.81418 15.6978L0.301439 8.66698C0.159493 8.53472 0.062067 8.36654 0.0211639 8.18318C0.0211639 8.17338 0.0211639 8.16358 0.0159178 8.15378C0.0106726 8.14397 0.00992203 8.12017 0.00767422 8.10337C0.00542641 8.08656 0.00767422 8.07186 0.00242805 8.05576C-0.00281715 8.03965 0.00242805 8.01725 0.00242805 7.99834C0.00167847 7.98715 0.00167847 7.97593 0.00242805 7.96474C0.00242805 7.9484 0.00242805 7.9323 0.00242805 7.91643C0.00242805 7.89332 0.00617599 7.87022 0.00992298 7.84641V7.83031C0.00992298 7.8058 0.0189161 7.782 0.0249109 7.76029C0.0249109 7.75119 0.0309057 7.74209 0.0339031 7.73299C0.0709162 7.60097 0.138448 7.47813 0.231745 7.37311L0.298442 7.3031L7.81567 0.28205C8.20436 -0.0811729 8.8298 -0.095356 9.23688 0.249823C9.64397 0.595 9.68933 1.17796 9.33995 1.57452L9.27326 1.64453L2.48519 7.98854L9.27326 14.334C9.6846 14.6931 9.71121 15.2943 9.33302 15.6839C8.95483 16.0736 8.31187 16.1076 7.88912 15.7601Z"/>\n </svg>\n </span>\n ')}getDefaultOptions(){return{layerSelector:".nx-filter-navigation__level",primeLayerSelector:".nx-filter-navigation__level--prime",layerListSelector:".nx-filter-navigation__list",layerItemSelector:".nx-filter-navigation__item",scrollBarSelector:".nx-filter-navigation__scrollbar",activeClass:"nx-active",backBtn:".nx-filter-navigation__item--all"}}}a.setup(l)}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/FilterNavigation.c2a3eb64.js.6e32e2ff.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.