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.
2 lines
15 KiB
2 lines
15 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9716],{31667:function(Z,_){_.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},77353:function(Z,_,l){l.d(_,{Z:function(){return p}});var t=l(63144),r={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},d=l(59301),p=({message:h,className:s,children:E,style:b={}})=>d.createElement("div",{className:`custom-spinner ${r.idsRingWrapper} ${s}`},d.createElement("div",{className:r.ldsRing},d.createElement("div",null),d.createElement("div",null),d.createElement("div",null),d.createElement("div",null)),h?d.createElement("p",{style:b},h):null,E,d.createElement(t.Outlet,null))},19137:function(Z,_,l){l.d(_,{Z:function(){return s}});var t=l(59301),r={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},d=l(92310),p=l.n(d),s=({className:E,style:b={},leftNode:C,leftTitle:D="\u81EA\u6D4B\u8F93\u5165",rightNode:$,rightTitle:e="\u8FD0\u884C\u7ED3\u679C"})=>t.createElement("div",{className:p()(r.result,E),style:b},t.createElement("div",{className:r.left},t.createElement("div",{className:r.title},t.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),t.createElement("span",null,D)),t.createElement("div",{className:r.leftNode},C)),t.createElement("div",{className:r.right},t.createElement("div",{className:r.title},t.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),t.createElement("span",null,e)),t.createElement("div",{className:r.rightNode},$)))},57036:function(Z,_,l){l.r(_),l.d(_,{default:function(){return H}});var t=l(59301),r=l(31667),d=l(46961),p=l(63144),h=l(71418),s=l(68155),E=l(44475),b=l(90612),C=l(24334),D=l(99232),$=l.n(D),e=(N,x,F)=>new Promise((j,O)=>{var R=v=>{try{y(F.next(v))}catch(T){O(T)}},A=v=>{try{y(F.throw(v))}catch(T){O(T)}},y=v=>v.done?j(v.value):Promise.resolve(v.value).then(R,A);y((F=F.apply(N,x)).next())}),H=()=>{const{submitId:N,id:x}=(0,p.useParams)(),[F,j]=(0,t.useState)(void 0);console.log((0,p.useLocation)(),33);const O=(0,p.useLocation)();function R(){var P;p.history.push(`/problems/${x}/oj/${(P=O==null?void 0:O.query)==null?void 0:P.backId}?tab=1`)}(0,t.useEffect)(()=>((0,p.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,p.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,t.useEffect)(()=>{document.title="\u5728\u7EBF\u5237\u9898"}),(0,t.useEffect)(()=>{N&&function(){return e(this,null,function*(){const M=yield(0,s.X6)(N);j(M.data)})}()},[N]);const{status:A,created_at:y,code:v,name:T,language:U,pass_sets_count:n,set_count:u,error_msg:X,output:k,input:K,expected_output:a,execute_memory:o,user:i,execute_time:g,input_file_url:f,output_file_url:B,is_file:m,expected_output_file_url:L}=F||{};return t.createElement(h.Z,{spinning:!F,delay:500},t.createElement("div",{className:"record-detail-info"},F?t.createElement(t.Fragment,null,t.createElement("header",{className:r.Z.header},t.createElement("div",null,t.createElement("img",{src:`${d.Z.IMG_SERVER}/images/${i.image_url}`,alt:"user",width:30}),t.createElement("span",null,i.name)),t.createElement("h2",null," ",T," "),t.createElement("button",{className:"ant-btn",onClick:R,style:{border:"1px solid #bacffe",color:"#3061d0"}},"\u8FD4\u56DE\u8BE5\u9898")),t.createElement("div",{className:"record-detail-body"},t.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),t.createElement("ul",{className:"record-info"},t.createElement("li",null," \u72B6\u6001\uFF1A",t.createElement("span",{className:A===0?"c-green":"c-red"},E.Im[A])," "),t.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",t.createElement("span",null,$()(y).format("YYYY-MM-DD HH:mm:ss"))," "),t.createElement("li",null," \u8BED\u8A00\uFF1A",t.createElement("span",null,U)," "),t.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",t.createElement("span",null,g*1e3,"ms")," "),t.createElement("li",null," ",`${n} / ${u} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,E.gZ)({status:A,error_msg:X,execute_time:g,output:k,input:K,expected_output:a,input_file_url:f,output_file_url:B,is_file:m,expected_output_file_url:L}),t.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),t.createElement(b.ZP,{height:"200px",width:"100%",language:U==null?void 0:U.toLocaleLowerCase(),value:C.Base64.decode(v),options:{readOnly:!0}}))):null))}},44475:function(Z,_,l){l.d(_,{Im:function(){return U},ZP:function(){return K},gZ:function(){return X}});var t=l(59301),r=l(98135),d=l(3113),p=l(43501),h=l(53547),s=l(26132),E=l(24334),b=l(77353),C=l(31272),D=l(15826),$=l(19137),e=l(59301),H=Object.defineProperty,N=Object.defineProperties,x=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,j=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,R=(a,o,i)=>o in a?H(a,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[o]=i,A=(a,o)=>{for(var i in o||(o={}))j.call(o,i)&&R(a,i,o[i]);if(F)for(var i of F(o))O.call(o,i)&&R(a,i,o[i]);return a},y=(a,o)=>N(a,x(o));const{TextArea:v}=r.default,T={visible:!1,tabIndex:"0"},U={[s.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[s.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var n=(a=>(a[a.SET_VISIBLE=0]="SET_VISIBLE",a[a.SET_TABINDEX=1]="SET_TABINDEX",a))(n||{});function u(a,o){switch(o.type){case 0:return y(A({},a),{visible:o.payload});case 1:return y(A({},a),{tabIndex:o.payload});default:throw new Error}}function X(a){const{status:o,error_msg:i,output:g,input:f,expected_output:B,is_file:m,input_file_url:L,output_file_url:P,expected_output_file_url:M}=a;let I=null;const c={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(o){case s.h.NOMATCH:I=e.createElement(e.Fragment,null,e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!m&&e.createElement(C.Z,{value:f,style:c}),m&&e.createElement("div",{style:c},e.createElement("a",{onClick:()=>(0,D.LR)(L,f)},f)),e.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!m&&e.createElement(C.Z,{value:g&&E.Base64.decode(g)||"",style:c}),m&&e.createElement("div",{style:c},e.createElement("a",{onClick:()=>(0,D.LR)(P,g)},g)),e.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!m&&e.createElement(C.Z,{value:B&&E.Base64.decode(B)||"",style:c}),m&&e.createElement("div",{style:c},e.createElement("a",{onClick:()=>(0,D.LR)(M,B)},B)));break;case s.h.EXECUTEFAILURE:I=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!m&&e.createElement(C.Z,{value:f,style:c}),m&&e.createElement("div",{style:c},e.createElement("a",{onClick:()=>(0,D.LR)(L,f)},f)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},E.Base64.decode(i)));break;case s.h.COMPILEFAILURE:I=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!m&&e.createElement(C.Z,{value:f,style:c}),m&&e.createElement("div",{style:c},e.createElement("a",{onClick:()=>(0,D.LR)(L,f)},f)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},E.Base64.decode(i)));break;case s.h.PODFAILURE:I=e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.h.TIMEOUT:I=e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return e.createElement(e.Fragment,null," ",I," ")}function k(a){const{status:o,error_msg:i,execute_time:g,output:f,input:B,expected_output:m,is_file:L,input_file_url:P,output_file_url:M,expected_output_file_url:I}=a;let c=null;switch(o){case s.h.OK:c=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",g,"\u79D2"),e.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),e.createElement("pre",null,E.Base64.decode(f)));break;case s.h.NOMATCH:c=e.createElement(e.Fragment,null,e.createElement("p",null,"\u8F93\u5165\uFF1A",e.createElement("pre",null,B)),e.createElement("p",null,"\u8F93\u51FA\uFF1A",f&&E.Base64.decode(f)),e.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",m&&E.Base64.decode(m)));break;case s.h.EXECUTEFAILURE:c=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",e.createElement("pre",null,B)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},E.Base64.decode(i)));break;case s.h.COMPILEFAILURE:c=e.createElement(e.Fragment,null,e.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",e.createElement("pre",null,B)),e.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),e.createElement("pre",{className:"error"},E.Base64.decode(i)));break;case s.h.PODFAILURE:c=e.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case s.h.TIMEOUT:c=e.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return e.createElement(e.Fragment,null," ",c," ")}var K=({id:a,is_file:o,input:i,debuging:g,submitting:f,executingMessage:B,debugResult:m,onChangeInput:L,onDebugCode:P,onSubmitCode:M})=>{const[I,c]=(0,t.useReducer)(u,T),{visible:S,tabIndex:G}=I;(0,t.useEffect)(()=>{c({type:0,payload:!1})},[a]);function J(Y){let w=Y.target.id;c({type:1,payload:w})}function z(){c({type:0,payload:!S})}const V=(0,t.useMemo)(()=>{if(m){const{status:Y}=m;return e.createElement(e.Fragment,null,k(m))}return null},[m]);function W(){c({type:0,payload:!0}),c({type:1,payload:"1"}),P()}return e.createElement("div",{className:"test-case-panel"},e.createElement("div",{className:`test-case-panel-body ${S?"active":""}`},e.createElement("ul",{className:"s-navs"},e.createElement("li",null,e.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),e.createElement($.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:e.createElement(v,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:o?"":i,onChange:L}),rightNode:g?e.createElement(b.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):m?V:e.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),e.createElement("a",{className:`btn-collapse ${S?"up":""}`,onClick:z},S?e.createElement(p.Z,null):e.createElement(h.Z,null)),e.createElement("footer",{className:"footer"},e.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),e.createElement("div",{className:"flex-container"},e.createElement(d.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),e.createElement(d.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),e.createElement(d.ZP,{className:"btn-green",type:"ghost",loading:g,onClick:W},"\u8C03\u8BD5\u4EE3\u7801"),e.createElement(d.ZP,{type:"primary",className:"custom-ant-disabled",loading:f,disabled:f,onClick:()=>{c({type:0,payload:!1}),M()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},26132:function(Z,_,l){l.d(_,{h:function(){return t}});var t=(r=>(r[r.NOMATCH=-1]="NOMATCH",r[r.OK=0]="OK",r[r.TIMEOUT=2]="TIMEOUT",r[r.PODFAILURE=3]="PODFAILURE",r[r.COMPILEFAILURE=4]="COMPILEFAILURE",r[r.EXECUTEFAILURE=5]="EXECUTEFAILURE",r))(t||{})},68155:function(Z,_,l){l.d(_,{H7:function(){return C},KC:function(){return N},M3:function(){return O},MK:function(){return b},MU:function(){return p},Rg:function(){return y},WH:function(){return x},X6:function(){return s},bM:function(){return d},bx:function(){return F},dd:function(){return e},de:function(){return T},fi:function(){return D},fu:function(){return r},gu:function(){return j},n4:function(){return $},qe:function(){return A},rL:function(){return v},rX:function(){return E},uc:function(){return U},vl:function(){return H},wO:function(){return R},zO:function(){return h}});var t=l(76265);function r(n){return(0,t.U2)(`mypractices/${n}.json`,{hidePopLogin:!0})}function d(n,u){return(0,t.v_)(`mypractices/${n}/code_submit.json`,u)}function p(n,u){return(0,t.v_)(`mypractices/${n}/code_debug.json`,u)}function h(n,u){return u.language&&(u.language=encodeURIComponent(u.language)),(0,t.U2)(`mypractices/${n}/submit_records.json`,u)}function s(n){return(0,t.U2)("mypractices/record_detail.json",{id:n})}function E(n,u){return(0,t.U2)(`mypractices/${n}/result.json`,{mode:u})}function b(n,u){return(0,t.v_)(`mypractices/${n}/add_notes.json`,u)}function C(n,u){return(0,t.v_)(`mypractices/${n}/restore_initial_code.json`,u)}function D(n,u){return(0,t.v_)(`mypractices/${n}/sync_code.json`,u)}function $(n,u){return(0,t.v_)(`mypractices/${n}/update_code.json`,u)}function e(n){return(0,t.v_)(`mypractices/${n}/initial_codes.json`)}function H(n,u){return(0,t.v_)(`discusses/${n}/plus.json`,u)}function N(n){return(0,t.U2)("practices/practices_list.json",n)}function x(n,u){return(0,t.U2)(`practices/${n}/question_solution_articles`,u)}function F(n,u){return(0,t.v_)(`practices/${n}/question_solution_articles`,u)}function j(n,u){return(0,t.gz)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}`,u)}function O(n,u){return(0,t.U2)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}/edit`,u)}function R(n,u){return(0,t.U2)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}`,u)}function A(n,u){return(0,t.v_)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}/set_authority_or_excellent`,u)}function y(n,u){return(0,t.v_)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}/praise_or_treads`,u)}function v(n,u){return(0,t.v_)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}/hide`)}function T(n,u){return(0,t.IV)(`practices/${n}/question_solution_articles/${u==null?void 0:u.active}`,u)}function U(n,u){return(0,t.v_)(`mypractices/${n}/update_practice_time_sum`,u)}}}]);
|