{"version":3,"file":"js/2222-0e9cd595a8318c481a0b.chunk.js","mappings":"yHAEA,MAAMA,EAAe,UAErBC,EAAAA,EAAAA,IAAS,KACP,MAAMC,EAAsBC,SAASC,cAAc,qBAC7CC,EAAsBF,SAASC,cAAc,qBAC7CE,EAAeH,SAASI,iBAAiB,eAE3CL,GACFA,EAAoBM,iBAAiB,SAAUC,IAC7CA,EAAEC,iBACFJ,EAAaK,SAASC,GAAgBA,EAAYC,UAAUC,OAAOd,KACnEE,EAAoBW,UAAUE,IAAIf,GAClCK,EAAoBQ,UAAUC,OAAOd,EAAa,IAIlDK,GACFA,EAAoBG,iBAAiB,SAAUC,IAC7CA,EAAEC,iBACFJ,EAAaK,SAASC,GAAgBA,EAAYC,UAAUE,IAAIf,KAChEE,EAAoBW,UAAUC,OAAOd,GACrCK,EAAoBQ,UAAUE,IAAIf,EAAa,GAEnD,G","sources":["webpack://agra/./app/javascript/local-chapters/show-events.js"],"sourcesContent":["import { domReady } from '@/utils/dom-ready'\n\nconst CLASS_HIDDEN = 'd-none'\n\ndomReady(() => {\n const showAllEventsButton = document.querySelector('a#show-all-events')\n const hideAllEventsButton = document.querySelector('a#hide-all-events')\n const eventsToHide = document.querySelectorAll('div.to-hide')\n\n if (showAllEventsButton) {\n showAllEventsButton.addEventListener('click', (e) => {\n e.preventDefault()\n eventsToHide.forEach((eventToHide) => eventToHide.classList.remove(CLASS_HIDDEN))\n showAllEventsButton.classList.add(CLASS_HIDDEN)\n hideAllEventsButton.classList.remove(CLASS_HIDDEN)\n })\n }\n\n if (hideAllEventsButton) {\n hideAllEventsButton.addEventListener('click', (e) => {\n e.preventDefault()\n eventsToHide.forEach((eventToHide) => eventToHide.classList.add(CLASS_HIDDEN))\n showAllEventsButton.classList.remove(CLASS_HIDDEN)\n hideAllEventsButton.classList.add(CLASS_HIDDEN)\n })\n }\n})\n"],"names":["CLASS_HIDDEN","domReady","showAllEventsButton","document","querySelector","hideAllEventsButton","eventsToHide","querySelectorAll","addEventListener","e","preventDefault","forEach","eventToHide","classList","remove","add"],"sourceRoot":""}