https://dz.diesel.com/on/demandware.static/Sites-DieselWW-Site/-/e…/js/component-Accordion.chunks.js
1(self.webpackChunkapp_project=self.webpackChunkapp_project||[]).push([[5895],{31968:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>r});const i=s(38302).default;class r extends i{get SELECTORS(){return{triggers:".js-accordion-trigger",content:".js-accordion-content",item:".accordion-item"}}get CLASSES(){return{active:"is-active",visible:"is-visible",triggers:"js-accordion-trigger"}}get MODIFIERS(){return{keepOpen:"accordionModKeepopen"}}constructor(e){super(e),setTimeout((()=>{this.timeout=null,this.triggers=[...this.element.querySelectorAll(this.SELECTORS.triggers)],this.contents=[...this.element.querySelectorAll(this.SELECTORS.content)],this.accordionItemWrapper=[...this.element.querySelectorAll(this.SELECTORS.item)],this.mods=Object.keys(this.MODIFIERS).reduce(((e,t)=>(e[t]="true"===this.element.dataset[this.MODIFIERS[t]],e)),{}),this.selectTabByUrl(),this.handleClick()}),1e3)}async selectTabByUrl(){const{hash:e}=window.location;if(e){const t=document.querySelector('[aria-controls="'.concat(e.replace("#",""),'"]'));t&&(await this.closeOthers(t),this.open(t))}}closeElement(e){e.classList.remove(this.CLASSES.active),setTimeout((()=>{e.classList.remove(this.CLASSES.visible)}),100)}closeOthers(e){const t=e.parentElement;this.element.querySelectorAll(this.SELECTORS.item).forEach((e=>{t!==e&&this.closeElement(e)}))}open(e){const t=e.parentElement,s=t.classList.contains(this.CLASSES.active);if(!s||!this.mods||!this.mods.keepOpen){this.triggers.forEach((e=>e.setAttribute("aria-expanded","false"))),this.contents.forEach((e=>e.setAttribute("aria-hidden","true"))),e.setAttribute("aria-expanded",String(!s));var i=this.element.querySelector("#".concat(e.getAttribute("aria-controls")));i&&i.setAttribute("aria-hidden",String(!s)),t.classList[s?"remove":"add"](this.CLASSES.active),this.timeout=setTimeout((()=>{t.classList[s?"remove":"add"](this.CLASSES.visible)}),100)}}handleClick(){this.element.addEventListener("click",(e=>{const t=e.target;t.classList.contains(this.CLASSES.triggers)&&(e.preventDefault(),clearTimeout(this.timeout),this.closeOthers(t),this.open(t))}))}}}}]);
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.