{"version":3,"file":"custom.min.js","names":["document","addEventListener","scrolled_val","window","scrollY","querySelector","classList","add","e","remove","querySelectorAll","map","tooltipTriggerEl","bootstrap","Tooltip","callTooltip","element","elementTitle","tooltip","title","customClass","toggle","textTruncateElements","textTruncateElement","scrollWidth","clientWidth","textContent","speedbumpLinks","speedbumpModal","Modal","getElementById","speedbumpRelay","forEach","link","preventDefault","href","this","getAttribute","setAttribute","show","hide"],"sources":["custom.js"],"sourcesContent":["/*jshint esversion: 6 */\ndocument.addEventListener(\"DOMContentLoaded\", function () {\n\n // make the sticky magic happen on the menu\n let scrolled_val = 0;\n\n // for the initial position\n scrolled_val = window.scrollY;\n if(scrolled_val > 49) { \n document.querySelector('header.sticky-top').classList.add('is-pinned');\n }\n \n // for when it scrolls\n window.addEventListener('scroll', (e) => {\n scrolled_val = window.scrollY;\n if(scrolled_val <= 49) { \n document.querySelector('header.sticky-top').classList.remove('is-pinned');\n } else {\n document.querySelector('header.sticky-top').classList.add('is-pinned');\n }\n });\n\n // Enable tooltips\n const tooltipTriggerList = document.querySelectorAll('[data-bs-toggle=\"tooltip\"]');\n const tooltipList = [...tooltipTriggerList].map(tooltipTriggerEl => new bootstrap.Tooltip(tooltipTriggerEl));\n\n // Tooltip me if truncated text being truncated\n function callTooltip(element,elementTitle) {\n const tooltip = new bootstrap.Tooltip(element, {\n title: elementTitle,\n customClass: 'card-tooltip',\n });\n element.addEventListener('mouseenter', () => {\n tooltip.toggle();\n });\n element.addEventListener('mouseleave', () => {\n tooltip.toggle();\n });\n }\n const textTruncateElements = document.querySelectorAll('.text-truncate');\n\n for (const textTruncateElement of textTruncateElements) {\n if (textTruncateElement.scrollWidth > textTruncateElement.clientWidth) {\n const textTruncateTitle = textTruncateElement.textContent;\n callTooltip(textTruncateElement,textTruncateTitle);\n }\n }\n\n\n // Speedbump Links\n const speedbumpLinks = document.querySelectorAll('.speed-bump');\n const speedbumpModal = new bootstrap.Modal(document.getElementById('speedbumpModal'));\n const speedbumpRelay = document.getElementById('speedbump-relay');\n\n speedbumpLinks.forEach(link => {\n link.addEventListener('click', function (e) {\n e.preventDefault();\n const href = this.getAttribute('href');\n speedbumpRelay.setAttribute('href', href);\n speedbumpModal.show();\n });\n });\n speedbumpRelay.addEventListener('click', () => {\n speedbumpModal.hide();\n });\n});"],"mappings":"AACAA,SAASC,iBAAiB,oBAAoB,WAG1C,IAAIC,EAAe,EAGnBA,EAAeC,OAAOC,QACnBF,EAAe,IACdF,SAASK,cAAc,qBAAqBC,UAAUC,IAAI,aAI9DJ,OAAOF,iBAAiB,UAAWO,IAC/BN,EAAeC,OAAOC,QACnBF,GAAgB,GACfF,SAASK,cAAc,qBAAqBC,UAAUG,OAAO,aAE7DT,SAASK,cAAc,qBAAqBC,UAAUC,IAAI,YAC9D,IAKgB,IADOP,SAASU,iBAAiB,+BACTC,KAAIC,GAAoB,IAAIC,UAAUC,QAAQF,KAG1F,SAASG,EAAYC,EAAQC,GACzB,MAAMC,EAAU,IAAIL,UAAUC,QAAQE,EAAS,CAC3CG,MAAOF,EACPG,YAAa,iBAEjBJ,EAAQf,iBAAiB,cAAc,KACnCiB,EAAQG,QAAQ,IAEpBL,EAAQf,iBAAiB,cAAc,KACnCiB,EAAQG,QAAQ,GAExB,CACA,MAAMC,EAAuBtB,SAASU,iBAAiB,kBAEvD,IAAK,MAAMa,KAAuBD,EAC9B,GAAIC,EAAoBC,YAAcD,EAAoBE,YAAa,CAEnEV,EAAYQ,EADcA,EAAoBG,YAElD,CAKJ,MAAMC,EAAiB3B,SAASU,iBAAiB,eAC3CkB,EAAiB,IAAIf,UAAUgB,MAAM7B,SAAS8B,eAAe,mBAC7DC,EAAiB/B,SAAS8B,eAAe,mBAE/CH,EAAeK,SAAQC,IACnBA,EAAKhC,iBAAiB,SAAS,SAAUO,GACrCA,EAAE0B,iBACF,MAAMC,EAAOC,KAAKC,aAAa,QAC/BN,EAAeO,aAAa,OAAQH,GACpCP,EAAeW,MACnB,GAAE,IAENR,EAAe9B,iBAAiB,SAAS,KACrC2B,EAAeY,MAAM,GAE7B"}