{"version":3,"sources":["iframe.js","webpack://skyward_qmlativ_web/Scripts/skyward.ui.iframe.ts"],"names":["self","webpackChunkskyward_qmlativ_web","push","t","e","n","r","c","o","events","attachiFrameResizeEvents","iframeElement","$","this","iframe","async","setHeight","contentDocument","body","scrollHeight","style","height","registerLayoutResizeCallback","on","registerEvents"],"mappings":"AAAA,cAAcA,KAAKC,gCAAgCD,KAAKC,iCAAiC,IAAIC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAACC,EAAEC,EAAEC,KAAKA,EAAEC,EAAEF,GAAG,IAAIG,EAAEF,EAAE,MAAMG,EAAEH,EAAE,MCGnJ,MAAMI,EACN,CACIC,yBAKJ,WAEI,MAAMC,EAAgBC,EAAEC,MAClBC,EAASH,EAAc,GAC7BI,eAAeC,IAEPF,GAAUA,EAAOG,iBAAmBH,EAAOG,gBAAgBC,MAAQJ,EAAOG,gBAAgBC,KAAKC,eAE/FL,EAAOM,MAAMC,OAASP,EAAOG,gBAAgBC,KAAKC,aAAe,GAAK,KAE9E,EAEAG,EAAAA,EAAAA,8BAA6BN,GAC7BL,EAAcY,GAAG,OAAeP,GAChCA,GACJ,IAjBAQ,EAAAA,EAAAA,gBAAe,SAAUf,EDRkc","file":"iframe.js","sourcesContent":["\"use strict\";(self.webpackChunkskyward_qmlativ_web=self.webpackChunkskyward_qmlativ_web||[]).push([[6995],{9315:(t,e,n)=>{n.r(e);var c=n(2214),o=n(9343);const s={attachiFrameResizeEvents:function(){const t=$(this),e=t[0];async function n(){e&&e.contentDocument&&e.contentDocument.body&&e.contentDocument.body.scrollHeight&&(e.style.height=e.contentDocument.body.scrollHeight+50+\"px\")}(0,o.registerLayoutResizeCallback)(n),t.on(\"load\",n),n()}};(0,c.registerEvents)(\"iframe\",s)}}]);\n","import { registerEvents } from \"./skyward.ui.events\";\nimport { registerLayoutResizeCallback } from \"./skyward.ui.window\"\n\nconst events =\n{\n attachiFrameResizeEvents\n};\n\nregisterEvents(\"iframe\", events);\n\nfunction attachiFrameResizeEvents(this: HTMLIFrameElement | JQuery)\n{\n const iframeElement = $(this);\n const iframe = iframeElement[0] as HTMLIFrameElement;\n async function setHeight()\n {\n if (iframe && iframe.contentDocument && iframe.contentDocument.body && iframe.contentDocument.body.scrollHeight)\n {\n iframe.style.height = iframe.contentDocument.body.scrollHeight + 50 + 'px';\n }\n }\n\n registerLayoutResizeCallback(setHeight);\n iframeElement.on(\"load\" as any, setHeight);\n setHeight(); //calling in the case that the iframe has already loaded\n}"]}