{"version":3,"file":"headerLogo.6fdb3cb19f5c26783ba9.js","mappings":"2UAAqBA,EAAU,WAC7B,WAAYC,I,4FAAI,SACdC,KAAKD,GAAKA,EACVC,KAAKC,cACP,C,UA0BC,O,EA1BA,G,EAAA,2BAED,WAAe,WACbD,KAAKD,GAAGG,iBAAiB,SAAS,SAACC,GACjCA,EAAEC,iBACF,EAAKC,SACP,GACF,GAAC,qBAED,WACEL,KAAKM,qBAAqB,qBAC1BN,KAAKO,gBACP,GAAC,kCAED,SAAqBC,GACnB,IAAIC,EAAI,IAAIC,KACZD,EAAEE,QAAQF,EAAEG,UAAa,OACzB,IAAIC,EAAU,WAAaJ,EAAEK,cAC7BC,OAAOC,SAASC,OAAST,QAAcK,EAAS,WAClD,GAAC,4BAED,WACE,IAAMK,EAAOlB,KAAKD,GAAGoB,aAAa,QAC5BC,EAAM,GAAH,OAAML,OAAOM,SAASC,SAAQ,aAAKP,OAAOM,SAASE,UAAQ,OAAGL,GAEvEH,OAAOM,SAAWD,CACpB,M,8EAAC,EA9B4B,GA8B5B,W","sources":["webpack://jcb.com/./src/js/components/headerLogo.js"],"sourcesContent":["export default class HeaderLogo {\r\n constructor(el) {\r\n this.el = el;\r\n this.bindListener();\r\n }\r\n\r\n bindListener() {\r\n this.el.addEventListener('click', (e) => {\r\n e.preventDefault();\r\n this.clicked();\r\n })\r\n }\r\n\r\n clicked() {\r\n this.deleteIndustryCookie('jcb-user-industry');\r\n this.navigateToPage();\r\n }\r\n\r\n deleteIndustryCookie(name) {\r\n var d = new Date();\r\n d.setTime(d.getTime() - (1000*60*60*24));\r\n var expires = \"expires=\" + d.toGMTString();\r\n window.document.cookie = name+\"=\"+\"; \"+expires +\"; path=/;\";\r\n }\r\n\r\n navigateToPage() {\r\n const path = this.el.getAttribute('href');\r\n const url = `${window.location.protocol}//${window.location.hostname}${path}`\r\n\r\n window.location = url;\r\n }\r\n\r\n}"],"names":["HeaderLogo","el","this","bindListener","addEventListener","e","preventDefault","clicked","deleteIndustryCookie","navigateToPage","name","d","Date","setTime","getTime","expires","toGMTString","window","document","cookie","path","getAttribute","url","location","protocol","hostname"],"sourceRoot":""}