{"version":3,"sources":["../../../dev/j/lp/lp-vpna8.js"],"names":["equalizeTabsSections","getMaxHeight","array","Math","max","apply","$carousel","each","$self","$","this","$selfTabSections","find","heights","push","height","avm","require","platformSwitcher","$document","document","$window","window","$entry","$tab","$more","$close","$tooltip","init","on","$target","closest","hasClass","animate","scrollTop","offset","top","toggleClass","removeClass","next","outerHeight","css","show","hide","$selfCarousel","$selfSections","$selfTabs","tabIndex","index","eq","addClass","ready","decorate","unserializeUrl","params","location","href","key"],"mappings":"CAAA,WACC,YAgEA,SAASA,KACR,GAAIC,GAAe,SAASC,GAC3B,MAAOC,MAAKC,IAAIC,MAAMF,KAAMD,GAG7BI,GAAUC,KAAK,WACd,GAAIC,GAAQC,EAAEC,MACbC,EAAmBH,EAAMI,KAAK,mBAC9BC,IAGDF,GAAiBJ,KAAK,WACrB,GAAIC,GAAQC,EAAEC,KACdG,GAAQC,KAAKN,EAAMO,YAIpBJ,EAAiBJ,KAAK,WACTE,EAAEC,MACRK,OAAOd,EAAaY,QAlF7B,GAAIJ,GAAIO,IAAIC,QAAQ,UACnBC,EAAmBF,IAAIC,QAAQ,8BAC/BE,EAAYV,EAAEW,UACdC,EAAUZ,EAAEa,QACZC,EAASd,EAAE,aACXe,EAAOf,EAAE,WACTgB,EAAQhB,EAAE,YACViB,EAASjB,EAAE,aACXkB,EAAWlB,EAAE,eAEbH,GADeG,EAAE,oBACLA,EAAE,gBAEfS,GAAiBU,OAKjBH,EAAMI,GAAG,QAAS,WACjB,GAAIC,GAAUrB,EAAEC,MAAMqB,QAAQ,eAE1BD,GAAQE,SAAS,WACpBvB,EAAE,cAAcwB,SACfC,UAAWJ,EAAQK,SAASC,IAAM,KAChC,KAGJN,EAAQO,YAAY,YAIrBX,EAAOG,GAAG,QAAS,WACJpB,EAAEC,MAAMqB,QAAQ,gBACtBO,YAAY,YAIrBf,EAAOM,GAAG,aAAc,WACvB,GAAIC,GAAUrB,EAAEC,MAAM6B,KAAK,YAC1BxB,EAASe,EAAQU,aAClBV,GAAQW,KACPL,KAAMrB,EAAS,GAAK,OAClB2B,SAGJnB,EAAOM,GAAG,aAAc,WACvBF,EAASgB,SAIVnB,EAAKK,GAAG,aAAc,WACrB,GAAIrB,GAAQC,EAAEC,MACbkC,EAAgBpC,EAAMuB,QAAQ,gBAC9Bc,EAAgBD,EAAchC,KAAK,mBACnCkC,EAAYF,EAAchC,KAAK,WAC/BmC,EAAWD,EAAUE,MAAMxC,EAE5BsC,GAAUR,YAAY,UACtBO,EAAcP,YAAY,UAC1BQ,EAAUG,GAAGF,GAAUG,SAAS,UAChCL,EAAcI,GAAGF,GAAUG,SAAS,YA4BrC/B,EAAUgC,MAAM,WACfnD,MAEDqB,EAAQQ,GAAG,SAAU,WACpB7B,KAKD,IAAIoD,GAAWpC,IAAIC,QAAQ,2BAC1BoC,EAAiBrC,IAAIC,QAAQ,yBAC7BqC,EAASD,EAAe/B,OAAOiC,SAASC,KAEzC,KAAK,GAAIC,KAAOH,GACfF,EAAS,gBAAiBK","file":"lp-vpna8.js","sourcesContent":["(function() {\n\t'use strict';\n\tvar $ = avm.require('jquery'),\n\t\tplatformSwitcher = avm.require('avast.web.platformSwitcher'),\n\t\t$document = $(document),\n\t\t$window = $(window),\n\t\t$entry = $('.js-entry'),\n\t\t$tab = $('.js-tab'),\n\t\t$more = $('.js-more'),\n\t\t$close = $('.js-close'),\n\t\t$tooltip = $('.js-tooltip'),\n\t\t$expandPunch = $('.js-expand-punch'),\n\t\t$carousel = $('.js-carousel');\n\n\tplatformSwitcher.init();\n\n\n// Info box panels\n\t// adds .expanded to closest .js-info-box\n\t$more.on('click', function() {\n\t\tvar $target = $(this).closest('.js-info-box');\n\n\t\tif ($target.hasClass('expand')) {\n\t\t\t$('html, body').animate({\n\t\t\t\tscrollTop: $target.offset().top - 405\n\t\t\t}, 500);\n\t\t}\n\n\t\t$target.toggleClass('expand');\n\t});\n\n\t// removes .expanded when clicking close\n\t$close.on('click', function() {\n\t\tvar $target = $(this).closest('.js-info-box');\n\t\t$target.removeClass('expand');\n\t});\n\n// Server map tooltip vertical position calculated according to its height\n\t$entry.on('mouseenter', function() {\n\t\tvar $target = $(this).next('.tooltip'),\n\t\t\theight = $target.outerHeight();\n\t\t$target.css({\n\t\t\ttop: -height - 15 + 'px'\n\t\t}).show();\n\t});\n\n\t$entry.on('mouseleave', function() {\n\t\t$tooltip.hide();\n\t});\n \n// Tabs switcher\n\t$tab.on('mouseenter', function() {\n\t\tvar $self = $(this),\n\t\t\t$selfCarousel = $self.closest('.js-carousel'),\n\t\t\t$selfSections = $selfCarousel.find('.js-tab-section'),\n\t\t\t$selfTabs = $selfCarousel.find('.js-tab'),\n\t\t\ttabIndex = $selfTabs.index($self);\n\n\t\t$selfTabs.removeClass('active');\n\t\t$selfSections.removeClass('active');\n\t\t$selfTabs.eq(tabIndex).addClass('active');\n\t\t$selfSections.eq(tabIndex).addClass('active');\n\t});\n\n// Equalize heights of tabs sections\n\tfunction equalizeTabsSections() {\n\t\tvar getMaxHeight = function(array) {\n\t\t\treturn Math.max.apply(Math, array);\n\t\t};\n\n\t\t$carousel.each(function() {\n\t\t\tvar $self = $(this),\n\t\t\t\t$selfTabSections = $self.find('.js-tab-section'),\n\t\t\t\theights = [];\n\n\t\t\t// Collect heights of tabs section for current carousel\n\t\t\t$selfTabSections.each(function() {\n\t\t\t\tvar $self = $(this);\n\t\t\t\theights.push($self.height());\n\t\t\t});\n\n\t\t\t// Set heights of tabs section for current carousel\n\t\t\t$selfTabSections.each(function() {\n\t\t\t\tvar $self = $(this);\n\t\t\t\t$self.height(getMaxHeight(heights));\n\t\t\t});\n\t\t});\n\t}\n\n\t$document.ready(function() {\n\t\tequalizeTabsSections();\n\t});\n\t$window.on('resize', function() {\n\t\tequalizeTabsSections();\n\t});\n\n// Decorate links\n\n\tvar decorate = avm.require('avast.web.linkDecorator'),\n\t\tunserializeUrl = avm.require('avast.url.unserialize'),\n\t\tparams = unserializeUrl(window.location.href);\n\n\tfor (var key in params) {\n\t\tdecorate('.bi-cart-link', key);\n\t}\n// /Decorate links\n})();\n"]}