You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__Lists__Exerc...

1 line
38 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7883,6270],{88761:function(e,n,s){var t=s(79800),i=s.n(t),a=s(59301),r=s(32313),l=(s(48136),s(74135)),o=s(62957),c=s(37712),u=(0,a.forwardRef)((function(e,n){var s=e.callback,t=e.width,u=e.onChange,d=e.disabled,v=e.readOnly,_=e.type,m=void 0===_?"":_,x=e.value,h=void 0===x?"":x,f=e.style,p=void 0===f?{}:f,j=(0,a.useRef)(),g=(0,a.useRef)(),w=(0,a.useState)(0),y=i()(w,2),b=y[0],q=y[1],N=(0,a.useState)(0),C=i()(N,2),k=C[0],Z=C[1],P=(0,a.useState)(!1),S=i()(P,2),E=S[0],F=S[1],H=function(){var e=document.createElement("div");e.innerHTML=j.current.getValue();var n=e.innerText;return s&&s(n),n};(0,a.useImperativeHandle)(n,(function(){return{getData:H}}));var I=function(e,n,s,t){var i=document.body.clientHeight,a=document.body.clientWidth;return!(e<20&&s>e||e>a-20&&s<e||n<20&&t>n||n>i-20&&t<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,a.useEffect)((function(){E&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],n=window.innerWidth/2-e.offsetWidth/2,s=window.innerHeight/2-e.offsetHeight/2;q(n),Z(s)}),0)}),[E]);return(0,c.jsxs)("div",{style:p,children:[(0,c.jsx)("div",{style:{width:t||"100%",position:"relative"},className:"".concat(r.Z.mathFillWrap," ").concat(d||v?"cursorDefault":""),onClick:function(){d||v||F(!0)},children:(0,c.jsx)("math-field",{disabled:d,locale:"zh_cn",class:"".concat(r.Z.mathField," ").concat(m),readOnly:v,placeholder:"请输入公式",ref:j,style:{width:"100%",fontSize:h?18:14},value:h||""})}),(0,c.jsx)(o.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:b,top:k},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-b,s=e.clientY-k;document.body.onmousemove=function(e){var t=e.clientX-n,i=e.clientY-s,a=document.getElementsByClassName("markdown-popup-form")[0],r=window.innerWidth-a.offsetWidth,l=window.innerHeight-a.offsetHeight;t=Math.max(0,Math.min(t,r)),i=Math.max(0,Math.min(i,l)),I(e.clientX,e.clientY,n,s)&&(q(t),Z(i))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:E,onOk:function(){var e=g.current.getData();j.current.setValue(e),u(e),F(!1)},onCancel:function(){F(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(l.Z,{value:h,ref:g,onChange:u,showSaveButton:!1})})]})}));n.Z=u},90165:function(e,n,s){s.d(n,{Q:function(){return q},Z:function(){return N}});var t=s(7557),i=s.n(t),a=s(41498),r=s.n(a),l=s(79800),o=s.n(l),c=s(59301),u="tags___kRRoe",d="text___IyyEa",v="tagWrap___v63mB",_="c___mZMPq",m="cpp___eaTie",x="java___gL98T",h="python___eNRkk",f="edit___tbVu0",p=s(92310),j=s.n(p),g=s(62957),w=s(6767),y=s(62673),b=s(37712),q=function(e){var n=e.title,s=void 0===n?"设置编程语言":n,t=e.dataSource,a=void 0===t?[]:t,l=e.visible,u=e.setVisible,d=e.tip,v=e.onOk,_=(0,c.useState)([]),m=o()(_,2),x=m[0],h=m[1],f=(0,c.useState)(!1),p=o()(f,2),j=p[0],q=p[1];return(0,c.useEffect)((function(){l&&h(a)}),[l]),(0,b.jsxs)(g.Z,{centered:!0,open:l,title:s,confirmLoading:j,width:564,onOk:r()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x.length){e.next=3;break}return w.ZP.warning("请选择编程语言"),e.abrupt("return");case 3:return q(!0),e.next=6,v(x);case 6:q(!1);case 7:case"end":return e.stop()}}),e)}))),onCancel:function(){return u(!1)},children:[!!d&&(0,b.jsx)("div",{className:"c-grey-666 font16 mb10",children:d}),(0,b.jsx)("div",{style:{background:"#F6F7F9",padding:"20px 20px 20px 26px"},children:(0,b.jsx)(y.Z.Group,{value:x,options:[{label:"C语言",value:"C"},{label:"C++语言",value:"C++",style:{marginLeft:30}},{label:"Java语言",value:"Java",style:{marginLeft:30}},{label:"Python语言",value:"Python",style:{marginLeft:30}}],onChange:function(e){h(e)}})})]})},N=function(e){var n=e.title,s=void 0===n?"允许编程的语言":n,t=e.className,i=e.style,a=void 0===i?{}:i,r=e.onEdit,l=e.dataSource,o=void 0===l?[]:l,p={C:(0,b.jsx)("div",{className:_,children:"C"}),"C++":(0,b.jsx)("div",{className:m,children:"C++"}),Java:(0,b.jsx)("div",{className:x,children:"Java"}),Python:(0,b.jsx)("div",{className:h,children:"Python"})};return(0,b.jsxs)("div",{className:j()(u,t),style:a,children:[!!s&&(0,b.jsx)("div",{className:d,children:s}),(0,b.jsx)("div",{className:v,children:null==o?void 0:o.map((function(e){return(0,b.jsx)(c.Fragment,{children:p[e]},e)}))}),!!r&&(0,b.jsx)("div",{onClick:r,className:"iconfont icon-bianji_Hover ".concat(f)})]})}},92303:function(e,n,s){s.d(n,{jM:function(){return B},ZP:function(){return J},g0:function(){return G},rK:function(){return R},P1:function(){return V},PQ:function(){return Y},JE:function(){return A},$C:function(){return W},eS:function(){return O}});var t=s(7557),i=s.n(t),a=s(41498),r=s.n(a),l=s(37205),o=s.n(l),c=s(82242),u=s.n(c),d=s(79800),v=s.n(d),_=s(59301),m=s(47889),x=s(77019),h=s(62673),f=s(37568),p=s(99571),j={extra:"extra___yTab3",row:"row___HnRCs",md:"md___L1tuZ",title:"title___iSLhz",btn:"btn___C2OtF",boxHead:"boxHead___GfOIb",iframe:"iframe___J6XBA"},g=s(76603),w=s(92310),y=s.n(w),b=s(15409),q=s(88761),N=s(90165),C=s(99534),k=s(24334),Z=s(6767),P=s(62957),S=s(67310),E=s(32531),F=s(20550),H=s(56656),I=s.n(H),T=s(37712),L=function(e){var n=e.className,s=e.data,t=void 0===s?{}:s,a=e.identifier,l=e.userAnswer,o=e.onFinish,c=(0,_.useState)(!1),d=v()(c,2),m=d[0],x=d[1],h=(0,_.useState)({}),f=v()(h,2),j=f[0],g=f[1],w=function(){return(new Date).getTime()},b=function(){var e=r()(i()().mark((function e(n){var s,a;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=k.Base64.decode(t.code),l.length>0&&(null==l||l.map((function(e){s=e.multi_line?s.substring(0,s.indexOf("@▁▁@"))+e.value+s.substring(s.indexOf("@▁▁@")+4):s.substring(0,s.indexOf("@▁@"))+e.value+s.substring(s.indexOf("@▁@")+3)}))),e.next=4,(0,E.n4)(n,{code:k.Base64.encode(s),language:t.language,answers:null==l?void 0:l.map((function(e){return e.value}))});case 4:return a=e.sent,e.abrupt("return",a);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){var e=r()(i()().mark((function e(){var n,s,t,o,c;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==l||null===(n=l.filter((function(e){return!e.value})))||void 0===n||!n.length){e.next=3;break}return Z.ZP.warning("请先填写代码之后再提交"),e.abrupt("return");case 3:return x(!0),e.next=6,(0,S.ZP)("/api/problems/".concat(a,"/start.json"),{method:"get"});case 6:return s=e.sent,e.next=9,b(null==s?void 0:s.identifier);case 9:if(0!==(null==(t=e.sent)?void 0:t.status)){e.next=17;break}return o=function(){var e=r()(i()().mark((function e(){var n,t,a,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,E.rX)(null==s?void 0:s.identifier,"submit");case 2:if(n=e.sent,t=n.status,n.message,a=n.data,r=w(),!(r-c>1e4*(null==l?void 0:l.length))){e.next=12;break}return x(!1),P.Z.error({centered:!0,icon:null,okText:"知道啦",title:"调试代码超时",content:"请检查程序代码是否存在死循环"}),e.abrupt("return");case 12:if(0!==t){e.next=16;break}return x(!1),2===a.status?P.Z.error({centered:!0,icon:null,okText:"知道啦",title:"调试代码超时"}):g(a),e.abrupt("return");case 16:setTimeout(o,1e3);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=w(),e.next=15,(0,E.bM)(null==s?void 0:s.identifier,{});case 15:return o(),e.abrupt("return");case 17:x(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,T.jsxs)("div",{children:[(0,T.jsx)(p.ZP,{className:y()(n),loading:m,onClick:q,children:"提交代码"}),(0,T.jsx)(P.Z,{open:!(null==j||!j.id),title:"运行结果",width:1100,destroyOnClose:!0,afterClose:function(){return null==o?void 0:o()},footer:!1,onOk:function(){return g({})},onCancel:function(){return g({})},children:(0,T.jsxs)("div",{style:{maxHeight:600,overflow:"auto",marginBottom:15},children:[(0,T.jsxs)("div",{style:{marginBottom:20,display:"flex",justifyContent:"space-between",fontSize:14},children:[(0,T.jsxs)("div",{children:[(0,T.jsx)("span",{style:{color:"#666666"},children:"状态"}),(0,T.jsx)("span",{style:{marginLeft:12,color:0!==j.status&&"#E30000"},children:F.Im[j.status]})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("span",{style:{color:"#666666"},children:"提交时间"}),(0,T.jsx)("span",{style:{marginLeft:12},children:I()(j.created_at).format("YYYY-MM-DD HH:mm:ss")})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("span",{style:{color:"#666666"},children:"语言"}),(0,T.jsx)("span",{style:{marginLeft:12},children:j.language})]}),(0,T.jsxs)("div",{children:[(0,T.jsx)("span",{style:{color:"#666666"},children:"执行用时"}),(0,T.jsxs)("span",{style:{marginLeft:12},children:[j.execute_time,"ms"]})]})]}),(0,T.jsx)(F.Y4,u()({highlightEndEntry:!0},j))]})})]})},M=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],D=function(e){var n=e.data,s=n.question_type,t=(n.group_topic_id,n.commit_wrong_question),i=void 0===t?{}:t,a=i.analysis,r=i.standard_answer_show,l=i.tag_discipline_names,o=i.standard_answer;return(0,T.jsxs)("div",{className:j.extra,children:[[0,1,2].includes(s)?(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsx)("div",{children:"答    案"}),(0,T.jsx)("div",{className:"c-black",children:r})]}):[3].includes(s)?null==o?void 0:o.map((function(e,n){var s,t;return(0,T.jsx)(_.Fragment,{children:(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsxs)("div",{children:["答    案",n+1]}),1===(null==e?void 0:e.model)&&(0,T.jsx)("div",{className:"c-black",children:null==e||null===(s=e.answer_text)||void 0===s?void 0:s.join("、")}),2===(null==e?void 0:e.model)&&(0,T.jsx)("div",{className:"flex gap-10px",children:null==e||null===(t=e.answer_text)||void 0===t?void 0:t.map((function(e,s){return(0,T.jsx)(q.Z,{disabled:!0,value:e},n+""+s)}))})]})},n)})):[4].includes(s)?(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsx)("div",{children:"答    案"}),(0,T.jsx)("div",{className:"c-black",children:null==o?void 0:o[0]})]}):[6].includes(s)?(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsx)("div",{children:"答    案"}),(0,T.jsx)(g.Z,{className:j.md,value:o||"-"})]}):[8].includes(s)?null==o?void 0:o.map((function(e,n){return(0,T.jsx)(_.Fragment,{children:(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsxs)("div",{children:["答    案",n+1]}),(0,T.jsx)("div",{className:"c-black",children:null==e?void 0:e.answer_text})]})},n)})):void 0,(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsx)("div",{children:"解    析"}),(0,T.jsx)(g.Z,{className:j.md,value:a||"-"})]}),(0,T.jsxs)("div",{className:j.row,children:[(0,T.jsx)("div",{children:"知识点"}),(0,T.jsx)("div",{className:"c-black",children:null==l?void 0:l.join("、")})]})]})},O=function(e){var n=function(e){var n=e,s=n.user_answer,t=n.standard_answer,i=n.standard_answers,a=n.standard_answer_show,r=n.tag_discipline_names,l=n.analysis,o=n.user_answer_infos;return e={user_answer_is_right:void 0===(null==o?void 0:o.user_answer_is_right)?null:null==o?void 0:o.user_answer_is_right,user_answer:s,analysis:l,standard_answer_show:a,tag_discipline_names:r,standard_answer:i||t}};return e.map((function(e,s){return e.q_position=s+1,e.commit_wrong_question=n(e),[7].includes(null==e?void 0:e.question_type)&&(e.commit_wrong_question.sub_exercise_questions=e.sub_exercise_questions.map((function(e){return n(e)}))),e}))},Y=function(e){var n=e.data,s=void 0===n?{}:n,t=e.value,i=e.onChange,a=s.question_title,r=s.question_choices,l=s.q_position,o=s.commit_wrong_question,c=void 0===o?{}:o,u=c.user_answer_is_right,d=c.user_answer,v=void 0!==u;return(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(l,"、")+a}),(0,T.jsx)(m.ZP.Group,{disabled:v,value:v?null==d?void 0:d[0]:t,onChange:function(e){var n=e.target.value;i(n)},className:v&&"edu-radio-".concat(u?"green":"red"),children:null==r?void 0:r.map((function(e,n){return(0,T.jsx)("div",{children:(0,T.jsx)(m.ZP,{value:null==e?void 0:e.choice_id,className:"mb20",children:(0,T.jsxs)(x.Z,{align:"middle",wrap:!1,className:"c-black ml5",children:[(0,T.jsxs)("span",{className:"mr5 c-black",children:[M[n],"."]}),(0,T.jsx)(g.Z,{className:j.md,value:null==e?void 0:e.choice_text})]})})},n)}))}),v&&(0,T.jsx)(D,{data:s})]})},B=function(e){var n=e.data,s=void 0===n?{}:n,t=e.value,i=e.onChange,a=s.question_title,r=s.question_choices,l=s.q_position,o=s.commit_wrong_question,c=void 0===o?{}:o,u=c.user_answer_is_right,d=c.user_answer,v=void 0!==u;return(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(l,"、")+a}),(0,T.jsx)(h.Z.Group,{disabled:v,style:{flexDirection:"column"},value:v?d:t,onChange:function(e){i(e)},className:v&&"edu-checkbox-".concat(u?"green":"red"),children:null==r?void 0:r.map((function(e,n){return(0,T.jsx)("div",{children:(0,T.jsx)(h.Z,{value:null==e?void 0:e.choice_id,className:"mb20",children:(0,T.jsxs)(x.Z,{align:"middle",wrap:!1,className:"c-black ml5",children:[(0,T.jsxs)("span",{className:"mr5 c-black",children:[M[n],"."]}),(0,T.jsx)(g.Z,{className:j.md,value:null==e?void 0:e.choice_text})]})})},n)}))}),v&&(0,T.jsx)(D,{data:s})]})},W=function(e){var n=e.data,s=void 0===n?{}:n,t=e.value,i=e.onChange,a=s.question_title,r=s.question_choices,l=s.q_position,o=s.commit_wrong_question,c=void 0===o?{}:o,u=c.user_answer_is_right,d=c.user_answer,v=void 0!==u;return(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(l,"、")+a}),(0,T.jsx)(m.ZP.Group,{disabled:v,value:v?null==d?void 0:d[0]:t,onChange:function(e){var n=e.target.value;i(n)},className:v&&"edu-radio-".concat(u?"green":"red"),children:null==r?void 0:r.map((function(e,n){return(0,T.jsx)("div",{children:(0,T.jsx)(m.ZP,{value:null==e?void 0:e.choice_id,className:"mb20",children:(0,T.jsx)(x.Z,{align:"middle",wrap:!1,className:"c-black ml5",children:(0,T.jsx)(g.Z,{className:j.md,value:null==e?void 0:e.choice_text})})})},n)}))}),v&&(0,T.jsx)(D,{data:s})]})},V=function(e){var n=e.data,s=void 0===n?{}:n,t=e.value,i=e.onChange,a=(0,_.useState)([]),r=v()(a,2),l=r[0],c=r[1],d=s.question_title,m=s.q_position,h=s.standard_answer,p=s.commit_wrong_question,w=void 0===p?{}:p,b=w.user_answer_is_right,N=w.user_answer,C=void 0!==b,k=function(e){i(e)};return(0,_.useEffect)((function(){if(C)c(N);else if(t)c(t);else{var e=null==h?void 0:h.map((function(e){return u()(u()({},e),{},{exercise_choice_id:e.position,answer_text:""})}));c(e)}}),[]),(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(m,"、")+d}),(0,T.jsx)("div",{className:"flex flex-col gap-20px mb20",children:null==l?void 0:l.map((function(e,n){return(0,T.jsxs)(x.Z,{align:"middle",wrap:!1,children:[(0,T.jsxs)("div",{className:"mr10",children:["填空项",n+1]}),(0,T.jsx)("div",{className:"flex-1",children:1===(null==e?void 0:e.model)?(0,T.jsx)(f.Z,{placeholder:"请输入答案",disabled:C,value:null==e?void 0:e.answer_text,onChange:function(e){l[n].answer_text=e.target.value,c(o()(l)),k(l)}}):(0,T.jsx)(q.Z,{value:null==e?void 0:e.answer_text,disabled:C,onChange:function(e){l[n].answer_text=e,c(o()(l)),k(l)}})})]})}))}),C&&(0,T.jsx)(D,{data:s})]})},A=function(e){var n=e.data,s=void 0===n?{}:n,t=e.value,i=e.onChange,a=s.question_title,r=s.q_position,l=s.commit_wrong_question,o=void 0===l?{}:l,c=o.user_answer_is_right,u=o.user_answer,d=void 0!==c;return(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(r,"、")+a}),d?(0,T.jsx)("div",{style:{border:"1px solid #dcdcdc"},className:"mb20 p20 c-black",children:null==u?void 0:u[0]}):(0,T.jsx)(b.Z,{watch:!0,onChange:function(e){i(e)},defaultValue:t}),d&&(0,T.jsx)(D,{data:s})]})},G=function(e){var n=e.showEntryAnswer,s=e.updateData,t=e.examPaperId,a=e.params,l=e.data,o=void 0===l?{}:l,c=(0,_.useState)(!1),u=v()(c,2),d=u[0],m=u[1],x=(0,_.useState)(""),h=v()(x,2),f=h[0],w=h[1],b=(0,_.useState)("none"),q=v()(b,2),k=q[0],Z=q[1],P=(0,_.useRef)(),S=o.question_id,E=o.question_title,F=o.q_position,H=o.languages,I=o.description,L=o.hack_identifier,M=o.commit_wrong_question,O=(void 0===M?{}:M).user_answer_is_right,Y=void 0!==n?n:!(void 0!==O),B=function(){var e=r()(i()().mark((function e(){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(m(!0),!L){e.next=6;break}return e.next=4,(0,C.nF)({id:L});case 4:0===(null==(n=e.sent)?void 0:n.status)&&(w("/myproblems/".concat(n.identifier,"?type=exercises&exercisesId=").concat(t,"&coursesId=","coursesId","&login=").concat(a.login,"&questionId=").concat(S)),Z("block"));case 6:m(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(e){"backExercise"===e.data&&(Z("none"),w(""),s())};return(0,_.useEffect)((function(){return window.addEventListener("message",W),function(){window.removeEventListener("message",W)}}),[]),(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(F,"、")+E}),Y&&(0,T.jsxs)("div",{className:j.boxHead,children:[(0,T.jsx)(N.Z,{title:"编程语言",dataSource:H}),(0,T.jsx)(p.ZP,{loading:d,onClick:B,className:j.btn,children:"进入答题"})]}),(0,T.jsx)("div",{style:{border:"1px solid #dcdcdc"},className:"mb20 p20 c-black",children:(0,T.jsx)(g.Z,{className:j.md,value:I})}),!Y&&(0,T.jsx)(D,{data:o}),(0,T.jsx)("iframe",{style:{display:k},className:j.iframe,src:f,ref:P})]})},J=function(e){var n=e.showEntryAnswer,s=e.updateData,t=e.data,i=void 0===t?{}:t,a=e.value,r=e.onChange,l=(0,_.useState)([]),c=v()(l,2),d=c[0],m=c[1],x=i.code,h=i.hack_identifier,f=i.question_title,p=i.q_position,w=i.standard_answer_with_score,b=i.commit_wrong_question,q=void 0===b?{}:b,N=q.user_answer_is_right,C=q.user_answer,Z=void 0!==n?n:!(void 0!==N),P=function(e){r(e)};return(0,_.useEffect)((function(){if(C){var e=null==C?void 0:C.map((function(e){return u()(u()({},e),{},{exercise_choice_id:null==e?void 0:e.choice_id,value:e.answer_text})}));return m(e),void(!0===n&&P(e))}if(a)m(a);else{var s=null==w?void 0:w.map((function(e){return u()(u()({},e),{},{exercise_choice_id:e.position,answer_text:"",score:""})}));m(s)}}),[]),(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(p,"、")+f}),Z&&(0,T.jsxs)("div",{className:j.boxHead,children:[(0,T.jsxs)("div",{style:{color:"#FA6400"},children:[(0,T.jsx)("i",{className:"iconfont icon-tishi9 font14 mr8"}),"注意:填写答案后,必须提交代码进行评测,否则无法得分"]}),(0,T.jsx)(L,{className:j.btn,data:i,onFinish:s,userAnswer:d,identifier:h})]}),(0,T.jsx)("div",{style:{border:"1px solid #dcdcdc"},className:"mb20 p20 c-black",children:(0,T.jsx)(g.Z,{disabledFill:!Z,programFillValue:d,showProgramFill:!0,onFillChange:function(e,n){var s;d[Number(n)].answer_text=null===(s=e[Number(n)])||void 0===s?void 0:s.value,m(o()(d)),P(d)},value:k.Base64.decode(x||"")})}),!Z&&(0,T.jsx)(D,{data:i})]})},R=function(e){var n=e.data,s=void 0===n?{}:n,t=e.value,i=e.onChange,a=(0,_.useState)([]),r=v()(a,2),l=r[0],c=r[1],d=(0,_.useState)([]),m=v()(d,2),x=m[0],h=m[1],f=s.question_title,p=s.q_position,w=s.commit_wrong_question,b=s.sub_exercise_questions,q=function(e,n){l[n]=e,c(o()(l)),i(l)};return(0,_.useEffect)((function(){var e=null==b?void 0:b.map((function(e,n){var s;return u()(u()({},e),{},{q_position:"".concat(p,".").concat(n+1),commit_wrong_question:null==w||null===(s=w.sub_exercise_questions)||void 0===s?void 0:s[n]})}));h(e)}),[]),(0,_.useEffect)((function(){if(t)c(t);else{var e=Array(null==b?void 0:b.length).fill(void 0);c(e)}}),[]),(0,T.jsxs)("div",{className:j.question,children:[(0,T.jsx)(g.Z,{className:y()(j.title,j.md),value:"".concat(p,"、")+f}),(0,T.jsx)("div",{className:"flex flex-col gap-20px",children:null==x?void 0:x.map((function(e,n){var s=l[n];return(0,T.jsxs)(_.Fragment,{children:[0===(null==e?void 0:e.question_type)&&(0,T.jsx)(Y,{value:s,data:e,onChange:function(e){return q(e,n)}}),1===(null==e?void 0:e.question_type)&&(0,T.jsx)(B,{value:s,data:e,onChange:function(e){return q(e,n)}}),2===(null==e?void 0:e.question_type)&&(0,T.jsx)(W,{value:s,data:e,onChange:function(e){return q(e,n)}}),3===(null==e?void 0:e.question_type)&&(0,T.jsx)(V,{value:s,data:e,onChange:function(e){return q(e,n)}}),4===(null==e?void 0:e.question_type)&&(0,T.jsx)(A,{value:s,data:e,onChange:function(e){return q(e,n)}})]},n)}))})]})}},94950:function(e,n,s){s.r(n),s.d(n,{default:function(){return Y}});var t=s(82242),i=s.n(t),a=s(39647),r=s.n(a),l=s(7557),o=s.n(l),c=s(37205),u=s.n(c),d=s(41498),v=s.n(d),_=s(79800),m=s.n(_),x=s(70236),h=s.n(x),f=s(59301),p=s(62957),j=s(29787),g=s(99571),w=s(77019),y=s(60242),b=s(5269),q=s(5030),N={correct:"correct___kxyVH",wrong:"wrong___mq9je",partialCorrect:"partialCorrect___mVUmW",unanswered:"unanswered___Qb6q9",wrap:"wrap___wnenN",head:"head___g9KUg",content:"content___gs8eE",left:"left___nmVnP",answerInfo:"answerInfo___vaCeC",dottedLineWrapper:"dottedLineWrapper___i4mG_",leftHalfCircle:"leftHalfCircle___ViyaI",dottedLine:"dottedLine___w83V6",rightHalfCircle:"rightHalfCircle___qbTN1",card:"card___pGijF",cardTitle:"cardTitle___eA6eY",cardContent:"cardContent___rchFp",cardTag:"cardTag___zad8x",right:"right___oipKn",overall:"overall___xMhs6",tipCorrect:"tipCorrect___fVjaz",tipWrong:"tipWrong___nMG7C",question:"question___uYC59",btns:"btns___als5Y"},C=s(67310),k=s(15075),Z=s(43531),P=s(92303),S=s(458),E="question___QjGrh",F=s(37712),H=function(e){var n=e.visible,s=e.data,t=e.onClose,i=e.login,a=(0,f.useState)(!1),r=m()(a,2),l=r[0],c=r[1],u=(0,f.useState)({}),d=m()(u,2),_=d[0],x=d[1];(0,f.useEffect)((function(){n&&h()}),[n]);var h=function(){var e=v()(o()().mark((function e(){var n,t,a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,(0,C.ZP)("/api/exercise_questions/".concat(null==s?void 0:s.question_id,"/origin_question_infos.json"),{method:"get",params:{login:i}});case 3:0===(null==(n=e.sent)?void 0:n.status)&&(a=(null===(t=(0,P.eS)([null==n?void 0:n.data]))||void 0===t?void 0:t[0])||{},x(a)),c(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,F.jsx)(p.Z,{centered:!0,destroyOnClose:!0,onCancel:t,open:n,title:"原题",footer:null,bodyStyle:{paddingBottom:25,overflow:"hidden"},width:1e3,children:(0,F.jsx)(S.Z,{loading:l,children:(0,F.jsxs)("div",{className:E,children:[0===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.PQ,{data:_}),1===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.jM,{data:_}),2===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.$C,{data:_}),3===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.P1,{data:_}),4===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.JE,{data:_}),6===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.g0,{data:_}),7===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.rK,{data:_}),8===(null==_?void 0:_.question_type)&&(0,F.jsx)(P.ZP,{data:_})]})})})},I="question___yvmNV",T=s(56656),L=s.n(T),M=function(e){var n=e.visible,s=e.data,t=e.onClose,i=e.login,a=(0,f.useState)(!1),r=m()(a,2),l=r[0],c=r[1],u=(0,f.useState)([]),d=m()(u,2),_=d[0],x=d[1];(0,f.useEffect)((function(){n&&h()}),[n]);var h=function(){var e=v()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return c(!0),e.next=3,(0,C.ZP)("/api/exercise_questions/".concat(null==s?void 0:s.question_id,"/doing_wrong_question_records.json"),{method:"get",params:{login:i}});case 3:0===(null==(n=e.sent)?void 0:n.status)&&x((0,P.eS)((null==n||null===(t=n.data)||void 0===t?void 0:t.list)||[])),c(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,F.jsx)(p.Z,{centered:!0,destroyOnClose:!0,onCancel:t,open:n,title:"做题记录",footer:null,bodyStyle:{paddingBottom:25,overflow:"hidden"},width:1e3,children:(0,F.jsx)(S.Z,{loading:l,children:(0,F.jsx)("div",{className:I,children:_.map((function(e,n){var s,t;return(0,F.jsxs)(f.Fragment,{children:[0===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.PQ,{data:e}),1===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.jM,{data:e}),2===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.$C,{data:e}),3===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.P1,{data:e}),4===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.JE,{data:e}),6===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.g0,{data:e}),7===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.rK,{data:e}),8===(null==e?void 0:e.question_type)&&(0,F.jsx)(P.ZP,{data:e}),(0,F.jsxs)(w.Z,{align:"middle",justify:"space-between",children:[(0,F.jsxs)("div",{className:"c-grey-666",children:["答题结果  ",null!=e&&null!==(s=e.user_answer_infos)&&void 0!==s&&s.user_answer_is_right?(0,F.jsx)("span",{style:{color:"#19CB70"},children:"答对了"}):(0,F.jsx)("span",{style:{color:"#E30000"},children:"答错了"})]}),(0,F.jsxs)("div",{className:"c-grey-666",children:["提交时间  ",(0,F.jsx)("span",{className:"c-black"}),L()(null==e||null===(t=e.user_answer_infos)||void 0===t?void 0:t.user_answer_time).format("YYYY-MM-DD HH:mm:ss")]})]}),n<_.length-1&&(0,F.jsx)("div",{style:{height:1,background:"#F6F7F9"}})]},null==e?void 0:e.question_id)}))})})})},D=["items"],O=["sub_exercise_questions"],Y=function(e){var n,s,t,a,l,c,d,_,x,S,E;h()(e);var I=(0,q.useDispatch)(),T=(0,q.useParams)(),L=(0,f.useState)(!0),Y=m()(L,2),B=Y[0],W=Y[1],V=(0,f.useState)(0),A=m()(V,2),G=A[0],J=A[1],R=(0,f.useState)({}),z=m()(R,2),Q=z[0],K=z[1],X=(0,f.useState)(null),$=m()(X,2),U=$[0],ee=$[1],ne=(0,f.useState)([]),se=m()(ne,2),te=se[0],ie=se[1],ae=(0,f.useState)(null),re=m()(ae,2),le=re[0],oe=re[1],ce=(0,f.useState)(null),ue=m()(ce,2),de=ue[0],ve=ue[1],_e=(0,f.useState)(0),me=m()(_e,2),xe=me[0],he=me[1],fe=(0,f.useState)(null),pe=m()(fe,2),je=pe[0],ge=pe[1],we=(0,f.useState)(!1),ye=m()(we,2),be=ye[0],qe=ye[1],Ne=(0,f.useState)(null),Ce=m()(Ne,2),ke=Ce[0],Ze=Ce[1],Pe=(0,f.useState)(!1),Se=m()(Pe,2),Ee=Se[0],Fe=Se[1];(0,f.useEffect)((function(){return I({type:"globalSetting/headerFooterToggle",payload:!1}),function(){I({type:"globalSetting/headerFooterToggle",payload:!0})}}),[]),(0,f.useEffect)((function(){Te()}),[]),(0,f.useEffect)((function(){U&&Le(U)}),[U]);var He,Ie,Te=function(){var e=v()(o()().mark((function e(){var n,s,t,i,a,r,l,c,d,v,_,m,x,h=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=h.length>0&&void 0!==h[0]?h[0]:"",W(!0),e.next=4,(0,C.ZP)("/api/intelligent_imports/ai_push.json",{method:"post",body:{exercise_id:null==T?void 0:T.categoryId,login:null==T?void 0:T.login,scene_type:11,exercise_question_id:s}});case 4:if(0===(null==(t=e.sent)?void 0:t.status)){e.next=7;break}return e.abrupt("return",t);case 7:i=null==t||null===(n=t.data)||void 0===n?void 0:n.ai_question_record_id;case 8:return e.next=10,(0,C.ZP)("/api/intelligent_imports/get_ai_question_record.json",{method:"get",params:{ai_question_record_id:i}});case 10:if(a=e.sent,1!==(null===(l=a)||void 0===l||null===(l=l.data)||void 0===l?void 0:l.status)){e.next=17;break}return console.log("操作成功"),Ze([null===(d=a)||void 0===d||null===(d=d.data)||void 0===d||null===(d=d.progress)||void 0===d?void 0:d.current_success_count,null===(v=a)||void 0===v||null===(v=v.data)||void 0===v||null===(v=v.progress)||void 0===v?void 0:v.total]),e.abrupt("break",29);case 17:if(0!==(null===(c=a)||void 0===c||null===(c=c.data)||void 0===c?void 0:c.status)){e.next=26;break}return s||qe(!0),Fe(!0),Ze([null===(_=a)||void 0===_||null===(_=_.data)||void 0===_||null===(_=_.progress)||void 0===_?void 0:_.current_success_count,null===(m=a)||void 0===m||null===(m=m.data)||void 0===m||null===(m=m.progress)||void 0===m?void 0:m.total]),console.log("识别中,继续轮询..."),e.next=24,new Promise((function(e){return setTimeout(e,2e3)}));case 24:e.next=28;break;case 26:return console.log("状态异常"),e.abrupt("break",29);case 28:if(0===(null===(r=a)||void 0===r||null===(r=r.data)||void 0===r?void 0:r.status)){e.next=8;break}case 29:s?(le[de-1]=void 0,oe(u()(le)),Le(U)):ee(null===(x=a)||void 0===x||null===(x=x.data)||void 0===x||null===(x=x.content)||void 0===x?void 0:x.exercise_id),Fe(!1);case 31:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Le=function(){var e=v()(o()().mark((function e(n){var s,t,a,l,c,u;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W(!0),e.next=3,(0,C.ZP)("/api/exercises/".concat(n,"/simulate_start_answer.json"),{method:"get"});case 3:0===(null==(s=e.sent)?void 0:s.status)&&(l=(a=[[],[],[],[]])[0],c=a[1],u=a[2],null==s||null===(t=s.exercise_question_types)||void 0===t||t.forEach((function(e,n){c.push(!0);var s=e.items,t=r()(e,D);null==s||s.forEach((function(e,s){l.push(void 0),u.push(i()(i()({},e),{},{index:n,clickIndex:e.q_position,q_position:s+1,titleParams:t}))}))})),K(s),ge(je||c),oe(le||l),ie(u),ve(de||1),he(xe+1),qe(!1)),W(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Me=function(e){le[de-1]=e,oe(u()(le))},De=function(){var e=v()(o()().mark((function e(){var n,s,t,a,l,c,d,v,_,m,x;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Ye.question_id,s=Ye.question_type,t=Ye.sub_exercise_questions,a={},[0,1,2].includes(s)&&(a.exercise_choice_id=Be),[3,8].includes(s)&&(a.user_exercise_answers=Be),[4].includes(s)&&(a.answer_text=Be),[7].includes(s)&&(l=null==t?void 0:t.map((function(e,n){var s={sub_question_id:null==e?void 0:e.question_id};return[0,1,2].includes(e.question_type)&&(s.exercise_choice_id=Be[n]),[3].includes(e.question_type)&&(s.user_exercise_answers=Be[n]),[4].includes(e.question_type)&&(s.answer_text=Be[n]),s})),a.sub_questions=l),W(!0),e.next=9,(0,C.ZP)("/api/exercise_questions/".concat(n,"/exercise_answers/commit_wrong_question.json"),{method:"post",body:a});case 9:0===(null==(c=e.sent)?void 0:c.status)&&(d=te[de-1],v=(null==c?void 0:c.data)||{},_=v.sub_exercise_questions,m=r()(v,O),d=i()(i()({},d),{},{has_doing_question_records:!0,commit_wrong_question:m}),[8].includes(s)&&(d.sub_exercise_questions=null===(x=d)||void 0===x||null===(x=x.sub_exercise_questions)||void 0===x?void 0:x.map((function(e,n){return i()(i()({},e),{},{commit_wrong_question:_[n]})}))),te[de-1]=d,ie(u()(te))),W(!1);case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=(0,f.useMemo)((function(){var e=[],n=new Map;return te.forEach((function(e){var s=e.titleParams,t=s.question_type,i=s.name;n.has(t)||n.set(t,{question_type:t,name:i,items:[]}),n.get(t).items.push(e)})),n.forEach((function(n){e.push(n)})),e}),[te]),Ye=te[de-1]||{},Be=null==le?void 0:le[de-1];return(0,F.jsxs)(j.Z,{spinning:B,children:[(0,F.jsxs)("div",{className:N.wrap,style:be?{opacity:0}:{},children:[(0,F.jsxs)("div",{className:N.head,children:[(0,F.jsx)("b",{className:"c-grey-333 font20",children:(null==Q||null===(n=Q.exercise)||void 0===n?void 0:n.exercise_name)||"--"}),(0,F.jsx)(g.ZP,{onClick:function(){var e,n=te.length-(null===(e=te.filter((function(e){var n;return null==e||null===(n=e.commit_wrong_question)||void 0===n?void 0:n.user_answer_is_right})))||void 0===e?void 0:e.length);0!==n?p.Z.confirm({centered:!0,icon:null,okText:"确定",cancelText:"取消",title:"提示",content:(0,F.jsxs)("span",{children:["共 ",(0,F.jsx)("span",{className:"c-light-primary",children:te.length})," 道题,当前还有 ",(0,F.jsx)("span",{style:{color:"#FF9D18"},children:n})," 道题未巩固。确定要退出吗?"]}),onOk:function(){q.history.push("/classrooms/".concat(T.coursesId,"/exercise/").concat(T.categoryId,"/detail"))}}):q.history.push("/classrooms/".concat(T.coursesId,"/exercise/").concat(T.categoryId,"/detail"))},icon:(0,F.jsx)("i",{className:"iconfont icon-tuichu2"}),children:"退出"})]}),(0,F.jsxs)("div",{className:N.content,children:[(0,F.jsxs)("div",{className:N.left,children:[(0,F.jsxs)("aside",{className:"p20 bg-white c-grey-666",children:[(0,F.jsxs)("div",{children:["姓名",(0,F.jsx)("b",{className:"ml10 c-grey-333",children:(null==Q||null===(s=Q.exercise)||void 0===s?void 0:s.user_name)||"--"})]}),(0,F.jsxs)("div",{className:"mt8",children:["学号",(0,F.jsx)("b",{className:"ml10 c-grey-333",children:(null==Q||null===(t=Q.exercise)||void 0===t?void 0:t.student_id)||"--"})]})]}),(0,F.jsxs)("aside",{className:N.answerInfo,children:[(0,F.jsxs)(w.Z,{justify:"space-between",children:[(0,F.jsx)("div",{children:"巩固进度"}),(0,F.jsxs)("b",{children:[(0,F.jsx)("span",{className:"c-light-primary",children:null==te||null===(a=te.filter((function(e){var n;return!(null==e||null===(n=e.commit_wrong_question)||void 0===n||!n.user_answer_is_right)})))||void 0===a?void 0:a.length}),(0,F.jsxs)("span",{className:"c-grey-999",children:["/",te.length]})]})]}),(0,F.jsx)(y.Z,{percent:(null==te||null===(l=te.filter((function(e){var n;return!(null==e||null===(n=e.commit_wrong_question)||void 0===n||!n.user_answer_is_right)})))||void 0===l?void 0:l.length)/te.length*100,showInfo:!1}),(0,F.jsxs)("div",{className:"c-grey-333",children:["共",(0,F.jsx)("span",{className:"c-light-primary ml5 mr5",children:te.length}),"题"]})]}),(0,F.jsxs)(w.Z,{className:N.dottedLineWrapper,align:"middle",children:[(0,F.jsx)(b.Z,{className:N.leftHalfCircle}),(0,F.jsx)(b.Z,{flex:1,className:N.dottedLine}),(0,F.jsx)(b.Z,{className:N.rightHalfCircle})]}),(0,F.jsx)("aside",{className:N.card,children:Oe.map((function(e,n){var s;return(0,F.jsxs)(f.Fragment,{children:[(0,F.jsxs)("div",{onClick:function(){return ge(je.with(n,!je[n]))},className:N.cardTitle,children:[je[n]?(0,F.jsx)(k.Z,{rev:""}):(0,F.jsx)(Z.Z,{rev:""}),(0,F.jsx)("span",{className:"ml5 c-grey-666",children:e.name})]}),je[n]&&(0,F.jsx)("div",{className:N.cardContent,children:null==e||null===(s=e.items)||void 0===s?void 0:s.map((function(e,n){var s,t=null==e||null===(s=e.commit_wrong_question)||void 0===s?void 0:s.doing_question_status,i="unanswered";return 0===t&&(i="wrong"),1===t&&(i="correct"),2===t&&(i="partialCorrect"),(0,F.jsx)("div",{onClick:function(){return ve(null==e?void 0:e.clickIndex)},className:N[i],children:n+1},null==e?void 0:e.clickIndex)}))})]},null==e?void 0:e.question_type)}))}),(0,F.jsxs)("div",{className:N.cardTag,children:[(0,F.jsxs)("div",{children:[(0,F.jsx)("b",{className:N.correct}),"正确"]}),(0,F.jsxs)("div",{children:[(0,F.jsx)("b",{className:N.wrong}),"错误"]}),(0,F.jsxs)("div",{children:[(0,F.jsx)("b",{className:N.partialCorrect}),"部分正确"]}),(0,F.jsxs)("div",{children:[(0,F.jsx)("b",{className:N.unanswered}),"未答"]})]})]}),(0,F.jsxs)("div",{className:N.right,children:[(0,F.jsxs)("div",{className:N.overall,children:[(0,F.jsxs)("b",{className:"c-black",children:[["一","二","三","四","五","六","七","八","九","十"][null==Ye?void 0:Ye.index],"、【",null==Ye||null===(c=Ye.titleParams)||void 0===c?void 0:c.name,"】"]}),(0,F.jsxs)("span",{style:{marginRight:"auto"},className:"c-grey-666",children:["(共",null==Ye||null===(d=Ye.titleParams)||void 0===d?void 0:d.count,"题)"]}),(null==Ye?void 0:Ye.has_doing_question_records)&&(0,F.jsxs)("div",{onClick:function(){return J(2)},className:"current c-light-primary mr20",children:[(0,F.jsx)("i",{className:"iconfont icon-lishijilu font14 mr5"}),"做题记录"]}),(0,F.jsxs)("div",{onClick:function(){return J(1)},className:"current c-light-primary",children:[(0,F.jsx)("i",{className:"iconfont icon-chakan3 font14 mr5"}),"查看原题"]})]}),!0===(null==Ye||null===(_=Ye.commit_wrong_question)||void 0===_?void 0:_.user_answer_is_right)&&(0,F.jsx)("div",{className:N.tipCorrect,children:"恭喜你已经掌握该试题考察的知识点!以后遇到同类试题记得灵活运用~"}),!1===(null==Ye||null===(x=Ye.commit_wrong_question)||void 0===x?void 0:x.user_answer_is_right)&&(0,F.jsxs)("div",{className:N.tipWrong,children:[(0,F.jsx)("span",{children:"该试题考察的知识点你还未掌握,建议使用大模型继续出题进行巩固"}),(0,F.jsx)("div",{onClick:function(){return Te(null==Ye?void 0:Ye.question_id)},children:"继续出题"})]}),(0,F.jsxs)("div",{className:N.question,children:[0===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.PQ,{value:Be,data:Ye,onChange:Me}),1===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.jM,{value:Be,data:Ye,onChange:Me}),2===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.$C,{value:Be,data:Ye,onChange:Me}),3===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.P1,{value:Be,data:Ye,onChange:Me}),4===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.JE,{value:Be,data:Ye,onChange:Me}),6===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.g0,{showEntryAnswer:!0!==(null==Ye||null===(S=Ye.commit_wrong_question)||void 0===S?void 0:S.user_answer_is_right),updateData:De,examPaperId:U,params:T,data:Ye}),7===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.rK,{value:Be,data:Ye,onChange:Me}),8===(null==Ye?void 0:Ye.question_type)&&(0,F.jsx)(P.ZP,{showEntryAnswer:!0!==(null==Ye||null===(E=Ye.commit_wrong_question)||void 0===E?void 0:E.user_answer_is_right),updateData:De,value:Be,data:Ye,onChange:Me})]},de+xe),(0,F.jsxs)("div",{className:N.btns,children:[1!==de&&(0,F.jsx)(g.ZP,{onClick:function(){return ve(de-1)},type:"primary",children:"上一题"}),de!==te.length&&(0,F.jsx)(g.ZP,{onClick:function(){return ve(de+1)},type:"primary",children:"下一题"}),!(null!=Ye&&Ye.commit_wrong_question)&&(He=Ye.question_type,Ie=!0,[0,2,4].includes(He)&&(Be||(Ie=!1)),[1].includes(He)&&(Be&&0!==(null==Be?void 0:Be.length)||(Ie=!1)),[3].includes(He)&&(!Be||null!=Be&&Be.some((function(e){return!e.answer_text})))&&(Ie=!1),[6,8].includes(He)&&(Ie=!1),Ie)&&(0,F.jsx)(g.ZP,{onClick:De,type:"primary",children:"确认"})]})]})]})]}),(0,F.jsx)(H,{login:null==T?void 0:T.login,data:Ye,visible:1===G,onClose:function(){return J(0)}}),(0,F.jsx)(M,{login:null==T?void 0:T.login,data:Ye,visible:2===G,onClose:function(){return J(0)}}),(0,F.jsx)(p.Z,{centered:!0,closable:!1,destroyOnClose:!0,open:Ee,title:null,footer:null,width:320,afterClose:function(){return Ze(null)},children:(0,F.jsxs)(w.Z,{align:"middle",style:{flexDirection:"column",paddingTop:20},children:[(0,F.jsx)(j.Z,{size:"large"}),(0,F.jsx)("b",{style:{color:"#5F6368"},className:"font16 mb5 mt20",children:"试题生成中,请耐心等待"}),!U&&(0,F.jsxs)(w.Z,{align:"middle",className:"mb10",children:[(0,F.jsx)(y.Z,{style:{width:"auto",marginBottom:0},size:[200,8],showInfo:!1,percent:ke?ke[0]/ke[1]*100:0}),ke&&(0,F.jsxs)("span",{children:[ke[0],"/",ke[1]]})]})]})})]})}}}]);