{"version":3,"sources":["../../../../dev/j/v2/pages/dns.js"],"names":["heroButton","document","querySelector","bftButton","documentElement","classList","value","avastGlobals","detect","browser","name","setTimeout","click","addEventListener","window","dataLayer","push","event","eventCategory","eventAction","eventLabel","web","fileName"],"mappings":"CAAA,WACC,YAEA,IAAIA,GAAaC,SAASC,cAAc,sBACvCC,EAAYF,SAASC,cAAc,oBACrBD,UAASG,gBAAgBC,UAAUC,KAK9B,aAJLC,aAAaC,OAAOC,QAAQC,MAK1CC,WAAW,WACVV,SAASC,cAAc,uBAAuBU,SAC5C,KA4BJZ,EAAWa,iBAAiB,QAAS,WACJ,mBAArBC,QAAOC,WACjBA,UAAUC,MACTC,MAAS,kBACTC,cAAiB,cACjBC,YAAe,+BACfC,WAAcb,aAAac,IAAIC,aAKlCnB,EAAUU,iBAAiB,QAAS,WACH,mBAArBC,QAAOC,WACjBA,UAAUC,MACTC,MAAS,kBACTC,cAAiB,cACjBC,YAAe,kCACfC,WAAcb,aAAac,IAAIC","file":"dns.js","sourcesContent":["(function () {\n\t'use strict';\n\n\tvar heroButton = document.querySelector('.hero .btn-primary'),\n\t\tbftButton = document.querySelector('.bft .btn-primary'),\n\t\thtmlClasses = document.documentElement.classList.value,\n\t\tbrowserName = avastGlobals.detect.browser.name;\n\n\t// Switch to Firefox / Mac / iOS tab content if those OS are detected\n\t// note: setTimeout is set because sometimes Tab content was not visible\n\tif (browserName === \"Firefox\") {\n\t\tsetTimeout(function() {\n\t\t\tdocument.querySelector(\".setup-tab--firefox\").click();\n\t\t}, 300);\n\t}\n\t/*\n\t-----------------------------\n\t\tFull version of Tabs\n\t\t- uncomment this once we have \".editorconfig\" file for Mac and iOS tab\n\t\t- remove code above\n\t\t- enable Mac and iOS tab in TXT: https://web-cms.ff.int.avast.com/all/text/edit/67d644689b04145ae0abc585f55d1338\n\t\t- original ticket: https://butr.avast.com/browse/GLOWEB-5965\n\t\t- contact person who should deliver the \".editorconfig\" file: Michal Polačko\n\t-----------------------------\n\n\t\tif (browserName === \"Firefox\") {\n\t\t\tsetTimeout(function() {\n\t\t\t\tdocument.querySelector(\".setup-tab--firefox\").click();\n\t\t\t}, 300);\n\t\t} else if (/js-ios/.test(htmlClasses) || /js-mac/.test(htmlClasses) && navigator.maxTouchPoints > 0) {\n\t\t\tsetTimeout(function() {\n\t\t\t\tdocument.querySelector(\".setup-tab--ios\").click();\n\t\t\t}, 300);\n\t\t} else if (/js-mac/.test(htmlClasses)) {\n\t\t\tsetTimeout(function() {\n\t\t\t\tdocument.querySelector(\".setup-tab--mac\").click();\n\t\t\t}, 300);\n\t\t}\n\t*/\n\n\t// DataLayer push on CTA button click for tracking purposes\n\theroButton.addEventListener('click', function () {\n\t\tif (typeof window.dataLayer !== 'undefined') {\n\t\t\tdataLayer.push({\n\t\t\t\t\"event\": \"av.genericEvent\",\n\t\t\t\t\"eventCategory\": \"CTA > Other\",\n\t\t\t\t\"eventAction\": \"Turn on dns protection - top\",\n\t\t\t\t\"eventLabel\": avastGlobals.web.fileName\n\t\t\t});\n\t\t}\n\t});\n\n\tbftButton.addEventListener('click', function () {\n\t\tif (typeof window.dataLayer !== 'undefined') {\n\t\t\tdataLayer.push({\n\t\t\t\t\"event\": \"av.genericEvent\",\n\t\t\t\t\"eventCategory\": \"CTA > Other\",\n\t\t\t\t\"eventAction\": \"Turn on dns protection - bottom\",\n\t\t\t\t\"eventLabel\": avastGlobals.web.fileName\n\t\t\t});\n\t\t}\n\t});\n\n})();\n"]}