{"version":3,"sources":["webpack:///./src/components/pmicom/components/ie-warning/controller.js"],"names":["day","module","exports","init","buttons","root","querySelectorAll","addEventListener","e","target","dataset","close","shouldShow","show","isInternetExplorer","ieWarningDiv","document","querySelector","remove","now","Date","isIE","window","navigator","userAgent","indexOf","expiration","localStorage","getItem","isDeactivated","style","display","setItem","test"],"mappings":";;;;;;;;;AAAA,MAAMA,GAAG,GAAG,OAAO,EAAP,GAAY,EAAZ,GAAiB,EAA7B;AACAC,MAAM,CAACC,OAAP,GAAiB;EAChBC,IAAI,GAAG;IACN,KAAKC,OAAL,GAAe,KAAKC,IAAL,CAAUC,gBAAV,CAA2B,cAA3B,CAAf;IACA,KAAKD,IAAL,CAAUE,gBAAV,CAA2B,OAA3B,EAAoCC,CAAC,IAAI;MACxC,IAAIA,CAAC,CAACC,MAAF,CAASC,OAAT,CAAiBC,KAAjB,KAA2B,EAA/B,EAAmC;QAClC,KAAKA,KAAL;MACA;IACD,CAJD;IAKA,IAAI,KAAKC,UAAL,EAAJ,EAAuB,KAAKC,IAAL;;IACvB,IAAI,CAAC,KAAKC,kBAAL,EAAL,EAAgC;MAC/B,MAAMC,YAAY,GAAGC,QAAQ,CAACC,aAAT,CAAuB,aAAvB,CAArB;;MACA,IAAIF,YAAJ,EAAkB;QACjB,KAAKV,IAAL,CAAUa,MAAV;MACA;IACD;EACD,CAfe;;EAgBhBN,UAAU,GAAG;IACZ,MAAMO,GAAG,GAAGC,IAAI,CAACD,GAAL,EAAZ;IACA,MAAME,IAAI,GAAGC,MAAM,CAACC,SAAP,CAAiBC,SAAjB,CAA2BC,OAA3B,CAAmC,UAAnC,MAAmD,CAAC,CAAjE;IACA,MAAMC,UAAU,GAAGJ,MAAM,CAACK,YAAP,CAAoBC,OAApB,CAA4B,WAA5B,CAAnB;IACA,MAAMC,aAAa,GAAGH,UAAU,IAAIA,UAAU,GAAGP,GAAjD;IACA,OAAOE,IAAI,IAAI,CAACQ,aAAhB;EACA,CAtBe;;EAuBhBhB,IAAI,GAAG;IACN,KAAKR,IAAL,CAAUyB,KAAV,CAAgBC,OAAhB,GAA0B,MAA1B;EACA,CAzBe;;EA0BhBpB,KAAK,GAAG;IACP,KAAKN,IAAL,CAAUyB,KAAV,CAAgBC,OAAhB,GAA0B,MAA1B;IACAT,MAAM,CAACK,YAAP,CAAoBK,OAApB,CAA4B,WAA5B,EAAyCZ,IAAI,CAACD,GAAL,KAAanB,GAAtD;EACA,CA7Be;;EA8BhBc,kBAAkB,GAAG;IACpB,OAAO,iBAAiBmB,IAAjB,CAAsBX,MAAM,CAACC,SAAP,CAAiBC,SAAvC,CAAP;EACA;;AAhCe,CAAjB,C","file":"components--ie-warningde0a4cc370050ccff021.js","sourcesContent":["const day = 1000 * 60 * 60 * 24;\nmodule.exports = {\n\tinit() {\n\t\tthis.buttons = this.root.querySelectorAll('[data-close]');\n\t\tthis.root.addEventListener('click', e => {\n\t\t\tif (e.target.dataset.close === '') {\n\t\t\t\tthis.close();\n\t\t\t}\n\t\t});\n\t\tif (this.shouldShow()) this.show();\n\t\tif (!this.isInternetExplorer()) {\n\t\t\tconst ieWarningDiv = document.querySelector('.ie-warning');\n\t\t\tif (ieWarningDiv) {\n\t\t\t\tthis.root.remove();\n\t\t\t}\n\t\t}\n\t},\n\tshouldShow() {\n\t\tconst now = Date.now();\n\t\tconst isIE = window.navigator.userAgent.indexOf('Trident/') !== -1;\n\t\tconst expiration = window.localStorage.getItem('ieWarning');\n\t\tconst isDeactivated = expiration && expiration > now;\n\t\treturn isIE && !isDeactivated;\n\t},\n\tshow() {\n\t\tthis.root.style.display = 'flex';\n\t},\n\tclose() {\n\t\tthis.root.style.display = 'none';\n\t\twindow.localStorage.setItem('ieWarning', Date.now() + day);\n\t},\n\tisInternetExplorer() {\n\t\treturn /Trident\\/|MSIE/.test(window.navigator.userAgent);\n\t},\n};\n"],"sourceRoot":""}