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.
6 lines
18 KiB
6 lines
18 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[24105],{91896:function(D,K,e){"use strict";e.d(K,{Z:function(){return z}});function z(){return z=Object.assign||function(S){for(var F=1;F<arguments.length;F++){var y=arguments[F];for(var t in y)Object.prototype.hasOwnProperty.call(y,t)&&(S[t]=y[t])}return S},z.apply(this,arguments)}},72859:function(D){D.exports={flexRow:"flexRow___1Kwk7",flexColumn:"flexColumn___1x58l",action:"action___osaCD",setScore:"setScore___kmMlR",delete:"delete___XpFlx",content:"content___9Naj3",titleWrap:"titleWrap___32PZL",titleNumber:"titleNumber___3HPb0",score:"score___3zGYh",titleHtml:"titleHtml___2vgPo",answerWrap:"answerWrap___2vM8f",answer:"answer___1Q0Tc",answerText:"answerText___5UVSF"}},78632:function(D){D.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},32973:function(D){D.exports={wrp:"wrp___z2l1F",bgBlack:"bgBlack___3ezfX",monaco:"monaco___1ypjT",darkBlue:"darkBlue___2ViJc",close:"close___3q-z4",embed:"embed___3dQqc"}},43060:function(D){D.exports={button:"button___1wy9m"}},62132:function(D,K,e){"use strict";var z=e(88983),S=e(47933),F=e(94657),y=e(12924),t=e.n(y),x=e(10296),R=e(72859),a=e.n(R),N=["A\uFF0E","B\uFF0E","C\uFF0E","D\uFF0E","E\uFF0E","F\uFF0E","G\uFF0E","H\uFF0E","I\uFF0E","J\uFF0E","K\uFF0E","L\uFF0E","M\uFF0E","N\uFF0E","O\uFF0E","P\uFF0E","Q\uFF0E","R\uFF0E","S\uFF0E","T\uFF0E","U\uFF0E","V\uFF0E","W\uFF0E","X\uFF0E","Y\uFF0E","Z\uFF0E"],f=function(E){var U=E.index,h=E.typeName,W=E.type,s=E.data,n=s===void 0?{}:s,u=E.inMouseId,b=E.isshow,Z=E.onSetScore,j=Z===void 0?function(){}:Z,k=E.onDelete,V=k===void 0?function(){}:k,J=E.onMouseEnter,G=J===void 0?function(){}:J,X=E.showAnswer,g=X===void 0?!1:X,H=(0,y.useState)(!1),le=(0,F.Z)(H,2),Q=le[0],Y=le[1],ie=function(){var r;return t().createElement("div",{className:a().answerWrap},n==null||((r=n.choices)===null||r===void 0)?void 0:r.map(function(i,p){return t().createElement("div",{className:"".concat(a().flexRow," mt15"),key:p},t().createElement("div",{style:{lineHeight:"24px",flexShrink:0}},N[p]),t().createElement("div",{className:"".concat(a().answer," ml5")},t().createElement(x.Z,{value:i==null?void 0:i.choice_text})))}),g&&t().createElement("div",{className:"mt10 ".concat(a().answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",n==null?void 0:n.standard_answer_show))},de=function(){var r;return t().createElement("div",{className:a().answerWrap},t().createElement("div",{className:"".concat(a().flexRow," mt15")},n==null||((r=n.choices)===null||r===void 0)?void 0:r.map(function(i,p){return t().createElement(S.ZP,{disabled:!0,key:p},i==null?void 0:i.choice_text)})),g&&t().createElement("div",{className:"mt10 ".concat(a().answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",n==null?void 0:n.standard_answer_show))},oe=function(){var r;return t().createElement("div",{className:a().answerWrap},t().createElement("div",{className:"".concat(a().flexRow," mt15")},t().createElement(x.Z,{value:n==null||((r=n.program_attr)===null||r===void 0)?void 0:r.description})))},ue=function(){var r;return t().createElement("div",{className:a().answerWrap},g&&t().createElement("div",{className:"".concat(a().flexColumn," mt15")},n==null||((r=n.standard_answer)===null||r===void 0)?void 0:r.map(function(i,p){return t().createElement(x.Z,{key:p,value:"\u53C2\u8003\u7B54\u6848\uFF08\u586B\u7A7A".concat(i.position,"\uFF09\uFF1A").concat(i.answer_text.join("\u3001"))})})))},Ee=function(){var r;return t().createElement("div",{className:a().answerWrap},g&&t().createElement("div",{className:"mt15"},t().createElement("div",null,"\u53C2\u8003\u7B54\u6848\uFF1A"),t().createElement(x.Z,{value:n==null||((r=n.answer_texts)===null||r===void 0)?void 0:r[0]})))},ee=function(){var r;return t().createElement("div",{className:a().answerWrap},t().createElement("div",{className:"mt10"},"\u5173\u5361"),n==null||((r=n.shixun)===null||r===void 0)?void 0:r.map(function(i,p){return t().createElement("div",{className:"mt10 font14",key:p},p+1,". ",i==null?void 0:i.challenge_name)}))},te=function(){var r;return t().createElement("div",{className:a().answerWrap,style:{display:Q&&"none"}},n==null||((r=n.sub_questions)===null||r===void 0)?void 0:r.map(function(i,p){var ne,pe='<span style="margin-right: 10px">'.concat(U+1,".").concat(p+1,'</span><span>\uFF08\u5355\u9009\u9898\uFF09</span><span class="c-grey-999">\uFF08').concat(i.score,"\u5206\uFF09</span>");return t().createElement(y.Fragment,{key:i==null?void 0:i.id},t().createElement("div",{className:a().titleWrap,style:{marginTop:16}},t().createElement(x.Z,{className:a().titleHtml,value:pe+i.name})),i==null||((ne=i.choices)===null||ne===void 0)?void 0:ne.map(function(_e,ve){return t().createElement("div",{className:"".concat(a().flexRow," mt15"),key:ve},t().createElement("div",{style:{lineHeight:"24px",flexShrink:0}},N[ve]),t().createElement("div",{className:"".concat(a().answer," ml5")},t().createElement(x.Z,{value:_e==null?void 0:_e.choice_text})))}),g&&t().createElement("div",{className:"mt10 ".concat(a().answerText)},"\u53C2\u8003\u7B54\u6848\uFF1A",i==null?void 0:i.standard_answer_show))}))},$=function(){var r={SINGLE:ie,MULTIPLE:ie,JUDGMENT:de,PROGRAM:oe,COMPLETION:ue,SUBJECTIVE:Ee,PRACTICAL:ee,COMBINATION:te};return r[W]?r[W]():null},I=function(r,i){var p,ne='<span style="margin-right: -10px">'.concat(i+1,'\u3001</span><span class="c-grey-999">\uFF08').concat((r==null?void 0:r.item_type)==="combination"?"\u5171".concat(r==null||((p=r.sub_questions)===null||p===void 0)?void 0:p.length,"\u5C0F\u9898\uFF0C"):"").concat(r.score,"\u5206\uFF09</span> ");return ne};return t().createElement("div",{onMouseEnter:function(){return G(n.id)}},u===n.id&&t().createElement("div",{className:a().action},t().createElement("div",{className:a().setScore,onClick:function(){return j(n.id,h,n==null?void 0:n.shixun,n.score,n)}},"\u8BBE\u7F6E\u5F97\u5206"),t().createElement("div",{className:a().delete,onClick:function(){return V(n.id)}},"\u5220\u9664")),t().createElement("div",{className:a().content},t().createElement("div",{className:a().titleWrap,style:{justifyContent:"space-between"}},t().createElement(x.Z,{className:a().titleHtml,value:I(n,U)+((n==null?void 0:n.item_type)==="combination"?"\uFF08\u9898\u5E72\uFF09":"")+(n.name||(n==null?void 0:n.shixun_name))}),(n==null?void 0:n.item_type)==="combination"&&!b&&t().createElement("span",{onClick:function(r){Y(!Q)},style:{textAlign:"end",flexShrink:0}},Q?"\u5C55\u5F00":"\u6536\u8D77")),$()))};K.Z=f},43406:function(D,K,e){"use strict";e.d(K,{t:function(){return f}});var z=e(91896),S=e(57663),F=e(71577),y=e(12924),t=e.n(y),x=e(78632),R=e.n(x),a=e(94184),N=e.n(a),f=function(E){var U=E.cancelText,h=U===void 0?"\u53D6\u6D88":U,W=E.okText,s=W===void 0?"\u786E\u5B9A":W,n=E.loading,u=n===void 0?!1:n,b=E.hasOkBtn,Z=b===void 0?!0:b,j=E.okButtonProps,k=j===void 0?{}:j,V=E.onCancel,J=V===void 0?function(){}:V,G=E.onOk,X=G===void 0?function(){}:G,g=E.className,H=g===void 0?"":g;return t().createElement("div",{className:N()(R().buttonFixed,H)},t().createElement("div",{className:R().buttonWrap},t().createElement(F.Z,{size:"large",className:"".concat(R().button," mr20"),onClick:J},h),Z&&t().createElement(F.Z,(0,z.Z)({size:"large",type:"primary",className:"".concat(R().button," mr20"),loading:u,onClick:X},k),s)))}},13618:function(D,K,e){"use strict";var z=e(57663),S=e(71577),F=e(22385),y=e(31097),t=e(11849),x=e(94657),R=e(12924),a=e.n(R),N=e(32973),f=e.n(N),A=e(21059),E=e(60698),U=e(9671);K.Z=function(h){var W=h.name,s=h.data,n=h.theme,u=h.type,b=h.filename,Z=h.monacoEditor,j=h.className,k=h.style,V=h.close,J=h.onClose,G=h.hasMask,X=(0,R.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),g=(0,x.Z)(X,2),H=g[0],le=g[1],Q=(0,R.useState)(""),Y=(0,x.Z)(Q,2),ie=Y[0],de=Y[1],oe,ue=1024*1024,Ee=10*ue,ee=(0,R.useRef)();u==="office"&&(oe=(0,U.en)(s).filesize,oe>Ee&&(u="other")),b&&(Z.filename=b),(0,R.useEffect)(function(){var I,P,r=(I=document.cookie)===null||I===void 0||((P=I.replace(/\s/g,""))===null||P===void 0)?void 0:P.split(";");r==null||r.map(function(i){var p=i.split("=");p[0]==="_educoder_session"&&de(p[1])})},[]);var te=function(){if(s.startsWith("http")||s.startsWith("/")){$();return}(0,U.Sv)(b||"educoder",s,b)},$=function(){(0,U.Nd)(b||W,s)};return console.log("data:",s,"fileanme:",b," name:",W),a().createElement("div",{style:(0,t.Z)({},k||{}),className:"".concat(G&&f().bgBlack," ").concat(u?f().wrp:"hide")},V&&a().createElement("div",{className:f().close,ref:ee},a().createElement(y.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:function(){return ee.current}},a().createElement("span",{onClick:$},a().createElement("i",{className:"icon-quxiaozhiding"}))),a().createElement(y.Z,{title:"\u5173\u95ED",getPopupContainer:function(){return ee.current}},a().createElement("span",{className:"",onClick:J},a().createElement("i",{className:"icon-guanbi1"})))),a().createElement("div",{className:"".concat(f()[j]," ").concat(j," ").concat(f().monaco," ").concat(u==="txt"?"show":"hide")},u==="txt"&&a().createElement(E.ZP,Z)),u==="audio"&&a().createElement("audio",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?s:"data:audio/mp3;base64,").concat(s),autoPlay:!0}),u==="video"&&a().createElement(a().Fragment,null,s!=null&&s.startsWith("/")?a().createElement("video",{controls:!0,src:"".concat(s),autoPlay:!0}):a().createElement("video",{controls:!0,src:"data:video/mp4;base64,".concat(s),autoPlay:!0})),u==="html"&&a().createElement("iframe",{src:s+"&disposition=inline"}),u==="pdf"&&a().createElement("embed",{className:f().embed,src:s}),u==="image"&&a().createElement(a().Fragment,null,a().createElement("img",{src:"".concat(s!=null&&s.startsWith("/")||(s==null?void 0:s.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(s)})),u==="other"&&a().createElement("div",null,a().createElement(S.Z,{type:"primary",size:"large",onClick:te},a().createElement(A.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),(u==="download"||u==="office")&&a().createElement(S.Z,{type:"primary",size:"large",onClick:te},a().createElement(A.Z,null),"\u70B9\u51FB\u4E0B\u8F7D"))}},10296:function(D,K,e){"use strict";e.d(K,{Z:function(){return be}});var z=e(49111),S=e(76960),F=e(57663),y=e(71577),t=e(11849),x=e(3182),R=e(94657),a=e(94043),N=e.n(a),f=e(12924),A=e.n(f),E=e(47084),U=e.n(E),h=e(90621);function W(o,l){var _=o.match(/^(\s+)(?:```)/);if(_===null)return l;var m=_[1];return l.split(`
|
|
`).map(function(O){var T=O.match(/^\s+/);if(T===null)return O;var q=(0,R.Z)(T,1),se=q[0];return se.length>=m.length?O.slice(m.length):O}).join(`
|
|
`)}var s=[],n=["<ul>"],u=new(U()).Renderer,b=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function Z(){s.length=0,n=["<ul>"]}var j={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function k(o,l,_,m){if(l>=o.length||o[l].level<=_)return l;var O=o[l];m.push("<li><a href='#"+O.anchor+"'>"+O.text+"</a>"),l++;var T=[];return l=k(o,l,O.level,T),T.length>0&&(m.push("<ul>"),T.forEach(function(q){m.push(q)}),m.push("</ul>")),m.push("</li>"),l=k(o,l,_,m),l}function V(){return k(s,0,0,n),n.push("</ul>"),n.join("")}var J={heading:function(l){var _=b.exec(l);if(_)return{type:"heading",raw:_[0],depth:_[1].length,text:_[2]}},fences:function(l){var _=this.rules.block.fences.exec(l);if(_){var m=_[0],O=W(m,_[3]||""),T=_[2]?_[2].trim():_[2];if(["latex","katex","math"].indexOf(T)>=0){var q=g(),se=O;O=q,H[q]={type:"block",expression:se}}return{type:"code",raw:m,lang:T,text:O}}}},G=/(?:\${2})([^\n`]+?)(?:\${2})/gi,X=0,g=function(){return"__special_katext_id_".concat(X++,"__")},H={};function le(){return H}function Q(){X=0,H={}}function Y(o){return o=o.replace(G,function(l,_){var m=g();return H[m]={type:"inline",expression:_},m}),o}var ie=u.listitem;u.listitem=function(o){return ie(Y(o))};var de=u.paragraph;u.paragraph=function(o){return de(Y(o))};var oe=u.tablecell;u.tablecell=function(o,l){return oe(Y(o),l)},u.code=function(o,l,_){var m=(l||"").match(/\S*/)[0];return m?["latex","katex","math"].indexOf(m)>=0?"<p class='editormd-tex'>".concat(o,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(l,'">').concat(_?o:(0,h.escape)(o,!0),`</code></pre>
|
|
`):'<pre class="prettyprint linenums"><code>'+(_?o:(0,h.escape)(o,!0))+"</code></pre>"},u.heading=function(o,l,_){var m=this.options.headerPrefix+_.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return s.push({anchor:m,level:l,text:o}),"<h"+l+' id="'+m+'">'+o+"</h"+l+">"},U().setOptions({silent:!0,gfm:!0,pedantic:!1}),U().use({tokenizer:J,renderer:u});var ue=U(),Ee=e(11771),ee=e(67631),te=e.n(ee),$=e(42849),I=e(20527),P=e(13618),r=e(13886),i=e(50290),p=e(85825),ne=e(43060),pe=e.n(ne),_e=/<pre[^>]*>/g;function ve(o){var l=document.createElement("div");return l.innerHTML=o,l.childNodes.length===0?"":l.childNodes[0].nodeValue}var be=function(o){var l=o.value,_=l===void 0?"":l,m=o.edit,O=m===void 0?!1:m,T=o.className,q=o.showTextOnly,se=o.showLines,Ue=o.replaces,De=o.zoomImg,je=o.hasMask,ge=o.style,Re=ge===void 0?{}:ge,Oe=o.stylesPrev,Te=Oe===void 0?{}:Oe,ce=String(_),L=(0,f.useRef)(),ae=(0,f.useRef)(),Le=(0,f.useState)(""),Me=(0,R.Z)(Le,2),fe=Me[0],me=Me[1],Ne=(0,f.useState)("office"),Ce=(0,R.Z)(Ne,2),Ie=Ce[0],he=Ce[1],we=function(){var c=new p.zN(ae.current);c.displayMode="popup",c.addRenderEventListener(function(){var w=(0,x.Z)(N().mark(function d(B){var v;return N().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:return L.current.style.display="none",C.next=3,(0,r.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:B}});case 3:v=C.sent,v!=null&&v.id&&Ue(ae.current.getAttribute("src").replace($.Z.API_SERVER,""),"/api/attachments/".concat(v==null?void 0:v.id,"?type=").concat(v.content_type));case 5:case"end":return C.stop()}},d)}));return function(d){return w.apply(this,arguments)}}()),c.show()},Be=function(){var c=new i.hP(ae.current);c.settings.displayMode="popup",c.addEventListener("render",function(){var w=(0,x.Z)(N().mark(function d(B){var v;return N().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:if(L.current.style.display="none",!ae.current){C.next=6;break}return C.next=4,(0,r.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:"educoder.png",file:B.dataUrl}});case 4:v=C.sent,v!=null&&v.id&&Ue(ae.current.getAttribute("src").replace($.Z.API_SERVER,""),"/api/attachments/".concat(v==null?void 0:v.id,"?type=").concat(v.content_type));case 6:case"end":return C.stop()}},d)}));return function(d){return w.apply(this,arguments)}}()),c.show(),window.markerArea=c},Pe=(0,f.useMemo)(function(){L.current&&(L.current.style.zIndex=-1);try{var M=/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,c=/\"\/api\/attachments\/|\"\/attachments\/download\//g,w=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g;ce=ce.replace(M,"("+$.Z.API_SERVER+"/api/attachments/").replace(c,'"'+$.Z.API_SERVER+"/api/attachments/").replace(w,'"'+$.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,`
|
|
`)}catch(xe){}var d=ue(ce),B=le();if(ce.match(/\[TOC\]/)&&(d=d.replace("<p>[TOC]</p>",V()),Z()),d=d.replace(/(__special_katext_id_\d+__)/g,function(xe,C){var Ae=B[C],We=Ae.type,Ze=Ae.expression;return(0,I.renderToString)(ve(Ze)||"",{displayMode:We==="block",throwOnError:!1,output:"html"})}),d=d.replace(/▁/g,"\u2581\u2581\u2581"),Q(),q){var v=document.createElement("div");return v.innerHTML=d,v.innerText}return setTimeout(function(){return Se()},500),d},[ce]),re=(0,f.useRef)();j.WebkitLineClamp=se,se&&(Re=(0,t.Z)((0,t.Z)({},Re),j));function ye(M){var c=M.target;if(c.tagName.toUpperCase()==="IMG"){if(De){var w=c.getAttribute("src");me(w),he("image")}}else if(c.tagName.toUpperCase()==="A"){var d=c.getAttribute("href");if(d.indexOf("office")>-1)M.preventDefault(),me(d),he("office");else if(d.indexOf("application/pdf")>-1)M.preventDefault(),me(d),he("pdf");else if(d.indexOf("text/html")>-1)M.preventDefault(),me(d),he("html");else if(d.startsWith("#")){M.preventDefault();var B=document.getElementById(d.replace("#",""));B&&B.scrollIntoView(!0)}}}var Se=function(){var c,w=(c=re.current)===null||c===void 0?void 0:c.querySelectorAll("video");w==null||w.forEach(function(d){if(d.oncontextmenu=function(){return!1},d.src.indexOf(".m3u8")>-1&&!d.canPlayType("application/vnd.apple.mpegurl")){if(te().isSupported()){var B=new(te());B.loadSource(d.src),B.attachMedia(d)}}})};(0,f.useEffect)(function(){if(re.current&&Pe&&(Pe.match(_e)&&window.PR.prettyPrint()),re.current)return re.current.addEventListener("click",ye),function(){re.current.removeEventListener("click",ye),Q(),Z()}},[Pe,re.current,ye]);var Fe=function(c){if(!O)return;c.target.nodeName==="IMG"?(L.current.style.zIndex=1,L.current.style.display="flex",L.current.style.width=c.target.clientWidth+"px",L.current.style.height=c.target.clientHeight+"px",L.current.style.top=c.target.offsetTop+"px",L.current.style.left=c.target.offsetLeft+"px",ae.current.src=c.target.getAttribute("src")):L.current.style.display="none"};return A().createElement("div",{style:{position:"relative"}},A().createElement("div",{ref:re,style:(0,t.Z)({},Re),className:"".concat(T||""," markdown-body ").concat(pe().mdBody),onMouseOver:Fe,dangerouslySetInnerHTML:{__html:Pe}}),A().createElement("div",{ref:L,className:pe().button},A().createElement(S.Z,null,A().createElement(y.Z,{onClick:function(){return we()}},"\u88C1\u526A"),A().createElement(y.Z,{onClick:function(){return Be()}},"\u7F16\u8F91"))),A().createElement("img",{ref:ae,src:"",alt:"sample",crossOrigin:"anonymous",style:{maxWidth:"90%",opacity:0,position:"absolute",zIndex:-1}}),A().createElement(P.Z,{close:!0,data:fe,type:fe!=null&&fe.length?Ie:"",style:(0,t.Z)({},Te),onClose:function(){return me("")}}))}}}]);
|