(self.webpackChunk=self.webpackChunk||[]).push([[93665],{22394:function(e,n,t){"use strict";t.d(n,{$Y:function(){return Z},A0:function(){return O},EP:function(){return c},F_:function(){return u},G9:function(){return l},GB:function(){return N},GR:function(){return C},GW:function(){return U},Hp:function(){return I},Ir:function(){return s},N$:function(){return Y},NZ:function(){return H},Nv:function(){return q},OA:function(){return K},OJ:function(){return J},QF:function(){return $},RS:function(){return v},RY:function(){return X},Rj:function(){return P},SX:function(){return y},Tp:function(){return L},Ui:function(){return F},V1:function(){return G},Vn:function(){return j},dL:function(){return W},fo:function(){return w},gK:function(){return Q},hK:function(){return f},i3:function(){return h},ib:function(){return E},lS:function(){return p},m5:function(){return o},n4:function(){return i},n_:function(){return A},oP:function(){return z},p2:function(){return T},pl:function(){return R},rM:function(){return k},sM:function(){return g},t2:function(){return D},tD:function(){return x},u8:function(){return m},um:function(){return _},vm:function(){return V},wQ:function(){return d},wj:function(){return b},wt:function(){return S},yS:function(){return B},yi:function(){return a},ym:function(){return M},z2:function(){return r}});var i="FETCH_TASK_START",s="FETCH_TASK_FAILURE",a="FETCH_TASK_SUCCESS",r="UPDATE_TASK_DATA",c="HIDE_EVALUATE_RESULT",o="SHOW_EVALUATE_RESULT",l="UPDATE_TIMESTRAP",u="MOVE_X",d="MOVE_Y",h="TRIGGER_RIGHT_PANEL_MASK ",A="SET_ACTIVE_INDEX",g="GET_TASK_LIST",I="SHOW_TASK_LIST",f="HIDE_TASK_LIST",E="SET_TASK_STAR",p="TRIGGER_ENLARGE_UNITY3D ",Q="TRIGGER_TAB_FIXED ",C="GET_DISCUSSES",x="SHOW_DISCUSSES_LOADING",m="TOP_OR_DOWN_DISCUSS",k="PLUS_DISCUSS",B="SET_ACTION_TYPE",v="SHOW_REWARD_DIALOG",D="CANCEL_REWARD_DIALOG",j="SET_REWARD",y="ACTIVE_DISCUSS_INDEX",w="DISABLE_DISCUSS",S="SHOW_ANSWER_LOADING",R="FETCH_ANSWER_INFO",H="HIGH_TIP_MODAL",P="SHOW_TIP_MODAL",M="SELECT_UNLOCK_ANSWER",J="SET_CHOOSE_ANSWERS",b="EVAL_CHOOSE_START",G="EVAL_CHOOSE_END",N="FETCH_REP_CONTENT",Y="EDIT_REP_CONTENT",F="SHOW_EVALUATE_LOADING",O="HIDE_EVALUATE_LOADING",T="SET_EVALUATE_MESSAGE",U="SET_SHOW_DIR",Z="SET_EDITOR_THEME",L="SET_EDITOR_FONTSIZE",z="SET_REPOS",K="HIDE_PICTURE_VIEW",V="SHOW_PICTURE_VIEW",W="SHOW_NOTICE",q="HIDE_NOTICE",X="SET_VNC_LOADING ",_="ON_TAB_TO_SPACE ",$="ON_AUTO_FORMAT "},18468:function(e,n,t){"use strict";function i(e){var n=!0;if(e.length>0){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i=0?"Cmd":"Ctrl",ae=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],re=h()(h()({},se+"-B","bold"),se+"-I","italic"),ce=h()(h()(h()(h()({},W,"添加链接"),X,"添加代码块"),q,"添加文件"),_,"添加表格"),oe=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,a=e.width,c=void 0===a?"100%":a,l=e.height,d=void 0===l?400:l,g=e.miniToolbar,C=void 0!==g&&g,x=e.isFocus,m=void 0!==x&&x,k=e.watch,D=e.insertTemp,j=e.mode,y=void 0===j?"markdown":j,w=e.id,P=void 0===w?"markdown-editor-id":w,M=e.showResizeBar,J=void 0!==M&&M,b=e.noStorage,N=void 0!==b&&b,F=e.showNullButton,O=void 0!==F&&F,T=e.showNullProgramButton,U=void 0!==T&&T,$=e.hidetoolBar,se=void 0!==$&&$,oe=e.fullScreen,le=void 0!==oe&&oe,ue=e.onBlur,de=e.onCMBeforeChange,he=e.onFullScreen,Ae=e.className,ge=void 0===Ae?"":Ae,Ie=e.disablePaste,fe=void 0!==Ie&&Ie,Ee=e.disabled,pe=void 0!==Ee&&Ee,Qe=e.disabledFill,Ce=void 0!==Qe&&Qe,xe=e.placeholder,me=void 0===xe?"":xe,ke=e.values,Be=void 0===ke?"":ke,ve=(0,A.useState)(null),De=u()(ve,2),je=De[0],ye=De[1],we=(0,A.useState)(t),Se=u()(we,2),Re=Se[0],He=Se[1],Pe=(0,A.useState)(k),Me=u()(Pe,2),Je=Me[0],be=Me[1],Ge=(0,A.useState)(le),Ne=u()(Ge,2),Ye=Ne[0],Fe=Ne[1],Oe=(0,A.useState)(""),Te=u()(Oe,2),Ue=Te[0],Ze=Te[1],Le=(0,A.useState)(0),ze=u()(Le,2),Ke=ze[0],Ve=ze[1],We=(0,A.useState)(d),qe=u()(We,2),Xe=qe[0],_e=qe[1],$e=(0,A.useState)(!1),en=u()($e,2),nn=(en[0],en[1]),tn=(0,A.useRef)((0,K.Z)()),sn=(0,A.useRef)(!1),an=(0,A.useRef)(),rn=(0,A.useRef)(),cn=(0,A.useRef)(),on=(0,A.useRef)(),ln=(0,A.useRef)(),un=function(){var e=o()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,z.ZP)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tn.current}});case 2:null!=(t=e.sent)&&null!==(n=t.attachments)&&void 0!==n&&n.length&&(console.log("cm:",je,rn),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?je.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?je.replaceSelection('')):e.content_type.indexOf("pdf")>-1?je.replaceSelection('').concat(e.name,"")):je.replaceSelection("[".concat(e.name,"](").concat(L.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,A.useEffect)((function(){var e=window.scrollY||window.pageYOffset;He(Be),null==je||je.setValue(Be),window.scrollTo(0,e)}),[Be]),(0,A.useEffect)((function(){null==he||he(Ye)}),[Ye]),(0,A.useEffect)((function(){if(rn.current){var e=function(e,t){if(!fe){var i=t.clipboardData;if(i){var s=i.types.toString(),a=i.items;if("Files"===s||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==y)return;try{var r,c=a[1];"file"===(null===(r=a[0])||void 0===r?void 0:r.kind)&&(c=a[0]);var o=c.getAsFile(),l=o.name.split(".").pop();Y(o,(function(e){var t,i,s;e.id?(null==o||null===(t=o.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==o||null===(i=o.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('')):(null==o||null===(s=o.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?n.replaceSelection('').concat(o.name,"")):ae.includes(l)?n.replaceSelection('').concat(o.name,"")):n.replaceSelection("[".concat(o.name,"](").concat(L.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(t){H.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=I().fromTextArea(rn.current,{mode:y,lineNumbers:!C,lineWrapping:!0,value:t,autoCloseTags:!U,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",me):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),i=t.getCursor(),s=t.getLine(i.line),a=s.charAt(i.ch-1),r=s.lastIndexOf("@▁@",i.ch),c=s.lastIndexOf("@▁▁@",i.ch),o=r>c?r:c,l=r>c?3:4;if(-1===te.indexOf(a))return null;if(console.log("change1:",n,e,s,i,o,r,c,a),o>=0&&i.ch-o<5){var u=o+l;return t.replaceRange("",{line:i.line,ch:o},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);t&&n.preventDefault()}})),m&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){cn.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){cn.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var i;if(cn.current.classList.add("mouse-hover-md"),(i=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var s=function(){var e=i[a],t=e.name.split(".").pop();Y(e,(function(i){var s,a,r;i.id?(null==e||null===(s=e.type)||void 0===s?void 0:s.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(i.id,"?type=").concat(i.content_type,")")):(null==e||null===(a=e.type)||void 0===a?void 0:a.indexOf("video"))>-1?n.replaceSelection('')):(null==e||null===(r=e.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?n.replaceSelection('').concat(e.name,"")):ae.includes(t)?n.replaceSelection('').concat(e.name,"")):n.replaceSelection("[".concat(e.name,"](").concat(L.Z.API_SERVER,"/api/attachments/").concat(i.id,"?type=").concat(i.content_type,")")):401===(null==i?void 0:i.status)&&(document.location.href="/user/login")}))},a=0;a0||i.target.offsetWidth>0)&&(dn(),je.setSize("100%","100%"),je.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(rn.current.parentElement),e}();return function(){var n,t;null!==(n=rn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=rn.current)||void 0===t?void 0:t.parentElement)}}}),[je,dn]),(0,A.useEffect)((function(){if(je){for(var e=[],n=function(){var n=u()(i[t],2),s=n[0],a=n[1],r=h()({},s,(function(){hn(a)}));e.push(r),je.addKeyMap(r)},t=0,i=Object.entries(re);t0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(P);e>=Ke+1e4&&(!n||n!==Re)&&(window.sessionStorage.setItem(P,Re),nn(!0))}}),1e4),(0,A.useEffect)((function(){be(k)}),[je,k]),(0,A.useEffect)((function(){je&&m&&je.focus()}),[je,m]),(0,A.useEffect)((function(){if(Je&&je){var e=function(e){var n=e.target;if(ln.current){var t=n.scrollTop/n.scrollHeight;ln.current.scrollTop=ln.current.scrollHeight*t}},n=je.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[je,Je]),(0,A.useEffect)((function(){if(je&&de){var e=function(e,n){de(e,n)};return je.on("beforeChange",e),function(){je.off("beforeChange",e)}}}),[je,de]),(0,A.useEffect)((function(){if(je&&ue){var e=function(){ue(je.getValue())};return je.on("blur",e),function(){je.off("blur",e)}}}),[je,ue]),(0,A.useEffect)((function(){if(je){var e=function(e,n){var t=e.getValue();He(t),Ve((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(U?i(t,En(t)):i(t))};return je.on("change",e),function(){je.off("change",e)}}}),[je,i]),(0,A.useEffect)((function(){if(je)if(null==t)je.setValue(""),He("");else{var e=window.scrollY||window.pageYOffset;t!==je.getValue()&&(je.setValue(t),He(t),je.setCursor(pe?1:je.lineCount(),0),window.scrollTo(0,e))}}),[je,t]);var hn=(0,A.useCallback)((function(e){var n=je.getCursor(),t=je.getSelection(),i=t.split("\n");switch(e){case"bold":return je.replaceSelection("**"+t+"**"),""===t&&je.setCursor(n.line,n.ch+2),je.focus();case"italic":return je.replaceSelection("*"+t+"*"),""===t&&je.setCursor(n.line,n.ch+1),je.focus();case"code":return je.replaceSelection("`"+t+"`"),""===t&&je.setCursor(n.line,n.ch+1),je.focus();case"inline-latex":return je.replaceSelection("`$$"+t+"$$`"),""===t&&je.setCursor(n.line,n.ch+3),je.focus();case"latex":return je.replaceSelection("```latex\n"+t+"\n```"),je.setCursor(n.line+1,t.length+1),je.focus();case"line-break":return je.replaceSelection("
\n"),je.focus();case"list-ul":return""===t?je.replaceSelection("- "+t):je.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),je.focus();case"list-ol":return""===t?je.replaceSelection("1. "+t):je.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),je.focus();case"add-null-ch":return""===t&&je.setCursor(n.line,n.ch),je.replaceSelection("▁"),je.focus();case"add-signal":return""===t&&je.setCursor(n.line,n.ch),je.replaceSelection("@▁@"),je.focus();case"add-multiple":return""===t&&je.setCursor(n.line,n.ch),je.replaceSelection(te),je.focus();case"inster-template-1":return""===t&&je.setCursor(n.line,n.ch),je.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),je.focus();case"eraser":return je.setValue(""),je.focus();case"trigger-watch":return be(!Je),je.focus();case"trigger-full-screen":return Fe(!Ye),je.focus();case W:return void Ze(W);case X:return void Ze(X);case q:return void Ze(q);case _:return void Ze(_);default:throw new Error}}),[je,Je,Ye]),An=(0,A.useCallback)((function(e){switch(Ze(""),Ue){case W:var n=e.title,t=e.link;return je.replaceSelection("[".concat(n,"](").concat(t,")")),je.focus();case X:var i=e.language,s=e.content;return je.replaceSelection(["```"+i,s,"```"].join("\n")),je.focus();case q:var a=e.src,r=e.alt;return r?je.replaceSelection("![ ".concat(r," ]( ").concat(a,' "').concat(r,'" )')):je.replaceSelection("![,](".concat(a,")")),je.focus();case _:for(var c=e.row,o=e.col,l=e.align,u="\n",d=0;d300&&(n=300),_e(d+n+"px")}},i=on.current,s=!1,a=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[je,on]),(0,A.useEffect)((function(){_e(d)}),[d]);var fn={width:ie(c),height:ie(Xe)},En=((0,A.useMemo)((function(){if(Ke){var e=new Date(Ke),n=e.getHours(),t=e.getMinutes(),i=e.getSeconds();return t=t<10?"0"+t:t,i=i<10?"0"+i:i,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(i)}return 0}),[Ke]),function(e){var n=[];if(U){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,p.jsxs)(A.Fragment,{children:[(0,p.jsx)("div",{className:"markdown-editor-wrapper",ref:cn,children:(0,p.jsxs)("div",{className:"markdown-editor-container ".concat(ge," ").concat(Je?"on-preview":""," ").concat(C?"mini":""," ").concat(Ye?"full-screen":""),style:fn,children:[(0,p.jsx)(B,{insertTemp:D,watch:Je,fullScreen:Ye,showNullButton:O,showNullProgramButton:U,onActionCallback:hn,hidetoolBar:se,uuid:tn.current,setOpenPhones:function(){sn.current=!0}}),(0,p.jsxs)("div",{className:"markdown-editor-body",children:[(0,p.jsx)("div",{className:"codemirror-container",children:(0,p.jsx)("textarea",{ref:rn,placeholder:me})}),Je?(0,p.jsxs)("div",{ref:ln,className:"preview-container",children:["stex"===y&&(0,p.jsx)(Q,{value:Re}),"stex"!==y&&(0,p.jsx)(E.Z,{disabledFill:Ce,showProgramFill:U,value:Re})]}):null]})]})}),J?(0,p.jsx)("a",{ref:on,className:"editor-resize"}):null,(0,p.jsx)(v.Z,{children:ce[Ue]?(0,p.jsx)(V.Z,{centered:!0,title:ce[Ue],open:!0,onCancel:In,footer:null,className:"markdown-popup-form",children:gn}):null})]})}},7345:function(e,n,t){"use strict";t(59301),t(43206);var i=t(57809),s=t(78673),a=t(37712),r=i.default.Option;n.Z=function(e){var n=e.isTheoretical,t=e.onFontSizeChange,c=e.cmFontSize,o=e.cmCodeMode,l=(e.autoFormat,e.onCodeModeChange),u=e.onTabToSpace,d=(e.onAutoFormat,e.formatDocument),h=e.className,A=void 0===h?"":h,g=e.tabToSpace,I=e.children;return(0,a.jsxs)("div",{className:"tpi-code-setting ".concat(A),children:[(0,a.jsx)("h3",{children:"代码格式"}),(0,a.jsxs)("section",{children:[(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"显示模式"}),(0,a.jsxs)(i.default,{bordered:!1,size:"small",value:o,onChange:l,children:[(0,a.jsx)(r,{value:"vs",children:"白色背景"}),(0,a.jsx)(r,{value:"vs-dark",children:"黑色背景"})]})]}),!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"字体大小"}),(0,a.jsxs)(i.default,{bordered:!1,size:"small",value:c,onChange:t,children:[(0,a.jsx)(r,{value:12,children:"12px"}),(0,a.jsx)(r,{value:14,children:"14px"}),(0,a.jsx)(r,{value:16,children:"16px"}),(0,a.jsx)(r,{value:18,children:"18px"}),(0,a.jsx)(r,{value:20,children:"20px"}),(0,a.jsx)(r,{value:22,children:"22px"})]})]}),(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"Tab转换"}),(0,a.jsx)(s.Z,{checked:g,onChange:u})]}),(0,a.jsx)("div",{className:"file-item",onClick:d,children:(0,a.jsx)("b",{style:{cursor:"pointer"},children:"格式化代码"})})]})]}),!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{children:"快捷键"}),(0,a.jsxs)("section",{children:[(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"保存代码"}),(0,a.jsx)("span",{children:"Ctrl + S"})]}),(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"唤出快捷键列表"}),(0,a.jsx)("span",{children:"F1 / Alt + F1"})]}),(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"左右缩进"}),(0,a.jsx)("span",{children:"Ctrl + ]/["})]}),(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"跳到匹配的括号"}),(0,a.jsx)("span",{children:"Ctrl + Shift + \\"})]}),(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"转到行首"}),(0,a.jsx)("span",{children:"Home"})]}),(0,a.jsxs)("div",{className:"file-item",children:[(0,a.jsx)("b",{children:"转到行尾"}),(0,a.jsx)("span",{children:"End"})]})]}),I]})]})}},84628:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return Me}});var i=t(59301),s=t(95237),a=t(3113),r=t(43604),c=t(20570),o=t(79311),l=t(27627),u="wrap___d2dw2",d="full___aj305",h=t(7557),A=t.n(h),g=t(41498),I=t.n(g),f=t(82242),E=t.n(f),p=t(79800),Q=t.n(p),C=t(39647),x=t.n(C),m="warehouse___QWVPT",k="content___w0dAS",B="left___xZRzx",v="close___KBRyH",D="right___v5JXP",j="loading___SunBf",y="empty___dvPGr",w="line___VNd7N",S="footer___Yx5nS",R="commit___Ui8A5",H="filePathWrp___qeMMR",P="filePath___tc_hQ",M="bottom0___tgeX3",J=t(65363),b=t(99313),G=t(6848),N=t(8591),Y=t(20834),F=t(71418),O=t(43418),T=t(37205),U=t.n(T),Z=t(17664),L=t(97334),z=t(38854),K=t(56102),V=t(78241),W=t(73782),q={wrap:"wrap___SO6Mn",modal:"modal___zNd_3",title:"title___EX56C",path:"path___IqyHA",colorBlue:"colorBlue___MSdA7",width240:"width240___mU1C0",filePath:"filePath___v0Tze"},X=t(37712),_=["shixunsDetail","globalSetting","loading","user","dispatch","taskData","isRepository"],$=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,user:e.user,loading:t.models.index}}))((function(e){e.shixunsDetail,e.globalSetting,e.loading,e.user;var n=e.dispatch,t=e.taskData,a=e.isRepository,c=x()(e,_),o=(0,J.useLocation)(),l=(E()(E()({},(0,J.useParams)()),(0,J.useLocation)().query),(0,i.useState)({})),u=Q()(l,2),d=(u[0],u[1]),h=(0,i.useRef)(),g=V.Z.useForm(),f=Q()(g,1)[0],p=(0,i.useState)(""),C=Q()(p,2),m=(C[0],C[1]);(0,i.useEffect)((function(){c.visible&&f.resetFields()}),[c.visible]),(0,i.useEffect)((function(){var e=sessionStorage.getItem("pathArray");if(e){var n=e.split(",").join("/"),t=0===n.indexOf("/")?n.substr(1):n;m(t)}}),[]),(0,i.useEffect)((function(){var e;h.current=null===(e=o.pathname)||void 0===e||null===(e=e.split("/"))||void 0===e?void 0:e[2]}),[]);var k=function(){var e=I()(A()().mark((function e(){var i,s,r=arguments;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,n({type:"shixunsDetail/addRepositoryFile",payload:{id:t.myshixun.identifier,message:i.commitMessage,content:"",path:(c.defaultPath?c.defaultPath+"/":"")+i.path+"/"+(i.file||".gitkeep"),secret_repository:!a||void 0}});case 3:0===(null==(s=e.sent)?void 0:s.status)&&(N.ZP.success("添加成功"),c.onOK({path:(c.defaultPath?c.defaultPath+"/":"")+i.path+"/"+(i.file||".gitkeep"),name:i.path.split("/")[i.path.split("/").length-1]}),c.onClose());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,X.jsx)(O.Z,{width:"60%",centered:!0,open:c.visible,wrapClassName:q.modal,onOk:function(){f.submit()},onCancel:c.onClose,title:"新建文件夹",children:(0,X.jsx)("section",{className:q.bg,children:(0,X.jsx)("div",{className:q.wrap,children:(0,X.jsxs)(V.Z,{className:"mt10",form:f,scrollToFirstError:!0,layout:"vertical",onFinish:k,onChange:function(){var e,n,t,i,s=E()({},f.getFieldsValue()),a=null==s||null===(e=s.path)||void 0===e?void 0:e.split(""),r=null==s||null===(n=s.file)||void 0===n?void 0:n.split("");null!=a&&null!==(t=a.filter((function(e){return"/"==e})))&&void 0!==t&&t.length&&(s.path=s.path.substring(0,s.path.length-1)),null!=r&&null!==(i=r.filter((function(e){return"/"==e})))&&void 0!==i&&i.length&&(s.file=s.file.substring(0,s.path.length-1)),f.setFieldsValue(E()({},s)),d(s)},children:[(0,X.jsx)(V.Z.Item,{label:"文件夹名称:",name:"path",children:(0,X.jsxs)(s.Z,{children:[(0,X.jsx)(r.Z,{children:(0,X.jsx)("span",{className:q.filePath,children:c.defaultPath+"/"})}),(0,X.jsx)(r.Z,{flex:"1",children:(0,X.jsx)(V.Z.Item,{name:"path",rules:[{required:!0,message:"请输入文件夹名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"请输入文件夹名称",size:"middle"})})})]})}),(0,X.jsx)(V.Z.Item,{label:"文件名称:",name:"file",children:(0,X.jsx)(W.Z,{placeholder:"请输入文件名称,如果不填写系统将在文件夹下创建.gitkeep的默认文件",size:"middle"})}),(0,X.jsx)(V.Z.Item,{label:"提交信息:",name:"commitMessage",rules:[{required:!0,message:"请输入提交信息"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"请输入本次提交的主要信息,合理的描述信息有利于代码历史记录的管理",size:"middle"})})]})})})})})),ee=t(35028),ne=["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository","onClose"],te=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,user:e.user,loading:t.models.index}}))((function(e){e.shixunsDetail,e.globalSetting,e.loading,e.user;var n=e.taskData,t=(e.dispatch,e.isRepository),a=e.onClose,c=x()(e,ne),o=(0,J.useLocation)(),l=(E()(E()({},(0,J.useParams)()),(0,J.useLocation)().query),(0,i.useState)({})),u=Q()(l,2),d=(u[0],u[1]),h=(0,i.useRef)(),g=V.Z.useForm(),f=Q()(g,1)[0],p=(0,i.useState)(""),C=Q()(p,2),m=(C[0],C[1]);(0,i.useEffect)((function(){c.visible&&f.resetFields()}),[c.visible]),(0,i.useEffect)((function(){var e=sessionStorage.getItem("pathArray");if(e){var n=e.split(",").join("/"),t=0===n.indexOf("/")?n.substr(1):n;m(t)}}),[]),(0,i.useEffect)((function(){var e;h.current=null===(e=o.pathname)||void 0===e||null===(e=e.split("/"))||void 0===e?void 0:e[2]}),[]);var k=function(){var e=I()(A()().mark((function e(){var i,s,r=arguments;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,(0,Z.MI)({id:n.myshixun.identifier,message:i.commitMessage,content:i.codeMirror,path:(c.defaultPath?c.defaultPath+"/":"")+i.path,secret_repository:!t||void 0});case 3:0===(null==(s=e.sent)?void 0:s.status)&&(N.ZP.success("添加成功"),c.onOK({path:(c.defaultPath?c.defaultPath+"/":"")+i.path,name:i.path.split("/")[i.path.split("/").length-1]}),a());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,X.jsx)(O.Z,{width:"60%",open:c.visible,wrapClassName:q.modal,centered:!0,onOk:function(){f.submit()},onCancel:a,title:"新建文件",children:(0,X.jsx)("section",{className:q.bg,children:(0,X.jsx)("div",{className:q.wrap,children:(0,X.jsxs)(V.Z,{className:"mt10",form:f,scrollToFirstError:!0,layout:"vertical",onFinish:k,onChange:function(){var e,n,t=E()({},f.getFieldsValue()),i=null==t||null===(e=t.path)||void 0===e?void 0:e.split("");(null==i||null===(n=i.filter((function(e){return"/"==e})))||void 0===n?void 0:n.length)>1&&(t.path=t.path.substring(0,t.path.length-1)),f.setFieldsValue(E()({},t)),d(t)},children:[(0,X.jsx)(V.Z.Item,{label:"文件名称或文件路径:",name:"path",children:(0,X.jsxs)(s.Z,{children:[(0,X.jsx)(r.Z,{children:(0,X.jsx)("span",{className:q.filePath,children:c.defaultPath+"/"})}),(0,X.jsx)(r.Z,{flex:"1",children:(0,X.jsx)(V.Z.Item,{name:"path",rules:[{required:!0,message:"请输入文件名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"请输入文件名称",size:"middle"})})})]})}),(0,X.jsx)(V.Z.Item,{label:"提交信息:",name:"commitMessage",rules:[{required:!0,message:"请输入提交信息"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"请输入本次提交的主要信息,合理的描述信息有利于代码历史记录的管理",size:"middle"})}),(0,X.jsx)("div",{className:"mt10 mb20",children:(0,X.jsx)(V.Z.Item,{name:"codeMirror",label:"文件内容:",rules:[{required:!0,message:"请输入文件内容"}],children:(0,X.jsx)(ee.h,{options:{modal:"javascript",lineNumbers:!0,theme:"railscasts",indentUnit:4,matchBrackets:!0,autoRefresh:!0,smartIndent:!0,extraKeys:{"Alt-/":"autocomplete"},autofocus:!0,styleActiveLine:!0,lint:!0,linkurl:"",gutters:["CodeMirror-linenumbers","breakpoints","CodeMirror-lint-markers"]}})})})]})})})})})),ie=["shixunsDetail","globalSetting","loading","user","dispatch","isRepository","taskData"],se=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,user:e.user,loading:t.models.index}}))((function(e){e.shixunsDetail,e.globalSetting,e.loading,e.user,e.dispatch,e.isRepository;var n=e.taskData,t=x()(e,ie),a=(0,J.useLocation)(),c=(E()(E()({},(0,J.useParams)()),(0,J.useLocation)().query),(0,i.useState)({})),o=Q()(c,2),l=(o[0],o[1]),u=(0,i.useRef)(),d=V.Z.useForm(),h=Q()(d,1)[0],g=(0,i.useState)(""),f=Q()(g,2),p=f[0],C=f[1],m=(0,i.useState)(""),k=Q()(m,2),B=k[0],v=k[1];(0,i.useEffect)((function(){t.visible&&h.resetFields()}),[t.visible]),(0,i.useEffect)((function(){var e=t.defaultPath.split("/");1===e.length?(C(""),v(t.defaultPath)):(v(e.pop()),C(e.join("/")+"/"))}),[t.defaultPath]),(0,i.useEffect)((function(){var e;u.current=null===(e=a.pathname)||void 0===e||null===(e=e.split("/"))||void 0===e?void 0:e[2]}),[]);var D=function(){var e=I()(A()().mark((function e(){var i,s,a,r=arguments;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=r.length>0&&void 0!==r[0]?r[0]:{},e.next=3,(0,Z.g7)({id:null==n||null===(i=n.shixun)||void 0===i?void 0:i.identifier,from:t.defaultPath,to:p+s.path,message:s.commitMessage||"".concat(t.defaultPath," rename to ").concat(p).concat(s.path," ")});case 3:0===(null==(a=e.sent)?void 0:a.status)&&(N.ZP.success("操作成功"),t.onOK({path:s.path,name:s.path}),t.onClose());case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,X.jsx)(O.Z,{width:"40%",open:t.visible,wrapClassName:q.modal,centered:!0,onOk:function(){h.submit()},onCancel:t.onClose,title:"提交说明",children:(0,X.jsx)("section",{className:q.bg,children:(0,X.jsx)("div",{className:q.wrap,children:(0,X.jsxs)(V.Z,{className:"mt10",form:h,scrollToFirstError:!0,layout:"vertical",onFinish:D,onChange:function(){var e,n,t=E()({},h.getFieldsValue()),i=null==t||null===(e=t.path)||void 0===e?void 0:e.split("");(null==i||null===(n=i.filter((function(e){return"/"==e})))||void 0===n?void 0:n.length)>1&&(t.path=t.path.substring(0,t.path.length-1)),h.setFieldsValue(E()({},t)),l(t)},children:[(0,X.jsx)(V.Z.Item,{label:"重命名:",name:"path",children:(0,X.jsx)(s.Z,{children:(0,X.jsx)(r.Z,{flex:"1",children:(0,X.jsx)(V.Z.Item,{name:"path",rules:[{required:!0,message:"请输入文件名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"请输入文件名称",size:"middle",defaultValue:B})})})})}),(0,X.jsx)(V.Z.Item,{label:"提交信息:",name:"commitMessage",children:(0,X.jsx)(W.Z,{placeholder:"如不填写,默认提交信息是(".concat(t.defaultPath," rename to 新的名称 )"),size:"middle"})})]})})})})})),ae=t(15309),re=t(59028),ce=t(75498),oe={wrap:"wrap___zK3Vy",title:"title___BgjCb",path:"path___POFX3",colorBlue:"colorBlue___H4_iQ"},le=["shixunsDetail","globalSetting","loading","user","taskData","dispatch","isRepository"],ue=re.Z.Dragger,de=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,user:e.user,loading:t.models.index}}))((function(e){e.shixunsDetail,e.globalSetting,e.loading,e.user;var n,t,s=e.taskData,a=e.dispatch,r=e.isRepository,c=x()(e,le),o=((0,J.useLocation)(),E()(E()({},(0,J.useParams)()),(0,J.useLocation)().query)),l=(0,i.useState)({}),u=Q()(l,2),d=u[0],h=u[1],g=(0,i.useRef)(),f=V.Z.useForm(),p=Q()(f,1)[0],C=(0,i.useState)([]),m=Q()(C,2),k=m[0],B=m[1],v=(0,i.useState)(),D=Q()(v,2),j=D[0],y=D[1];(0,i.useEffect)((function(){c.visible&&(p.resetFields(),B([]))}),[c.visible]),(0,i.useEffect)((function(){g.current=o.id}),[]),(0,i.useEffect)((function(){var e=sessionStorage.getItem("pathArray");if(e){var n=e.split(",").join("/"),t=0===n.indexOf("/")?n.substr(1):n;y(t)}}),[]);var w,S=function(){var e=I()(A()().mark((function e(n){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n.response){e.next=3;break}return N.ZP.info("还未上传完成,无法进行删除操作!"),e.abrupt("return");case 3:return e.next=5,a({type:"shixunsDetail/deleteGitFile",payload:{id:o.id,path:j?"".concat(j,"/").concat(n.name):n.name,message:p.getFieldValue("commitMessage")||"删除了".concat(j?"".concat(j,"/").concat(n.name):n.name),secret_repository:!r||null}});case 5:0===e.sent.status&&(B(k.filter((function(e){return e.uid!==n.uid}))),N.ZP.info("删除成功"));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R={height:300,multiple:!0,withCredentials:!0,data:(w=I()(A()().mark((function e(){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=I()(A()().mark((function e(n,i){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:setTimeout(I()(A()().mark((function e(){var i;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.getFieldsValue();case 2:e.sent,i=E()(E()({},{path:c.defaultPath?c.defaultPath:"",message:d.commitMessage||"上传了".concat(t)}),r?{}:{secret_repository:!0}),n(i);case 5:case"end":return e.stop()}}),e)}))),200);case 1:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(){return w.apply(this,arguments)}),fileList:k,method:"post",action:"".concat(ae.Z.API_SERVER,"/api/myshixuns/").concat(null==s||null===(n=s.myshixun)||void 0===n?void 0:n.identifier,"/upload_git_file.json"),onChange:function(e){if(t=e.file.name,"done"===e.file.status||"uploading"===e.file.status){var n,i,s;if(B(e.fileList),!e.file.response)return;if(0===(null===(n=e.file.response)||void 0===n?void 0:n.status))return void N.ZP.success("上传成功!");B(k.filter((function(n){return n.uid!==e.file.uid}))),(null===(i=e.file.response)||void 0===i?void 0:i.message)&&N.ZP.info(null===(s=e.file.response)||void 0===s?void 0:s.message)}},onRemove:S,beforeUpload:function(e){t=e.name}},H=function(){var e=I()(A()().mark((function e(n){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.validateFields();case 2:c.onClose(),c.onOK({path:c.defaultPath}),P();case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=function(){};return(0,X.jsx)(O.Z,{open:c.visible,onOk:H,centered:!0,onCancel:c.onClose,width:"70%",children:(0,X.jsxs)("section",{className:oe.bg,children:[(0,X.jsxs)("div",{className:oe.wrap,children:[(0,X.jsx)("div",{className:oe.title,children:"上传文件"}),(0,X.jsxs)(V.Z,{className:"mt10",form:p,scrollToFirstError:!0,layout:"vertical",onFinish:H,onValuesChange:function(){return h(E()({},p.getFieldsValue()))},children:[(0,X.jsx)(V.Z.Item,{label:"提交信息:",name:"commitMessage",rules:[{required:!0,message:"请输入提交信息"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"必填,描述主要修改内容(相当于Git Commit message的Header)"})}),(0,X.jsx)(V.Z.Item,{label:"选择文件",name:"file",rules:[{required:!0,message:"请选择文件"}],children:(0,X.jsxs)(ue,E()(E()({},R),{},{children:[(0,X.jsx)("div",{children:(0,X.jsx)("i",{className:"iconfont icon-shangchuan font50 ".concat(oe.colorBlue)})}),(0,X.jsxs)("div",{className:"font14 mt30",children:["拖拽文件或",(0,X.jsx)("span",{className:"".concat(oe.colorBlue," ml5"),children:"点击此处上传"})]})]}))})]})]}),(0,X.jsx)(ce.Z,{onFinish:function(e){return y(e)}})]})})})),he={flex_box_center:"flex_box_center___MMlsc",flex_space_between:"flex_space_between___ti22L",flex_box_vertical_center:"flex_box_vertical_center___YL4jC",flex_box_center_end:"flex_box_center_end___vx3wA",flex_box_column:"flex_box_column___eKe0F",headLeft:"headLeft___dsKhq",colorBlue:"colorBlue___gaxVL",wrap:"wrap___NLIaW",nodata:"nodata___zv745",nodataText:"nodataText___EWDiS",content:"content___i5G9Y",gitCode:"gitCode___W15AY",ellipsis:"ellipsis___sEcFA",menu:"menu___sjQxY",overlayClass:"overlayClass___ofgjv",tips:"tips___WEDOk"},Ae="wrap___WB5qS",ge="content___HZdqT",Ie="mainPathWrap___XMF09",fe="colorBlue___N9Dtz",Ee=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,loading:t.models.index}}))((function(e){var n=e.shixunsDetail,t=(e.globalSetting,e.loading,e.dispatch),s=e.title,a=e.pathList,r=void 0===a?[]:a,c=e.showInputPath,o=void 0!==c&&c,l=e.isMergeSelectFile,u=void 0!==l&&l,d=e.onFinish,h=void 0===d?function(){}:d,g=V.Z.useForm(),f=Q()(g,1)[0],p=E()(E()({},(0,J.useParams)()),(0,J.useLocation)().query),C=(0,J.useLocation)(),x=(0,i.useRef)(),m=(0,i.useState)(""),k=Q()(m,2),B=k[0],v=k[1],D=(0,i.useState)(""),j=Q()(D,2),y=j[0],w=j[1],S=(0,i.useState)([]),R=Q()(S,2),H=R[0],P=R[1],M=(0,i.useState)([]),b=Q()(M,2),G=b[0],Y=b[1];(0,i.useEffect)((function(){var e;x.current="repository"===(null===(e=C.pathname)||void 0===e||null===(e=e.split("/"))||void 0===e?void 0:e[3])}),[]),(0,i.useEffect)((function(){if("Repository-SelectFilePath"===n.actionTabs.key){var e=r.join("/"),t=[];r.map((function(n,i){0===i?t.push({val:"根目录",path:""},{val:"/".concat(n),path:e}):t.push({val:"/".concat(n),path:e})})),P(t),v(e),w(e),F(e)}}),[n.actionTabs.key]);var F=function(){var e=I()(A()().mark((function e(n){var i;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:x.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:p.id,path:n}});case 2:(i=e.sent)&&Y(i.trees||[]);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=I()(A()().mark((function e(){var n,i,s;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null==f?void 0:f.getFieldsValue(),i=B?"".concat(B).concat(null!=n&&n.name?"/".concat(null==n?void 0:n.name):""):null==n?void 0:n.name,!u){e.next=6;break}return h(i),U(),e.abrupt("return");case 6:if(!o){e.next=16;break}return e.next=9,f.validateFields();case 9:return e.next=11,t({type:"shixunsDetail/uploadGitFolder",payload:E()(E()({},{id:p.id,path:i}),x.current?{}:{secret_repository:!0})});case 11:s=e.sent,h(y),0===s.status&&N.ZP.info("新建成功"),e.next=18;break;case 16:h(i),N.ZP.success("选择文件目录成功");case 18:U();case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){t({type:"shixunsDetail/setActionTabs",payload:{}}),f.resetFields()};return(0,X.jsx)(O.Z,{centered:!0,title:s||"新建文件夹",closable:!1,keyboard:!1,open:"Repository-SelectFilePath"===n.actionTabs.key,onOk:T,onCancel:U,children:(0,X.jsxs)("div",{className:Ae,children:[(0,X.jsxs)("div",{className:ge,children:[(0,X.jsx)("div",{className:Ie,children:!(null==H||!H.length)&&H.map((function(e,n){return(0,X.jsx)("a",{onClick:function(){return function(e,n){var t=H.filter((function(e,t){return t<=n}));P(t);var i=t.filter((function(e,n){return 0!==n})).map((function(e){return e.val})).join("").substr(1);v(i),F(i)}(0,n)},children:e.val},n)}))}),!(null==G||!G.length)&&G.map((function(e,n){return"tree"===e.type&&(0,X.jsxs)("a",{onClick:function(){return function(e){var n=B;"tree"===e.type&&(H.length?H.push({val:"/".concat(e.name),path:e.name}):H.push({val:"根目录",path:""},{val:"/".concat(e.name),path:e.name}),P(H),n=B?"".concat(B,"/").concat(e.name):e.name,v(n)),F(n)}(e)},children:[(0,X.jsx)("i",{className:"iconfont icon-wenjianjia ".concat(fe)}),e.name]},n)}))]}),(0,X.jsx)("label",{className:"mt5",children:"选中的新建文件夹目录:"}),(0,X.jsx)("div",{className:"mt5 mb5",children:B}),o&&(0,X.jsx)(V.Z,{form:f,scrollToFirstError:!0,className:"mt20",children:(0,X.jsx)(V.Z.Item,{name:"name",rules:[{required:!0,message:"请输入名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,X.jsx)(W.Z,{placeholder:"请输入新文件夹名/子文件夹名。(如:src/step1)"})})})]})})})),pe=t(94172),Qe=t(78386),Ce=t(18620),xe=t(89392),me=(t(2010),t(4366)),ke=["shixunsDetail","globalSetting","loading","user","activeKey","dispatch","taskData","practiceSetting","isRepository","treeData","setTreeData","params"],Be=L.Z.DirectoryTree,ve=function(){return(0,X.jsxs)("div",{className:"mt20 pb50 ".concat(he.nodata),children:[(0,X.jsxs)("div",{className:he.headLeft,children:["提示:",(0,X.jsx)("br",{}),"此处存放本实训所需的所有代码等相关文件,你可以通过以下",(0,X.jsx)("br",{}),"两种方式来使用:",(0,X.jsx)("br",{}),"1、",(0,X.jsx)("a",{href:"/forums/2784",target:"_blank",children:"Git客户端"})," 上传已有文件来开始使用。",(0,X.jsx)("br",{}),"2、直接在平台上创建文件目录以及相关代码文件。"]}),(0,X.jsx)("img",{width:"100%",src:me.Oe})]})},De=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading,i=e.globalSetting,s=e.practiceSetting;return{shixunsDetail:n,globalSetting:i,user:e.user,practiceSetting:s,loading:t}}))((function(e){var n,t,a,c=e.shixunsDetail,o=(e.globalSetting,e.loading),u=(e.user,e.activeKey,e.dispatch),d=e.taskData,h=e.practiceSetting,g=e.isRepository,f=e.treeData,p=e.setTreeData,C=e.params,m=(x()(e,ke),(0,J.useLocation)()),k=(0,i.useState)(),B=Q()(k,2),v=B[0],D=(B[1],(0,i.useState)(!1)),j=Q()(D,2),y=j[0],w=j[1],S=(0,i.useState)(!1),R=Q()(S,2),H=R[0],P=R[1],M=(0,i.useState)(!1),b=Q()(M,2),F=b[0],T=b[1],L=(0,i.useState)(!1),V=Q()(L,2),W=V[0],q=V[1],_=(0,i.useState)(""),ee=Q()(_,2),ne=ee[0],ie=ee[1],ae=(0,i.useState)([]),re=Q()(ae,2),ce=re[0],oe=re[1],le=(0,i.useState)([]),ue=Q()(le,2),Ae=ue[0],ge=ue[1],Ie=(0,i.useState)([]),fe=Q()(Ie,2),me=(fe[0],fe[1]),De=(0,i.useState)(!1),je=Q()(De,2),ye=je[0],we=je[1],Se=(0,i.useState)(),Re=Q()(Se,2),He=(Re[0],Re[1]),Pe=(0,i.useState)(),Me=Q()(Pe,2),Je=(Me[0],Me[1]),be=(0,i.useState)(""),Ge=Q()(be,2),Ne=(Ge[0],Ge[1]),Ye=(0,i.useState)(),Fe=Q()(Ye,2),Oe=(Fe[0],Fe[1]),Te=(0,i.useState)(!1),Ue=Q()(Te,2),Ze=Ue[0],Le=Ue[1];(0,i.useEffect)((function(){p([]),en(""),localStorage.warehouseHideTip||we(!0)}),[m.pathname,g]),(0,i.useEffect)((function(){var e;if(null!=d&&null!==(e=d.challenge)&&void 0!==e&&e.path&&null!=f&&f.length){var n,t,i=null==d||null===(n=d.challenge)||void 0===n||null===(n=n.path)||void 0===n?void 0:n.replaceAll(";",""),s=null===(t=(0,xe.cloneDeep)(f))||void 0===t?void 0:t.filter((function(e){var n;return e.name===(null==i||null===(n=i.split("/"))||void 0===n?void 0:n[0])}));ze(i),1!==(null==f?void 0:f.length)&&(console.log(s,"filterTreeData"),p(s))}}),[null==d||null===(n=d.challenge)||void 0===n?void 0:n.path,f]);var ze=function(e){qe(e),Ae=[e],ge([e])},Ke=function(){var e=I()(A()().mark((function e(){var n,t=arguments;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.length>0&&void 0!==t[0]?t[0]:"",e.next=3,(0,Ce.Zt)({id:C.id,secret_dir_path:n});case 3:e.sent&&Oe(n);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ve=function(e){return(0,X.jsxs)(Y.Z,{className:he.menu,onClick:function(n){switch(ie(e.path||""),n.key){case"1":(0,l.L9)(["实践项目","设置","代码仓库","新建文件"]),w(!0);break;case"2":(0,l.L9)(["实践项目","设置","代码仓库","新建文件夹"]),T(!0);break;case"3":(0,l.L9)(["实践项目","设置","代码仓库","上传"]),q(!0);break;case"4":(0,l.L9)(["实践项目","设置","代码仓库","重命名"]),P(!0);break;case"5":(0,l.L9)(["实践项目","设置","代码仓库","删除"]),sn(e.path,e.name,e);break;case"6":(0,l.L9)(["实践项目","设置","代码仓库","复制路径"]),an(e)}},children:[("topTree"===e.type||"tree"===e.type)&&(0,X.jsx)(Y.Z.Item,{children:"新建文件"},"1"),("topTree"===e.type||"tree"===e.type)&&(0,X.jsx)(Y.Z.Item,{children:"新建文件夹"},"2"),("topTree"===e.type||"tree"===e.type)&&(0,X.jsx)(Y.Z.Item,{children:"上传"},"3"),"topTree"!==e.type&&"tree"!==e.type&&(0,X.jsx)(Y.Z.Item,{children:"重命名"},"4"),"topTree"!==e.type&&(0,X.jsx)(K.CopyToClipboard,{text:"/data/workspace/myshixun/".concat(g?"":"secret/").concat(null==e?void 0:e.path),onCopy:function(){return N.ZP.success("复制成功")},children:(0,X.jsx)(Y.Z.Item,{children:(0,X.jsx)(X.Fragment,{children:"复制路径"})},"6")}),"topTree"!==e.type&&(0,X.jsx)(Y.Z.Item,{children:"删除"},"5")]})},We=function(e,n){return e.map((function(e){return e.path=""==n?n+e.name:n+"/"+e.name,e.title=(0,X.jsxs)(s.Z,{className:"font14",children:[(0,X.jsx)(r.Z,{flex:"1",children:(0,X.jsxs)(s.Z,{children:[(0,X.jsx)(r.Z,{flex:"20px",children:"blob"===e.type&&(0,X.jsx)("span",{className:"iconfont icon-wenjian11 font12"})}),(0,X.jsx)(r.Z,{flex:"1",children:(0,X.jsx)("span",{className:" multi_ellipsis1",children:e.name})})]})}),(0,X.jsx)(r.Z,{children:("blob"===e.type||"tree"===e.type)&&(0,X.jsx)(z.Z,{dropdownRender:function(){return Ve(e)},className:he.ellipsis,children:(0,X.jsx)("i",{className:"iconfont icon-gengduo2 c-555a88"})})})]}),e.disableCheckbox=v&&v!==e.name,e.className="tree"===e.type?he.pl23:"",e.checkable="tree"!==e.type,e.isLeaf="tree"!==e.type,e.children="tree"===e.type&&[],e.key=e.path,e}))},qe=function(e){u({type:"practiceSetting/setSideBarTabs",payload:{selectPath:e}})},Xe=function(){var e=I()(A()().mark((function e(n,t){var i;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=n.split("/"),e.next=3,en(ne);case 3:setTimeout((function(){qe(n),ce=[i[0]||""],Ae=[n],ge(U()(Ae)),oe(U()(ce))}),150);case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),_e=function(e,n){if(console.log(e,"data"),""==n)p(U()(e));else{var t=$e(f,n,e);p([].concat(t))}};function $e(e,n,t){return e.map((function(e){return e.key===n?(e.children=U()(t),E()({},e)):e.children?E()(E()({},e),{},{children:$e(e.children,n,t)}):e}))}var en=function(){var e=I()(A()().mark((function e(){var n,t,i,s,a,r,c=arguments;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=c.length>0&&void 0!==c[0]?c[0]:"",console.log("location:",m),e.next=4,(0,Z.pU)(null==d||null===(n=d.myshixun)||void 0===n?void 0:n.identifier,{path:t});case 4:return(i=e.sent)&&(null!==(s=i.trees)&&void 0!==s&&s.length?(r=We(U()(i.trees),t),_e(r,t),me(i.trees||[]),Je((null==i?void 0:i.secret_dir_path)||""),console.log("handleGetRepository:",r,t),setTimeout((function(){return console.log(f)}),2e3)):""==t&&p([]),He((null===(a=i.commits)||void 0===a?void 0:a[0])||{})),e.abrupt("return",i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),nn=function(){var e=I()(A()().mark((function e(n){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=I()(A()().mark((function e(t,i){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.children.length&&t(),Ne(n.path),e.next=4,en(n.path);case 4:t();case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),tn=function(){var e=I()(A()().mark((function e(n,t){var i,s;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("handleSelectTree",n,t.nativeEvent.target.nodeName,t),i=function(){qe(t.node.path),n=[t.node.path],ge(U()(n))},"svg"!==t.nativeEvent.target.nodeName&&"LI"!==t.nativeEvent.target.nodeName&&"I"!==t.nativeEvent.target.nodeName){e.next=4;break}return e.abrupt("return");case 4:"blob"===t.node.type&&(null!=h&&null!==(s=h.sideBar)&&void 0!==s&&s.confirmLeave?O.Z.confirm({title:"离开此页提示",content:"系统可能不会保存您所做的更改。",okText:"离开",cancelText:"取消",onOk:function(){i(),u({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})}}):i());case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),sn=function(e,n,t){var i;O.Z.confirm({centered:!0,title:"确认需要删除该文件".concat(t.children?"夹":"","?"),okText:"确定",cancelText:"取消",onOk:(i=I()(A()().mark((function n(){var t,i,s,a;return A()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Z.bD)({id:null==d||null===(t=d.myshixun)||void 0===t?void 0:t.identifier,path:e,message:"删除".concat(e)});case 2:if(i=n.sent,s=e.split("/"),0!==(null==i?void 0:i.status)){n.next=20;break}return N.ZP.info("删除成功"),s.splice(s.length-1,1),n.next=9,en(s.length>1?s.join("/"):"");case 9:if(null==(a=n.sent)||!a.trees){n.next=13;break}n.next=16;break;case 13:return s.splice(s.length-1,1),n.next=16,en(s.length>1?s.join("/"):"");case 16:return qe(""),n.abrupt("return",!0);case 20:-3===(null==i?void 0:i.status)&&O.Z.info({title:"删除失败",content:(0,X.jsxs)("div",{children:["该文件“",e,"”已经被任务关卡的学员任务文件或评测执行文件使用,请先修改任务关卡中评测设置的文件路径后再删除。"]}),okText:"我知道了",onOk:function(){}});case 21:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)})})},an=function(e){console.log(e,"item")},rn=function(){var e=I()(A()().mark((function e(n,t){return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("handleExpand",t),"svg"!==t.nativeEvent.target.nodeName&&"path"!==t.nativeEvent.target.nodeName&&"LI"!==t.nativeEvent.target.nodeName){e.next=5;break}return e.abrupt("return",!0);case 5:return e.next=7,nn(t.node);case 7:ce.includes(t.node.path)?ce.splice(ce.indexOf(t.node.path),1):ce.push(t.node.path);case 8:oe(U()(ce));case 9:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),cn=function(){we(!1),localStorage.warehouseHideTip=!0},on=function(){var e=I()(A()().mark((function e(n){var t,i;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(n),n.node.key,n.dragNode.key,t=n.node.pos.split("-"),n.dropPosition-Number(t[t.length-1]),"tree"===n.node.type&&1!==n.dragNode.path.split("/").length){e.next=8;break}return N.ZP.warning("未移动文件目录位置"),e.abrupt("return");case 8:return e.next=10,u({type:"shixunsDetail/moveGitFile",payload:{id:C.id,from:n.dragNode.path,to:n.node.path+"/"+n.dragNode.name,message:"".concat(n.dragNode.path," move to ").concat(n.node.path+"/"+n.dragNode.name," ")}});case 10:if(0!==e.sent.status){e.next=22;break}return qe(""),(i=n.dragNode.path.split("/")).pop(),e.next=17,en(n.node.path);case 17:return e.next=19,en(i.join("/"));case 19:return i.pop(),e.next=22,en(i.join("/"));case 22:return e.abrupt("return");case 28:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,X.jsxs)("section",{className:he.bg,children:[(0,X.jsx)("div",{className:he.contentbg,children:(0,X.jsxs)("div",{className:he.wrap,children:[(0,X.jsxs)(s.Z,{className:he.gitCode,children:[(0,X.jsxs)(r.Z,{flex:"1",children:[(0,X.jsx)("span",{className:"iconfont icon-daimacangku2 mr8"}),g?"代码仓库":"私密代码仓库"]}),(0,X.jsx)(r.Z,{children:(0,X.jsx)(z.Z,{dropdownRender:function(){return Ve({type:"topTree"})},className:"current",children:(0,X.jsx)(G.Z,{open:ye,title:(0,X.jsxs)("div",{className:"font16",children:[(0,X.jsx)(pe.Z,{style:{position:"relative",left:-35},onClick:function(){return cn()}}),"点击此处新建文件、新建文件夹、上传文件。",(0,X.jsx)("span",{onClick:function(){return cn()},className:"iconfont icon-guanbi1 ml8 current font14"})]}),overlayClassName:he.overlayClass,overlayStyle:{maxWidth:500},arrowPointAtCenter:!0,placement:"right",color:"#F7B500"})})})]}),!!f.length&&!g&&(0,X.jsx)("div",{className:"mt20 pl20 pr20 font14 c-white",children:(0,X.jsx)("div",{children:"实训评测的时候,系统会临时将私密代码库移动普通代码库的secret目录下面,评测结束会清空secret目录内容。如果私密代码库中存在文件src/test.sh,在普通代码库调用该文件则使用路径:secret/src/test.sh"})}),f.length?(0,X.jsx)(X.Fragment,{children:(0,X.jsx)("div",{className:he.content,children:(0,X.jsx)(Be,{disabled:!!o.effects["shixunsDetail/getFileContent"],multiple:!0,showIcon:!1,treeData:f,switcherIcon:(0,X.jsx)(Qe.Z,{style:{fontWeight:"bold",fontSize:14,position:"relative",top:3,marginLeft:22}}),onExpand:rn,expandedKeys:ce,selectedKeys:Ae,onSelect:tn,draggable:!0,onDragEnter:function(e){console.log(e)},onDrop:on,allowDrop:function(e){e.dropNode,e.dropPosition;return!1}})})}):"",!f.length&&g&&(null==c||null===(t=c.detail)||void 0===t?void 0:t.init_repository)&&(0,X.jsx)(ve,{}),!f.length&&!g&&(null==c||null===(a=c.detail)||void 0===a?void 0:a.secret_repository)&&(0,X.jsx)(ve,{})]})}),(0,X.jsx)(se,{taskData:d,open:H,defaultPath:ne,onClose:function(){return P(!1)},isRepository:!g,onOK:function(){var e=I()(A()().mark((function e(n){var t;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=ne.split("/")).pop(),e.next=4,en(t.join("/"));case 4:qe("");case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}),(0,X.jsx)(te,{taskData:d,visible:y,defaultPath:ne,onClose:function(){return w(!1)},isRepository:g,onOK:function(e){Xe(e.path,e.name)}}),(0,X.jsx)($,{taskData:d,visible:F,defaultPath:ne,onClose:function(){return T(!1)},isRepository:g,onOK:function(e){Xe(e.path,e.name)}}),(0,X.jsx)(de,{taskData:d,defaultPath:ne,visible:W,isRepository:g,onClose:function(){return q(!1)},onOK:function(){var e=I()(A()().mark((function e(n){var t;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=ne.split("/"),e.next=3,en(ne);case 3:ce=[t[0]||""],Ae=[ne],ge(U()(Ae)),oe(U()(ce));case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}),(0,X.jsx)(Ee,{pathList:null==ne?void 0:ne.split("/"),showInputPath:!0,isMergeSelectFile:Ze,onFinish:function(e){Ze?Ke(e):en(e),Le(!1)}})]})})),je={flex_box_center:"flex_box_center___e0Vsb",flex_space_between:"flex_space_between___fOYBZ",flex_box_vertical_center:"flex_box_vertical_center___etkby",flex_box_center_end:"flex_box_center_end___T2Etw",flex_box_column:"flex_box_column___pALN8",commitWrap:"commitWrap___Mdvi5",wrap:"wrap___ORj56",colorGray:"colorGray___Q64q1",content:"content___PuAlb",itemTime:"itemTime___IfizK",imageUrl:"imageUrl___BCM2C",blueLight:"blueLight___D24GG",divider:"divider___pIU7h",empty:"empty___F575C"},ye=t(28103),we=["shixunsDetail","globalSetting","loading","user","dispatch","isRepository"],Se=(0,J.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,user:e.user,loading:t.models.index}}))((function(e){e.shixunsDetail,e.globalSetting,e.loading,e.user;var n=e.dispatch,t=e.isRepository,a=(x()(e,we),E()(E()({},(0,J.useParams)()),(0,J.useLocation)().query)),c=(0,i.useState)([]),o=Q()(c,2),l=o[0],u=o[1];(0,i.useEffect)((function(){d()}),[t]);var d=function(){var e=I()(A()().mark((function e(){var i;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"shixunsDetail/getRepositoryCommit",payload:{id:a.id,secret_repository:!t||void 0}});case 2:(i=e.sent)&&u(i.commits||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,X.jsxs)(X.Fragment,{children:[""==l&&(0,X.jsxs)("div",{className:je.empty,children:[(0,X.jsx)("img",{src:me.em,width:"258"}),(0,X.jsx)("br",{}),(0,X.jsx)("span",{className:"c-grey-c font14",children:"暂无提交记录"})]}),""!=l&&(0,X.jsx)("section",{className:je.bg,children:(0,X.jsx)("div",{className:je.wrap,children:(0,X.jsx)("div",{className:je.content,children:null==l?void 0:l.map((function(e){var n,t;return(0,X.jsxs)("div",{children:[(0,X.jsx)(s.Z,{align:"middle",className:"c-white font16",children:(0,X.jsx)(r.Z,{children:e.title})}),(0,X.jsxs)(s.Z,{align:"middle",className:"mt20 ",children:[(0,X.jsx)(r.Z,{children:(0,X.jsx)("img",{className:je.imageUrl,src:ae.Z.IMG_SERVER+"/"+(null===(n=e.author)||void 0===n?void 0:n.image_url)})}),(0,X.jsx)(r.Z,{className:je.blueLight,children:(0,X.jsx)("span",{className:"ml20",children:null===(t=e.author)||void 0===t?void 0:t.username})}),(0,X.jsxs)(r.Z,{children:[(0,X.jsx)("span",{className:"ml20 ".concat(je.blueLight),children:"提交于"}),(0,X.jsx)("span",{className:"ml20 ".concat(je.blueLight),children:e.time})]})]}),(0,X.jsx)(ye.Z,{className:je.divider})]})}))})})})]})})),Re=t(13282),He=["globalSetting","loading","dispatch","practiceSetting","shixunsDetail","taskData","taskId","onEditRepCode"],Pe=(b.Z.TabPane,(0,J.connect)((function(e){var n=e.loading;return{globalSetting:e.globalSetting,loading:n,practiceSetting:e.practiceSetting,shixunsDetail:e.shixunsDetail}}))((function(e){e.globalSetting;var n,t,c,o,l,u,d=e.loading,h=e.dispatch,g=e.practiceSetting,f=e.shixunsDetail,p=e.taskData,C=e.taskId,b=e.onEditRepCode,T=(x()(e,He),!(null!=p&&p.is_last_game)&&((null==p?void 0:p.shixun.status)>0||(null==p||null===(n=p.user)||void 0===n?void 0:n.identity)<5)),U=(0,i.useState)("1"),L=Q()(U,2),z=L[0],K=L[1],V=(0,i.useState)("1"),W=Q()(V,2),q=W[0],_=W[1],$=(0,i.useState)(!0),ee=Q()($,2),ne=ee[0],te=ee[1],ie=(0,i.useState)({}),se=Q()(ie,2),ae=se[0],re=se[1],ce=((0,i.useRef)(),(0,i.useState)(!0)),oe=Q()(ce,2),le=oe[0],ue=oe[1],de=(0,i.useState)(["2","1"]),he=Q()(de,2),Ae=he[0],ge=he[1],Ie=(0,i.useState)([]),fe=Q()(Ie,2),Ee=fe[0],pe=fe[1],Qe=(0,i.useRef)(),Ce=E()(E()({},(0,J.useParams)()),{},{taskId:C}),xe=(0,i.useState)(!1),ke=Q()(xe,2),Be=ke[0],ve=ke[1],je=[{id:"1",name:"代码仓库"},{id:"2",name:(0,X.jsxs)("span",{children:[(0,X.jsx)("span",{children:"私密代码仓库"}),(0,X.jsx)(G.Z,{title:"私密版本库的文件对学员始终隐藏,无法访问查看。",children:(0,X.jsx)("i",{className:"iconfont icon-xiaowenhao",style:{marginLeft:2,fontSize:14}})})]})}];(0,i.useEffect)((function(){var e,n=null==g||null===(e=g.sideBar)||void 0===e?void 0:e.selectPath.split("/");ge(n)}),[null==g||null===(t=g.sideBar)||void 0===t?void 0:t.selectPath]);var ye=function(e){"compileResltDone"===e.data&&ve(!1)};(0,i.useEffect)((function(){return window.addEventListener("message",ye),function(){window.removeEventListener("message",ye)}}),[]);(0,i.useEffect)((function(){var e;console.log(null==g||null===(e=g.sideBar)||void 0===e?void 0:e.selectPath,"sideBar"),new Promise(function(){var e=I()(A()().mark((function e(n,t){var i,s,a,r,c,o,l;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""===(null==g||null===(i=g.sideBar)||void 0===i?void 0:i.selectPath)||null==g||null===(s=g.sideBar)||void 0===s||!s.selectPath){e.next=5;break}return e.next=3,(0,Z.li)(C,{path:null==g||null===(a=g.sideBar)||void 0===a?void 0:a.selectPath});case 3:if(null!=(r=e.sent)&&r.content||""==(null==r?void 0:r.content))try{"txt"===(null==r?void 0:r.file_type)?(r.content=window.decodeURIComponent(escape(window.atob(null===(c=r.content)||void 0===c?void 0:c.content))),re(E()({},r))):(r.content=null===(o=r.content)||void 0===o?void 0:o.content,re(E()({},r)))}catch(e){ae.content&&(r.content=window.atob(null===(l=r.content)||void 0===l?void 0:l.content)),re(E()({},r)),N.ZP.warning("请确认文件字符集编码是否为UTF-8")}else h({type:"practiceSetting/setSideBarTabs",payload:{selectPath:""}});case 5:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}())}),[null==g||null===(c=g.sideBar)||void 0===c?void 0:c.selectPath]);Y.Z,Y.Z.Item,je.filter((function(e){var n,t;return null==f||null===(n=f.detail)||void 0===n||!n.init_repository||null!=f&&null!==(t=f.detail)&&void 0!==t&&t.is_jupyter_lab?"2"!==e.id:e})).map((function(e,n){return(0,X.jsx)(Y.Z.Item,{className:"leaveClick",children:e.name},e.id)}));var we=function(){var e=I()(A()().mark((function e(){var n,t,i,s,a;return A()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ve(!0),e.next=3,(0,Z.n4)(null==p||null===(n=p.myshixun)||void 0===n?void 0:n.identifier,E()(E()({path:null==g||null===(t=g.sideBar)||void 0===t?void 0:t.selectPath},ae),{},{evaluate:0,game_id:null==p||null===(i=p.game)||void 0===i?void 0:i.id}));case 3:a=e.sent,null===(s=document.getElementById("latexIframeRef"))||void 0===s||null===(s=s.contentWindow)||void 0===s||s.postMessage("compile","*"),null!=a&&a.content&&h({type:"practiceSetting/setSideBarTabs",payload:E()(E()({},g.sideBar),{},{confirmLeave:!1})});case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,X.jsx)("div",{className:m,children:(0,X.jsxs)("div",{className:k,children:["1"===q&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)("aside",{className:B,id:"latex-drawer",style:{width:ne?"36%":"0%"},children:[(0,X.jsx)(F.Z,{spinning:!!d.effects["shixunsDetail/getRepository"],wrapperClassName:"".concat(j," ").concat(M),children:(0,X.jsx)(De,{taskData:p,params:Ce,setTreeData:pe,treeData:Ee,activeKey:z,isRepository:le})}),(0,X.jsx)("span",{onClick:function(){return te(!1)},className:"".concat(v," iconfont icon-quxiao")})]}),(0,X.jsxs)("aside",{className:D,ref:Qe,children:[""!==(null==g||null===(o=g.sideBar)||void 0===o?void 0:o.selectPath)&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(F.Z,{spinning:!!d.effects["shixunsDetail/getFileContent"],wrapperClassName:j,children:[(0,X.jsx)("div",{className:H,children:(0,X.jsxs)(s.Z,{align:"middle",className:"w100",children:[(0,X.jsx)(r.Z,{children:(0,X.jsx)("span",{onClick:function(){return te(!0)},className:"iconfont icon-daimacangku2 c-white current"})}),(0,X.jsx)(r.Z,{flex:"40px",children:(0,X.jsx)("div",{className:w,style:{marginLeft:20}})}),(0,X.jsx)(r.Z,{className:P,children:Ae.map((function(e,n){return(0,X.jsx)("span",{className:"c-blue",children:e})}))})]})}),(0,X.jsx)("div",{className:d.effects["shixunsDetail/getFileContent"]?"hide":"show",children:(0,X.jsx)(Re.Z,{className:"darkBlue",style:{top:66,height:"calc(100% - 60px)",position:"absolute"},filename:ae.filename,type:"office"===ae.file_type?"download":ae.file_type,data:ae.content,monacoEditor:{value:ae.content,language:ae.language,onChange:function(e){return function(e){"txt"===(null==ae?void 0:ae.file_type)&&(ae.content=e,re(E()({},ae)),b(e))}(e)},options:{fontSize:14,minimap:{enabled:!1}}}})})]}),"txt"===(null==ae?void 0:ae.file_type)&&(0,X.jsxs)("div",{className:S,children:[(null==p?void 0:p.prev_game)&&(0,X.jsx)("a",{href:"/tasks/".concat(null==p?void 0:p.prev_game).concat(location.search),style:{marginRight:"auto"},onClick:function(e){e.preventDefault(),setTimeout((function(){return window.location.href="/tasks/".concat(null==p?void 0:p.prev_game).concat(location.search)}),300)},children:"上一关"}),(0,X.jsx)(a.ZP,{type:"primary",size:"middle",loading:Be,onClick:we,children:"开始编译"}),T&&(0,X.jsx)("a",{href:"/tasks/".concat(null==p?void 0:p.next_game).concat(location.search),style:{marginLeft:"auto"},onClick:function(e){var n,t;e.preventDefault(),null!=p&&null!==(n=p.shixun)&&void 0!==n&&n.task_pass||2===(null==p?void 0:p.game.status)||(null==p||null===(t=p.user)||void 0===t?void 0:t.identity)<5?setTimeout((function(){return window.location.href="/tasks/".concat(null==p?void 0:p.next_game).concat(location.search)}),300):O.Z.warning({centered:!0,width:530,title:"提示",okText:"我知道了",content:(0,X.jsx)("p",{children:"该实践项目设置了不允许跳关。通过当前关卡后,才能进入下一关。"})})},children:"下一关"})]})]}),""==(null==g||null===(l=g.sideBar)||void 0===l?void 0:l.selectPath)&&(null==f||null===(u=f.detail)||void 0===u?void 0:u.init_repository)&&(0,X.jsxs)("div",{className:y,children:[(0,X.jsx)("img",{src:me.x7,width:"258"}),(0,X.jsx)("br",{}),(0,X.jsxs)("span",{className:"c-grey-c",children:[!(null==Ee||!Ee.length)&&"在左侧代码仓库区域点击目录打开文件",!(null!=Ee&&Ee.length)&&"请先在左侧上传文件或新建文件!"]})]})]})]}),"2"===q&&(0,X.jsx)("div",{className:R,children:(0,X.jsx)(Se,{isRepository:le})})]})})}))),Me=function(e){var n=e.taskId,t=e.taskData,h=e.onEditRepCode,A=(0,i.useRef)(),g=(0,i.useRef)(),I=(0,i.useMemo)((function(){if(t){var e,i,s,a=null==t||null===(e=t.challenge)||void 0===e||null===(e=e.path)||void 0===e||null===(e=e.replace(";",";"))||void 0===e?void 0:e.split(";")[0];return"https://latexjs.educoder.net/index.html?id=".concat(null==t||null===(i=t.shixun)||void 0===i?void 0:i.identifier,"&path=").concat(a,"&taskId=").concat(n,"&myshixunId=").concat(null==t||null===(s=t.myshixun)||void 0===s?void 0:s.identifier,"&token=").concat((0,l.ej)("_educoder_session"))}}),[t]);return(0,X.jsxs)(s.Z,{style:{height:"100vh"},ref:g,children:[(0,X.jsx)(a.ZP,{onClick:function(){(0,o.ZP)("/api/home/test_sign.json",{method:"get",params:{id:1,name:void 0,age:null,c:{a:112},aa:[],test:"12321313",b:""}})},children:"get测试1"}),(0,X.jsx)(a.ZP,{onClick:function(){(0,o.ZP)("/api/home/test_sign.json",{method:"get",params:{}})},children:"get测试2"}),(0,X.jsx)(a.ZP,{onClick:function(){(0,o.ZP)("/api/home/test_sign.json",{method:"post",body:{id:1,name:void 0,age:null,c:{},cc:{n:1,p:22},aa:[],dd:["SDafadsf","&&"],test:"12321313",b:"sadfjsdfjdkljflsajflasf&&&fdsahfasfasfasdfsadf"}})},children:"post1"}),(0,X.jsx)(a.ZP,{onClick:function(){(0,o.ZP)("/api/home/test_sign.json",{method:"post"})},children:"post2"}),(0,X.jsx)(r.Z,{flex:"1",children:(null==t?void 0:t.shixun)&&(0,X.jsx)(Pe,{taskId:n,taskData:t,onEditRepCode:h})}),(0,X.jsxs)(r.Z,{flex:"1",className:u,children:[(0,X.jsx)("iframe",{ref:A,id:"latexIframeRef",style:{width:"100%",border:"none",height:"100%"},src:I}),(0,X.jsxs)("span",{className:d,onClick:function(){(0,c.vp)()?(0,c.BU)():(0,c.Dj)(g.current)},children:[(0,X.jsx)("span",{className:"iconfont icon-quanping mr5 font12"}),"全屏 / 退出全屏"]})]})]})}},75498:function(e,n,t){"use strict";t.d(n,{Z:function(){return m}});var i=t(82242),s=t.n(i),a=t(7557),r=t.n(a),c=t(41498),o=t.n(c),l=t(79800),u=t.n(l),d=t(59301),h=t(65363),A=t(78241),g=t(8591),I=t(43418),f=t(73782),E="wrap___TwY3U",p="content___Ks95W",Q="mainPathWrap___CrMaa",C="colorBlue___dvWbP",x=t(37712),m=(0,h.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,loading:t.models.index}}))((function(e){var n=e.shixunsDetail,t=(e.globalSetting,e.loading,e.dispatch),i=e.title,a=e.pathList,c=void 0===a?[]:a,l=e.showInputPath,m=void 0!==l&&l,k=e.isMergeSelectFile,B=void 0!==k&&k,v=e.onFinish,D=void 0===v?function(){}:v,j=A.Z.useForm(),y=u()(j,1)[0],w=(0,h.useParams)(),S=(0,h.useLocation)(),R=(0,d.useRef)(),H=(0,d.useState)(""),P=u()(H,2),M=P[0],J=P[1],b=(0,d.useState)(""),G=u()(b,2),N=G[0],Y=G[1],F=(0,d.useState)([]),O=u()(F,2),T=O[0],U=O[1],Z=(0,d.useState)([]),L=u()(Z,2),z=L[0],K=L[1];(0,d.useEffect)((function(){var e;R.current="repository"===(null===(e=S.pathname)||void 0===e||null===(e=e.split("/"))||void 0===e?void 0:e[3])}),[]),(0,d.useEffect)((function(){if("Repository-SelectFilePath"===n.actionTabs.key){var e=c.join("/"),t=[];c.map((function(n,i){0===i?t.push({val:"根目录",path:""},{val:"/".concat(n),path:e}):t.push({val:"/".concat(n),path:e})})),U(t),J(e),Y(e),V(e)}}),[n.actionTabs.key]);var V=function(){var e=o()(r()().mark((function e(n){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:R.current?"shixunsDetail/getRepository":"shixunsDetail/getSecretRepository",payload:{id:w.id,path:n}});case 2:(i=e.sent)&&K(i.trees||[]);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),W=function(){var e=o()(r()().mark((function e(){var n,i,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=null==y?void 0:y.getFieldsValue(),i=M?"".concat(M).concat(null!=n&&n.name?"/".concat(null==n?void 0:n.name):""):null==n?void 0:n.name,!B){e.next=6;break}return D(i),q(),e.abrupt("return");case 6:if(!m){e.next=16;break}return e.next=9,y.validateFields();case 9:return e.next=11,t({type:"shixunsDetail/uploadGitFolder",payload:s()(s()({},{id:w.id,path:i}),R.current?{}:{secret_repository:!0})});case 11:a=e.sent,D(N),0===a.status&&g.ZP.info("新建成功"),e.next=18;break;case 16:D(i),g.ZP.success("选择文件目录成功");case 18:q();case 19:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){t({type:"shixunsDetail/setActionTabs",payload:{}}),y.resetFields()};return(0,x.jsx)(I.Z,{centered:!0,title:i||"新建文件夹",closable:!1,keyboard:!1,open:"Repository-SelectFilePath"===n.actionTabs.key,onOk:W,onCancel:q,children:(0,x.jsxs)("div",{className:E,children:[(0,x.jsxs)("div",{className:p,children:[(0,x.jsx)("div",{className:Q,children:!(null==T||!T.length)&&T.map((function(e,n){return(0,x.jsx)("a",{onClick:function(){return function(e,n){var t=T.filter((function(e,t){return t<=n}));U(t);var i=t.filter((function(e,n){return 0!==n})).map((function(e){return e.val})).join("").substr(1);J(i),V(i)}(0,n)},children:e.val},n)}))}),!(null==z||!z.length)&&z.map((function(e,n){return"tree"===e.type&&(0,x.jsxs)("a",{onClick:function(){return function(e){var n=M;"tree"===e.type&&(T.length?T.push({val:"/".concat(e.name),path:e.name}):T.push({val:"根目录",path:""},{val:"/".concat(e.name),path:e.name}),U(T),n=M?"".concat(M,"/").concat(e.name):e.name,J(n)),V(n)}(e)},children:[(0,x.jsx)("i",{className:"iconfont icon-wenjianjia ".concat(C)}),e.name]},n)}))]}),(0,x.jsx)("label",{className:"mt5",children:"选中的新建文件夹目录:"}),(0,x.jsx)("div",{className:"mt5 mb5",children:M}),m&&(0,x.jsx)(A.Z,{form:y,scrollToFirstError:!0,className:"mt20",children:(0,x.jsx)(A.Z.Item,{name:"name",rules:[{required:!0,message:"请输入名称"},{whitespace:!0,message:"请勿输入空格"}],children:(0,x.jsx)(f.Z,{placeholder:"请输入新文件夹名/子文件夹名。(如:src/step1)"})})})]})})}))},56719:function(e,n,t){"use strict";t.d(n,{Z:function(){return j}});var i=t(82242),s=t.n(i),a=t(91232),r=t.n(a),c=t(79800),o=t.n(c),l=t(59301),u="scrollbar___lLOKh",d="scrollbarContent___J5uQ6",h="scrollbarTrack___ptQqt",A="scrollbarThumb___GFuZv",g="item___MSfbI",I="icon___AXhP9",f="dot___BA766",E="active___Rkf93",p="pathActive___l4hB4",Q="paths___gzBRM",C=t(43418),x=t(38854),m=t(89392),k=t(65428),B=t(76374),v=t(27627),D=t(37712),j=function(e){var n=e.initTabs,t=void 0===n?[]:n,i=e.tabs,a=void 0===i?[]:i,c=e.setTabs,j=e.value,y=e.onChange,w=e.codeUpdate,S=void 0!==w&&w,R=e.paths,H=void 0===R?[]:R,P=e.activePath,M=e.onChangePath,J=e.codeLoading,b=e.copyProhibited,G=void 0!==b&&b,N=(0,l.useState)(!1),Y=o()(N,2),F=Y[0],O=Y[1],T=(0,l.useState)(!1),U=o()(T,2),Z=U[0],L=U[1],z=(0,l.useRef)(),K=(0,l.useRef)(),V=(0,l.useRef)(),W=(0,l.useRef)(!1);(0,l.useEffect)((function(){return k.Z.subscribe("send-tabs-result-data",(function(e){var n=(0,m.cloneDeep)(a),t=n.findIndex((function(n){return n.index_tab===e.index_tab}));n[t].resData=e,c(n)}))}),[a]),(0,l.useEffect)((function(){var e=new B.Z((function(e){var n,t=r()(e);try{for(t.s();!(n=t.n()).done;){n.value.contentRect.width;q()}}catch(e){t.e(e)}finally{t.f()}})),n=new B.Z((function(e){var n,t=r()(e);try{for(t.s();!(n=t.n()).done;){n.value.contentRect.width;q()}}catch(e){t.e(e)}finally{t.f()}}));return K.current&&(e.observe(K.current),n.observe(V.current)),function(){e.disconnect(),n.disconnect()}}),[]),(0,l.useEffect)((function(){if(t.length&&!W.current){var e=t.map((function(e,n){return s()(s()({},e),{},{active:0===n,resetKey:1,resData:{}})}));c((0,m.cloneDeep)(e)),y(e[0]),W.current=!1}}),[null==t?void 0:t.length]),(0,l.useEffect)((function(){if(z.current){var e=function(e){i=z.current.offsetLeft,s=e.pageX,a=!0,document.onselectstart=function(){return!1},(0,v.kk)("none")},n=function(){a=!1,document.onselectstart=null,(0,v.kk)("auto")},t=function(e){if(a){var n=e.pageX-s,t=i+n,r=K.current.clientWidth-z.current.clientWidth;t<=0&&(t=0),t>=r&&(t=r),z.current.style.left="".concat(t,"px"),V.current.style.transform="translateX(".concat(-t/K.current.clientWidth*V.current.clientWidth,"px)")}},i=0,s=0,a=!1;return z.current.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){var i,s,a;null===(i=z.current)||void 0===i||i.removeEventListener("mousedown",e),null===(s=document)||void 0===s||s.removeEventListener("mousemove",t),null===(a=document)||void 0===a||a.removeEventListener("mouseup",n)}}}),[z.current,j]),(0,l.useEffect)((function(){return V.current.addEventListener("wheel",X,{passive:!1}),function(){var e;null===(e=V.current)||void 0===e||e.removeEventListener("wheel",X,{passive:!1})}}),[V.current]);var q=function(){try{if(V.current.clientWidth>K.current.clientWidth){var e,n=K.current.clientWidth/V.current.clientWidth*K.current.clientWidth,t=Number(null===(e=z.current.style.left)||void 0===e?void 0:e.replace("px","")),i=t;t+n>=K.current.clientWidth&&(i=t-(t+n-K.current.clientWidth)),z.current.style.width="".concat(n,"px"),z.current.style.left="".concat(i,"px"),V.current.style.transform="translateX(".concat(-i/K.current.clientWidth*V.current.clientWidth,"px)"),O(!0)}else z.current.style.left="".concat(0,"px"),V.current.style.transform="translateX(0px)",O(!1)}catch(e){}},X=function(e){if(!(V.current.clientWidth<=K.current.clientWidth)){var n=0;n=-1!==navigator.userAgent.indexOf("Macintosh")?e.deltaX:e.shiftKey?e.deltaX||e.deltaY:e.deltaX;var t=V.current.style.transform.match(/translateX\(([-0-9.]+)px\)/),i=t?parseFloat(t[1]):0;i=Math.abs(i),(i+=n)<=0&&(i=0);var s=V.current.clientWidth-K.current.clientWidth;i>=s&&(i=s);var a=i/V.current.clientWidth*K.current.clientWidth;z.current.style.left="".concat(a,"px"),V.current.style.transform="translateX(".concat(-i,"px)"),e.preventDefault()}};return(0,D.jsxs)("div",{className:u,ref:K,children:[(0,D.jsx)("div",{className:d,ref:V,children:a.map((function(e,n){var t,i=e.index_tab,r=e.isCopy,o=e.tab_type,l=e.name;return(0,D.jsxs)("div",{onClick:function(){if(i!==j.index_tab){var t=s()(s()({},e),{},{active:!0}),r=(0,m.cloneDeep)(a);r[n]=t,y(t),c(r)}},className:j.index_tab===i?"".concat(g," ").concat(E):g,children:[1===o&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("i",{title:"代码编辑器",style:{color:"#3B86A0"},className:"iconfont icon-daimabianjiqi1"}),(0,D.jsx)("span",{children:l}),!!P&&(0,D.jsx)(x.Z,{className:I,overlayClassName:Q,onOpenChange:function(e){L(e)},disabled:J,menu:{items:null===(t=(0,m.compact)(H))||void 0===t?void 0:t.map((function(e){return{key:e,label:(0,D.jsx)("span",{className:P===e?p:"",children:e}),onClick:function(){P!==e&&(L(!1),M(e))}}}))},children:(0,D.jsx)("div",{children:Z?(0,D.jsx)("b",{className:"iconfont icon-a-xialazhankai"}):(0,D.jsx)("b",{className:"iconfont icon-shouqi4"})})}),S&&(0,D.jsx)("div",{className:f})]}),2===o&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("i",{style:{color:"#608B4E"},title:"VSCode编辑器",className:"iconfont icon-vscode"}),(0,D.jsx)("span",{children:l})]}),3===o&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("i",{style:{color:"#608B4E"},title:"图形化桌面",className:"iconfont icon-tuxinghuazhuomian"}),(0,D.jsx)("span",{children:l})]}),4===o&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("i",{style:{color:"#3B86A0"},title:"命令行终端",className:"iconfont icon-minglinghang"}),(0,D.jsx)("span",{children:l}),!G&&(0,D.jsx)("aside",{title:"复制",onClick:function(t){return function(e,n,t){if(t.stopPropagation(),10!==a.length){var i=(0,m.cloneDeep)(a),r=String(Math.random()).slice(-10),o=e.index_tab.split("-")[0],l=s()(s()({},e),{},{active:!1,index_tab:"".concat(o,"-").concat(r),isCopy:!0});i.splice(n+1,0,l),c(i)}else C.Z.info({title:"提示",icon:null,okText:"我知道了",width:600,centered:!0,content:"实验界面窗口数量已达上限(10个),不允许再复制窗口。"})}(e,n,t)},className:"iconfont icon-fuzhihuanjing font14 ml10 current"}),r&&(0,D.jsx)("aside",{title:"关闭",onClick:function(t){return function(e,n,t){t.stopPropagation();var i=(0,m.cloneDeep)(a);i.splice(n,1),e.index_tab===j.index_tab&&(i[n-1].active=!0,y(i[n-1])),c(i)}(e,n,t)},className:"iconfont icon-guanbishiyanhuanjing font14 ml10 current"})]}),5===o&&(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)("i",{style:{color:"#3B86A0"},title:"容器内服务",className:"iconfont icon-rongqi1"}),(0,D.jsx)("span",{children:l})]})]},i)}))}),(0,D.jsx)("div",{style:{display:F?"block":"none"},className:h,children:(0,D.jsx)("div",{ref:z,className:A})})]})}},97164:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return cs}});var i=t(31468),s=t.n(i),a=t(37205),r=t.n(a),c=t(39647),o=t.n(c),l=t(7557),u=t.n(l),d=t(41498),h=t.n(d),A=t(85573),g=t.n(A),I=t(79800),f=t.n(I),E=t(70236),p=t.n(E),Q=t(82242),C=t.n(Q),x=t(59301),m=t(65363),k=t(20570),B=t(37712),v=function(e){var n=e.position,t=e.subject,i=e.score,s=e.onViewAllTask,a=(0,x.useState)(!1),r=f()(a,2),c=r[0],o=r[1],l=((0,m.useLocation)(),(0,m.useSearchParams)()),u=f()(l,1)[0];var d=function(){(0,k.vp)()?o(!0):o(!1)};return(0,x.useEffect)((function(){return document.addEventListener((0,k.gH)(),d),function(){document.removeEventListener((0,k.gH)(),d)}}),[]),(0,B.jsxs)("div",{className:"task-header",children:[(0,B.jsx)("a",{title:"查看全部任务",onClick:s,children:(0,B.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFoAAABaCAYAAAA4qEECAAABz0lEQVR4Xu3csU7DQBRE0V1+LNCn5DNT0mN+DCNoQzNjfBVWl/o9T3wYNiiyMq+3fR/+nC4whT7d+CdAaMZZaMhZaKEpASjHM1poSACKsdFCQwJQjI0WGhKAYmy00JAAFGOjhYYEoBgbLTQkAMXYaKEhASjGRgsNCUAxNlpoSACKsdFCQwJQjI0WGhKAYmz0YtDb2+t8ge4pirne9vcxxnO0VAxTjRYaeppUaAq6+GsjV5Y5Oki0h8yizuiHvHnyRQkNaQstNCQAxdhooSEBKMZGCw0JQDE2ejHobezj49A9PY19fI556Bq/Lc9x8dO7P1e9v6AfkwLI3xHLQR8+Os6CX+zoOIvp31zX/zqgX5XQQkMCUIyNFhoSgGJstNCQABRjo4WGBKAYqtEbdD9tzDIP0PhIGPVImE+TMt9NaqOhRrdn5zJ71JvhMmDtjQjdyoV7Qodg7bjQrVy4J3QI1o4L3cqFe0KHYO240K1cuCd0CNaOC93KhXtCh2DtuNCtXLgndAjWjgvdyoV7Qodg7bjQrVy4J3QI1o4L3cqFe0KHYO240K1cuCd0CNaOC93KhXtCh2DtuNCtXLgndAjWjgvdyoV7Qodg7bjQrVy49wXyQzzmd6RVpQAAAABJRU5ErkJggg==",alt:"nav",width:45})}),(0,B.jsxs)("h3",{title:t,children:["第",n,"关:",t]}),(0,B.jsx)("span",{children:i}),!("true"===u.get("isFullScreen"))&&(0,B.jsx)("a",{onClick:function(){o(!c),(0,k.vp)()?(0,k.BU)():(0,k.Dj)(document.getElementById("task-left-panel"))},title:c?"退出全屏":"全屏",children:(0,B.jsx)("i",{className:c?"iconfont icon-shousuo c-grey-333 font16 ml10 current":"iconfont icon-zhankai c-grey-333 font16 ml10 current"})})]})},D=t(96865),j=t(61998),y=t(27092),w=t(13261),S=t(17664),R=t(27627),H=t(61186),P=t.n(H),M={0:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAaVBMVEUAAAD/vwD/vwD/ugD/ugD/uwD/vAD8vAP8ugP9uwL9uwL9uwL9ugL9ugL9ugL8uwP8uwP8ugP9ugL9ugL9ugL9uwL9uwL9uwL9uwP9zkn+1WT+34r+45n/7bz/8s//9+D/+/D//fj///8yardZAAAAGHRSTlMAECAwP0BQX2BwgI+Qn6Cwv8DP0N/g7/D8rFP8AAABpUlEQVRYw+3XwXKDIBAG4AVKoiRBDSq0adrG93/ImphSWwV2jYce+t+SGb5RWBcAmEQeji6acicgHVE6RA4s5cjWoVInHkognV6KP1Pt0NExJ3OE8AhUUKB9BKI4rpoM3+7KWzaMBLWwGcbttsNC+QlWcn7Eqesz8z+ocTHw7wUPQKdLEnItB+3i0PO569JQXwxtFHo5f3QoqB4v1BR663wSkItD738O6vN6WQlyZyRk1oGq8Xf6CFSMO8cjUAbMrgHZvl+qNSDVf/3MT7cSSyFza+DcepYEGQ/Ze9cVzSKo+oIavzUxfYeaJZAeb0xC2ytUUKD9FbJ6slMKySGnQBK4DO23ggJFd1qLh4oopPBQFoU4GmoSxxqNhbIExJHbbJM8aSkcJNNnv+rRk4h/OZt2DAPMcdSu46Qli3RSkhGADovMuGZASagK7AaI4XqOUQzo4ftfDdPkS5jByr1lssXKzzpXAP/QpLyfrvGXycPtJyczMnDhOgri44RvILQqiNy3aJPVUm5XsOziRoOaMFSQIB2GchLEgj3SEOuI6dm3M8E1+wTzvvO4HPYw7wAAAABJRU5ErkJggg==",1:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAA8CAMAAADygAyiAAAAeFBMVEUAAACvv7+nt8elusWmusKnt8OmucKmucGlt8KmuMKlt8GmuMKmuMGluMKmt8KluMKmuMKmt8KluMGmuMKmuMGlt8KluMGmuMGmuMK+y9PQ2d/W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wv8DP0N/g7/D8rFP8AAAB+klEQVRYw+3X2VbCMBAG4EliEQqkQGgTEBFRlvd/QksLMV0yyVQvvPC/4XCg38kyzQLQSTJfGTSLqYBwxMJEZM5CTlKYqKwDjRKRTinhbVqb6EjMGRtCOAJlFGiGQBTHLDuPP08XVUaMBBUwqp+bPtcTZQc4TXr+vv84Xcucjq+dnyB1i4F/T3gPtKmUOp8bL2QKDtJg0OHq5OiHymIoUOjkQtetH1q7E9UD1cDBfFSfb37IREG7excPfwBqDvrPoW096C8YpILQ7jFpe2T6l+57GoAOBoEyd+UItQgryDEwHQ21++ZAulwv0/Bgb/aXvia5j5ZvP7PDnQrv9B/r19YHqWoB59qygYJsQspC+r7qinwQtHxAud2amLxD+RBIuhuTkPoGZRRodoO07OyUIuEwaUMXBEqAJ779tjNtnxXwbj8bk4ZFt6D3xgq5c3/KUChtl+LFcZo9G6MQb/ft5ezZRfLAsUb2bGznal/bGUKDeprkSR48aaVxUBI++y1/ehKxndNhRzGIOY7q33HCko50QpISEB2GjLhkQImvCvQIiOGyj0kZ0MNnrQVTTYYwtTWxlhoPVpp1ngL8Q53yfrrFXibn1VdOZhLPhWsliM3x30BoVYDct2iDVVBuVzDs4kaDcj+UkSDphyYkiHnXSEWsIyZ7e6e8c/YFAVX9WNqVSc8AAAAASUVORK5CYII="},J={loading:!0,page:1,data:null},b=function(e){return e[e.SET_LOADING=0]="SET_LOADING",e[e.SET_STATE=1]="SET_STATE",e[e.SET_PAGE=2]="SET_PAGE",e}(b||{});function G(e,n){switch(n.type){case b.SET_LOADING:return C()(C()({},e),{},{loading:n.payload});case b.SET_STATE:return C()(C()({},e),n.payload);case b.SET_PAGE:return C()(C()({},e),{},{page:n.payload});default:throw new Error}}var N=function(e){var n=e.activeIndex,t=e.taskId,i=(0,x.useReducer)(G,J),s=f()(i,2),a=s[0],r=s[1],c=a.loading,o=a.page,l=a.data,d=(0,x.useMemo)((function(){var e=[{title:"排名",dataIndex:"user_name",align:"center",render:function(e,n,t){var i=10*(o-1)+t+1;return i<=3?(0,B.jsx)("img",{src:M[i-1],alt:"rank",width:36}):i}},{title:"姓名",dataIndex:"user_name"},{title:null==l?void 0:l.rank_data_name,dataIndex:"score",render:function(e){return"DEFAULT"===(null==l?void 0:l.open_rank)?(0,R.li)(e):e}},{title:"通关时间",dataIndex:"end_time",render:function(e){return P()(e).format("YYYY-MM-DD HH:mm:ss")}}];return e}),[null==l?void 0:l.rank_data_name,null==l?void 0:l.open_rank,o]);return(0,x.useEffect)((function(){function e(){return(e=h()(u()().mark((function e(){var n;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.i8)(t,{page:o,limit:10});case 2:n=e.sent,r({type:b.SET_STATE,payload:{loading:!1,data:n.data}});case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}4===n&&function(){e.apply(this,arguments)}()}),[o,n,t]),(0,B.jsx)("div",{className:"ranking-container",children:c?(0,B.jsx)(D.Z,{avatar:!0,paragraph:{rows:4}}):l&&0!==(null==l?void 0:l.rank_list_count)?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(j.Z,{pagination:!1,size:"middle",dataSource:l.rank_list,columns:d}),l.rank_list_count>10?(0,B.jsx)(y.Z,{style:{marginTop:20},showQuickJumper:!0,showSizeChanger:!1,onChange:function(e){r({type:b.SET_PAGE,payload:e})},current:o,total:l.rank_list_count}):null]}):(0,B.jsx)(w.Z,{styles:{margin:"20% auto"}})})},Y=t(22394),F=t(23599),O=t(8591),T=t(43418),U=t(43428),Z=t(56386),L="content-wrapper___kKoFC",z="scroll___lsiy3",K="unity-3d-container___kQAJh",V="btn-enlarge___mQbst",W="enlarge___p_I6G",q="tab-nav___iVZmY",X="tab-fixed___SeByu",_="active___TjNGA",$="tab-panel-body___iueV_",ee="answer-tip___b7k1Y",ne=t(79311);function te(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,ne.U2)("/discusses.json",{container_type:"Shixun",container_identifier:e,page:n-1})}function ie(e,n){return(0,ne.v_)("/discusses/".concat(e,"/top_or_down_discuss.json"),{top:n})}function se(e,n){return(0,ne.v_)("/discusses/".concat(e,"/disable_or_open_discuss.json"),{is_disable:!!n})}function ae(e,n){return(0,ne.v_)("/discusses/".concat(e,"/plus.json"),{container_type:"Discuss",type:n?1:0})}function re(e,n){return(0,ne.v_)("/discusses/".concat(e,"/hidden.json"),n)}function ce(e,n){return(0,ne.v_)("/discusses/".concat(e,"/reward_code.json"),n)}function oe(e){return(0,ne.ZP)("/api/discusses/".concat(e,".json"),{method:"delete"})}function le(e,n){return(0,ne.v_)("/discusses/".concat(e,"/reply.json"),{container_type:"Shixun",content:n})}function ue(e){return(0,ne.v_)("/discusses.json",e)}function de(e,n){return(0,ne.v_)("/discusses/".concat(e,"/turing.json"),n)}t(4271);var he=t(31395),Ae="YYYY-MM-DD HH:mm",ge=function(e){var n=e.challenge,t=e.position,i=e.status,s=e.get_gold,a=e.get_experience,r=e.star,c=e.tag_count,o=e.finished_time,l=e.index,u=e.view_answer_time,d=e.name,h=e.identifier,A=e.identity,g=e.shixun,I=e.taskList,f=e.onSaveTaskStar,E=(0,m.useLocation)(),p=(0,m.useParams)();var Q=2===i||g.status<2||I[l-1]&&2===I[l-1].status||g.task_pass||A<=5;return(0,B.jsxs)("div",{className:"task-item-container ".concat(n.position===t?"active":""," ").concat(2===i?"finish":""),children:[(0,B.jsxs)("div",{className:"flex-container challenge-title space-between",children:[Q?(0,B.jsxs)("a",{href:"/tasks/".concat(h).concat(E.search),onClick:function(e){e.preventDefault(),p.courseId&&p.homeworkId?setTimeout((function(){return window.location.href="/tasks/".concat(p.courseId,"/").concat(p.homeworkId,"/").concat(h).concat(E.search)}),300):setTimeout((function(){return window.location.href="/tasks/".concat(h).concat(E.search)}),300)},children:["".concat(t,". ").concat(d)," "]}):(0,B.jsx)("span",{children:"".concat(t,". ").concat(d)}),(0,B.jsx)("i",{className:"iconfont icon-wancheng1 ".concat(2===i?"green":"")})]}),(0,B.jsxs)("div",{className:"flex-container",children:[(0,B.jsxs)("p",{className:2===i?"green":"",children:[(0,B.jsx)("span",{children:"经验值"})," ",2===i&&a>0?"+":"",a]}),(0,B.jsxs)("p",{className:2===i?"green":"",children:[(0,B.jsx)("span",{children:"金币"})," ",2===i&&s>0?"+":""," ",s]}),(0,B.jsxs)("p",{children:[(0,B.jsx)("span",{children:"技能标签"})," ",c||"无"]})]}),(0,B.jsxs)("div",{className:"flex-container",children:[(0,B.jsxs)("p",{children:[(0,B.jsx)("span",{children:"完成时间"}),o?P()(o).format(Ae):"--"]}),(0,B.jsxs)("p",{children:[(0,B.jsx)("span",{children:"查看答案时间"}),u?P()(u).format(Ae):"--"]})]}),g.status>=2?(0,B.jsxs)("div",{className:"rate-container",children:[2===i&&0===r?(0,B.jsxs)(x.Fragment,{children:[(0,B.jsx)("span",{children:"给个评分吧:"}),(0,B.jsx)(he.Z,{defaultValue:0,onChange:function(e){f(h,e,l)},className:"star-tip-rate"})]}):null,2===i&&r>0?(0,B.jsxs)(x.Fragment,{children:[(0,B.jsx)("span",{children:"已评分:"}),(0,B.jsx)(he.Z,{value:r,disabled:!0}),(0,B.jsxs)("span",{className:"highlight",children:[r,"分"]})]}):null]}):null]})},Ie=function(e){var n=e.taskList,t=e.challenge,i=e.shixun,s=e.identity,a=e.onSaveTaskStar,r=(0,m.useSearchParams)(),c=f()(r,1)[0];return(0,B.jsxs)("div",{className:"task-nav-container",children:[!!c.get("coursesId")&&(0,B.jsx)("p",{className:"task-tip",children:(0,B.jsxs)("div",{children:[(0,B.jsx)("span",{children:"温馨提示: "}),"若查看答案时间早于关卡任务完成时间,将影响课堂实训作业的成绩。"]})}),n.map((function(e,r){var c=C()(C()({},e),{},{identity:s,index:r,challenge:t,taskList:n,shixun:i,onSaveTaskStar:a});return(0,B.jsx)(ge,C()({},c),r)}))]})},fe={tree:"tree___LyfjL"},Ee=t(97334),pe=t(91810),Qe=t(4366),Ce=t(18620),xe=function(){var e=h()(u()().mark((function e(n,t,i,s,a){var r,c;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=function(){a?(0,R.xg)(i?"/tasks/".concat(null==c?void 0:c.identifier,"/jupyter"):"/tasks/".concat(c.game_identifier,"?subject_id=").concat(s)):window.location.href=i?"/tasks/".concat(null==c?void 0:c.identifier,"/jupyter"):"/tasks/".concat(c.game_identifier,"?subject_id=").concat(s)},!i){e.next=7;break}return e.next=4,(0,Ce.BK)({id:n,challenge_id:t,subject_id:s});case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,(0,Ce.Ir)({id:n,challenge_id:t,subject_id:s});case 9:e.t0=e.sent;case 10:if(!(null!=(c=e.t0)&&c.game_identifier||null!=c&&c.identifier)){e.next=22;break}if(null==c||!c.access){e.next=16;break}r(),e.next=21;break;case 16:if(0!=(null==c?void 0:c.access)){e.next=20;break}return O.ZP.warning("当前实训不支持跳关,已为您跳转到该实训未通过的第一个关卡"),setTimeout((function(){xe(n,"",i,s,a)}),1e3),e.abrupt("return");case 20:r();case 21:return e.abrupt("return");case 22:-3===(null==c?void 0:c.status)?(0,R.eF)():2===(null==c?void 0:c.status)?me(null==c?void 0:c.message):3===(null==c?void 0:c.status)&&ke(null==c?void 0:c.message);case 23:case"end":return e.stop()}}),e)})));return function(n,t,i,s,a){return e.apply(this,arguments)}}(),me=function e(n){var t,i;n=null!==(t=n)&&void 0!==t&&t.includes(".json")?n:"".concat(n,".json"),T.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,B.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(i=h()(u()().mark((function t(){var i,s;return u()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,pe.$Q)({url:n});case 2:if(i=t.sent){t.next=5;break}return t.abrupt("return");case 5:return O.ZP.success("重置成功,正在进入实践项目!"),t.next=8,(0,Ce.Ir)({id:i.shixun_identifier});case 8:if(null==(s=t.sent)||!s.game_identifier){t.next=12;break}return(0,R.xg)("/tasks/".concat(s.game_identifier)),t.abrupt("return");case 12:2===(null==s?void 0:s.status)?e(null==s?void 0:s.message):3===(null==s?void 0:s.status)&&ke(null==s?void 0:s.message);case 13:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})})},ke=function(e){T.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,B.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})},Be=Ee.Z.DirectoryTree,ve=function(e){var n=e.taskList,t=e.challenge,i=(e.shixun,e.identity,e.onSaveTaskStar,e.subject_id),a=((0,m.useParams)(),(0,m.useSearchParams)()),c=f()(a,1)[0],o=(0,x.useState)([]),l=f()(o,2),u=l[0],d=l[1],h=(0,x.useState)([]),A=f()(h,2),g=A[0],I=A[1],E=(0,x.useState)(),p=f()(E,2),Q=p[0],C=p[1];(0,x.useEffect)((function(){k(n),I(v({children:n},t.id)),d(r()(n)),console.log("taskList:",n)}),[n]);var k=function e(n){n.map((function(n,i){var s;n.index=i,n.title=n.name,n.id==t.id&&C(n.key),null!==(s=n.children)&&void 0!==s&&s.length&&e(n.children)}))};function v(e,n){var t;if(e&&"object"===s()(e))return e.id==n?[]:e.children.some((function(e){return t=v(e,n)}))?[].concat(r()(t),[e.key]):void 0}return(0,B.jsxs)("div",{className:"task-nav-container",children:[!!c.get("coursesId")&&(0,B.jsx)("p",{className:"task-tip",children:(0,B.jsxs)("div",{children:[(0,B.jsx)("span",{children:"温馨提示: "}),"若查看答案时间早于关卡任务完成时间,将影响课堂实训作业的成绩。"]})}),!(null==u||!u.length)&&(0,B.jsx)("div",{style:{padding:10},children:(0,B.jsx)(Be,{className:fe.tree,icon:(0,B.jsx)("i",{className:"iconfont icon-wancheng1 "}),switcherIcon:(0,B.jsx)("i",{className:"iconfont icon-you1 ",style:{position:"relative",top:-2}}),onSelect:function(e,n){console.log("Trigger Select",e,n),n.node.shixun_identifier&&xe(n.node.shixun_identifier,n.node.key,!1,i)},onExpand:function(){console.log("Trigger Expand")},selectedKeys:[Q],defaultExpandedKeys:r()(g),treeData:u,titleRender:function(e,n,i){return(0,B.jsxs)("span",{className:"".concat(t.id==e.id?fe.active:""," multi_ellipsis1"),style:{paddingRight:34},children:["Shixun"===e.item_type&&(0,B.jsx)("i",{class:"iconfont icon-shixunti2 c-light-primary font20"}),"Challenge"===e.item_type&&(0,B.jsxs)("i",{style:{fontFamily:"monospace",position:"relative",top:"Shixun"===e.item_type?-2:0},children:["(",R.I9[e.index],")"]}),(0,B.jsx)("span",{style:{position:"relative",top:"Shixun"===e.item_type||"Stage"===e.item_type?-2:0},children:null==e?void 0:e.name}),"Stage"!==e.item_type&&(0,B.jsxs)("i",{className:"iconfont icon-tasks-img c-grey-999 ".concat(1==(null==e?void 0:e.status)&&"c-green-29b"),children:[(1==(null==e?void 0:e.status)||0==(null==e?void 0:e.status))&&(0,B.jsx)("img",{src:Qe.k$,width:"16"}),2==(null==e?void 0:e.status)&&(0,B.jsx)("img",{src:Qe.ub,width:"16"}),3==(null==e?void 0:e.status)&&(0,B.jsx)("img",{src:Qe.e6,width:"16"})]})]})}})})]})},De=t(58152),je=t(3113),ye=t(94001),we=t(78241),Se=t(95237),Re=t(43604),He=t(60324),Pe=t(65428),Me=(0,m.connect)((function(e){return{pathsList:e.pathsList}}))((function(e){e.pathsList,e.dispatch;var n=we.Z.useForm(),t=(f()(n,1)[0],(0,x.useState)()),i=f()(t,2),s=i[0],a=i[1],r=(0,x.useState)(!0),c=f()(r,2),o=c[0],l=c[1],d=(0,x.useState)(!1),A=f()(d,2),g=A[0],I=A[1],E=(0,x.useState)({}),p=f()(E,2),Q=p[0],m=p[1],k=(0,x.useState)({keyword:Q,robot:!0,page:1}),v=f()(k,2),j=v[0],y=v[1];(0,x.useEffect)((function(){Pe.Z.subscribe("ai-replay-show",(function(e){m(e),I(!0)}))}),[]),(0,x.useEffect)((function(){null!=Q&&Q.id&&w()}),[Q]);var w=function(){var e=h()(u()().mark((function e(n){var t;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l(!0),e.next=3,n=C()(C()({},j),{},{keyword:null==Q?void 0:Q.content,id:null==Q?void 0:Q.id}),(0,ne.v_)("/discusses/ai_reply.json",n);case 3:t=e.sent,l(!1),null!=t&&t.data&&(j.page++,y(C()({},j)),a(null==t?void 0:t.data));case 6:case"end":return e.stop()}var n}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:w();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),R=(0,B.jsx)("div",{children:(0,B.jsx)("img",{src:Qe.wC,width:150})});return(0,B.jsx)(B.Fragment,{children:(0,B.jsx)(T.Z,{title:"其他回答",mask:!0,open:g,okText:"换一换",cancelText:"",onOk:S,width:800,height:500,footer:(0,B.jsx)(Se.Z,{align:"middle",justify:"center",children:(0,B.jsxs)(Re.Z,{className:"tc",children:[(0,B.jsx)(je.ZP,{type:"primary",onClick:w,children:"换一换"}),(0,B.jsx)(He.Z,{content:R,title:"教师交流社区",children:(0,B.jsx)(je.ZP,{type:"dashed",children:"人工服务"})})]})}),onCancel:function(){I(!1)},children:(0,B.jsx)("aside",{style:{minHeight:300},children:(0,B.jsx)(Se.Z,{children:(0,B.jsxs)(D.Z,{loading:o,children:[null==s?void 0:s.map((function(e){return(0,B.jsx)(Re.Z,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24,children:e.text})})),!(null!=s&&s.length)&&(0,B.jsxs)("div",{style:{width:"100%",textAlign:"center"},children:[(0,B.jsx)("br",{}),(0,B.jsx)("img",{src:Qe.wC,width:150}),(0,B.jsx)("br",{}),(0,B.jsx)("br",{}),"教师交流社区"]})]})})})})})})),Je=t(15309),be=t(6848),Ge=t(40301),Ne=t(80848),Ye=t(38296);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Fe(e){var n=e.data,t=e.index,i=e.adminOrOperator,s=e.parentDiscussIndex,a=e.shixunIdentifier,r=e.user,c=e.onSetRewardData,o=e.onSetActionType,l=e.onHandleSubmitDiscusses,u=(e.onTopOrDownDiscuss,e.handleChildrenPlus,e.anserAuthor,e.onPlus,e.onHandleRepaly),d=(e.userInfomation,n.author),h=n.can_delete,A=n.content,g=n.hidden,I=n.id,E=n.reward,p=n.time,Q=n.reply_status,C=n.user_praise,k=n.praise_count,v=(0,x.useState)(!1),D=f()(v,2),j=D[0],y=D[1],w=(0,x.useState)(!1),S=f()(w,2),R=S[0],H=S[1],P=(0,x.useState)(!1),M=f()(P,2),J=M[0],b=M[1],G=(0,x.useState)(!1),N=f()(G,2),Y=N[0],O=N[1],T=function(){j&&l(I,{reply_status:2})},U=function(){R&&l(I,{reply_status:3})},Z=function(){l(I,{reply_status:1})},L=function(){l(I,{reply_status:4})};var z=i||h||d.user_id===r.user_id||d.login===r.login,K="tasks"===(0,m.useLocation)().pathname.split("/")[1];return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{className:"second-level-discuss",children:[(0,B.jsx)("div",{className:"discuss-info-body",children:(0,B.jsxs)("div",{className:"discuss-info",children:[(0,B.jsx)("a",{href:"/users/".concat(d.login),target:"_blank",children:d.name}),(0,B.jsx)("span",{className:"grey",children:p}),E?(0,B.jsxs)("a",{className:"c-orange gift",title:"已奖励金币".concat(E),children:[(0,B.jsx)("i",{className:"iconfont icon-gift c-orange "}),(0,B.jsx)("span",{children:E})]}):null]})}),(0,B.jsx)(F.Z,{className:"discuss-content ".concat(t>0?"content-gray":""),value:A})]}),K&&(0,B.jsxs)("div",{className:"btn-group-succes",children:[(0,B.jsx)("div",{className:"btn-group-gratify",children:function(){switch(Q){case 0:return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("div",{onClick:Z,className:"whether-satisfied ".concat(J?"cursorPoint blue-text-color":""),onMouseEnter:function(){b(!0)},onMouseLeave:function(){b(!1)},children:[(0,B.jsx)("img",{src:J?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgMi43MzFINS4xNDFWMGgtMS45NkwxLjY3NSAyLjY0M0gwdjYuMThoNy44NjVMMTAgMi43MzJabS05LjQzMS40ODdoLjgzNnY1LjAzSC41Njl2LTUuMDNabTguNjI2LjA4OEw3LjQ2MyA4LjI0OWgtNS40OVYzLjIxOGguMDMxTDMuNTExLjU3NWgxLjA2MnYyLjczaDQuNjIyWiIgZmlsbD0iIzAxNTJEOSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgMi43MzFINS4xNDFWMGgtMS45NkwxLjY3NSAyLjY0M0gwdjYuMThoNy44NjVMMTAgMi43MzJabS05LjQzMS40ODdoLjgzNnY1LjAzSC41Njl2LTUuMDNabTguNjI2LjA4OEw3LjQ2MyA4LjI0OWgtNS40OVYzLjIxOGguMDMxTDMuNTExLjU3NWgxLjA2MnYyLjczaDQuNjIyWiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+",className:"whether-img SVGColor"}),"满意"]}),(0,B.jsx)(He.Z,{placement:"bottomLeft",content:(0,B.jsxs)("div",{className:"content",children:[(0,B.jsx)("div",{className:"content-disappoint",children:"抱歉让你失望了,请继续尝试:"}),(0,B.jsxs)("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(j?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){y(!0)},onMouseLeave:function(){y(!1)},onClick:T,children:["请",null==d?void 0:d.name.trim(),"老师再尝试回答一次。"]}),(0,B.jsx)("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(R?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){H(!0)},onMouseLeave:function(){H(!1)},onClick:U,children:"可能启用了机器人,请其他老师回答。"})]}),trigger:"click",children:(0,B.jsxs)("div",{className:"whether-satisfied ".concat(Y?"cursorPoint blue-text-color":""),onMouseEnter:function(){O(!0)},onMouseLeave:function(){O(!1)},children:[(0,B.jsx)("img",{src:Y?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy44NjUgMEgwdjYuMThoMS42NzVsMS41MDYgMi42NDRoMS45NlY2LjA5MkgxMEw3Ljg2NSAwWk0uNTcuNTc1aC44MzZ2NS4wM0guNTY5Vi41NzZabTQuMDAzIDQuOTQzdjIuNzNIMy41MUwyLjAwNCA1LjYwN2gtLjAzVi41NzZoNS40ODlsMS43MzIgNC45NDJINC41NzJaIiBmaWxsPSIjMDE1MkQ5IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy44NjUgMEgwdjYuMThoMS42NzVsMS41MDYgMi42NDRoMS45NlY2LjA5MkgxMEw3Ljg2NSAwWk0uNTcuNTc1aC44MzZ2NS4wM0guNTY5Vi41NzZabTQuMDAzIDQuOTQzdjIuNzNIMy41MUwyLjAwNCA1LjYwN2gtLjAzVi41NzZoNS40ODlsMS43MzIgNC45NDJINC41NzJaIiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",className:"whether-img SVGColor"}),"不满意"]})})]});case 1:return(0,B.jsx)("div",{className:"radius-box cursorPoint height30 ".concat(t>0?"gray-background":"blue-background"),onClick:L,children:"我很满意"});case 2:return(0,B.jsx)("div",{className:"radius-box height30 ".concat(t>0?"gray-background":"blue-background"),children:"不满意 等待老师再次回答"});case 3:return(0,B.jsx)("div",{className:"radius-box height30 ".concat(t>0?"gray-background":"blue-background"),children:"不满意 等待其他老师再次回答"});case 4:return(0,B.jsx)("div",{className:"radius-box height30 ".concat(t>0?"gray-background":"blue-background"),children:"我很满意"});default:return(0,B.jsx)(B.Fragment,{})}}()}),(0,B.jsx)("div",{className:"btn-group-other",children:(0,B.jsx)("div",{className:"discuss-info-body",children:(0,B.jsxs)("div",{className:"btn-group",children:[1===r.identity?(0,B.jsx)("a",{onClick:function(){c({id:I,index:t,user_id:d.user_id,parentDiscussIndex:s})},title:"给TA奖励金币",children:(0,B.jsx)("i",{className:"iconfont icon-jiangli"})}):null,i?(0,B.jsx)("a",{onClick:function(){o({id:I,index:t,params:{hidden:g?"0":"1",container_identifier:a},type:"hidden-discuss",parentDiscussIndex:s,message:g?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:g?"取消隐藏":"隐藏评论",children:(0,B.jsx)("i",{className:g?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,z?(0,B.jsx)("a",{onClick:function(){o({id:I,index:t,type:"delete-discuss",parentDiscussIndex:s,message:"确定要删除该条回复吗"})},title:"删除",children:(0,B.jsx)("i",{className:"iconfont icon-shanchu"})}):null,(0,B.jsxs)("a",{onClick:function(){u(I,!C,s,t)},className:C?"c-orange":"",children:[(0,B.jsx)("i",{className:C?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),(0,B.jsx)("span",{children:k||""})]})]})})})]})]})}var Oe=function(e){var n=e.data,t=e.index,i=e.shixunIdentifier,s=e.adminOrOperator,a=e.identity,r=e.onTopOrDownDiscuss,c=e.onPlusDiscuss,o=e.onDisableDiscuss,l=e.onSetActionType,u=e.onSetRewardData,d=e.user,h=e.activeDiscussIndex,A=e.onReplyDiscuss,g=e.onSetActiveDiscussIndex,I=e.allowDisableDiscuss,E=e.onHandleSubmitDiscusses,p=e.onHandleRepaly,Q=e.userInfomation,C=n.content,m=n.children,k=n.game_url,v=n.hidden,D=n.id,j=n.position,y=n.praise_count,w=n.reward,S=n.sticky,R=n.time,H=n.user_praise,P=n.game_passed,M=n.ai_reply_text,J=n.ai_reply_flag,b=n.author,G=n.disable_discuss_status,N=(n.reply_status,(0,x.useState)(!1)),Y=f()(N,2),O=Y[0],U=Y[1];function Z(){o(D,0===G?2:0,t)}(0,x.useEffect)((function(){O&&setTimeout((function(){return U(!1)}),800)}),[O]);var L=function(e){var n=e.target,t=n.nodeName,i=n.src;"IMG"===t&&(Pe.Z.publish("preview-image",i),console.log("src:",i))};return(0,B.jsxs)("div",{className:"discuss-item-container",children:[(0,B.jsx)("a",{href:"/users/".concat(b.login),target:"_blank",children:(0,B.jsx)("img",{alt:"用户头像",height:"50",src:"".concat(Je.Z.IMG_SERVER,"/images/").concat(b.image_url),width:"50"})}),(0,B.jsxs)("section",{children:[(0,B.jsxs)("div",{className:"discuss-info",children:[(0,B.jsx)("a",{href:"/users/".concat(b.login),target:"_blank",children:b.name}),(0,B.jsx)("span",{className:"grey",children:R}),j?(0,B.jsxs)("span",{className:"c-green",children:[" [第",j,"关] "]}):null,k?(0,B.jsx)("a",{href:k,target:"_blank",className:"view-code",title:"点击查看TA的代码页面",children:"查看"}):null,I&&(0,B.jsxs)(B.Fragment,{children:[0===G&&(0,B.jsx)(be.Z,{title:"禁止该用户在此项目的评论功能",children:(0,B.jsx)("span",{onClick:Z,className:"c-red current",children:"禁止评论功能"})}),2===G&&(0,B.jsx)(be.Z,{title:"恢复该用户在此实践项目的评论功能",children:(0,B.jsx)("span",{onClick:Z,className:"c-light-primary current",children:"恢复评论功能"})}),1===G&&(0,B.jsx)(be.Z,{title:"该用户已被系统管理员禁言",children:(0,B.jsx)("span",{className:"c-red",children:"被管理员禁止评论"})})]}),S?(0,B.jsx)("span",{className:"top",children:"置顶"}):null,w?(0,B.jsxs)("a",{className:"c-orange gift",title:"已奖励金币".concat(w),children:[(0,B.jsx)("i",{className:"iconfont icon-gift c-orange "}),(0,B.jsx)("span",{children:w})]}):null,a<=5?(0,B.jsx)("span",{style:{flex:"1",textAlign:"right",color:1===P?"#29bd8b":""},children:1===P?"已通关":"未通关"}):null]}),(0,B.jsx)("div",{onClick:L,children:(0,B.jsx)(F.Z,{className:"discuss-content",value:C})}),J&&(0,B.jsxs)("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"},children:[(0,B.jsx)("br",{}),(0,B.jsx)("div",{style:{padding:"6px 0"},children:M}),(0,B.jsxs)(je.ZP,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:function(){return U(!0)},className:"mr10 mr5 relative c-blue",children:[(0,B.jsxs)("span",{className:O?"plus-one-animate":"hide",style:{position:"absolute"},children:[" ","+1"]}),(0,B.jsx)("span",{className:"c-blue icon-duiwoyouyong mr5"}),(0,B.jsx)("span",{className:"c-blue",children:"对我有用"})]}),(0,B.jsx)("span",{className:"c-orange current",onClick:function(){Pe.Z.publish("ai-replay-show",{content:C,id:D})},children:"其他回答"})]}),m&&m.length>0?(0,B.jsx)("div",{className:"reply-discuss-containerActive",onClick:L,children:m.map((function(e,n){return(0,B.jsx)(Fe,{data:e,index:n,userInfomation:Q,onTopOrDownDiscuss:r,shixunIdentifier:i,onHandleSubmitDiscusses:E,adminOrOperator:s,user:d,onSetRewardData:u,onSetActionType:l,parentDiscussIndex:t,anserAuthor:b,onHandleRepaly:p},e.id)}))}):null,(0,B.jsx)("div",{className:"btn-group",children:(0,B.jsxs)("div",{className:"btn-group-other",children:[1===d.identity?(0,B.jsx)("a",{onClick:function(){u({id:D,index:t,user_id:b.user_id})},title:"给TA奖励金币",children:(0,B.jsx)("i",{className:"iconfont icon-jiangli"})}):null,s?(0,B.jsx)("a",{onClick:function(){l({id:D,index:t,params:{hidden:v?"0":"1",container_identifier:i},type:"hidden-discuss",message:v?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:v?"取消隐藏":"隐藏评论",children:(0,B.jsx)("i",{className:v?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,a<=5?(0,B.jsx)("a",{onClick:function(){r(D,!S,t)},className:S?"btn-top":"btn-down",title:S?"取消置顶":"置顶",children:(0,B.jsx)("i",{className:"iconfont icon-zhiding1 "})}):null,!s||m&&0!=m.length?null:(0,B.jsx)("a",{onClick:function(){l({id:D,index:t,type:"delete-discuss",message:"确定要删除该条回复吗"})},title:"删除",children:(0,B.jsx)("i",{className:"iconfont icon-shanchu"})}),(0,B.jsx)("a",{onClick:function(){var e;null!==(e=(0,Ye.eY)())&&void 0!==e&&e.authentication?(console.log(D,"idi---------------------------"),g(D)):T.Z.confirm({title:"提示",className:"custom-modal-divider ",icon:null,content:"需要通过实名验证后,才能进行评论操作",okText:"前往实名验证",cancelText:"取消",onOk:function(){window.open("/account/certification")}})},title:"回复",children:(0,B.jsx)("i",{className:"iconfont icon-huifu1"})}),(0,B.jsxs)("a",{onClick:function(){c(D,!H,t)},className:H?"c-orange":"",children:[(0,B.jsx)("i",{className:H?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),(0,B.jsx)("span",{children:y||""})]})]})}),(0,B.jsx)(Ge.Z,{id:D,activeDiscussIndex:h,onReplyDiscuss:A})]})]},D)},Te={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function Ue(e,n){switch(n.type){case Y.tD:return C()(C()({},e),{},{loading:!0});case Y.RS:return C()(C()({},e),{},{showRewardDialog:!0});case Y.t2:return C()(C()({},e),{},{showRewardDialog:!1});case Y.GR:case Y.u8:case Y.rM:case Y.fo:case Y.yS:case Y.Vn:case Y.SX:return C()(C()({},e),n.payload);default:throw new Error}}var Ze=function(e){var n=e.shixunIdentifier,t=e.identity,i=e.activeIndex,s=e.user,a=e.allowDisableDiscuss,r=e.userInfo,c=(e.isShixunDetail,e.taskData),o=e.chatgpt,l=e.to_user_id,d=e.challengeId,A=(0,x.useReducer)(Ue,Te),g=f()(A,2),I=g[0],E=g[1],p=(0,x.useState)(!0),Q=f()(p,2),m=Q[0],k=Q[1],v=(0,x.useState)(null),D=f()(v,2),j=D[0],S=D[1],H=I.page,P=I.loading,M=I.data,J=I.actionType,b=I.showRewardDialog,G=I.activeDiscussIndex,N=(0,x.useRef)(),F=(0,x.useRef)(),O=(0,x.useRef)();function U(e,n){return L.apply(this,arguments)}function L(){return(L=h()(u()().mark((function e(t,i){var s;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!P){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,E({type:Y.tD}),e.next=6,te(n,t);case 6:s=e.sent,console.log("activeDiscussIndex",G),E({type:Y.GR,payload:{activeDiscussIndex:i?G:null,page:t,data:s,loading:!1}}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})))).apply(this,arguments)}function z(e){U(e)}function K(e,n,t){return V.apply(this,arguments)}function V(){return(V=h()(u()().mark((function e(n,t,i){var s;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ae(n,t);case 3:s=e.sent,Ce[i].user_praise=t,Ce[i].praise_count=s.praise_count,E({type:Y.rM,payload:{data:C()(C()({},M),{},{comments:Ce})}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function W(e,n,t,i){return q.apply(this,arguments)}function q(){return q=h()(u()().mark((function e(n,t,i,s){var a;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ae(n,t);case 3:a=e.sent,Ce[i].children[s].user_praise=t,Ce[i].children[s].praise_count=a.praise_count,E({type:Y.rM,payload:{data:C()(C()({},M),{},{comments:Ce})}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])}))),q.apply(this,arguments)}function X(e,n,t){return _.apply(this,arguments)}function _(){return _=h()(u()().mark((function e(n,t,i){var s,a;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,se(n,t);case 3:if(0===e.sent.status){e.next=6;break}return e.abrupt("return");case 6:s=Ce[i].author.user_id,a=Ce.map((function(e){return e.author.user_id===s?C()(C()({},e),{},{disable_discuss_status:t}):e})),E({type:Y.fo,payload:{data:C()(C()({},M),{},{comments:a})}}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])}))),_.apply(this,arguments)}function $(e,n,t){return ee.apply(this,arguments)}function ee(){return(ee=h()(u()().mark((function e(n,t,i){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,ie(n,t);case 3:Ce[i].sticky=t,E({type:Y.u8,payload:{data:C()(C()({},M),{},{comments:Ce})}}),U(I.page),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function ne(){return ne=h()(u()().mark((function e(){var n,t,i,s,a,r,c,o;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=J.id,t=J.params,i=J.type,s=J.index,a=J.parentDiscussIndex,"hidden-discuss"!==i){e.next=6;break}return e.next=4,re(n,t);case 4:a?Ce[a].children[s].hidden=1==t.hidden:Ce[s].hidden=1==t.hidden,E({type:Y.yS,payload:{actionType:null,data:C()(C()({},M),{},{comments:Ce})}});case 6:if("delete-discuss"!==i){e.next=31;break}return e.next=9,oe(n);case 9:if(!a&&0!==a){e.next=22;break}r=Ce[a].children,c=r.length-1;case 12:if(!(c>=0)){e.next=19;break}if(r[c].id!==n){e.next=16;break}return r.splice(c,1),e.abrupt("break",19);case 16:c--,e.next=12;break;case 19:Ce[a].children=r,e.next=30;break;case 22:o=Ce.length-1;case 23:if(!(o>=0)){e.next=30;break}if(Ce[o].id!==n){e.next=27;break}return Ce.splice(o,1),e.abrupt("break",30);case 27:o--,e.next=23;break;case 30:E({type:Y.yS,payload:{actionType:null,data:C()(C()({},M),{},{comments:Ce})}});case 31:case"end":return e.stop()}}),e)}))),ne.apply(this,arguments)}function ue(e){E({type:Y.yS,payload:{actionType:e}})}function he(){return(he=h()(u()().mark((function e(){var n,t,i,s,a,r,c;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=N.current,t=n.id,i=n.index,s=n.score,a=n.user_id,r=n.parentDiscussIndex,e.next=3,ce(t,{container_type:"Discusses",score:s,user_id:a});case 3:c=e.sent,r?Ce[r].children[i].reward=c.code:Ce[i].reward=c.code,E({type:Y.Vn,payload:{showRewardDialog:!1,data:C()(C()({},M),{},{comments:Ce})}}),N.current=null;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ae(e){N.current=e,E({type:Y.RS})}function ge(e,n){return Ie.apply(this,arguments)}function Ie(){return(Ie=h()(u()().mark((function e(n,t){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,le(n,t);case 3:if(-3!==e.sent.status){e.next=8;break}return T.Z.info({title:"提示",className:"custom-modal-divider ",icon:null,content:"你的账号因为发布了不当内容,现已将评论功能屏蔽。",okText:"确定"}),pe(null),e.abrupt("return");case 8:U(H),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function fe(e,n){return Ee.apply(this,arguments)}function Ee(){return(Ee=h()(u()().mark((function e(n,t){var i;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de(n,t);case 3:if(i=e.sent,1===i.status){e.next=7;break}return e.abrupt("return");case 7:U(H),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function pe(e){E(G===e?{type:Y.SX,payload:{activeDiscussIndex:null}}:{type:Y.SX,payload:{activeDiscussIndex:e}})}if((0,x.useEffect)((function(){return 3===i&&o?(clearInterval(O.current),O.current=setInterval((function(){U(H)}),5e3),function(){clearInterval(O.current)}):(console.log("清除定时器"),function(){clearInterval(O.current)})}),[o,i,G]),(0,x.useEffect)((function(){return m||(clearInterval(j),S(setInterval((function(){U(H,!0)}),5e3))),function(){clearInterval(j)}}),[m,H,G]),(0,x.useEffect)((function(){function e(){return(e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(3!==i||M||!n){e.next=3;break}return e.next=3,U(H);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,i,H,E]),(0,x.useEffect)((function(){return Pe.Z.subscribe("create-discuss",(function(){clearInterval(O.current),U(H),o&&(O.current=setInterval((function(){U(H)}),5e3))}))}),[n]),!M)return(0,B.jsx)(De.Z,{});var Qe=M.disscuss_count,Ce=M.comments,xe=(M.all,M.can_hidden);return console.log(l,"to_user_id"),(0,B.jsxs)(x.Fragment,{children:[(0,B.jsxs)("div",{className:"discuss-container",ref:F,children:[o&&(0,B.jsx)(je.ZP,{type:"primary",style:{float:"right",marginBottom:10},onClick:function(){(0,R.xg)("/chatgpt?id=".concat(l,"&position=").concat(d))},children:"进入历史问答"}),(null==c?void 0:c.myshixun_manager)&&!o&&(0,B.jsx)(je.ZP,{style:{float:"right",marginBottom:10},type:"primary",onClick:function(){k(!m),m?S(setInterval((function(){U(H,!0)}),5e3)):clearInterval(j)},children:m?"开启实时刷新":"停止实时刷新"}),0===Qe?(0,B.jsx)(w.Z,{styles:{clear:"both"}}):null,Ce.map((function(e,i){return(0,B.jsx)(Oe,{user:s,userInfomation:r,data:e,index:i,identity:t,onPaginationChange:z,shixunIdentifier:n,onSetActionType:ue,onTopOrDownDiscuss:$,adminOrOperator:xe,onPlusDiscuss:K,onDisableDiscuss:X,onSetRewardData:Ae,activeDiscussIndex:G,onHandleSubmitDiscusses:fe,onSetActiveDiscussIndex:pe,onReplyDiscuss:ge,allowDisableDiscuss:a,onHandleRepaly:W},e.id)})),Qe>10?(0,B.jsx)("div",{className:"pagination-container",children:(0,B.jsx)(y.Z,{showQuickJumper:!0,showSizeChanger:!1,onChange:z,current:H,total:Qe})}):null,(0,B.jsx)(Me,{})]}),(0,B.jsxs)(Z.Z,{children:[(0,B.jsx)(T.Z,{centered:!0,title:"提示",open:!!J,onOk:function(){return ne.apply(this,arguments)},onCancel:function(){E({type:Y.yS,payload:{actionType:null}})},children:(0,B.jsx)("p",{children:J?J.message:""})}),(0,B.jsx)(T.Z,{centered:!0,width:400,title:"奖励设置",open:b,onCancel:function(){E({type:Y.t2})},onOk:function(){return he.apply(this,arguments)},children:(0,B.jsx)(ye.Z,{placeholder:"请输入奖励的金币数量",min:1,onChange:function(e){N.current.score=e},style:{width:"228px"}})})]})]})},Le=t(33987),ze=function(e){var n=e.user_praise,t=e.praise_count,i=e.praisePlus,s=e.onCreateDiscuss,a=(e.user,e.userInfo),r=(0,x.useState)(!1),c=f()(r,2),o=c[0],l=c[1],d=(0,x.useState)(""),A=f()(d,2),g=A[0],I=A[1];function E(){l(!1)}function p(){return(p=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=a&&a.authentication){e.next=3;break}return T.Z.confirm({title:"提示",className:"custom-modal-divider ",icon:null,content:"需要通过实名验证后,才能进行评论操作",okText:"前往实名验证",cancelText:"取消",onOk:function(){window.open("/account/certification")}}),e.abrupt("return");case 3:if(""!=g.trim()){e.next=6;break}return O.ZP.warning("内容不能为空"),e.abrupt("return");case 6:s(g),I(""),l(!1);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,B.jsxs)("div",{className:"comment-input-editor-container ".concat(o?"active":""," "),children:[(0,B.jsxs)("div",{className:o?"text-area hide":"text-area",children:[(0,B.jsx)("input",{placeholder:"说点什么",onClick:function(){l(!0)}}),(0,B.jsxs)("a",{className:"c-light-black",onClick:i,title:n?"取消点赞":"点赞",children:[(0,B.jsx)("i",{className:"mr3 ".concat(n?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"," "),alt:"赞"}),t?(0,B.jsx)("span",{children:t}):""]})]}),o?(0,B.jsx)("div",{className:"input-mask",onClick:E}):null,(0,B.jsxs)("div",{className:o?"md-container":"md-container hide",children:[(0,B.jsx)(Le.Z,{id:"discuss-input-editor",startInit:o,miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:g,height:240,onChange:function(e){I(e)}}),(0,B.jsxs)("div",{className:"tip-container",onClick:E,children:[(0,B.jsx)("p",{children:"请勿粘贴答案,否则将造成账号禁用后果!"}),(0,B.jsx)("a",{className:"btn-send",style:{color:"#fff",background:"#0152d9"},onClick:function(){return p.apply(this,arguments)},children:"发送"})]})]})]})},Ke=function(e){var n=e.data;return(0,B.jsx)(x.Fragment,{children:n&&n.map((function(e){return(0,B.jsxs)("div",{className:"choose-answer-item",children:[(0,B.jsxs)("p",{children:["第",e.position,"题"]}),(0,B.jsx)(F.Z,{value:e.answer})]},e.position)}))})},Ve=function(e){var n=e.data,t=e.onShowUnlockAnswerModal,i=e.challenge,s=null!=i&&i.disable_copy?{pointerEvents:"none",userSelect:"none"}:{};return(0,B.jsx)(x.Fragment,{children:n&&n.map((function(e,n){var i=e.answer_id,a=e.answer_name,r=e.answer_contents,c=e.view_time;return(0,B.jsxs)("div",{className:"answer-item-container",style:s,children:[(0,B.jsxs)("div",{className:"flex-container",children:[(0,B.jsxs)("span",{className:"level",children:[" 级别",n+1,": "]}),(0,B.jsx)("span",{className:"name",children:a}),r?(0,B.jsxs)(x.Fragment,{children:[(0,B.jsx)("span",{className:"view-time",children:c?P()(c).format("YYYY-MM-DD HH:mm"):""}),(0,B.jsx)("span",{children:"已解锁"})]}):(0,B.jsx)("a",{onClick:t,children:"解锁"})]}),r?(0,B.jsx)(F.Z,{value:r}):null]},i)}))})},We=function(e){var n=e.loading,t=e.data,i=e.onShowTip,s=e.st,a=e.challenge,r=(0,x.useRef)(null),c=(0,x.useRef)(null),o=(0,x.useRef)(null),l=(0,x.useRef)(null),u=(0,x.useRef)({x:0,y:0});return(0,x.useEffect)((function(){if(r.current&&null!=a&&a.disable_copy){var e=function(e){u.current={x:e.clientX,y:e.clientY},clearTimeout(o.current),clearTimeout(l.current),o.current=setTimeout((function(){c.current.style.left="".concat(u.current.x,"px"),c.current.style.top="".concat(u.current.y,"px"),c.current.style.display="block"}),1e3),l.current=setTimeout((function(){c.current.style.display="none",clearTimeout(o.current),clearTimeout(l.current)}),3e3)},n=function(){c.current.style.display="none",clearTimeout(o.current),clearTimeout(l.current)},t=function(e){u.current={x:e.clientX,y:e.clientY}};return r.current.addEventListener("mouseenter",e),window.addEventListener("mousemove",t),r.current.addEventListener("mouseleave",n),function(){var i,s;null===(i=r.current)||void 0===i||i.removeEventListener("mouseenter",e),window.removeEventListener("mousemove",t),null===(s=r.current)||void 0===s||s.removeEventListener("mouseleave",n)}}}),[null==r?void 0:r.current,null==a?void 0:a.disable_copy]),(0,B.jsxs)("div",{ref:r,className:"answer-container",children:[(0,B.jsx)("div",{ref:c,className:"answer-tips-css",children:"禁止复制参考答案"}),n?(0,B.jsx)(De.Z,{}):null,1===s?(0,B.jsx)(Ke,{data:t}):(0,B.jsx)(Ve,{data:t,challenge:a,onShowUnlockAnswerModal:i})]})},qe=t(24905),Xe=function(e){var n=e.data,t=e.selected_unlocked_answer_id,i=e.selected_index,s=e.onSelect;if(!n)return null;var a=n.filter((function(e,n){return!e.answer_contents&&(e.index=n,!0)}));function r(e){var n=e.target,t=n.value,i=n.checked;s(i?t:null)}return(0,B.jsxs)("table",{className:"unlock-answer-list",children:[(0,B.jsx)("thead",{children:(0,B.jsxs)("tr",{children:[(0,B.jsx)("th",{}),(0,B.jsx)("th",{children:"级别"}),(0,B.jsx)("th",{children:"名称"}),(0,B.jsx)("th",{children:"扣分占比"}),(0,B.jsx)("th",{children:"扣减金币"})]})}),(0,B.jsx)("tbody",{children:a.map((function(e,n){return(0,B.jsxs)("tr",{children:[(0,B.jsx)("td",{children:(0,B.jsx)(qe.Z,{value:e.answer_id,onChange:r,checked:e.answer_id===t||t&&i>=n})}),(0,B.jsx)("td",{children:e.index+1}),(0,B.jsx)("td",{children:e.answer_name}),(0,B.jsxs)("td",{children:[e.answer_ratio,"%"]}),(0,B.jsx)("td",{className:"gold-color",children:e.answer_score})]},e.answer_id)}))})]})},_e="unity3d-panel___aA1uJ",$e=function(e){var n=e.unity_3d_routes,t=e.onGetUnity3dMessage,i=e.taskData,s=e.userInfo,a=e.itemData,r=void 0===a?{}:a,c=(0,x.useRef)(),o=(0,x.useState)(!0),l=f()(o,2),d=l[0],A=l[1],g=(0,x.useState)("正在努力加载中..."),I=f()(g,2),E=I[0],p=I[1],Q=(0,x.useState)({}),m=f()(Q,2),k=m[0],v=m[1],D=r.shixun_environment_id,j=r.tab_type,y=r.index_tab;(0,x.useEffect)((function(){function e(e){try{var n=JSON.parse(e.data);t(n),"getTaskData"===n.type&&R({taskData:i,userInfo:s})}catch(n){console.log("error:",n,e)}}window.addEventListener("message",e);var n=Pe.Z.subscribe("evaluate-unity3d-result",(function(e){R(e)})),a=Pe.Z.subscribe("unity3d-reset",(function(e){"start"===e&&(A(!0),p("正在重置中..."),v({})),"done"===e&&w()}));return function(){window.removeEventListener("message",e),n(),a()}}),[]),(0,x.useEffect)((function(){5===(null==r?void 0:r.tab_type)&&w()}),[null==r?void 0:r.tab_type]);var w=function(){var e=h()(u()().mark((function e(){var n,t,s,a,r,c;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return A(!0),e.next=3,(0,S.sA)(null===(n=i.myshixun)||void 0===n?void 0:n.identifier,{shixun_environment_id:D,tab_type:j});case 3:if(s=e.sent,A(!1),null==s||null===(t=s.data)||void 0===t||null===(t=t.data_list)||void 0===t||!t.length){e.next=8;break}return Pe.Z.publish("pod-restrict-data",{identifier:null==s||null===(a=s.data)||void 0===a?void 0:a.identifier,data_list:null==s||null===(r=s.data)||void 0===r?void 0:r.data_list}),e.abrupt("return");case 8:0===(null==s?void 0:s.status)&&(s.data.thiry_party_url=(null==s||null===(c=s.data)||void 0===c?void 0:c.link_url)+"?t="+(new Date).getTime(),Pe.Z.publish("send-tabs-result-data",C()(C()({},null==s?void 0:s.data),{},{index_tab:y})),Pe.Z.publish("update-windows-time",null==s?void 0:s.data),v(C()({},s.data||{})));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function R(e){c.current&&c.current.contentWindow.postMessage(JSON.stringify(e),"*")}return(0,B.jsxs)(x.Fragment,{children:[d&&(0,B.jsx)(De.Z,{className:"c-white",message:E}),(n||k.thiry_party_url)&&(0,B.jsx)("iframe",{onLoad:function(){A(!1)},className:_e,ref:c,allow:"geolocation document-domain",sandbox:"allow-scripts allow-same-origin allow-top-navigation allow-forms allow-popups allow-pointer-lock allow-popups-to-escape-sandbox allow-presentation allow-top-navigation-by-user-activation",src:n||k.thiry_party_url})]})},en=t(18468);function nn(e){var n=e.target;if("IMG"===n.tagName.toUpperCase()){var t=n.src||n.getAttribute("src");t&&-1===t.indexOf("/images/avatars/User")&&(e.stopPropagation(),e.preventDefault(),Pe.Z.publish("preview-image",t))}}var tn={showTaskList:!1,activeIndex:0,taskList:[],enlarge_unity3D:!1,tab_fixed:!1,selected_unlocked_answer_id:null,isMultiLevel:!1,showTip:!1,answerScore:0,data:null,loading:!1};function sn(e,n){switch(n.type){case Y.n_:return C()(C()({},e),{},{activeIndex:n.payload});case Y.lS:return C()(C()({},e),{},{enlarge_unity3D:n.payload});case Y.gK:return C()(C()({},e),{},{tab_fixed:n.payload});case Y.Hp:return C()(C()({},e),{},{showTaskList:!0});case Y.hK:return C()(C()({},e),{},{showTaskList:!1});case Y.sM:case Y.ib:return C()(C()({},e),n.payload);case Y.wt:return C()(C()({},e),{},{loading:!0});case Y.Rj:return C()(C()({},e),{},{showTip:!0});case Y.NZ:return C()(C()({},e),{},{showTip:!1});case Y.ym:return C()(C()({},e),{},{selected_unlocked_answer_id:n.payload});case Y.pl:return C()(C()({},e),n.payload);default:throw new Error}}var an=(0,m.connect)((function(e){return{userInfoData:e.user}}))((function(e){var n=e.taskId,t=e.minuxUserGrade,i=e.discusses_count,s=e.is_teacher,a=e.has_answer,c=e.user,o=e.st,l=e.game,d=e.rank_name,A=e.challenge,g=e.myshixun,I=e.user_praise,E=e.praise_count,p=e.unity_3d_routes,Q=e.with_code_file,k=e.onPlusOrCancelPraise,D=e.onGetUnity3dMessage,j=e.shixun,y=e.taskData,w=e.chatgpt,H=e.userInfoData,P=e.to_user_id,M=(0,m.useSearchParams)(),J=f()(M,1)[0],b=(0,x.useReducer)(sn,tn),G=f()(b,2),ne=G[0],te=G[1],ie=(0,x.useState)(!1),se=f()(ie,2),ae=se[0],re=se[1],ce=(0,x.useState)(!1),oe=f()(ce,2),le=oe[0],de=oe[1],he=(0,x.useState)({}),Ae=f()(he,2),ge=Ae[0],fe=Ae[1],Ee=ne.taskList,pe=ne.showTaskList,Qe=ne.activeIndex,Ce=ne.enlarge_unity3D,xe=ne.tab_fixed,me=ne.data,ke=ne.answerScore,Be=ne.loading,De=ne.showTip,je=ne.isMultiLevel,ye=ne.selected_unlocked_answer_id,we=(0,x.useMemo)((function(){var e=0;if(me&&ye)for(var n=me.filter((function(e){return!e.answer_contents})),t=0;t1,activeIndex:i?Qe:2}});case 12:case"end":return e.stop()}}),e)}))),Ye.apply(this,arguments)}function Fe(e){var n=e.choose_answers,t=e.message,i=e.status;0!==i?te({type:Y.pl,payload:{showTip:1===i,data:n,answerScore:t,loading:!1,activeIndex:1===i?Qe:2}}):t.info(t)}function Oe(){return(Oe=h()(u()().mark((function e(){var n,i,s,a;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(re(!0),1!==o){e.next=8;break}return e.next=4,(0,S.MH)(l.identifier);case 4:-1!==(null==(n=e.sent)?void 0:n.status)&&(t(ke),Fe(n)),e.next=14;break;case 8:if(!ye){e.next=14;break}return e.next=11,(0,S.j3)(l.identifier,ye);case 11:i=e.sent,s=i.status,i.message,-1===s||(je?(a=0,me.filter((function(e){return!e.answer_contents})).forEach((function(e,n){n<=we&&e&&(a+=e.answer_score)})),t(a)):t(ke),Ge(),Te(null),te({type:Y.NZ}));case 14:re(!1);case 15:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Te(e){te({type:Y.ym,payload:e})}function Ue(){return(Ue=h()(u()().mark((function e(){var n,t;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!J.get("subject_id")){e.next=7;break}return e.next=4,(0,S.SO)(g.identifier,C()({},(0,R.oP)()));case 4:t=e.sent,e.next=10;break;case 7:return e.next=9,(0,S.g6)(g.identifier);case 9:t=e.sent;case 10:te({type:Y.sM,payload:{taskList:(null===(n=t)||void 0===n?void 0:n.stages)||t,showTaskList:!0}}),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),console.log(e.t0);case 16:case"end":return e.stop()}}),e,null,[[0,13]])})))).apply(this,arguments)}function Le(e,n,t){return Ke.apply(this,arguments)}function Ke(){return(Ke=h()(u()().mark((function e(n,t,i){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,S.L5)(n,j.id,t);case 3:Ee[i].star=t,te({type:Y.ib,payload:{taskList:r()(Ee)}}),e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),console.log(e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)}(0,x.useEffect)((function(){var e,n=null==H?void 0:H.userInfo;n&&(fe(C()({},n)),de(null==n||null===(e=n.shixun)||void 0===e?void 0:e.own))}),[null==j?void 0:j.identifier]),(0,x.useEffect)((function(){return function(){te({type:Y.hK}),te({type:Y.n_,payload:0})}}),[n]),(0,x.useEffect)((function(){te({type:Y.n_,payload:J.get("extra")?3:0})}),[J.get("extra")]),(0,x.useEffect)((function(){if(Re.current)return Re.current.addEventListener("mousedown",nn),function(){var e;null===(e=Re.current)||void 0===e||e.removeEventListener("mousedown",nn)}}),[Re.current]),(0,x.useEffect)((function(){if(Q&&p&&Re.current){var e=(0,en.Ds)((function(e){var n=e.target.scrollTop;te(n>=354?{type:Y.gK,payload:!0}:{type:Y.gK,payload:!1})}),10);Re.current.addEventListener("scroll",e);var n=Pe.Z.subscribe("evaluate-unity3d-finish",(function(){Re.current.scrollTop=0}));return function(){var t;null===(t=Re.current)||void 0===t||t.removeEventListener("scroll",e),n()}}te({type:Y.gK,payload:!0})}),[Q,p,Re.current]);var Ve=A.position,qe=A.score,_e=A.subject,an={onViewAllTask:function(){!function(){Ue.apply(this,arguments)}()},position:Ve,score:qe,subject:_e};function rn(){return(rn=h()(u()().mark((function e(n){var t;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ue({content:n,container_type:"Shixun",container_id:j.id,challenge_id:A.id,position:Ve});case 2:if(-3!==(t=e.sent).status){e.next=6;break}return T.Z.info({title:"提示",className:"custom-modal-divider ",icon:null,content:"你的账号因为发布了不当内容,现已将评论功能屏蔽。",okText:"确定"}),e.abrupt("return");case 6:console.log(t),te({type:Y.n_,payload:3}),Pe.Z.publish("create-discuss");case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var cn={loading:Be,data:me,onShowTip:function(){te({type:Y.Rj})},st:o,challenge:A};return(0,B.jsxs)(x.Fragment,{children:[(0,B.jsx)(v,C()({},an)),(0,B.jsxs)("div",{className:L,children:[(0,B.jsxs)("div",{ref:Re,className:z,children:[p&&Q?(0,B.jsxs)("div",{className:"".concat(K," ").concat(Ce?W:""),children:[(0,B.jsx)("a",{onClick:function(){te({type:Y.lS,payload:!Ce})},className:"".concat(V," ").concat(Ce?W:""),children:(0,B.jsx)("i",{className:"iconfont ".concat(Ce?"icon-suoxiao1":"icon-kuoda"," ")})}),(null==ge?void 0:ge.user_id)&&(0,B.jsx)($e,{userInfo:ge,taskData:y,unity_3d_routes:p,onGetUnity3dMessage:D})]}):null,(0,B.jsx)("ul",{className:"".concat(q," ").concat(xe?X:""),children:Me.map((function(e){return(0,B.jsx)("li",{onClick:Je,id:e.index,className:Qe===e.index?_:"",children:(0,B.jsxs)("a",{children:[e.title,3===e.index&&i?(0,B.jsx)("span",{children:i}):null]})},e.title)}))}),(0,B.jsxs)("div",{children:[(0,B.jsx)(F.Z,{className:0===Qe?$:"hide",value:A.task_pass}),(0,B.jsx)("div",{className:1===Qe?$:"hide",children:Se?(0,B.jsx)(F.Z,{value:Se}):null}),(0,B.jsx)("div",{className:2===Qe?$:"hide",style:{paddingTop:40},children:(0,B.jsx)(We,C()({},cn))}),(0,B.jsx)("div",{className:3===Qe?$:"hide",children:(0,B.jsx)(Ze,{activeIndex:Qe,userInfo:ge,shixunIdentifier:j.identifier,identity:c.identity,user:c,allowDisableDiscuss:le,taskData:y,chatgpt:w,to_user_id:P,challengeId:A.id})}),(0,B.jsx)("div",{className:4===Qe?$:"hide",children:(0,B.jsx)(N,{activeIndex:Qe,taskId:n})})]})]}),"exercises"!==J.get("type")&&!(null!=j&&j.is_disable_discuss)&&!l.homework_common_comment_open&&(0,B.jsx)(ze,{user:c,userInfo:ge,user_praise:I,praise_count:E,praisePlus:k,onCreateDiscuss:function(e){return rn.apply(this,arguments)}})]}),(0,B.jsxs)(Z.Z,{children:[(0,B.jsxs)(U.Z,{rootClassName:"task-drawer",width:420,title:null,placement:"left",closable:!1,open:pe,onClose:function(){te({type:Y.hK})},getContainer:function(){return document.getElementById("task-left-panel")},children:[J.get("subject_id")&&(0,B.jsx)(ve,C()(C()({taskList:r()(Ee),challenge:A,shixun:j},(0,R.oP)()),{},{identity:c.identity,onSaveTaskStar:Le})),!J.get("subject_id")&&(0,B.jsx)(Ie,{taskList:r()(Ee),challenge:A,shixun:j,identity:c.identity,onSaveTaskStar:Le})]}),(0,B.jsxs)(T.Z,{centered:!0,title:"提示",open:De,onOk:function(){return Oe.apply(this,arguments)},onCancel:function(){te({type:Y.NZ})},confirmLoading:ae,className:ee,children:[s?(0,B.jsx)("p",{children:"已经过职业认证的教师可以免金币查看答案哟~"}):(0,B.jsx)("p",{children:"先查看参考答案,再通过评测的学生,实训作业有可能是零分哦~"}),je?(0,B.jsx)(Xe,{selected_index:we,selected_unlocked_answer_id:ye,onSelect:Te,data:me}):(0,B.jsx)("p",{children:"将扣除".concat(ke,"点金币,是否确认查看答案")}),s?(0,B.jsx)("a",{href:"/account/certification",class:"to-certification-link",target:"_blank",children:"立即认证"}):null]}),(0,B.jsx)(Ne.Z,{})]})]})})),rn=t(31797),cn=t(65615),on=t(70325);function ln(e){return e.toString().padStart(2,"0")}function un(e){var n=Math.floor(e/60),t=e%60,i=Math.floor(n/60);return"".concat(ln(i),":").concat(ln(n-60*i),":").concat(ln(t))}var dn=function(e){var n=e.defaultTime,t=e.status,i=e.onUpdateCostTime,s=e.lastedGetTaskInfoTime,a=e.retentionTime,r=void 0===a?"":a,c=e.title,o=void 0===c?"":c,l=(0,x.useState)(n||0),u=f()(l,2),d=u[0],h=u[1],A=(0,x.useRef)();return(0,x.useEffect)((function(){s&&(h(n),A.current=n)}),[n,s]),(0,x.useEffect)((function(){if(s)return Pe.Z.subscribe("update-cost-time",(function(){2!==t&&i(A.current)}))}),[s]),(0,on.Z)((function(){r&&localStorage.setItem(r,String(d+1)),h(d+1),A.current=A.current+1}),2===t?null:1e3),(0,B.jsxs)("span",{children:[o?"".concat(o,":"):null,un(d)]})},hn=t(91232),An=t.n(hn),gn="action-bar___bbigU",In="startDebug___tLWzR",fn="disabledDebug___npN0z",En=t(14478),pn=t(680),Qn=t(60141),Cn=t(56102),xn=t(89392);function mn(e){var n=e.onShowNotice,t=e.className,i=void 0===t?"":t;return(0,B.jsx)("a",{title:"更新通知",onClick:n,className:i,children:(0,B.jsx)("img",{width:14,src:Qn,alt:"notice"})})}function kn(e){var n,t=e.code_hidden,i=e.gameStatus,s=e.isEditPath,a=(e.currentPath,e.git_url),r=(e.monitoring_url,e.onResetCode),c=e.onResetGitCode,o=e.onShowCodeSetting,l=e.onResetPassedCode,d=e.onShowDir,A=e.onRightFullHandler,g=e.isResizeLarge,I=e.tab_type,E=e.startDebug,p=e.setStartDebug,Q=(e.breakPointValue,e.shixun,e.myshixun),C=e.game,k=e.unique,v=e.setUnique,D=e.setHighlightLine,j=e.allow_use_code_debugger,y=e.onUpdateCode,w=e.allBreakPointValue,S=e.setAllBreakPointValue,R=e.setBreakPointValue,H=(e.isTheoretical,(0,m.useSearchParams)()),P=f()(H,1)[0],M=function(e){var n=[];for(var t in e)if(e.hasOwnProperty(t)){var i,s=e[t],a=An()(s);try{for(a.s();!(i=a.n()).done;){var r=i.value;n.push("".concat(t,":").concat(r))}}catch(e){a.e(e)}finally{a.f()}}return n},J=function(){var e=h()(u()().mark((function e(n){var t,i;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(w,M(w),222),(0,m.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在开启调试,请稍候..."}}),e.next=4,y();case 4:return e.next=6,(0,ne.ZP)("/api/myshixuns/".concat(null==Q?void 0:Q.identifier,"/code_debugs/start.json"),{method:"post",body:{game_identifier:null==C?void 0:C.identifier,breakpoints:M(w)}});case 6:0===(t=e.sent).status&&(p(!0),Pe.Z.publish("active-debug"),Pe.Z.publish("active-debug-data",(null==t?void 0:t.data)||{}),v(null==t||null===(i=t.data)||void 0===i?void 0:i.unique)),(0,m.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}});case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,ne.ZP)("/api/myshixuns/".concat(null==Q?void 0:Q.identifier,"/code_debugs/stop.json"),{method:"post",body:{unique:k}});case 2:0===e.sent.status&&(D(null),p(!1));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=!(null===(n=(0,xn.flattenDeep)(Object.values(w)))||void 0===n||!n.length);return(0,B.jsx)(x.Fragment,{children:(0,B.jsxs)("div",{className:gn,children:[1===I&&(0,B.jsxs)(x.Fragment,{children:[j&&(0,B.jsx)(x.Fragment,{children:E?(0,B.jsx)("b",{title:"停止调试",style:{marginRight:6},className:In,onClick:b,children:(0,B.jsx)("i",{style:{color:"#c75450"},className:"iconfont icon-tingzhitiaoshi font12"})}):G?(0,B.jsx)("b",{title:"开始调试",className:In,onClick:J,children:(0,B.jsx)("i",{className:"iconfont icon-debug font14"})}):(0,B.jsx)(be.Z,{title:"请先在代码行设置断点",children:(0,B.jsx)("b",{className:fn,children:(0,B.jsx)("i",{className:"iconfont icon-debug font14"})})})}),!t&&(0,B.jsx)("a",{title:"显示目录",onClick:d,children:(0,B.jsx)("i",{className:"iconfont icon-wenjian"})}),a&&(0,B.jsx)(Cn.CopyToClipboard,{text:a,onCopy:function(){return O.ZP.success("复制成功")},children:(0,B.jsx)("a",{title:"复制版本库地址",children:(0,B.jsx)("i",{className:"iconfont icon-fuzhi2"})})}),2===i&&s&&!E&&(0,B.jsx)(En.Z,{placement:"bottomRight",title:"你在本关中修改的内容将丢失,是否确定重新加载上次通过的代码?",onConfirm:l,children:(0,B.jsx)("a",{title:"加载上次通过的代码",children:(0,B.jsx)("i",{className:"iconfont icon-fanhuishangcidaima font-20 "})})}),s&&!E&&(0,B.jsx)("a",{title:"恢复初始代码",onClick:function(){var e;T.Z.confirm({title:"恢复初始代码",icon:(0,B.jsx)(pn.Z,{}),content:"你在本文件中修改的内容将丢失,是否确定重新加载初始代码?",centered:!0,okText:"确定",cancelText:"取消",onOk:(e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r();case 2:S({}),R([]);case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:(0,B.jsx)("i",{className:"iconfont icon-zhongzhi font-20 "})}),s&&!E&&(0,B.jsx)("a",{title:"重置代码仓库",onClick:function(){var e;T.Z.confirm({title:"重置代码仓库",icon:(0,B.jsx)(pn.Z,{}),content:"您的所有代码将被还原至初始状态,不影响通关状态与作业成绩。确认重置?",centered:!0,okText:"确定",cancelText:"取消",onOk:(e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:S({}),R([]);case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},children:(0,B.jsx)("i",{className:"iconfont icon-zhongzhidaimacangku font12 "})}),(0,B.jsx)("a",{onClick:o,title:"设置",children:(0,B.jsx)("i",{className:"iconfont icon-shezhi"})})]}),(2===I||3===I||4===I||5===I)&&(0,B.jsx)("a",{title:"工具栏",onClick:function(){Pe.Z.publish("show-head-toolbar",!0)},children:(0,B.jsx)("i",{className:"iconfont icon-vncshixunjiemian-gongjulan mr5"})}),!("true"===P.get("isFullScreen"))&&(0,B.jsx)("a",{onClick:A,title:g?"退出全屏":"全屏",children:(0,B.jsx)("i",{className:g?"iconfont icon-shousuo":"iconfont icon-zhankai"})})]})})}var Bn=t(59919),vn={flex_box_center:"flex_box_center___rNE5B",flex_space_between:"flex_space_between___UQz5R",flex_box_vertical_center:"flex_box_vertical_center___LVkcg",flex_box_center_end:"flex_box_center_end___liNMD",flex_box_column:"flex_box_column___en5bA",wrap:"wrap___QHoGE",list:"list___PqCYv",page:"page___TKcdQ"},Dn=["userDetail","user","globalSetting","loading","dispatch","onClose","shixun"],jn=(0,m.connect)((function(e){var n=e.user,t=e.userDetail,i=e.loading;return{user:n,userDetail:t,shixunsDetail:e.shixunsDetail,globalSetting:e.globalSetting,loading:i.models.index}}))((function(e){e.userDetail,e.user,e.globalSetting,e.loading;var n=e.dispatch,t=e.onClose,i=e.shixun,s=o()(e,Dn),a=(0,m.useParams)(),r=(0,x.useState)(null),c=f()(r,2),l=c[0],d=c[1],A=(0,x.useState)({}),g=f()(A,2),I=(g[0],g[1]),E=(0,x.useState)(0),p=f()(E,2),Q=p[0],k=p[1],v=(0,x.useState)(C()({page:1,limit:20,id:i.identifier},a)),D=f()(v,2),j=D[0],w=(D[1],(0,x.useCallback)((function(){return s.visible}),[s.visible]));(0,x.useEffect)((function(){s.visible&&(j.page=1,S())}),[s.visible]);var S=function(){var e=h()(u()().mark((function e(){var t;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n({type:"shixunsDetail/getSetData",payload:j});case 2:(t=e.sent)&&(d(t.data_sets),k(t.data_sets_count),I(t.folder_name||""));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,B.jsxs)(B.Fragment,{children:[s.children,(0,B.jsxs)(U.Z,{title:"数据集",placement:"right",rootClassName:vn.wrap,width:300,closable:!1,onClose:t,open:w(),children:[!(null!=l&&l.length)&&(0,B.jsx)("div",{className:"tc c-grey-999",children:"此实践项目暂无数据集"}),null==l?void 0:l.map((function(e,n){return(0,B.jsxs)("dl",{className:vn.list,children:[(0,B.jsx)(be.Z,{title:e.title,children:(0,B.jsxs)("dt",{children:[(0,B.jsx)("span",{className:"icon-wenjian4 mr5"}),e.title]})}),(0,B.jsx)("dd",{children:(0,B.jsx)(Cn.CopyToClipboard,{text:e.file_path,onCopy:function(){return O.ZP.success("复制成功")},children:(0,B.jsx)("span",{className:"".concat(vn.copy," current"),children:"点击复制"})})})]},n)})),(0,B.jsx)("div",{className:"tc",children:(0,B.jsx)(y.Z,{onChange:function(e){j.page=e,S()},className:vn.page,size:"small",total:Q,pageSize:j.limit,hideOnSinglePage:!0})})]})]})})),yn=t(89125),wn=t(79546),Sn=t(40416),Rn=rn.Z.Countdown;function Hn(){return(0,B.jsx)("p",{children:"实验环境将恢复到初始状态,您在系统中创建的数据可能会丢失。请确保您的数据已保存(如:版本库代码已推送到服务器)。是否确认重置?"})}var Pn=function(e){var n,t,i,s=e.mirror_description,a=e.difficulty,r=e.git_url,c=e.isNotice,o=e.user,l=e.game,d=e.monitoring_url,A=e.shixun,g=void 0===A?{}:A,I=e.resetVncLoading,E=e.onUpdateCostTime,p=e.lastedGetTaskInfoTime,Q=e.onShowNotice,v=e.onResetGitCode,D=e.onResetCode,j=e.onResetVnc,y=e.onRestartReboot,w=e.onAddVncTime,S=e.onUpdateCode,R=e.unity_3d_routes,H=e.st,P=e.toolbarItem,M=void 0===P?{}:P,J=e.myshixun,b=void 0===J?{}:J,G=e.mirror_name,N=e.mirror_description_multi,Y=e.onResetAllVnc,F=(0,m.useParams)(),L=(0,m.useSearchParams)(),z=f()(L,1)[0],K=g.name,V=g.identifier,W=g.task_pass,q=g.test_set_permission,X=l.cost_time,_=l.status,$=o.user_url,ee=o.image_url,ne=o.grade,te=void 0===ne?0:ne,ie=(0,x.useState)(!1),se=f()(ie,2),ae=se[0],re=se[1],ce=(0,x.useState)({}),oe=f()(ce,2),le=oe[0],ue=oe[1],de=(0,x.useState)("#37AD83"),he=f()(de,2),Ae=he[0],ge=he[1],Ie=(0,x.useState)(null),fe=f()(Ie,2),Ee=fe[0],Qe=fe[1],Ce=(0,x.useState)(),xe=f()(Ce,2),me=xe[0],ke=xe[1],Be=(0,x.useState)(c||!1),ve=f()(Be,2),De=ve[0],ye=ve[1],we=(0,x.useState)(!1),Re=f()(we,2),He=Re[0],Me=Re[1],be=((0,x.useRef)(),(0,x.useRef)(),(0,x.useRef)()),Ge=(0,x.useState)(!1),Ne=f()(Ge,2),Ye=Ne[0],Fe=Ne[1],Oe=(0,x.useRef)(null),Te=(0,x.useRef)(Ye);Te.current=Ye;var Ue=M.index_tab,Ze=M.shixun_environment_id,Le=M.tab_type,ze=M.windows_vnc,Ke=M.vnc_url,Ve=M.linux_vnc,We=M.reboot_cloud,Xe=M.cloud_type,_e=M.resData,$e=M.instance_startup_type,en=(0,x.useRef)(!1);(0,wn.y)("exercises"===z.get("type"));var nn=(0,Sn._)(le);(0,x.useEffect)((function(){function e(){return(e=h()(u()().mark((function e(){var n,t,i,s,a,r;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("exercises"!==z.get("type")){e.next=16;break}if(window.self!==window.top){e.next=4;break}return window.top.location.href="/",e.abrupt("return");case 4:if("coursesId"!==z.get("coursesId")){e.next=10;break}return e.next=7,(0,pe._F)({categoryId:z.get("exercisesId"),login:z.get("login")});case 7:i=e.sent,e.next=13;break;case 10:return e.next=12,(0,pe._B)({categoryId:z.get("exercisesId"),login:z.get("login")});case 12:i=e.sent;case 13:ue(C()({},i)),Pe.Z.publish("exercise-data",i),null!==(n=i)&&void 0!==n&&n.left_banner_id&&null!==(t=i)&&void 0!==t&&null!==(t=t.exercise)&&void 0!==t&&t.left_time&&(Qe(Date.now()+1e3*(null===(s=i)||void 0===s||null===(s=s.exercise)||void 0===s?void 0:s.left_time)),setTimeout((function(){ge("red")}),1e3*((null===(a=i)||void 0===a||null===(a=a.exercise)||void 0===a?void 0:a.left_time)-300>0?(null===(r=i)||void 0===r||null===(r=r.exercise)||void 0===r?void 0:r.left_time)-300:0)));case 16:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),(0,x.useEffect)((function(){var e=Pe.Z.subscribe("update-windows-time",(function(e){ke(parseInt(e.remaining_time/1e3))})),n=Pe.Z.subscribe("show-head-toolbar",(function(e){re(e)}));return function(){e(),n()}}),[]),(0,x.useEffect)((function(){var e;return"exercises"===z.get("type")&&null!=le&&null!==(e=le.exercise)&&void 0!==e&&e.screen_open&&(yn.U.forEach((function(e,n){window.addEventListener(e,sn,!1),window.addEventListener("blur",sn,!1)})),window.focus(),be.current=setInterval((function(){window.focus()}),1e3)),function(){yn.U.forEach((function(e,n){window.removeEventListener(e,sn,!1)})),window.removeEventListener("blur",sn,!1),clearInterval(be.current)}}),[le]);var tn=function(){Me(!He)},sn=function(e){"IFRAME"!==document.activeElement.tagName&&(window.parent.postMessage("backExercise","*"),en.current||(0,k.BU)())};function an(){re(!1)}function rn(){F.courseId&&F.homeworkId?location.href="/classrooms/".concat(F.courseId,"/shixun_homework/").concat(F.homeworkId,"/detail"):("exercises"===z.get("type")&&sn("back"),location.href="/shixuns/".concat(V,"/challenges"))}function on(){return ln.apply(this,arguments)}function ln(){return(ln=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!I){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,j();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var un={task_pass:W,test_set_permission:q,mirror_description:s,difficulty:a,resetVncLoading:I,git_url:r,onVncAction:function(e){if(an(),"reset-task"===e&&!I)var n=T.Z.confirm({title:"重置环境",icon:(0,B.jsx)(pn.Z,{}),content:(0,B.jsx)(Hn,{}),maskClosable:!1,keyboard:!1,centered:!0,okText:"确定",cancelText:"取消",onOk:(t=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(4!==Le){e.next=6;break}return n.update({cancelButtonProps:{disabled:!0}}),e.next=4,on();case 4:return n.update({cancelButtonProps:{disabled:!1}}),e.abrupt("return");case 6:on();case 7:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})});var t,i,s,a;if("restart-reboot"===e&&!I)var r=T.Z.confirm({title:"重启云主机",icon:(0,B.jsx)(pn.Z,{}),content:"您确定要重启云主机吗?",maskClosable:!1,keyboard:!1,centered:!0,okText:"确定",cancelText:"取消",onOk:(i=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(4!==Le){e.next=6;break}return r.update({cancelButtonProps:{disabled:!0}}),e.next=4,y();case 4:return r.update({cancelButtonProps:{disabled:!1}}),e.abrupt("return");case 6:y();case 7:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})});if("reset-git-code"===e&&(I||T.Z.confirm({title:"重置代码仓库",icon:(0,B.jsx)(pn.Z,{}),content:"您的所有代码将被还原至初始状态,不影响通关状态与作业成绩。确认重置?",centered:!0,okText:"确定",cancelText:"取消",onOk:v})),"reset-code"===e&&(I||T.Z.confirm({title:"恢复初始代码",icon:(0,B.jsx)(pn.Z,{}),content:"你在本文件中修改的内容将丢失,是否确定重新加载初始代码?",centered:!0,okText:"确定",cancelText:"取消",onOk:D})),"full-screen"===e&&((0,k.vp)()?(0,k.BU)():(0,k.Dj)(null===(s=document)||void 0===s||null===(a=s.getElementById)||void 0===a?void 0:a.call(s,"task-right-panel"))),"show-clipboard-box"===e){if(Xe)return void T.Z.info({title:"提示",icon:(0,B.jsx)(pn.Z,{}),content:"当前实验环境的【复制粘贴】功能暂时无法使用,敬请期待~",centered:!0});Pe.Z.publish("show-clipboard-box-".concat(Ue))}},onHideToolBar:an,shixun:g,monitoring_url:d,unity_3d_routes:R,index_tab:Ue,shixun_environment_id:Ze,tab_type:Le,windows_vnc:ze,vnc_url:Ke,linux_vnc:Ve,reboot_cloud:We,cloud_type:Xe,resData:_e,instance_startup_type:$e,mirror_name:G,mirror_description_multi:N},hn=(0,x.useCallback)((function(){return me?(0,B.jsx)(bn,{defaultTime:me,onAddVncTime:w,onResetAllVnc:Y,toShixun:rn,myshixun:b,title:"实验环境倒计时"}):(0,B.jsx)(B.Fragment,{})}),[me]);return(0,B.jsxs)("div",{className:"task-header-container",children:["exercises"===z.get("type")&&(0,B.jsxs)(Se.Z,{children:[(0,B.jsxs)("div",{className:"exercise_user_info",children:["姓名",(0,B.jsx)("span",{className:"ml10",children:null==le||null===(n=le.exercise)||void 0===n?void 0:n.user_name})]}),(0,B.jsxs)("div",{className:"exercise_user_info ml30",children:["学号",(0,B.jsx)("span",{className:"ml10",children:null==le||null===(t=le.exercise)||void 0===t?void 0:t.student_id})]})]}),"exercises"!==z.get("type")&&(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)("a",{className:"task-user-info",href:$,target:"_blank",children:[ee?(0,B.jsx)("img",{width:"35",height:"35",src:"".concat(Je.Z.IMG_SERVER,"/images/").concat(ee)}):null,(0,B.jsx)("span",{children:o.name})]}),(0,B.jsxs)("div",{className:"grade-info",children:[(0,B.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAHGUlEQVRYR7WZW2xcVxWGv3XOjMfj8f2a2ImTNklpCoKASB9aQELNDCBuohJQKA+IkgohUYGEuLy0RUJQUUERSCAaXngAoT5QtaUqiluJB5KWFmgatcq1Nk0c2zO5NLFrezxzZi+0z4xn5sw54xlHYUkjWXuvvdd/1n1tC9dJxWzmDox+WFx5v1F9l8AEMAi4giyBZlXkLHBMSuYf7pY7nxP5kdmsONnMgbW5zK2Oy30ieo8q2zZzFlgW5E/GlA51bH3hlXbPtgVQL2S2l+L6oCpfb/fijfgsUE/04c7RqTOt7msJsJBNf0PgF0Cy1WWb2hdKavQ7HVue//XGH7PBbmEh87iIHmwpuFSCov154DgQdyHmlv9uQSL8PjY61VRGpAZVEe9i+imUTze9/51VuPoO5N6GghfNluqEkX7o74bOjuZQhWdiI1OfFUEbmSIBFnPpp5uCu3QN7M+C2wxZoMN90JeKPiU8Ex+d+kxLgE3NurgMb+VgeXUzsMK8gz1wy/bIO6LMHdBgJSB+GzptwZ04BxqyQI3VdZFEh//zfW/d/4wBY1Drn56HFoqQiMP7dkWCVNUH6gOnCtCmEi9mToEEozVfgGM23zaxTCIBnYkyMLFBIaCl5lo2iubzaH4NPnhLmE+wIbd3PQVVAXq59KFQnisZeO1sZBCIBZVMQjxWFSJbbUwJOvskuG5LV1AUvXksxGfzZGzs8L12wwdYrhB6IsR5ehauLIYvSHUhqa7gupPAee9j/lrpyEEkFW8J0DKoK+iOkRCvGnO7rTg+w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rH43FkaD/OzXdXI90HGGENtRPCTQ1Ngm1k6xvWihb/qOiXQyBfOeV3z7bFr5Kbwtn7IJo9Sun0E1BcKm9ZYJa3I+4PR5o3OFsP4Ex+DO/F7yFxL9iJ2wZh5wi4wQE/1PLbu/O59B4XTqB1Zc9urOSRk7O+eaqUnACnE73wHx+I3/Mlk5ERqmsFkGEwCoV5pLfmLmZioDzh1VOzocnyFBYOfEtEfhXSYtFDZnJIQ3LVa4uVia5OuxEhYJf8KS6fR/qtrylmcjgyYJqOnev3Rk53lU1n2jY+FbLDYRuTWyNef0jaPuwn7UZqObivH9jo6UPmriCrxXD5a6K52rKiqQQ61qSfbPfpwzdHq8cjY5BLS8jymrXWhqRWUz2dqJ3aGoKhenCzj0ftmLt6uX0OKXjImlcZExRs0MRd1AZAM1CVC67r+a1eJX7gOPJYKLpbmrQFw414wFwXYVNQTOXhyDx5HUBv6BNwQJvzd+13HPdgBWiTh76miP9/j+ihVKEPOaWFI59Q1/kQsE9Ud4OMrXfmN/LfEP8D/KDA5doYpwkAAAAASUVORK5CYII=",alt:"gold",width:20}),te]})]}),(0,B.jsxs)("h2",{className:"shixun-info",children:[K,"exercises"!==z.get("type")&&(0,B.jsx)(dn,{lastedGetTaskInfoTime:p,status:_,defaultTime:X,onUpdateCostTime:E,retentionTime:"taskBuildTimes",title:"实验总用时"})]}),(0,B.jsxs)("div",{className:"flex-container",children:[(0,B.jsxs)("div",{ref:Oe,onClick:function(){return ye(!1)},children:["exercises"!==z.get("type")&&(0,B.jsx)(B.Fragment,{children:c&&(0,B.jsx)(mn,{className:"btn-notice",onShowNotice:Q})}),(0,B.jsx)(cn.Z,{open:De,onClose:function(){return ye(!1)},rootClassName:"tasks-header-notice",steps:[{title:"更新通知",description:(0,B.jsx)(B.Fragment,{children:(0,B.jsx)("div",{children:"老师已修改代码文件,请更新后继续作答~"})}),target:function(){return Oe.current},nextButtonProps:{children:(0,B.jsx)(je.ZP,{onClick:Q,type:"primary",size:"small",children:"更新代码"})}}]})]}),hn(),ze&&!(0,xn.isEmpty)(_e)&&(0,B.jsx)("span",{onClick:function(e){e.preventDefault(),Pe.Z.publish("send-ctrl-alt-delete-".concat(Ue))},className:"c-grey-c mr20 current",children:"发送CTRL+ALT+DELETE"}),R&&(0,B.jsx)("a",{title:"工具栏",onClick:function(){re(!ae)},children:(0,B.jsx)("i",{className:"iconfont icon-vncshixunjiemian-gongjulan mr5"})}),(0,B.jsx)(jn,{visible:He,onClose:tn,shixun:g,children:(0,B.jsxs)("a",{className:"btn-vnc",title:"数据集",onClick:tn,children:[(0,B.jsx)("span",{className:"iconfont font14 mr5 ml20 icon-shujuji2 current"}),"数据集"]})})]}),"exercises"!==z.get("type")&&(0,B.jsx)("a",{className:"btn-out",onClick:function(){T.Z.confirm({title:"退出实训",icon:(0,B.jsx)(pn.Z,{}),content:(0,B.jsxs)("div",{children:[(0,B.jsx)("div",{style:{margin:"10px auto"},children:"您确定要退出实训吗?"}),(0,B.jsx)(qe.Z,{style:{fontSize:"14px"},onChange:function(e){Fe(e.target.checked)},children:"退出实训时,立即释放实验资源"})]}),centered:!0,okText:"确定",cancelText:"取消",onOk:function(){Te.current?(0,pe.eA)(null==b?void 0:b.identifier).then((function(e){0==(null==e?void 0:e.status)&&(O.ZP.success("释放资源成功"),setTimeout((function(){rn()}),1e3))})):rn()},onCancel:function(){Fe(!1)}})},title:"退出实训",children:(0,B.jsx)("i",{className:"iconfont icon-kaiguan"})}),(null==le||null===(i=le.exercise)||void 0===i?void 0:i.left_time)>0&&(0,B.jsxs)(Se.Z,{align:"middle",children:[(0,B.jsx)("span",{style:{color:Ae,marginRight:6},className:"iconfont icon-daojishi"}),(0,B.jsx)("span",{style:{color:Ae,fontSize:14,marginRight:10},children:"剩余答题时长"}),(0,B.jsx)("span",{className:"mr20",children:(0,B.jsx)(Rn,{valueStyle:{color:Ae,fontSize:20,fontWeight:500},value:Ee,onFinish:h()(u()().mark((function e(){var n,t;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,pe.VL)({categoryId:z.get("exercisesId"),commit_method:2});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(0===H&&S(1),T.Z.info({width:530,title:"提示",centered:!0,okText:"确定",content:(0,B.jsxs)("div",{className:"tc font16",children:["答题结束了,系统已自动提交试卷",(0,B.jsx)("br",{}),"不能再修改答题"]}),onOk:function(){var e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:window.parent.location.href="/classrooms/".concat(z.get("coursesId"),"/exercise/").concat(z.get("exercisesId"),"/detail");case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})),-3===(null==n?void 0:n.status)&&(t=parseInt(null==n?void 0:n.message),Qe(Date.now()+1e3*t));case 5:case"end":return e.stop()}}),e)})))})})]}),"exercises"===z.get("type")&&(0,B.jsxs)(je.ZP,{type:"primary",onClick:function(){0===H&&S(),T.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:(0,B.jsx)("div",{className:"tc",children:"请确认你的答题内容已经提交?"}),onOk:function(){nn(),en.current=!0,sn()}})},children:[(0,B.jsx)("span",{className:"iconfont icon-yiguanbi mr5 font14"})," 返回试卷"]}),(0,B.jsx)(Z.Z,{children:(0,B.jsx)(U.Z,{width:280,rootClassName:"setting-drawer",title:null,placement:"right",closable:!1,destroyOnClose:!1,open:ae,onClose:an,children:(0,B.jsx)(Bn.Z,C()({},un))})})]})},Mn=300;function Jn(e){var n=e.title,t=e.time,i=e.className,s=void 0===i?"":i,a=e.callback,r=e.desc,c=void 0===r?"":r,o=e.style,l=void 0===o?{}:o;return(0,B.jsxs)("a",{onClick:function(){a&&a()},title:n,className:s,children:[(0,B.jsx)("i",{className:"iconfont icon-shijian1 mr5",style:l}),(0,B.jsxs)("span",{children:[c?"".concat(c,":"):"",un(t)]})]})}function bn(e){var n=e.onAddVncTime,t=e.onResetAllVnc,i=e.toShixun,s=e.title,a=void 0===s?"":s,r=e.myshixun,c=e.defaultTime,o=(0,x.useState)(c),l=f()(o,2),d=l[0],A=l[1],g=(0,x.useState)(!1),I=f()(g,2),E=I[0],p=I[1],Q=(0,x.useState)(!1),C=f()(Q,2),m=C[0],k=C[1],v=(0,x.useRef)(!0);(0,x.useEffect)((function(){return window.addEventListener("visibilitychange",D),function(){window.removeEventListener("visibilitychange",D)}}),[]);var D=function(){var e=h()(u()().mark((function e(n){var t,i,s,a,c;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("visible"!==document.visibilityState){e.next=5;break}return e.next=3,(0,S.fY)(null==r?void 0:r.identifier);case 3:0===(null==(t=e.sent)?void 0:t.status)&&(a=(null==t||null===(i=t.data)||void 0===i?void 0:i.remainingTime)>0?null==t||null===(s=t.data)||void 0===s?void 0:s.remainingTime:0,A(c=a/1e3),c>Mn&&k(!1));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();function j(){return(j=h()(u()().mark((function e(){var s,a;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(p(!0),!(d>0)){e.next=8;break}return e.next=4,n();case 4:a=e.sent,A((null==a||null===(s=a.data)||void 0===s?void 0:s.remaining_time)/1e3),e.next=12;break;case 8:return e.next=10,t();case 10:e.sent,i();case 12:p(!1),k(!1);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,on.Z)((function(){A(d-1)}),d>0?1e3:null),(0,x.useEffect)((function(){300!==d&&180!==d&&60!==d&&0!==d||k(!0)}),[d]),(0,x.useEffect)((function(){v.current&&(c=0?e.splice(t,1):e.push(c),r(e.join(""))}},children:[1===n?(0,B.jsx)(Un.ZP,{checked:i&&i.indexOf(c)>=0,className:"choice"}):(0,B.jsx)(qe.Z,{className:"choice",checked:i&&i.indexOf(c)>=0}),(0,B.jsxs)("div",{className:"flex-wrp",children:[(0,B.jsxs)("span",{className:"checkTitle",style:{lineHeight:1.7,fontSize:16,whiteSpace:"nowrap"},children:[c,"、"]}),(0,B.jsx)(F.Z,{className:"subject-body",value:a})]})]})},zn=t(73782),Kn=function(e){var n=e.callback,t=e.multi_count,i=e.answer,s=(0,x.useState)([]),a=f()(s,2),r=a[0],c=a[1];return(0,x.useEffect)((function(){if(t){if(null!=i&&i.length)return void c(i);var e=Array.from({length:t}).fill("");c(e)}}),[t,i]),console.log(r,i,"multi_count"),(0,B.jsx)("div",{className:"option",children:null==r?void 0:r.map((function(e,t){return(0,B.jsxs)(Se.Z,{align:"middle",className:"mb10 text",children:[(0,B.jsxs)("span",{className:"mb5",children:["填空",t+1,"答案:"]}),(0,B.jsx)(zn.Z.TextArea,{value:e,onChange:function(e){r[t]=e.target.value,n(r)}},t)]})}))})},Vn=function(e){var n=e.id,t=e.answer,i=e.challenge_question,s=e.category,a=e.subject,r=e.onSetAnswers,c=e.question_name,o=e.multi_count;function l(e){r(n,e)}return(0,B.jsxs)("li",{children:[(0,B.jsxs)(Se.Z,{className:"subject c-grey-999",align:"stretch",children:[(0,B.jsx)(Re.Z,{flex:"40px",children:(0,B.jsxs)("p",{className:"mt3 order",children:[n+1,"、"]})}),(0,B.jsx)(Re.Z,{flex:"1",children:(0,B.jsx)(F.Z,{value:"".concat(a),className:"subject-body"})})]}),"单选题/多选题"===c&&(0,B.jsx)("div",{className:"option",children:null==i?void 0:i.map((function(e,n){var i=e.option_name;return(0,B.jsx)(Ln,{index:n,option_name:i,answer:t,category:s,callback:l},i)}))}),"判断题"===c&&(0,B.jsx)("div",{className:"option",children:(0,B.jsxs)(Un.ZP.Group,{className:"mb10",style:{marginLeft:38},value:t||void 0,onChange:function(e){return l(e.target.value)},children:[(0,B.jsx)(Un.ZP,{value:"true",className:"mr40",children:"正确"}),(0,B.jsx)(Un.ZP,{value:"false",children:"错误"})]})}),"填空题"===c&&(0,B.jsx)(Kn,{multi_count:o,callback:l,answer:t})]})},Wn=function(e){var n=e.chooses,t=e.answers,i=e.onSetAnswers,s=e.bgColor,a=void 0===s?"#1E1E1E":s;return(0,B.jsx)("ul",{className:"".concat("#1E1E1E"===a?"":"vs"," choose-container"),style:{backgroundColor:a},children:n.map((function(e,n){var s=e.subject,a=e.challenge_question,r=e.category,c=e.question_name,o=e.multi_count;return(0,B.jsx)(Vn,{id:n,subject:s,challenge_question:a,category:r,answer:t[n],onSetAnswers:i,question_name:c,multi_count:o},n)}))})},qn=t(89913),Xn=t(15397),_n=t(21161),$n=function(e){var n=e.id,t=e.isActive,i=e.title,s=e.onActive,a=e.had_submmit,r=e.result,c=e.actual_output,o=e.standard_answer,l=e.question_name;var u="test-case-item";return t&&(u+=" active"),a&&(u+=" has-result"),(0,B.jsxs)("li",{className:u,children:[(0,B.jsxs)("a",{className:"case-header",onClick:function(){s(n)},children:[(0,B.jsxs)("h2",{children:[(0,B.jsx)("div",{className:t?"arrow-down":"arrow-right"}),(0,B.jsx)("span",{className:"test-title",children:i})]}),a>0?(0,B.jsx)("img",{width:16,src:r?Xn.Z:_n.Z}):(0,B.jsx)("i",{className:"iconfont icon-suo1"})]}),(0,B.jsx)("div",{className:"item-desc ".concat(t?"show":"hide"," choose-game-item"),children:a?r?"填空题"===l?(0,B.jsxs)(x.Fragment,{children:[(0,B.jsxs)("p",{children:[(0,B.jsx)("div",{children:"正确答案:"}),(0,B.jsx)("b",{children:null==o?void 0:o.map((function(e,n){var t;return(0,B.jsxs)("p",{children:["填空",n+1,":",null==e||null===(t=e.text)||void 0===t?void 0:t.join("、")]})}))})]}),(0,B.jsxs)("p",{children:[(0,B.jsx)("div",{children:"你的答案:"}),(0,B.jsx)("b",{className:"c-red",children:null==c?void 0:c.map((function(e,n){return(0,B.jsxs)("p",{children:["填空",n+1,":",e]})}))})]})]}):(0,B.jsxs)(x.Fragment,{children:[(0,B.jsxs)("p",{children:["正确选项:",(0,B.jsx)("b",{children:o})]}),(0,B.jsxs)("p",{children:["你的选项:",(0,B.jsx)("b",{className:"c-red",children:c})]})]}):(0,B.jsx)("p",{children:"错误,不支持查看"}):(0,B.jsx)("p",{children:"尚未提交,暂不支持查看"})})]})},et=function(e){var n=e.onResizeSetContainer,t=e.moveY,i=e.had_submmit,s=e.test_sets,a=void 0===s?[]:s,r=e.challenge_chooses_count,c=e.choose_correct_num,o=(0,x.useState)(-1),l=f()(o,2),u=l[0],d=l[1];function h(e){d(e===u?-1:e)}var A=c===r;return(0,B.jsxs)(x.Fragment,{children:[(0,B.jsxs)("div",{className:"test-header",children:[(0,B.jsx)("span",{className:"active",children:"测试结果"}),(0,B.jsx)("a",{onClick:function(){n(t)},children:(0,B.jsx)("i",{className:"iconfont ".concat(.01===t?"icon-shousuo":"icon-zhankai"," icon-zhankai")})})]}),i?(0,B.jsxs)("p",{className:"test-result ".concat(A?"success":"failer"),children:[(0,B.jsxs)("span",{className:"count",children:[(0,B.jsx)("img",{width:16,src:A?Xn.Z:qn.Z}),c," / ",r," 共有",r,"题,"]}),(0,B.jsx)("span",{children:A?"全部通过":"其中".concat(r-c,"题目结果不匹配。详情如下:")})]}):null,(0,B.jsx)("ul",{className:"test-case-list",children:a.map((function(e,n){return(0,B.jsx)($n,C()(C()({had_submmit:i,title:"题目".concat(n+1)},e),{},{isActive:u===n,id:n,onActive:h}),"item"+n)}))})]})},nt="action-container___Xcx9G",tt="eval-btn-group___b8ds5",it="eval-desc___bIcYm",st="btn-run___fh7pl",at="btn-run-self___Bwz1A",rt="ghost-link___Y8dGm",ct="link___PPhWD",ot=function(e){var n,t=e.st,i=e.prev_game,s=e.next_game,a=e.time_limit,r=e.record_consume_time,c=e.loading,o=e.shixun,l=e.game,d=e.onRun,A=e.dispatch,g=e.chooses,I=e.unity_3d_routes,E=e.user,p=e.is_last_game,Q=e.onUpdateCode,C=e.test_sets,k=e.challenge,v=e.game_report_id,D=e.tabActiveParams,j=void 0===D?{}:D,y=e.startDebug,w=(0,m.useParams)(),R=!p&&!c&&(o.status>0||(null==E?void 0:E.identity)<5),H=["自测运行","正在启动","停止运行","正在停止"],P=(0,x.useState)(0),M=f()(P,2),J=M[0],b=M[1],G=(0,x.useState)(0),N=f()(G,2),Y=N[0],F=N[1],O=(0,x.useState)(!1),U=f()(O,2),Z=U[0],L=U[1],z=(0,x.useState)(null==C||null===(n=C[0])||void 0===n?void 0:n.input),K=f()(z,2),V=K[0],W=K[1],q=(0,x.useState)(!1),X=f()(q,2),_=X[0],$=X[1],ee=(0,x.useState)(H[0]),ne=f()(ee,2),te=ne[0],ie=ne[1],se=(0,x.useRef)(!1),ae=(0,m.useLocation)(),re=j.shixun_environment_id,ce=j.tab_type;(0,x.useEffect)((function(){J>0&&setTimeout((function(){b(J-1)}),1e3)}),[J]),(0,x.useEffect)((function(){Y>0&&setTimeout((function(){F(Y-1)}),1e3)}),[Y]),(0,x.useEffect)((function(){var e=Pe.Z.subscribe("eval-code-finish",(function(){I&&L(!0),1===t||b(10)})),n=Pe.Z.subscribe("caseInputValue",(function(e){W(e)})),i=Pe.Z.subscribe("runCodeFinish",(function(){se.current=!1,$(!1),ie(H[0]),Y>0||F(5)}));return function(){e(),n(),i()}}),[]);var oe=function(){var e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return se.current=!0,e.next=3,Q();case 3:ie(H[1]),Pe.Z.publish("show-case-result",!0),setTimeout(h()(u()().mark((function e(){var n,t,i,s;return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.h$)(w.taskId,{test_case_content:V,shixun_environment_id:re,tab_type:ce});case 2:if(null==(t=e.sent)||null===(n=t.data)||void 0===n||null===(n=n.data_list)||void 0===n||!n.length){e.next=6;break}return Pe.Z.publish("pod-restrict-data",{identifier:null==t||null===(i=t.data)||void 0===i?void 0:i.identifier,data_list:null==t||null===(s=t.data)||void 0===s?void 0:s.data_list}),e.abrupt("return");case 6:Pe.Z.publish("showRunCodeTab",!0),Pe.Z.publish("runCode",{type:"start"});case 8:case"end":return e.stop()}}),e)}))),100),setTimeout((function(){se.current&&(ie(H[2]),$(!1))}),1e3);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:$(!0),te===H[2]?(se.current=!1,ie(H[3]),Pe.Z.publish("runCode",{type:"stop"}),(0,S.Yv)(w.taskId,{shixun_environment_id:re,tab_type:ce}),setTimeout((function(){ie(H[0]),$(!1),F(5)}),2500)):oe();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,B.jsxs)("div",{className:nt,children:[(0,B.jsxs)("div",{className:"flex-container ".concat(it),children:[a&&null!=k&&k.with_code_file?(0,B.jsx)("span",{children:"本关最大执行时间:".concat(a,"秒")}):null,r&&null!=k&&k.with_code_file?(0,B.jsxs)("span",{children:["本次评测耗时(编译、运行总时间):",r," 秒"]}):null,v?(0,B.jsx)("a",{target:"_blank",className:ct,href:"/report/".concat(w.taskId,"/").concat(v),children:"代码性能检测"}):null,[2,3,4,5].includes(ce)&&(0,B.jsx)("a",{title:"显示/隐藏测试结果",onClick:function(){Pe.Z.publish("show-case-result")},children:"显示/隐藏测试结果"})]}),(0,B.jsxs)("div",{className:"flex-container ".concat(tt),children:[i&&!c?(0,B.jsx)("a",{href:"/tasks/".concat(i).concat(ae.search),onClick:function(e){e.preventDefault(),w.courseId&&w.homeworkId?setTimeout((function(){return window.location.href="/tasks/".concat(w.courseId,"/").concat(w.homeworkId,"/").concat(i).concat(ae.search)}),300):setTimeout((function(){return window.location.href="/tasks/".concat(i).concat(ae.search)}),300)},className:rt,children:"上一关"}):null,R?(0,B.jsx)("a",{href:"/tasks/".concat(s).concat(ae.search),onClick:function(e){if(e.preventDefault(),o.task_pass||2===l.status||(null==E?void 0:E.identity)<5)return w.courseId&&w.homeworkId?void setTimeout((function(){return window.location.href="/tasks/".concat(w.courseId,"/").concat(w.homeworkId,"/").concat(s).concat(ae.search)}),300):void setTimeout((function(){return window.location.href="/tasks/".concat(s).concat(ae.search)}),300);T.Z.warning({centered:!0,width:530,title:"提示",okText:"我知道了",content:(0,B.jsx)("p",{children:"该实践项目设置了不允许跳关。通过当前关卡后,才能进入下一关。"})})},className:rt,children:"下一关"}):null,Z&&1===(null==k?void 0:k.show_type)&&(0,B.jsx)("button",{onClick:function(){A({type:"SHOW_PICTURE_VIEW"})},style:{minWidth:"72px",marginRight:10},className:"btn-run",title:"查看效果",children:"查看效果"}),1===ce&&!y&&(null==o?void 0:o.open_self_run)&&(0,B.jsx)(je.ZP,{onClick:(0,xn.throttle)(le,2e3),loading:_,danger:!0,disabled:Y>0,className:"".concat(at," mr10"),children:Y>0?"".concat(Y,"S"):te}),(null==k?void 0:k.with_code_file)&&!(1===ce&&y)&&(0,B.jsx)("button",{onClick:h()(u()().mark((function e(){return u()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==t){e.next=4;break}if(!((null==g?void 0:g.length)<=0)){e.next=4;break}return T.Z.confirm({centered:!0,title:"提示",content:(0,B.jsx)("div",{className:"tc",children:(0,B.jsx)("p",{children:"您还未添加题目,请添加后评测!"})}),okText:"确认",cancelText:"取消"}),e.abrupt("return");case 4:return L(!1),e.next=7,d();case 7:case"end":return e.stop()}}),e)}))),style:{minWidth:"72px"},disabled:c||J>0,className:st,title:"运行评测",children:J>0?"".concat(J,"S"):(0,B.jsxs)(x.Fragment,{children:[" ",(0,B.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAkCAYAAADhAJiYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYge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+AVUwZjmqim0r7Gtslb6dBBXBLh2cg+cg5yAkSo4+zulzlzGsBOmGLTEqcx5CosyJ0Wp1ExXtUAA77PARTCYoxjBJ3yFjFfoJesGGnzlBVUoUGSNkzK6CSmLO3ElRjHx9Zk6VooICcMiHjQGIMTTEkpCVgsp80AZDls5WPL88xVhtxi5LQZu8uezgLOQqPOUpqip8/RM0wyVer6qjjoK0/QAPPASNMrbWMBtgO3sCMuAdOFXuNg02wLKKZ6eMrTUsaUHzfLCu4lserIEVkIvR38Se14Ju8WJf+VuNozXl2O+Avzf1O/zJuTDu+O77meu8Gme/X4FIrjoqOXOdVyb2WKDStYxrh4Bpp7bLCQo5Bo840W3MxP6tBX3nxbWExGyDu/y1NRP7SAs65MXtBMSscWSOHfuZ2J8CVgfaHnsI+cNPvsb/rmZib+lPbpbLdsdj63jouXV0zNaRxOY67bm5VqKbq0/6kU8r/ciK2qs+wASt3itBkynsWcKVRr8U9owxF3sl+a9Ekl8cUJL/0rYMOkixDNq3LYMGUSi2XQpFg67J9kRZ1EiglK6LsmevV93Xz8lIl8OGiuPiWWCftu9hg2RRvEJzHPOa1cI9DvsQKfJelW3kcUxLfk0+guSB1bbjgVXIPs9sD6wyMY/0nvJI7zq4IvIZnfkdgRY37feuR3p/BRgAhrFnXQBvMBoAAAAASUVORK5CYII=",alt:"run",width:18})," ",(0,B.jsx)("b",{children:"评测"})," "]})})]})]})},lt=t(57572),ut="iconWrapper___U51IV",dt="minusIcon___xP_3j",ht="arrowIcon___jKd9h",At=function(e){var n=e.desc,t=e.visible,i=(0,x.useRef)(),s=(0,x.useRef)(),a=(0,x.useState)(!1),r=f()(a,2),c=r[0],o=r[1],l=(0,x.useState)(!1),u=f()(l,2),d=u[0],h=u[1];(0,x.useEffect)((function(){if(i.current){var e=function(e){h(!1),(0,R.kk)("none");var n=i.current.getBoundingClientRect();a=n.left,r=n.top,c=e.pageX,o=e.pageY,l=!0,u=!0,document.onselectstart=function(){return!1}},n=function(e){var n,t;(e.stopPropagation(),l=!1,(0,R.kk)("auto"),document.onselectstart=null,u)&&(u=!1,(null===(n=e.target)||void 0===n?void 0:n.id)!==(null===(t=s.current)||void 0===t?void 0:t.id)&&h(!0))},t=function(e){if(l){u=!1,h(!1);var n=e.pageX-c,t=e.pageY-o;i.current.style.left="".concat(a+n,"px"),i.current.style.top="".concat(r+t,"px")}},a=0,r=0,c=0,o=0,l=!1,u=!1;return i.current.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){var s;null===(s=i.current)||void 0===s||s.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[i.current]);return(0,B.jsxs)("div",{style:{display:t?"block":"none"},children:[(0,B.jsx)(U.Z,{title:"任务描述",placement:"right",onClose:function(){h(!1)},open:d,children:n}),(0,B.jsx)("div",{className:ht,onClick:function(){return o(!1)},style:{position:"fixed",display:c?"block":"none",zIndex:1e3,bottom:223},children:(0,B.jsx)("img",{draggable:!1,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAAAXNSR0IArs4c6QAAAZdJREFUWEfF2D1Lw1AUxvH/8xHcBHFSaUfrojiKi19FHFwUFQQriLoIxcVVv4O4CCJOOriK7oKTCiLaQY9cCaW2yc1LzU2WDLnn5EdC8pxEDLCZ2SRwDIwCTUmttHZmVgNOALc/kLTtapRWmHTczKaAc2AoWvMNjEh68tTUgQtguGtNXdJ9IUgMwvX1QswsDuHqikESEK7hlqRm3NXwIFqSlnPfGg9iT9J6TsQRsCjJckHKRGSGlI3IBAmBSIWEQnghIRGJkNCIWEgViD5IVYg/kCoRHUjViG7IJvAbx11bG5iVdJvw6l4CDnuOueCbk3SZN9U76Wtmu8BaT4MXYN6DWQX2e2regQVJV3kwf8aAKjF980hVmNjBqApM4oQWGuMdFUNiUmfWUJhUiHsEQ2AyQUJgMkPKxuSClInJDfFgHoFxSZ8J2RQXB8/AmKTXQhAPpibpISljzCwOMyPpujAkwuwAG9GJb6K0/vKFnZmtREHpzn0HNCS1B4JEmOnob8CppI8siWtmDWACOJP0lvo5kaXpf635AX6GXzDZRnW0AAAAAElFTkSuQmCC",alt:""})}),(0,B.jsxs)("div",{ref:i,draggable:!1,className:ut,style:{position:"fixed",display:c?"none":"block",zIndex:1e3,bottom:223,right:26,borderRadius:"50%",cursor:"pointer"},children:[(0,B.jsx)("i",{ref:s,id:"minusIconElement",onClick:function(){h(!1),o(!0)},className:"iconfont icon-yichu1 ".concat(dt)}),(0,B.jsx)("img",{draggable:!1,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABKCAYAAAAL8lK4AAAAAXNSR0IArs4c6QAAFrlJREFUeF7tW3uMXNV5/86989jZXXsf7K53Z722F68fGBwbLOOYR6jBqXhUbZQW5KQNKbQRtFJRhZqmpCmPtqEqqH/0r6SoQUpQlUBSoapNQtuoDaQhJSRAUx5JSigB29gGL/a+ZmfmnvNV3znnO+e7d2bZjVS1ldJJzMzeuY9zft/r9z1GwU/5S/2U7x/+H4C1awAqRIB77rnn/yxod911Fyq7OoVr3deKm/nR67itDe07DcIRQEiNQSAAjP2HQE+gv+k/xsRj9jwAe8x+zdfxcbqebuL+7+7lj7n7uy/sKYXj4fn+XuH8LrslIDaOVhFKtcaZJVC9ZfxetaQfSPb0PHRIqYwv6QrAy8dbt2mt7jOIVV4gP8wBoQDtwnnxtGb6n7Kbo2uKADhQ6DgCKgKGNhhBdZ+Vv5bukQfAYe3uHYDQDmx6WWH414bhCmyZ6IXnjyeQaQZTQX9Vw1DNPFsrVw9fcr6atbpSBO9HJ7JPG4235DZuN+UX5BdgF+OlaxdEAARNcEBYKXspGr/ICIC4nsGh8610HRBWGRBA++fQWoOGIYImAPzG+X3P1l5Ie3rgpaMEdBLW5NavYLCWwUDVfOvKvT2XKqVIFvH14xPtezOEO3Ibk4gH9fYPFuZgTSOYifhemESUnpdc7pq8ObBUpUnlrmdwvBYQAPt39oNJyvDiUUJFg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OR3l2UviS7ZM0ojuXEZCo/oc5Sd9yjUJrXLTh59D9PfuUbL29YDYDDBzZ97v7fuvDD3X8vULj6OP24chk2goZJncGkATNpDNQNqkmNMGkQ6og44pIW1xfMb0A612J7O2oAe/V87hGlHn+gJfsQLgHjn9+cfet469F/eK5C0+0rvUrUMPjZHTN3/PL2V9YEwGpo0vf/gVhdeBUm2hrqbYQ6INSNMXVtCCBVRwIM6Fhswcs6YC7DEyXykB4L/xB+/+drCzz0RwC2msvwzLPf0y+8/Kb7+XiX1wUzI8ceuvvSjfTVfxsAawGJzvn7E9inZqGOGUyYDOqZBcXUjYEJbbAOkBBIExpxXRiALLC/YvMlTD36RSycPWP+7mtPJws00FB49dXK5prLzj38+x/e+c//KwCsFahHXsD+9jxMqBaBpCeaLdxmdLYrM0jNznGAdFglCTntEkmef6zGn+dm39aPff276dxiMzyyVi3joYunPvHJW3bfywf/xzVgrQCs9bxHnsTaqbdhanl54V2AsMtAtk2B2qSSdLzdbtZf/fHr6tTsWT0+1Pv9qc3rPvTxI+f9UN77vwCByDyXl6nyEwAAAABJRU5ErkJggg=="})]})]})},gt=(t(43206),t(7345)),It=function(e){var n=e.isTheoretical,t=e.onFontSizeChange,i=e.cmFontSize,s=e.cmCodeMode,a=e.onCodeModeChange,r=e.tabToSpace,c=e.onTabToSpace,o=e.shixun,l=e.autoFormat,u=e.onAutoFormat,d=e.formatDocument,h=null!=o?o:{},A=h.task_pass,g=void 0!==A&&A,I=h.forbid_copy,f=void 0!==I&&I,E=h.test_set_permission,p=void 0!==E&&E,Q={isTheoretical:n,onFontSizeChange:t,cmFontSize:i,cmCodeMode:s,onCodeModeChange:a,tabToSpace:r,onTabToSpace:c,autoFormat:l,onAutoFormat:u,formatDocument:d};return(0,B.jsxs)(gt.Z,C()(C()({},Q),{},{children:[(0,B.jsx)("h3",{children:"关卡配置信息"}),(0,B.jsxs)("section",{children:[(0,B.jsxs)("a",{className:"file-item",title:g?"允许学员跳关挑战":"不允许学员跳关挑战",children:[(0,B.jsx)("b",{children:"跳关"}),(0,B.jsx)("span",{children:g?"允许":"不允许"})]}),(0,B.jsxs)("a",{className:"file-item",title:p?"允许学员通过金币解锁查看测试集内容":"不允许学员通过金币解锁查看测试集内容",children:[(0,B.jsx)("b",{children:"测试集解锁"}),(0,B.jsx)("span",{children:p?"允许":"不允许"})]}),(0,B.jsxs)("a",{className:"file-item",title:f?"不允许学员粘贴代码":"允许学员粘贴代码",children:[(0,B.jsx)("b",{children:"代码粘贴"}),(0,B.jsx)("span",{children:f?"不允许":"允许"})]})]})]}))},ft=t(1212),Et=t(56719);function pt(e,n){switch(n.type){case Y.wj:return C()(C()({},e),{},{loading:!0});case Y.V1:return C()(C()({},e),{},{loading:!1});case Y.OJ:return C()(C()({},e),n.payload);case Y.$Y:return C()(C()({},e),{},{theme:n.payload});default:throw new Error}}var Qt=function(e){var n=e.taskData,t=e.moveY,i=e.onResizeYStart,s=e.onResizeSetContainer,a=e.onEval,r=e.lastedGetTaskInfoTime,c=e.onUpdateCode,o=e._dispatch,l=((0,m.useLocation)(),(0,m.useSearchParams)()),d=f()(l,1)[0],A=(0,m.useParams)(),g=n.chooses,I=n.choose_test_cases,E=n.game,p=I.test_sets,Q=I.challenge_chooses_count,v=I.choose_correct_num,D=I.had_submmit,j=(0,x.useCallback)((function(){var e=[];return e.length=Q,D&&(e=p.map((function(e){return"判断题"===e.question_name?"正确"===e.actual_output?"true":"错误"===e.actual_output?"false":void 0:e.actual_output}))),e}),[r]),y=(0,x.useReducer)(pt,{loading:!1,answers:j(),theme:(0,ft.G)("cmCodeMode","vs-dark")}),w=f()(y,2),R=w[0],H=w[1];(0,x.useEffect)((function(){H({type:Y.OJ,payload:{answers:j()}})}),[r]);var P=R.answers,M=R.loading;function J(){for(var e=!0,n=0;n0&&void 0!==r[0]?r[0]:[],!b.current.startDebug){e.next=8;break}return e.next=4,(0,ne.ZP)("/api/myshixuns/".concat(null===(t=p.myshixun)||void 0===t?void 0:t.identifier,"/code_debugs/set_break_point.json"),{method:"post",body:{file_name:b.current.currentPath,line_number:null===(i=(0,xn.xor)(b.current.breakPointValue,n))||void 0===i?void 0:i[0],type:n.length>b.current.breakPointValue.length?1:0,unique:b.current.unique}});case 4:0===(null==(s=e.sent)?void 0:s.status)&&(P(C()(C()({},b.current.allBreakPointValue),{},g()({},b.current.currentPath,(null==s||null===(a=s.data)||void 0===a||null===(a=a.breakpoints)||void 0===a?void 0:a[b.current.currentPath])||[]))),Pe.Z.publish("active-debug-data",(null==s?void 0:s.data)||{})),e.next=10;break;case 8:P(C()(C()({},b.current.allBreakPointValue),{},g()({},b.current.currentPath,n))),D(n);case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,B.jsx)(x.Fragment,{children:(0,B.jsxs)("div",{className:jt,children:[1==q&&(0,B.jsxs)(B.Fragment,{children:[c||l?null:(0,B.jsx)("img",{className:yt,src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIsAAABuCAYAAAAXkODOAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2Jl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FH1zUwyS0rtnmMPqHJKVo3vztYTJTcmqOz+ML8ZTdWTuCpHctfaWB/RbD4wLO2JJ2hzDMKmKc8t+RcyV92QH8HsLjKMTeu86LJTZHjRpzVi0tRRdH1Ww3e/wswAKUTk3Afdk5AAAAAAElFTkSuQmCC",alt:"only-view"}),k?(0,B.jsx)(De.Z,{message:"正在加载代码",style:{color:"#0152d9"}}):(0,B.jsx)(Dt.Z,{filename:I,type:"office"===E?"download":E,data:n,style:{position:"absolute",zIndex:1},monacoEditor:{value:n,language:t,theme:i,onChange:s,onSave:a,forbidCopy:A,options:C()(C()({},r),{},{fixedOverflowWidgets:!0}),insertSpaces:r.insertSpaces,breakPointValue:v,highlightLine:j,openBreakPoint:y,onBreakPoint:ae}})]}),2===q&&(0,B.jsx)(St.Z,{spinning:Y,tip:Z,wrapperClassName:wt,children:(0,B.jsx)("iframe",{src:null==V?void 0:V.link_url})})]})})},Ht={"choose-game-item":"choose-game-item___RYHdh","output-title-container":"output-title-container___P2NjC","output-title":"output-title___ZQJkv","test-case-list":"test-case-list___CYyHP","test-header":"test-header___fSQRn",active:"active___bY0Dq","active-debug":"active-debug___oeXMX","test-result":"test-result___DQXYd","markdown-body":"markdown-body____rqU_",success:"success___iuAG3",failer:"failer___axTtk",count:"count___B_kHY","test-case-item":"test-case-item___E3CU9","case-header":"case-header___xppld",iconfont:"iconfont___LO1VN",description:"description___j4efR","item-desc":"item-desc___ivltA",show:"show___ntNdM","item-tip":"item-tip___ETPck","arrow-down":"arrow-down___oQMCK","test-title":"test-title___mf3Df","arrow-right":"arrow-right___C6f8W","case-info":"case-info___yX5kK","test-case-run-header":"test-case-run-header___iHZR5","test-case-run-wrp":"test-case-run-wrp___qVT1y","diff-panel-container":"diff-panel-container___OEdXu","line-break":"line-break___Ww59n",empty:"empty___izbJX",alert:"alert___jv5_R"},Pt=(t(7062),/(?:[\n\r\s]*?)(?:<\/link>)*/im),Mt=/(?:[\n\r\s]*?)(?:<\/script>)*/im,Jt=["http","com","net","org","cdn"];function bt(e){for(var n=!1,t=0;t]*href=['"]([^'"]+)[^>]*>/gi,(function(e,t){return n.push(t.indexOf("http")>-1?t:"https://data.educoder.net/api/sources/get_html_content.html?content_type=text/css&identifier="+l.taskId+"&path="+t),t.indexOf("http")>-1?t:''})),t.replace(/