!function(){function e(e,t,n,o,r,l,s){try{var i=e[l](s),a=i.value}catch(c){return void n(c)}i.done?t(a):Promise.resolve(a).then(o,r)}function t(t){return function(){var n=this,o=arguments;return new Promise((function(r,l){var s=t.apply(n,o);function i(t){e(s,r,l,i,a,"next",t)}function a(t){e(s,r,l,i,a,"throw",t)}i(void 0)}))}}function n(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function o(e){for(var t=1;t{r=e.d,l=e.x,s=e.r,i=e.y,a=e.a7,c=e.a,u=e.V,d=e.A,p=e.F,g=e.C,m=e.q,y=e.U,f=e.S,b=e.h,v=e.a0,w=e.a1,h=e.D,k=e.E},e=>{S=e.M},e=>{x=e.s},e=>{j=e.u,O=e.a},e=>{C=e.g,I=e.s},e=>{P=e.C,D=e.a},e=>{E=e.I},null],execute:function(){const N=""+new URL("library-1-96754f77.png",n.meta.url).href,R=""+new URL("library-2-18c7f885.png",n.meta.url).href,T=""+new URL("library-3-784f5dd5.png",n.meta.url).href,L=r({name:"knowledge-guide",emits:["close"],setup(e,{emit:t}){const n=l({box:{},show:!1,steps:[{ele:"",eleRect:{},img:C("knowledge1.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{width:"5.46rem",height:"2.30rem",top:"1.9rem"},btnsStyle:{top:"4.5rem",left:"1rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",eleRect:{},img:C("knowledge2.png"),handStyle:{top:"1.3rem",left:"1.5rem"},imgStyle:{top:"1.9rem",left:"-1.5rem"},btnsStyle:{top:"4.5rem"},boxStyle:{transform:"scale(1.2)!important"}},{ele:"",img:C("knowledge3.png"),handStyle:{top:"4.1rem",left:"3.6rem"},imgStyle:{top:"4.8rem",left:"1.2rem",width:"7.2rem",height:"3.45rem"},btnsStyle:{top:"8.8rem",left:"1.3rem"},boxStyle:{transform:"scale(1)"}}],step:0}),r=s(!1),m=()=>{const e=document.getElementById(`knowledge-${n.step}`);if(console.log(e,"ele"),e){const t=e.getBoundingClientRect();n.box={left:t.x+"px",top:t.y+"px",width:t.width+"px",height:t.height+"px"}}else f()};i((()=>{const e=localStorage.getItem("guideInfo");e&&JSON.parse(e).knowledge?r.value=!1:r.value=!0,m(),window.addEventListener("resize",y)}));const y=()=>{m()};a((()=>{window.removeEventListener("resize",y)}));const f=()=>{console.log(n.step,""),n.step>=2?b():(n.step=n.step+1,m())},b=()=>{let e=JSON.parse(localStorage.getItem("guideInfo")||"{}");e?e.knowledge=!0:e={knowledge:!0},localStorage.setItem("guideInfo",JSON.stringify(e)),r.value=!1};return()=>c(u,{teleport:"body",overlay:!1,closeOnClickOverlay:!1,class:["popup-custom",I.guidePopup],show:r.value,"onUpdate:show":e=>r.value=e},{default:()=>[c("div",{class:I.content,onClick:()=>f()},[n.step!=n.steps.length-1&&c("div",{class:[I.backBtn,I.right],onClick:e=>{e.stopPropagation(),b()}},[d("跳过")]),c("div",{class:[I.box,I.noscalc],style:o(o({},n.box),n.steps[n.step].boxStyle),id:`modeType-${n.step}`},[n.steps.map(((e,t)=>{var o,r;return c("div",{onClick:e=>e.stopPropagation(),class:I.item,style:{display:t===n.step?"":"none",left:`${null===(o=e.eleRect)||void 0===o?void 0:o.left}px`,top:`${null===(r=e.eleRect)||void 0===r?void 0:r.top}px`}},[c("img",{class:I.img,style:e.imgStyle,src:e.img},null),c("img",{class:I.iconHead,style:e.handStyle,src:C("indexDot.png")},null),c("div",{class:I.btns,style:e.btnsStyle},[n.step+1==n.steps.length?c(p,null,[c(g,{class:I.btn,round:!0,color:"transparent",style:{"border-color":"#fff"},type:"primary",onClick:()=>{n.step=0,m()}},{default:()=>[d("再看一遍")]}),c(g,{class:[I.btn,I.endBtn],round:!0,type:"primary",onClick:()=>b()},{default:()=>[d("完成")]})]):c(g,{class:I.btn,round:!0,type:"primary",onClick:()=>f()},{default:()=>[d("下一步 ("),n.step+1,d("/"),n.steps.length,d(")")]})])])}))])])]})}});e("default",r({name:"knowledge-ligrary",setup(){const e=m(),n=y(),o=s(),r=l({cid:n.query.cid,list:[],activeNames:sessionStorage.getItem("knowledge-ligrary-key")?Number(sessionStorage.getItem("knowledge-ligrary-key")):0,background:"transparent",color:"#fff"}),a=function(){var e=t((function*(){try{const{data:e}=yield h.post("/edu-app/lessonCourseware/queryStudentLessonDetail",{requestType:"form",data:{lessonCoursewareId:r.cid}});r.list=e,o.value=!0}catch(e){}}));return function(){return e.apply(this,arguments)}}(),u=e=>e%3==1?N:e%3==2?R:e%3==0?T:void 0,p=function(){var n=t((function*(t){try{const{data:n}=yield h.get("/edu-app/studentUnitExamination/checkKnowledgePointIds",{params:{lessonCoursewareId:r.cid}});if(!n)return void setTimeout((()=>{k("暂无题目")}),100);"TEST"===t?e.push({path:"/examination-mode",query:{lessonCoursewareId:r.cid}}):e.push({path:"/practice-mode",query:{lessonCoursewareId:r.cid}})}catch(n){}}));return function(e){return n.apply(this,arguments)}}();return i((()=>{j(document,"scroll",(()=>{const{y:e}=O();e.value>52?(r.background="#fff",r.color="#323333"):(r.background="transparent",r.color="#fff")})),a()})),()=>{let t;return c("div",{class:x.knowledgeLibrary},[c(S,{position:"top"},{default:()=>[c(f,{border:!1,background:r.background,color:r.color},{right:()=>c("div",{class:[x.wroingBtn],onClick:()=>e.push("/wroing-book")},[c("i",{class:x.iconWroing},null),d("错题本")])})]}),c("div",{class:x.btnGroup},[c("div",{id:"knowledge-0",class:x.btnPractice,onClick:()=>p("PRACTICE")},null),c("div",{id:"knowledge-1",class:x.btnTest,onClick:()=>p("TEST")},null)]),c("div",{class:[x.containerSection,x.librarySection]},[c(P,{modelValue:r.activeNames,"onUpdate:modelValue":e=>r.activeNames=e,accordion:!0,border:!1,onChange:e=>{sessionStorage.setItem("knowledge-ligrary-key",e)}},(n=t=r.list.map(((t,n)=>c(D,{title:t.lessonCoursewareDetailName,name:n,value:r.activeNames===n?"收起":"展开",border:!1},{default:()=>[t.knowledgeDetails&&t.knowledgeDetails.map(((t,n)=>c("div",{class:x.unitItem,onClick:()=>e.push({path:"/unit-detail",query:{detailId:t.lessonCoursewareKnowledgeDetailId}})},[c(E,b({id:0==n?"knowledge-2":""},{class:x.unitImg,lazyLoad:!0,src:u(n)}),null),c("p",{class:x.name},[c("span",null,[t.name])])]))),t.knowledgeDetails&&t.knowledgeDetails.length<=0&&c(v,{description:"暂无章节"},null)]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!w(n)?t:{default:()=>[t]}))]),o.value&&c(L,null,null)]);var n}}}))}}}))}();