PageSourceSearch

https://www.florena.de/dist/NiveaX/modules/ScrollBar.b5084dcf.js

js florena.de collected 2026-10-02 13:41:05 UTC 3,375 bytes, 2 lines download raw bytes

1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[8091],{99567:(t,e,i)=>{i.r(e),i.d(e,{default:()=>l});var s=i(53983),h=i(21464);const a='[data-module="ScrollBar"]';class l{static setup(t=a){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,h.$E)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.list=this.element.querySelector(`.${this.options.sbListSelector}`),this.init()}init(){return this.psb=new s.A(this.element,this.options),this.onPageLoaded().onResize(),this}initFadeSide(){return this.fadeSide=new d(this.element,this.options.fadeWidth),this}updateScrollBar(){return this.element.closest(".nx-advantages")&&this.adjustScrollBarListWidth(),this.psb&&this.psb.update(),this}getScrollBarListWidth(){const t=this.list.querySelector(`.${this.options.sbListItem}`),e=this.list.querySelectorAll(`.${this.options.sbListItem}`).length;return Math.ceil(e*t.offsetWidth+1)}adjustScrollBarListWidth(){return this.clearScrollBarListWidth(),this.list.style.width=this.getScrollBarListWidth()+"px",this}clearScrollBarListWidth(){return this.list.style.width="",this}initScrollBarAfterPageLoaded(){return this.updateScrollBar(),this.options.fadeSide&&this.initFadeSide(),this}onResize(){return NiveaX.addToEventStore("resize",this.updateScrollBar.bind(this),window),this}onPageLoaded(){return"complete"===document.readyState?this.initScrollBarAfterPageLoaded():NiveaX.addToEventStore("load",this.initScrollBarAfterPageLoaded.bind(this),window),this}getDefaultOptions(){return{fadeSide:!0,suppressScrollY:!0,sbListSelector:"nx-benefits__list",fadeWidth:null,sbListItem:"nx-benefit",useBothWheelAxes:!0,swipeEasing:!0}}destroy(){var t;return null===(t=this.psb)||void 0===t||t.destroy(),this.psb=null,this}rebuild(){return this.psb=new s.A(this.element,this.options),this.updateScrollBar(),this}}class d{constructor(t,e){this.element=t,this.leftMaskWidth=0,this.rightMaskWidth=0,this.fadeWidth=e||this.getFadeWidth(),this.leftMaskWidth=this.fadeWidth,this.rightMaskWidth=this.fadeWidth,this.init()}init(){this.adjustFadeElements(),this.element.addEventListener("ps-scroll-x",()=>{this.adjustFadeElements()})}adjustFadeElements(){let t,e,i=this.element.scrollWidth,s=Math.abs(this.element.scrollLeft),h=Math.abs(i-(s+this.element.clientWidth));s<=this.fadeWidth&&(t=s/this.fadeWidth*this.fadeWidth),h<=this.fadeWidth&&(e=h/this.fadeWidth*this.fadeWidth),null==t&&null==e&&(t=this.fadeWidth,e=this.fadeWidth);let a="ltr"==document.dir?t:e,l="ltr"==document.dir?e:t;this.leftMaskWidth=null!=a?a:this.leftMaskWidth,this.rightMaskWidth=null!=l?l:this.rightMaskWidth,this.element.setAttribute("style",`-webkit-mask-image: linear-gradient(to right, transparent 0px, black ${this.leftMaskWidth}px), linear-gradient(to left, transparent 0px, black ${this.rightMaskWidth}px);\n        mask-image: linear-gradient(to right, transparent 0px, black ${this.leftMaskWidth}px), linear-gradient(to left, transparent 0px, black ${this.rightMaskWidth}px);`)}setFadeWith(t){this.fadeWidth=t}getFadeWidth(){var t;return null===(t=this.element.querySelector(".nx-benefit"))||void 0===t?void 0:t.clientWidth}}l.setup(a)}}]);
2//# sourceMappingURL=/dist/NiveaX/./modules/ScrollBar.b5084dcf.js.6b5e7827.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.