File: /var/www/html/demo.sumarbc.com.py/mod/moodle-mod_hvp-stable/amd/build/embed.min.js
define("mod_hvp/embed",["jquery","mod_hvp/communicator"],(function($,H5PEmbedCommunicator){$(document).ready((function(){$(".h5p-iframe").ready((function(){initEmbedCommunicator=function(){var resizeDelay,instance=H5P.instances[0],parentIsFriendly=!1;H5PEmbedCommunicator.on("ready",(function(){H5PEmbedCommunicator.send("hello")})),H5PEmbedCommunicator.on("hello",(function(){parentIsFriendly=!0,iFrame.contentDocument.body.style.overflow="hidden",document.body.classList.add("h5p-resizing"),H5P.trigger(instance,"resize")})),H5PEmbedCommunicator.on("resizePrepared",(function(){H5PEmbedCommunicator.send("resize",{scrollHeight:iFrame.contentDocument.body.scrollHeight})})),H5PEmbedCommunicator.on("resize",(function(){H5P.trigger(instance,"resize")})),H5P.on(instance,"resize",(function(){H5P.isFullscreen||(clearTimeout(resizeDelay),resizeDelay=setTimeout((function(){parentIsFriendly?H5PEmbedCommunicator.send("prepareResize",{scrollHeight:iFrame.contentDocument.body.scrollHeight,clientHeight:iFrame.contentDocument.body.clientHeight}):H5PEmbedCommunicator.send("hello")}),0))})),H5P.trigger(instance,"resize")};var iFrame=document.querySelector(".h5p-iframe"),H5P=iFrame.contentWindow.H5P;H5P&&H5P.instances&&H5P.instances[0]?initEmbedCommunicator():(console.warn("H5P embed.js: ACK! Embedded H5P.instances[0] in lowest iframe is not set up yet. Waiting for 'initialized' event"),window.H5P.externalDispatcher.on("initialized",(function(event){console.log("H5P embed.js: 'initialized' event received"),H5P=iFrame.contentWindow.H5P,initEmbedCommunicator()})))}))}))}));
//# sourceMappingURL=embed.min.js.map