System.register(["./index-legacy-bfebbbb9.js","./index-legacy-391308c1.js","./index-legacy-c66bda16.js","./index-legacy-5046471f.js","./index-legacy-b8ade0a3.js","./index-legacy-679bdc2e.js","./index-legacy-0230da5d.js","./index-legacy-1ac807a6.js","./index-legacy-c0b87482.js","./index-legacy-236532da.js"],(function(e,n){"use strict";var t,i,a,o,s,l,r,u,d,c,p,A,_,f,v,w,b,g,h,m,y,I,x,C,T,q,E,S,L,k,B,R,F,U,N,P;return{setters:[e=>{t=e.d,i=e.U,a=e.q,o=e.r,s=e.x,l=e.w,r=e.e,u=e.y,d=e.af,c=e.a,p=e.S,A=e.A,_=e.C,f=e.V,v=e.a1,w=e.D,b=e.z,g=e.Z},e=>{h=e.e,m=e.Q,y=e.C,I=e.D,x=e.K,C=e.P,T=e.i,q=e.A,E=e.a,S=e.R},e=>{L=e.M},e=>{k=e.E},e=>{B=e.b,R=e.u,F=e.a},e=>{U=e.S,N=e.a},e=>{P=e.I},null,null,null],execute:function(){var j=document.createElement("style");j.textContent="._unitDetail_15a1l_1{min-height:100vh;overflow:hidden;background:url("+new URL("bg-a9662afa.png",n.meta.url).href+") no-repeat top center;background-size:contain;position:relative;background-color:#abe8ff}._unitSwipe_15a1l_9{margin-top:2.4rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12{display:flex;align-items:center;justify-content:space-between;font-size:.37333rem;font-weight:700;color:#333;padding-bottom:.32rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21{display:flex;align-items:center}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21 span{color:#ff5a56}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionNum_15a1l_21 ._pointName_15a1l_28{padding-right:.16rem;color:#1cacf1;font-weight:600;font-size:.37333rem;max-width:4rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38{display:flex;align-items:center}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38 span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:4.26667rem}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._questionType_15a1l_38 i{margin-right:.16rem;display:inline-block;width:.53333rem;height:.53333rem;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAKKADAAQAAAABAAAAKAAAAAB65masAAACuElEQVRYCe2YT2sTURDAZzabFjSxiCC1qcFqS7BYQWkEwZv9AB4qeBb8Ar0Lgne/QMVeRCT05LmlHoQiVdRW7MFKxZpqKR40pWDi7jiz8TWb7L50s7u2he5C2Hnz95d5u499D2+WSik4wJdxgNkcNLMV8H5f5ciAsTUGSF2tNhkTYqVmwZfb5VPLfnad7lHu2/l0CvJIlPX1Iayu2pmZu+vZbbfdA1hIVWYZo+h2apKJoJv7XjpdLtuGMfmxlnnQmlT5y58dSm9NGLZ9h3U5IGXxuSMB114AyF51W32muA2cO5ILcuF7BfPX26n+jeFmE4DoCmblnfiwLddq9x97a/sA+odqtQRnjxrW3MP+zQHlI7LogGhHp2yd3qMDSkWiE8ew9kQVd2TWqXGUu+cZDJ+Mio/z6zecePJOVdi8MQICpG265YBgWBxvXKyAiHilXqLd6+qFaKfZATxzaeRaCqkXNsvt/NvaCKFPHHjFCH2du3xh3CL8/vnN0gtJ4rwkQ6MXJ0yDniPC09CZOZAXYVN+kXIwg7AIk+RxkhFZPDURHxyDUw2P19k+TAPYf6Jw8sIgTP86GCmTCu7JA2R66z+RY7riWQcFBl0fRW45Imh8gBFBdOEJoK4zQfVJB4N2SueXdFDXmaD6pINBO6XzSzqo60xQfdLBoJ3S+R2iDlq/G01wyw1tKCnS53lTxZ9rAGvzrOINicgxXfEBClj5ZUxYjTSeZ/Cr2dOw7rHkV9vTwcnjRRis/oAU2HuKZ/EGc6XLe1qiAKuKpsb7ieXuk2q4n3eHyZliApziPfHGftK4awuLMInO6eCn1+/nWA54hudOBTA4OjLPm1j/A0/EhZVXS00Hks3Ru4/UFO/uqfGwqnjdMGmMza1HxlW7hjOasMDqyICri4vbXO1Z4IodOnqWmQ7j/7v7Xwtnr/nyIvR9AAAAAElFTkSuQmCC) no-repeat center;background-size:contain}._unitSwipe_15a1l_9 ._questionTitle_15a1l_12 ._controlBtn_15a1l_56{padding:0 .32rem}._wapList_15a1l_59{width:1.17333rem;height:1.30667rem;flex-shrink:0;margin-left:.48rem}._btnSection_15a1l_65{background-color:#fff;padding-top:.53333rem;--van-button-default-height: 1.30667rem}._btnSection_15a1l_65 ._prevBtn_15a1l_70,._btnSection_15a1l_65 ._nextBtn_15a1l_71,._btnSection_15a1l_65 ._activePrevBtn_15a1l_72{width:3.30667rem!important;border:none;color:#fff}._btnSection_15a1l_65 ._prevBtn_15a1l_70{background:url("+new URL("prev_btn_bg-b6b2b4bd.png",n.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 ._activePrevBtn_15a1l_72{background:url("+new URL("next_btn_bg-efb37605.png",n.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 ._nextBtn_15a1l_71{background:url("+new URL("next_btn_bg-efb37605.png",n.meta.url).href+") no-repeat center;background-size:contain}._btnSection_15a1l_65 .van-button--disabled{color:#587c98}._btnSection_15a1l_65 .van-button--disabled:before{opacity:.2!important}._right_15a1l_95{color:#14c295}._error_15a1l_98{color:#ff5a56}._primary_15a1l_101{color:#1cacf1}\n",document.head.appendChild(j);const z="_unitDetail_15a1l_1",O="_unitSwipe_15a1l_9",K="_questionTitle_15a1l_12",M="_questionNum_15a1l_21",H="_pointName_15a1l_28",X="_controlBtn_15a1l_56",Q="_wapList_15a1l_59",Z="_btnSection_15a1l_65",D="_prevBtn_15a1l_70",G="_nextBtn_15a1l_71",W="_activePrevBtn_15a1l_72",V="_right_15a1l_95",Y="_error_15a1l_98",J="_primary_15a1l_101";e("default",t({name:"unit-detail",setup(){const e=i(),n=a(),t=o(),j=s({background:"transparent",color:"#fff",visiableError:!1,visiableAnswer:!1,id:e.query.id,currentIndex:0,questionList:[],page:1,rows:50,total:0,isFinish:!1,visiableInfo:{show:!1,operationType:"RESULT",type:"DEFAULT",content:"",showCancelButton:!1,confirmButtonText:"",cancelButtonText:"",title:"",graspItem:{}},nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0}}),{counter:$,resume:ee,pause:ne}=B(1e3,{controls:!0}),te=async e=>{try{const{data:n}=await w.post("/edu-app/studentUnitExamination/errorEdition",{data:{page:j.page,rows:j.rows,maxStudentExaminationErrorEditionId:e}}),t=n||{};j.total=t.total||0,j.isFinish=!(t.current{e.showAnalysis=!1,e.grasp=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),j.questionList.push(...t.records||[])}catch{}};l((()=>j.currentIndex),(()=>{if(j.currentIndex+3>=j.questionList.length&&!j.isFinish){const e=j.questionList[j.questionList.length-1];j.page=j.page+1,te(e.id)}}));const ie=async e=>{e.grasp||(j.visiableInfo.show=!0,j.visiableInfo.title="确定掌握此题?",j.visiableInfo.showCancelButton=!0,j.visiableInfo.operationType="GRASP",j.visiableInfo.cancelButtonText="取消",j.visiableInfo.confirmButtonText="确定",j.visiableInfo.content="你确定已掌握该题知识要点,此题将移除你的错题集。",j.visiableInfo.graspItem=e,console.log(j.total,"toa"),j.total<=1&&pe())},ae=async()=>{try{const n=j.questionList||[];let i={};n.forEach(((e,n)=>{n===j.currentIndex&&(i={questionId:e.id,details:e.userAnswer||[]})}));const{data:a}=await w.post("/edu-app/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:i});if(n.forEach(((e,n)=>{n===j.currentIndex&&(j.answerAnalysis=e.answerAnalysis,j.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=a)})),j.questionList.length===j.currentIndex+1)return h.emit("unitAudioStop"),j.visiableInfo.show=!0,j.visiableInfo.title="练习完成",j.visiableInfo.showCancelButton=!0,j.visiableInfo.operationType="CONTINUE",j.visiableInfo.cancelButtonText="再等等",j.visiableInfo.confirmButtonText="确认完成",j.visiableInfo.content="确认本次练习的题目都完成了吗?",void pe();var e;a?null===(e=t.value)||void 0===e||e.next():j.visiableError=!0}catch{}},oe=r((()=>{const e=j.questionList||[];let n=0,t=0,i=0;return e.forEach((e=>{e.showAnalysis&&(n+=1,e.analysis.userResult?t+=1:i+=1)})),{count:n,passCount:t,noPassCount:i}}));let se=0;const le=(e=!0)=>{b((()=>{e&&window.scrollTo(0,0),setTimeout((()=>{var n;const t=null===(n=document.querySelectorAll(".van-swipe-item")[j.currentIndex])||void 0===n?void 0:n.querySelector(".swipe-item-question"),i=null==t?void 0:t.querySelectorAll(".answerTitleImg img");let a=!0;null==i||i.forEach((e=>{e.complete||(a=!1)})),!a&&se<3&&setTimeout((()=>{se+=1,le(e)}),300),a&&(se=0);const o=g(t);j.swipeHeight=o.height}),100)}))},re=()=>{"RESULT"===j.visiableInfo.operationType?(j.visiableInfo.show=!1,n.back(),n.back()):"BACK"===j.visiableInfo.operationType?(j.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ce,!1)):"CONTINUE"===j.visiableInfo.operationType?de():"GRASP"===j.visiableInfo.operationType&&(async()=>{try{if(j.visiableInfo.show=!1,await w.get("/edu-app/studentExaminationErrorEdition/del",{hideLoading:!1,params:{questionId:j.visiableInfo.graspItem.id}}),j.visiableInfo.graspItem.grasp=!0,h.emit("unitAudioStop"),j.total<=1)return n.back(),void n.back();if(j.total>j.currentIndex+1){const e=j.questionList.findIndex((e=>e.studentExaminationErrorEditionId===j.visiableInfo.graspItem.studentExaminationErrorEditionId));return j.questionList.splice(e,1),j.total-=1,void le()}if(j.total==j.currentIndex+1){const e=j.questionList.findIndex((e=>e.studentExaminationErrorEditionId===j.visiableInfo.graspItem.studentExaminationErrorEditionId));return j.questionList.splice(e,1),j.total-=1,j.currentIndex-=1,void le()}}catch{}})()},ue=async()=>{const e=j.visiableInfo.operationType;"RESULT"===e||("BACK"===e?(j.visiableInfo.show=!1,pe()):"CONTINUE"===e?j.visiableInfo.show=!1:"GRASP"===e&&(j.visiableInfo.show=!1,window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ce,!1)))},de=()=>{const e=oe.value;let n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));const t=$.value,i=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),a=t%60>=10?t%60:"0"+t%60;j.overResult={time:i+":"+a,questionLength:e.count,errorLength:e.noPassCount,rate:n},ne(),$.value=0,j.visiableInfo.show=!0,j.visiableInfo.title="已完成",j.visiableInfo.showCancelButton=!1,j.visiableInfo.operationType="RESULT",j.visiableInfo.confirmButtonText="确认",j.visiableInfo.content=`
您已完成本次测试,答对${e.passCount},答错${e.count-e.passCount},正确率${n}%~
`},ce=()=>{const e=oe.value;j.visiableInfo.show=!0,j.visiableInfo.title="确认退出吗?",j.visiableInfo.showCancelButton=!0,j.visiableInfo.operationType="BACK",j.visiableInfo.cancelButtonText="退出",j.visiableInfo.confirmButtonText="继续",j.visiableInfo.content=`您已经完成${e.passCount+e.noPassCount}道题了,继续做题可以巩固所学知识哦~`,h.emit("unitAudioStop")},pe=()=>{window.removeEventListener("popstate",ce,!1),n.back()};return u((async()=>{R(document,"scroll",(()=>{const{y:e}=F();e.value>52?(j.background="#fff",j.color="#323333"):(j.background="transparent",j.color="#fff")})),await te(),le(),window.history.pushState(null,"",document.URL),window.addEventListener("popstate",ce,!1)})),d((()=>{h.emit("unitAudioStop")})),()=>{let e;return c("div",{class:z},[c(L,{position:"top"},{default:()=>[c(p,{border:!1,background:j.background,color:j.color},null)]}),c(U,{loop:!1,showIndicators:!1,ref:t,duration:300,touchable:!1,class:O,style:{paddingBottom:"12px"},lazyRender:!0,height:j.swipeHeight,onChange:e=>{h.emit("unitAudioStop"),j.currentIndex=e,le()}},(n=e=j.questionList.map(((e,n)=>c(N,null,{default:()=>[c("div",{class:"swipe-item-question"},[e.questionTypeCode===m.RADIO&&c(y,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>c("div",{class:K},[c("div",{class:M},[c("p",{class:H},[e.knowledgePointName]),c("span",null,[j.currentIndex+1]),A("/"),j.total]),c(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:X,disabled:e.grasp,onClick:()=>ie(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===m.CHECKBOX&&c(y,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>c("div",{class:K},[c("div",{class:M},[c("p",{class:H},[e.knowledgePointName]),c("span",null,[j.currentIndex+1]),A("/"),j.total]),c(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:X,disabled:e.grasp,onClick:()=>ie(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===m.SORT&&c(I,{value:e.userAnswer,"onUpdate:value":[n=>e.userAnswer=n,()=>{const n=!(e.userAnswer&&e.userAnswer.length>0);le(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>c("div",{class:K},[c("div",{class:M},[c("p",{class:H},[e.knowledgePointName]),c("span",null,[j.currentIndex+1]),A("/"),j.total]),c(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:X,disabled:e.grasp,onClick:()=>ie(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===m.LINK&&c(x,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>c("div",{class:K},[c("div",{class:M},[c("p",{class:H},[e.knowledgePointName]),c("span",null,[j.currentIndex+1]),A("/"),j.total]),c(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",class:X,disabled:e.grasp,onClick:()=>ie(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])}),e.questionTypeCode===m.PLAY&&c(C,{value:e.userAnswer,"onUpdate:value":n=>e.userAnswer=n,data:e,index:n+1,unitId:j.id,showAnalysis:e.showAnalysis,analysis:e.analysis},{title:()=>c("div",{class:K},[c("div",{class:M},[c("span",null,[j.currentIndex+1]),A("/"),j.total]),c(_,{round:!0,plain:!0,size:"mini",color:e.grasp?"#FF5A56":"#1CACF1",disabled:e.grasp,class:X,onClick:()=>ie(e)},{default:()=>[e.grasp?"已掌握此题":"掌握此题"]})])})])]}))),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!v(n)?e:{default:()=>[e]})),c(L,{position:"bottom"},{default:()=>[c("div",{class:["btnGroup btnMore",Z]},[c(_,{round:!0,block:!0,class:j.currentIndex>0?W:D,disabled:!(j.currentIndex>0),onClick:()=>{var e;null===(e=t.value)||void 0===e||e.prev()}},{default:()=>[A("上一题")]}),c(_,{block:!0,round:!0,class:G,onClick:ae,loading:j.nextStatus,disabled:j.nextStatus},{default:()=>[j.questionList.length===j.currentIndex+1?"提交":"下一题"]}),c(P,{src:T,class:[Q,"van-haptics-feedback"],onClick:()=>j.visiableAnswer=!0},null)])]}),c(q,{show:j.visiableAnswer,"onUpdate:show":e=>j.visiableAnswer=e,title:"题目列表",safeAreaInsetBottom:!0},{default:()=>[c(E,{value:j.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#1CACF1"},{text:"答错",color:"#FF8486"},{text:"未答",color:"#EAEAEA"}],isFinish:j.isFinish,onSelect:e=>{var n;null===(n=t.value)||void 0===n||n.swipeTo(e,{immediate:!0}),j.visiableAnswer=!1},onLoadMore:()=>{const e=j.questionList[j.questionList.length-1];j.page=j.page+1,te(e.id)}},null)]}),c(f,{show:j.visiableError,"onUpdate:show":e=>j.visiableError=e,style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:()=>[c(k,{onClose:()=>j.visiableError=!1,answerAnalysis:j.answerAnalysis,questionTypeCode:j.questionTypeCode,onConform:()=>{var e;null===(e=t.value)||void 0===e||e.next(),j.answerAnalysis=""}},null)]}),c(f,{show:j.visiableInfo.show,"onUpdate:show":e=>j.visiableInfo.show=e,closeOnClickOverlay:!1,style:{background:"transparent",width:"100%",maxWidth:"100%",transform:"translateY(-55%)"}},{default:()=>[c(S,{title:j.visiableInfo.title,showCancelButton:j.visiableInfo.showCancelButton,cancelButtonText:j.visiableInfo.cancelButtonText,confirmButtonText:j.visiableInfo.confirmButtonText,status:j.visiableInfo.type,content:j.visiableInfo.content,contentHtml:!0,onConform:re,onClose:ue},null)]})]);var n}}}))}}}));