System.register(["./index-legacy-a18315e6-1742362401929.js","./index-legacy-932d7415-1742362401929.js"],(function(e,a){"use strict";var t,s,l,n,u,o,d,r,i,p,v;return{setters:[e=>{t=e.A},e=>{s=e.d,l=e.b4,n=e.a5,u=e.q,o=e.ap,d=e.f,r=e.l,i=e.m,p=e.ai,v=e.aa}],execute:function(){var a=document.createElement("style");a.textContent="._previewWindow_1jnin_1{width:100%;height:100%}\n",document.head.appendChild(a);const c="_previewWindow_1jnin_1";e("P",s({name:"preview-window",props:{show:{type:Boolean,default:!1},type:{type:String,default:""},params:{type:Object,default:()=>({})}},emit:["update:show"],setup(e,{emit:a}){const{show:s,type:m,params:w}=l(e);n((()=>e.show),(()=>{s.value=e.show})),n((()=>e.type),(()=>{m.value=e.type})),n((()=>e.params),(()=>{w.value=e.params}));const h=e=>{console.log(e,"iframe_exit"),"iframe_exit"===e.data.api&&a("update:show",!1)};return u((()=>{window.addEventListener("message",h)})),o((()=>{window.removeEventListener("message",h)})),()=>d(p,null,[d(r,{maskClosable:i,show:s.value,"onUpdate:show":[e=>s.value=e,()=>{a("update:show",s.value)}],class:c,showIcon:!1,displayDirective:"show"},{default:()=>[d(p,null,[s.value?"attend"==m.value?d(t,{type:w.value.type||"",instrumentId:w.value.instrumentId||"",courseId:w.value.courseId||"",detailId:w.value.detailId||"",classGroupId:w.value.classGroupId||"",lessonCourseId:w.value.lessonCourseId||"",classId:w.value.classId||"",preStudentNum:w.value.preStudentNum,onClose:()=>a("update:show",!1)},null):"notation"==m.value?d("iframe",{src:w.value.src,onLoad:e=>{v(e.target)}},null):"music"==m.value?d("iframe",{src:w.value.src,key:w.value.src,onLoad:e=>{v(e.target)},style:{height:"100vh"}},null):"":""])]})])}}))}}}));
