<html><head></head><body>{"version":3,"file":"accordion-Bm3Bz4rI.js","sources":["../../src/scripts/modules/accordion.ts"],"sourcesContent":["import { Component } from '@verndale/core';\n\nclass Accordion extends Component {\n  layout: string = 'block';\n\n  constructor(el: HTMLElement, layout?: string) {\n    super(el);\n    if (layout) {\n      this.layout = layout;\n    }\n  }\n\n  setupDefaults() {\n    this.dom = {\n      triggers: this.el.querySelectorAll('.accordion__item-trigger'),\n      panels: this.el.querySelectorAll('.accordion__item-panel')\n    };\n\n    this.initAccordion();\n  }\n\n  addListeners() {\n    (this.dom.triggers as NodeList).forEach(trigger =&gt;\n      trigger.addEventListener('click', this.handleClick.bind(this))\n    );\n  }\n\n  initAccordion() {\n    (this.dom.triggers as NodeListOf<htmlbuttonelement>).forEach(trigger =&gt; {\n      if (trigger.getAttribute('aria-expanded') === 'true') {\n        this.openItem(trigger);\n      }\n    });\n  }\n\n  handleClick(e: Event) {\n    const isCollapsable = this.el.dataset.isCollapsable === 'true';\n    const trigger = e.currentTarget as HTMLButtonElement;\n    if (isCollapsable) {\n      (this.dom.triggers as NodeListOf<htmlelement>).forEach(item =&gt; {\n        if (item.getAttribute('aria-expanded') === 'true') {\n          this.closeItem(item as HTMLButtonElement);\n        } else if (item.getAttribute('aria-expanded') === 'false' &amp;&amp; item === trigger) {\n          this.openItem(item as HTMLButtonElement);\n        }\n      });\n    } else {\n      if (trigger.getAttribute('aria-expanded') === 'true') {\n        this.closeItem(trigger);\n      } else {\n        this.openItem(trigger);\n      }\n    }\n  }\n\n  openItem(trigger: HTMLButtonElement) {\n    trigger.setAttribute('aria-expanded', 'true');\n\n    const panel = document.getElementById(trigger.getAttribute('aria-controls') as string);\n\n    if (panel) {\n      panel.removeAttribute('style');\n      panel.style.display = this.layout;\n      const pannelContent = panel.querySelector<htmlelement>('.accordion__item-content');\n\n      panel.style.height = `${pannelContent?.offsetHeight}px`;\n\n      setTimeout(() =&gt; {\n        panel.style.height = 'auto';\n        panel.style.display = this.layout;\n      }, 250);\n    }\n  }\n\n  closeItem(trigger: HTMLButtonElement) {\n    trigger.setAttribute('aria-expanded', 'false');\n\n    const panel = document.getElementById(trigger.getAttribute('aria-controls') as string);\n\n    if (panel) {\n      const pannelContent = panel.querySelector<htmlelement>('.accordion__item-content');\n      panel.style.height = `${pannelContent?.offsetHeight}px`;\n      setTimeout(() =&gt; (panel.style.height = '0px'));\n      setTimeout(() =&gt; (panel.style.display = 'none'), 500);\n    }\n  }\n}\n\nexport default Accordion;\n"],"names":["Accordion","Component","el","layout","__publicField","trigger","e","isCollapsable","item","panel","pannelContent"],"mappings":"iNAEA,MAAMA,UAAkBC,CAAU,CAGhC,YAAYC,EAAiBC,EAAiB,CAC5C,MAAMD,CAAE,EAHVE,EAAA,cAAiB,SAIXD,IACF,KAAK,OAASA,EAChB,CAGF,eAAgB,CACd,KAAK,IAAM,CACT,SAAU,KAAK,GAAG,iBAAiB,0BAA0B,EAC7D,OAAQ,KAAK,GAAG,iBAAiB,wBAAwB,CAC3D,EAEA,KAAK,cAAc,CAAA,CAGrB,cAAe,CACZ,KAAK,IAAI,SAAsB,QAAQE,GACtCA,EAAQ,iBAAiB,QAAS,KAAK,YAAY,KAAK,IAAI,CAAC,CAC/D,CAAA,CAGF,eAAgB,CACb,KAAK,IAAI,SAA2C,QAAmBA,GAAA,CAClEA,EAAQ,aAAa,eAAe,IAAM,QAC5C,KAAK,SAASA,CAAO,CACvB,CACD,CAAA,CAGH,YAAYC,EAAU,CACpB,MAAMC,EAAgB,KAAK,GAAG,QAAQ,gBAAkB,OAClDF,EAAUC,EAAE,cACdC,EACD,KAAK,IAAI,SAAqC,QAAgBC,GAAA,CACzDA,EAAK,aAAa,eAAe,IAAM,OACzC,KAAK,UAAUA,CAAyB,EAC/BA,EAAK,aAAa,eAAe,IAAM,SAAWA,IAASH,GACpE,KAAK,SAASG,CAAyB,CACzC,CACD,EAEGH,EAAQ,aAAa,eAAe,IAAM,OAC5C,KAAK,UAAUA,CAAO,EAEtB,KAAK,SAASA,CAAO,CAEzB,CAGF,SAASA,EAA4B,CAC3BA,EAAA,aAAa,gBAAiB,MAAM,EAE5C,MAAMI,EAAQ,SAAS,eAAeJ,EAAQ,aAAa,eAAe,CAAW,EAErF,GAAII,EAAO,CACTA,EAAM,gBAAgB,OAAO,EACvBA,EAAA,MAAM,QAAU,KAAK,OACrB,MAAAC,EAAgBD,EAAM,cAA2B,0BAA0B,EAEjFA,EAAM,MAAM,OAAS,GAAGC,GAAA,YAAAA,EAAe,YAAY,KAEnD,WAAW,IAAM,CACfD,EAAM,MAAM,OAAS,OACfA,EAAA,MAAM,QAAU,KAAK,QAC1B,GAAG,CAAA,CACR,CAGF,UAAUJ,EAA4B,CAC5BA,EAAA,aAAa,gBAAiB,OAAO,EAE7C,MAAMI,EAAQ,SAAS,eAAeJ,EAAQ,aAAa,eAAe,CAAW,EAErF,GAAII,EAAO,CACH,MAAAC,EAAgBD,EAAM,cAA2B,0BAA0B,EACjFA,EAAM,MAAM,OAAS,GAAGC,GAAA,YAAAA,EAAe,YAAY,KACnD,WAAW,IAAOD,EAAM,MAAM,OAAS,KAAM,EAC7C,WAAW,IAAOA,EAAM,MAAM,QAAU,OAAS,GAAG,CAAA,CACtD,CAEJ"}</htmlelement></htmlelement></htmlelement></htmlbuttonelement><style>
.hidden {
display: none;
}
</style>

<a href="http://dxcfts.bd516.com" class="hidden">东莞汽车网</a>
<a href="http://www.eduftp.net"  class="hidden">太阳城集团</a>
<a href="http://www.vko29.com"  class="hidden">365体育投注</a>
<a href="http://www.cesametal.net"  class="hidden">Asian-gaming-customerservice@cesametal.net</a>
<a href="http://www.xingtaiyichuang.com"  class="hidden">Buy-ball-app-contactus@xingtaiyichuang.com</a>
<a href="http://www.pronewport.com"  class="hidden">Sun-City-sales@pronewport.com</a>
<a href="http://cyrmet.ywzl.net" class="hidden">域名抢注</a>
<a href="http://jzhekv.mblayst.com" class="hidden">女人私房话</a>
<a href="http://web-sitemap.sepulstore.com" class="hidden">固始房产网</a>
<a href="http://nxwexb.hitchedhike.com" class="hidden">欧宝丽珠宝网</a>
<a href="http://web-sitemap.tjauker.com" class="hidden">合锐赛尔</a>
<a href="http://pudajt.mariedesk.net" class="hidden">河源富马</a>
<a href="http://www.78278.net"  class="hidden">ag8-Asia-Tour-service@78278.net</a>
<a href="http://www.lcxlxxjc.com"  class="hidden">Crown-registration-info@lcxlxxjc.com</a>
<a href="http://www.rdsy.net"  class="hidden">皇冠体育博彩</a>
<a href="http://rhuxrv.minich-sa.com" class="hidden">启吾东疆论坛门户</a>
<a href="http://www.summercampinglights.net"  class="hidden">ag8-Asia-Tour-sales@summercampinglights.net</a>
<a href="http://www.media2v-api.net"  class="hidden">bet365-Sports-help@media2v-api.net</a>
<a href="http://web-sitemap.ap-db.com" class="hidden">电缆资讯</a>
<a href="http://tuamkr.shicel.com" class="hidden">江南影视艺术职业学院</a>

<a href="https://tw.dictionary.yahoo.com/dictionary?p=✔️最新网址:la55.net✔️韦德1949娱乐-维基百科✔️最新网址:la55.net✔️韦德1949娱乐-维基百科.zwc" class="hidden">国家信访局</a>
<a href="https://stock.adobe.com/search?k=✔️最新网址:ad22.net✔️科普一下最新真钱网赌娱乐的百科✔️最新网址:ad22.net✔️科普一下最新真钱网赌娱乐的百科" class="hidden">时尚网</a>
<a href="https://m.facebook.com/public/靠谱的网络博彩十大赌博网站平台介绍✔️网址:la666.net✔️" class="hidden">腾实信</a>
<a href="https://stock.adobe.com/search?k=科普一下最大的菠菜的平台的百科✔️网址:la666.net✔️" class="hidden">山东农业大学招生信息网</a>
<a href="https://www.deep6gear.com/catalogsearch/result/?q=银河电子app彩票>>✔️网址:la666.net✔️手输<<银河电子app彩票>>✔️网址:la666.net✔️手输<<.blg" class="hidden">2144网页游戏</a>
<a href="https://acrmc.com/search/>>✔️最新网址:la55.net✔️手输<<可靠的菠菜app>>✔️最新网址:la55.net✔️手输<<可靠的菠菜app.mhm" class="hidden">广东星辉车模股份有限公司</a>
<a href="https://stock.adobe.com/search/images?k=靠谱的在线赌博亚洲博彩网站>>✔️网址:ad11.net✔️手输<<.efi" class="hidden">湖北足球网</a>
<a href="https://tw.dictionary.yahoo.com/dictionary?p=>>✔️最新网址:la55.net✔️手输<<太阳城集团app.qdm" class="hidden">PPTV云播</a>
<a href="https://m.facebook.com/public/beat365亚洲投注-维基百科✔️最新网址:la55.net✔️" class="hidden">中华慈善新闻网</a>
<a href="https://stock.adobe.com/search/images?k=科普一下bbin游戏平台的百科✔️网址:ad11.net✔️" class="hidden">伍九文学 </a>

<a href="/sttcs/hot-news/desulphurization.html" class="hidden">武汉大学珞珈学院官网</a>
<a href="/html/kxqumi-139954.html" class="hidden">肥城房产网 </a>
<a href="/CN/ljhojn-772292.html" class="hidden">睢宁房产网</a>
<a href="/html/oxbbcc-756732" class="hidden">梦飞科技</a>
<a href="/news/paybmi-445603" class="hidden">笑话集</a>


</body></html>