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__Paperlibrary__Random__Ed...

2 lines
44 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([[152],{BkJg:function(we,ye,f){"use strict";f.r(ye),f.d(ye,"questionType",function(){return Ne}),f.d(ye,"difficultType",function(){return Qe});var Ze=f("y8nQ"),re=f("Vl3Y"),Ye=f("IzEo"),Be=f("bx4M"),Xe=f("T2oS"),Ke=f("W9HT"),Fe=f("/zsF"),_e=f("PArb"),ze=f("sPJy"),Ce=f("bE4q"),Ge=f("+L6B"),de=f("2/Rp"),ke=f("PpiC"),z=f("9og8"),X=f("miYZ"),se=f("tsqr"),ae=f("jrin"),V=f("k1fw"),ue=f("fWQN"),ie=f("mtLc"),fe=f("yKVA"),le=f("879j"),te=f("FJo9"),ge=f("L41K"),ve=f("q1tI"),r=f.n(ve),Ve=f("qVdP"),Oe=f("jsC+"),be=f("7Kak"),G=f("9yH6"),Le=f("14J3"),ee=f("BMrR"),K=f("jCWc"),N=f("kPKH"),ce=f("giR+"),$=f("fyUT"),oe=f("oBTY"),Te=f("lUTK"),me=f("BvKs"),He=f("5NDa"),Ae=f("5rEg"),We=f("2BaD"),De=f("55Ip"),Me=function(){return r.a.createElement("div",{style:{textAlign:"right",fontSize:12,color:"#ccc",marginTop:95}},"\u5982\u8003\u5BDF\u8303\u56F4\u4E0D\u80FD\u6EE1\u8DB3\u9700\u6C42\uFF0C\u8BF7\u81EA\u884C\u8865\u5145\u8BD5\u9898\u5145\u5B9E\u8003\u5BDF\u8303\u56F4",r.a.createElement(De.Link,{to:"/problemset",target:"_blank",style:{marginLeft:10,color:"#1890FF"}},"\u73B0\u5728\u5C31\u53BB"))},je=Me,c=f("Eaj2"),o=f.n(c),l=f("P/tu");function y(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */y=function(){return U};var F,U={},j=Object.prototype,_=j.hasOwnProperty,a=Object.defineProperty||function(n,e,t){n[e]=t.value},L=typeof Symbol=="function"?Symbol:{},p=L.iterator||"@@iterator",h=L.asyncIterator||"@@asyncIterator",b=L.toStringTag||"@@toStringTag";function d(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{d({},"")}catch(n){d=function(t,i,u){return t[i]=u}}function g(n,e,t,i){var u=e&&e.prototype instanceof B?e:B,s=Object.create(u.prototype),R=new Re(i||[]);return a(s,"_invoke",{value:Je(n,t,R)}),s}function w(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(i){return{type:"throw",arg:i}}}U.wrap=g;var A="suspendedStart",O="suspendedYield",C="executing",D="completed",E={};function B(){}function m(){}function P(){}var I={};d(I,p,function(){return this});var k=Object.getPrototypeOf,H=k&&k(k(Ue([])));H&&H!==j&&_.call(H,p)&&(I=H);var Q=P.prototype=B.prototype=Object.create(I);function xe(n){["next","throw","return"].forEach(function(e){d(n,e,function(t){return this._invoke(e,t)})})}function Ee(n,e){function t(u,s,R,T){var M=w(n[u],n,s);if(M.type!=="throw"){var Z=M.arg,J=Z.value;return J&&typeof J=="object"&&_.call(J,"__await")?e.resolve(J.__await).then(function(q){t("next",q,R,T)},function(q){t("throw",q,R,T)}):e.resolve(J).then(function(q){Z.value=q,R(Z)},function(q){return t("throw",q,R,T)})}T(M.arg)}var i;a(this,"_invoke",{value:function(s,R){function T(){return new e(function(M,Z){t(s,R,M,Z)})}return i=i?i.then(T,T):T()}})}function Je(n,e,t){var i=A;return function(u,s){if(i===C)throw new Error("Generator is already running");if(i===D){if(u==="throw")throw s;return{value:F,done:!0}}for(t.method=u,t.arg=s;;){var R=t.delegate;if(R){var T=Ie(R,t);if(T){if(T===E)continue;return T}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(i===A)throw i=D,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);i=C;var M=w(n,e,t);if(M.type==="normal"){if(i=t.done?D:O,M.arg===E)continue;return{value:M.arg,done:t.done}}M.type==="throw"&&(i=D,t.method="throw",t.arg=M.arg)}}}function Ie(n,e){var t=e.method,i=n.iterator[t];if(i===F)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=F,Ie(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),E;var u=w(i,n.iterator,e.arg);if(u.type==="throw")return e.method="throw",e.arg=u.arg,e.delegate=null,E;var s=u.arg;return s?s.done?(e[n.resultName]=s.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=F),e.delegate=null,E):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,E)}function $e(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function Pe(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function Re(n){this.tryEntries=[{tryLoc:"root"}],n.forEach($e,this),this.reset(!0)}function Ue(n){if(n||n===""){var e=n[p];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,i=function u(){for(;++t<n.length;)if(_.call(n,t))return u.value=n[t],u.done=!1,u;return u.value=F,u.done=!0,u};return i.next=i}}throw new TypeError(typeof n+" is not iterable")}return m.prototype=P,a(Q,"constructor",{value:P,configurable:!0}),a(P,"constructor",{value:m,configurable:!0}),m.displayName=d(P,b,"GeneratorFunction"),U.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===m||(e.displayName||e.name)==="GeneratorFunction")},U.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,P):(n.__proto__=P,d(n,b,"GeneratorFunction")),n.prototype=Object.create(Q),n},U.awrap=function(n){return{__await:n}},xe(Ee.prototype),d(Ee.prototype,h,function(){return this}),U.AsyncIterator=Ee,U.async=function(n,e,t,i,u){u===void 0&&(u=Promise);var s=new Ee(g(n,e,t,i),u);return U.isGeneratorFunction(e)?s:s.next().then(function(R){return R.done?R.value:s.next()})},xe(Q),d(Q,b,"Generator"),d(Q,p,function(){return this}),d(Q,"toString",function(){return"[object Generator]"}),U.keys=function(n){var e=Object(n),t=[];for(var i in e)t.push(i);return t.reverse(),function u(){for(;t.length;){var s=t.pop();if(s in e)return u.value=s,u.done=!1,u}return u.done=!0,u}},U.values=Ue,Re.prototype={constructor:Re,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=F,this.done=!1,this.delegate=null,this.method="next",this.arg=F,this.tryEntries.forEach(Pe),!e)for(var t in this)t.charAt(0)==="t"&&_.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=F)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(Z,J){return R.type="throw",R.arg=e,t.next=Z,J&&(t.method="next",t.arg=F),!!J}for(var u=this.tryEntries.length-1;u>=0;--u){var s=this.tryEntries[u],R=s.completion;if(s.tryLoc==="root")return i("end");if(s.tryLoc<=this.prev){var T=_.call(s,"catchLoc"),M=_.call(s,"finallyLoc");if(T&&M){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(T){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!M)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i];if(u.tryLoc<=this.prev&&_.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var s=u;break}}s&&(e==="break"||e==="continue")&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var R=s?s.completion:{};return R.type=e,R.arg=t,s?(this.method="next",this.next=s.finallyLoc,E):this.complete(R)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),Pe(i),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var u=i.completion;if(u.type==="throw"){var s=u.arg;Pe(i)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:Ue(e),resultName:t,nextLoc:i},this.method==="next"&&(this.arg=F),E}},U}var x=Ae.a.TextArea,v=me.a.SubMenu,S=function(U){return!U||Number.isNaN(Number(U))?"":Math.ceil(U)},W=function(F){Object(fe.a)(j,F);var U=Object(le.a)(j);function j(){var _;Object(ue.a)(this,j);for(var a=arguments.length,L=new Array(a),p=0;p<a;p++)L[p]=arguments[p];return _=U.call.apply(U,[this].concat(L)),_.state={titleLen:0,subDisciplinesList:[],allGroupList:[],selectGroupList:[],openKeys:[],visible:null},_.componentDidMount=function(){setTimeout(Object(z.a)(y().mark(function h(){return y().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(!_.props.form){d.next=3;break}return d.next=3,_.setState({subDisciplinesList:_.props.form.getFieldValue("subDisciplines")||[]});case 3:case"end":return d.stop()}},h)})),1e3)},_.subDisciplinesAdd=function(h){var b=[],d=_.props.form.getFieldValue("subDisciplines")||[],g=d.filter(function(w){return h.id===w.id}).length>0;g?b=d.filter(function(w){return h.id!==w.id}):b=[].concat(Object(oe.a)(d),[h]),_.props.form.setFieldsValue({subDisciplines:b}),_.setState({subDisciplinesList:b})},_.disciplinesRemove=function(h){var b=_.props.form.getFieldValue("subDisciplines")||[],d=b.filter(function(g){return g.id!==h.id});_.props.form.setFieldsValue({subDisciplines:d}),_.setState({subDisciplinesList:d})},_.handleSourceRadioChange=function(h){_.props.getdisciplines(h.target.value);var b=[];_.props.form.setFieldsValue({subDisciplines:b}),_.setState({subDisciplinesList:b})},_.dealList=function(){for(var h=_.state.subDisciplinesList,b=Object(oe.a)(h),d=0,g=[],w=0;w<b.length;w++){for(var A="",O=0;O<g.length;O++)if(g[O][0].parent_name==b[w].parent_name){d=1,A=O;break}if(d==1)g[A].push(b[w]),d=0;else if(d==0){var C=new Array;C.push(b[w]),g.push(C)}}return g},_}return Object(ie.a)(j,[{key:"render",value:function(){var a=this;if(!this.props.form)return"";var L=this.props,p=L.disciplines,h=L.form,b=h.getFieldDecorator,d=h.getFieldValue,g=this.state,w=g.subDisciplinesList,A=g.allGroupList,O=g.selectGroupList,C=g.openKeys,D=g.visible;return r.a.createElement("div",null,r.a.createElement(re.a.Item,{label:"\u8BD5\u5377\u540D\u79F0:",name:"name",rules:[{required:!0,message:"\u8BD5\u5377\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A"}]},r.a.createElement(Ae.a,{style:{height:38},placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u6807\u9898\uFF0C\u6700\u591A60\u5B57",suffix:this.state.titleLen+"/60",onChange:function(B){a.setState({titleLen:d("name").length})},maxLength:60})),r.a.createElement(ee.a,{align:"middle"},r.a.createElement(N.a,null,r.a.createElement(re.a.Item,{label:"\u8003\u8BD5\u65F6\u957F:",name:"time",rules:[{required:!0,message:"\u8003\u8BD5\u65F6\u957F\u4E0D\u80FD\u4E3A\u7A7A"}]},r.a.createElement($.a,{min:1,max:9999,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u5377\u8003\u8BD5\u65F6\u957F",style:{width:150}}))),r.a.createElement(N.a,{flex:1},r.a.createElement("span",{style:{marginLeft:8,top:2,position:"relative"}},"\u5206\u949F"))),r.a.createElement(re.a.Item,{label:"\u96BE\u5EA6",name:"difficulty",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u96BE\u5EA6"}]},r.a.createElement(G.a.Group,{style:{display:"flex",width:400,justifyContent:"space-between",marginBottom:6},size:"large",buttonStyle:"solid"},r.a.createElement(G.a.Button,{style:{width:120,textAlign:"center",borderRadius:50,overflow:"hidden"},value:1},"\u7B80\u5355"),r.a.createElement(G.a.Button,{style:{width:120,textAlign:"center",borderRadius:50,overflow:"hidden"},value:2},"\u9002\u4E2D"),r.a.createElement(G.a.Button,{style:{width:120,textAlign:"center",borderRadius:50,overflow:"hidden"},value:3},"\u56F0\u96BE"))),r.a.createElement(re.a.Item,{label:"\u8003\u8BD5\u987B\u77E5",name:"exam_notes"},r.a.createElement(x,{rows:4,maxLength:300})),r.a.createElement(re.a.Item,{label:r.a.createElement("span",null,"\u8BD5\u9898\u6765\u6E90",r.a.createElement("span",{className:"font12 c-grey-999"},"\uFF08\u4E3A\u4FDD\u8BC1\u8003\u5BDF\u51C6\u786E\u6027\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u6211\u521B\u5EFA\u7684\uFF09")),name:"source",style:{width:"100%"},rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BD5\u9898\u6765\u6E90"}]},r.a.createElement(G.a.Group,{style:{display:"flex",width:368,justifyContent:"space-between"},onChange:function(B){a.handleSourceRadioChange(B)}},r.a.createElement(G.a,{value:1},"\u4EC5\u6211\u521B\u5EFA\u7684"),r.a.createElement(G.a,{value:0},"\u516C\u5171\u9898\u5E93+\u6211\u521B\u5EFA\u7684"))),r.a.createElement(re.a.Item,{label:"\u8003\u67E5\u8303\u56F4\uFF1A",name:"subDisciplines",initialValue:[]},r.a.createElement("div",{style:{display:"inline-flex",flexWrap:"wrap"}},p.map(function(E,B){return r.a.createElement("div",{style:{marginRight:12},onMouseLeave:function(){return a.setState({openKeys:[],visible:null})}},r.a.createElement(Oe.a,{key:"disciplines"+E.id,placement:"bottomLeft",visible:B===D,getPopupContainer:function(P){return P.parentNode},overlay:r.a.createElement("div",null,E.sub_disciplines.length>0?r.a.createElement(me.a,{mode:"vertical",multiple:!0,selectedKeys:w==null?void 0:w.map(function(m){return String(m.id)}),subMenuCloseDelay:0,subMenuOpenDelay:0,openKeys:C,getPopupContainer:function(P){return P.parentNode}},E.sub_disciplines.map(function(m){var P;return r.a.createElement(v,{onTitleMouseEnter:function(){a.setState({openKeys:[String(m.id)]})},key:m.id,title:r.a.createElement("span",null,"".concat(m.name,"(").concat(m.item_count,")")),popupClassName:((P=m.tag_disciplines)===null||P===void 0?void 0:P.length)>10?o.a.maxHeiTag:""},Array.isArray(m.tag_disciplines)&&!!m.tag_disciplines.length?m.tag_disciplines.map(function(I){return r.a.createElement(me.a.Item,{key:I.id,onClick:function(){a.subDisciplinesAdd(I)}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}},I.name,"(",I.item_count,")"),r.a.createElement("span",null,I.type==="personal"?"\uFF08\u81EA\u7528\uFF09":"")))}):r.a.createElement(me.a.Item,null,"\u6682\u65E0\u6570\u636E"))})):r.a.createElement(Be.a,null,"\u6682\u65E0\u6570\u636E"))},r.a.createElement(de.a,{onMouseEnter:function(){return a.setState({visible:B,openKeys:[]})},style:{marginTop:6,marginBottom:6}},E.name)))}))),w.length>0?r.a.createElement("div",{style:{minHeight:150,backgroundColor:"#FAFAFA"}},r.a.createElement("div",{style:{paddingLeft:12,paddingTop:12}},"\u5DF2\u9009"),this.dealList().map(function(E,B){var m;return r.a.createElement(r.a.Fragment,{key:B},r.a.createElement("div",{style:{fontSize:14,paddingLeft:10,marginTop:6}},E==null||((m=E[0])===null||m===void 0)?void 0:m.parent_name),r.a.createElement("div",{style:{display:"flex",flexWrap:"wrap"}},E==null?void 0:E.map(function(P){return r.a.createElement("div",{key:"subDisciplinesList"+P.id},r.a.createElement(de.a,{style:{margin:"12px 6px",backgroundColor:"#F6FFED"},onClick:function(){a.disciplinesRemove(P)}},P.name,r.a.createElement(We.a,null)))})))})):null,r.a.createElement(re.a.Item,{initialValue:[],label:"\u8BD5\u9898\u6587\u4EF6\u5939:\uFF08\u9009\u4E2D\u9879\u4EC5\u5305\u62EC\u8BE5\u6587\u4EF6\u5939\u4E0B\u7684\u8BD5\u9898\uFF0C\u4E0D\u5305\u62EC\u5B50\u6587\u4EF6\u5939\uFF0C\u4E14\u7CFB\u7EDF\u53D6\u60A8\u9009\u4E2D\u7684\u6587\u4EF6\u5939\u548C\u8003\u67E5\u8303\u56F4\u4E2D\u7684\u8BD5\u9898\u7684\u4EA4\u96C6\u4F5C\u4E3A\u968F\u673A\u5BF9\u8C61\u3002\uFF09",name:"group_ids"},r.a.createElement(l.a,{multiple:!0})),r.a.createElement(je,null))}}]),j}(r.a.Component),Y=W,ne=f("ErOA"),pe=function(F){Object(fe.a)(j,F);var U=Object(le.a)(j);function j(){return Object(ue.a)(this,j),U.apply(this,arguments)}return Object(ie.a)(j,[{key:"render",value:function(){var a=this.props.form,L=a.getFieldDecorator,p=a.getFieldsValue,h=a.setFieldsValue,b=this.props.data,d=b.item_type,g=b.items_by_item_type,w=function(E){var B=E.difficult,m=E.count;return r.a.createElement("div",{style:{marginRight:10,lineHeight:"18px"}},r.a.createElement("div",{style:{fontSize:14,textAlign:"left"}},Qe[B]),r.a.createElement("div",{style:{fontSize:12,color:"#999999"}},"(\u5171 ",m," \u9898\u53EF\u9009)"))},A=p(),O=Object.keys(A).filter(function(D){return D.includes("".concat(d,"-"))&&A[D]}),C=0;return O.map(function(D){return C+=A[D],null}),r.a.createElement("div",null,r.a.createElement("div",null,r.a.createElement("span",{className:"font14"},Ne[d]),S(C)>0?r.a.createElement("span",{style:{color:"#999999",fontSize:12}},"\uFF08\u5DF2\u9009 ",S(C)," \u9898\uFF09"):null),g.map(function(D){return r.a.createElement("div",{key:d+D.discipline_id+D.sub_discipline_id},r.a.createElement("div",{style:{fontSize:16,margin:"16px 0px",fontWeight:"500"}},D.discipline_name," / ",D.sub_discipline_name," ",D.tag_discipline_name&&"/".concat(D.tag_discipline_name)),r.a.createElement("div",{className:o.a.formItem},D.items_by_item_type_and_tag_discipline.map(function(E){return r.a.createElement(re.a.Item,{label:r.a.createElement(w,{count:E.items_count,difficult:E.difficulty}),extra:r.a.createElement("span",{className:o.a.questionTip},"\u9898"),name:"count-".concat(d,"-").concat(D.sub_discipline_id,"-").concat(E.difficulty,"-").concat(D.tag_discipline_id),colon:!1,style:{width:"30%"},initialValue:0,key:"".concat(d,"-").concat(D.sub_discipline_id,"-").concat(E.difficulty)},r.a.createElement($.a,{min:0,max:E.items_count,formatter:S}))})))}))}}]),j}(r.a.Component),he=pe,ot=[{item_type:"MULTIPLE",items_by_item_type:[{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:3}]}]},{item_type:"SINGLE",items_by_item_type:[{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:10}]}]},{item_type:"JUDGMENT",items_by_item_type:[{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:2}]}]},{item_type:"PROGRAM",items_by_item_type:[{sub_discipline_id:13,sub_discipline_name:"\u4FE1\u53F7\u4E0E\u7CFB\u7EDF",discipline_id:8,discipline_name:"\u7535\u5B50\u6280\u672F",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:1}]},{sub_discipline_id:12,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:4}]},{sub_discipline_id:26,sub_discipline_name:"Python\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:1}]},{sub_discipline_id:23,sub_discipline_name:"Java\u7A0B\u5E8F\u8BBE\u8BA1",discipline_id:7,discipline_name:"\u7A0B\u5E8F\u8BBE\u8BA1\u8BED\u8A00",items_by_item_type_and_sub_discipline:[{difficulty:1,items_count:1}]}]}],qe=function(F){Object(fe.a)(j,F);var U=Object(le.a)(j);function j(_){var a;return Object(ue.a)(this,j),a=U.call(this,_),a.state={},a}return Object(ie.a)(j,[{key:"render",value:function(){var a=this.props.form,L=this.props.optinalData;return r.a.createElement("div",null,L.map(function(p,h){return r.a.createElement("div",{key:p.item_type},r.a.createElement(he,{form:a,data:p}),h===L.length-1?null:r.a.createElement(_e.a,null))}),r.a.createElement(je,null))}}]),j}(r.a.Component),et=qe,tt=function(U){var j=U.title,_=U.score,a=U.totalCount;return r.a.createElement("div",null,j,":",_&&_>0?r.a.createElement("span",{style:{marginLeft:4,color:"#999",fontSize:12}},"(\u5171 ",_," \u5206)"):null)},nt=function(F){Object(fe.a)(j,F);var U=Object(le.a)(j);function j(_){var a;return Object(ue.a)(this,j),a=U.call(this,_),a.state={},a}return Object(ie.a)(j,[{key:"render",value:function(){if(!this.props.form)return"";var a=this.props.form,L=a.getFieldDecorator,p=a.getFieldsValue,h=Object.keys(Ne),b=p(),d=0;return r.a.createElement("div",null,h.map(function(g){var w=Object.keys(b).filter(function(C){return C.includes("".concat(g,"-"))&&b[C]}),A=0,O=0;return w.map(function(C){return A+=b[C],O=A*b["score-".concat(g)],null}),d+=O,w.length>0?r.a.createElement(ee.a,{align:"middle"},r.a.createElement(N.a,null,r.a.createElement(re.a.Item,{label:r.a.createElement(tt,{title:Ne[g],score:O,totalCount:A}),name:"score-".concat(g),colon:!1,key:Ne[g],rules:[{required:!0,message:"\u5206\u6570\u4E0D\u80FD\u4E3A\u7A7A"}]},r.a.createElement($.a,{min:1,max:100,placeholder:"\u8BF7\u8F93\u5165\u8BD5\u9898\u5206\u6570\u8BBE\u7F6E",style:{width:150}}))),r.a.createElement(N.a,{flex:1},r.a.createElement("span",{style:{marginLeft:8,position:"relative",top:2}},"\u5206/\u9898"))):null}),d&&d>0?r.a.createElement("div",{style:{marginTop:16}},"\u5F53\u524D\u672C\u5377\u603B\u5206",r.a.createElement("span",{style:{color:"#1890FF"}}," ",d," "),"\u5206"):null)}}]),j}(r.a.Component),rt=nt;function Se(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Se=function(){return U};var F,U={},j=Object.prototype,_=j.hasOwnProperty,a=Object.defineProperty||function(n,e,t){n[e]=t.value},L=typeof Symbol=="function"?Symbol:{},p=L.iterator||"@@iterator",h=L.asyncIterator||"@@asyncIterator",b=L.toStringTag||"@@toStringTag";function d(n,e,t){return Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),n[e]}try{d({},"")}catch(n){d=function(t,i,u){return t[i]=u}}function g(n,e,t,i){var u=e&&e.prototype instanceof B?e:B,s=Object.create(u.prototype),R=new Re(i||[]);return a(s,"_invoke",{value:Je(n,t,R)}),s}function w(n,e,t){try{return{type:"normal",arg:n.call(e,t)}}catch(i){return{type:"throw",arg:i}}}U.wrap=g;var A="suspendedStart",O="suspendedYield",C="executing",D="completed",E={};function B(){}function m(){}function P(){}var I={};d(I,p,function(){return this});var k=Object.getPrototypeOf,H=k&&k(k(Ue([])));H&&H!==j&&_.call(H,p)&&(I=H);var Q=P.prototype=B.prototype=Object.create(I);function xe(n){["next","throw","return"].forEach(function(e){d(n,e,function(t){return this._invoke(e,t)})})}function Ee(n,e){function t(u,s,R,T){var M=w(n[u],n,s);if(M.type!=="throw"){var Z=M.arg,J=Z.value;return J&&typeof J=="object"&&_.call(J,"__await")?e.resolve(J.__await).then(function(q){t("next",q,R,T)},function(q){t("throw",q,R,T)}):e.resolve(J).then(function(q){Z.value=q,R(Z)},function(q){return t("throw",q,R,T)})}T(M.arg)}var i;a(this,"_invoke",{value:function(s,R){function T(){return new e(function(M,Z){t(s,R,M,Z)})}return i=i?i.then(T,T):T()}})}function Je(n,e,t){var i=A;return function(u,s){if(i===C)throw new Error("Generator is already running");if(i===D){if(u==="throw")throw s;return{value:F,done:!0}}for(t.method=u,t.arg=s;;){var R=t.delegate;if(R){var T=Ie(R,t);if(T){if(T===E)continue;return T}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(i===A)throw i=D,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);i=C;var M=w(n,e,t);if(M.type==="normal"){if(i=t.done?D:O,M.arg===E)continue;return{value:M.arg,done:t.done}}M.type==="throw"&&(i=D,t.method="throw",t.arg=M.arg)}}}function Ie(n,e){var t=e.method,i=n.iterator[t];if(i===F)return e.delegate=null,t==="throw"&&n.iterator.return&&(e.method="return",e.arg=F,Ie(n,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),E;var u=w(i,n.iterator,e.arg);if(u.type==="throw")return e.method="throw",e.arg=u.arg,e.delegate=null,E;var s=u.arg;return s?s.done?(e[n.resultName]=s.value,e.next=n.nextLoc,e.method!=="return"&&(e.method="next",e.arg=F),e.delegate=null,E):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,E)}function $e(n){var e={tryLoc:n[0]};1 in n&&(e.catchLoc=n[1]),2 in n&&(e.finallyLoc=n[2],e.afterLoc=n[3]),this.tryEntries.push(e)}function Pe(n){var e=n.completion||{};e.type="normal",delete e.arg,n.completion=e}function Re(n){this.tryEntries=[{tryLoc:"root"}],n.forEach($e,this),this.reset(!0)}function Ue(n){if(n||n===""){var e=n[p];if(e)return e.call(n);if(typeof n.next=="function")return n;if(!isNaN(n.length)){var t=-1,i=function u(){for(;++t<n.length;)if(_.call(n,t))return u.value=n[t],u.done=!1,u;return u.value=F,u.done=!0,u};return i.next=i}}throw new TypeError(typeof n+" is not iterable")}return m.prototype=P,a(Q,"constructor",{value:P,configurable:!0}),a(P,"constructor",{value:m,configurable:!0}),m.displayName=d(P,b,"GeneratorFunction"),U.isGeneratorFunction=function(n){var e=typeof n=="function"&&n.constructor;return!!e&&(e===m||(e.displayName||e.name)==="GeneratorFunction")},U.mark=function(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,P):(n.__proto__=P,d(n,b,"GeneratorFunction")),n.prototype=Object.create(Q),n},U.awrap=function(n){return{__await:n}},xe(Ee.prototype),d(Ee.prototype,h,function(){return this}),U.AsyncIterator=Ee,U.async=function(n,e,t,i,u){u===void 0&&(u=Promise);var s=new Ee(g(n,e,t,i),u);return U.isGeneratorFunction(e)?s:s.next().then(function(R){return R.done?R.value:s.next()})},xe(Q),d(Q,b,"Generator"),d(Q,p,function(){return this}),d(Q,"toString",function(){return"[object Generator]"}),U.keys=function(n){var e=Object(n),t=[];for(var i in e)t.push(i);return t.reverse(),function u(){for(;t.length;){var s=t.pop();if(s in e)return u.value=s,u.done=!1,u}return u.done=!0,u}},U.values=Ue,Re.prototype={constructor:Re,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=F,this.done=!1,this.delegate=null,this.method="next",this.arg=F,this.tryEntries.forEach(Pe),!e)for(var t in this)t.charAt(0)==="t"&&_.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=F)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(Z,J){return R.type="throw",R.arg=e,t.next=Z,J&&(t.method="next",t.arg=F),!!J}for(var u=this.tryEntries.length-1;u>=0;--u){var s=this.tryEntries[u],R=s.completion;if(s.tryLoc==="root")return i("end");if(s.tryLoc<=this.prev){var T=_.call(s,"catchLoc"),M=_.call(s,"finallyLoc");if(T&&M){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(T){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!M)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i];if(u.tryLoc<=this.prev&&_.call(u,"finallyLoc")&&this.prev<u.finallyLoc){var s=u;break}}s&&(e==="break"||e==="continue")&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var R=s?s.completion:{};return R.type=e,R.arg=t,s?(this.method="next",this.next=s.finallyLoc,E):this.complete(R)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),E},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.finallyLoc===e)return this.complete(i.completion,i.afterLoc),Pe(i),E}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var i=this.tryEntries[t];if(i.tryLoc===e){var u=i.completion;if(u.type==="throw"){var s=u.arg;Pe(i)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,i){return this.delegate={iterator:Ue(e),resultName:t,nextLoc:i},this.method==="next"&&(this.arg=F),E}},U}var at=ge.a.Step,Ne={SINGLE:"\u5355\u9009\u9898",MULTIPLE:"\u591A\u9009\u9898",JUDGMENT:"\u5224\u65AD\u9898",COMPLETION:"\u586B\u7A7A\u9898",SUBJECTIVE:"\u7B80\u7B54\u9898",PRACTICAL:"\u5B9E\u8BAD\u9898",PROGRAM:"\u7F16\u7A0B\u9898"},Qe={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},it=function(F){Object(fe.a)(j,F);var U=Object(le.a)(j);function j(_){var a;return Object(ue.a)(this,j),a=U.call(this,_),a.getPaperData=function(){var L=window.location.href.split("/").pop(),p=[];a.setState({loading:!0}),Object(ne.a)("/api/examination_banks/".concat(L,"/edit_random_exam.json"),{method:"get"}).then(function(h){if(a.setState({loading:!1}),h==null?void 0:h.contents){var b=h.contents,d=h.groups,g=h.examination_bank,w=h.score_settings,A=h.all_sub_disciplines,O=h.all_tag_disciplines,C={},D={};Array.isArray(b)&&b.map(function(m){return C=Object(V.a)(Object(V.a)({},C),{},Object(ae.a)({},"count-".concat(m.item_type,"-").concat(m.sub_discipline_id,"-").concat(m.difficulty,"-").concat(m.tag_discipline_id),m.quanlity)),null}),w.map(function(m){return D=Object(V.a)(Object(V.a)({},D),{},Object(ae.a)({},"score-".concat(m.item_type),m.score)),null}),O.map(function(m,P){A.map(function(I,k){if((m==null?void 0:m.sub_discipline_id)===(I==null?void 0:I.sub_discipline_id)){var H={id:m.tag_discipline_id,name:m.tag_discipline_name,parent_name:I.sub_discipline_name,is_default:!0};p.push(H)}})});var E=Object(V.a)(Object(V.a)({},g),{},{subDisciplines:p,group_ids:d==null?void 0:d.map(function(m){return m.id})});a.state.form.setFieldsValue(E),a.setState({formValue:E}),a.setState({countData:C,scoreData:D});var B=g.source;a.getdisciplines(B)}else se.b.error("\u83B7\u53D6\u8BD5\u5377\u4FE1\u606F\u9519\u8BEF")})},a.getdisciplines=function(){var L=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,p="/api/disciplines.json";Object(ne.a)(p,{params:{source:"question",public:L}}).then(function(h){(h==null?void 0:h.disciplines)&&a.setState({disciplines:h.disciplines})}).catch(function(h){console.log(h)})},a.getQuestionNumbers=function(){var L;a.setState({loading:!0});var p=a.state.form.getFieldValue("subDisciplines").map(function(g){return g.id}),h=a.state.form.getFieldValue("source"),b=(L=a.state.disciplines)===null||L===void 0?void 0:L.map(function(g){return g.id}),d={group_ids:a.state.form.getFieldValue("group_ids"),source:h===1?0:2};p.length?d.tag_discipline_ids=p:d.discipline_ids=b,Object(ne.a)("/api/examination_intelligent_settings/optional_items.json",{method:"post",body:d}).then(function(g){a.setState({loading:!1}),g.contents&&(a.setState({optinalData:g.contents}),a.state.form.setFieldsValue(Object(V.a)({},a.state.countData)))})},a.next=Object(z.a)(Se().mark(function L(){var p,h,b,d,g,w,A,O,C,D,E,B,m,P;return Se().wrap(function(k){for(;;)switch(k.prev=k.next){case 0:if(p=a.state.current+1,!(a.state.current===0)){k.next=13;break}return k.next=4,a.state.form.validateFields(["name","time","difficulty","source"]);case 4:if(h=a.state.form.getFieldsValue(),b=h.subDisciplines,d=b===void 0?[]:b,g=h.group_ids,w=g===void 0?[]:g,!(!d.length&&!w.length)){k.next=9;break}return se.b.warn("\u5FC5\u987B\u9009\u62E9\u8003\u5BDF\u8303\u56F4\u6216\u8BD5\u9898\u6587\u4EF6\u5939\u7684\u5176\u4E2D\u4E00\u9879\uFF0C\u624D\u80FD\u8FDB\u884C\u4E0B\u4E00\u6B65"),k.abrupt("return");case 9:a.setState({current:p}),a.getQuestionNumbers(),k.next=14;break;case 13:a.state.current===1&&a.idEdit?(a.state.form.setFieldsValue(Object(V.a)({},a.state.scoreData)),a.setState({current:p})):a.state.current===1&&(A=0,O=a.state.form.getFieldsValue(),C=O.name,D=O.difficulty,E=O.time,B=O.source,m=O.subDisciplines,P=Object(ke.a)(O,["name","difficulty","time","source","subDisciplines"]),Object.keys(P).forEach(function(H){P[H]>0&&++A}),A===0?se.b.error("\u8BF7\u586B\u5199\u9898\u578B\u6570\u91CF"):a.setState({current:p}));case 14:case"end":return k.stop()}},L)})),a.prev=function(){var L=a.state.current-1;a.setState({current:L})},a.submit=Object(z.a)(Se().mark(function L(){var p,h,b,d,g,w,A,O,C,D,E;return Se().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:return m.next=2,a.state.form.validateFields();case 2:p=a.state.form.getFieldsValue(),h=p.exam_notes,b=p.group_ids,d=p.name,g=p.difficulty,w=p.time,A=p.source,O=Object(ke.a)(p,["exam_notes","group_ids","name","difficulty","time","source"]),C=[],D=[],Object.keys(O).map(function(P){if(P.includes("count")){var I=P.split("-")[1],k=P.split("-")[2],H=P.split("-")[3],Q=P.split("-")[4];p[P]!==0&&D.push({item_type:I,difficulty:H,sub_discipline_id:k,items_count:p[P],tag_discipline_id:Q})}else if(P.includes("score")){var xe=P.split("-")[1];C.push({item_type:xe,score:p[P]})}return null}),E={name:d,difficulty:g,time:w,source:A,score_settings:C,contents:D,exam_notes:h,group_ids:b,sub_discipline_id:0},a.idEdit?a.updatePaper(E):a.createPaper(E);case 9:case"end":return m.stop()}},L)})),a.createPaper=function(L){a.setState({loading:!0}),Object(ne.a)("/api/examination_banks/create_random_exam.json",{method:"post",body:Object(V.a)({},L)}).then(function(p){a.setState({loading:!1}),p.status===0&&(se.b.success("\u521B\u5EFA\u6210\u529F"),a.props.history.push("/paperlibrary"))})},a.updatePaper=function(L){a.setState({loading:!0});var p=window.location.href.split("/").pop();Object(ne.a)("/api/examination_banks/".concat(p,"/update_random_exam.json"),{method:"post",body:Object(V.a)({},L)}).then(function(h){a.setState({loading:!1}),h.status===0&&(se.b.success("\u7F16\u8F91\u6210\u529F"),a.props.history.push("/paperlibrary"))})},a.confirm=function(L){window.confirm("\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931")&&(L?a.props.history.push(L):a.props.history.push("/paperlibrary"))},a.state={current:0,disciplines:[],loading:!1,optinalData:[],countData:{},scoreData:{},formValue:{}},a}return Object(ie.a)(j,[{key:"componentDidMount",value:function(){this.setState({form:this.refs.form}),window.location.href.includes("/randompaper/edit")?(this.getPaperData(),this.idEdit=!0):this.getdisciplines()}},{key:"componentWillMount",value:function(){window.addEventListener("beforeunload",this.beforeunload)}},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.beforeunload)}},{key:"beforeunload",value:function(a){var L="\u786E\u5B9A\u79BB\u5F00\u6B64\u9875\u9762\u5417?\u6B64\u9875\u6570\u636E\u53EF\u80FD\u4F1A\u4E22\u5931";return(a||window.event).returnValue=L,L}},{key:"render",value:function(){var a=this,L=this.state,p=L.current,h=L.disciplines,b=r.a.createElement(de.a,{onClick:function(){a.confirm()},style:{marginRight:16}},"\u8FD4\u56DE"),d=r.a.createElement(de.a,{type:"primary",onClick:function(){return a.next()}},"\u4E0B\u4E00\u6B65"),g=r.a.createElement(de.a,{onClick:function(){return a.prev()},style:{marginRight:16}},"\u4E0A\u4E00\u6B65"),w=r.a.createElement(de.a,{onClick:function(){return a.submit()},type:"primary"},"\u5B8C\u6210\u7EC4\u5377"),A=[{title:"\u57FA\u672C\u4FE1\u606F",content:r.a.createElement(Y,{formValue:this.state.formValue,disciplines:h,getdisciplines:this.getdisciplines,form:this.state.form})},{title:"\u9898\u578B\u6570\u91CF",content:r.a.createElement(et,{form:this.state.form,optinalData:this.state.optinalData})},{title:"\u8D4B\u5206\u8BBE\u7F6E",content:r.a.createElement(rt,{form:this.state.form})}];return r.a.createElement("div",{style:{width:1200,margin:"0px auto"}},r.a.createElement(Ce.a,{separator:">",style:{padding:"12px 0px"}},r.a.createElement(Ce.a.Item,null,r.a.createElement(De.Link,{to:"/paperlibrary",onClick:function(C){C.preventDefault(),a.confirm("/paperlibrary")}},"\u8BD5\u5377\u5E93")),r.a.createElement(Ce.a.Item,null,"\u968F\u673A\u7EC4\u5377")),r.a.createElement(re.a,{from:this.state.form,onValuesChange:function(){return a.setState({formValue:Object(V.a)({},a.state.form.getFieldsValue())})},ref:"form",name:"basic",layout:"vertical",onChange:function(){a.setState({now:new Date})}},r.a.createElement("div",{style:{display:"flex",justifyContent:"space-between"}},r.a.createElement("span",{style:{fontSize:20,fontWeight:600}},"\u968F\u673A\u7EC4\u5377")),r.a.createElement(Be.a,{style:{marginTop:12}},r.a.createElement("div",{style:{display:"flex",justifyContent:"center",padding:20}},r.a.createElement(ge.a,{current:p,style:{width:780}},A.map(function(O){return r.a.createElement(at,{key:O.title,title:O.title})}))),r.a.createElement(_e.a,null),r.a.createElement(Ke.a,{spinning:this.state.loading},A.map(function(O,C){return r.a.createElement("div",{style:{display:C===p?"block":"none"},key:C,className:"pl20 pr20"},O.content)}))),r.a.createElement("div",{style:{display:"flex",marginBottom:200,marginTop:12,justifyContent:"center"}},r.a.createElement("span",{style:{fontSize:20,fontWeight:600}}),r.a.createElement("span",null,p===0?b:g,p===A.length-1?w:d))))}}]),j}(r.a.Component),st=ye.default=it},Eaj2:function(we,ye,f){we.exports={flex_box_center:"flex_box_center___d7ZR0",flex_space_between:"flex_space_between___2R86v",flex_box_vertical_center:"flex_box_vertical_center___UB-3r",flex_box_center_end:"flex_box_center_end___ISZAL",flex_box_column:"flex_box_column___3fU_5",formItem:"formItem___76enf",subheight:"subheight___1YMQL"}},"P/tu":function(we,ye,f){"use strict";var Ze=f("ozfa"),re=f("MJZm"),Ye=f("0Owb"),Be=f("9og8"),Xe=f("tJVT"),Ke=f("PpiC"),Fe=f("q1tI"),_e=f.n(Fe),ze=f("WCUW"),Ce=f("spXi"),Ge=f.n(Ce);function de(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */de=function(){return X};var z,X={},se=Object.prototype,ae=se.hasOwnProperty,V=Object.defineProperty||function(c,o,l){c[o]=l.value},ue=typeof Symbol=="function"?Symbol:{},ie=ue.iterator||"@@iterator",fe=ue.asyncIterator||"@@asyncIterator",le=ue.toStringTag||"@@toStringTag";function te(c,o,l){return Object.defineProperty(c,o,{value:l,enumerable:!0,configurable:!0,writable:!0}),c[o]}try{te({},"")}catch(c){te=function(l,y,x){return l[y]=x}}function ge(c,o,l,y){var x=o&&o.prototype instanceof Le?o:Le,v=Object.create(x.prototype),S=new Me(y||[]);return V(v,"_invoke",{value:He(c,l,S)}),v}function ve(c,o,l){try{return{type:"normal",arg:c.call(o,l)}}catch(y){return{type:"throw",arg:y}}}X.wrap=ge;var r="suspendedStart",Ve="suspendedYield",Oe="executing",be="completed",G={};function Le(){}function ee(){}function K(){}var N={};te(N,ie,function(){return this});var ce=Object.getPrototypeOf,$=ce&&ce(ce(je([])));$&&$!==se&&ae.call($,ie)&&(N=$);var oe=K.prototype=Le.prototype=Object.create(N);function Te(c){["next","throw","return"].forEach(function(o){te(c,o,function(l){return this._invoke(o,l)})})}function me(c,o){function l(x,v,S,W){var Y=ve(c[x],c,v);if(Y.type!=="throw"){var ne=Y.arg,pe=ne.value;return pe&&typeof pe=="object"&&ae.call(pe,"__await")?o.resolve(pe.__await).then(function(he){l("next",he,S,W)},function(he){l("throw",he,S,W)}):o.resolve(pe).then(function(he){ne.value=he,S(ne)},function(he){return l("throw",he,S,W)})}W(Y.arg)}var y;V(this,"_invoke",{value:function(v,S){function W(){return new o(function(Y,ne){l(v,S,Y,ne)})}return y=y?y.then(W,W):W()}})}function He(c,o,l){var y=r;return function(x,v){if(y===Oe)throw new Error("Generator is already running");if(y===be){if(x==="throw")throw v;return{value:z,done:!0}}for(l.method=x,l.arg=v;;){var S=l.delegate;if(S){var W=Ae(S,l);if(W){if(W===G)continue;return W}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(y===r)throw y=be,l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);y=Oe;var Y=ve(c,o,l);if(Y.type==="normal"){if(y=l.done?be:Ve,Y.arg===G)continue;return{value:Y.arg,done:l.done}}Y.type==="throw"&&(y=be,l.method="throw",l.arg=Y.arg)}}}function Ae(c,o){var l=o.method,y=c.iterator[l];if(y===z)return o.delegate=null,l==="throw"&&c.iterator.return&&(o.method="return",o.arg=z,Ae(c,o),o.method==="throw")||l!=="return"&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+l+"' method")),G;var x=ve(y,c.iterator,o.arg);if(x.type==="throw")return o.method="throw",o.arg=x.arg,o.delegate=null,G;var v=x.arg;return v?v.done?(o[c.resultName]=v.value,o.next=c.nextLoc,o.method!=="return"&&(o.method="next",o.arg=z),o.delegate=null,G):v:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,G)}function We(c){var o={tryLoc:c[0]};1 in c&&(o.catchLoc=c[1]),2 in c&&(o.finallyLoc=c[2],o.afterLoc=c[3]),this.tryEntries.push(o)}function De(c){var o=c.completion||{};o.type="normal",delete o.arg,c.completion=o}function Me(c){this.tryEntries=[{tryLoc:"root"}],c.forEach(We,this),this.reset(!0)}function je(c){if(c||c===""){var o=c[ie];if(o)return o.call(c);if(typeof c.next=="function")return c;if(!isNaN(c.length)){var l=-1,y=function x(){for(;++l<c.length;)if(ae.call(c,l))return x.value=c[l],x.done=!1,x;return x.value=z,x.done=!0,x};return y.next=y}}throw new TypeError(typeof c+" is not iterable")}return ee.prototype=K,V(oe,"constructor",{value:K,configurable:!0}),V(K,"constructor",{value:ee,configurable:!0}),ee.displayName=te(K,le,"GeneratorFunction"),X.isGeneratorFunction=function(c){var o=typeof c=="function"&&c.constructor;return!!o&&(o===ee||(o.displayName||o.name)==="GeneratorFunction")},X.mark=function(c){return Object.setPrototypeOf?Object.setPrototypeOf(c,K):(c.__proto__=K,te(c,le,"GeneratorFunction")),c.prototype=Object.create(oe),c},X.awrap=function(c){return{__await:c}},Te(me.prototype),te(me.prototype,fe,function(){return this}),X.AsyncIterator=me,X.async=function(c,o,l,y,x){x===void 0&&(x=Promise);var v=new me(ge(c,o,l,y),x);return X.isGeneratorFunction(o)?v:v.next().then(function(S){return S.done?S.value:v.next()})},Te(oe),te(oe,le,"Generator"),te(oe,ie,function(){return this}),te(oe,"toString",function(){return"[object Generator]"}),X.keys=function(c){var o=Object(c),l=[];for(var y in o)l.push(y);return l.reverse(),function x(){for(;l.length;){var v=l.pop();if(v in o)return x.value=v,x.done=!1,x}return x.done=!0,x}},X.values=je,Me.prototype={constructor:Me,reset:function(o){if(this.prev=0,this.next=0,this.sent=this._sent=z,this.done=!1,this.delegate=null,this.method="next",this.arg=z,this.tryEntries.forEach(De),!o)for(var l in this)l.charAt(0)==="t"&&ae.call(this,l)&&!isNaN(+l.slice(1))&&(this[l]=z)},stop:function(){this.done=!0;var o=this.tryEntries[0].completion;if(o.type==="throw")throw o.arg;return this.rval},dispatchException:function(o){if(this.done)throw o;var l=this;function y(ne,pe){return S.type="throw",S.arg=o,l.next=ne,pe&&(l.method="next",l.arg=z),!!pe}for(var x=this.tryEntries.length-1;x>=0;--x){var v=this.tryEntries[x],S=v.completion;if(v.tryLoc==="root")return y("end");if(v.tryLoc<=this.prev){var W=ae.call(v,"catchLoc"),Y=ae.call(v,"finallyLoc");if(W&&Y){if(this.prev<v.catchLoc)return y(v.catchLoc,!0);if(this.prev<v.finallyLoc)return y(v.finallyLoc)}else if(W){if(this.prev<v.catchLoc)return y(v.catchLoc,!0)}else{if(!Y)throw new Error("try statement without catch or finally");if(this.prev<v.finallyLoc)return y(v.finallyLoc)}}}},abrupt:function(o,l){for(var y=this.tryEntries.length-1;y>=0;--y){var x=this.tryEntries[y];if(x.tryLoc<=this.prev&&ae.call(x,"finallyLoc")&&this.prev<x.finallyLoc){var v=x;break}}v&&(o==="break"||o==="continue")&&v.tryLoc<=l&&l<=v.finallyLoc&&(v=null);var S=v?v.completion:{};return S.type=o,S.arg=l,v?(this.method="next",this.next=v.finallyLoc,G):this.complete(S)},complete:function(o,l){if(o.type==="throw")throw o.arg;return o.type==="break"||o.type==="continue"?this.next=o.arg:o.type==="return"?(this.rval=this.arg=o.arg,this.method="return",this.next="end"):o.type==="normal"&&l&&(this.next=l),G},finish:function(o){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.finallyLoc===o)return this.complete(y.completion,y.afterLoc),De(y),G}},catch:function(o){for(var l=this.tryEntries.length-1;l>=0;--l){var y=this.tryEntries[l];if(y.tryLoc===o){var x=y.completion;if(x.type==="throw"){var v=x.arg;De(y)}return v}}throw new Error("illegal catch attempt")},delegateYield:function(o,l,y){return this.delegate={iterator:je(o),resultName:l,nextLoc:y},this.method==="next"&&(this.arg=z),G}},X}var ke=function(X){var se=X.value,ae=X.onChange,V=X.defaultValue,ue=Object(Ke.a)(X,["value","onChange","defaultValue"]),ie=Object(Fe.useState)([]),fe=Object(Xe.a)(ie,2),le=fe[0],te=fe[1],ge=Object(Fe.useState)("1"),ve=Object(Xe.a)(ge,2),r=ve[0],Ve=ve[1];Object(Fe.useEffect)(function(){Oe()},[]);var Oe=function(){var Le=Object(Be.a)(de().mark(function ee(){var K,N;return de().wrap(function($){for(;;)switch($.prev=$.next){case 0:return $.next=2,Object(ze.x)({});case 2:K=$.sent,(K==null?void 0:K.data)&&(N=[{title:_e.a.createElement("div",{title:"\u6839\u76EE\u5F55",className:Ge.a.name},"\u6839\u76EE\u5F55"),value:0,key:0,icon:_e.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:be(K.data||[])}],te(N),Ve("2"));case 4:case"end":return $.stop()}},ee)}));return function(){return Le.apply(this,arguments)}}(),be=function(ee){function K(N){var ce=N.children,$=Array.isArray(ce)&&ce.length>0,oe=N==null?void 0:N.group_id;return{title:_e.a.createElement("div",{title:N==null?void 0:N.name,className:Ge.a.name},N==null?void 0:N.name),value:oe,key:oe,icon:_e.a.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:$?ce==null?void 0:ce.map(function(Te){return K(Te)}):[]}}return ee==null?void 0:ee.map(function(N){return K(N)})},G=V?{defaultExpandedKeys:[0]}:{selectedKeys:se,defaultExpandedKeys:se};return _e.a.createElement("div",{className:Ge.a.customTree},_e.a.createElement(re.a,Object(Ye.a)({key:r},G,{showIcon:!0,treeData:le,onSelect:ae},ue)))};ye.a=ke},spXi:function(we,ye,f){we.exports={flex_box_center:"flex_box_center___2B_Y7",flex_space_between:"flex_space_between___2olzC",flex_box_vertical_center:"flex_box_vertical_center___2Z4dV",flex_box_center_end:"flex_box_center_end___3FiwX",flex_box_column:"flex_box_column___8kyK-",customTree:"customTree___1KOYx",name:"name___3pqs4"}}}]);