PageSourceSearch

https://www.beiersdorf.com/dist/bdfcw/modules/Expander.6559e886.js

js beiersdorf.com collected 2026-10-02 02:15:02 UTC 4,781 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3699,8174],{17098(t,e,i){var n=i(20017);const o=function(){function t(t,e){void 0===e&&(e={}),this.container=t,this.options=e,this.active=this.container.className.includes("active"),this.options=(0,n.$E)(this.container,Object.assign(this.getDefaultOptions(),this.options)),this.init()}return t.prototype.init=function(){return this.saveInitialHeight().setElementHeight(this.container,this.getSuitableHeight()),this},t.prototype.saveInitialHeight=function(){return this.height=this.options.maxHeight||this.getElementHeight(this.container),this.width=this.getElementWidth(this.container),this.container.dataset.elementHeight=null!=this.height?this.height.toString():"",this.container.dataset.elementWidth=null!=this.height?this.width.toString():"",this},t.prototype.getElementHeight=function(t){return t.offsetHeight},t.prototype.getElementWidth=function(t){return t.offsetWidth},t.prototype.getSuitableHeight=function(){return this.active?this.height:this.options.collapsedHeight},t.prototype.setElementHeight=function(t,e){return t.style.maxHeight=null!=e?e+"px":"",this},t.prototype.toggleState=function(){return this.active=!this.active,this},t.prototype.getDefaultOptions=function(){return{collapsedHeight:115}},t.prototype.setCollapsedHeight=function(t){return this.options.collapsedHeight=t,this},t.prototype.toggle=function(){return this.toggleState().setElementHeight(this.container,this.getSuitableHeight()),this},t.prototype.isActive=function(){return this.active},t.prototype.needToBeShown=function(){return this.height>1.25*this.options.collapsedHeight},t.prototype.clear=function(){return this.setElementHeight(this.container).saveInitialHeight(),this},t.prototype.render=function(){return this.setElementHeight(this.container,this.getSuitableHeight()),this},t.prototype.getContainer=function(){return this.container},t}();i.d(e,["default",0,o])},57389(t,e,i){var n=i(17098),o=i(20017),s='[data-module="Expander"]',r=function(){function t(t,e){void 0===e&&(e={}),this.element=t,this.options=e,this.options=(0,o.$E)(this.element,Object.assign(this.getDefaultOptions(),this.options)),this.container=this.element.querySelector(".".concat(this.options.contaiterSelector))||this.element,this.button=this.element.querySelector(".".concat(this.options.buttonSelector)),this.expandable=new n.default(this.container,this.options.expandableOptions),this.init()}return t.setup=function(e){void 0===e&&(e=s),Array.from(document.querySelectorAll(e)).filter(function(t){return!t.dataset.moduleInitialized}).forEach(function(e){new t(e),e.dataset.moduleInitialized="true"})},t.prototype.init=function(){return this.showExpanderButton().setButtonEventHandler().adjustAppearance().applyActiveFromOptions(),this},t.prototype.showExpanderButton=function(){return this.button.hidden=!1,this},t.prototype.setButtonEventHandler=function(){return this.button.addEventListener("click",this.toggleExpander.bind(this)),this},t.prototype.toggleActiveModifier=function(t){return t?this.element.classList.add("".concat(this.options.elementSelector,"--active")):this.element.classList.remove("".concat(this.options.elementSelector,"--active")),this},t.prototype.showFade=function(t){return t?this.options.hasFade&&this.container.classList.add("".concat(this.options.contaiterSelector,"--with-fade")):this.options.hasFade&&this.container.classList.remove("".concat(this.options.contaiterSelector,"--with-fade")),this},t.prototype.toggleExpander=function(t){void 0===t&&(t=!0),this.expandable.toggle(),this.toggleActiveModifier(this.expandable.isActive())},t.prototype.applyActiveFromOptions=function(){return this.options.isActive&&this.toggleExpander(!1),this},t.prototype.setupExpander=function(){return this.expandable.render(),this.showFade(!0).hideButton(!1),this},t.prototype.destroyExpander=function(){return this.expandable.clear(),this.showFade(!1).hideButton(!0),this},t.prototype.hideButton=function(t){return this.button.hidden=t,this},t.prototype.getDefaultOptions=function(){return{elementSelector:"cw-expander",contaiterSelector:"cw-expander__content",buttonSelector:"cw-expander__button",hasFa
1de:!0,beforeResize:function(){}}},t.prototype.adjustAppearance=function(){return this.expandable.clear(),this.expandable.needToBeShown()?this.setupExpander():this.destroyExpander(),this},t.prototype.setCollapsedHeight=function(t){return this.expandable.setCollapsedHeight(t),this},t.prototype.setBeforResizeCB=function(t){return this.options.beforeResize=t,this},t.prototype.isActive=function(){return this.expandable.isActive()},t.prototype.toggle=function(){return this.toggleExpander(),this},t}();const h=r;new r.setup(s),i.d(e,["default",0,h])}}]);
2//# sourceMappingURL=/dist/bdfcw/./modules/Expander.6559e886.js.60cefb72.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.