{"version":3,"sources":["webpack:///./src/js/modules/faq-listing.js","webpack:///./node_modules/@verndale/roving-ux/dist/index.module.js"],"names":["Module","Component","setupDefaults","this","dom","$innerContainer","el","querySelector","$panels","querySelectorAll","$panelsContainer","$panelsList","$navContainer","$selectName","dataset","selectName","$selectId","selectId","$navRole","navRole","$navAriaLabel","navAriaLabel","enableFirstValidTab","generateSelect","generateSideNav","implementRovin","length","i","innerHTML","trim","setAttribute","select","document","createElement","classList","add","Array","from","map","panel","id","navTitle","join","addEventListener","handleClick","bind","insertBefore","ul","hash","children","forEach","option","decodeURI","window","location","substring","toLowerCase","index","findIndex","click","append","addListeners","handleResize","rovingIndex","element","target","selected","value","e","focus","getAttribute","navSideOptions","remove","Map","t","c","d","callback","o","s","tabIndex","set","targets","active","u","get","v","f","keyCode","preventDefault","r","n","a","removeEventListener","delete"],"mappings":"2FAAA,0BAEA,MAAMA,UAAeC,YACnBC,gBACEC,KAAKC,IAAM,CACTC,gBAAiBF,KAAKG,GAAGC,cAAc,uBACvCC,QAASL,KAAKG,GAAGG,iBAAiB,uBAClCC,iBAAkBP,KAAKG,GAAGC,cAAc,kCACxCI,YAAaR,KAAKG,GAAGC,cAAc,uBACnCK,cAAeT,KAAKG,GAAGC,cAAc,0BACrCM,YAAaV,KAAKG,GAAGQ,QAAQC,WAC7BC,UAAWb,KAAKG,GAAGQ,QAAQG,SAC3BC,SAAUf,KAAKG,GAAGQ,QAAQK,QAC1BC,cAAejB,KAAKG,GAAGQ,QAAQO,cAGjClB,KAAKmB,sBACLnB,KAAKoB,iBACLpB,KAAKqB,kBACLrB,KAAKsB,iBAGPH,sBACE,GAAInB,KAAKC,IAAII,SAAWL,KAAKC,IAAII,QAAQkB,OACvC,IAAI,IAAIC,EAAI,EAAGA,EAAIxB,KAAKC,IAAII,QAAQkB,OAAQC,IAC1C,GAAIxB,KAAKC,IAAII,QAAQmB,GAAGC,WAAazB,KAAKC,IAAII,QAAQmB,GAAGC,UAAUC,OAAQ,OACzE,UA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AIX,GAAGkB,EAAEnC,OAAO,EAAEmC,EAAEnC,MAAMmC,EAAEV,QAAQxD,OAAO,IAAIkE,EAAEnC,MAAMmC,EAAEV,QAAQxD,OAAO,GAAG,IAAIgE,EAAEE,EAAEV,QAAQU,EAAEnC,OAAOiC,GAAGJ,EAAEZ,EAAEgB,EAAEC,IAAIhE,EAAE,SAAS+C,EAAEiB,GAAG,IAAIC,EAAExB,EAAEiB,IAAIX,GAAGkB,EAAEnC,OAAO,EAAEmC,EAAEnC,MAAM,IAAImC,EAAEnC,MAAM,GAAG,IAAIiC,EAAEE,EAAEV,QAAQU,EAAEnC,OAAOiC,GAAGJ,EAAEZ,EAAEgB,EAAEC,IAAIL,EAAE,SAASZ,EAAEiB,EAAEC,GAAG,IAAIF,EAAEtB,EAAEiB,IAAIX,GAAGgB,EAAEP,OAAOH,UAAU,EAAEY,GAAGA,EAAED,GAAGD,EAAEP,OAAOQ,EAAED,EAAEP,OAAOH,SAAS,EAAEU,EAAEP,OAAOd","file":"67.bundle.js","sourcesContent":["import { Component } from '@verndale/core'\nimport { rovingIndex } from '@verndale/roving-ux'\nclass Module extends Component {\n setupDefaults() {\n this.dom = {\n $innerContainer: this.el.querySelector('.faq-listing__inner'),\n $panels: this.el.querySelectorAll('.faq-listing__panel'),\n $panelsContainer: this.el.querySelector('.faq-listing__panels-container'),\n $panelsList: this.el.querySelector('.faq-listing__panel'),\n $navContainer: this.el.querySelector('.faq-listing__side-nav'),\n $selectName: this.el.dataset.selectName,\n $selectId: this.el.dataset.selectId,\n $navRole: this.el.dataset.navRole,\n $navAriaLabel: this.el.dataset.navAriaLabel\n }\n\n this.enableFirstValidTab()\n this.generateSelect()\n this.generateSideNav()\n this.implementRovin()\n }\n\n enableFirstValidTab() {\n if (this.dom.$panels && this.dom.$panels.length) {\n for(let i = 0; i < this.dom.$panels.length; i++) {\n if (this.dom.$panels[i].innerHTML && this.dom.$panels[i].innerHTML.trim()) {\n this.dom.$panels[i]?.setAttribute('tabindex', 0)\n break\n }\n }\n }\n }\n\n generateSelect() {\n this.select = document.createElement('select')\n this.select.classList.add('faq-listing__select')\n this.select.setAttribute('name', this.dom.$selectName)\n this.select.setAttribute('id', this.dom.$selectId)\n this.select.innerHTML = Array.from(this.dom.$panels)\n .map((panel) => {\n if (panel.innerHTML && panel.innerHTML.trim()) {\n return ``\n }\n })\n .join('')\n this.select.addEventListener('input', this.handleClick.bind(this))\n this.dom.$innerContainer.insertBefore(this.select, this.dom.$panelsContainer)\n }\n\n generateSideNav() {\n const ul = document.createElement('ul')\n ul.classList.add('faq-listing__faq-list')\n ul.setAttribute('role', this.dom.$navRole)\n ul.setAttribute('aria-label', this.dom.$navAriaLabel)\n ul.innerHTML = Array.from(this.dom.$panels)\n .map((panel) => {\n if (panel.innerHTML && panel.innerHTML.trim()) {\n return `