{"version":3,"file":"show-more-DUIs_-JD.js","sources":["../../../app/resources/javascript/components/show-more.js"],"sourcesContent":["document.querySelectorAll(\"[data-dn-toggle='show-more']\").forEach(button => {\n const target = button.getAttribute('data-dn-target')\n const reveal = parseInt(button.getAttribute('data-dn-reveal'), 10)\n\n // Ensure we only show the first elements\n document.querySelectorAll(`${target} > *`).forEach((element, index) => {\n if (index < reveal) {\n return\n }\n\n element.classList.add('d-none')\n })\n\n button.addEventListener('click', () => {\n let revealed = 0\n\n const getHiddenElements = () =>\n document.querySelectorAll(`${target} > .d-none`)\n\n getHiddenElements().forEach(element => {\n // Ensure we only show new elements\n if (revealed === reveal) {\n return\n }\n\n element.classList.remove('d-none')\n revealed += 1\n })\n\n if (getHiddenElements().length === 0) {\n button.classList.add('d-none')\n }\n })\n})\n"],"names":["__vite_legacy_guard","button","target","reveal","element","index","revealed","getHiddenElements"],"mappings":"AAAA,SAAAA,GAAA,CAAA,OAAA,uBAAA,CAAA,CAAA,SAAS,iBAAiB,8BAA8B,EAAE,QAAQC,GAAU,CAC1E,MAAMC,EAASD,EAAO,aAAa,gBAAgB,EAC7CE,EAAS,SAASF,EAAO,aAAa,gBAAgB,EAAG,EAAE,EAGjE,SAAS,iBAAiB,GAAGC,CAAM,MAAM,EAAE,QAAQ,CAACE,EAASC,IAAU,CACjEA,EAAQF,GAIZC,EAAQ,UAAU,IAAI,QAAQ,CAC/B,CAAA,EAEDH,EAAO,iBAAiB,QAAS,IAAM,CACrC,IAAIK,EAAW,EAEf,MAAMC,EAAoB,IACxB,SAAS,iBAAiB,GAAGL,CAAM,YAAY,EAEjDK,EAAmB,EAAC,QAAQH,GAAW,CAEjCE,IAAaH,IAIjBC,EAAQ,UAAU,OAAO,QAAQ,EACjCE,GAAY,EACb,CAAA,EAEGC,EAAiB,EAAG,SAAW,GACjCN,EAAO,UAAU,IAAI,QAAQ,CAEhC,CAAA,CACH,CAAC"}