{"version":3,"file":"iframeComm.bundle.js","mappings":"AACAA,OAAOC,iBAAiB,WAAW,SAAUC,GACzC,IAAIC,EAASC,SAASC,eAAe,wBACjCC,EAAmBJ,EAAEK,KACzBJ,EAAOK,MAAMC,OAASH,EAAiBG,OACvCN,EAAOK,MAAME,MAAQJ,EAAiBI,MAGlCJ,EAAiBK,aACjBC,YAAW,WACPZ,OAAOa,SAAS,CAAEC,IAAK,EAAGC,SAAU,UACxC,GAAG,IAEX,IAAG,GAEHX,SAASH,iBAAiB,UAAU,WAChC,IAAIE,EAASC,SAASC,eAAe,wBACjCW,EAAe,EACfZ,SAASa,cAAc,gBAAkBb,SAASa,cAAc,oBAChED,EAAeZ,SAASa,cAAc,eAAeC,aAAed,SAASa,cAAc,kBAAkBC,aAAe,GAEhI,IAAIC,EAAiB,EACjBnB,OAAOoB,QAAU,IACjBD,EAAiBE,KAAKC,IAAInB,EAAOoB,wBAAwBT,KAAOE,GAEpEb,EAAOqB,cAAcC,YAAYN,EAAgB,IACrD","sources":["webpack://telering_markenkliq/./app/frame-comms/parent-website-comms.ts"],"sourcesContent":["//listen to resize events\r\nwindow.addEventListener('message', function (e) {\r\n var iframe = document.getElementById(\"UnsereProdukteIFrame\");\r\n var iframeDimensions = e.data; // message that was passed from iframe page\r\n iframe.style.height = iframeDimensions.height;\r\n iframe.style.width = iframeDimensions.width;\r\n // Check if the message is being sent by the usual propagateHeight or by the alternative.\r\n // This is to avoid scrolling to the top of the page when expanding a subcategory in the mobile category menu\r\n if (iframeDimensions.resetScroll) {\r\n setTimeout(function () {\r\n window.scrollTo({ top: 0, behavior: 'smooth' });\r\n }, 250);\r\n }\r\n}, false);\r\n//send scroll position to iframe\r\ndocument.addEventListener(\"scroll\", function () {\r\n var iframe = document.getElementById(\"UnsereProdukteIFrame\");\r\n var navBarOffset = 0;\r\n if (document.querySelector('.header-top') && document.querySelector('.header-bottom')) {\r\n navBarOffset = document.querySelector('.header-top').clientHeight + document.querySelector('.header-bottom').clientHeight + 1;\r\n }\r\n var scrollPosition = 0;\r\n if (window.scrollY > 0) {\r\n scrollPosition = Math.abs(iframe.getBoundingClientRect().top) + navBarOffset;\r\n }\r\n iframe.contentWindow.postMessage(scrollPosition, \"*\");\r\n});\r\n"],"names":["window","addEventListener","e","iframe","document","getElementById","iframeDimensions","data","style","height","width","resetScroll","setTimeout","scrollTo","top","behavior","navBarOffset","querySelector","clientHeight","scrollPosition","scrollY","Math","abs","getBoundingClientRect","contentWindow","postMessage"],"sourceRoot":""}