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

1 line
172 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3951,36707,71426,64063],{13047:function(e,n,t){function r(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function i(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],r=0;r<e.length;r++){var i=e[r],s=n?"".concat(n,"/").concat(i.name):"".concat(i.name);t.push({title:i.name,isLeaf:"tree"!==i.type,key:s})}return t}function s(e,n,t){for(var r=0;r<e.length;r++){var i=e[r];if(i.key===n){i.children=t;break}i.children&&s(i.children,n,t)}return e}function a(e,n,t){var r;return function(){var i=this,s=arguments,a=function(){r=null,t||e.apply(i,s)},o=t&&!r;clearTimeout(r),r=setTimeout(a,n),o&&e.apply(i,s)}}t.d(n,{Ax:function(){return s},Ds:function(){return a},KI:function(){return o},SI:function(){return i},f1:function(){return r}});var o=t(67390).Z.API_SERVER},12940:function(e,n,t){t.d(n,{Z:function(){return w}});var r=t(82242),i=t.n(r),s=t(7557),a=t.n(s),o=t(41498),c=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},m=t(3113),f=t(70557),h=t(10446),x=t(6848),g=t(1079),_=t(26613),v=t(46172),j=t(67390),y=t(37712),w=function(e){var n,t,r,s,o,l,w,k=e.editOffice,b=void 0===k?"view":k,Z=e.data,N=(e.theme,e.type),S=e.filename,I=e.monacoEditor,M=e.className,L=e.style,C=e.close,T=e.onClose,P=e.hasMask,A=e.disabledDownload,E=e.onImgDimensions,O=e.showNodata,D=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),H=u()(D,2),R=(H[0],H[1],(0,d.useState)("")),z=u()(R,2),Y=(z[0],z[1]),V=(0,d.useState)(),F=u()(V,2),B=F[0],q=F[1],Q="build"===window.ENV?"/react/build":"",J=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,U=(0,d.useRef)();null!==(n=Z)&&void 0!==n&&n.startsWith("/api")&&"txt"!==N&&(Z=j.Z.API_SERVER+Z),S&&(I.filename=S),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&Y(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===N&&W()}),[N,Z]);var W=function(){var e=c()(a()().mark((function e(){var n,t,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Z,Z.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,_.gJ)({attachment_id:t});case 5:r=e.sent,q(r);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){K()},K=function(){(0,g.Nd)(S||"educoder",decodeURIComponent(Z))};return(0,y.jsxs)("div",{style:i()({},L||{}),className:"".concat(P&&p.bgBlack," ").concat(N?p.wrp:"hide"),children:[C&&(0,y.jsxs)("div",{className:p.close,ref:U,children:[!!E&&(0,y.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return U.current},children:(0,y.jsx)("span",{onClick:function(){T(),E()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!A&&(0,y.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return U.current},children:(0,y.jsx)("span",{onClick:K,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return U.current},children:(0,y.jsx)("span",{className:"",onClick:T,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[M]," ").concat(M," ").concat(p.monaco," ").concat("txt"===N?"show":"hide"),children:"txt"===N&&(0,y.jsx)(h.ZP,i()({},I))}),"audio"===N&&(0,y.jsx)("audio",{src:(null===(t=Z)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(r=Z)&&void 0!==r&&r.startsWith("/api")?Z:"data:image/png;base64,".concat(Z),autoPlay:!0}),"video"===N&&(0,y.jsx)(y.Fragment,{children:(null===(s=Z)||void 0===s?void 0:s.indexOf("http"))>-1||null!==(o=Z)&&void 0!==o&&o.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(Z),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(Z),autoPlay:!0})}),"office"===N&&B&&(0,y.jsx)("iframe",{src:"".concat(Q,"/office.html?key=").concat(B.key,"&url=").concat(J+B.url,"&callbackUrl=").concat(J+B.callbackUrl,"&fileType=").concat(B.fileType,"&title=").concat(B.title,"&model=").concat(b,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!A)}),"html"===N&&(0,y.jsx)("iframe",{src:Z+"&disposition=inline"}),"pdf"===N&&(0,y.jsx)("iframe",{src:"".concat(Q,"/js/pdfview/index.html?url=").concat(Z,"&disabledDownload=").concat(!!A)}),"image"===N&&(0,y.jsx)("img",{src:(null===(l=Z)||void 0===l?void 0:l.indexOf("http"))>-1||null!==(w=Z)&&void 0!==w&&w.startsWith("/api")?Z:"data:image/png;base64,".concat(Z)}),("other"===N||"download"===N)&&(0,y.jsx)(y.Fragment,{children:O?(0,y.jsx)(v.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(m.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:G,children:"下载"})}):(0,y.jsxs)(m.ZP,{type:"primary",size:"middle",onClick:G,children:[(0,y.jsx)(f.Z,{}),"点击下载"]})})]})}},36707:function(e,n,t){t.d(n,{Z:function(){return F}});var r=t(82242),i=t.n(r),s=t(37205),a=t.n(s),o=t(91232),c=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p=(t(8944),t(32834)),m=t.n(p),f=t(11690);var h=[],x=["<ul>"],g=new(m().Renderer),_=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function v(){h.length=0,x=["<ul>"]}var j={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(e,n,t,r){if(n>=e.length||e[n].level<=t)return n;var i=e[n];r.push("<li><a href='#"+i.anchor+"'>"+i.text+"</a>");var s=[];return n=y(e,++n,i.level,s),s.length>0&&(r.push("<ul>"),s.forEach((function(e){r.push(e)})),r.push("</ul>")),r.push("</li>"),n=y(e,n,t,r)}function w(){return y(h,0,0,x),x.push("</ul>"),x.join("")}var k={heading:function(e){var n=_.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[1].length,text:n[2]}},fences:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],r=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var r=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:u()(n,1)[0].length>=r.length?e.slice(r.length):e})).join("\n")}(t,n[3]||""),i=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(i)>=0){var s=N(),a=r;r=s,S[s]={type:"block",expression:a}}return{type:"code",raw:t,lang:i,text:r}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,Z=0,N=function(){return"__special_katext_id_".concat(Z++,"__")},S={};function I(){return S}function M(){Z=0,S={}}function L(e){return e=e.replace(b,(function(e,n){var t=N();return S[t]={type:"inline",expression:n},t}))}var C=g.listitem;g.listitem=function(e){return C(L(e))};var T=g.paragraph;g.paragraph=function(e){return T(L(e))};var P=g.tablecell;g.tablecell=function(e,n){return P(L(e),n)},g.code=function(e,n,t){var r=(n||"").match(/\S*/)[0];return r?["latex","katex","math"].indexOf(r)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,f.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,f.escape)(e,!0))+"</code></pre>"},g.heading=function(e,n,t){var r=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return h.push({anchor:r,level:n,text:e}),"<h"+n+' id="'+r+'">'+e+"</h"+n+">"},m().setOptions({silent:!0,gfm:!0,pedantic:!1}),m().use({tokenizer:k,renderer:g});var A=m(),E=(t(64018),t(79710)),O=t(67390),D=t(15342),H=t(1012),R=t(12940),z=t(37712),Y="@▁@",V=/<pre[^>]*>/g;var F=function(e){var n=e.value,t=void 0===n?"":n,r=e.className,s=e.showTextOnly,o=e.showLines,l=e.style,p=void 0===l?{}:l,m=e.stylesPrev,f=void 0===m?{}:m,h=e.highlightKeywords,x=e.showProgramFill,g=(e.isProgramFill,e.disabledFill),_=void 0!==g&&g,y=e.programFillValue,k=e.onFillChange,b=void 0===k?function(e){}:k,Z=e.onFillBlur,N=void 0===Z?function(){}:Z,S=String(t),L=(0,d.useState)(""),C=u()(L,2),T=C[0],P=C[1],F=(0,d.useState)("office"),B=u()(F,2),q=B[0],Q=B[1],J=(0,d.useState)([]),U=u()(J,2),W=U[0],G=U[1],K=(0,d.useRef)("a"+(0,H.Z)()),X={},$=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),r=[];return t.map((function(e){""!=e&&r.push(".".concat(K.current," ").concat(e))})),"<style>".concat(r.join("}"),"</style>")}))},ee=(0,d.useMemo)((function(){try{S=S.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+O.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+O.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+O.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(x){var e=-1;return S=S.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(n,t,r){return function(e,n){var t=document.createElement(e===Y?"input":"textarea");t.style.width="100%",t.style.height=e===Y?"40px":"151px",t.rows=5,t.spellcheck=!1,t.name="edu-program-fill",t.placeholder="请输入",t.dataset.id=n;var r=Object.keys(X).length;return X[r]=t,'<span class="edu-program-fill-wrap '.concat(e===Y?"":"show",'" style="width:').concat(e===Y?"200px":"100%",'"><span>').concat(t.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(n,++e)})),'<pre style="background:#fff;padding:4px">'.concat($(S||""),"</pre>")}var n=A(S);n=$(n);var t=I();S.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",w()),v()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var r=t[n],i=r.type,s=r.expression;return(0,D.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(s)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁"),M();var r=document.createElement("div");return r.innerHTML=n,h?(re(r,h.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),r.innerHTML):s?r.innerText:(setTimeout((function(){return ae()}),500),r.innerHTML)}),[S,h]);(0,d.useEffect)((function(){ie.current&&ie.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=ne,e.onblur=te}))}),[W]),(0,d.useEffect)((function(){if(null!=y&&y.length){var e,n=ie.current.querySelectorAll(".edu-program-fill-score"),t=ie.current.querySelectorAll('[name="edu-program-fill"]'),r=c()(t.entries());try{for(r.s();!(e=r.n()).done;){var i,s=u()(e.value,2),a=s[0],o=s[1];o.value=null===(i=y[a])||void 0===i?void 0:i.value,"warning"===y[a].type?o.className="program-fill-warning":"success"===y[a].type?o.className="program-fill-success":o.className=""}}catch(e){r.e(e)}finally{r.f()}var l,d=c()(n.entries());try{for(d.s();!(l=d.n()).done;){var p,m,f=u()(l.value,2),h=f[0];f[1].innerHTML=null!==(p=y[h])&&void 0!==p&&p.score?"".concat(null===(m=y[h])||void 0===m?void 0:m.score,"分"):""}}catch(e){d.e(e)}finally{d.f()}G(y)}}),[y]);var ne=function(e){W[e.target.dataset.id]=W[e.target.dataset.id]||{},W[e.target.dataset.id].value=e.target.value,G(a()(W)),b(W,e.target.dataset.id)},te=function(e){W[e.target.dataset.id]=W[e.target.dataset.id]||{},W[e.target.dataset.id].value=e.target.value,G(a()(W)),N(W,e.target.dataset.id)};function re(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)re(e,n);else if("IMG"!==e.nodeName)if(e.innerHTML){var t;e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var r=document.createElement("span");r.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(r)}}))}var ie=(0,d.useRef)();function se(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),P(t),Q("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),P(t),Q("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),P(t),Q("html");else if(t.startsWith("#")){e.preventDefault();var r=document.getElementById(t.replace("#",""));r&&r.scrollIntoView(!0)}}}j.WebkitLineClamp=o,o&&(p=i()(i()({},p),j));var ae=function(){var e,n=null===(e=ie.current)||void 0===e?void 0:e.querySelectorAll("video");null==n||n.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(E.ZP.isSupported()){var n=new E.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(ie.current&&ee&&ee.match(V)&&window.PR.prettyPrint(),ie.current)return ie.current.addEventListener("click",se),function(){var e;null===(e=ie.current)||void 0===e||e.removeEventListener("click",se),M(),v()}}),[ee,ie.current,se]),(0,z.jsxs)(z.Fragment,{children:[s&&(0,z.jsx)("div",{ref:ie,children:ee}),!s&&(0,z.jsx)("div",{ref:ie,style:i()({},p),className:"".concat(r||""," ").concat(_?"disabled-fill":""," markdown-body ").concat(K.current),dangerouslySetInnerHTML:{__html:ee}}),(0,z.jsx)(R.Z,{close:!0,data:T,type:null!=T&&T.length?q:"",style:i()({},f),onClose:function(){return P("")}})]})}},30971:function(e,n,t){t.d(n,{h:function(){return g}});var r=t(82242),i=t.n(r),s=t(79800),a=t.n(s),o=t(59301),c=t(57809),l=t(78241),u=t(3113),d=t(89780),p=t.n(d),m=(t(8336),t(12469),t(37712)),f=c.default.Option,h={labelCol:{span:4},wrapperCol:{span:20}},x={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function g(e){var n=e.value,t=e.onChange,r=e.mode,s=e.options,c=void 0===s?{}:s,l=(0,o.useRef)(),u=(0,o.useState)(),d=a()(u,2),f=d[0],h=d[1];return(0,o.useEffect)((function(){if(f){var e=function(e){var n=e.getValue();t&&t(n)};return f.on("change",e),function(){f.off("change",e)}}}),[f,t]),(0,o.useEffect)((function(){f&&f.setOption("mode",r)}),[f,r]),(0,o.useEffect)((function(){f&&(n===f.getValue()&&""!==n||setTimeout((function(){f.setValue(n||"")}),300))}),[f,n]),(0,o.useEffect)((function(){if(l.current&&!f){var e=p().fromTextArea(l.current,i()({mode:r,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},c));h(e)}}),[l.current,f]),(0,m.jsx)("div",{className:"my-codemirror-container",children:(0,m.jsx)("textarea",{ref:l})})}n.Z=function(e){var n=e.callback,t=e.onCancel,r=(0,o.useState)("python"),s=a()(r,2),d=s[0],p=s[1];return(0,m.jsxs)(l.Z,i()(i()({},h),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},children:[(0,m.jsx)(l.Z.Item,{label:"代码语言",name:"language",children:(0,m.jsx)(c.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(x[e][1])},children:Object.keys(x).map((function(e){return(0,m.jsx)(f,{value:e,children:x[e][0]},e)}))})}),(0,m.jsx)(l.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,m.jsx)(g,{mode:d})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},49731:function(e,n,t){t.d(n,{Z:function(){return ce}});var r=t(91232),i=t.n(r),s=t(7557),a=t.n(s),o=t(41498),c=t.n(o),l=t(79800),u=t.n(l),d=t(85573),p=t.n(d),m=t(59301),f=t(89780),h=t.n(f),x=t(76374),g=(t(8336),t(6313),t(25717),t(99498),t(25419),t(67549),t(36707)),_=t(37712),v=function(e){var n=e.value,t=void 0===n?"":n,r=(e.className,e.showTextOnly,e.showLines,e.style,(0,m.useMemo)((function(){return""}),[t]));return(0,_.jsx)(_.Fragment,{children:(0,_.jsx)("div",{dangerouslySetInnerHTML:{__html:r}})})},j=t(82242),y=t.n(j),w=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function k(e){var n=e.onActionCallback,t=e.title,r=e.icon,i=e.actionName,s=e.className,a=void 0===s?"":s,o=e.children;return(0,_.jsxs)("a",{title:t,className:a,onClick:function(){n(i)},children:[(0,_.jsx)("i",{className:"md-iconfont ".concat(r)}),o]})}var b=function(e){var n=e.watch,t=e.showNullButton,r=e.showNullProgramButton,i=e.onActionCallback,s=e.fullScreen,a=e.insertTemp,o=e.hidetoolBar,c=[].concat(w,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return(0,_.jsxs)("ul",{className:"markdown-toolbar-container",children:[!o&&c.map((function(e,n){return(0,_.jsx)("li",{children:e.actionName?(0,_.jsx)(k,y()(y()({},e),{},{onActionCallback:i})):(0,_.jsx)("span",{className:"v-line"})},n)})),t?(0,_.jsx)("li",{children:(0,_.jsx)(k,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:i,children:(0,_.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,r?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("li",{children:(0,_.jsx)(k,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:i,children:(0,_.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,_.jsx)("li",{children:(0,_.jsx)(k,{icon:"icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:i,children:(0,_.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,a&&(0,_.jsx)("li",{children:(0,_.jsx)(k,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:i,children:(0,_.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),(0,_.jsx)("li",{className:"btn-full-screen",children:(0,_.jsx)(k,{icon:"".concat(s?"icon-shrink":"icon-enlarge"),title:s?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:i})})]})},Z=t(33471),N=t(78241),S=t(10249),I=t(3113),M={labelCol:{span:4},wrapperCol:{span:20}},L=function(e){var n=e.callback,t=e.onCancel;return(0,_.jsxs)(N.Z,y()(y()({},M),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},children:[(0,_.jsx)(N.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,_.jsx)(S.Z,{})}),(0,_.jsx)(N.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,_.jsx)(S.Z,{})}),(0,_.jsxs)("div",{className:"flex-container flex-end",children:[(0,_.jsx)(I.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,_.jsx)(I.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},C=t(30971),T=t(8591),P=t(13047),A=N.Z.useForm,E={width:280,marginRight:10},O={labelCol:{span:5},wrapperCol:{span:19}},D=function(e){var n=e.callback,t=e.onCancel,r=A(),i=u()(r,1)[0],s=(0,m.useRef)();function a(e,n){-1!==e.status?i.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):T.ZP.error(e.message)}return(0,_.jsxs)(N.Z,y()(y()({form:i},O),{},{className:"upload-image-panel",onFinish:function(e){n(y()(y()({},e),{},{name:s.current}))},style:{width:470,overflow:"hidden"},children:[(0,_.jsx)(N.Z.Item,{label:"图片地址",required:!0,children:(0,_.jsxs)("div",{className:"flex-container",children:[(0,_.jsx)(N.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}],children:(0,_.jsx)(S.Z,{style:E})}),(0,_.jsx)(H,{onFileChange:function(e){var n=e.target.files[0];s.current=n.name,R(n,a)}})]})}),(0,_.jsx)(N.Z.Item,{label:"图片描述",name:"alt",children:(0,_.jsx)(S.Z,{style:{width:264}})}),(0,_.jsxs)(N.Z.Item,{style:{textAlign:"right"},children:[(0,_.jsx)(I.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,_.jsx)(I.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function H(e){var n=e.onFileChange;return(0,_.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,_.jsx)("input",{type:"file",onChange:n})]})}function R(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var r=new window.XMLHttpRequest;r.withCredentials=!0,r.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),r.addEventListener("error",(function(e){console.error(e)}),!1),r.open("POST","".concat(P.KI,"/api/attachments.json")),r.send(t)}var z=t(5112),Y=t(5871),V=z.ZP.Group,F={margin:"0 8px"},B=function(e){var n=e.callback,t=e.onCancel;return(0,_.jsxs)(N.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,_.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,_.jsx)("span",{style:F,children:"单元格数:"}),(0,_.jsx)("span",{style:F,children:"行数"}),(0,_.jsx)(N.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,_.jsx)(Y.Z,{})}),(0,_.jsx)("span",{style:F,children:"列数"}),(0,_.jsx)(N.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,_.jsx)(Y.Z,{})})]}),(0,_.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,_.jsx)("span",{style:F,children:"对齐方式:"}),(0,_.jsx)(N.Z.Item,{name:"align",children:(0,_.jsxs)(V,{children:[(0,_.jsx)(z.ZP,{value:"default",children:(0,_.jsx)("i",{className:"fa fa-align-justify"})}),(0,_.jsx)(z.ZP,{value:"left",children:(0,_.jsx)("i",{className:"fa fa-align-left"})}),(0,_.jsx)(z.ZP,{value:"center",children:(0,_.jsx)("i",{className:"fa fa-align-center"})}),(0,_.jsx)(z.ZP,{value:"right",children:(0,_.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,_.jsxs)("div",{className:"flex-container flex-end",children:[(0,_.jsx)(I.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,_.jsx)(I.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},q=t(67390),Q=t(35325),J=t(1012),U=t(43418),W="link",G="upload-image",K="code-block",X="add-table",$="------------",ee={default:$,left:":".concat($),center:":".concat($,":"),right:"".concat($,":")},ne=t(93802);var te="@▁▁@";function re(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ie=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",se=["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"],ae=p()(p()({},ie+"-B","bold"),ie+"-I","italic"),oe=p()(p()(p()(p()({},W,"添加链接"),K,"添加代码块"),G,"添加文件"),X,"添加表格"),ce=function(e){var n=e.defaultValue,t=void 0===n?"":n,r=e.onChange,s=e.width,o=void 0===s?"100%":s,l=e.height,d=void 0===l?400:l,f=e.miniToolbar,j=void 0!==f&&f,y=e.isFocus,w=void 0!==y&&y,k=e.watch,N=e.insertTemp,S=e.mode,I=void 0===S?"markdown":S,M=e.id,P=void 0===M?"markdown-editor-id":M,A=e.showResizeBar,E=void 0!==A&&A,O=e.noStorage,H=void 0!==O&&O,z=e.showNullButton,Y=void 0!==z&&z,V=e.showNullProgramButton,F=void 0!==V&&V,$=e.hidetoolBar,ie=void 0!==$&&$,ce=e.fullScreen,le=void 0!==ce&&ce,ue=e.onBlur,de=e.onCMBeforeChange,pe=e.onFullScreen,me=e.className,fe=void 0===me?"":me,he=e.disablePaste,xe=void 0!==he&&he,ge=e.disabled,_e=void 0!==ge&&ge,ve=e.disabledFill,je=void 0!==ve&&ve,ye=e.placeholder,we=void 0===ye?"":ye,ke=e.values,be=void 0===ke?"":ke,Ze=(0,m.useState)(null),Ne=u()(Ze,2),Se=Ne[0],Ie=Ne[1],Me=(0,m.useState)(t),Le=u()(Me,2),Ce=Le[0],Te=Le[1],Pe=(0,m.useState)(k),Ae=u()(Pe,2),Ee=Ae[0],Oe=Ae[1],De=(0,m.useState)(le),He=u()(De,2),Re=He[0],ze=He[1],Ye=(0,m.useState)(""),Ve=u()(Ye,2),Fe=Ve[0],Be=Ve[1],qe=(0,m.useState)(0),Qe=u()(qe,2),Je=Qe[0],Ue=Qe[1],We=(0,m.useState)(d),Ge=u()(We,2),Ke=Ge[0],Xe=Ge[1],$e=(0,m.useState)(!1),en=u()($e,2),nn=(en[0],en[1]),tn=(0,m.useRef)((0,J.Z)()),rn=(0,m.useRef)(!1),sn=(0,m.useRef)(),an=(0,m.useRef)(),on=(0,m.useRef)(),cn=(0,m.useRef)(),ln=(0,m.useRef)(),un=function(){var e=c()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Q.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:",Se,an),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?Se.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?Se.replaceSelection('<video width="100%" controls src="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?Se.replaceSelection('<a href="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):Se.replaceSelection("[".concat(e.name,"](").concat(q.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,m.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Te(be),null==Se||Se.setValue(be),window.scrollTo(0,e)}),[be]),(0,m.useEffect)((function(){null==pe||pe(Re)}),[Re]),(0,m.useEffect)((function(){if(an.current){var e=function(e,t){if(!xe){var r=t.clipboardData;if(r){var i=r.types.toString(),s=r.items;if("Files"===i||r.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==I)return;try{var a,o=s[1];"file"===(null===(a=s[0])||void 0===a?void 0:a.kind)&&(o=s[0]);var c=o.getAsFile(),l=c.name.split(".").pop();R(c,(function(e){var t,r,i;e.id?(null==c||null===(t=c.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==c||null===(r=c.type)||void 0===r?void 0:r.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==c||null===(i=c.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(c.type,'&disposition=inline" target="_blank">').concat(c.name,"</a>")):se.includes(l)?n.replaceSelection('<a href="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(c.name,"</a>")):n.replaceSelection("[".concat(c.name,"](").concat(q.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){T.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=h().fromTextArea(an.current,{mode:I,lineNumbers:!j,lineWrapping:!0,value:t,autoCloseTags:!F,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",we):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),r=t.getCursor(),i=t.getLine(r.line),s=i.charAt(r.ch-1),a=i.lastIndexOf("@▁@",r.ch),o=i.lastIndexOf("@▁▁@",r.ch),c=a>o?a:o,l=a>o?3:4;if(-1===te.indexOf(s))return null;if(console.log("change1:",n,e,i,r,c,a,o,s),c>=0&&r.ch-c<5){var u=c+l;return t.replaceRange("",{line:r.line,ch:c},{line:r.line,ch:u}),{line:r.line,ch:u}}return null}(e);t&&n.preventDefault()}})),w&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){on.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){on.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var r;if(on.current.classList.add("mouse-hover-md"),(r=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var i=function(){var e=r[s],t=e.name.split(".").pop();R(e,(function(r){var i,s,a;r.id?(null==e||null===(i=e.type)||void 0===i?void 0:i.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(r.id,"?type=").concat(r.content_type,")")):(null==e||null===(s=e.type)||void 0===s?void 0:s.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(r.id,'"></video>')):(null==e||null===(a=e.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(r.id,"?type=").concat(e.type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):se.includes(t)?n.replaceSelection('<a href="'.concat(q.Z.API_SERVER,"/api/attachments/").concat(r.id,'?type=office&disposition=inline" target="_blank">').concat(e.name,"</a>")):n.replaceSelection("[".concat(e.name,"](").concat(q.Z.API_SERVER,"/api/attachments/").concat(r.id,"?type=").concat(r.content_type,")")):401===(null==r?void 0:r.status)&&(document.location.href="/user/login")}))},s=0;s<r.length;s++)i()}})),_e&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ie(n),function(){n.off("paste",e)}}}),[]);var dn=(0,m.useCallback)((function(){on.current}),[Ke,on,Re]);(0,m.useEffect)((function(){if(Se){var e=function(){var e=new x.Z((function(e){var n,t=i()(e);try{for(t.s();!(n=t.n()).done;){var r=n.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&(dn(),Se.setSize("100%","100%"),Se.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(an.current.parentElement),e}();return function(){var n,t;null!==(n=an.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=an.current)||void 0===t?void 0:t.parentElement)}}}),[Se,dn]),(0,m.useEffect)((function(){if(Se){for(var e=[],n=function(){var n=u()(r[t],2),i=n[0],s=n[1],a=p()({},i,(function(){pn(s)}));e.push(a),Se.addKeyMap(a)},t=0,r=Object.entries(ae);t<r.length;t++)n();return sn.current=setInterval((function(){rn.current&&un()}),4e3),function(){clearInterval(sn.current);for(var n=0,t=e;n<t.length;n++){var r=t[n];Se.removeKeyMap(r)}}}}),[Se]),(0,m.useEffect)((function(){le!==Re&&ze(le)}),[le]),(0,ne.Z)((function(){if(!H&&Je>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(P);e>=Je+1e4&&(!n||n!==Ce)&&(window.sessionStorage.setItem(P,Ce),nn(!0))}}),1e4),(0,m.useEffect)((function(){Oe(k)}),[Se,k]),(0,m.useEffect)((function(){Se&&w&&Se.focus()}),[Se,w]),(0,m.useEffect)((function(){if(Ee&&Se){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=Se.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Se,Ee]),(0,m.useEffect)((function(){if(Se&&de){var e=function(e,n){de(e,n)};return Se.on("beforeChange",e),function(){Se.off("beforeChange",e)}}}),[Se,de]),(0,m.useEffect)((function(){if(Se&&ue){var e=function(){ue(Se.getValue())};return Se.on("blur",e),function(){Se.off("blur",e)}}}),[Se,ue]),(0,m.useEffect)((function(){if(Se){var e=function(e,n){var t=e.getValue();Te(t),Ue((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),r&&(F?r(t,gn(t)):r(t))};return Se.on("change",e),function(){Se.off("change",e)}}}),[Se,r]),(0,m.useEffect)((function(){if(Se)if(null==t)Se.setValue(""),Te("");else{var e=window.scrollY||window.pageYOffset;t!==Se.getValue()&&(Se.setValue(t),Te(t),Se.setCursor(_e?1:Se.lineCount(),0),window.scrollTo(0,e))}}),[Se,t]);var pn=(0,m.useCallback)((function(e){var n=Se.getCursor(),t=Se.getSelection(),r=t.split("\n");switch(e){case"bold":return Se.replaceSelection("**"+t+"**"),""===t&&Se.setCursor(n.line,n.ch+2),Se.focus();case"italic":return Se.replaceSelection("*"+t+"*"),""===t&&Se.setCursor(n.line,n.ch+1),Se.focus();case"code":return Se.replaceSelection("`"+t+"`"),""===t&&Se.setCursor(n.line,n.ch+1),Se.focus();case"inline-latex":return Se.replaceSelection("`$$"+t+"$$`"),""===t&&Se.setCursor(n.line,n.ch+3),Se.focus();case"latex":return Se.replaceSelection("```latex\n"+t+"\n```"),Se.setCursor(n.line+1,t.length+1),Se.focus();case"line-break":return Se.replaceSelection("<br/>\n"),Se.focus();case"list-ul":return""===t?Se.replaceSelection("- "+t):Se.replaceSelection(r.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Se.focus();case"list-ol":return""===t?Se.replaceSelection("1. "+t):Se.replaceSelection(r.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Se.focus();case"add-null-ch":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection("▁"),Se.focus();case"add-signal":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection("@▁@"),Se.focus();case"add-multiple":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection(te),Se.focus();case"inster-template-1":return""===t&&Se.setCursor(n.line,n.ch),Se.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Se.focus();case"eraser":return Se.setValue(""),Se.focus();case"trigger-watch":return Oe(!Ee),Se.focus();case"trigger-full-screen":return ze(!Re),Se.focus();case W:return void Be(W);case K:return void Be(K);case G:return void Be(G);case X:return void Be(X);default:throw new Error}}),[Se,Ee,Re]),mn=(0,m.useCallback)((function(e){switch(Be(""),Fe){case W:var n=e.title,t=e.link;return Se.replaceSelection("[".concat(n,"](").concat(t,")")),Se.focus();case K:var r=e.language,i=e.content;return Se.replaceSelection(["```"+r,i,"```"].join("\n")),Se.focus();case G:var s=e.src,a=e.alt;return a?Se.replaceSelection("![ ".concat(a," ]( ").concat(s,' "').concat(a,'" )')):Se.replaceSelection("![,](".concat(s,")")),Se.focus();case X:for(var o=e.row,c=e.col,l=e.align,u="\n",d=0;d<o;d++){for(var p=[],m=[],f=0;f<c;f++)1===d&&m.push(ee[l]),p.push(" ");1===d&&(u+="| ".concat(m.join(" | ")," |\n")),u+="| ".concat(p.join(1===c?"":" | ")," |\n")}return Se.replaceSelection(u+"\n"),Se.focus();default:throw new Error}}),[Se,Fe]),fn=(0,m.useMemo)((function(){switch(Fe){case W:return(0,_.jsx)(L,{callback:mn,onCancel:hn});case K:return(0,_.jsx)(C.Z,{callback:mn,onCancel:hn});case G:return(0,_.jsx)(D,{callback:mn,onCancel:hn});case X:return(0,_.jsx)(B,{callback:mn,onCancel:hn});default:return null}}),[Fe]);function hn(){Be("")}(0,m.useEffect)((function(){if(cn.current){var e=function(e){i=!0,s=e.pageY},n=function(){i=!1},t=function(e){if(i){var n=e.pageY-s;n<0&&(n=0),n>300&&(n=300),Xe(d+n+"px")}},r=cn.current,i=!1,s=0;return r.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){r.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Se,cn]),(0,m.useEffect)((function(){Xe(d)}),[d]);var xn={width:re(o),height:re(Ke)},gn=((0,m.useMemo)((function(){if(Je){var e=new Date(Je),n=e.getHours(),t=e.getMinutes(),r=e.getSeconds();return t=t<10?"0"+t:t,r=r<10?"0"+r:r,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(r)}return 0}),[Je]),function(e){var n=[];if(F){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,r){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,_.jsxs)(m.Fragment,{children:[(0,_.jsx)("div",{className:"markdown-editor-wrapper",ref:on,children:(0,_.jsxs)("div",{className:"markdown-editor-container ".concat(fe," ").concat(Ee?"on-preview":""," ").concat(j?"mini":""," ").concat(Re?"full-screen":""),style:xn,children:[(0,_.jsx)(b,{insertTemp:N,watch:Ee,fullScreen:Re,showNullButton:Y,showNullProgramButton:F,onActionCallback:pn,hidetoolBar:ie,uuid:tn.current,setOpenPhones:function(){rn.current=!0}}),(0,_.jsxs)("div",{className:"markdown-editor-body",children:[(0,_.jsx)("div",{className:"codemirror-container",children:(0,_.jsx)("textarea",{ref:an,placeholder:we})}),Ee?(0,_.jsxs)("div",{ref:ln,className:"preview-container",children:["stex"===I&&(0,_.jsx)(v,{value:Ce}),"stex"!==I&&(0,_.jsx)(g.Z,{disabledFill:je,showProgramFill:F,value:Ce})]}):null]})]})}),E?(0,_.jsx)("a",{ref:cn,className:"editor-resize"}):null,(0,_.jsx)(Z.Z,{children:oe[Fe]?(0,_.jsx)(U.Z,{centered:!0,title:oe[Fe],open:!0,onCancel:hn,footer:null,className:"markdown-popup-form",children:fn}):null})]})}},33471:function(e,n,t){t.d(n,{Z:function(){return m}});var r=t(82100),i=t.n(r),s=t(29186),a=t.n(s),o=t(80619),c=t.n(o),l=t(47074),u=t.n(l),d=t(59301),p=t(4676),m=function(e){c()(t,e);var n=u()(t);function t(e){var r;i()(this,t),r=n.call(this,e);var s=window.document;return r.node=s.createElement("div"),s.body.appendChild(r.node),r}return a()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(d.Component)},93802:function(e,n,t){t.d(n,{Z:function(){return i}});var r=t(59301);function i(e,n){var t=(0,r.useRef)();(0,r.useEffect)((function(){t.current=e})),(0,r.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},22428:function(e,n,t){t.d(n,{Z:function(){return T}});var r=t(7557),i=t.n(r),s=t(41498),a=t.n(s),o=t(79800),c=t.n(o),l=t(82242),u=t.n(l),d=t(59301),p=t(5112),m=t(3113),f=t(8591),h=t(43418),x=t(5871),g=t(95237),_=t(43604),v=t(28103),j=t(10446),y="title___dVHM9",w=t(13277),k=t(24334),b=t(35325),Z=t(80184),N=t(36707),S=t(18036),I=t(87169),M=t(26227),L=t(37712),C={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};var T=function(e){var n=e.language,t=e.dispatch,r=e.shixunWorkReport,s=e.v,o=e.languages,l=e.classroomList,T=e.autoHeight,P=(e.diff_code_count,e.data,(0,d.useState)(null==o?void 0:o[0])),A=c()(P,2),E=A[0],O=A[1],D=(0,Z.useParams)();return(0,d.useEffect)((function(){O(null==o?void 0:o[0])}),[]),(0,d.useEffect)((function(){var e;O(null==o||null===(e=o.filter((function(e){return e.language===(null==E?void 0:E.language)})))||void 0===e?void 0:e[0])}),[o]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("h2",{children:[" ",(0,L.jsxs)("span",{children:[(0,L.jsx)("span",{children:"最后通关的代码"}),(null==o?void 0:o.length)>1&&(0,L.jsx)(p.ZP.Group,{defaultValue:n,style:{marginLeft:10},onChange:function(e){var n;O(null==o||null===(n=o.filter((function(n){return n.language===e.target.value})))||void 0===n?void 0:n[0])},children:null==o?void 0:o.map((function(e){return(0,L.jsx)(p.ZP,{value:null==e?void 0:e.language,children:null==e?void 0:e.language})}))})]}),(0,w.GJ)()&&"shixunWorkReport"!=r&&(0,L.jsxs)("span",{children:[(0,L.jsxs)("span",{children:["得分 ",null==E?void 0:E.score,"/",null==E?void 0:E.total_score]}),(0,L.jsx)(m.ZP,{style:{margin:"0px 10px"},onClick:function(){var e;if(null!==(e=l.AssistantObject)&&void 0!==e&&null!==(e=e.hack)&&void 0!==e&&e.can_appraise||!(0,w.Rm)()){var n,r=null==E?void 0:E.score;h.Z.confirm({title:"调分",content:(0,L.jsxs)("div",{children:[(0,L.jsxs)("p",{children:["得分:",null==E?void 0:E.score,"/",null==E?void 0:E.total_score]}),(0,L.jsxs)("p",{children:["调分:",(0,L.jsx)(x.Z,{min:0,max:null==E?void 0:E.total_score,defaultValue:null==E?void 0:E.score,onChange:function(e){r=e}})]})]}),okText:"确认",onOk:(n=a()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/courses/".concat(null==D?void 0:D.coursesId,"/homework_commons/update_hack_score"),{method:"put",body:{course_id:null==D?void 0:D.coursesId,hack_user_code_id:null==E?void 0:E.hack_user_id,score:r}});case 2:0===e.sent.status&&(f.ZP.success("调分成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getShixunWorkReports",payload:u()({},D)}));case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)}),cancelText:"取消"})}else f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},type:"primary",children:"调分"}),(0,w.GJ)()&&"shixunWorkReport"!=r&&(0,L.jsx)(m.ZP,{onClick:function(){var e;null!==(e=l.AssistantObject.hack)&&void 0!==e&&e.can_appraise||!(0,w.Rm)()?t({type:"shixunHomeworks/setActionTabs",payload:{key:"更改点评",selectArrs:{myshixun_identifier:r.user_id,type:"1",language:null==E?void 0:E.language,v:s,data:u()({},r)}}}):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"点评代码"})]})]}),(0,L.jsx)(j.ZP,{height:300,language:null==E?void 0:E.language,value:k.Base64.decode(null==E?void 0:E.code),autoHeight:T,theme:"default",options:C}),((null==E?void 0:E.comment)||(null==E?void 0:E.hidden_comment))&&(0,L.jsxs)("div",{children:[(0,L.jsxs)(g.Z,{align:"middle",style:{borderTop:"1px solid #eee"},children:[(0,L.jsx)(_.Z,{flex:1,children:(0,L.jsx)("h1",{className:y,children:"点评内容"})}),(0,L.jsx)(_.Z,{className:"pr30",children:(0,w.GJ)()&&(0,L.jsxs)(m.ZP,{onClick:a()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:h.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",icon:(0,L.jsx)(I.Z,{}),content:"是否确认删除?",onOk:function(){return a()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.gZ)({comment_id:null==E?void 0:E.comment_id,homeworkId:D.homeworkId,type:"hack"});case 2:0===e.sent.status&&(f.ZP.success("删除成功"),t({type:"shixunHomeworks/getShixunWorkReports",payload:u()({},D)}));case 4:case"end":return e.stop()}}),e)})))()}});case 1:case"end":return e.stop()}}),e)}))),children:[(0,L.jsx)(M.Z,{}),"删除"]})})]}),(0,L.jsx)(v.Z,{style:{margin:0}}),(null==E?void 0:E.comment)&&(0,L.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,L.jsx)("span",{className:"c-light-black font12",children:"# 学生和课堂老师可见"}),(0,L.jsx)("br",{}),(0,L.jsx)(N.Z,{value:null==E?void 0:E.comment})]}),(null==E?void 0:E.hidden_comment)&&(0,L.jsxs)("aside",{className:"pl30 pr30 mt20",children:[(0,L.jsx)("span",{className:"c-light-black font12",children:"# 仅课堂老师可见"}),(0,L.jsx)("br",{}),(0,L.jsx)(N.Z,{value:null==E?void 0:E.hidden_comment})]})]})]})}},51248:function(e,n,t){var r=t(7557),i=t.n(r),s=t(82242),a=t.n(s),o=t(41498),c=t.n(o),l=t(39647),u=t.n(l),d=(t(59301),t(43418)),p=t(8591),m=t(35325),f=t(80184),h=t(37712),x=["shixunHomeworks","dispatch"];n.Z=(0,f.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,r=(u()(e,x),(0,f.useParams)());return(0,h.jsxs)(d.Z,{centered:!0,title:"提示",open:"打回重做"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:c()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,m.ZP)("/api/myshixuns/".concat(n.actionTabs.selectArrs.myshixun_identifier,"/reset_my_game.json"),{method:"GET",params:{course_id:r.coursesId}});case 2:e.sent.shixun_identifier&&(p.ZP.success("操作成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:a()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,h.jsx)("p",{children:"该作业将被打回重做,学生实训记录将被清空!"}),(0,h.jsx)("p",{children:"确定打回?"})]})}))},99287:function(e,n,t){t.r(n),t.d(n,{default:function(){return nn}});var r=t(82242),i=t.n(r),s=t(7557),a=t.n(s),o=t(41498),c=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p=t(35325),m=t(80184),f=t(8591),h=t(43418),x=t(3113),g=t(66104),_=t(6848),v=t(99313),j=t(1710),y=t(27812),w=t(1079),k=t(36707),b=t(37712),Z=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch;(0,m.useParams)();return(0,b.jsx)(h.Z,{centered:!0,title:"提示",open:"删除"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t({type:"shixunHomeworks/deleteReply",payload:{object_id:n.actionTabs.selectArr.id,object_type:"journals_for_message"}});case 2:0===e.sent.status&&(f.ZP.success("删除成功"),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getReplyList",payload:i()({},n.actionTabs.params)}));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:(0,b.jsx)("p",{children:"确定要删除该条回复吗?"})})})),N=t(61186),S=t.n(N),I=t(71418),M=t(58421),L={flex_box_center:"flex_box_center___zN9Rd",flex_space_between:"flex_space_between___OHt3Z",flex_box_vertical_center:"flex_box_vertical_center___xzO8Q",flex_box_center_end:"flex_box_center_end___LuRwh",flex_box_column:"flex_box_column___rEgTS",top:"top___vNhKr",desc:"desc___IlwMy",liked:"liked___gFxXM",likedActive:"likedActive___bEcK_",reply:"reply___q4nj7",replyList:"replyList___qxCAX",comment:"comment___gIcRF"},C=t(13277),T=t(46172);S().locale("ZH-cn");var P=["","简单","中等","困难"],A=(0,m.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,r=e.loading,i=e.user;return{shixunHomeworks:n,globalSetting:e.globalSetting,classroomList:t,user:i,loading:r.effects}}))((function(e){var n,t=e.shixunHomeworks,r=e.classroomList,s=(e.globalSetting,e.user,e.loading,e.dispatch,(0,d.useState)(i()(i()({},(0,m.useParams)()),{},{per_page:10}))),o=u()(s,2),l=o[0],g=o[1],_=(0,d.useState)([]),y=u()(_,2),w=y[0],N=y[1],S=(0,d.useState)(-1),A=u()(S,2),E=(A[0],A[1],(0,d.useState)("")),O=u()(E,2),D=(O[0],O[1],(0,d.useState)("")),H=u()(D,2),R=(H[0],H[1],r.detailLeftMenus,(0,m.useLocation)(),(0,d.useState)({})),z=u()(R,2),Y=(z[0],z[1],t.workDetail,t.workList),V=(0,d.useState)("1"),F=u()(V,2),B=F[0],q=F[1],Q=(0,d.useState)(!1),J=u()(Q,2),U=J[0],W=J[1];function G(){return K.apply(this,arguments)}function K(){return(K=c()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return W(!0),e.next=3,(0,p.ZP)("/api/courses/".concat(l.coursesId,"/homework_commons/edit_hack_homework.json"),{method:"get",params:i()(i()({},l),{},{id:l.categoryId})});case 3:t=e.sent,N(t),W(!1),l.defaultExpandedRowKeys=["".concat(null==t||null===(n=t.data)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.identifier)],"2"!=B&&q(null!=t&&t.description?"1":"2"),g(i()({},l));case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,d.useEffect)((function(){Y.homework_status&&G()}),[Y]),(0,b.jsxs)("section",{className:L.bg,children:[(0,b.jsx)(I.Z,{spinning:U,children:(0,b.jsxs)(v.Z,{onChange:function(e){q(e)},activeKey:B,children:[(0,b.jsx)(v.Z.TabPane,{tab:"说明",children:(0,b.jsxs)("section",{className:" edu-container",style:{padding:"20px 20px",background:"#fff"},children:[!(null!=w&&w.description)&&(0,b.jsx)(T.Z,{customText:"暂无说明"}),(0,b.jsx)(k.Z,{value:(null==w?void 0:w.description)||""})]})},1),(0,b.jsx)(v.Z.TabPane,{tab:"题目列表",children:(0,b.jsxs)("div",{children:[(0,b.jsx)("section",{className:" edu-container",style:{padding:"20px 20px",background:"#fff"},children:l.defaultExpandedRowKeys&&(0,b.jsx)(j.Z,{dataSource:null==w?void 0:w.data,rowKey:function(e){return null==e?void 0:e.identifier},pagination:!1,expandable:{expandedRowRender:function(e){var n,t;return(0,b.jsxs)("div",{style:{padding:"10px 48px",borderRadius:2},children:[(0,b.jsxs)("p",{children:["题目:",null==e?void 0:e.name]}),(0,b.jsxs)("p",{children:["描述:",null==e?void 0:e.description]}),!(0,C.dE)()&&(0,b.jsxs)("p",{children:["题目解析:",(0,b.jsx)(k.Z,{style:{fontSize:"14px"},value:(null==e?void 0:e.analysis)||"暂无解析"})]}),(0,b.jsxs)("div",{style:{width:"100%",textAlign:"end"},children:[(0,C.GJ)()&&(null==w||null===(n=w.homework_status)||void 0===n?void 0:n.includes("未发布"))&&(0,b.jsx)(x.ZP,{type:"primary",ghost:!0,onClick:function(){window.open("/problems/".concat(null==e?void 0:e.identifier,"/edit?type=1")),localStorage.setItem("program_homework",[l.coursesId,l.categoryId])},children:"编辑"}),(0,C.GJ)()&&(null==w||null===(t=w.homework_status)||void 0===t?void 0:t.includes("未发布"))&&(0,b.jsx)(x.ZP,{type:"primary",style:{marginLeft:20},ghost:!0,onClick:function(){var n;h.Z.confirm({title:"提示",content:"是否确认删除",okText:"确认",cancelText:"取消",onOk:(n=c()(a()().mark((function n(){var t;return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,p.ZP)("/api/problems/".concat(null==e?void 0:e.identifier,".json"),{method:"delete"});case 2:0===(null==(t=n.sent)?void 0:t.status)&&(f.ZP.info("删除成功"),l.page=1,G());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})},children:"删除"})]})]})},defaultExpandedRowKeys:l.defaultExpandedRowKeys},columns:[{title:"题目",dataIndex:"name",ellipsis:!0,width:"20%",key:"name"},{title:"难度",dataIndex:"difficult",key:"difficult",render:function(e,n,t){return(0,b.jsx)("div",{children:P[e]})}},{title:"通过率",dataIndex:"pass_rate",key:"pass_rate"},{title:"通过人数",dataIndex:"submit_info",key:"submit_info"},{title:"知识点",dataIndex:"tag_discipline",ellipsis:!0,width:"10%",key:"tag_discipline"},{title:"操作",dataIndex:"identifier",key:"identifier",render:function(e,n,t){return(0,b.jsxs)("div",{children:[(0,b.jsx)("a",{onClick:function(){var n;!(0,C.Rm)()||null!==(n=r.AssistantObject.hack)&&void 0!==n&&n.can_question_eaderboard?window.open("/classrooms/".concat(l.coursesId,"/program_homework/").concat(l.categoryId,"/").concat(e,"/ranking")):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"排行"}),(0,b.jsx)("a",{onClick:c()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/problems/".concat(null==n?void 0:n.identifier,"/start.json"),{method:"get"});case 2:(t=e.sent)&&(window.open("/myproblems/".concat(null==t?void 0:t.identifier,"?type=1")),localStorage.setItem("program_homework",[l.coursesId,l.categoryId]));case 4:case"end":return e.stop()}}),e)}))),style:{margin:"0px 20px"},children:(0,C.GJ)()?"体验":"进入答题"})]})}}]})}),console.log("---",["".concat(null==w||null===(n=w.data)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.identifier)]),(0,b.jsx)("aside",{className:"tc mt30 pb30",children:(0,b.jsx)(M.Z,{defaultCurrent:1,total:null==w?void 0:w.count,hideOnSinglePage:!0,showTotal:function(e){return(0,b.jsxs)("span",{children:["共",e,"条"]})},current:l.page||1,pageSize:l.per_page||10,onChange:function(e,n){l.page=e,l.per_page=n,g(i()({},l)),G()}})})]})},2)]})}),(0,b.jsx)(Z,{})]})})),E=t(37205),O=t.n(E),D=t(85573),H=t.n(D),R=t(78241),z=t(20834),Y=t(24905),V=t(95237),F=t(43604),B=t(10249),q=t(38854),Q=t(5112),J=t(5871),U=t(84105),W=t(87395),G=t(67921),K=t(89489),X=t(51248),$=t(39647),ee=t.n($),ne=t(96512),te=["shixunHomeworks","dispatch"],re=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,r=(ee()(e,te),(0,m.useParams)()),s=(0,d.useState)(!0),o=u()(s,2),l=o[0],x=o[1],g=(0,d.useState)(!1),_=u()(g,2),v=_[0],j=_[1],y=R.Z.useForm(),w=u()(y,1)[0],k=function(){var e=c()(a()().mark((function e(){var s;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=w.getFieldValue(),e.next=3,(0,p.ZP)("/api/homework_commons/".concat(r.categoryId,"/batch_comment.json"),{method:"post",body:{student_work_ids:O()(n.actionTabs.selectArrs),cover_all:l,hidden_comment:s.hidden_comment,comment:s.comment}});case 3:0===e.sent.status&&(f.ZP.success("评阅成功"),w.resetFields(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),t({type:"shixunHomeworks/getWorkList",payload:i()({},n.actionTabs.params)}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(h.Z,{centered:!0,title:"一键点评",open:"一键点评"===n.actionTabs.key,okText:"确定",cancelText:"取消",onOk:c()(a()().mark((function e(){var r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=w.getFieldValue(),"{}"===JSON.stringify(r)||""===r.hidden_comment&&""===r.comment?j(!0):n.workList.partial_comment?t({type:"shixunHomeworks/setActionTabs",payload:{key:"一键点评确认",selectArrs:n.actionTabs.selectArrs,params:n.actionTabs.params}}):k();case 2:case"end":return e.stop()}}),e)}))),onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,b.jsxs)(R.Z,{form:w,onChange:function(){v&&j(!1)},children:[(0,b.jsx)("p",{children:"学生和课堂老师可见"}),(0,b.jsx)(R.Z.Item,{name:"comment",children:(0,b.jsx)(B.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})}),(0,b.jsx)("p",{children:"仅课堂老师可见"}),(0,b.jsx)(R.Z.Item,{name:"hidden_comment",children:(0,b.jsx)(B.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})})]}),v&&(0,b.jsx)("p",{className:"c-red",children:"评阅内容至少有一个不为空"})]}),(0,b.jsx)(h.Z,{centered:!0,title:(0,b.jsxs)("span",{children:[(0,b.jsx)(ne.Z,{className:"c-orange mr20"}),"提示"]}),open:"一键点评确认"===n.actionTabs.key,okText:"确定点评",cancelText:"放弃点评",onOk:function(){k()},onCancel:function(){t({type:"shixunHomeworks/setActionTabs",payload:{}})},width:400,children:(0,b.jsxs)("div",{className:"tc",children:[(0,b.jsx)("p",{children:"部分学生已有点评内容,是否覆盖已有点评内容?"}),(0,b.jsx)("p",{children:(0,b.jsxs)(Q.ZP.Group,{onChange:function(e){x(e.target.value)},value:l,children:[(0,b.jsx)(Q.ZP,{value:!0,children:"覆盖已有点评"}),(0,b.jsx)(Q.ZP,{value:!1,children:"跳过已有点评"})]})})]})})]})})),ie=t(18036),se="wrap___altfw",ae="MdEditor___OuyKH",oe="tr1___nwwbX",ce=["shixunHomeworks","dispatch"],le=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n,t,r=e.shixunHomeworks,i=e.dispatch,s=(ee()(e,ce),(0,m.useParams)()),o=(0,d.useState)(!1),l=u()(o,2),x=l[0],g=l[1],_=(0,d.useState)(null===(n=r.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.name),v=u()(_,2),j=v[0],y=v[1],w=R.Z.useForm(),k=u()(w,1)[0];(0,d.useEffect)((function(){var e,n,t;"更改点评"===r.actionTabs.key&&k.setFieldsValue({comment:null===(e=r.actionTabs.selectArrs)||void 0===e||null===(e=e.data)||void 0===e?void 0:e.work_comment,hidden_comment:null===(n=r.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.work_comment_hidden}),y(null===(t=r.actionTabs.selectArrs)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.name)}),[r.actionTabs.key]);var Z=function(){var e=c()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=k.getFieldValue(),e.next=3,(0,p.ZP)("/api/student_works/".concat(null===(n=r.actionTabs.selectArrs)||void 0===n||null===(n=n.data)||void 0===n?void 0:n.homeworkId,"/shixun_work_comment.json"),{method:"post",body:{hidden_comment:t.hidden_comment,comment:t.comment}});case 3:if(0!==e.sent.status){e.next=9;break}return f.ZP.success("评阅成功"),k.resetFields(),i({type:"shixunHomeworks/setActionTabs",payload:{}}),e.abrupt("return",i({type:"shixunHomeworks/getWorkList",payload:s}));case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,b.jsx)(b.Fragment,{children:(0,b.jsxs)(h.Z,{centered:!0,title:null!==(t=r.actionTabs.selectArrs)&&void 0!==t&&null!==(t=t.data)&&void 0!==t&&t.work_comment_hidden?"更改"+j+"点评":j+"点评",open:"更改点评"===r.actionTabs.key,okText:"确定",cancelText:"取消",onOk:c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=k.getFieldValue(),"{}"===JSON.stringify(n)||""===n.hidden_comment&&""===n.comment?g(!0):Z();case 2:case"end":return e.stop()}}),e)}))),onCancel:function(){i({type:"shixunHomeworks/setActionTabs",payload:{}})},children:[(0,b.jsxs)(R.Z,{form:k,onChange:function(){x&&g(!1)},children:[(0,b.jsx)("p",{children:"学生和课堂老师可见"}),(0,b.jsx)(R.Z.Item,{name:"comment",children:(0,b.jsx)(B.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})}),(0,b.jsx)("p",{children:"仅课堂老师可见"}),(0,b.jsx)(R.Z.Item,{name:"hidden_comment",children:(0,b.jsx)(B.Z.TextArea,{placeholder:"请输入评阅内容",rows:8})})]}),x&&(0,b.jsx)("p",{className:"c-red",children:"评阅内容至少有一个不为空"})]})})})),ue=["shixunHomeworks","dispatch"],de=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks}}))((function(e){var n=e.shixunHomeworks,t=e.dispatch,r=(ee()(e,ue),(0,m.useParams)()),i=(0,d.useState)([]),s=u()(i,2),o=s[0],l=s[1],f=(0,d.useState)([]),x=u()(f,2),g=x[0],_=x[1];function v(){return(v=c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/homework_commons/".concat(r.categoryId,"/code_quality_analyses/group_list.json"),{method:"GET",params:{page:1,limit:200}});case 2:n=e.sent,l(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,d.useEffect)((function(){"质量检测"===n.actionTabs.key&&function(){v.apply(this,arguments)}()}),[n.actionTabs.key]);return(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(h.Z,{centered:!0,title:"代码质量评分",open:"质量检测"===n.actionTabs.key,width:700,okText:"确定",cancelText:"取消",onOk:c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/homework_commons/".concat(r.categoryId,"/code_quality_analyses.json"),{method:"POST",body:{group_ids:g}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(m.history.replace("/classrooms/".concat(r.coursesId,"/shixun_homework/").concat(r.categoryId,"/detail?tabs=4")),window.location.reload(),t({type:"shixunHomeworks/setActionTabs",payload:{}}),_([]));case 4:case"end":return e.stop()}}),e)}))),onCancel:function(){_([]),t({type:"shixunHomeworks/setActionTabs",payload:{}})},children:(0,b.jsx)(j.Z,{rowSelection:{type:"checkbox",onChange:function(e,n){_(O()(e))},selectedRowKeys:g,getCheckboxProps:function(e){return{disabled:"进行中"===e.status||0===e.works_count}}},rowKey:function(e){return e.key||e.id},scroll:{y:300},pagination:!1,columns:[{title:"分班情况",dataIndex:"name"},{title:"有效作品数",dataIndex:"works_count"},{title:"检测进度",dataIndex:"status"},{title:"上次评分时间",dataIndex:"last_analysis_time"}],dataSource:null==o?void 0:o.group_list})})})})),pe=t(49731),me=t(64063),fe=(0,m.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,r=e.loading,i=e.user;return{shixunHomeworks:n,classroomList:t,loading:r.effects,user:i}}))((function(e){var n,t,r,s,o,l,g,v,y=e.shixunHomeworks,k=e.classroomList,Z=e.loading,N=e.dispatch,S=e.setExportParams,I=e.user,L=(0,m.useParams)(),P=(0,d.useState)(i()(i()({},{page:1,limit:20,order:"work_score",b_order:"desc"}),L)),A=u()(P,2),E=A[0],D=(A[1],R.Z.useForm()),$=u()(D,1)[0],ee=(0,d.useState)(),ne=u()(ee,2),te=ne[0],ce=(ne[1],(0,d.useState)({})),ue=u()(ce,2),fe=ue[0],he=ue[1],xe=(0,d.useState)([]),ge=u()(xe,2),_e=(ge[0],ge[1]),ve=(0,d.useState)(!1),je=u()(ve,2),ye=je[0],we=je[1],ke=(0,d.useState)([]),be=u()(ke,2),Ze=be[0],Ne=be[1],Se=(0,d.useState)(!1),Ie=u()(Se,2),Me=Ie[0],Le=Ie[1],Ce=(0,d.useState)(),Te=u()(Ce,2),Pe=Te[0],Ae=Te[1],Ee=(0,d.useState)(1),Oe=u()(Ee,2),De=Oe[0],He=Oe[1],Re=(0,d.useState)(),ze=u()(Re,2),Ye=(ze[0],ze[1]),Ve=(0,d.useState)(),Fe=u()(Ve,2),Be=Fe[0],qe=Fe[1],Qe=(0,d.useState)(),Je=u()(Qe,2),Ue=Je[0],We=Je[1],Ge=(0,d.useState)(),Ke=u()(Ge,2),Xe=Ke[0],$e=Ke[1],en=(0,d.useState)(),nn=u()(en,2),tn=nn[0],rn=nn[1],sn=(0,d.useState)(!1),an=u()(sn,2),on=an[0],cn=an[1];(0,m.useLocation)();(0,d.useEffect)((function(){return ln(),function(){he([]),_e([])}}),[E.coursesId]),(0,d.useEffect)((function(){var e,n=JSON.parse(JSON.stringify(y.workList));null!=n&&null!==(e=n.student_works)&&void 0!==e&&e.length||null==n||!n.id?(null!=n&&n.id&&_e([i()(i()({},n),{number:"我"})]),he(i()({},n))):(n.student_works=[i()({},n)],he(n))}),[y.workList]);var ln=function(e){return S(i()({},E)),N({type:"shixunHomeworks/getWorkList",payload:E})};(0,d.useEffect)((function(){}),[]);var un=function(){var e=c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"成绩计算中,请稍候..."}}),e.next=3,(0,ie.Vs)({categoryId:L.categoryId});case 3:n=e.sent,N({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),0===(null==n?void 0:n.status)&&(f.ZP.success(null==n?void 0:n.message),ln());case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){document.getElementById("divhe")&&(document.getElementById("divhe").scrollHeight>47&&(rn(47),cn(!0)))}),[document.getElementById("divhe")]);function dn(){He(1),Ye(""),qe(""),We(""),$e(""),Ne([])}var pn=[{title:"序号",dataIndex:"number",align:"center",fixed:"left",ellipsis:{showTitle:!1},render:function(e,n,t){return E.limit*(E.page-1)+t+1}},{title:"姓名",dataIndex:"user_name",align:"center",fixed:"left",ellipsis:{showTitle:!1},render:function(e){return(0,b.jsx)(_.Z,{placement:"bottomLeft",title:e,children:(0,b.jsx)("span",{className:"current",children:e})})}},!(null!=fe&&fe.is_excellent)&&!(0,C.Jd)()&&{title:"学号",dataIndex:"student_id",align:"center",sorter:!0,fixed:"left",showSorterTooltip:!1,ellipsis:{showTitle:!1},sortOrder:"student_id"===E.order?"desc"===E.b_order?"descend":"ascend":null,render:function(e){return(0,b.jsx)(_.Z,{placement:"bottomLeft",title:e||"--",children:(0,b.jsx)("span",{className:"current",children:e||"--"})})}},{title:"分班",dataIndex:"group_name",align:"center",fixed:"left",ellipsis:{showTitle:!1},render:function(e,n){return e?(0,b.jsx)(_.Z,{placement:"bottom",title:e,children:(0,b.jsx)("span",{className:"current",children:e})}):"--"}},{title:"作业状态",dataIndex:"work_status",align:"center",fixed:"left",sorter:!0,ellipsis:{showTitle:!1},showSorterTooltip:!1,sortOrder:"work_status"===E.order?"desc"===E.b_order?"descend":"ascend":null,render:function(e){return(0,b.jsx)(w.lC,{status:e})}},{title:"完成时间",align:"center",dataIndex:"achieve_time",ellipsis:{showTitle:!1},render:function(e,n){return(0,b.jsx)(_.Z,{placement:"bottomLeft",title:e,children:(0,b.jsx)("span",{className:"current",children:e})})}},{title:"通过情况",align:"center",dataIndex:"achieve_info",ellipsis:{showTitle:!1},render:function(e,n){return(0,b.jsx)("span",{children:e||"- -"})}},{title:"最终成绩",align:"center",dataIndex:"score",ellipsis:{showTitle:!1},render:function(e,n){return(0,b.jsx)("span",{children:e||"- -"})}},{title:"完成时长",dataIndex:"achieve_time_long",align:"center",render:function(e,n){return e&&"--"!=e?(0,b.jsx)(_.Z,{placement:"bottom",title:e,children:(0,b.jsx)("span",{className:"current",children:e})}):"--"}},{title:(0,b.jsx)("span",{children:"评阅状态"}),align:"center",dataIndex:"has_comment",fixed:"right",ellipsis:!0,render:function(e){return e?"已评阅":"未评阅"}},{title:"操作",dataInex:"action",align:"center",fixed:"right",ellipsis:!0,className:"workListTable",render:function(e,n){return(0,C.dE)()?(0,b.jsx)("div",{children:"未开启"===(0,w.JL)(null==n?void 0:n.work_status)?(0,b.jsx)("span",{children:"--"}):(0,b.jsx)("a",{onClick:function(e){var t;e.stopPropagation(),!(0,C.Rm)()||null!==(t=k.AssistantObject.hack)&&void 0!==t&&t.can_view?window.open("/classrooms/".concat(E.coursesId,"/program_homework/").concat(E.categoryId,"/").concat(n.id,"/").concat(n.user_id,"/comment"),"_blank"):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"查看"})}):(0,b.jsx)("a",{target:"_blank",onClick:function(e){var t,r;if(!(0,C.Rm)()||null!==(t=k.AssistantObject.hack)&&void 0!==t&&t.can_view){if(e.stopPropagation(),null===(r=I.userInfo)||void 0===r||!r.professional_certification)return h.Z.confirm({title:"提示",centered:!0,content:(0,b.jsx)("div",{className:"tc",children:"您需要去完成您的职业认证,才能使用此功能"}),okText:"立即完善",cancelText:"稍后完善",onOk:function(){(0,w.xg)("/account/certification")}}),!1;window.open("/classrooms/".concat(E.coursesId,"/program_homework/").concat(E.categoryId,"/").concat(n.id,"/").concat(n.user_id,"/comment"),"_blank")}else f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"查看作业"})}}].filter((function(e){return!!e}));return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("section",{className:"".concat(se," minH500 bg-white pl30 pr30 pt30"),children:[(null===(n=fe.homework_status)||void 0===n?void 0:n.includes("未发布"))&&(0,b.jsx)(T.Z,{}),!(null!==(t=fe.homework_status)&&void 0!==t&&t.includes("未发布"))&&(0,b.jsxs)("aside",{children:[!(0,C.GJ)()&&(0,b.jsxs)("div",{className:"c-light-black font12",children:[(0,b.jsxs)("span",{children:["发布时间 ",null==fe?void 0:fe.publish_time]}),(0,b.jsxs)("span",{className:"ml5",children:["截止时间 ",null==fe?void 0:fe.end_time]}),(0,b.jsxs)("span",{className:"ml5",children:["补交时间 ",(null==fe?void 0:fe.late_time)||"- -"]})]}),(0,C.GJ)()&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(R.Z,{form:$,onChange:function(){E.page=1;var e=Object.assign({},$.getFieldsValue());delete E.course_group,delete E.teacher_comment,Object.keys(e).map((function(n){switch(n){case"task_status":e[n].includes("all")||!e[n].length?(delete E.work_status,$.setFieldsValue(H()({},"task_status","all"))):(E.work_status=e[n],$.setFieldsValue(H()({},"task_status",E.work_status)));break;case"course_group_info":e[n].includes("all")||!e[n].length?(delete E.course_group,$.setFieldsValue(H()({},"course_group_info","all"))):(E.course_group=e[n],$.setFieldsValue(H()({},"course_group_info",E.course_group)));break;case"teacher_comment":var t;if(e[n].includes("all")||!e[n].length)delete E.teacher_comment,$.setFieldsValue(H()({},"teacher_comment","all"));else E.teacher_comment=1===(null===(t=e[n])||void 0===t?void 0:t.length)?Number(e[n][0]):"",$.setFieldsValue(H()({},"teacher_comment",e[n]))}})),ln()},initialValues:H()(H()(H()({},"task_status","all"),"course_group_info","all"),"teacher_comment","all"),children:[(null===(r=fe.task_status)||void 0===r?void 0:r.length)>0&&(0,b.jsx)(R.Z.Item,{name:"task_status",children:(0,b.jsx)(Y.Z.Group,{value:[],style:{width:"100%"},children:(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{className:"font14",flex:"80px",children:"作业状态:"}),(0,b.jsx)(F.Z,{flex:"80px",children:(0,b.jsx)(Y.Z,{value:"all",children:"全部"})}),(0,b.jsx)(F.Z,{flex:"1",children:fe.task_status&&fe.task_status.map((function(e,n){return(0,b.jsxs)(Y.Z,{name:"task_status",value:e.id,children:[e.name,"(",e.count,")"]})}))})]})})}),(null===(s=fe.course_group_info)||void 0===s?void 0:s.length)>0&&(0,b.jsx)(R.Z.Item,{name:"course_group_info",children:(0,b.jsx)(Y.Z.Group,{style:{width:"100%"},children:(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{className:"font14",flex:"80px",children:"分班情况:"}),(0,b.jsx)(F.Z,{flex:"80px",children:(0,b.jsx)(Y.Z,{value:"all",children:"全部"})}),(0,b.jsx)(F.Z,{flex:"1",id:"divhe",style:{height:tn+"px",overflow:"hidden"},children:null===(o=fe.course_group_info)||void 0===o?void 0:o.map((function(e,n){return(0,b.jsxs)(Y.Z,{value:e.course_group_id,children:[e.group_group_name,"(",e.count,")"]})}))}),on&&(0,b.jsxs)("span",{onClick:function(){var e=document.getElementById("divhe").scrollHeight;rn(tn>47?47:e)},style:{color:"rgb(76, 172, 255)",cursor:"pointer",alignItems:"flex-end",display:"flex"},children:[47===tn?"展开":"收起",47===tn?(0,b.jsx)(U.Z,{style:{marginBottom:"3px",marginLeft:"2px"}}):(0,b.jsx)(W.Z,{style:{marginBottom:"3px",marginLeft:"2px"}})]})]})})}),(null===(l=fe.teacher_comment)||void 0===l?void 0:l.length)>0&&(0,b.jsx)(R.Z.Item,{name:"teacher_comment",children:(0,b.jsx)(Y.Z.Group,{style:{width:"100%"},children:(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{className:"font14",flex:"80px",children:"追加点评:"}),(0,b.jsx)(F.Z,{flex:"80px",children:(0,b.jsx)(Y.Z,{value:"all",children:"全部"})}),(0,b.jsx)(F.Z,{flex:"1",children:fe.teacher_comment&&fe.teacher_comment.map((function(e,n){return(0,b.jsxs)(Y.Z,{value:String(e.id),children:[e.name,"(",e.count,")"]})}))})]})})})]}),(0,b.jsxs)(V.Z,{align:"middle",children:[(0,b.jsx)(F.Z,{flex:"1",children:(0,b.jsxs)(V.Z,{align:"middle",children:[(0,b.jsx)(F.Z,{children:(0,b.jsx)(B.Z.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){E.search=e,E.page=1,ln()},style:{width:240}})}),(0,b.jsx)(F.Z,{children:(0,b.jsxs)("span",{className:"ml5",children:[(0,b.jsx)("span",{className:"c-red",children:fe.work_count}),"个检索结果(",fe.work_count,"个学生)"]})})]})}),(0,b.jsxs)(F.Z,{children:[(0,C.GJ)()&&(0,b.jsxs)(x.ZP,{className:"ml10",onClick:function(){N({type:"shixunHomeworks/setActionTabs",payload:{key:"代码查重",selectArrs:fe.student_works.map((function(e){return e.id})),params:E}})},children:[(0,b.jsx)("span",{className:"".concat(oe," iconfont icon-daimachazhong")}),"代码查重"]}),(0,C.GJ)()&&(0,b.jsxs)(x.ZP,{className:"ml10",onClick:un,children:[(0,b.jsx)("i",{className:"iconfont icon-gengxinchengji font14 pr5"}),"更新成绩"]}),(0,C.GJ)()&&(0,b.jsx)(q.Z,{dropdownRender:function(){return(0,b.jsxs)(z.Z,{children:[(0,b.jsx)(z.Z.Item,{onClick:function(){(0,me.Iy)(JSON.parse(sessionStorage.all_student_works_params),"shixun_work_list")},children:"学生成绩"},"1"),(0,b.jsx)(z.Z.Item,{children:(0,b.jsx)(m.Link,{to:"/classrooms/".concat(E.coursesId,"/exportlist/shixun_work_list"),children:"历史导出"})},"2")]})},className:"ml10",children:(0,b.jsxs)(x.ZP,{children:[(0,b.jsx)(G.Z,{}),"导出",(0,b.jsx)(K.Z,{})]})})]})]})]}),(0,b.jsx)(V.Z,{style:{justifyContent:"end",marginTop:"5px"},children:(0,C.GJ)()&&te&&(0,b.jsxs)("span",{children:[(0,b.jsx)("span",{style:{color:"red"},children:"*"}),"列表中作业记录存在差异,请点击“更新成绩”按钮"]})}),(0,b.jsx)(j.Z,{className:"mt30",loading:Z["shixunHomeworks/getWorkList"],pagination:!1,style:{cursor:"pointer"},onRow:function(e){return{onClick:function(n){var t;!(0,C.Rm)()||null!==(t=k.AssistantObject.hack)&&void 0!==t&&t.can_view?window.open("/classrooms/".concat(E.coursesId,"/program_homework/").concat(E.categoryId,"/").concat(e.id,"/").concat(e.user_id,"/comment"),"_blank"):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}}},scroll:{x:"max-content"},dataSource:fe.student_works,columns:pn,onChange:function(e,n,t){t.field&&(E.order=t.field),t.order||(E.b_order="asc"),"ascend"===t.order&&(E.b_order="asc"),"descend"===t.order&&(E.b_order="desc"),t.order||(E.b_order="asc"),ln()}}),(0,b.jsx)(re,{}),(0,b.jsx)(le,{}),(0,b.jsx)(X.Z,{})]}),(0,b.jsx)(h.Z,{title:"一键打回重做",open:ye,centered:!0,destroyOnClose:!0,forceRender:!0,width:700,onOk:c()(a()().mark((function e(){var n,t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==De){e.next=13;break}if(!(Ze.length<=0)){e.next=4;break}return f.ZP.info("请选择作业状态"),e.abrupt("return");case 4:if(Xe){e.next=7;break}return f.ZP.info("评语不能为空"),e.abrupt("return");case 7:return e.next=9,(0,p.ZP)("/api/homework_commons/".concat(E.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:E.categoryId,comment:Xe,status:Ze}});case 9:0===(n=e.sent).status&&(Ae(n),we(!1),Le(!0)),e.next=32;break;case 13:if(0!==Ue&&0!==Be){e.next=16;break}e.next=22;break;case 16:if(Ue){e.next=19;break}return f.ZP.info("最低分不能为空"),e.abrupt("return");case 19:if(Be){e.next=22;break}return f.ZP.info("最高分不能为空"),e.abrupt("return");case 22:if(!(Ue>Be)){e.next=25;break}return f.ZP.info("最高分不能大于最低分"),e.abrupt("return");case 25:if(Xe){e.next=28;break}return f.ZP.info("评语不能为空"),e.abrupt("return");case 28:return e.next=30,(0,p.ZP)("/api/homework_commons/".concat(E.categoryId,"/confirm_redo_modal.json"),{method:"post",body:{id:E.categoryId,comment:Xe,min_score:Ue,max_score:Be}});case 30:0===(t=e.sent).status&&(Ae(t),we(!1),Le(!0));case 32:case"end":return e.stop()}}),e)}))),onCancel:function(){we(!1),dn()},children:(0,b.jsx)("div",{style:{padding:"32px"},children:(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{width:"80px"},children:"打回方式:"}),(0,b.jsxs)(Q.ZP.Group,{value:De,onChange:function(e){He(e.target.value)},children:[(0,b.jsx)(Q.ZP,{value:1,children:"按成绩打回"}),(0,b.jsx)(Q.ZP,{value:2,children:"按作业状态打回"})]})]}),1===De&&(0,b.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,b.jsxs)("span",{style:{width:"70px",textAlign:"end"},children:[(0,b.jsx)("span",{style:{color:"red"},children:"*"}),"最低分:"]}),(0,b.jsx)(J.Z,{min:0,max:100,value:Ue,onChange:function(e){return We(e)},style:{width:"100px"}}),(0,b.jsxs)("span",{style:{width:"80px",textAlign:"end"},children:[(0,b.jsx)("span",{style:{color:"red"},children:"*"}),"最高分:"]}),(0,b.jsx)(J.Z,{min:0,max:100,value:Be,onChange:function(e){return qe(e)},style:{width:"100px"}})]}),2===De&&(0,b.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,b.jsx)("span",{style:{width:"80px"},children:"作业状态:"}),(0,b.jsx)(Y.Z.Group,{onChange:function(e){Ne(O()(e))},style:{width:"100%"},children:null===(g=fe.task_status)||void 0===g?void 0:g.map((function(e,n){return(0,b.jsxs)(Y.Z,{name:"task_status",value:e.id,children:[e.name,"(",e.count,")"]})}))})]}),(0,b.jsxs)("div",{style:{display:"flex",marginTop:"20px"},children:[(0,b.jsxs)("span",{style:{width:"70px",textAlign:"end"},children:[(0,b.jsx)("span",{style:{color:"red"},children:"*"})," 评语:"]}),(0,b.jsx)(pe.Z,{className:ae,onChange:function(e){return $e(e)},placeholder:"请填写评语"})]})]})})}),(0,b.jsx)(h.Z,{open:Me,title:"打回确认",onOk:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(2!==De){e.next=7;break}return e.next=3,(0,p.ZP)("/api/homework_commons/".concat(E.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:E.categoryId,comment:Xe,status:Ze}});case 3:0===e.sent.status&&(f.ZP.info("打回成功"),dn(),ln(),Le(!1)),e.next=11;break;case 7:return e.next=9,(0,p.ZP)("/api/homework_commons/".concat(E.categoryId,"/batch_redo_modal.json"),{method:"post",body:{id:E.categoryId,comment:Xe,min_score:Ue,max_score:Be}});case 9:0===e.sent.status&&(f.ZP.info("打回成功"),dn(),ln(),Le(!1));case 11:case"end":return e.stop()}}),e)}))),onCancel:function(){dn(),Le(!1)},children:(0,b.jsxs)("div",{style:{padding:"32px"},children:[1===De&&(0,b.jsxs)("span",{children:["确认将成绩在",Ue,"-",Be,"的学生进行打回重做吗?"]}),2===De&&(0,b.jsxs)("span",{children:["确认将作业状态为",(null===(v=fe.task_status)||void 0===v?void 0:v.filter((function(e){return null==Ze?void 0:Ze.includes(e.id)})).map((function(e){return e.name})).toString())+",","的学生进行作业打回重做吗?"]}),(0,b.jsx)("br",{}),(0,b.jsxs)("span",{children:["该条件下共有",null==Pe?void 0:Pe.count,"名学生"]})]})})]}),(0,b.jsx)(de,{}),(0,b.jsx)("aside",{className:"tc mb50 mt30",children:(0,b.jsx)(M.Z,{showQuickJumper:!0,hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e,n){E.page=e,E.limit=20,ln()},current:E.page||1,defaultPageSize:20,total:fe.work_count})})]})})),he=t(46400),xe=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList,loading:e.loading.effects}}))((function(e){var n,t=e.shixunHomeworks,r=e.loading,s=e.dispatch,o=e.classroomList,l=(0,m.useParams)(),p=(0,d.useState)(i()(i()({},{page:1,limit:20,group_ids:[]}),l)),h=u()(p,2),g=h[0],_=h[1],v=((0,m.useLocation)(),t.codeReview),y=(0,d.useState)({}),w=u()(y,2),k=(w[0],w[1],R.Z.useForm());u()(k,1)[0];g.order="code_rate",g.sort="desc",g.category=g.categoryId,(0,d.useEffect)((function(){Z(),console.log("params",g)}),[g]),(0,d.useEffect)((function(){"执行代码查重"===t.actionTabs.key&&Z()}),[t.actionTabs.key]);var Z=function(){var e=c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,s({type:"shixunHomeworks/getCodeReview",payload:i()({},g)});case 2:-2===e.sent.status&&setTimeout((function(){return Z()}),1500);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=[{title:"序号",dataIndex:"number",render:function(e,n,t){return g.limit*(g.page-1)+t+1}},{title:"姓名",dataIndex:"username"},{title:"学号",dataIndex:"student_id"},{title:"相似度",dataIndex:"code_rate",render:function(e){return(0,b.jsx)("span",{className:"c-orange",children:e})}},{title:"操作",dataInex:"action",render:function(e,n){return(0,b.jsxs)("div",{children:[(0,b.jsx)("a",{onClick:function(){var e;!(0,C.Rm)()||null!==(e=o.AssistantObject.hack)&&void 0!==e&&e.can_view?window.open("/classrooms/".concat(g.coursesId,"/program_homework/").concat(g.categoryId,"/review_detail/").concat(n.user_id)):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"查看"}),(0,b.jsx)("br",{})]})}}];return(0,b.jsxs)("section",{className:"minH500 bg-white pl30 pr30 pt10",children:[-2===(null==v?void 0:v.status)&&(0,b.jsx)(he.Z,{message:"查重进行中,请稍候……",className:"mb10 font14",type:"error"}),(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{flex:"1",children:(0,b.jsxs)("p",{className:"mt10",children:["查重时间:",v.last_review_time,(0,b.jsx)(x.ZP,{ghost:!0,danger:!0,style:{color:"#29BD8B",borderColor:"#29BD8B",marginLeft:10},onClick:function(){s({type:"shixunHomeworks/setActionTabs",payload:{key:"代码查重",params:g}})},children:"代码查重"})]})}),(0,b.jsxs)(F.Z,{children:[(0,b.jsx)(B.Z.Search,{allowClear:!0,placeholder:"请输入姓名或者学号搜索",onSearch:function(e){g.search=e,s({type:"shixunHomeworks/getCodeReview",payload:g})},style:{width:200}}),(0,b.jsx)("span",{className:"ml5 c-red"})]})]}),(null===(n=v.group_info)||void 0===n?void 0:n.length)>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{flex:"80px",className:"font14",children:"分班情况:"}),(0,b.jsx)(F.Z,{flex:"80px",children:(0,b.jsx)(Y.Z,{checked:""==g.group_ids,value:"all",onChange:function(e){delete g.group_ids,g.group_ids=[],g.page=1,_(i()({},g))},children:"全部"})}),(0,b.jsx)(F.Z,{flex:"1",children:v.group_info&&v.group_info.map((function(e,n){return(0,b.jsxs)(Y.Z,{style:{marginLeft:0},value:e.id,checked:g.group_ids.includes(e.id),onChange:function(n){n.target.checked?g.group_ids.push(e.id):g.group_ids.splice(g.group_ids.indexOf(e.id),1),g.page=1,_(i()({},g))},children:[e.name,"(",e.members_count,")"]})}))})]}),(0,b.jsx)(V.Z,{className:"font14 c-red mt5",children:(0,b.jsx)(F.Z,{children:"本页仅显示全部已查重分班"})})]}),(0,b.jsxs)("p",{className:"mt10",children:[(0,b.jsx)("span",{className:"c-red",children:v.copy_reviews_count}),"个疑似抄袭作品(",v.all_reviews_count,"作品)"]}),(0,b.jsx)(j.Z,{className:"mt30",loading:r["shixunHomeworks/getCodeReview"],pagination:!1,dataSource:v.users_reviews,columns:N,onChange:function(e,n,t){"ascend"===t.order&&(g.b_order="asc"),"descend"===t.order&&(g.b_order="desc"),t.order||delete g.b_order,s({type:"shixunHomeworks/getCodeReview",payload:i()({},g)})}}),(0,b.jsx)("aside",{className:"tc mb50 mt30",children:(0,b.jsx)(M.Z,{showSizeChanger:!1,onChange:function(e,n){g.page=e,g.limit=20,s({type:"shixunHomeworks/getCodeReview",payload:i()({},g)})},defaultCurrent:g.page||1,current:g.page||1,defaultPageSize:20,hideOnSinglePage:!0,total:v.copy_reviews_count})})]})})),ge=t(5083),_e=t(57809),ve=t(26227),je=t(32134),ye=t(61485),we=t(89392),ke="form___dWO2F",be="hackList___nh6e9",Ze="title___tyrHF",Ne=t(12047),Se=t(67168),Ie=ge.default.RangePicker,Me=_e.default.Option,Le=(0,m.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList;return{shixunHomeworks:n,loading:e.loading.effects,classroomList:t}}))((function(e){var n,t,r,s,o,l,g,v,j,y,k,Z,N,I=e.shixunHomeworks,M=(e.loading,e.classroomList),L=e.dispatch,T=(0,m.useParams)(),P=I.workSetting,A=I.workList,E=I.changeData,D=(0,d.useState)(!0),H=u()(D,2),R=H[0],z=H[1],B=(0,d.useState)(!1),q=u()(B,2),U=q[0],W=q[1],G=(0,d.useState)([]),K=u()(G,2),X=K[0],$=K[1],ee=(0,d.useState)([]),ne=u()(ee,2),te=ne[0],re=ne[1],ie=(0,d.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_minus_score:0,penalty_type:Ne.Q.Percent,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,send_type:void 0,difficult_count:[],difficult_settings:[],late_penalty:0}),se=u()(ie,2),ae=se[0],oe=se[1];(0,d.useEffect)((function(){return ce(),function(){$([].concat())}}),[]);var ce=function(){L({type:"shixunHomeworks/getWorkSetting",payload:i()({},T)})};(0,d.useEffect)((function(){var e;null!=P&&P.course_id&&(Object.keys(ae).map((function(e){ae[e]=P[e]})),ae.allow_late&&ae.unified_late||(ae.late_minus_score=20,ae.penalty_type=Ne.Q.Percent),ae.unified_setting||(ae.unified_late=!1,ae.unified_anonymous_comment=!1,ae.unified_anonymous_appeal=!1),X=JSON.parse(JSON.stringify(P.group_settings.map((function(e){return i()(i()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),te=JSON.parse(JSON.stringify(P.allow_late_settings.map((function(e){return i()(i()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),0===ae.difficult_settings.length&&(ae.difficult_settings=[0,0,0]),oe(i()({},ae)),$(X.length?O()(X):[{}]),(null===(e=te)||void 0===e?void 0:e.length)<=0?re([{late_minus_score:20}]):re(O()(te)))}),[P]);var le=function(e){var n;if(null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)f.ZP.warning("效率分不能为空");else{var t={shixun_evaluation:e.shixun_evaluation,challenge_settings:e.challenge_settings},r=function(){var n=c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return W(!0),n.next=3,(0,p.ZP)("/api/homework_commons/".concat(T.categoryId,"/publish_setting.json"),{method:"post",body:i()({},e)});case 3:0===n.sent.status&&(f.ZP.success("更新成功"),z(!0),ce(),L({type:"shixunHomeworks/getWorkList",payload:i()({},T)})),W(!1);case 6:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();(0,we.isEqual)(E,t)||null!=A&&null!==(n=A.homework_status)&&void 0!==n&&n.includes("未发布")?r():h.Z.confirm({title:"更新成绩",content:"您改动了本次作业的关卡得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:r})}else f.ZP.warning("总分值不能为空")},ue=function(e,n){var t,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"group_id";return n?n.find((function(n){return n[r]===e})):null==P||null===(t=P.group_settings)||void 0===t?void 0:t.find((function(n){return n.group_id[0]===e}))},de=((null==P?void 0:P.allow_late)||(null==P||P.anonymous_comment),function(e){var n,t,r=ue(e,null==P?void 0:P.allow_late_settings,"id"),i=ue(e,null==P?void 0:P.anonymous_comment_settings),s=ue(e);return(null==P?void 0:P.allow_late)&&r&&S()(null==r?void 0:r.late_time)<=S()()||(null==P?void 0:P.anonymous_comment)&&i&&null!==(null==i?void 0:i.evaluation_start)||null!=(null===(n=(S()(null==s?void 0:s.end_time)<=S()()&&(null==P||null===(t=P.allow_late_settings)||void 0===t?void 0:t.filter((function(n){return n.group_id.includes(e)}))))[0])||void 0===n?void 0:n.late_time)}),pe=null==P?void 0:P.anonymous_comment,me=function(e){if(!e)return!1;var n=ue(e,null==P?void 0:P.anonymous_comment_settings);return(null==P?void 0:P.anonymous_comment)&&n&&null!==(null==n?void 0:n.evaluation_start)};return(0,b.jsxs)("section",{className:ke,children:[(0,b.jsxs)(V.Z,{align:"middle",children:[(0,b.jsx)(F.Z,{flex:"1",children:(0,b.jsx)("div",{className:Ze,children:"试题发布"})}),(0,b.jsxs)(F.Z,{children:[(0,C.GJ)()&&R&&(0,b.jsx)(x.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){var e,n;!(0,C.Rm)()||null!==(e=M.AssistantObject.hack)&&void 0!==e&&e.can_late||null!==(n=M.AssistantObject.hack)&&void 0!==n&&n.can_publish?z(!1):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"编辑设置"}),!R&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.ZP,{type:"primary",loading:U,onClick:function(){return function(){var e,n=JSON.parse(JSON.stringify(ae));if(n.categoryId=T.categoryId,ae.unified_setting||(X=null===(e=X)||void 0===e?void 0:e.map((function(e){var n;if(!e.publish_time||!e.end_time)throw f.ZP.error("请把发布时间填写完整"),new String("请把发布时间填写完整");if(!e.group_name)throw f.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(n=P.group_settings)||void 0===n?void 0:n.filter((function(n){var t;return null==e||null===(t=e.group_name)||void 0===t?void 0:t.includes(n.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),n.group_settings=X,ae.allow_late)if(ae.unified_late){if(null===ae.late_minus_score||void 0===ae.late_minus_score||ae.late_minus_score<0||ae.late_minus_score>100)throw f.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!ae.late_time)throw f.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整")}else{var t;te=null===(t=te)||void 0===t?void 0:t.map((function(e){var n;if(null===e.late_minus_score||void 0===e.late_minus_score||e.late_minus_score<0||e.late_minus_score>100)throw f.ZP.error("迟交扣分填写区间为0~100"),new String("迟交扣分填写区间为0~100");if(!e.late_time)throw f.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw f.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=P.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.allow_late_settings=te}1===n.send_type&&(n.difficult_settings=n.difficult_settings.map((function(e){return e||0}))),le(n)}()},children:"提交"}),(0,b.jsx)(x.ZP,{type:"primary",ghost:!0,className:"ml20",onClick:function(){z(!0),ce()},children:"取消"})]})]})]}),(0,b.jsxs)("div",{className:"mt10",children:[(0,b.jsx)("label",{className:"mr20",children:"发布方式"})," ",(0,b.jsxs)(Q.ZP.Group,{disabled:R||!(null!=A&&null!==(n=A.homework_status)&&void 0!==n&&n.includes("未发布"))||!(null!==(t=M.AssistantObject.hack)&&void 0!==t&&t.can_publish)&&(0,C.Rm)(),value:ae.send_type,onChange:function(e){ae.send_type=e.target.value,oe(Object.assign({},ae))},children:[(0,b.jsx)(Q.ZP,{value:0,children:"全部固定试题"}),(0,b.jsx)(Q.ZP,{className:"ml20",value:1,children:"随机抽题"})]}),1===ae.send_type&&(0,b.jsxs)(V.Z,{className:"mt20",style:{marginLeft:94},children:[(0,b.jsxs)(F.Z,{children:["简单题数",(0,b.jsx)(J.Z,{precision:0,disabled:R||!(null!=A&&null!==(r=A.homework_status)&&void 0!==r&&r.includes("未发布")),placeholder:"最大".concat(ae.difficult_count[0]||0),min:0,max:ae.difficult_count[0]||0,value:ae.difficult_settings[0],onChange:function(e){ae.difficult_settings[0]=e,oe(Object.assign({},ae))},className:"ml10 mr20"})]}),(0,b.jsxs)(F.Z,{children:["适中题数",(0,b.jsx)(J.Z,{precision:0,disabled:R||!(null!=A&&null!==(s=A.homework_status)&&void 0!==s&&s.includes("未发布")),placeholder:"最大".concat(ae.difficult_count[1]||0),min:0,max:ae.difficult_count[1]||0,value:ae.difficult_settings[1],onChange:function(e){ae.difficult_settings[1]=e,oe(Object.assign({},ae))},className:"ml10 mr20"})]}),(0,b.jsxs)(F.Z,{children:["困难题数",(0,b.jsx)(J.Z,{precision:0,disabled:R||!(null!=A&&null!==(o=A.homework_status)&&void 0!==o&&o.includes("未发布")),placeholder:"最大".concat(ae.difficult_count[2]||0),min:0,max:ae.difficult_count[2]||0,value:ae.difficult_settings[2],onChange:function(e){ae.difficult_settings[2]=e,oe(Object.assign({},ae))},className:"ml10 mr20"})]})]})]}),(0,b.jsxs)("div",{className:"mt30",children:[(0,b.jsx)("h1",{className:"mb10",children:"发布设置"}),(0,b.jsx)("label",{className:"mr20",children:"发布方式"})," ",(0,b.jsxs)(Q.ZP.Group,{disabled:R||!(null!=A&&null!==(l=A.homework_status)&&void 0!==l&&l.includes("未发布"))||!(null!==(g=M.AssistantObject.hack)&&void 0!==g&&g.can_publish)&&(0,C.Rm)(),value:ae.unified_setting,onChange:function(e){var n;null!=A&&null!==(n=A.homework_status)&&void 0!==n&&n.includes("未发布")?(ae.unified_setting=!ae.unified_setting,ae.unified_setting||(ae.unified_late=!1),oe(Object.assign({},ae)),!1!==ae.unified_setting||""!=X?ae.unified_setting&&($([]),re([{late_minus_score:5}])):$(X.concat({}))):f.ZP.error("已发布,不能再修改统一设置")},children:[(0,b.jsx)(Q.ZP,{value:!0,disabled:!(null!=P&&P.manage_all_group),children:"统一发布"}),(0,b.jsx)(Q.ZP,{className:"ml20",disabled:0===(null==P||null===(v=P.group_settings)||void 0===v?void 0:v.length),value:!1,children:"分班发布"})]}),0===(null==P||null===(j=P.group_settings)||void 0===j?void 0:j.length)&&(0,b.jsx)("p",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"},children:"(本课堂无分班,仅支持选择“统一发布“)"})]}),ae.unified_setting&&(0,b.jsxs)("div",{style:{marginLeft:50},children:[(0,b.jsxs)(V.Z,{align:"middle",className:"mt25 pl30",children:[(0,b.jsx)(F.Z,{children:"发布时间"}),(0,b.jsx)(F.Z,{className:"ml10",children:(0,b.jsx)(ge.default,{style:{width:170},placeholder:"请选择发布时间",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:function(e){return(0,Se.Q8)(e,null==P?void 0:P.course_end_date)},disabledTime:function(e){return(0,Se.d0)(e)},disabled:R||S()()>=S()(null==P?void 0:P.publish_time)||!(null!==(y=M.AssistantObject.hack)&&void 0!==y&&y.can_publish)&&(0,C.Rm)(),value:ae.publish_time?S()(ae.publish_time):"",onChange:function(e,n){ae.publish_time=n,""!=ae.end_time&&ae.end_time||!ae.unified_setting||(ae.end_time=S()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),oe(Object.assign({},ae))}})}),(0,b.jsx)(F.Z,{children:(0,b.jsx)("span",{className:"c-grey-c ml10",children:"(学生收到作业的时间)"})})]}),(0,b.jsxs)(V.Z,{align:"middle",className:"mt25 pl30",children:[(0,b.jsx)(F.Z,{children:"截止时间"}),(0,b.jsx)(F.Z,{className:"ml10",children:(0,b.jsx)(ge.default,{style:{width:170},allowClear:!1,placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:S()((0,w.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:(null==P?void 0:P.allow_late)&&(null==P?void 0:P.homework_status.includes("已截止"))||R||(null==P?void 0:P.allow_late)&&S()()>=S()(null==P?void 0:P.end_time)||!(null!==(k=M.AssistantObject.hack)&&void 0!==k&&k.can_publish)&&(0,C.Rm)(),disabledDate:function(e){return(0,Se.Q8)(e,null==P?void 0:P.course_end_date,ae.publish_time)},disabledTime:function(e){return(0,Se.d0)(e,ae.publish_time)},value:ae.end_time?S()(ae.end_time):"",onChange:function(e,n){ae.end_time=n,oe(Object.assign({},ae))}})}),(0,b.jsx)(F.Z,{children:(0,b.jsx)("span",{className:"c-grey-c ml10",children:"(学生“按时”提交作品的时间截点)"})})]})]}),!ae.unified_setting&&(null===(Z=X)||void 0===Z?void 0:Z.length)>0&&(0,b.jsxs)(V.Z,{style:{marginTop:30,paddingTop:20,marginLeft:80,borderTop:"1px solid #eee"},children:[(0,b.jsx)(F.Z,{span:24,children:(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{span:10}),(0,b.jsx)(F.Z,{span:10,children:(0,b.jsxs)(V.Z,{className:"c-grey-c ml30",children:[(0,b.jsx)(F.Z,{flex:"1",children:"(学生收到作业时间)"}),(0,b.jsx)(F.Z,{flex:"1",children:"(学生“按时”提交作品时间截点)"})]})}),(0,b.jsx)(F.Z,{span:4})]})}),X&&X.map((function(e,n){var t,r,s,a;return console.log(null===(t=ue(e.id))||void 0===t?void 0:t.publish_time,"发布时间"),console.log(de(e.id),"截止时间"),(0,b.jsx)(F.Z,{span:24,children:(0,b.jsxs)(V.Z,{gutter:[8,16],children:[(0,b.jsx)(F.Z,{span:10,children:(0,b.jsxs)(V.Z,{gutter:[8,16],children:[(0,b.jsxs)(F.Z,{children:["发布规则 ",n+1]}),(0,b.jsx)(F.Z,{flex:"1",style:{maxWidth:300},children:(0,b.jsx)(_e.default,{disabled:R||!(null!=A&&null!==(r=A.homework_status)&&void 0!==r&&r.includes("未发布"))&&e.id,className:"ml20",mode:"multiple",style:{width:"100%"},value:e.group_name,placeholder:"请选择分班名称",onChange:function(t){var r;if(null!==(r=M.AssistantObject.hack)&&void 0!==r&&r.can_publish||!(0,C.Rm)()){X[n].group_name=t,X[n].group_id=e.group_id;var s=(0,we.flattenDeep)(X.map((function(e){return e.group_name}))),a=te.map((function(e){var n=(null==e?void 0:e.group_name)||[];return i()(i()({},e),{},{group_name:(0,we.remove)(n,(function(e){return s.includes(e)}))})}));re(a),$(X.slice())}else f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:P.group_settings&&P.group_settings.map((function(e){if(!X.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name)))return(0,b.jsx)(Me,{value:e.group_name,children:e.group_name},e.id)}))})})]})}),(0,b.jsx)(F.Z,{span:10,children:(0,b.jsx)("div",{className:"ml30",children:(0,b.jsx)(Ie,{allowClear:!1,ranges:{"此刻":[e.publish_time?S()(e.publish_time):S()(),S()()]},disabled:R||!(S()()<=S()(null===(s=ue(e.id))||void 0===s?void 0:s.publish_time))&&[!0,de(e.id)],style:{width:400},placeholder:["请选择发布时间","请选择截止时间"],disabledDate:function(e){return(0,Se.Q8)(e,null==P?void 0:P.course_end_date)},disabledTime:function(e){return(0,Se.d0)(e)},showTime:{format:"HH:mm",defaultValue:[S()((0,w.U6)(),"HH:mm"),S()((0,w.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.publish_time&&[S()(e.publish_time),e.end_time?S()(e.end_time):void 0],onChange:function(e,t){var r;null!==(r=M.AssistantObject.hack)&&void 0!==r&&r.can_publish||!(0,C.Rm)()?(X[n].publish_time=t[0],X[n].end_time=t[1],$(O()(X))):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})})}),!R&&(0,b.jsxs)(F.Z,{span:4,children:[n>0&&!e.id&&(0,b.jsx)(ve.Z,{onClick:function(){var e;if(null!==(e=M.AssistantObject.hack)&&void 0!==e&&e.can_publish||!(0,C.Rm)()){var t=(0,we.cloneDeep)(te);t.forEach((function(e,t){e.group_name&&(e.group_name=e.group_name.filter((function(e){var t;return!(null!==(t=X[n].group_name)&&void 0!==t&&t.includes(e))})))})),re(t),X=X.filter((function(e,t){return n!==t})),$(X.slice()),setTimeout((function(){return $(X.slice())}),10)}else f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}}),X.length<(null==P||null===(a=P.group_settings)||void 0===a?void 0:a.length)&&(0,b.jsx)(je.Z,{className:"c-green ml20",onClick:function(){$(X.concat({}))}})]})]})},n)}))]}),(0,b.jsxs)(V.Z,{className:"mt30",children:[(0,b.jsx)(F.Z,{children:(0,b.jsx)(V.Z,{align:"middle",children:(0,b.jsx)("h1",{style:{marginBottom:0},children:"补交设置"})})}),(0,b.jsxs)(F.Z,{span:24,className:"mt10",children:[(0,b.jsx)(Y.Z,{checked:ae.allow_late,disabled:R||(null==P?void 0:P.allow_late),onChange:function(e){var n;null!==(n=M.AssistantObject.hack)&&void 0!==n&&n.can_late||!(0,C.Rm)()?(e.target.checked&&h.Z.warning({title:"开启补交提示",width:480,centered:!0,content:(0,b.jsxs)("div",{style:{padding:10,background:"#f5f6f9"},children:[(0,b.jsx)("div",{children:"1.开启补交后不可关闭,补交方式提交保存后不可修改;"}),(0,b.jsx)("div",{children:"2.补交截止时间必须晚于作业截止时间;"}),(0,b.jsx)("div",{children:"3.班级阶段进入“补交中”则不可变更作业截止时间。"})]})}),ae.allow_late=!ae.allow_late,""==te&&re([{late_minus_score:5}]),oe(Object.assign({},ae))):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:(0,b.jsx)("span",{style:{fontSize:"14px"},children:"开启补交"})}),(0,b.jsx)(_.Z,{overlayStyle:{width:380,maxWidth:380},title:(0,b.jsxs)("div",{style:{display:"flex",flexFlow:"column"},children:[(0,b.jsx)("span",{children:"补交规则说明"}),(0,b.jsx)("span",{children:"开启补交,学生只在补交时间内才通关则扣除分值,未通关不扣分;"}),(0,b.jsx)("span",{children:"学生在正常作业规定时间内通关,在补交阶段再次通关不扣分。"})]}),children:(0,b.jsx)(ye.Z,{})})]})]}),(null==ae?void 0:ae.allow_late)&&(0,b.jsxs)("div",{style:{marginLeft:50},children:[(0,b.jsxs)("div",{className:"ml30 mt20",style:{marginLeft:50},children:[(0,b.jsx)("span",{children:"补交方式:"}),(0,b.jsxs)(Q.ZP.Group,{disabled:R||(null==P?void 0:P.anonymous_comment)||(null==P?void 0:P.allow_late),value:ae.unified_late,onChange:function(e){var n;!(0,C.Rm)()||null!==(n=M.AssistantObject.hack)&&void 0!==n&&n.can_late?(ae.unified_late=e.target.value,""!=te||e.target.value||re([{late_minus_score:5}]),oe(i()({},ae))):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:[(null==ae?void 0:ae.unified_setting)&&(0,b.jsx)(Q.ZP,{value:!0,disabled:!(null!=P&&P.manage_all_group),children:" 统一补交 "}),(null==P||null===(N=P.group_settings)||void 0===N?void 0:N.length)&&(0,b.jsx)(Q.ZP,{value:!1,children:" 分班补交 "})]})]}),null!=ae&&ae.unified_late?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)(V.Z,{align:"middle",className:"mt25 pl30",children:[(0,b.jsx)(F.Z,{children:"补交扣分:"}),(0,b.jsx)(F.Z,{className:"ml5",children:(0,b.jsx)(Ne.Z,{disabled:R||pe,value:{type:ae.penalty_type,inputValue:ae.late_minus_score},onChange:function(e){var n;!(0,C.Rm)()||null!==(n=M.AssistantObject.hack)&&void 0!==n&&n.can_late?oe(i()(i()({},ae),{},{late_minus_score:e.inputValue,penalty_type:e.type})):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}),(0,b.jsx)(F.Z,{flex:"1",className:"ml5",children:(0,b.jsx)("span",{className:"c-grey-c ml10",children:ae.penalty_type===Ne.Q.Number?"(补交时按照学生总成绩扣分)":"(学生成绩将扣除补交关卡分值的百分比)"})})]}),(0,b.jsxs)(V.Z,{align:"middle",className:"mt25 pl30",children:[(0,b.jsx)(F.Z,{children:"补交截止时间:"}),(0,b.jsx)(F.Z,{className:"ml5",children:(0,b.jsx)(ge.default,{allowClear:!1,style:{width:170},placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:S()((0,w.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:R||pe,value:ae.late_time?S()(ae.late_time):"",disabledDate:function(e){return(0,Se.Q8)(e,null==P?void 0:P.course_end_date)},disabledTime:function(e){return(0,Se.d0)(e)},onChange:function(e,n){var t;!(0,C.Rm)()||null!==(t=M.AssistantObject.hack)&&void 0!==t&&t.can_late?(ae.late_time=n,oe(Object.assign({},ae))):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})}),(0,b.jsx)(F.Z,{children:(0,b.jsx)("span",{className:"c-grey-c ml10",children:"(学生“延时”提交作品的时间截点)"})})]})]}):te.map((function(e,n){var t;return(0,b.jsx)(F.Z,{span:24,children:(0,b.jsxs)(V.Z,{className:"mt25",children:[(0,b.jsxs)(F.Z,{style:{marginLeft:30},children:[(0,b.jsxs)("span",{children:["补交规则",n+1,""]}),(0,b.jsx)(_e.default,{disabled:R||!(null!=A&&null!==(t=A.homework_status)&&void 0!==t&&t.includes("未发布"))&&e.id||(null==P?void 0:P.anonymous_comment),mode:"multiple",style:{width:306},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(t){var r;!(0,C.Rm)()||null!==(r=M.AssistantObject.hack)&&void 0!==r&&r.can_late?(te[n].group_name=t,te[n].group_id=e.group_id,re(te.slice())):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:P.group_settings&&P.group_settings.map((function(e){return null!=ae&&ae.unified_setting&&!te.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||X.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!te.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?(0,b.jsx)(Me,{value:e.group_name,children:e.group_name},e.id):void 0}))})]}),(0,b.jsxs)(F.Z,{className:"ml20",children:[(0,b.jsx)("span",{children:"补交扣分:"}),(0,b.jsx)(Ne.Z,{disabled:R||me(e.id),value:{type:e.penalty_type,inputValue:e.late_minus_score},onChange:function(e){var t;!(0,C.Rm)()||null!==(t=M.AssistantObject.hack)&&void 0!==t&&t.can_late?(te[n].late_minus_score=e.inputValue,te[n].penalty_type=e.type,re(O()(te))):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})]}),(0,b.jsxs)(F.Z,{className:"ml20",children:[(0,b.jsx)("span",{children:"补交截止时间:"}),(0,b.jsx)(ge.default,{disabled:R||me(e.id),style:{width:200},showTime:{format:"HH:mm",defaultValue:S()((0,w.U6)(),"HH:mm")},placeholder:"请选择截止时间",disabledDate:function(e){return(0,Se.Q8)(e,null==P?void 0:P.course_end_date)},disabledTime:function(e){return(0,Se.d0)(e)},format:"YYYY-MM-DD HH:mm",value:null!=e&&e.late_time?S()(e.late_time):void 0,onChange:function(e,t){var r;!(0,C.Rm)()||null!==(r=M.AssistantObject.hack)&&void 0!==r&&r.can_late?(te[n].late_time=t,re(O()(te))):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})]}),!R&&(0,b.jsxs)(F.Z,{className:"ml20",children:[n>0&&!e.id&&(0,b.jsx)(ve.Z,{onClick:function(){te=te.filter((function(e,t){return n!==t})),re(te.slice()),setTimeout((function(){return re(te.slice())}),10)}}),(0,b.jsx)(je.Z,{className:"c-green ml20",onClick:function(){var e;!(0,C.Rm)()||null!==(e=M.AssistantObject.hack)&&void 0!==e&&e.can_late?re(te.concat({penalty_type:Ne.Q.Percent,late_minus_score:20})):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")}})]})]})},n)}))]})]})}));function Ce(e,n){for(var t=[],r=e;r<n;r++)t.push(r);return t}var Te=function(e){var n=new Date,t=S()(e).format("HH");if(S()(e).isSame(S()(n),"day")){var r=S()(n).format("HH"),i=S()(n).format("mm");return{disabledHours:function(){return Ce(0,24).splice(1,1*r-1)},disabledMinutes:function(){return console.log("禁止时间:",t,r),S()(e).isSame(S()(n),"hour")&&t<=r?Ce(0,60).splice(0,i):Ce(60,60)}}}if(S()(e).isSame(S()(),"day")){var s=S()().format("HH"),a=S()().format("mm");return{disabledHours:function(){return Ce(0,24).splice(0,s)},disabledMinutes:function(){return t<=s?Ce(0,a):Ce(60,60)}}}},Pe=ge.default.RangePicker,Ae=_e.default.Option,Ee=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var n,t=e.shixunHomeworks,r=(e.loading,e.dispatch),s=(0,m.useParams)(),o=((0,m.useLocation)(),t.workSetting),l=t.workList,g=(t.changeData,(0,d.useState)(!0)),_=u()(g,2),v=_[0],y=_[1],k=(0,d.useState)({}),Z=u()(k,2),N=(Z[0],Z[1],(0,d.useState)(!1)),I=u()(N,2),M=I[0],L=I[1],C=R.Z.useForm(),T=(u()(C,1)[0],(0,d.useState)([])),P=u()(T,2),A=P[0],E=P[1],D=(0,d.useState)([]),H=u()(D,2),z=H[0],q=H[1],J=(0,d.useState)(!1),U=u()(J,2),W=U[0],G=U[1],K=(0,d.useState)([]),X=u()(K,2),$=(X[0],X[1]),ee=(0,d.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,open_code:!1,rank_forbidden:!1,open_code_type:void 0,comment_public:!0,total_score:"",eff_score:0,rank_forbidden_start:"",rank_forbidden_end:""}),ne=u()(ee,2),te=ne[0],re=ne[1];(0,d.useEffect)((function(){return ie(),function(){E([].concat())}}),[]);var ie=function(){r({type:"shixunHomeworks/getWorkSetting",payload:i()({},s)})},se=function(e){return e&&e<S()().startOf("day")};(0,d.useEffect)((function(){var e;null!=o&&o.course_id&&(Object.keys(te).map((function(e){te[e]=o[e]})),te.allow_late&&te.unified_late||(te.late_penalty=5),A=JSON.parse(JSON.stringify(o.group_settings.map((function(e){return i()(i()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),z=JSON.parse(JSON.stringify(o.allow_late_settings.map((function(e){return i()(i()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.rank_forbidden_start})))),re(i()({},te)),E(O()(A)),(null===(e=z)||void 0===e?void 0:e.length)<=0?q([{}]):q(O()(z)))}),[o]),console.log(te,"data");var ae=function(e){if(console.log(e.total_score,e.eff_score),null!==e.total_score)if(null!=e&&e.work_efficiency&&null===e.eff_score)f.ZP.warning("效率分不能为空");else{e.shixun_evaluation;var n=function(){var n=c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return L(!0),n.next=3,(0,p.ZP)("/api/homework_commons/".concat(s.categoryId,"/public_setting.json"),{method:"post",body:i()({},e)});case 3:0===n.sent.status&&(f.ZP.success("更新成功"),y(!0),ie(),r({type:"shixunHomeworks/getWorkList",payload:i()({},s)})),L(!1);case 6:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();n()}else f.ZP.warning("总分值不能为空")};return(0,b.jsxs)("section",{className:ke,children:[(0,b.jsxs)(V.Z,{align:"middle",children:[(0,b.jsx)(F.Z,{flex:"1",children:(0,b.jsx)("div",{className:Ze,children:"公开设置"})}),(0,b.jsxs)(F.Z,{children:[(null==o?void 0:o.can_edit)&&v&&(0,b.jsx)(x.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){return y(!1)},children:"编辑设置"}),!v&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.ZP,{type:"primary",loading:M,onClick:function(){return function(){var e,n=JSON.parse(JSON.stringify(te));if(n.categoryId=s.categoryId,te.unified_setting||(A=null===(e=A)||void 0===e?void 0:e.map((function(e){var n;if(!e.publish_time||!e.end_time)throw f.ZP.error("请把开始时间填写完整"),new String("请把开始时间填写完整");if(!e.group_name)throw f.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null===(n=o.group_settings)||void 0===n?void 0:n.filter((function(n){var t;return null==e||null===(t=e.group_name)||void 0===t?void 0:t.includes(n.group_name)})).map((function(e){return e.group_id||e.id})).toString().split(","),e}))),n.group_settings=A,te.rank_forbidden)if(te.unified_setting){if(!te.rank_forbidden_start)throw f.ZP.error("请把开始时间填写完整"),new String("请把开始时间填写完整");if(!te.rank_forbidden_end)throw f.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(S()(te.rank_forbidden_end)<S()(te.rank_forbidden_start))throw f.ZP.error("截止时间不能早于开始时间"),new String("截止时间不能早于开始时间")}else{var t;z=null===(t=z)||void 0===t?void 0:t.map((function(e){var n;if(!e.rank_forbidden_start)throw f.ZP.error("请把开始时间填写完整"),new String("请把开始时间填写完整");if(!e.rank_forbidden_end)throw f.ZP.error("请把截止时间填写完整"),new String("请把截止时间填写完整");if(!e.group_name)throw f.ZP.error("请选择分班名称"),new String("请选择分班名称");return e.group_name="string"==typeof(null==e?void 0:e.group_name)?[null==e?void 0:e.group_name]:null==e?void 0:e.group_name,e.group_id=null==e||null===(n=e.group_name)||void 0===n||null===(n=n.map((function(e){var n,t=null===(n=o.group_settings)||void 0===n||null===(n=n.filter((function(n){return(null==n?void 0:n.group_name)===e})))||void 0===n?void 0:n[0];return null==t?void 0:t.group_id})))||void 0===n?void 0:n.toString().split(","),e})),n.group_settingss=z}ae(n)}()},children:"提交"}),(0,b.jsx)(x.ZP,{type:"primary",ghost:!0,className:"ml20",onClick:function(){y(!0),ie()},children:"取消"})]})]})]}),(0,b.jsxs)(V.Z,{children:[(0,b.jsxs)(F.Z,{span:24,className:"mt15 mt20",children:[(0,b.jsx)(Y.Z,{checked:te.score_open,disabled:v,onChange:function(e){te.score_open=e.target.checked,re(Object.assign({},te))},children:(0,b.jsx)("span",{className:"font14",children:"公开成绩"})}),(0,b.jsx)("span",{className:"c-grey-c font12",children:"(选中,则在作业截止/补交结束时间之后,已提交作品的学生可以查看其它学生的成绩,否则只能查看自己的成绩)"})]}),(0,b.jsxs)(F.Z,{span:24,className:"mt15",children:[(0,b.jsx)(Y.Z,{checked:te.open_code,disabled:v,onChange:function(e){te.open_code=e.target.checked,re(Object.assign({},te))},children:(0,b.jsx)("span",{className:"font14",children:"公开代码"})}),(0,b.jsx)("span",{className:"c-grey-c font12",children:"(选中,学生可以查看其他学生的代码详情)"})]}),!!te.open_code&&(0,b.jsx)(F.Z,{span:24,className:"mt10 ml25",children:(0,b.jsxs)(Q.ZP.Group,{disabled:v,value:te.open_code_type,onChange:function(e){te.open_code_type=e.target.value,re(Object.assign({},te))},children:[(0,b.jsx)(Q.ZP,{value:0,children:"任意时间查看"}),(0,b.jsx)(Q.ZP,{style:{marginLeft:60},value:1,children:"练习时间结束后"})]})}),(0,b.jsxs)(F.Z,{span:24,className:"mt15 mt20",children:[(0,b.jsx)(Y.Z,{checked:te.rank_forbidden,disabled:v,onChange:function(e){te.rank_forbidden=e.target.checked,re(Object.assign({},te))},children:(0,b.jsx)("span",{className:"font14",children:"开启封榜"})}),(0,b.jsx)("span",{className:"c-grey-c font12",children:"(选中则在设置的这段时间内,学生看不到排行榜信息,其他时间可以查看)"})]}),!!te.rank_forbidden&&te.unified_setting&&(0,b.jsx)(F.Z,{span:24,className:"mt10 ",children:(0,b.jsxs)("div",{style:{marginLeft:50},children:[(0,b.jsxs)(V.Z,{align:"middle",className:"mt25 ",children:[(0,b.jsx)(F.Z,{children:"开始时间"}),(0,b.jsx)(F.Z,{className:"ml10",children:(0,b.jsx)(ge.default,{style:{width:170},placeholder:"请选择开始时间",showTime:{format:"HH:mm"},allowClear:!1,format:"YYYY-MM-DD HH:mm",disabledDate:se,disabledTime:Te,disabled:v||S()()>S()(o.rank_forbidden_start),value:te.rank_forbidden_start?S()(te.rank_forbidden_start):"",onChange:function(e,n){te.rank_forbidden_start=n,""!=te.end_time&&te.end_time||!te.unified_setting||(te.end_time=S()(e).add(1,"month").format("YYYY-MM-DD HH:mm:ss")),re(Object.assign({},te))}})}),(0,b.jsx)(F.Z,{children:(0,b.jsx)("span",{className:"c-grey-c ml10",children:"(学生看不到排行榜的开始时间)"})})]}),(0,b.jsxs)(V.Z,{align:"middle",className:"mt25",children:[(0,b.jsx)(F.Z,{children:"截止时间"}),(0,b.jsx)(F.Z,{className:"ml10",children:(0,b.jsx)(ge.default,{style:{width:170},allowClear:!1,placeholder:"请选择截止时间",showTime:{format:"HH:mm",defaultValue:S()((0,w.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",disabled:v,disabledDate:se,value:te.rank_forbidden_end?S()(te.rank_forbidden_end):"",onChange:function(e,n){te.rank_forbidden_end=n,re(Object.assign({},te))}})}),(0,b.jsx)(F.Z,{children:(0,b.jsx)("span",{className:"c-grey-c ml10",children:"(学生看不到排行榜的结束时间)"})})]})]})}),!te.unified_setting&&(null===(n=A)||void 0===n?void 0:n.length)>0&&!!te.rank_forbidden&&(0,b.jsxs)(V.Z,{style:{marginTop:30,paddingTop:20,marginLeft:80,borderTop:"1px solid #eee"},children:[(0,b.jsx)(F.Z,{span:24,children:(0,b.jsxs)(V.Z,{children:[(0,b.jsx)(F.Z,{span:10}),(0,b.jsx)(F.Z,{span:10,children:(0,b.jsxs)(V.Z,{className:"c-grey-c ml30",children:[(0,b.jsx)(F.Z,{flex:"1",children:"(学生看不到排行榜的开始时间)"}),(0,b.jsx)(F.Z,{flex:"1",children:"(学生看不到排行榜的结束时间)"})]})}),(0,b.jsx)(F.Z,{span:4})]})}),z.map((function(e,n){var t,r,i;return(0,b.jsx)(F.Z,{span:24,children:(0,b.jsxs)(V.Z,{className:"mt25",children:[(0,b.jsxs)(F.Z,{style:{marginLeft:30},children:[(0,b.jsxs)("span",{children:["封榜规则",n+1,""]}),(0,b.jsx)(_e.default,{disabled:v||!(null!=l&&null!==(t=l.homework_status)&&void 0!==t&&t.includes("未发布"))&&e.id,mode:"multiple",style:{width:306},value:"string"==typeof e.group_name?[e.group_name]:e.group_name,placeholder:"请选择分班名称",onChange:function(t){z[n].group_name=t,z[n].group_id=e.group_id,q(z.slice())},children:o.group_settings&&o.group_settings.map((function(e){return null!=te&&te.unified_setting&&!z.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))||A.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))&&!z.map((function(e){return e.group_name})).toString().split(",").includes(String(e.group_name))?(0,b.jsx)(Ae,{value:e.group_name,children:e.group_name},e.id):void 0}))})]}),(0,b.jsx)(F.Z,{span:10,children:(0,b.jsx)("div",{className:"ml30",children:(0,b.jsx)(Pe,{allowClear:!1,disabled:v||!(null==o||null===(r=o.group_settings)||void 0===r||null===(r=r.filter((function(n){return n.id===e.id})))||void 0===r||null===(r=r[0])||void 0===r||!r.rank_forbidden_start)&&(!(S()()<S()(null==o||null===(i=o.group_settings)||void 0===i||null===(i=i.filter((function(n){return n.id===e.id})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.rank_forbidden_start))&&[!0,!1]),style:{width:400},placeholder:["请选择开始时间","请选择结束时间"],disabledDate:se,disabledTime:Te,showTime:{format:"HH:mm",defaultValue:[S()((0,w.U6)(),"HH:mm"),S()((0,w.U6)(),"HH:mm")]},format:"YYYY-MM-DD HH:mm",value:e.rank_forbidden_start&&[S()(e.rank_forbidden_start),e.rank_forbidden_end?S()(e.rank_forbidden_end):void 0],onChange:function(e,t){z[n].rank_forbidden_start=t[0],z[n].rank_forbidden_end=t[1],q(O()(z))}})})}),!v&&(0,b.jsxs)(F.Z,{className:"ml20",children:[n>0&&!e.id&&(0,b.jsx)(ve.Z,{onClick:function(){z=z.filter((function(e,t){return n!==t})),q(z.slice()),setTimeout((function(){return q(z.slice())}),10)}}),(0,b.jsx)(je.Z,{className:"c-green ml20",onClick:function(){q(z.concat({}))}})]})]})},n)}))]})]}),(0,b.jsx)(h.Z,{title:"添加协作者",open:W,onCancel:function(){return G(!1)},children:(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex"},children:[(0,b.jsx)("label",{style:{width:"50px"},children:"姓名:"})," ",(0,b.jsx)(B.Z.Search,{onChange:function(e){}})]}),(0,b.jsx)(j.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,n){$(e)}},pagination:!1,dataSource:[{name:"1"}],columns:[{title:"班级",dataIndex:"name",key:"name"},{title:"发布时间",dataIndex:"publish_time",key:"publish_time"},{title:"截止时间",dataIndex:"end_time",key:"end_time"}]})]})})]})})),Oe=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){var n,t=e.shixunHomeworks,r=(e.loading,e.dispatch),s=(0,m.useParams)(),o=t.workSetting,l=t.workList,g=(t.changeData,(0,d.useState)(!0)),_=u()(g,2),v=_[0],j=_[1],y=(0,d.useState)(!1),w=u()(y,2),k=w[0],Z=w[1],N=(0,d.useState)(!1),S=u()(N,2),I=(S[0],S[1],R.Z.useForm()),M=(u()(I,1)[0],(0,d.useState)([])),L=u()(M,2),C=L[0],T=L[1],P=(0,d.useState)([]),A=u()(P,2),E=A[0],D=A[1],H=!(null!=l&&null!==(n=l.homework_status)&&void 0!==n&&n.includes("未发布")),z=(0,d.useState)({unified_setting:!1,publish_time:"",end_time:"",allow_late:!1,unified_late:!0,late_time:"",late_penalty:0,challenge_settings:[],work_efficiency:!1,shixun_evaluation:"",answer_open_evaluation:!1,answer_public:!1,score_open:!1,comment_public:!0,total_score:"",eff_score:0,is_onpage_time:!0,training_time_rules:1,hack_settings:[],punish_time:void 0,hack_score_settings:void 0}),Y=u()(z,2),B=Y[0],q=Y[1];(0,d.useEffect)((function(){return U(),function(){T([].concat())}}),[]);var U=function(){r({type:"shixunHomeworks/getWorkSetting",payload:i()({},s)})};(0,d.useEffect)((function(){null!=o&&o.course_id&&(Object.keys(B).map((function(e){B[e]=o[e]})),B.allow_late&&B.unified_late||(B.late_penalty=5),C=JSON.parse(JSON.stringify(o.group_settings.map((function(e){return i()(i()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.publish_time})))),E=JSON.parse(JSON.stringify(o.allow_late_settings.map((function(e){return i()(i()({},e),{},{group_name:[e.group_name]})})).filter((function(e){return null!==e.late_time})))),G(),q(i()({},B)),T(O()(C)),D(O()(E)))}),[o]);var W=function(e){if(console.log(e.total_score,e.eff_score),null!==e.total_score){var n=function(){var n=c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return Z(!0),n.next=3,(0,p.ZP)("/api/homework_commons/".concat(s.categoryId,"/hack_score_setting.json"),{method:"post",body:i()({},e)});case 3:0===n.sent.status&&(f.ZP.success("更新成功"),j(!0),U(),r({type:"shixunHomeworks/getWorkList",payload:i()({},s)})),Z(!1);case 6:case"end":return n.stop()}}),n)})));return function(){return n.apply(this,arguments)}}();(null==B?void 0:B.hack_score_settings)!==(null==o?void 0:o.hack_score_settings)&&H?h.Z.confirm({title:"更新成绩",content:"您改动了本次作业的得分设置,这可能导致已完成作业的学生的成绩产生错误。点击“确定”按钮将保存最新设置并按最新设置更新全班成绩。",okText:"确认",cancelText:"取消",onOk:n}):n()}else f.ZP.warning("总分值不能为空")},G=function(){var e,n,t=B.total_score,r=null===(e=B.hack_settings)||void 0===e?void 0:e.length,i=0;switch(B.hack_score_settings){case 0:var s=(t/r).toFixed(2);B.hack_settings.map((function(e,n){i=n,e.hack_score=s>0?s:0})),n=(t-s*(r-1)).toFixed(2),B.hack_settings[i].hack_score=n>0?n:0;break;case 1:var a=[0,1,3,6],o=0,c=t/(B.hack_settings.filter((function(e){return 1===e.difficult})).length*a[1]+B.hack_settings.filter((function(e){return 2===e.difficult})).length*a[2]+B.hack_settings.filter((function(e){return 3===e.difficult})).length*a[3]);console.log(c,2222),B.hack_settings.map((function(e,n){i=n,e.hack_score=(a[e.difficult]*c).toFixed(2),o+=Number(e.hack_score)}));var l=B.hack_settings[i].hack_score;n=(t-o+Number(l)).toFixed(2),B.hack_settings[i].hack_score=n>0?n:0}};return(0,b.jsxs)("section",{className:ke,children:[(0,b.jsxs)(V.Z,{align:"middle",children:[(0,b.jsx)(F.Z,{flex:"1"}),(0,b.jsxs)(F.Z,{children:[(null==o?void 0:o.can_edit)&&v&&(0,b.jsx)(x.ZP,{type:"primary",size:"middle",ghost:!0,onClick:function(){return j(!1)},children:"编辑设置"}),!v&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(x.ZP,{type:"primary",loading:k,onClick:function(){return e=JSON.parse(JSON.stringify(B)),void W(e);var e},children:"提交"}),(0,b.jsx)(x.ZP,{type:"primary",ghost:!0,className:"ml20",onClick:function(){j(!0),U()},children:"取消"})]})]})]}),(0,b.jsxs)(V.Z,{align:"middle",children:[(0,b.jsxs)(F.Z,{children:[(0,b.jsx)("span",{children:"总分值"}),(0,b.jsx)(J.Z,{min:0,className:"ml10 mr10",style:{width:160},value:B.total_score,disabled:v||H,onChange:function(e){B.total_score=e,q(Object.assign({},B)),G()}})," 分"]}),(0,b.jsxs)(F.Z,{style:{marginLeft:100},children:[(0,b.jsx)("span",{children:"测评单次报错增加时长"}),(0,b.jsx)(J.Z,{className:"ml10 mr10",style:{width:160},min:0,value:B.punish_time,precision:0,disabled:v,onChange:function(e){B.punish_time=e,q(Object.assign({},B)),G()}})," 分钟"]})]}),(0,b.jsxs)(V.Z,{align:"middle",style:{marginTop:20},children:[(0,b.jsx)(F.Z,{children:(0,b.jsx)("span",{children:"试题分值设置规则"})}),(0,b.jsx)(F.Z,{flex:"1",children:(0,b.jsx)(R.Z.Item,{className:"ml20",children:(0,b.jsxs)(Q.ZP.Group,{disabled:v||H,value:B.hack_score_settings,onChange:function(e){B.hack_score_settings=e.target.value,q(Object.assign({},B)),G()},children:[(0,b.jsx)(Q.ZP,{value:0,children:"均分比例"}),(0,b.jsx)(Q.ZP,{className:"ml20 mr20",value:1,children:"难易度"}),(0,b.jsx)(Q.ZP,{value:2,children:"自定义分值"})]})})})]}),(0,b.jsx)("div",{className:be,children:B.hack_settings&&B.hack_settings.map((function(e,n){return(0,b.jsxs)(V.Z,{align:"middle",style:{marginTop:20},children:[(0,b.jsx)(F.Z,{flex:"1",className:"pr10",children:(0,b.jsx)("strong",{children:e.hack_name})}),(0,b.jsxs)(F.Z,{flex:"150px",children:[(0,b.jsx)(J.Z,{min:0,step:.1,value:e.hack_score,disabled:v||2!==B.hack_score_settings||H,onChange:function(e){B.hack_settings[n].hack_score=e;var t=B.hack_settings.reduce((function(e,n){return e+Number(n.hack_score)}),0);B.total_score=t.toFixed(2),q(i()({},B))}}),(0,b.jsx)("span",{className:"ml10",children:"分"})]}),(0,b.jsxs)(F.Z,{style:{lineHeight:"20px"},children:[1===e.difficult&&(0,b.jsx)("span",{className:"tag-style-border-small bg-green c-white mr10",children:"简单"}),2===e.difficult&&(0,b.jsx)("span",{className:"tag-style-border-small bg-blue c-white mr10",children:"适中"}),3===e.difficult&&(0,b.jsx)("span",{className:"tag-style-border-small bg-orange c-white mr10",children:"困难"})]})]},n)}))}),(0,b.jsx)("div",{style:{height:100}})]})})),De=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading.effects}}))((function(e){e.shixunHomeworks,e.loading,e.dispatch;var n,t,r=(0,d.useState)(!0),i=u()(r,2),s=i[0],o=i[1],l=(0,d.useState)(!1),g=u()(l,2),_=g[0],v=g[1],y=(0,d.useState)([]),w=u()(y,2),k=w[0],Z=w[1],N=(0,d.useState)([]),S=u()(N,2),I=S[0],M=S[1],L=(0,d.useState)([]),C=u()(L,2),P=C[0],A=C[1],E=(0,d.useState)([]),O=u()(E,2),D=O[0],H=O[1],R=(0,m.useParams)();function z(){return Y.apply(this,arguments)}function Y(){return(Y=c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/homework_commons/".concat(R.categoryId,"/homework_common_collaborators.json"),{method:"get"});case 2:n=e.sent,M(n);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function q(){return Q.apply(this,arguments)}function Q(){return(Q=c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/courses/".concat(null==R?void 0:R.coursesId,"/teachers"),{method:"get",params:{homework_id:R.categoryId}});case 2:null==(n=e.sent)||n.teacher_list.map((function(e){e.key=e.user_id})),A(null==n?void 0:n.teacher_list),H(null==n?void 0:n.teacher_list);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,d.useEffect)((function(){z(),q()}),[R]);return(0,b.jsxs)("section",{className:ke,children:[(0,b.jsx)(V.Z,{children:(0,b.jsxs)(F.Z,{flex:"1",children:[(0,b.jsx)("span",{style:{fontSize:"16px"},children:"协作设置"}),(null==I?void 0:I.can_edit)&&(0,b.jsx)("span",{style:{cursor:"pointer",color:"#0152d9",marginLeft:"10px"},onClick:function(){v(!0)},children:"+添加协作者"})]})}),(0,b.jsxs)(V.Z,{style:{marginTop:"20px",marginBottom:"20px"},children:[(null==I||null===(n=I.data)||void 0===n?void 0:n.length)<=0&&(0,b.jsx)(T.Z,{customText:"该作业暂无协作者"}),null==I||null===(t=I.data)||void 0===t?void 0:t.map((function(e){return(0,b.jsxs)("span",{style:{display:"inline-flex",height:"40px",borderRadius:"4px",border:"1px solid #44D7B6",padding:"7px 20px",color:"#44D7B6",marginRight:"40px"},children:[(0,b.jsx)("span",{style:{flex:"1"},children:null==e?void 0:e.real_name}),(null==I?void 0:I.can_edit)&&(0,b.jsx)("span",{style:{cursor:"pointer",marginLeft:"10px"},onClick:c()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,p.ZP)("/api/homework_commons/".concat(R.categoryId,"/homework_common_collaborators/delete.json"),{method:"delete",body:{user_id:e.id}});case 2:0===n.sent.status&&(f.ZP.info("删除成功"),z(),q());case 4:case"end":return n.stop()}}),n)}))),children:"X"})]})}))]}),(0,b.jsx)(V.Z,{children:!s&&(0,b.jsxs)(F.Z,{className:"mb50",children:[(0,b.jsx)(x.ZP,{type:"primary",size:"middle",onClick:function(){},children:"提交"}),(0,b.jsx)(x.ZP,{type:"primary",size:"middle",ghost:!0,className:"ml20",onClick:function(){o(!0)},children:"取消"})]})}),(0,b.jsx)(h.Z,{title:"添加协作者",open:_,onCancel:function(){return v(!1)},onOk:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==k.length){e.next=3;break}return f.ZP.info("请选择协作老师"),e.abrupt("return");case 3:return e.next=5,(0,p.ZP)("/api/homework_commons/".concat(R.categoryId,"/homework_common_collaborators.json"),{method:"post",body:{user_ids:k}});case 5:0===e.sent.status&&(f.ZP.info("添加成功"),Z([]),z(),q(),v(!1));case 7:case"end":return e.stop()}}),e)}))),children:(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{style:{display:"flex"},children:[(0,b.jsx)("label",{style:{width:"50px"},children:"姓名:"})," ",(0,b.jsx)(B.Z.Search,{onChange:function(e){A(D.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}})]}),(0,b.jsx)(j.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},rowSelection:{type:"checkbox",onChange:function(e,n){Z(e)},selectedRowKeys:k,getCheckboxProps:function(e){return{disabled:e.is_collaborator}}},pagination:!1,dataSource:P,columns:[{title:"姓名",dataIndex:"name",key:"name"},{title:"角色",dataIndex:"role",key:"role"}]})]})})]})})),He=function(){return(0,b.jsx)("section",{className:"bg-white pl30 pr30 pt10 mb10",children:(0,b.jsxs)(v.Z,{destroyInactiveTabPane:!0,children:[(0,b.jsx)(v.Z.TabPane,{tab:"发布设置",children:(0,b.jsx)(Le,{})},1),(0,b.jsx)(v.Z.TabPane,{tab:"评分设置",children:(0,b.jsx)(Oe,{})},2),(0,b.jsx)(v.Z.TabPane,{tab:"公开设置",children:(0,b.jsx)(Ee,{})},3),(0,b.jsx)(v.Z.TabPane,{tab:"协作设置",children:(0,b.jsx)(De,{})},4)]})})},Re=t(26724),ze=t.n(Re),Ye=(0,m.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,loading:e.loading}}))((function(e){var n=e.shixunHomeworks,t=e.loading,r=e.dispatch,s=(0,m.useParams)(),o=((0,m.useLocation)(),(0,d.useState)([])),l=u()(o,2),x=l[0],g=l[1],_=(0,d.useState)([]),v=u()(_,2),y=(v[0],v[1],(0,d.useState)(!0)),w=u()(y,2),k=w[0],Z=w[1],N=(0,d.useState)(!1),I=u()(N,2),M=I[0],L=I[1],C=(0,d.useState)(1),T=u()(C,2),P=T[0],A=T[1],E=(0,d.useState)([]),D=u()(E,2),z=(D[0],D[1]),B=(0,d.useState)(!1),q=u()(B,2),Q=q[0],J=q[1],U=(0,d.useState)(!1),W=u()(U,2),G=W[0],K=W[1];(0,d.useEffect)((function(){"代码查重"===n.actionTabs.key?($.resetFields(),g([]),J(!0),ee()):J(!1)}),[n.actionTabs.key]);var X=R.Z.useForm(),$=u()(X,1)[0],ee=function(){var e=c()(a()().mark((function e(){var n,t,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!k||M){e.next=11;break}return L(!0),A(P+1),e.next=5,(0,ie.JG)(i()(i()({},s),{},{page:P}));case 5:t=e.sent,r=O()(t.group_list),null!=t&&t.ungroup_list&&r.push({id:null==t?void 0:t.ungroup_list.id,name:null==t?void 0:t.ungroup_list.name,works_count:null==t?void 0:t.ungroup_list.work_count,last_review_time:null==t?void 0:t.ungroup_list.last_review_time}),g([].concat(O()(x),O()(r))),L(!1),(null===(n=t.group_list)||void 0===n?void 0:n.length)<10&&Z(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ne=function(){r({type:"shixunHomeworks/setActionTabs",payload:{}}),K(!1),Z(!0),L(!1),A(1),g([]),$.resetFields()},te=[{title:"",dataIndex:"id",width:280,render:function(e,n){return(0,b.jsx)(Y.Z,{disabled:!(n.works_count>1),value:String(n.id),children:n.name})}},{title:"有效作品数",dataIndex:"works_count"},{title:"上次查重时间",dataIndex:"last_review_time",width:130}];return(0,b.jsxs)(h.Z,{centered:!0,title:"代码查重",keyboard:!1,maskClosable:!1,open:Q,okText:"确认",cancelText:"取消",width:820,bodyStyle:{minHeight:200},onOk:c()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=$.getFieldValue(),e.next=3,(0,p.ZP)("/api/homework_commons/".concat(s.categoryId,"/hack_homework_code_repeat.json"),{method:"post",body:{group_ids:O()(t.group_ids)}});case 3:if(0!==e.sent.status){e.next=11;break}return ne(),f.ZP.success("操作成功"),e.next=9,r({type:"shixunHomeworks/getWorkList",payload:n.actionTabs.params});case 9:m.history.push("/classrooms/".concat(s.coursesId,"/program_homework/").concat(s.categoryId,"/detail?tabs=2")),r({type:"shixunHomeworks/setActionTabs",payload:{key:"执行代码查重"}});case 11:case"end":return e.stop()}}),e)}))),onCancel:ne,children:[n.codeReviewCourse&&(0,b.jsxs)(R.Z,{form:$,onChange:function(e){z(i()({},$.getFieldValue()))},initialValues:H()(H()({},"group_ids",[]),"end_time",S()(S()().add(7,"days").format("YYYY-MM-DD HH:mm"))),children:[(0,b.jsx)("div",{className:"flexd-table-header mt20",children:(0,b.jsx)(j.Z,{pagination:!1,dataSource:[],columns:te})}),(0,b.jsx)(R.Z.Item,{name:"group_ids",children:(0,b.jsx)(Y.Z.Group,{className:"w100",children:(0,b.jsx)("div",{style:{width:"100%",maxHeight:260,overflow:"auto"},children:(0,b.jsx)(ze(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){ee()},hasMore:k,useWindow:!1,children:(0,b.jsx)(j.Z,{loading:t.effects["shixunHomeworks/getCodeReviewCourse"],showHeader:!1,columns:te,dataSource:x,pagination:!1})})})})})]}),(0,b.jsx)(V.Z,{children:(0,b.jsx)(F.Z,{className:"ml10",children:(0,b.jsx)(Y.Z,{checked:G,onChange:function(e){K(e.target.checked);var n=[];e.target.checked&&(n=x.filter((function(e){return e.works_count>1})).map((function(e){return e.id+""}))),$.setFieldsValue(H()({},"group_ids",n))},children:"全选"})})})]})})),Ve=t(17368),Fe=t(691),Be=t(79677),qe=t(18240),Qe=t(23337),Je=t(67390),Ue=t(973),We=t(2034),Ge=t(86498),Ke=t(22428),Xe=[Ue.Z,We.Z,Ge.Z],$e=(0,m.connect)((function(e){return{user:e.user,classroomList:e.classroomList}}))((function(e){var n,t,r=e.user,s=e.classroomList,o=(0,d.useState)(i()(i()({},(0,m.useParams)()),{},{page:1,per_page:10,rank_type:2,course_group:(0,C.dE)()?[r.userInfo.course.course_group_id]:[]},(0,m.useParams)())),l=u()(o,2),g=l[0],v=l[1],y=(0,d.useState)([]),w=u()(y,2),k=w[0],Z=w[1],N=(0,d.useState)([]),S=u()(N,2),L=S[0],P=S[1],A=(0,d.useState)([]),E=u()(A,2),D=E[0],H=E[1],R=(0,d.useState)(!1),z=u()(R,2),V=z[0],F=z[1],B=(0,d.useState)([{title:"排行",dataIndex:"rank",width:100,fixed:"left",render:function(e,n,t){return e<4?(0,b.jsx)("img",{src:Xe[e-1]}):e}},{title:"用户",dataIndex:"user_name",width:150,fixed:"left",key:"user_name",render:function(e,n,t){return(0,b.jsxs)("div",{children:[(0,b.jsx)("img",{style:{width:30,height:30,borderRadius:"50%",marginRight:10},src:Je.Z.IMG_SERVER+"/images/"+(null==n?void 0:n.image_url)}),e]})}},{title:"分班",dataIndex:"course_group",key:"course_group",ellipsis:!0,width:150,fixed:"left"},{title:"学号",dataIndex:"student_id",key:"student_id",width:150,ellipsis:!0,fixed:"left",render:function(e){return e||"- -"}},{title:"通过",dataIndex:"passed_count",width:100,fixed:"left",key:"passed_count"},{title:"得分",dataIndex:"score",width:100,fixed:"left",key:"score"}]),q=u()(B,2),J=q[0],U=q[1];function W(e){return G.apply(this,arguments)}function G(){return(G=c()(a()().mark((function e(n){var t,o,l,u,d,m;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return F(!0),e.next=3,(0,p.ZP)("/api/courses/rank_list.json",{method:"get",params:i()(i()({},g),{},{id:g.coursesId,rank_type:2,homework_common_id:g.categoryId})});case 3:if(t=e.sent,Z(t),F(!1),-1==t.status){e.next=19;break}if((0,C.dE)()?(1===n&&P([null==t||null===(o=t.course_group)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.id]),null!=t&&t.my_rank?H([null==t?void 0:t.my_rank].concat(O()(null==t?void 0:t.rank_list))):H(O()(null==t?void 0:t.rank_list))):H(O()(null==t?void 0:t.rank_list)),1!==n){e.next=19;break}l={title:(0,b.jsxs)(_.Z,{title:"总耗时时为做题通过时长和罚时时长的总和,\n 罚时时长=评测出错次数X设置的罚时当前为".concat(null==t?void 0:t.punish_time,"分)"),children:[(0,b.jsx)("span",{style:{marginRight:3},children:"总耗时"})," ",(0,b.jsx)("span",{style:{fontSize:"14px"},className:"iconfont icon-tishixiaowenhao c-blue"})]}),dataIndex:"finish_time",width:150,ellipsis:!0,fixed:"left",key:"finish_time"},J.push(l),u=a()().mark((function e(n){var o,l,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(u={}).title=null!=t&&t.sent_type?(0,b.jsx)("span",{children:"题目"+(n+1)+"".concat(null==t||null===(o=t.question_data)||void 0===o||null===(o=o[n])||void 0===o?void 0:o.question_score,"")}):(0,b.jsx)("a",{onClick:c()(a()().mark((function e(){var r,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/problems/".concat(null==t||null===(r=t.question_data)||void 0===r||null===(r=r[n])||void 0===r?void 0:r.identifier,"/start.json"),{method:"get"});case 2:(i=e.sent)&&(window.open("/myproblems/".concat(null==i?void 0:i.identifier,"?type=1")),localStorage.setItem("program_homework",[g.coursesId,g.categoryId]));case 4:case"end":return e.stop()}}),e)}))),children:"题目"+(n+1)+"".concat(null==t||null===(l=t.question_data)||void 0===l||null===(l=l[n])||void 0===l?void 0:l.question_score,"")}),u.dataIndex="question_data",u.width=250,u.render=function(e,t){var o,l,u,d,m;return(0,b.jsx)("div",{children:(null==e||null===(o=e[n])||void 0===o?void 0:o.answer_question_time)&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{cursor:"pointer"},className:"iconfont icon-shixun4 c-blue",onClick:c()(a()().mark((function t(){var o,c,l,u,d,m,x,_,v;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,C.Rm)()||null!==(o=s.AssistantObject.hack)&&void 0!==o&&o.can_view){t.next=3;break}return f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),t.abrupt("return");case 3:if(null!=e&&null!==(c=e[n])&&void 0!==c&&c.open_code){t.next=6;break}return f.ZP.info("暂不允许查看代码"),t.abrupt("return");case 6:return t.next=8,(0,p.ZP)("/api/courses/view_code.json",{method:"get",params:i()(i()({},g),{},{id:g.coursesId,homework_common_id:g.categoryId,hack_user_code_id:null==e||null===(l=e[n])||void 0===l?void 0:l.hack_user_code_id})});case 8:v=t.sent,h.Z.warning({icon:null,width:800,title:(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{children:"代码"}),(0,b.jsxs)("span",{children:["使用语言:",null==e||null===(u=e[n])||void 0===u?void 0:u.current_language]}),(0,b.jsxs)("span",{children:["运行内存:",null==e||null===(d=e[n])||void 0===d?void 0:d.memory,"KB"]}),(0,b.jsxs)("span",{children:["运行时长:",null==e||null===(m=e[n])||void 0===m?void 0:m.run_time,"ms"]}),(0,b.jsxs)("span",{children:["得分:",null==e||null===(x=e[n])||void 0===x?void 0:x.score]})]}),content:(0,b.jsx)(Ke.Z,{classroomList:s,user:r,languages:[{language:null==e||null===(_=e[n])||void 0===_?void 0:_.language,code:null==v?void 0:v.code}],v:e,shixunWorkReport:"shixunWorkReport",dispatch:"dispatch",autoHeight:!1,language:e.language,game_id:e.id,diff_code_count:e.diff_code_count})});case 10:case"end":return t.stop()}}),t)})))}),(0,b.jsx)("span",{style:{margin:"0px 10px"},children:(null==e||null===(l=e[n])||void 0===l?void 0:l.answer_question_time)||"- -"}),null!=e&&null!==(u=e[n])&&void 0!==u&&u.submit_count?(0,b.jsxs)(_.Z,{title:"".concat((null==e||null===(d=e[n])||void 0===d?void 0:d.submit_count)||0,"次尝试出错"),children:[(0,b.jsx)("span",{style:{color:"red",marginRight:5},className:"iconfont icon-Bug"}),(null==e||null===(m=e[n])||void 0===m?void 0:m.submit_count)||0]}):null]})})},J.push(u);case 6:case"end":return e.stop()}}),e)})),d=0;case 13:if(!(d<(null==t||null===(m=t.question_data)||void 0===m?void 0:m.length))){e.next=18;break}return e.delegateYield(u(d),"t0",15);case 15:d++,e.next=13;break;case 18:U(O()(J));case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,d.useEffect)((function(){J.splice(7);for(var e=function(e){var n,t,o={};o.title=null!=k&&k.sent_type?(0,b.jsx)("span",{children:"题目"+(e+1)+"".concat(null==k||null===(n=k.question_data)||void 0===n||null===(n=n[e])||void 0===n?void 0:n.question_score,"")}):(0,b.jsx)("a",{onClick:c()(a()().mark((function n(){var t,r;return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,p.ZP)("/api/problems/".concat(null==k||null===(t=k.question_data)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.identifier,"/start.json"),{method:"get"});case 2:(r=n.sent)&&(window.open("/myproblems/".concat(null==r?void 0:r.identifier,"?type=1")),localStorage.setItem("program_homework",[g.coursesId,g.categoryId]));case 4:case"end":return n.stop()}}),n)}))),children:"题目"+(e+1)+"".concat(null==k||null===(t=k.question_data)||void 0===t||null===(t=t[e])||void 0===t?void 0:t.question_score,"")}),o.dataIndex="question_data",o.width=250,o.render=function(n,t){var o,l,u,d,m;return(0,b.jsx)("div",{children:(null==n||null===(o=n[e])||void 0===o?void 0:o.answer_question_time)&&(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{cursor:"pointer"},className:"iconfont icon-shixun4 c-blue",onClick:c()(a()().mark((function t(){var o,c,l,u,d,m,x,_,v;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(0,C.Rm)()||null!==(o=s.AssistantObject.hack)&&void 0!==o&&o.can_appraise){t.next=3;break}return f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能"),t.abrupt("return");case 3:if(null!=n&&null!==(c=n[e])&&void 0!==c&&c.open_code){t.next=6;break}return f.ZP.info("暂不允许查看代码"),t.abrupt("return");case 6:return t.next=8,(0,p.ZP)("/api/courses/view_code.json",{method:"get",params:i()(i()({},g),{},{id:g.coursesId,homework_common_id:g.categoryId,hack_user_code_id:null==n||null===(l=n[e])||void 0===l?void 0:l.hack_user_code_id})});case 8:v=t.sent,h.Z.warning({icon:null,width:800,title:(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{children:"代码"}),(0,b.jsxs)("span",{children:["使用语言:",null==n||null===(u=n[e])||void 0===u?void 0:u.current_language]}),(0,b.jsxs)("span",{children:["运行内存:",null==n||null===(d=n[e])||void 0===d?void 0:d.memory,"KB"]}),(0,b.jsxs)("span",{children:["运行时长:",null==n||null===(m=n[e])||void 0===m?void 0:m.run_time,"ms"]}),(0,b.jsxs)("span",{children:["得分:",null==n||null===(x=n[e])||void 0===x?void 0:x.score]})]}),content:(0,b.jsx)(Ke.Z,{classroomList:s,user:r,languages:[{language:null==n||null===(_=n[e])||void 0===_?void 0:_.language,code:null==v?void 0:v.code}],v:n,shixunWorkReport:"shixunWorkReport",dispatch:"dispatch",autoHeight:!1,language:n.language,game_id:n.id,diff_code_count:n.diff_code_count})});case 10:case"end":return t.stop()}}),t)})))}),(0,b.jsx)("span",{style:{margin:"0px 10px"},children:(null==n||null===(l=n[e])||void 0===l?void 0:l.answer_question_time)||"- -"}),null!=n&&null!==(u=n[e])&&void 0!==u&&u.submit_count?(0,b.jsxs)(_.Z,{title:"".concat((null==n||null===(d=n[e])||void 0===d?void 0:d.submit_count)||0,"次尝试出错"),children:[(0,b.jsx)("span",{style:{color:"red",marginRight:5},className:"iconfont icon-Bug"}),(null==n||null===(m=n[e])||void 0===m?void 0:m.submit_count)||0]}):null]})})},J.push(o)},n=0;n<(null==k||null===(t=k.question_data)||void 0===t?void 0:t.length);n++){var t;e(n)}U(O()(J))}),[null==k?void 0:k.question_data]),(0,d.useEffect)((function(){var e;null!=r&&null!==(e=r.userInfo)&&void 0!==e&&e.course&&((0,C.dE)()&&(g.course_group=(0,C.dE)()?[r.userInfo.course.course_group_id]:[],v(i()({},g))),W(1))}),[null==r?void 0:r.userInfo]),console.log("----",J),(0,b.jsx)("div",{style:{width:1200,margin:"0px auto"},children:"封榜中"===(null==k?void 0:k.message)?(0,b.jsx)(T.Z,{customText:"答题时间进入倒计时,暂时封榜,请加速竞技通关答题"}):(0,b.jsxs)("div",{style:{background:"#fff",padding:20},children:[(0,b.jsxs)("div",{style:{display:"inline-flex"},children:[(0,b.jsx)("label",{children:"分班情况:"}),(0,C.GJ)()&&(0,b.jsx)("div",{style:{flex:1},children:(0,b.jsxs)(Y.Z.Group,{className:Be.Z.checkboxgroup,value:L,onChange:function(e){if(1===g.type)P([]),g.course_group=[],g.page=1,v(i()({},g)),W();else if(2===g.type){var n;P(["全部"].concat()),g.course_group=null==k||null===(n=k.course_group)||void 0===n?void 0:n.map((function(e){return e.id})),g.page=1,v(i()({},g)),W()}else P(O()(e.filter((function(e){return"全部"!=e})))),g.course_group=e.filter((function(e){return"全部"!=e})),g.page=1,v(i()({},g)),W()},children:[(0,b.jsx)(Y.Z,{value:"全部",onChange:function(e){e.target.checked?g.type=2:g.type=1},children:"全部分班"}),null==k||null===(n=k.course_group)||void 0===n?void 0:n.map((function(e,n){return(0,b.jsx)(Y.Z,{onChange:function(e){g.type=3},value:e.id,children:null==e?void 0:e.name})}))]})}),(0,C.dE)()&&(0,b.jsxs)(Q.ZP.Group,{onChange:function(e){"全部"===e.target.value?(g.course_group=[],g.page=1,v(i()({},g)),W()):(g.course_group=[e.target.value],g.page=1,v(i()({},g)),W())},defaultValue:r.userInfo.course.course_group_id,children:[(0,b.jsx)(Q.ZP,{value:"全部",children:"全部分班"}),null==k||null===(t=k.course_group)||void 0===t?void 0:t.map((function(e,n){return(0,b.jsx)(Q.ZP,{value:e.id,children:e.name})}))]})]}),(0,C.GJ)()&&(0,b.jsxs)("div",{style:{width:"100%",display:"flex",justifyContent:"space-between",marginTop:10},children:[(0,b.jsxs)("span",{style:{fontSize:14,color:"#B1BACD"},children:["排行规则:时间结束后正式封榜,时间段之外的提交不计入排行。 ",(0,b.jsx)("a",{onClick:function(){h.Z.warning({title:"计分规则",width:500,content:(0,b.jsxs)("div",{children:[(0,b.jsx)("p",{children:"排名规则经典ACM规则"}),(0,b.jsx)("p",{children:"AC通过题目越多排名越靠前。"}),(0,b.jsx)("p",{children:"AC相同总用时越少排名越靠前。"}),(0,b.jsx)("p",{children:"总用时=∑(每一个题目的用时)"}),(0,b.jsx)("p",{children:"每一个题目的用时=比赛开始到提交被通过的时间+罚时"}),(0,b.jsx)("p",{children:"罚时=(通过前)错误代码提交次数*每次罚时"}),(0,b.jsx)("p",{children:"不算罚时的情况:没有通过的题目、(系统)内部错误、编译错误"})]})})},children:"点击查看计分规则"})]}),(0,b.jsx)(x.ZP,{onClick:function(){(0,me.VY)(i()(i()({},g),{},{id:g.coursesId,rank_type:2,homework_common_id:g.categoryId}))},children:"导出"})]}),(0,b.jsx)(I.Z,{spinning:V,children:(0,b.jsx)(j.Z,{style:{marginTop:10},pagination:!1,scroll:{x:1200},rowClassName:function(e,n){return 0===n&&(0,C.dE)()&&Be.Z.tables},dataSource:D,columns:J})}),(0,b.jsx)("div",{style:{width:"100%",textAlign:"center",marginTop:10},children:(0,b.jsx)(M.Z,{current:g.page,pageSize:g.per_page,total:null==k?void 0:k.count,hideOnSinglePage:!0,onChange:function(e,n){g.page=e,g.per_page=n,v(i()({},g)),W()}})})]})})})),en=[{live:"A",gz:"0个错误",ld:"0个漏洞",gf:"0 - 5%"},{live:"B",gz:"至少1个次要错误",ld:"至少1个次要漏洞",gf:"6% - 10%"},{live:"C",gz:"至少1个主要错误",ld:"至少1个主要漏洞",gf:"11% - 20%"},{live:"D",gz:"至少1个严重错误",ld:"至少1个严重漏洞",gf:"21% - 50%"},{live:"E",gz:"至少1个崩溃错误",ld:"至少1个崩溃漏洞",gf:"超过50%"}],nn=(0,m.connect)((function(e){var n=e.shixunHomeworks,t=e.classroomList,r=e.loading,i=e.user;return{classroomList:t,shixunHomeworks:n,globalSetting:e.globalSetting,user:i,loading:r.effects}}))((function(e){var n,t=e.shixunHomeworks,r=e.classroomList,s=(e.globalSetting,e.user,e.loading,e.dispatch),o=(0,m.useParams)(),l=(0,m.useSearchParams)(),k=u()(l,1)[0],Z=(0,d.useState)(k.get("tabs")||"0"),N=u()(Z,2),S=N[0],I=N[1],M=(0,d.useState)({}),L=u()(M,2),T=L[0],P=L[1],E=t.workList,O=t.workSetting,D=(0,d.useState)(!1),H=u()(D,2),R=H[0],z=H[1];o.category=k.get("category_id"),o.order="work_score",o.b_order="desc",(0,d.useEffect)((function(){s({type:"classroomList/getAssistantPermissions",payload:{course_id:o.coursesId}})}),[(0,C.bg)()]);var Y,V,F,B,q,Q,J,U,W=function(){var e;h.Z.confirm({centered:!0,width:530,title:"提示",okText:"确定",cancelText:"取消",content:(0,b.jsxs)("div",{className:"tc font16",children:["你在该实训的学习记录将被清空,无法恢复",(0,b.jsx)("br",{}),"是否确认重做?"]}),onOk:(e=c()(a()().mark((function e(){var n,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=null===(n=t.workList)||void 0===n?void 0:n.myshixun_identifier,e.next=3,(0,ie.Fr)({id:r});case 3:e.sent&&(f.ZP.info("已清空本实训的学习记录\n\n请点击“开启挑战”重做课程实验"),s({type:"shixunHomeworks/getWorkList",payload:T}));case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},G=function e(n){var t,r;n=null!==(t=n)&&void 0!==t&&t.includes(".json")?n:"".concat(n,".json"),h.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,b.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(r=c()(a()().mark((function t(){var r,i;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,qe.$Q)({url:n});case 2:if(r=t.sent){t.next=5;break}return t.abrupt("return");case 5:return f.ZP.success("重置成功,正在进入实践项目!"),t.next=8,(0,qe.Ir)({id:r.shixun_identifier});case 8:if(null==(i=t.sent)||!i.game_identifier){t.next=12;break}return(0,w.xg)("/tasks/".concat(i.game_identifier,"?coursesId=").concat(o.coursesId)),t.abrupt("return");case 12:2===(null==i?void 0:i.status)?e(null==i?void 0:i.message):3===(null==i?void 0:i.status)&&K(null==i?void 0:i.message);case 13:case"end":return t.stop()}}),t)}))),function(){return r.apply(this,arguments)})})},K=function(e){h.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,b.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})},X=function(){var e=c()(a()().mark((function e(n){var t,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null!==(t=n)&&void 0!==t&&t.includes(".json")?n:"".concat(n,".json"),e.next=3,(0,qe.$Q)({url:n});case 3:if(r=e.sent,console.log(r,"execRes"),null==r||!r.game_identifier){e.next=8;break}return(0,w.xg)("/tasks/".concat(r.game_identifier,"?coursesId=").concat(o.coursesId)),e.abrupt("return");case 8:-3===(null==r?void 0:r.status)?(0,w.eF)():2===(null==r?void 0:r.status)?G(null==r?void 0:r.message):3===(null==r?void 0:r.status)&&K(null==r?void 0:r.message);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),$=[{name:"作业列表",id:"0",compontent:(0,b.jsx)(fe,{setExportParams:P}),forceRender:!0},{name:"作业详情",id:"1",compontent:(0,b.jsx)(A,{})},{name:"排行榜",id:"5",compontent:(0,b.jsx)($e,{})},{name:"代码查重",id:"2",compontent:(0,b.jsx)(xe,{})},{name:(0,C.GJ)()?"高级设置":"得分规则",id:"3",compontent:(0,b.jsx)(He,{}),forceRender:!0},{name:(0,b.jsx)("a",{style:{color:"#b9b8b8"},href:"/classrooms/".concat(o.coursesId,"/program_homework/").concat(o.categoryId,"/answer"),children:"解答&讨论"}),id:"6",compontent:!1}].filter((function(e){var n,t;return(0,C.dE)()?"代码查重"!==e.name:(0,C.dE)()||"已截止"!==(null==E||null===(n=E.homework_status)||void 0===n?void 0:n[0])?"质量检测"!==e.name:!E.code_review&&"未发布"!==(null==E||null===(t=E.homework_status)||void 0===t?void 0:t[0])||"代码查重"!==e.name})).filter((function(e){return!!E.open_code_quality_analysis||"质量检测"!==e.name}));return(0,b.jsxs)("section",{children:[(0,b.jsxs)("div",{className:"edu-container",children:[E.homework_name&&(0,b.jsxs)("section",{className:"animated fadeIn",children:[(0,b.jsx)("aside",{className:"mt10",children:E.category&&(0,b.jsxs)(g.Z,{separator:">",children:[(0,b.jsx)(g.Z.Item,{children:(0,b.jsx)(m.Link,{to:"/classrooms/".concat(E.course_id,"/program_homework"),children:E.course_name})}),(0,b.jsx)(g.Z.Item,{children:(0,b.jsx)(m.Link,{to:"/classrooms/".concat(E.course_id,"/program_homework/").concat(E.category.main?"":E.category.category_id),children:E.category.category_name})}),(0,b.jsx)(g.Z.Item,{children:"作业详情"})]})}),(0,b.jsxs)("aside",{className:[Be.Z.title,"mt20"].join(" "),children:[(0,b.jsx)(m.Link,{to:"/classrooms/".concat(E.course_id,"/program_homework/").concat(E.category.main?"":E.category.category_id),children:(0,b.jsx)(y.Z,{className:"font16 c-black"})}),(0,b.jsx)(_.Z,{title:E.homework_name,placement:"bottom",children:(0,b.jsx)("strong",{className:"font20 ml5",children:E.homework_name})}),(0,b.jsx)(w.VV,{temporary:!0,status:E.homework_status}),(0,C.dE)()&&(0,b.jsx)("span",{style:{fontWeight:800,color:"#0152d9",textAlign:"end",flex:1,cursor:"pointer"},children:(0,b.jsxs)(x.ZP,{onClick:c()(a()().mark((function e(){var n,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,p.ZP)("/api/problems/".concat(null===(n=t.workList)||void 0===n?void 0:n.start_identifier,"/start.json"),{method:"get"});case 2:(r=e.sent)&&(window.open("/myproblems/".concat(null==r?void 0:r.identifier,"?type=1")),localStorage.setItem("program_homework",[o.coursesId,o.categoryId]));case 4:case"end":return e.stop()}}),e)}))),type:"primary",children:[null!==(n=E.homework_status)&&void 0!==n&&n.includes("已截止")?"查看作业":"进入练习"," "]})})]})]}),(0,b.jsx)("aside",{className:"mt30 relative ".concat(Be.Z.workListTabWrap),children:(0,b.jsx)(v.Z,{type:"card",defaultActiveKey:S,activeKey:S,tabBarExtraContent:(0,b.jsxs)("aside",{className:Be.Z.workListTabButton,children:[(0,C.dE)()&&(null===(Y=t.workList)||void 0===Y?void 0:Y.redo_work)&&(0,b.jsx)(x.ZP,{onClick:W,type:"primary",icon:(0,b.jsx)("i",{className:"iconfont icon-dahuizhongzuo3x"}),children:"重做"}),(null===(V=t.workList)||void 0===V?void 0:V.shixun_status)>1&&(null===(F=t.workList)||void 0===F?void 0:F.time_status)<5&&(0,C.dE)()&&(0,b.jsx)(x.ZP,{type:"primary",icon:(0,b.jsx)("i",{className:"iconfont icon-kaiqizhong"}),onClick:function(){var e,n,r;(0,Qe.tJ)(s,!0)&&(null!==(e=t.workList)&&void 0!==e&&null!==(e=e.task_operation)&&void 0!==e&&null!==(e=e[1])&&void 0!==e&&e.includes("/")?X(null===(n=t.workList)||void 0===n||null===(n=n.task_operation)||void 0===n?void 0:n[1]):(0,w.xg)("/tasks/".concat(null===(r=t.workList)||void 0===r||null===(r=r.task_operation)||void 0===r?void 0:r[1])))},children:null===(B=t.workList)||void 0===B||null===(B=B.task_operation)||void 0===B?void 0:B[0]}),(null===(q=t.workList)||void 0===q?void 0:q.commit_des)&&(null===(Q=t.workList)||void 0===Q?void 0:Q.commit_des)&&(0,b.jsx)(x.ZP,{type:"primary",icon:(0,b.jsx)("i",{className:"iconfont icon-tijiaozongjie"}),onClick:function(){var e;(0,w.xg)("/classrooms/".concat(o.coursesId,"/shixun_homework/").concat(o.categoryId,"/").concat(null===(e=t.workList)||void 0===e?void 0:e.id,"/commitsummary"))},children:null===(J=t.workList)||void 0===J?void 0:J.commit_des}),(0,C.GJ)()&&"未发布"===(null==E||null===(U=E.homework_status)||void 0===U?void 0:U[0])&&(0,b.jsx)(x.ZP,{type:"primary",icon:(0,b.jsx)("i",{className:"iconfont icon-bianji2"}),onClick:function(){var e;null!==(e=r.AssistantObject.hack)&&void 0!==e&&e.can_create||!(0,C.Rm)()?m.history.push("/classrooms/".concat(o.coursesId,"/program_homework/").concat(o.categoryId,"/edit")):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"编辑作业"}),(0,C.GJ)()&&E.publish_immediately&&(0,b.jsx)(x.ZP,{type:"primary",icon:(0,b.jsx)("i",{className:"iconfont icon-yishezhifabushijian1"}),onClick:function(){var e;null!==(e=r.AssistantObject.hack)&&void 0!==e&&e.can_publish||!(0,C.Rm)()?s({type:"classroomList/setActionTabs",payload:{key:"立即发布",selectArrs:[o.categoryId],selectArrsAll:[E],params:o,detail:!0,type:2,manage_all_group:null==O?void 0:O.manage_all_group}}):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"立即发布"}),(0,C.GJ)()&&E.end_immediately&&(0,b.jsx)(x.ZP,{style:{background:"#0152d9",color:"#fff"},type:"primary",icon:(0,b.jsx)("i",{className:"iconfont icon-jiezhishiyan"}),onClick:function(){var e;null!==(e=r.AssistantObject.hack)&&void 0!==e&&e.can_stop||!(0,C.Rm)()?s({type:"classroomList/setActionTabs",payload:{key:"立即截止",params:o,type:2,detail:!0,selectArrs:[o.categoryId]}}):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:"立即截止"})]}),onChange:function(e){var n;"5"!==e||null!==(n=r.AssistantObject.hack)&&void 0!==n&&n.can_exam_leaderboard||!(0,C.Rm)()?(I(e),"0"===e&&s({type:"shixunHomeworks/getWorkList",payload:o})):f.ZP.warning("您未获取此权限,需向管理员申请权限才能使用此功能")},children:$.map((function(e,n){return(0,b.jsx)(v.Z.TabPane,{tab:e.name,forceRender:e.forceRender,children:e.compontent},e.id)}))})})]}),(0,b.jsx)(Ye,{}),(0,b.jsx)(Ve.Z,{courseEndTime:null==E?void 0:E.course_end_date,successCallback:function(){s({type:"shixunHomeworks/getWorkList",payload:i()({},o)})},visible:"立即截止"===r.actionTabs.key,homeworkIds:[o.categoryId],courseId:o.coursesId,isBatch:!1}),(0,b.jsx)(Fe.Z,{courseEndTime:null==E?void 0:E.course_end_date}),(0,b.jsxs)(h.Z,{open:R,title:"规则说明",width:800,footer:null,onCancel:function(){z(!1)},children:[(0,b.jsx)("p",{children:"一、等级规则"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"1. 缺陷等级"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:(0,b.jsx)(j.Z,{dataSource:en,columns:[{title:"等级",dataIndex:"live"},{title:"缺陷评估规则",dataIndex:"gz"},{title:"漏洞评估规则",dataIndex:"ld"},{title:"代码规范评估规则",dataIndex:"gf"}],pagination:!1})}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"注代码规范评估规则中数值来源为计算技术债务时间占开发所有代码所需要的时间的比例Technical Debt Ratio"}),(0,b.jsx)("p",{style:{marginLeft:"20px"},children:"Technical Debt Ratio = 技术债务时间 / 开发时间"}),(0,b.jsx)("p",{style:{marginLeft:"20px"},children:"技术债务时间为修复所有问题所需要的时间。"}),(0,b.jsx)("p",{children:"二、复杂度规则"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"根据代码路径数计算的数值,每当一个函数的控制流分叉时,复杂度计数器就会自增一。"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"每个程序语言的关键字对应的复杂度数据不同但每个函数的最小复杂度为1。特定语言的详细数据略"}),(0,b.jsx)("p",{children:"三、代码质量分规则"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"代码质量分 = 0.5*缺陷分数 + 0.3*漏洞分数 + 0.2*代码规范性分数"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"其中:"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"缺陷/漏洞/代码规范性分数计算规则为100 - 100 *((100*崩溃数 + 5*严重数 + 3*主要数 + 1*次数)/ 代码行数)"}),(0,b.jsx)("p",{style:{marginLeft:"10px"},children:"注:分数为空的代表不支持的文件格式。"})]})]})}))},64063:function(e,n,t){t.d(n,{AD:function(){return I},D9:function(){return A},IM:function(){return O},Iy:function(){return w},Ne:function(){return E},ON:function(){return Y},Uj:function(){return q},VY:function(){return R},YO:function(){return B},YX:function(){return F},Zn:function(){return x},_g:function(){return j},_k:function(){return T},c6:function(){return N},cr:function(){return g},eV:function(){return S},fi:function(){return _},gh:function(){return b},hS:function(){return D},iA:function(){return v},j6:function(){return y},je:function(){return C},kS:function(){return z},o6:function(){return Z},pO:function(){return V},rQ:function(){return M},sA:function(){return k},xm:function(){return P},xo:function(){return H},y8:function(){return L}});var r=t(7557),i=t.n(r),s=t(82242),a=t.n(s),o=t(41498),c=t.n(o),l=t(18356),u=t(80184),d=t(1079),p=t(8591),m=t(67390),f=function(){(0,u.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在生成文件,请稍后..."}})},h=function(){(0,u.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}})},x=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(),e.next=3,(0,l.YR)(a()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,d.QH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_couser_info.json"),query:n}));case 7:h();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),g=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.yS)(a()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_member_act_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),_=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.W0)(a()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_score")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),v=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.Nl)(a()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),j=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.td)(a()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_exercise_and_other")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),y=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.QX)(a()({},n));case 2:if(0!==(t=e.sent).status){e.next=8;break}p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")),e.next=13;break;case 8:if(-2!==t.status){e.next=12;break}return e.abrupt("return",t);case 12:-3===t.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/course_total_homework")));case 13:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),w=function(){var e=c()(i()().mark((function e(n,t){var r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.aP)(a()({},n));case 2:0===(r=e.sent).status?(p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t))):-3===r.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/").concat(t)));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),k=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(),e.next=3,(0,l.MJ)(a()({},n));case 3:if(0!==e.sent.status){e.next=7;break}return e.next=7,(0,d.QH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/polls/".concat(n.categoryId,"/commit_result.xlsx"),query:n}));case 7:h();case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),b=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/attendances/export_xlsx_data.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Z=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/video_study_statics.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),N=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_video_study.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),S=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(n.coursesId,"/export_course_students_info.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/school_manages/students.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),M=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/item_banks/export.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),L=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/competitions/region_reports.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),C=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,l.Uy)(a()({},n));case 2:0===(t=e.sent).status?(p.ZP.info("导出任务生成成功"),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score"))):-3===t.status&&((0,u.getDvaApp)()._store.dispatch({type:"classroomList/setActionTabs",payload:{key:"导出提醒"}}),u.history.push("/classrooms/".concat(n.coursesId,"/exportlist/exercise_score")));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("----------","调用下载"),e.next=3,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/export_records/".concat(n.id,".xlsx"),query:n}));case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),P=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/ec_major_schools/0/ec_years.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/".concat(null==n?void 0:n.coursesId,"/").concat(n.menuKey,"_statistic.xlsx?").concat(n.checkedList.map((function(e){return"course_group_id[]=".concat(e)})).join("&")),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),E=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_training_objectives.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),O=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)(null==n?void 0:n.name,(0,d.NY)({url:m.Z.API_SERVER+"/api/attachments/get_ecs_attachment.docx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_courses.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),H=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/ec_years/".concat(null==n?void 0:n.ec_year_id,"/ec_graduation_requirements.xlsx"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),z=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/courses/question_rank_list.xlsx",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Y=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/examination_banks/".concat(n.id,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),V=function(){var e=c()(i()().mark((function e(n,t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)(t||"",(0,d.NY)({url:m.Z.API_SERVER+"/api/exercises/".concat(null==n?void 0:n.exercise_id,"/user_exercise_detail.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),F=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/exercises/".concat(n.categoryId,".json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),B=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/polls/".concat(null==n?void 0:n.id,"/commit_result.json"),query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),q=function(){var e=c()(i()().mark((function e(n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,d.FH)("",(0,d.NY)({url:m.Z.API_SERVER+"/api/paths/get_task_pass.json",query:n}));case 2:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()},973:function(e,n,t){t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxOCI+PHBhdGggZmlsbD0iI0Y3QjUwMCIgZD0iTTcgNGMzLjg5OSAwIDcgMy4xNDEgNyA3cy0zLjEwMSA3LTcgNy03LTMuMTQxLTctNyAzLjEwMS03IDctN1ptMSAzSDYuMzk1YTMuNTAxIDMuNTAxIDAgMCAxLS44NTcgMS4yNDVjLS4zMi4yOTQtLjc1Mi41NTEtMS4yOTcuNzcyTDQgOS4xMDlWMTAuOWMuNDQ4LS4xNTQuODItLjMxNSAxLjExNy0uNDgzLjIyMi0uMTI2LjQ1LS4yODIuNjg1LS40NjZsLjIzNi0uMTk0VjE1SDhWN1pNNC44MTIgMGMuMTc1IDAgLjM1LjE2LjQzOC4zMThsMS4zMTMgMi4zMDlzLTIuOC4xNi00LjQ2MyAxLjY3MkwuMDg4LjcxNkMwIC42MzYgMCAuNTU3IDAgLjQ3OCAwIC4xNTkuMjYzIDAgLjUyNSAwWm04LjY2MyAwYy4yNjMgMCAuNTI1LjIzOS41MjUuNDc4IDAgLjA4IDAgLjE1OS0uMDg4LjIzOEwxMS45IDQuMjJjLTEuNjYyLTEuNDMzLTQuNDYzLTEuNTkyLTQuNDYzLTEuNTkyTDguNzUuMzE4QzguNzUuMTYgOC45MjUgMCA5LjE4OCAwWiIvPjwvc3ZnPg=="},2034:function(e,n,t){t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxOCI+PHBhdGggZmlsbD0iI0I5QzRDRiIgZD0iTTcgNGMzLjg5OSAwIDcgMy4xNDEgNyA3cy0zLjEwMSA3LTcgNy03LTMuMTQxLTctNyAzLjEwMS03IDctN1ptLjA1IDNjLS42NzUgMC0xLjIwMy4wOTItMS41ODQuMjc2YTIuMDU2IDIuMDU2IDAgMCAwLS44ODcuNzk0Yy0uMTguMjk2LS4zMS42OTEtLjM5NCAxLjE4NmwtLjAzOC4yNTUgMi4wMDQuMTc3Yy4wNTUtLjQ0My4xNjQtLjc1My4zMjYtLjkyOGEuODE0LjgxNCAwIDAgMSAuNjI2LS4yNjMuODEuODEgMCAwIDEgLjYxMS4yNTVjLjE2Mi4xNy4yNDMuMzc1LjI0My42MTQgMCAuMjIyLS4wODEuNDU2LS4yNDUuNzAzLS4xNjQuMjQ3LS41MzkuNjA4LTEuMTI0IDEuMDg0LS45Ni43NzYtMS42MTMgMS40NS0xLjk2MiAyLjAyYTQuMzYzIDQuMzYzIDAgMCAwLS41ODggMS41NTJMNCAxNWg2di0xLjc4MUg2Ljg3N2MuMTg0LS4xOTcuMzQzLS4zNTYuNDc5LS40NzguMTM2LS4xMjIuNDA1LS4zMzQuODA4LS42MzguNjc3LS41MjMgMS4xNDUtMS4wMDIgMS40MDEtMS40MzguMjU3LS40MzcuMzg2LS44OTUuMzg2LTEuMzc0IDAtLjQ1LS4xMTItLjg1OC0uMzM2LTEuMjJhMi4wNDMgMi4wNDMgMCAwIDAtLjkyNC0uODA4QzguMzAxIDcuMDg4IDcuNzUzIDcgNy4wNSA3Wk00LjgxMiAwYy4xNzUgMCAuMzUuMTYuNDM3LjMxOGwxLjMxMyAyLjMwOXMtMi44LjE2LTQuNDYzIDEuNjcyTC4wODguNzE2QzAgLjYzNiAwIC41NTcgMCAuNDc4IDAgLjE1OS4yNjMgMCAuNTI1IDBabTguNjYyIDBjLjI2MyAwIC41MjUuMjM5LjUyNS40NzggMCAuMDggMCAuMTU5LS4wODguMjM4TDExLjkgNC4yMmMtMS42NjItMS40MzMtNC40NjMtMS41OTItNC40NjMtMS41OTJMOC43NS4zMThDOC43NS4xNiA4LjkyNSAwIDkuMTg4IDBaIi8+PC9zdmc+"},86498:function(e,n,t){t(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;n.Z="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNCIgaGVpZ2h0PSIxOCI+PHBhdGggZmlsbD0iI0QwOUYxOCIgZD0iTTcgNGMzLjg5OSAwIDcgMy4xNDEgNyA3cy0zLjEwMSA3LTcgNy03LTMuMTQxLTctNyAzLjEwMS03IDctN1ptLS4wNjIgM2MtLjgyNiAwLTEuNDY0LjE3Mi0xLjkxNS41MTctLjQuMzA3LS42ODYuNzMzLS44NTYgMS4yNzhsLS4wNTguMjEgMS45MDguMzY0Yy4wNTItLjM4My4xNTMtLjY1MS4zMDItLjgwNGEuNzcyLjc3MiAwIDAgMSAuNTgtLjIzYy4yMyAwIC40MTIuMDcuNTQ0LjIxMS4xMzMuMTQuMTk5LjMzLjE5OS41NjVhLjg4Ljg4IDAgMCAxLS4yNjUuNjM4Ljg5Ljg5IDAgMCAxLS42NjIuMjcgMS4zNSAxLjM1IDAgMCAxLS4xNTgtLjAxMmwtLjEwNC0uMDE1LS4xMDUgMS41MzZjLjI3OC0uMDg1LjQ5Ni0uMTI3LjY1NC0uMTI3LjI5OCAwIC41MzMuMDk5LjcwNy4yOTYuMTczLjE5Ny4yNi40NzUuMjYuODMzIDAgLjM1Mi0uMDkuNjM0LS4yNy44NDVhLjg1Mi44NTIgMCAwIDEtLjY3Ny4zMTYuODYyLjg2MiAwIDAgMS0uNjM2LS4yNWMtLjE0My0uMTQ0LS4yNTQtLjM4NC0uMzMzLS43MjNsLS4wMzYtLjE3N0w0IDEyLjgyNmMuMTMyLjQ4Mi4zMjEuODgyLjU2NyAxLjIuMjQ2LjMxOS41Ni41Ni45NDIuNzI2LjM4MS4xNjUuOTAyLjI0OCAxLjU2My4yNDguNjc3IDAgMS4yMjQtLjExMiAxLjY0LS4zMzUuNDE2LS4yMjMuNzM1LS41NDIuOTU2LS45NTUuMjIxLS40MTQuMzMyLS44NDUuMzMyLTEuMjk2IDAtLjM1OS0uMDY3LS42NjctLjItLjkyNmExLjYzMyAxLjYzMyAwIDAgMC0uNTYzLS42MjVjLS4xNDktLjA5OS0uMzYzLS4xODUtLjY0NC0uMjU5LjM0Ny0uMjA0LjYwNi0uNDQxLjc3OC0uNzEyYTEuNjYgMS42NiAwIDAgMCAuMjU3LS45MDggMS44MiAxLjgyIDAgMCAwLS42MzQtMS40MkM4LjU3MSA3LjE4OSA3Ljg4NiA3IDYuOTM4IDdaTTQuODEzIDBjLjE3NSAwIC4zNS4xNy40MzcuMzM4bDEuMzEzIDIuNDUzcy0yLjguMTctNC40NjMgMS43NzZMLjA4OC43NjFDMCAuNjc3IDAgLjU5MiAwIC41MDcgMCAuMTcuMjYzIDAgLjUyNSAwWm04LjY2MiAwYy4yNjMgMCAuNTI1LjI1NC41MjUuNTA3IDAgLjA4NSAwIC4xNy0uMDg4LjI1NEwxMS45IDQuNDgzQzEwLjIzOCAyLjk2IDcuNDM3IDIuNzkgNy40MzcgMi43OUw4Ljc1LjMzOEM4Ljc1LjE3IDguOTI1IDAgOS4xODggMFoiLz48L3N2Zz4="},79677:function(e,n){n.Z={flex_box_center:"flex_box_center___eQ57b",flex_space_between:"flex_space_between___PVjBV",flex_box_vertical_center:"flex_box_vertical_center___ghTL_",flex_box_center_end:"flex_box_center_end___z8oKm",flex_box_column:"flex_box_column___JQV5n",title:"title___w80Ja",workListTabWrap:"workListTabWrap___YRwm7",workListTabButton:"workListTabButton___ebGCB",tables:"tables___AYvHM",checkboxgroup:"checkboxgroup___fZHgL"}}}]);