{"version":3,"file":"../js/main.js","sources":["main.js"],"sourcesContent":["/**\n * Template Name: MyResume - v4.7.0\n * Template URL: https://bootstrapmade.com/free-html-bootstrap-template-my-resume/\n * Author: BootstrapMade.com\n * License: https://bootstrapmade.com/license/\n */\n;(function () {\n 'use strict'\n\n /**\n * Easy selector helper function\n */\n const select = (el, all = false) => {\n el = el.trim()\n if (all) {\n return [...document.querySelectorAll(el)]\n } else {\n return document.querySelector(el)\n }\n }\n\n /**\n * Easy event listener function\n */\n const on = (type, el, listener, all = false) => {\n const selectEl = select(el, all)\n if (selectEl) {\n if (all) {\n selectEl.forEach((e) => e.addEventListener(type, listener))\n } else {\n selectEl.addEventListener(type, listener)\n }\n }\n }\n\n /**\n * Easy on scroll event listener\n */\n const onscroll = (el, listener) => {\n el.addEventListener('scroll', listener)\n }\n\n /**\n * Navbar links active state on scroll\n */\n const navbarlinks = select('#navbar .scrollto', true)\n const navbarlinksActive = () => {\n const position = window.scrollY + 200\n navbarlinks.forEach((navbarlink) => {\n if (!navbarlink.hash) return\n const section = select(navbarlink.hash)\n if (!section) return\n if (position >= section.offsetTop && position <= section.offsetTop + section.offsetHeight) {\n navbarlink.classList.add('active')\n } else {\n navbarlink.classList.remove('active')\n }\n })\n }\n window.addEventListener('load', navbarlinksActive)\n onscroll(document, navbarlinksActive)\n\n /**\n * Scrolls to an element with header offset\n */\n const scrollto = (el) => {\n const elementPos = select(el).offsetTop\n window.scrollTo({\n top: elementPos,\n behavior: 'smooth'\n })\n }\n\n /**\n * Back to top button\n */\n const backtotop = select('.back-to-top')\n if (backtotop) {\n const toggleBacktotop = () => {\n if (window.scrollY > 100) {\n backtotop.classList.add('active')\n } else {\n backtotop.classList.remove('active')\n }\n }\n window.addEventListener('load', toggleBacktotop)\n onscroll(document, toggleBacktotop)\n }\n\n /**\n * Mobile nav toggle\n */\n on('click', '.mobile-nav-toggle', function (e) {\n select('body').classList.toggle('mobile-nav-active')\n this.children[0].classList.toggle('fa-bars')\n this.children[0].classList.toggle('fa-times')\n })\n\n /**\n * Scroll with offset on links with a class name .scrollto\n */\n on(\n 'click',\n '.scrollto',\n function (e) {\n if (select(this.hash)) {\n e.preventDefault()\n\n const body = select('body')\n if (body.classList.contains('mobile-nav-active')) {\n body.classList.remove('mobile-nav-active')\n const navbarToggle = select('.mobile-nav-toggle')\n navbarToggle.children[0].classList.toggle('fa-bars')\n navbarToggle.children[0].classList.toggle('fa-times')\n }\n scrollto(this.hash)\n }\n },\n true\n )\n\n /**\n * Scroll with offset on page load with hash links in the url\n */\n window.addEventListener('load', () => {\n if (window.location.hash) {\n if (select(window.location.hash)) {\n scrollto(window.location.hash)\n }\n }\n })\n\n /**\n * Preloader\n */\n const preloader = select('#preloader')\n if (preloader) {\n window.addEventListener('load', () => {\n preloader.remove()\n })\n }\n\n /**\n * Hero type effect\n */\n const typed = select('.typed')\n if (typed) {\n let typedStrings = typed.getAttribute('data-typed-items')\n typedStrings = typedStrings.split(',')\n /* eslint-disable no-new */\n new Typed('.typed', {\n strings: typedStrings,\n loop: true,\n typeSpeed: 75,\n backSpeed: 50,\n backDelay: 2000\n })\n /* eslint-enable no-new */\n }\n\n /**\n * Skills animation\n */\n const skillsContent = select('.skills-content')\n if (skillsContent) {\n /* eslint-disable no-new */\n new Waypoint({\n element: skillsContent,\n offset: '80%',\n handler: function (direction) {\n const progress = select('.progress .progress-bar', true)\n progress.forEach((el) => {\n el.style.width = el.getAttribute('aria-valuenow') + '%'\n })\n }\n })\n /* eslint-enable no-new */\n }\n\n /**\n * Animation on scroll\n */\n window.addEventListener('load', () => {\n AOS.init({\n duration: 1000,\n easing: 'ease-in-out',\n once: true,\n mirror: false\n })\n })\n})()\n"],"names":["select","el","all","trim","document","querySelectorAll","querySelector","on","type","listener","selectEl","forEach","e","addEventListener","onscroll","navbarlinks","navbarlinksActive","position","window","scrollY","section","navbarlink","hash","offsetTop","offsetHeight","classList","add","remove","scrollto","elementPos","scrollTo","top","behavior","backtotop","preloader","toggleBacktotop","toggle","this","children","preventDefault","body","contains","navbarToggle","location","typed","let","typedStrings","getAttribute","split","Typed","strings","loop","typeSpeed","backSpeed","backDelay","skillsContent","Waypoint","element","offset","handler","direction","progress","style","width","AOS","init","duration","easing","once","mirror"],"mappings":"CAMC,wBAMC,MAAMA,EAAS,CAACC,EAAIC,GAAM,KACxBD,EAAKA,EAAGE,OACJD,EACK,IAAIE,SAASC,iBAAiBJ,IAE9BG,SAASE,cAAcL,IAOlC,IAAMM,EAAK,CAACC,EAAMP,EAAIQ,EAAUP,GAAM,KACpC,MAAMQ,EAAWV,EAAOC,EAAIC,GACxBQ,IACER,EACFQ,EAASC,QAAQ,GAAOC,EAAEC,iBAAiBL,EAAMC,IAEjDC,EAASG,iBAAiBL,EAAMC,KAQhCK,EAAW,CAACb,EAAIQ,KACpBR,EAAGY,iBAAiB,SAAUJ,IAMhC,MAAMM,EAAcf,EAAO,qBAAqB,GAChD,IAAMgB,EAAoB,KACxB,MAAMC,EAAWC,OAAOC,QAAU,IAClCJ,EAAYJ,QAAQ,IAClB,IACMS,GADDC,EAAWC,OACVF,EAAUpB,EAAOqB,EAAWC,SAE9BL,GAAYG,EAAQG,WAAaN,GAAYG,EAAQG,UAAYH,EAAQI,aAC3EH,EAAWI,UAAUC,IAAI,UAEzBL,EAAWI,UAAUE,OAAO,cAIlCT,OAAOL,iBAAiB,OAAQG,GAChCF,EAASV,SAAUY,GAKnB,MAAMY,EAAW,IACTC,EAAa7B,EAAOC,GAAIsB,UAC9BL,OAAOY,SAAS,CACdC,IAAKF,EACLG,SAAU,YAORC,EAAYjC,EAAO,gBA2DnBkC,GA1DFD,IACIE,EAAkB,KACD,IAAjBjB,OAAOC,QACTc,EAAUR,UAAUC,IAAI,UAExBO,EAAUR,UAAUE,OAAO,WAG/BT,OAAOL,iBAAiB,OAAQsB,GAChCrB,EAASV,SAAU+B,IAMrB5B,EAAG,QAAS,qBAAsB,SAAUK,GAC1CZ,EAAO,QAAQyB,UAAUW,OAAO,qBAChCC,KAAKC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