!function(){function e(e,n,t,r,i,s,a){try{var o=e[s](a),u=o.value}catch(l){return void t(l)}o.done?n(u):Promise.resolve(u).then(r,i)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(i,s){var a=n.apply(t,r);function o(n){e(a,i,s,o,u,"next",n)}function u(n){e(a,i,s,o,u,"throw",n)}o(void 0)}))}}var t=document.createElement("style");t.innerHTML="._unitDetail_asj8n_1{overflow:hidden}._unitSection_asj8n_4{margin:.32rem .34667rem;padding:.34667rem .4rem;width:auto;overflow:hidden;border-radius:.26667rem}._unitSection_asj8n_4 ._unitTitle_asj8n_11{font-size:.42667rem;font-weight:500;color:#333}._unitSection_asj8n_4 .van-cell__value{flex:0 auto}._unitSection_asj8n_4 ._unitCount_asj8n_19{padding-top:.26667rem;padding-left:.21333rem;display:flex;align-items:center;justify-content:space-between}._unitSection_asj8n_4 ._countSection_asj8n_26{display:flex;align-items:center;font-size:.32rem;line-height:.45333rem;color:#333;flex-direction:column}._unitSection_asj8n_4 ._countSection_asj8n_26 ._nums_asj8n_34{font-family:DIAN;font-weight:700;color:#333;font-size:.53333rem;padding-bottom:.08rem}._unitSection_asj8n_4 ._countSection_asj8n_26+._countSection_asj8n_26{margin-left:.66667rem}._wapList_asj8n_44{width:1.17333rem;height:1.17333rem;flex-shrink:0;margin-left:.48rem}._practiceResult_asj8n_50 ._practiceTitle_asj8n_50{font-size:.53333rem;font-weight:600;color:#191919;line-height:.74667rem}._practiceResult_asj8n_50 ._practiceRate_asj8n_56{padding-top:.4rem;font-size:1.6rem;font-weight:700;color:#f67146;line-height:1.86667rem}._practiceResult_asj8n_50 .van-grid{padding-top:.26667rem;padding-bottom:.26667rem;margin-left:5%;width:90%}._practiceResult_asj8n_50 .van-grid-item__content{background-color:transparent}._practiceResult_asj8n_50 ._title_asj8n_72{font-size:.64rem;font-weight:700;color:#333;line-height:.74667rem}._practiceResult_asj8n_50 ._name_asj8n_78{padding-top:.08rem;font-size:.37333rem;color:#777;line-height:.53333rem}._practiceResult_asj8n_50 ._practiceTips_asj8n_84{margin-left:10%;width:80%;background:linear-gradient(135deg,#fff4da 0%,#ffe6c4 100%);border-radius:.26667rem;padding:.37333rem 0;text-align:center;font-size:.4rem;font-weight:500;color:#703a17;line-height:.56rem;letter-spacing:.02667rem}._popupResult_1naxw_1{padding:.53333rem .53333rem .66667rem;color:#333;font-size:.4rem}._popupResult_1naxw_1 ._resultTitle_1naxw_6{display:flex;align-items:center;justify-content:center;text-align:center;font-size:.48rem;font-weight:600;color:#333}._popupResult_1naxw_1 ._resultTitle_1naxw_6 ._titleImg_1naxw_15{width:.48rem;height:.48rem;margin-right:.16rem}._popupResult_1naxw_1 ._result_1naxw_6{margin-top:.53333rem;padding:.32rem;background:#f6f6f6;border-radius:.10667rem;font-size:.42667rem;font-weight:500;color:#333}._popupResult_1naxw_1 ._result_1naxw_6 ._yes_1naxw_29{color:#4593f4;margin-right:.53333rem}._popupResult_1naxw_1 ._result_1naxw_6 ._no_1naxw_33{color:#f44541}._popupResult_1naxw_1 ._resultContent_1naxw_36{padding:.53333rem 0 .8rem;font-size:.4rem;color:#333;text-align:justify;line-height:.61333rem}._popupResult_1naxw_1 ._resultContent_1naxw_36 span{font-weight:600}\n",document.head.appendChild(t),System.register(["./index-legacy.47bc1690.js","./index-legacy.017de303.js","./index-legacy.697c501a.js","./index-legacy.df49868a.js","./index-legacy.0ebc214d.js","./index-legacy.c5f5f9f7.js","./index-legacy.318f6df0.js","./index-legacy.92a01198.js","./index-legacy.18044794.js","./index-legacy.41022c63.js","./index-legacy.4df1d4ab.js","./index-legacy.453fd926.js"],(function(e){"use strict";var t,r,i,s,a,o,u,l,c,d,p,f,_,m,w,g,v,h,y,x,b,j,A,C,R,S,T,q,k,I,L,E,B,U,z,P,O,M;return{setters:[function(e){t=e.d,r=e.c,i=e.q,s=e.B,a=e.ah,o=e.ag,u=e.R,l=e.r,c=e.y,d=e.$,p=e.g,f=e.b3,_=e.aj,m=e.P,w=e.al,g=e.m,v=e._,h=e.an},function(e){y=e.a,x=e.e,b=e.Q,j=e.C,A=e.D,C=e.K,R=e.P,S=e.i,T=e.A},function(e){q=e.O},function(e){k=e.O},function(e){I=e.I},function(e){L=e.R},function(e){E=e.u},function(e){B=e.C},function(e){U=e.S,z=e.a},function(e){P=e.A},function(e){O=e.G,M=e.a},function(){}],execute:function(){var D="_unitDetail_asj8n_1",H="_unitSection_asj8n_4",F="_unitTitle_asj8n_11",K="_unitCount_asj8n_19",N="_countSection_asj8n_26",G="_nums_asj8n_34",Q="_wapList_asj8n_44",Y="_practiceResult_asj8n_50",X="_practiceTitle_asj8n_50",$="_practiceRate_asj8n_56",J="_title_asj8n_72",V="_name_asj8n_78",W="_practiceTips_asj8n_84",Z={popupResult:"_popupResult_1naxw_1",resultTitle:"_resultTitle_1naxw_6",titleImg:"_titleImg_1naxw_15",result:"_result_1naxw_6",yes:"_yes_1naxw_29",no:"_no_1naxw_33",resultContent:"_resultContent_1naxw_36"},ee=t({name:"result-mode",props:{confirmButtonText:{type:String,default:"我知道了"},answerAnalysis:{type:String,default:""},questionTypeCode:{type:String,default:""}},emits:["close","conform"],setup:function(e,n){var t=n.emit;return function(){return r("div",{class:Z.popupResult},[r("div",{class:Z.resultTitle},[r(I,{src:y,class:Z.titleImg},null),"PLAY"===e.questionTypeCode?"不合格!":"回答错误!"]),r("div",{class:Z.resultContent},[r("span",null,[i("答案解析:")]),e.answerAnalysis]),r(s,{type:"primary",round:!0,class:Z.btn,block:!0,onClick:function(){t("conform"),t("close")}},{default:function(){return[e.confirmButtonText]}})])}}});e("default",t({name:"unit-detail",setup:function(){var e=a(),t=o();u();var y=u(),Z=l({examId:e.query.examId,name:e.query.name,courseTypeCode:e.query.courseTypeCode,visiableError:!1,visiableAnswer:!1,visiableResult:!1,id:e.query.id,currentIndex:0,questionList:[],visiableSure:!1,resultInfo:{},resultStatusType:"SUCCESS",visiableExam:!1,nextStatus:!1,swipeHeight:"auto",answerAnalysis:"",questionTypeCode:"",overResult:{time:"00:00",questionLength:0,errorLength:0,rate:0},knowledgelist:[],quitStatus:!1,dialogMessage:"",dialogStatus:!1}),ne=E(1e3,{controls:!0}),te=ne.counter,re=ne.resume,ie=ne.pause,se=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t,r;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.post("/api-student/examinationQuestion/randomPage",{data:{page:1,row:50,categoryId:Z.id}});case 3:n=e.sent,t=n.data,(r=t||[]).forEach((function(e){e.showAnalysis=!1,e.analysis={message:e.answerAnalysis,topic:!0,userResult:!1},e.userAnswer=[]})),Z.questionList=r,e.next=12;break;case 10:e.prev=10,e.t0=e.catch(0);case 12:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,g.post("/api-student/unitExamination/queryKnowledgePoint",{requestType:"form",data:{unitExaminationId:Z.examId}});case 3:n=e.sent,t=n.data,Z.knowledgelist=t.lists||[],e.next=10;break;case 8:e.prev=8,e.t0=e.catch(0);case 10:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=n(regeneratorRuntime.mark((function e(){var n,t,r,i,s;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=Z.questionList||[],t={},n.forEach((function(e,n){n===Z.currentIndex&&(t={questionId:e.id,details:e.userAnswer||[]})})),e.next=6,g.post("/api-student/studentUnitExamination/submitTrainingAnswer",{hideLoading:!0,data:t});case 6:if(r=e.sent,i=r.data,n.forEach((function(e,n){n===Z.currentIndex&&(Z.answerAnalysis=e.answerAnalysis,Z.questionTypeCode=e.questionTypeCode,e.showAnalysis=!0,e.analysis.userResult=i)})),Z.questionList.length!==Z.currentIndex+1){e.next=13;break}return x.emit("unitAudioStop"),Z.visiableSure=!0,e.abrupt("return");case 13:i?null===(s=y.value)||void 0===s||s.next():Z.visiableError=!0,e.next=18;break;case 16:e.prev=16,e.t0=e.catch(0);case 18:case"end":return e.stop()}}),e,null,[[0,16]])})));return function(){return e.apply(this,arguments)}}(),ue=c((function(){var e=Z.questionList||[],n=0,t=0,r=0;return e.forEach((function(e){e.showAnalysis&&(n+=1,e.analysis.userResult?t+=1:r+=1)})),{count:n,passCount:t,noPassCount:r}})),le=0,ce=function e(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];v((function(){n&&window.scrollTo(0,0),setTimeout((function(){var t,r=null===(t=document.querySelectorAll(".van-swipe-item")[Z.currentIndex])||void 0===t?void 0:t.querySelector(".swipe-item-question");console.log("🚀 ~ setTimeout ~ currentItemDom",r);var i=r.querySelectorAll(".answerTitleImg img"),s=!0;i.forEach((function(e){console.log(e.complete),e.complete||(s=!1)})),!s&&le<3&&setTimeout((function(){le+=1,e(n)}),300),s&&(le=0);var a=h(r);Z.swipeHeight=a.height}),100)}))},de=function(){var e=ue.value,n=0;e.count>0&&(n=Math.floor(e.passCount/e.count*100));var t=te.value,r=Math.floor(t/60)>=10?Math.floor(t/60):"0"+Math.floor(t/60),i=t%60>=10?t%60:"0"+t%60;Z.overResult={time:r+":"+i,questionLength:e.count,errorLength:e.noPassCount,rate:n},ie(),te.value=0,Z.visiableResult=!0},pe=function(){var e=n(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z.questionList=[],e.next=3,se();case 3:setTimeout(n(regeneratorRuntime.mark((function e(){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null===(n=y.value)||void 0===n||n.swipeTo(0,{immediate:!0}),Z.swipeHeight="auto",Z.answerAnalysis="",Z.overResult={time:"00:00",questionLength:0,errorLength:0,rate:0},Z.visiableResult=!1,re(),ce();case 7:case"end":return e.stop()}}),e)}))),100);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(){var e=Z.knowledgelist||[],n=e.findIndex((function(e){return e.id===Z.id}));console.log("🚀 ~ file: index.tsx:249 ~ onConfirmResult ~ knownleIndex",n);var t={};t=n+1>=e.length||n<0?e[0]:e[n+1],Z.id=t.id,Z.visiableResult=!1,Z.currentIndex=0,pe()},_e=function(){Z.quitStatus=!0,x.emit("unitAudioStop")},me=function(){window.removeEventListener("popstate",_e,!1),t.back()};return d(n(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se();case 2:return e.next=4,ae();case 4:if(ce(),p.user.data.vipMember){e.next=10;break}return ie(),Z.dialogStatus=!0,Z.dialogMessage="您暂未开通团练宝,请开通后使用",e.abrupt("return");case 10:window.history.pushState(null,"",document.URL),window.addEventListener("popstate",_e,!1);case 12:case"end":return e.stop()}}),e)})))),f((function(){x.emit("unitAudioStop")})),function(){var e,n;return r("div",{class:D},[r(q,{position:"top"},{default:function(){return[r(_,null,{right:function(){return r("span",{style:"color: var(--van-primary-color)",onClick:function(){x.emit("unitAudioStop"),Z.visiableSure=!0}},[i("结束练习")])}})]}}),r(B,{center:!0,class:H,border:!1},{title:function(){return r("div",{class:[F]},[Z.name])},value:function(){return r("div",{class:K},[r("div",{class:N},[r("span",{class:G},[ue.value.passCount]),r("span",null,[i("答对")])]),r("div",{class:N},[r("span",{class:G,style:{color:"#F44541"}},[ue.value.noPassCount]),r("span",null,[i("答错")])])])}}),r(U,{loop:!1,showIndicators:!1,ref:y,duration:300,touchable:!1,style:{paddingBottom:"12px"},lazyRender:!0,height:Z.swipeHeight,onChange:function(e){x.emit("unitAudioStop"),Z.currentIndex=e,ce()}},(n=e=Z.questionList.map((function(e,n){return r(z,null,{default:function(){return[r("div",{class:"swipe-item-question"},[e.questionTypeCode===b.RADIO&&r(j,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},index:n+1,data:e,type:"radio",showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===b.CHECKBOX&&r(j,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},index:n+1,data:e,type:"checkbox",showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===b.SORT&&r(A,{value:e.userAnswer,"onUpdate:value":[function(n){return e.userAnswer=n},function(){var n=!(e.userAnswer&&e.userAnswer.length>0);ce(n)}],data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===b.LINK&&r(C,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},data:e,index:n+1,showAnalysis:e.showAnalysis,analysis:e.analysis},null),e.questionTypeCode===b.PLAY&&r(R,{value:e.userAnswer,"onUpdate:value":function(n){return e.userAnswer=n},data:e,index:n+1,unitId:Z.id,showAnalysis:e.showAnalysis,analysis:e.analysis},null)])]}})})),"function"==typeof n||"[object Object]"===Object.prototype.toString.call(n)&&!w(n)?e:{default:function(){return[e]}})),r(q,{position:"bottom",background:"white"},{default:function(){return[r("div",{class:["btnGroup btnMore"]},[Z.currentIndex>0&&r(s,{round:!0,block:!0,type:"primary",plain:!0,onClick:function(){var e;null===(e=y.value)||void 0===e||e.prev()}},{default:function(){return[i("上一题")]}}),r(s,{block:!0,round:!0,type:"primary",onClick:oe,loading:Z.nextStatus,disabled:Z.nextStatus},{default:function(){return[i("提交")]}}),r(I,{src:S,class:[Q,"van-haptics-feedback"],onClick:function(){return Z.visiableAnswer=!0}},null)])]}}),r(P,{show:Z.visiableAnswer,"onUpdate:show":function(e){return Z.visiableAnswer=e},title:"题目列表",safeAreaInsetBottom:!0},{default:function(){return[r(T,{value:Z.questionList,lookType:"PRACTICE",statusList:[{text:"答对",color:"#71B0FF"},{text:"答错",color:"#FF8486"}],onSelect:function(e){var n;null===(n=y.value)||void 0===n||n.swipeTo(e,{immediate:!0}),Z.visiableAnswer=!1}},null)]}}),r(m,{show:Z.visiableError,"onUpdate:show":function(e){return Z.visiableError=e},style:{width:"90%"},round:!0,closeOnClickOverlay:!1},{default:function(){return[r(ee,{onClose:function(){return Z.visiableError=!1},answerAnalysis:Z.answerAnalysis,questionTypeCode:Z.questionTypeCode,onConform:function(){var e;null===(e=y.value)||void 0===e||e.next(),Z.answerAnalysis=""}},null)]}}),r(m,{show:Z.visiableResult,"onUpdate:show":function(e){return Z.visiableResult=e},closeOnClickOverlay:!1,style:{background:"transparent",width:"96%"}},{default:function(){return[r(L,{status:"PRACTICE",confirmButtonText:"下一个考点",cancelButtonText:"继续练习本考点",onClose:pe,onConform:fe},{content:function(){return r("div",{class:Y},[r("div",{class:X},[i("本次练习正确率")]),r("div",{class:$},[Z.overResult.rate,i("%")]),r(O,{border:!1,columnNum:3},{default:function(){return[r(M,null,{default:function(){return[r("p",{class:J},[Z.overResult.time]),r("p",{class:V},[i("练习时长")])]}}),r(M,null,{default:function(){return[r("p",{class:[J]},[0|Z.overResult.questionLength]),r("p",{class:V},[i("答题数")])]}}),r(M,null,{default:function(){return[r("p",{class:J},[0|Z.overResult.errorLength]),r("p",{class:V},[i("错题数")])]}})]}}),Z.overResult.rate>=100?r("div",{class:W},[i("你真棒!"),r("br",null,null),i("本知识点你已经完全掌握啦!")]):r("div",{class:W},[i("继续努力!"),r("br",null,null),i("争取在测验中获得高分!")])])}})]}}),r(k,{show:Z.visiableSure,"onUpdate:show":function(e){return Z.visiableSure=e},title:"练习完成",message:"确认本次练习的题目都完成了吗?",messageAlign:"left",showCancelButton:!0,cancelButtonText:"再等等",confirmButtonText:"确认完成",onConfirm:de},null),r(k,{show:Z.quitStatus,"onUpdate:show":function(e){return Z.quitStatus=e},title:"提示",message:"您是否退出本次练习?",showCancelButton:!0,cancelButtonText:"取消",onCancel:function(){window.history.pushState(null,"",document.URL),window.addEventListener("popstate",_e,!1)},confirmButtonText:"确认退出",onConfirm:me},null),r(k,{message:Z.dialogMessage,show:Z.dialogStatus,"onUpdate:show":function(e){return Z.dialogStatus=e},showCancelButton:!0,cancelButtonText:"返回",onCancel:function(){t.back()},confirmButtonText:"立即开通",onConfirm:function(){t.push("/memberCenter")}},null)])}}}))}}}))}();