{"version":3,"sources":["../wp-content/themes/cohesity_new/assets/scripts/redesign-2023/sections/microsites/cyber-resilience.js"],"names":["cyberResilienceCycle","document","querySelector","scrollWheelAnimation","doc","documentElement","sectionOffset","offsetTop","containerOffset","offsetLeft","windowHeight","window","innerHeight","activeWheelPosition","sectionPosition","scrollTop","windowWidth","innerWidth","classList","remove","add","body","contains","slides","querySelectorAll","scrollSlides","length","style","left","negativePosition","titles","i","addEventListener","this","setTimeout","opacity","forEach","item","index","e","indexNumber","parseInt","currentTarget","getAttribute","console","log","scrollTopPosition","scrollTo","top","behavior"],"mappings":"aAAA,IAAIA,qBAAuBC,SAASC,cAAe,2BACnD,SAASC,uBACP,IAAMC,IAAMH,SAASI,gBACrB,IAAMC,cAAgBN,qBAAqBO,UAC3C,IAAMC,gBAAmBR,qBAAqBE,cAAc,cAAcO,WAAY,GACtF,IAAMC,aAAeC,OAAOC,YAC5B,IAAMC,oBAAsBH,aAAcA,aAAa,GAAG,IAC1D,IAAMI,gBAAkBR,cAAgBF,IAAIW,UAC5C,IAAMC,YAAcL,OAAOM,WAC3B,GAAGD,YAAY,IAAI,CACjBf,SAASC,cAAc,8CAA8CgB,UAAUC,OAAO,wBACnF,CACHlB,SAASC,cAAc,8CAA8CgB,UAAUE,IAAI,oBAErF,GAAInB,SAASoB,KAAKC,SAAUtB,uBAAyBgB,aAAa,IAAK,CACrE,IAAMO,OAASvB,qBAAqBwB,iBAAkB,SACtD,IAAMC,aAAeF,OAAOG,OAAS,EACrC1B,qBAAqBE,cAAe,qBAAqByB,MAAMC,KAAKpB,gBAAgB,KACpF,GAAIM,iBAAmB,IAAKA,gBAAkBJ,aAAee,aAAc,CACzEzB,qBAAqBE,cAAe,gBAAgBgB,UAAUE,IAAK,UACnEpB,qBAAqBE,cAAe,qBAAqBgB,UAAUE,IAAK,UACxEpB,qBAAqBE,cAAe,gBAAgBgB,UAAUC,OAAQ,iBACtEnB,qBAAqBE,cAAe,qBAAqBgB,UAAUC,OAAQ,sBAExE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AAegB,UAAUE,IAAK,UACtDU,OAAOC,KAAGb,UAAUE,IAAK,cACtB,CACHG,OAAOQ,KAAG7B,cAAc,eAAegB,UAAUC,OAAQ,UACzDW,OAAOC,KAAGb,UAAUC,OAAQ,aAOpC,GAAGH,YAAY,IAAI,CACjBhB,qBAAqBE,cAAc,qBAAqBgB,UAAUE,IAAI,WAG1ET,OAAOqB,iBAAkB,OAAQ,WAC/B,IAAMhB,YAAcL,OAAOM,WAC3B,GAAGD,aAAa,IAAI,CAClBiB,KAAKC,WAAW,WACdlC,qBAAqBE,cAAe,qBAAqByB,MAAMQ,QAAQ,KACvE,KAGJhC,yBAEFQ,OAAOqB,iBAAkB,SAAU,WACjC,IAAMhB,YAAcL,OAAOM,WAC3B,GAAGD,aAAa,IAAI,CAClBiB,KAAKC,WAAW,WACdlC,qBAAqBE,cAAe,qBAAqByB,MAAMQ,QAAQ,KACvE,KAGJhC,yBAEFQ,OAAOqB,iBAAkB,SAAU,WACjC7B,yBAEF,GAAIF,SAASoB,KAAKC,SAAUtB,sBAAsB,CAChD,IAAMuB,OAASvB,qBAAqBwB,iBAAkB,iCACtDD,OAAOa,QAAQ,SAACC,KAAMC,OACtBD,KAAKL,iBAAiB,QAAQ,SAASO,GACrC,IAAMC,YAAcC,SAASF,EAAEG,cAAcC,aAAa,eAC1D,IAAMrC,cAAgBN,qBAAqBO,UAC3C,IAAMG,aAAeC,OAAOC,YAC5BgC,QAAQC,IAAIvC,eACZsC,QAAQC,IAAKnC,aAAa8B,YAAalC,eACvC,IAAMwC,kBAAqBpC,aAAa8B,YAAalC,cACrDK,OAAOoC,SAAS,CAACC,IAAKF,kBAAmBG,SAAU","file":"cyber-resilience.js","sourcesContent":["var cyberResilienceCycle = document.querySelector ('.cyber-resilience-cycle');\nfunction scrollWheelAnimation(){\n const doc = document.documentElement;\n const sectionOffset = cyberResilienceCycle.offsetTop;\n const containerOffset = (cyberResilienceCycle.querySelector(\".container\").offsetLeft)+20;\n const windowHeight = window.innerHeight;\n const activeWheelPosition = windowHeight-(windowHeight*60/100);\n const sectionPosition = sectionOffset - doc.scrollTop;\n const windowWidth = window.innerWidth;\n if(windowWidth<992){\n document.querySelector(\".cyber-resilience-cycle .outer-circle-wrap\").classList.remove(\"functional-wheel\");\n }else{\n document.querySelector(\".cyber-resilience-cycle .outer-circle-wrap\").classList.add(\"functional-wheel\");\n }\n if (document.body.contains (cyberResilienceCycle) && windowWidth>=992) {\n const slides = cyberResilienceCycle.querySelectorAll ('.item');\n const scrollSlides = slides.length - 1;\n cyberResilienceCycle.querySelector ('.functional-wheel').style.left=containerOffset+\"px\";\n if (sectionPosition <= 0 &&-sectionPosition < windowHeight * scrollSlides) {\n cyberResilienceCycle.querySelector ('.side-shapes').classList.add ('sticky');\n cyberResilienceCycle.querySelector ('.functional-wheel').classList.add ('sticky');\n cyberResilienceCycle.querySelector ('.side-shapes').classList.remove ('bottom-sticky');\n cyberResilienceCycle.querySelector ('.functional-wheel').classList.remove ('bottom-sticky');\n } \n else if (sectionPosition > 0) {\n cyberResilienceCycle.querySelector ('.side-shapes').classList.remove ('sticky');\n cyberResilienceCycle.querySelector ('.functional-wheel').classList.remove ('sticky');\n cyberResilienceCycle.querySelector ('.side-shapes').classList.remove ('bottom-sticky');\n cyberResilienceCycle.querySelector ('.functional-wheel').classList.remove ('bottom-sticky');\n } \n else if (-sectionPosition > windowHeight * scrollSlides) {\n cyberResilienceCycle.querySelector ('.side-shapes').classList.remove ('sticky');\n cyberResilienceCycle.querySelector ('.functional-wheel').classList.remove ('sticky');\n cyberResilienceCycle.querySelector ('.side-shapes').classList.add ('bottom-sticky');\n cyberResilienceCycle.querySelector ('.functional-wheel').classList.add ('bottom-sticky');\n }\n\n var negativePosition=0;\n if(sectionPosition<0){\n negativePosition=1;\n }\n const titles = cyberResilienceCycle.querySelectorAll('.functional-wheel .shape-name');\n if(sectionPosition<=activeWheelPosition && (-sectionPosition)<(windowHeight*60/100)){\n cyberResilienceCycle.querySelector ('.functional-wheel .animate-wheel').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .identify').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .protect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .detect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .respond').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .recover').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .recover').classList.remove(\"active\");\n \n for(let i=0;i<slides.length;i++){\n if(i==0){\n slides[i].querySelector(\".inner-wrap\").classList.add ('active');\n titles[i].classList.add ('active');\n }else{\n slides[i].querySelector(\".inner-wrap\").classList.remove ('active');\n titles[i].classList.remove('active');\n }\n }\n }\n else if(negativePosition==1 && (-sectionPosition)<=activeWheelPosition+windowHeight && (-sectionPosition)<(windowHeight*60/100)+windowHeight){\n cyberResilienceCycle.querySelector ('.functional-wheel .animate-wheel').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .identify').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .protect').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .detect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .respond').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .recover').classList.remove(\"active\");\n for(let i=0;i<slides.length;i++){\n if(i==1){\n slides[i].querySelector(\".inner-wrap\").classList.add ('active');\n titles[i].classList.add ('active');\n }else{\n slides[i].querySelector(\".inner-wrap\").classList.remove ('active');\n titles[i].classList.remove ('active');\n }\n }\n }\n else if(negativePosition==1 && (-sectionPosition)<=activeWheelPosition+(windowHeight*2) && (-sectionPosition)<(windowHeight*60/100)+(windowHeight*2)){\n cyberResilienceCycle.querySelector ('.functional-wheel .animate-wheel').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .identify').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .protect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .detect').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .respond').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .recover').classList.remove(\"active\");\n for(let i=0;i<slides.length;i++){\n if(i==2){\n slides[i].querySelector(\".inner-wrap\").classList.add ('active');\n titles[i].classList.add ('active');\n }else{\n slides[i].querySelector(\".inner-wrap\").classList.remove ('active');\n titles[i].classList.remove ('active');\n }\n }\n }\n else if(negativePosition==1 && (-sectionPosition)<=activeWheelPosition+(windowHeight*3) && (-sectionPosition)<(windowHeight*60/100)+(windowHeight*3)){\n cyberResilienceCycle.querySelector ('.functional-wheel .animate-wheel').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .identify').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .protect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .detect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .respond').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .recover').classList.remove(\"active\");\n for(let i=0;i<slides.length;i++){\n if(i==3){\n slides[i].querySelector(\".inner-wrap\").classList.add ('active');\n titles[i].classList.add ('active');\n }else{\n slides[i].querySelector(\".inner-wrap\").classList.remove ('active');\n titles[i].classList.remove ('active');\n }\n }\n }\n else if(negativePosition==1 && (-sectionPosition)<=activeWheelPosition+(windowHeight*4) && (-sectionPosition)<(windowHeight*60/100)+(windowHeight*4)){\n cyberResilienceCycle.querySelector ('.functional-wheel .animate-wheel').classList.add(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .identify').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .protect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .detect').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .respond').classList.remove(\"active\");\n cyberResilienceCycle.querySelector ('.functional-wheel .recover').classList.add(\"active\");\n for(let i=0;i<slides.length;i++){\n if(i==4){\n slides[i].querySelector(\".inner-wrap\").classList.add ('active');\n titles[i].classList.add ('active');\n }else{\n slides[i].querySelector(\".inner-wrap\").classList.remove ('active');\n titles[i].classList.remove ('active');\n }\n }\n }\n \n }\n \n if(windowWidth<992){\n cyberResilienceCycle.querySelector(\".slide1 .identify\").classList.add(\"active\");\n }\n}\nwindow.addEventListener ('load', function () {\n const windowWidth = window.innerWidth;\n if(windowWidth>=992){\n this.setTimeout(function(){\n cyberResilienceCycle.querySelector ('.functional-wheel').style.opacity=\"1\";\n },500);\n }\n \n scrollWheelAnimation();\n});\nwindow.addEventListener ('resize', function () {\n const windowWidth = window.innerWidth;\n if(windowWidth>=992){\n this.setTimeout(function(){\n cyberResilienceCycle.querySelector ('.functional-wheel').style.opacity=\"1\";\n },500);\n }\n \n scrollWheelAnimation();\n});\nwindow.addEventListener ('scroll', function () {\n scrollWheelAnimation();\n});\nif (document.body.contains (cyberResilienceCycle)){\n const slides = cyberResilienceCycle.querySelectorAll ('.functional-wheel .shape-name');\n slides.forEach((item, index) => {\n item.addEventListener(\"click\",function(e){\n const indexNumber = parseInt(e.currentTarget.getAttribute(\"data-index\"));\n const sectionOffset = cyberResilienceCycle.offsetTop;\n const windowHeight = window.innerHeight;\n console.log(sectionOffset);\n console.log((windowHeight*indexNumber)+sectionOffset);\n const scrollTopPosition = (windowHeight*indexNumber)+sectionOffset;\n window.scrollTo({top: scrollTopPosition, behavior: 'smooth'});\n });\n})\n}"],"sourceRoot":"assets/scripts/"}