{"version":3,"sources":["../../script.concat.single.js"],"names":["window","document","init","updateLocationHash","hash","history","pushState","checkOnLoad","locationHash","location","href","split","undefined","targetLocation","querySelector","scrollIntoView","initOnClick","querySelectorAll","forEach","anchor","addEventListener","e","preventDefault","elementId","this","getAttribute","behavior"],"mappings":"cAAA,SAAWA,EAAQC,GAEjB,GAAMC,GAAO,WACX,GAAMC,GAAqB,SAACC,GAC1BC,QAAQC,aAAc,GAAIF,IAGtBG,EAAc,WAClB,GAAMC,GAAeR,EAAOS,SAASC,KAAKC,MAAM,KAAK,EAErD,IACmB,OAAjBH,GACiBI,SAAjBJ,GACiB,KAAjBA,EACA,OAAO,CAET,IAAMK,GAAiBZ,EAASa,cAAT,IAA2BN,EAE3B,QAAnBK,GAA8CD,SAAnBC,GAC7BA,EAAeE,kBAIbC,EAAc,WAClBf,EAASgB,iBAAiB,gBAAgBC,QAAQ,SAAAC,GAChDA,EAAOC,iBAAiB,QAAS,SAAUC,GACzCA,EAAEC,gBACF,IAAMC,GAAYC,KAAKC,aAAa,OAEpCxB,GAASa,cAAcS,GAAWR,gBAChCW,SAAU,WAGZvB,EAAmBoB,SAKT,WACdP,IACAT,OAMJN,GAASmB,iBAAiB,mBAAoBlB,IAE7CF,OAAQA,OAAOC","file":"main.js","sourcesContent":["(function (window, document) {\r\n\r\n const init = () => {\r\n const updateLocationHash = (hash) => {\r\n history.pushState({}, \"\", hash);\r\n };\r\n\r\n const checkOnLoad = () => {\r\n const locationHash = window.location.href.split('#')[1];\r\n\r\n if (\r\n locationHash === null || \r\n locationHash === undefined ||\r\n locationHash === ''\r\n ) return false;\r\n \r\n const targetLocation = document.querySelector(`#${locationHash}`);\r\n\r\n if (targetLocation !== null && targetLocation !== undefined) {\r\n targetLocation.scrollIntoView();\r\n }\r\n };\r\n\r\n const initOnClick = () => {\r\n document.querySelectorAll('a[href^=\"#\"]').forEach(anchor => {\r\n anchor.addEventListener('click', function (e) {\r\n e.preventDefault();\r\n const elementId = this.getAttribute('href');\r\n\r\n document.querySelector(elementId).scrollIntoView({\r\n behavior: 'smooth'\r\n });\r\n\r\n updateLocationHash(elementId);\r\n });\r\n });\r\n };\r\n\r\n const initAll = () => {\r\n initOnClick();\r\n checkOnLoad();\r\n };\r\n\r\n initAll();\r\n };\r\n\r\n document.addEventListener(\"DOMContentLoaded\", init);\r\n\r\n})(window, window.document);"]}