1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[6707,8334,8791,9384],{13989:(t,e,s)=>{s.r(e),s.d(e,{default:()=>u});var o=s(19446),i=s(60778),r=s(45204),n=s(90460),a=s(91950),l=s(21464),c=s(98684),p=s(58162);const h='[data-module="Sort"]';class u{static setup(t=h){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{new u(t),t.dataset.moduleInitialized="true"})}constructor(t,e={}){this.element=t,this.options=e,this.sortMethod=null,this.options=(0,l.$E)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.sortOpenBtn=this.element.querySelector(this.options.sortOpenBtnSelector),this.sortTmplNode=this.element.querySelector(this.options.sortTmplSelector),this.sortSelect=this.element.querySelector(this.options.sortSelectSelector),this.layer=this.getSortLayer(),this.sortList=this.layer.getLayerNode().querySelector(this.options.sortListSelector),this.init()}init(){return this.addHandlerOnSortOpenBtnClick().addHandlerOnSortLayerClick(),this}getSortLayer(){const t=new a.default(this.element,{afterOpen:async()=>{document.dispatchEvent(new CustomEvent("NiveaBasicTracking:reInitHandlers"))},beforeClose:async()=>this.removeOptionSelection().recoverLastSelectedOption()});return t.insertContent((0,c.Uo)(this.sortTmplNode.innerHTML)),t}openSortLayer(t){return this.layer.open(),this}closeSortLayer(){return this.layer.close(),this}addHandlerOnSortOpenBtnClick(){return this.sortOpenBtn.addEventListener("click",()=>this.openSortLayer()),this}addHandlerOnSortLayerClick(){const t=this.layer.getLayerNode(),e=(0,o.R)(t,"click").pipe((0,i.T)(({target:t})=>t)),s=e.pipe((0,r.p)(this.isListOption())),n=e.pipe((0,r.p)(this.isSortButton()));return s.subscribe(t=>this.toggleOption(t)),n.subscribe(()=>this.applySort()),this}applySort(){return this.setSortMethod(this.sortMethod).saveSelectedOption().reloadFilterAction().closeSortLayer().trackSort(),this}trackSort(){return new p.default(this.lastSelectedOption),this}toggleOption(t){const e=`${this.options.sortListOptionSelector}--selected`;this.removeOptionSelection(),(0,c.iQ)(t,e),this.sortMethod=t.dataset.optionValue}isListOption(){return(0,n.OH)(c.nB,n.OH,this.options.sortListOptionSelector)}isSortButton(){return(0,n.OH)(c.nB,n.OH,this.options.sortBtnSelector)}isLayerCloseBtn(){return(0,n.OH)((t,e)=>!!e.closest(t),`.${this.options.sortLayerCloseBtnSelector}`)}reloadFilterAction(){return this.options.callbacks.reload(),this}setSortMethod(t){return this.sortSelect.value=t||this.sortSelect.value,this}saveSelectedOption(){return this.lastSelectedOption=this.sortList.querySelector(`.${this.options.sortListOptionSelector}--selected`),this}removeOptionSelection(){return(0,c.vg)(Array.from(this.sortList.children),`${this.options.sortListOptionSelector}--selected`),this}recoverLastSelectedOption(){return this.lastSelectedOption&&(0,c.iQ)(this.lastSelectedOption,`${this.options.sortListOptionSelector}--selected`),this}getDefaultOptions(){return{sortOpenBtnSelector:".nx-sort-button__wrapper",sortTmplSelector:".nx-sort__tmpl",sortBtnSelector:"nx-sort-filters__sort-btn",sortListOptionSelector:"nx-sort-list__option",sortListSelector:".nx-sort-list",sortSelectSelector:"#sort",sortLayerCloseBtnSelector:"nx-layer__close",callbacks:{update:()=>{},reload:()=>{},saveState:()=>{},resetState:()=>{}}}}}u.setup(h)},37564:(t,e,s)=>{s.r(e),s.d(e,{default:()=>a});var o=s(84444),i=s(21464),r=s(98684);const n=["nx-u-spinner","nx-u-spinner--medium"];class a extends o.default{constructor(t,e={}){super(t,e),this.options=(0,i.$E)(this.element,this.options),this.init()}getDefaultOptions(){const t=super.getDefaultOptions();return Object.assign(Object.assign({},t),{layerModifierClasses:`${t.layerMainClass}--page`,layerCloseBtnModifierClass:`${t.layerMainClass}__close-btn--page`,layerCloseIconClass:`${t.layerCloseIconClass} nx-close-icon--thin`,beforeOpen:async()=>{await window.NiveaX.initModules()},afterOpen:async()=>{},beforeClose:async()=>{},afterClose:async()=>{}})}get isOpen(){return document.body.contains(this.layer)}showSpinner(){return(0,r.gR)(this.layer.querySelector(".nx-layer__wrapper"),...n
1),this.isOpen||i.LW.prevent(!0),super.open(),this}async open(t=()=>{}){const{layerMainClass:e,beforeOpen:s,afterOpen:o}=this.options;await s(),this.backButton(),this.isOpen||i.LW.prevent(!0),(0,r.jo)(this.layer.querySelector(".nx-layer__wrapper"),...n),super.open(),(0,i.mS)(()=>this.layer.classList.add(`${e}--open`)),window.NiveaX.loadShopPrices(),await o(),t()}async close(t=()=>{}){const{layerMainClass:e,beforeClose:s,afterClose:o}=this.options;await s(),sessionStorage.removeItem("layers"),(0,r.iQ)(this.layer,`${e}--closing`),(0,i.Ys)(()=>{(0,r.jo)(this.layer,`${e}--open`,`${e}--closing`),super.close()},400),(document.body.classList.contains("nx-u-lock-screen")||document.body.classList.contains("nx-u-prevent-scroll"))&&i.LW.allow(),await o(),t()}backButton(){let t,e,s=sessionStorage.getItem("layers");if(s)if(t=JSON.parse(s),t.includes(location.hash)){let s=t.findIndex(t=>t==location.hash)+1;t=t.slice(0,s),e=[...t]}else e=[...t,location.hash];else e=[location.hash];sessionStorage.setItem("layers",`${JSON.stringify(e)}`),e.length>1?this.layer.classList.add("nx-layer--show-back-tbn"):this.layer.classList.remove("nx-layer--show-back-tbn")}}},58162:(t,e,s)=>{s.r(e),s.d(e,{default:()=>i});var o=s(23076);class i{constructor(t){this.element=t,this.init()}init(){this.trackSortOption(this.element.innerText)}trackSortOption(t){window.NiveaX.IsUAEnabled&&(0,o.VE)({event:"ga_event",eventCategory:"Sort",eventAction:"Sort",eventLabel:t,eventNonInteraction:!1})}}},91950:(t,e,s)=>{s.r(e),s.d(e,{default:()=>v});var o=s(19446),i=s(88692),r=s(8481),n=s(45204),a=s(41445),l=s(60778),c=s(71678),p=s(24329),h=s(24746),u=s(70846);var d=function(){function t(t,e){this.predicate=t,this.inclusive=e}return t.prototype.call=function(t,e){return e.subscribe(new y(t,this.predicate,this.inclusive))},t}(),y=function(t){function e(e,s,o){var i=t.call(this,e)||this;return i.predicate=s,i.inclusive=o,i.index=0,i}return h.C6(e,t),e.prototype._next=function(t){var e,s=this.destination;try{e=this.predicate(t,this.index++)}catch(t){return void s.error(t)}this.nextOrComplete(t,e)},e.prototype.nextOrComplete=function(t,e){var s=this.destination;Boolean(e)?s.next(t):(this.inclusive&&s.next(t),s.complete())},e}(u.v),S=s(37564),O=s(21464),f=s(98684);const m='[data-module="LayerPage"]';class v extends S.default{static setup(t=m){Array.from(document.querySelectorAll(t)).filter(t=>!t.dataset.moduleInitialized).forEach(t=>{new v(t),t.dataset.moduleInitialized="true"})}constructor(t,e={}){super(t,e),this.listenToEvents()}getDefaultOptions(){const t=super.getDefaultOptions();return Object.assign(Object.assign({},t),{layerModifierClasses:`${t.layerMainClass}--page`,layerCloseBtnModifierClass:`${t.layerMainClass}__close-btn--page`,layerCloseIconClass:`${t.layerCloseIconClass} nx-close-icon--thin`,beforeOpen:async()=>{await NiveaX.initModules()},afterOpen:async()=>{},beforeClose:async()=>{},afterClose:async()=>{}})}listenToEvents(){const t=(0,o.R)(this.layerContent,"touchstart",{passive:!0}).pipe((0,n.p)(t=>t.target===t.currentTarget)),e=(0,o.R)(document,"touchend",{passive:!0}).pipe((0,a.M)(()=>requestAnimationFrame(()=>this.wrapper.removeAttribute("style")))),s=(0,o.R)(document,"touchmove",{passive:!0}).pipe((0,l.T)(t=>t.changedTouches[0].clientY)),{layerMainClass:h}=this.options;return t.pipe((0,l.T)(t=>t.changedTouches[0].clientY),(0,c.n)(t=>{return(0,i.zV)((0,r.of)(t),s).pipe((0,p.Q)(e),(o=()=>!(0,f.nB)(this.layer,`${h}--closing`),void 0===n&&(n=!1),function(t){return t.lift(new d(o,n))}));var o,n})).subscribe(([t,e])=>{const s=e-t,o=s/(.3*document.documentElement.offsetHeight),i={transform:`translateY(${Math.max(s,0)}px) scale(${Math.min(1-.2*o,1)})`,transition:"none",overflow:"hidden",opacity:Math.min(1-.6*o,1)};o<1?this.wrapper.setAttribute("style",(0,f.FQ)(i)):(this.close(),(0,O.Ys)(()=>{this.wrapper.removeAttribute("style")},300))}),this}
1getLayerNode(){return this.layer}}v.setup(m)}}]); 2//# sourceMappingURL=/dist/NiveaX/./modules/Sort.afd718a5.js.903c7351.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.