PageSourceSearch

https://www.nivea.ph/dist/NiveaX/modules/TeaserScrollSlider-TeaserScrollSlider.a811b8a6.js

js nivea.ph collected 2026-09-26 11:58:57 UTC 3,134 bytes, 2 lines download raw bytes

1"use strict";(self.NiveaXwebpackJsonp=self.NiveaXwebpackJsonp||[]).push([[7732],{57096:(e,i,t)=>{t.r(i),t.d(i,{default:()=>n});var r=t(45291),s=t(79298),o=t(98684);class n{static setup(e='[data-module="TeaserScrollSlider"]'){Array.from(document.querySelectorAll(e)).filter(e=>!e.dataset.moduleInitialized).forEach(e=>{new n(e),e.dataset.moduleInitialized="true"})}constructor(e){this.element=e,this.init()}init(){this.sliderWrapperHorizontal=this.element.querySelector(".nx-product-stage__grid--horizontal"),this.sliderWrapperVertical=this.element.querySelector(".nx-product-stage__grid--vertical"),this.productItems=Array.from(this.element.querySelectorAll(".nx-product-stage__grid--item")),this.sliderWrapperVertical&&this.initProductStageVertical(),this.sliderWrapperHorizontal&&this.initProductStageHorizontal()}initProductStageVertical(){const e=this.element.querySelector(".swiper");document.addEventListener("niveax:breakpointchange",i=>{const t=i.detail.deviceType;console.log(t),"isMobile"===t||"isTablet"===t?(this.destroySlider(),this.slider=new r.R(e,this.getSwiperOptions())):this.destroySlider()}),window.NiveaX.deviceType.isDesktop?(0,o.jo)(this.element,"nx-u-spinner","nx-u-spinner--medium"):window.NiveaX.deviceType.isDesktop||(this.slider=new r.R(e,this.getSwiperOptions()))}initProductStageHorizontal(){const e=this.element.querySelector(".swiper");window.NiveaX.deviceType.isDesktop&&(this.sliderWrapperHorizontal.innerHTML="",this.sliderWrapperHorizontal.append(...this.getDesktopMarkup())),(window.NiveaX.deviceType.isMobile||window.NiveaX.deviceType.isTablet)&&this.productItems.forEach(e=>(0,o.iQ)(e,"swiper-slide")),this.slider=new r.R(e,this.getSwiperOptions()),document.addEventListener("niveax:breakpointchange",i=>{const t=i.detail.deviceType;console.log(window.NiveaX.deviceType),"isMobile"==t||"isTablet"==t?(this.destroySlider(),this.updateMarkup(this.getMobileMarkup()),this.slider=new r.R(e,this.getSwiperOptions())):(this.destroySlider(),this.updateMarkup(this.getDesktopMarkup()),this.productItems.forEach(e=>(0,o.vy)(e,"swiper-slide")),this.slider=new r.R(e,this.getSwiperOptions()))})}getDesktopMarkup(){const e=[...this.productItems],i=Math.round(this.productItems.length/2);return Array.from({length:i}).map((i,t)=>{const r=t=0==t?1:2,s=e.splice(0,r),n=(0,o.Sw)("swiper-slide");return n.append(...s),n})}getMobileMarkup(){const e=[...this.productItems];return e.forEach(e=>(0,o.iQ)(e,"swiper-slide")),e}getSwiperOptions(){return{modules:[s.Ze,s.FJ],slidesPerView:"auto",lazyPreloadPrevNext:2,spaceBetween:8,direction:"horizontal",on:{init:()=>{(0,o.jo)(this.element,"nx-u-spinner","nx-u-spinner--medium")}},scrollbar:{el:".swiper-scrollbar",hide:!1,draggable:!0,snapOnRelease:!0,dragSize:"auto"},mousewheel:{enabled:!0,sensitivity:4},breakpoints:{320:{autoHeight:!0},1024:{spaceBetween:16,autoHeight:!1}}}}updateMarkup(e){this.sliderWrapperHorizontal.innerHTML="",this.sliderWrapperHorizontal.append(...e)}destroySlider(){var e;null===(e=this.slider)||void 0===e||e.destroy(!0,!0)}}}}]);
2//# sourceMappingURL=/dist/NiveaX/./modules/TeaserScrollSlider-TeaserScrollSlider.a811b8a6.js.b54256c3.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.