{"version":3,"file":"js/footerLottery.eaa81927e9072723e22e.js","mappings":"kKAAA,kEAIA,IAAIA,EAAgB,WAClB,IAAIC,GAAe,EACfC,GAAmB,EAGvB,MAAMC,EAAe,WACnBC,EAAEC,MAAMC,YAAY,UACpBF,EAAEC,MAAME,OAAOC,SAAS,SAC1B,EAGMC,EAAmB,WAElBR,IACHA,GAAe,EAGXG,EAAEM,QAAQC,SAAW,IAClBT,IACHE,EAAE,iCAAiCQ,MAAK,SAASC,GAE/CT,EAAEC,MAAMS,GAAG,QAASX,GAEpBC,EAAEC,MAAME,OAAOC,WAEfJ,EAAEC,MAAME,OAAOO,GAAG,qBAAqB,WAErCV,EAAEC,MAAMU,OAAOC,SAAS,UAExBZ,EAAEC,MAAMY,IAAI,qBAEZb,EAAEC,MAAMG,SAAS,OACnB,GACF,IAEAN,GAAmB,GAGjBA,IACFE,EAAE,iCAAiCQ,MAAK,SAASC,GAE/CT,EAAEC,MAAMY,IAAI,SAEZb,EAAEC,MAAMa,YAAY,UAEpBd,EAAEC,MAAME,OAAOW,YAAY,4BAE3BC,YAAW,WAETf,EAAEC,MAAME,OAAOC,SAAS,UAC1B,GAAG,IACL,IAEAN,GAAmB,GAIvBD,GAAe,EAEnB,EASA,MAAO,CACLmB,KARW,WAEXX,IAEAC,OAAOW,SAAWZ,CACpB,EAMF,CAxEoB,GCOpB,IATA,MACEa,cACEjB,KAAKe,MACP,CAEAA,OACEpB,EAAcoB,MAChB,E","sources":["webpack://netzkern.am/./src/Feature/LotteryNavigation/code/Scripts/footerLottery.js","webpack://netzkern.am/./src/Feature/LotteryNavigation/code/Scripts/footerLottery.cmp.js"],"sourcesContent":["import(/* webpackChunkName: \"footerLottery\" */ '../Styles/footerLottery.scss');\r\n\r\nimport \"bootstrap/js/dist/collapse\";\r\n\r\nvar FooterLottery = function() {\r\n let isProcessing = false;\r\n let isClickEventBind = false;\r\n\r\n // Click handler\r\n const clickHandler = function() {\r\n $(this).toggleClass(\"active\");\r\n $(this).next().collapse(\"toggle\");\r\n };\r\n\r\n // Window resize handler\r\n const reportWindowSize = function() {\r\n // If the previous logic is still running, there is no need to execute it again.\r\n if (!isProcessing) {\r\n isProcessing = true;\r\n\r\n // If it is a mobile view, create an accordion and set the necessary attributes and events.\r\n if ($(window).width() <= 767) {\r\n if (!isClickEventBind) {\r\n $('.footer [class*=\"__headline\"]').each(function(index) {\r\n // Set click events\r\n $(this).on(\"click\", clickHandler);\r\n // Initiated collapse\r\n $(this).next().collapse();\r\n // Wait for the collapse event to be initialized before hiding all contents.\r\n $(this).next().on(\"shown.bs.collapse\", function() {\r\n /// Adding active class on headlline\r\n $(this).prev().addClass(\"active\");\r\n // Removed collapse event\r\n $(this).off(\"shown.bs.collapse\");\r\n // Collapse\r\n $(this).collapse(\"hide\");\r\n });\r\n });\r\n\r\n isClickEventBind = true;\r\n }\r\n } else {\r\n if (isClickEventBind) {\r\n $('.footer [class*=\"__headline\"]').each(function(index) {\r\n // Removed click event\r\n $(this).off(\"click\");\r\n // Removed active class\r\n $(this).removeClass(\"active\");\r\n // Removed all classes from sibling\r\n $(this).next().removeClass(\"collapse collapsing show\");\r\n\r\n setTimeout(function() {\r\n // Dispose collapse\r\n $(this).next().collapse(\"dispose\");\r\n }, 100);\r\n });\r\n\r\n isClickEventBind = false;\r\n }\r\n }\r\n\r\n isProcessing = false;\r\n }\r\n };\r\n\r\n const init = function() {\r\n // Inilized with first report of window size\r\n reportWindowSize();\r\n // Bind the report size function to the window on resize event\r\n window.onresize = reportWindowSize;\r\n };\r\n\r\n return {\r\n init: init\r\n };\r\n\r\n}();\r\n\r\nexport { FooterLottery };\r\n","import { FooterLottery } from \"./footerLottery\";\r\n\r\nclass FooterLotteryComponent {\r\n constructor() {\r\n this.init();\r\n }\r\n\r\n init() {\r\n FooterLottery.init();\r\n }\r\n}\r\nnew FooterLotteryComponent();\r\n"],"names":["FooterLottery","isProcessing","isClickEventBind","clickHandler","$","this","toggleClass","next","collapse","reportWindowSize","window","width","each","index","on","prev","addClass","off","removeClass","setTimeout","init","onresize","constructor"],"sourceRoot":""}