{ "version": 3, "sources": ["../../../views/pages/team.ts"], "sourcesContent": ["// Select all buttons inside the team section\nconst btn_members = document.querySelectorAll('section.team button')\n\n// Select the dialog element for the member\nconst member_dialog = document.querySelector(\n 'dialog.member'\n) as HTMLDialogElement\n\nconst memberHandler = (btn: HTMLButtonElement) => {\n // Get the data attributes from the button\n const name = btn.getAttribute('data-name')\n const headshot = btn.getAttribute('data-headshot')\n const specialties = JSON.parse(btn.getAttribute('data-specialties') || '[]')\n // const booksy_link = btn.getAttribute('data-booksy-link')\n const instagram_name = btn.getAttribute('data-instagram-name')\n const tiktok_name = btn.getAttribute('data-tiktok-name')\n\n // Start building the HTML for the dialog\n let elementHTML: string = '
'\n elementHTML +=\n ''\n\n elementHTML += `\"${name}\"`\n\n // Add the content div with the member name, booksy link, instagram name, and tiktok name\n elementHTML += '
'\n elementHTML += `

${name}

`\n\n if (!!specialties) {\n elementHTML += ``\n }\n\n // if (booksy_link || instagram_name || tiktok_name) {\n if (instagram_name || tiktok_name) {\n elementHTML += '
'\n // elementHTML += booksy_link\n // ? `Schedule `\n // : ''\n elementHTML += instagram_name\n ? ``\n : ''\n elementHTML += tiktok_name\n ? ``\n : ''\n elementHTML += '
'\n }\n elementHTML += '
'\n\n // Close the container div\n elementHTML += '
'\n\n // Set the body dataset to active\n document.body.dataset.mmActive = 'true'\n\n // Set the dialog innerHTML to the elementHTML\n member_dialog.innerHTML = elementHTML\n\n // Select the close button\n const btn_close = document.querySelector(\n 'button.close'\n ) as HTMLButtonElement\n\n // Add event listeners to the close\n btn_close.addEventListener('click', _ => closeHandler(member_dialog))\n\n // Show the dialog\n member_dialog.showModal()\n const container = member_dialog.querySelector('.container') as HTMLElement\n container.style.filter = 'opacity(1)'\n\n // Add event listener to the dialog close event\n member_dialog.addEventListener('close', _ => {\n btn_close.removeEventListener('click', _ => closeHandler(member_dialog))\n\n // Set the body dataset to false\n document.body.dataset.mmActive = 'false'\n\n // Remove the container div\n document.querySelector('div.container')?.remove()\n })\n}\n\n// Check if buttons are found\nif (btn_members) {\n // Loop through each button\n btn_members.forEach(btn => {\n // Add click event listener to each item button\n btn.addEventListener('click', _ =>\n memberHandler(btn as HTMLButtonElement)\n )\n })\n}\n\n// Close the dialog when the close button is clicked\nconst closeHandler = (d: HTMLDialogElement) => d.close()\n"], "mappings": "mBACA,IAAMA,EAAc,SAAS,iBAAiB,qBAAqB,EAG7DC,EAAgB,SAAS,cAC3B,eACJ,EAEMC,EAAiBC,GAA2B,CAE9C,IAAMC,EAAOD,EAAI,aAAa,WAAW,EACnCE,EAAWF,EAAI,aAAa,eAAe,EAC3CG,EAAc,KAAK,MAAMH,EAAI,aAAa,kBAAkB,GAAK,IAAI,EAErEI,EAAiBJ,EAAI,aAAa,qBAAqB,EACvDK,EAAcL,EAAI,aAAa,kBAAkB,EAGnDM,EAAsB,0BAC1BA,GACI,8EAEJA,GAAe,gBAAgBJ,CAAQ,uCAAuCA,CAAQ,uCAAuCA,CAAQ,8CAA8CA,CAAQ,yCAAyCD,CAAI,KAGxOK,GAAe,wBACfA,GAAe,OAAOL,CAAI,QAEpBE,IACFG,GAAe,2BACfH,EAAY,QACPI,GACID,GAAe,yBAAyBC,CAAS,OAC1D,EACAD,GAAe,UAIfF,GAAkBC,KAClBC,GAAe,sBAIfA,GAAeF,EACT,kCAAkCA,CAAc,iIAChD,GACNE,GAAeD,EACT,gCAAgCA,CAAW,yHAC3C,GACNC,GAAe,UAEnBA,GAAe,SAGfA,GAAe,SAGf,SAAS,KAAK,QAAQ,SAAW,OAGjCR,EAAc,UAAYQ,EAG1B,IAAME,EAAY,SAAS,cACvB,cACJ,EAGAA,EAAU,iBAAiB,QAASC,GAAKC,EAAaZ,CAAa,CAAC,EAGpEA,EAAc,UAAU,EACxB,IAAMa,EAAYb,EAAc,cAAc,YAAY,EAC1Da,EAAU,MAAM,OAAS,aAGzBb,EAAc,iBAAiB,QAASW,GAAK,CACzCD,EAAU,oBAAoB,QAASC,GAAKC,EAAaZ,CAAa,CAAC,EAGvE,SAAS,KAAK,QAAQ,SAAW,QAGjC,SAAS,cAAc,eAAe,GAAG,OAAO,CACpD,CAAC,CACL,EAGID,GAEAA,EAAY,QAAQG,GAAO,CAEvBA,EAAI,iBAAiB,QAASS,GAC1BV,EAAcC,CAAwB,CAC1C,CACJ,CAAC,EAIL,IAAMU,EAAgBE,GAAyBA,EAAE,MAAM", "names": ["btn_members", "member_dialog", "memberHandler", "btn", "name", "headshot", "specialties", "instagram_name", "tiktok_name", "elementHTML", "specialty", "btn_close", "_", "closeHandler", "container", "d"] }