<script type="application/javascript">
    window.idoitRootPath = '[{isys_application::instance()->www_path}]';
</script>
<style>
    #contentWrapper {
        top: 0px;
    }
</style>
<iframe id="jdisc-window" style="width: 100%;height: calc(100% - 4px);border: none;"
        src="[{isys_application::instance()->www_path}]synetics_jdisc/iframe/[{$slug}]"></iframe>
<script type="application/javascript">
    (() => {
        window.addEventListener('message', message => {
            if (message.origin !== window.origin) {
                return;
            }
            const data = message.data;
            if (typeof data !== 'object' || !data.hasOwnProperty('type') || data.type !== 'url:changed') {
                return;
            }
            const url = data.url;
            if (url) {
                history.pushState(undefined, undefined, `[{isys_application::instance()->www_path}]jdisc${url}`);
            }
        });
    })();
</script>
