{"version":3,"sources":["cookieBanner/cookieBanner.js"],"names":["cookieBanner","cookieBannerElement","document","querySelector","cookieBannerClose","cookie","split","reduce","r","v","getCookie","decodeURIComponent","parts","setCookie","showCookieBanner","style","display","isCookieSet","hideCookieBanner","addEventListener"],"mappings":"aAAA,IAAMA,aAAe,SAAfA,eACF,IAAMC,EAAsBC,SAASC,cAAc,iBADjDH,EAAAA,EAAqBG,cAAA,UAEjBC,EAAAA,SAAAA,UAAAA,GAGF,OAAOF,SAASG,OAAOC,MAAM,MAAMC,OAAO,SAACC,EAAGC,GAD5CC,IAAAA,EAAYD,EAAAH,MAAZI,KACF,OAAOR,EAASG,KAAOC,EAAMK,mBAAaC,EAAA,IAAUJ,GAChD,KAFRK,EAAA,SAAAA,YAQIX,SAASG,OAAS,uBAKhBS,EAAmB,SAAnBA,mBACFb,EAAoBc,MAAMC,QAAU,SAPxC,SAAAC,cAAA,OAAAP,EAAA,iBAUMQ,MANc,SAAdD,mBAAchB,EAAgBc,MAAAC,QAAhB,QAOhBf,GADJG,EAAAe,iBAAA,QAAA,WAOQD,IAHHD,QAKAjB","file":"cookieBanner.js","sourcesContent":["const cookieBanner = () => {\r\n const cookieBannerElement = document.querySelector('.cookieBanner');\r\n const cookieBannerClose = cookieBannerElement.querySelector('.close');\r\n\r\n const getCookie = name => {\r\n return document.cookie.split('; ').reduce((r, v) => {\r\n const parts = v.split('=');\r\n return parts[0] === name ? decodeURIComponent(parts[1]) : r;\r\n }, '');\r\n };\r\n\r\n const setCookie = () => {\r\n document.cookie = 'cookieBanner=closed';\r\n };\r\n\r\n const isCookieSet = () => getCookie('cookieBanner');\r\n\r\n const showCookieBanner = () => {\r\n cookieBannerElement.style.display = 'block';\r\n };\r\n\r\n const hideCookieBanner = () => {\r\n cookieBannerElement.style.display = 'none';\r\n };\r\n\r\n if (!isCookieSet()) {\r\n showCookieBanner();\r\n cookieBannerClose.addEventListener('click', () => {\r\n hideCookieBanner();\r\n setCookie();\r\n });\r\n }\r\n};\r\n\r\ncookieBanner();\r\n"]}