import"../../../../es-global-bridge/es-global-bridge.js";import{store as e}from"../haxcms-site-store.js";import{autorun as t}from"../../../../../mobx/dist/mobx.esm.js";export const LTIResizingMixin=function(s){return class extends s{constructor(){super();const s=new URL("../../../../h5p-element/lib/h5p-resizer.js",import.meta.url).href;globalThis.ESGlobalBridge.requestAvailability().load("h5p-resizer",s),t((()=>{(e.activeItemContent||e.appReady)&&(parent.postMessage('{"subject":"lti.scrollToTop"}',"*"),setTimeout((()=>{let e=globalThis.document.body.scrollHeight;this.HAXCMSThemeSettings.scrollTarget&&this.HAXCMSThemeSettings.scrollTarget.scrollHeight&&(e=this.HAXCMSThemeSettings.scrollTarget.scrollHeight),parent.postMessage('{"subject":"lti.frameResize", "height":'+e+" }","*"),parent.postMessage('{"subject":"lti.scrollToTop"}',"*")}),100),setTimeout((()=>{let e=globalThis.document.body.scrollHeight;this.HAXCMSThemeSettings.scrollTarget&&this.HAXCMSThemeSettings.scrollTarget.scrollHeight&&(e=this.HAXCMSThemeSettings.scrollTarget.scrollHeight),parent.postMessage('{"subject":"lti.frameResize", "height":'+e+" }","*"),parent.postMessage('{"subject":"lti.scrollToTop"}',"*")}),1e3))}))}}};