\u591A\u9009\u9898
'+(yt==null?void 0:yt.name),style:Ii({},Kt)}),Ve==null?void 0:Ve.map((dt,Et)=>{const{is_answer:mt,checked:nn,choice_text:oe,me_answered:Qt}=dt;let sn="";return l!=null&&l.is_answered?O?(mt&&(sn=uu.rightAnswerBox),!mt&&(nn||Qt)&&(sn=uu.errorAnswerBox)):(nn||Qt)&&(sn=uu.activeAnswerBox):nn&&(sn=uu.activeAnswerBox),e.createElement(U.Z,{key:Et,className:`${uu.choiceBox} ${sn}`,align:"middle",wrap:!1,style:{cursor:It?"not-allowed":"pointer",marginTop:Et==0?"40px":"20px"},onClick:an=>{at(Et)}},e.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:uu.choiceIndex},kt[Et]),e.createElement(z.Z,{flex:1,className:"ml30"},e.createElement(F.Z,{className:uu.html,value:oe,style:Ii({},Kt)})),O&&mt&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),O&&!mt&&(nn||Qt)&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))}),O&&e.createElement("div",{className:uu.solutionWrap},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),e.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Pt(!1))),e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),Ve.find(dt=>dt==null?void 0:dt.me_answered)?e.createElement(e.Fragment,null,(()=>{const dt=Ve.map((Qt,sn)=>Qt!=null&&Qt.me_answered?sn:-1).filter(Qt=>Qt!==-1),Et=Ve.map((Qt,sn)=>Qt!=null&&Qt.is_answer?sn:-1).filter(Qt=>Qt!==-1),nn=dt.length===Et.length&&dt.every(Qt=>Et.includes(Qt))?uu.greenColor:uu.redColor,oe=dt.map(Qt=>kt[Qt]).join("");return e.createElement("span",{className:nn,style:{fontWeight:600,fontSize:"16px"}},oe||"\u672A\u4F5C\u7B54")})()):e.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),e.createElement("div",null,e.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((yt==null?void 0:yt.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}})))))};var Hc=(0,D.connect)(({problemset:r})=>({problemset:r}))(Wc),pa=n(59301),Gc=Object.defineProperty,Kc=Object.defineProperties,_c=Object.getOwnPropertyDescriptors,Ss=Object.getOwnPropertySymbols,Jc=Object.prototype.hasOwnProperty,Xc=Object.prototype.propertyIsEnumerable,bs=(r,u,l)=>u in r?Gc(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Mi=(r,u)=>{for(var l in u||(u={}))Jc.call(u,l)&&bs(r,l,u[l]);if(Ss)for(var l of Ss(u))Xc.call(u,l)&&bs(r,l,u[l]);return r},Is=(r,u)=>Kc(r,_c(u));const qc=({questionIndex:r,problemset:u,dispatch:l,question:b,solutionVis:O,pageCache:ct,pageInfo:nt,questionChoiceIdsRef:fe,SmartPlanItemBanks:Q,changeChoiceIds:Ue})=>{const[Mt,yt]=(0,e.useState)({}),[ft,Ve]=(0,e.useState)([]),$e={fontSize:"18px"},Kt=!(ct!=null&&ct.is_end)&&(nt==null?void 0:nt.status)=="ended"||(b==null?void 0:b.is_answered)||(ct==null?void 0:ct.is_end)&&!(Q!=null&&Q.allow_answer_after_end),It=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,e.useEffect)(()=>{var at;const Pt=(0,Bt.cloneDeep)(b);yt(Pt);const dt=(at=b==null?void 0:b.choices)==null?void 0:at.map((Et,mt)=>Is(Mi({},Et),{checked:Et==null?void 0:Et.me_answered}));fe.current=dt.filter(Et=>Et.checked).map(Et=>Et==null?void 0:Et.choice_id),Ve([...dt])},[b]);const kt=at=>{if(Kt)return;const Pt=ft.map((dt,Et)=>Is(Mi({},dt),{checked:Et===at}));fe.current=Pt.filter(dt=>dt.checked).map(dt=>dt==null?void 0:dt.choice_id),Ue(Pt.filter(dt=>dt.checked).map(dt=>dt==null?void 0:dt.choice_id)),Ve(Pt)};return pa.createElement("div",null,pa.createElement("div",{className:uu.questionWrap},pa.createElement(F.Z,{value:'\u5355\u9009\u9898
'+(Mt==null?void 0:Mt.name),style:Mi({},$e)}),ft==null?void 0:ft.map((at,Pt)=>{const{is_answer:dt,checked:Et,choice_text:mt,me_answered:nn}=at;let oe="";return b!=null&&b.is_answered?O?(dt&&(oe=uu.rightAnswerBox),!dt&&(Et||nn)&&(oe=uu.errorAnswerBox)):(Et||nn)&&(oe=uu.activeAnswerBox):Et&&(oe=uu.activeAnswerBox),pa.createElement(U.Z,{key:Pt,className:`${uu.choiceBox} ${oe}`,align:"middle",wrap:!1,style:{cursor:Kt?"not-allowed":"pointer",marginTop:Pt==0?"40px":"20px"},onClick:Qt=>{kt(Pt)}},pa.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:uu.choiceIndex},It[Pt]),pa.createElement(z.Z,{flex:1,className:"ml30"},pa.createElement(F.Z,{className:uu.html,value:mt,style:Mi({},$e)})),O&&dt&&pa.createElement(z.Z,null,pa.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),O&&!dt&&(Et||nn)&&pa.createElement(z.Z,null,pa.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))}),O&&pa.createElement("div",{className:uu.solutionWrap},pa.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},pa.createElement("div",{className:"c-grey-333 mb5 font16"},pa.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),pa.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},It[ft.findIndex(at=>at==null?void 0:at.is_answer)])),pa.createElement("div",{className:"c-grey-333 mb5 font16"},pa.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),ft.find(at=>at==null?void 0:at.me_answered)?pa.createElement(pa.Fragment,null,(()=>{var at;const Pt=ft.findIndex(mt=>mt==null?void 0:mt.me_answered),Et=((at=ft[Pt])==null?void 0:at.is_answer)?uu.greenColor:uu.redColor;return pa.createElement("span",{className:Et,style:{fontWeight:600,fontSize:"16px"}},It[Pt])})()):pa.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),pa.createElement("div",null,pa.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((Mt==null?void 0:Mt.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}})))))};var $c=(0,D.connect)(({problemset:r})=>({problemset:r}))(qc),ed=Object.defineProperty,td=Object.defineProperties,nd=Object.getOwnPropertyDescriptors,Ms=Object.getOwnPropertySymbols,ld=Object.prototype.hasOwnProperty,ud=Object.prototype.propertyIsEnumerable,Ns=(r,u,l)=>u in r?ed(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Ni=(r,u)=>{for(var l in u||(u={}))ld.call(u,l)&&Ns(r,l,u[l]);if(Ms)for(var l of Ms(u))ud.call(u,l)&&Ns(r,l,u[l]);return r},Ps=(r,u)=>td(r,nd(u));const ad=({problemset:r,questionIndex:u,dispatch:l,question:b,pageCache:O,solutionVis:ct,disabled:nt,pageInfo:fe,SmartPlanItemBanks:Q,questionChoiceIdsRef:Ue,changeChoiceIds:Mt})=>{const[yt,ft]=(0,e.useState)({}),[Ve,$e]=(0,e.useState)([]),Kt={fontSize:"18px"},It=!(O!=null&&O.is_end)&&(fe==null?void 0:fe.status)=="ended"||(b==null?void 0:b.is_answered)||(O==null?void 0:O.is_end)&&!(Q!=null&&Q.allow_answer_after_end),kt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,e.useEffect)(()=>{var Pt;const dt=(0,Bt.cloneDeep)(b);ft(dt);const Et=(Pt=b==null?void 0:b.choices)==null?void 0:Pt.map((mt,nn)=>Ps(Ni({},mt),{checked:mt==null?void 0:mt.me_answered}));Ue.current=Et.filter(mt=>mt.checked).map(mt=>mt==null?void 0:mt.choice_id),$e([...Et])},[b]);const at=Pt=>{if(It)return;const dt=Ve.map((Et,mt)=>Ps(Ni({},Et),{checked:mt===Pt}));Ue.current=dt.filter(Et=>Et.checked).map(Et=>Et==null?void 0:Et.choice_id),Mt(dt.filter(Et=>Et.checked).map(Et=>Et==null?void 0:Et.choice_id)),$e(dt)};return e.createElement("div",null,e.createElement("div",{className:uu.questionWrap},e.createElement(F.Z,{value:'\u5224\u65AD\u9898
'+(yt==null?void 0:yt.name),style:Ni({},Kt)}),Ve==null?void 0:Ve.map((Pt,dt)=>{const{is_answer:Et,checked:mt,choice_text:nn,me_answered:oe}=Pt;let Qt="";return b!=null&&b.is_answered?ct?(Et&&(Qt=uu.rightAnswerBox),!Et&&(mt||oe)&&(Qt=uu.errorAnswerBox)):(mt||oe)&&(Qt=uu.activeAnswerBox):mt&&(Qt=uu.activeAnswerBox),e.createElement(U.Z,{key:dt,className:`${uu.choiceBox} ${Qt}`,align:"middle",wrap:!1,style:{cursor:It?"not-allowed":"pointer",marginTop:dt==0?"40px":"20px"},onClick:sn=>{at(dt)}},e.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:uu.choiceIndex},kt[dt]),e.createElement(z.Z,{flex:1,className:"ml30"},e.createElement(F.Z,{className:uu.html,value:nn,style:Ni({},Kt)})),ct&&Et&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),ct&&!Et&&(mt||oe)&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))}),ct&&e.createElement("div",{className:uu.solutionWrap},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),e.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},kt[Ve.findIndex(Pt=>Pt==null?void 0:Pt.is_answer)])),e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),Ve.find(Pt=>Pt==null?void 0:Pt.me_answered)?e.createElement(e.Fragment,null,(()=>{var Pt;const dt=Ve.findIndex(nn=>nn==null?void 0:nn.me_answered),mt=((Pt=Ve[dt])==null?void 0:Pt.is_answer)?uu.greenColor:uu.redColor;return e.createElement("span",{className:mt,style:{fontWeight:600,fontSize:"16px"}},kt[dt])})()):e.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),e.createElement("div",null,e.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((yt==null?void 0:yt.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}})))))};var rd=(0,D.connect)(({problemset:r})=>({problemset:r}))(ad),Os=n(75823),od=n(56656),id=n.n(od),sd=n(20885),pu=n(59301),cd=Object.defineProperty,Rs=Object.getOwnPropertySymbols,dd=Object.prototype.hasOwnProperty,md=Object.prototype.propertyIsEnumerable,ks=(r,u,l)=>u in r?cd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,vd=(r,u)=>{for(var l in u||(u={}))dd.call(u,l)&&ks(r,l,u[l]);if(Rs)for(var l of Rs(u))md.call(u,l)&&ks(r,l,u[l]);return r},Pi=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const fd=({problemset:r,dispatch:u,question:l,pageCache:b,solutionVis:O,SmartPlanItemBanks:ct,disabled:nt,questionIndex:fe,questionChoiceIdsRef:Q,handleRefresh:Ue,childWindow:Mt,closeProgram:yt,setCloseProgram:ft,childsWindow:Ve})=>{var $e;const[Kt,It]=(0,e.useState)(!1),[kt,at]=(0,e.useState)(""),Pt=(0,D.useParams)(),[dt,Et]=(0,e.useState)(!1),mt=(0,e.useRef)(null),nn=(0,e.useRef)(null),oe={fontSize:"18px"},[Qt,sn]=(0,e.useState)([]),[an,al]=(0,e.useState)({page:1,limit:10}),[Nt,$t]=(0,e.useState)(0),[Rn,Jt]=(0,e.useState)(null),wn={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1};(0,e.useEffect)(()=>{if(!Mt||Mt.closed)return;const Pn=()=>{var wl;const Qu={type:"showIntelligentTeacherStatus",aiStatus:(wl=ct==null?void 0:ct.page)==null?void 0:wl.enable_ai_tutor,questionStatus:(l==null?void 0:l.status)==="ended",SmartPlanItemBanks:ct};Mt.postMessage(Qu,"*")};if(yt){ft("");const wl={type:"closeIntelligentTeacherStatus"};for(let Qu=0;Qu\u7F16\u7A0B\u9898
'+(l==null?void 0:l.name),style:vd({},oe)}),pu.createElement("div",{className:uu.descBox},pu.createElement("div",{className:uu.title},pu.createElement("span",{style:{fontSize:"16px",color:"#666",marginRight:"8px"}},"\u5141\u8BB8\u7F16\u7A0B\u8BED\u8A00\uFF1A"),($e=l==null?void 0:l.languages)==null?void 0:$e.map((Pn,On,wl)=>pu.createElement(e.Fragment,{key:On},$l[Pn==null?void 0:Pn.language]))),pu.createElement("div",{className:uu.desc,style:{height:"max-content",maxHeight:"210px",overflowY:"auto"}},pu.createElement(F.Z,{value:'\u95EE\u9898\u63CF\u8FF0'+(l==null?void 0:l.description),style:{fontSize:"16px",color:"#000"}}))),O&&pu.createElement("div",{className:uu.solutionWrap},pu.createElement("div",null,pu.createElement(F.Z,{value:'\u53C2\u8003\u7B54\u6848'+((l==null?void 0:l.answer_text)||"\u6682\u65E0\u53C2\u8003\u7B54\u6848"),style:{color:"#000"}})),pu.createElement("div",null,pu.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((l==null?void 0:l.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))),(l==null?void 0:l.answer_status)!="not_started"&&pu.createElement("div",{style:{display:"flex",alignItems:"center",marginTop:"30px",fontWeight:500}},pu.createElement("span",{style:{fontSize:"18px",color:"#000",fontWeight:"500",marginRight:"10px"}},"\u7B54\u9898\u72B6\u6001"),xl[l==null?void 0:l.answer_status]),(l==null?void 0:l.answer_status)!="not_started"&&pu.createElement("div",{className:uu.descBox},pu.createElement("div",{className:uu.title},pu.createElement("span",{style:{fontSize:"16px",color:"#000",marginRight:"8px"}},"\u6700\u540E\u901A\u5173\u4EE3\u7801"),pu.createElement("span",{style:{fontSize:"14px",color:"#666"}},"(\u672A\u901A\u5173\u5219\u5C55\u793A\u6700\u540E\u7F16\u5199\u7684\u4EE3\u7801\u8BE6\u60C5)")),pu.createElement("div",{className:uu.desc,style:{backgroundColor:"#fff"}},pu.createElement(xn.ZP,{height:300,language:l==null?void 0:l.language,value:l!=null&&l.passed_code?qn.Base64.decode(l==null?void 0:l.passed_code):"",theme:"default",options:wn}))),(l==null?void 0:l.answer_status)!="not_started"&&!!Nt&&pu.createElement(ne.default,{style:{marginTop:"40px"},columns:[{title:"\u8BC4\u6D4B\u5E8F\u53F7",dataIndex:"query_index",width:80,render:(Pn,On,wl)=>pu.createElement("span",{style:{color:"#000"}},(an.page-1)*an.limit+wl+1)},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center",width:140,render:(Pn,On)=>pu.createElement("span",{style:{color:"#000"}},On!=null&&On.created_at?id()(On==null?void 0:On.created_at).format("YYYY-MM-DD HH:mm"):"--")},{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"status",key:"status",align:"center",render:(Pn,On)=>{var wl;return pu.createElement("span",{className:`${Pn===0?"c-green":"c-red"}`},(wl=Yn.Im[Pn])==null?void 0:wl.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}},{title:"\u64CD\u4F5C",align:"center",dataIndex:"code",key:"code",width:100,render:(Pn,On)=>pu.createElement("span",{style:{cursor:"pointer",color:"#3061d0"},onClick:()=>Pi(void 0,null,function*(){var wl,Qu,Pa;const xu=yield(0,sd.X6)(On==null?void 0:On.id);Pe.default.confirm({centered:!0,icon:null,width:700,okText:"\u5173\u95ED",autoFocusButton:null,cancelButtonProps:{style:{display:"none"}},title:"\u4EE3\u7801\u5185\u5BB9",content:pu.createElement("div",{className:"mb10"},pu.createElement(xn.ZP,{height:300,language:(wl=xu==null?void 0:xu.data)==null?void 0:wl.language,theme:"vs-light",value:(Qu=xu==null?void 0:xu.data)!=null&&Qu.code?qn.Base64.decode((Pa=xu==null?void 0:xu.data)==null?void 0:Pa.code):"",options:wn}))})})},"\u67E5\u770B\u4EE3\u7801")}].filter(Pn=>!!Pn),pagination:{total:Nt||0,onChange:(Pn,On)=>Pi(void 0,null,function*(){al({page:Pn,limit:On}),yield Dl()}),current:an==null?void 0:an.page,pageSize:an==null?void 0:an.limit,showTotal:Pn=>pu.createElement(pu.Fragment,null,"\u5171",pu.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},Pn),"\u6761\u6570\u636E")},dataSource:Qt})))};var gd=(0,D.connect)(({problemset:r})=>({problemset:r}))(fd),Ed=n(57764),pd=n(69367),_a={header_style:"header_style___Dx0vL",content:"content___RXnuY",legend:"legend___evR3g",legend_icon:"legend_icon___EEW5x",item_list:"item_list___Kl2Op",item_list_title:"item_list_title___NB3Cg",item_title:"item_title___koibo",item_top:"item_top___fIB7h",item_bottom:"item_bottom___wsbMe",box:"box___VtbZB",page_item_acitve:"page_item_acitve___FbAiG",top_content:"top_content___BwoGH",drag_style:"drag_style___t_nRF",page_item:"page_item____ovHq"},Ad=Object.defineProperty,hd=Object.defineProperties,yd=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,Cd=Object.prototype.hasOwnProperty,Fd=Object.prototype.propertyIsEnumerable,Ls=(r,u,l)=>u in r?Ad(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Gi=(r,u)=>{for(var l in u||(u={}))Cd.call(u,l)&&Ls(r,l,u[l]);if(Ts)for(var l of Ts(u))Fd.call(u,l)&&Ls(r,l,u[l]);return r},Ki=(r,u)=>hd(r,yd(u)),Bd=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const js={cursor:"move",transition:"unset"},$0=r=>{const{tag:u}=r,{listeners:l,transform:b,transition:O,isDragging:ct,setNodeRef:nt}=useSortable({id:u.id}),fe=ct&&b?Ki(Gi({},js),{transform:`translate3d(${b.x}px, ${b.y}px, 0)`,transition:"unset",zIndex:20,cursor:"pointer"}):Ki(Gi({},js),{transition:"none",zIndex:10,cursor:"pointer"});return React.createElement("div",Ki(Gi({style:fe,ref:nt},l),{className:styles.drag_style}),React.createElement("div",{className:styles.item_bottom},(u==null?void 0:u.id)==1?"\u4EA4\u4E921":"\u7ED1\u5B9A\u4EA4\u4E92"))},Dd=({globalSetting:r,interactiveOpen:u,onClose:l,maxPage:b,currentPage:O,paramsHttp:ct,handlePageClick:nt,currentPosition:fe})=>{var Q;const[Ue,Mt]=(0,e.useState)(!1),[yt,ft]=(0,e.useState)(!1),[Ve,$e]=(0,e.useState)("1");(0,e.useEffect)(()=>{Mt(u),ft(!1)},[u]);const[Kt,It]=(0,e.useState)([]),kt=()=>Bd(void 0,null,function*(){const Pt=yield(0,Se.ZP)(`/api/courses/${ct==null?void 0:ct.coursesId}/smart_plans/${ct==null?void 0:ct.id}/get_user_learn_records.json`,{method:"get"});(Pt==null?void 0:Pt.status)==0&&It(Pt==null?void 0:Pt.data)});(0,e.useEffect)(()=>{u&&kt()},[u]);const at=Pt=>{var dt,Et,mt,nn,oe,Qt,sn,an;((dt=Pt==null?void 0:Pt.active)==null?void 0:dt.id)==((Et=Pt==null?void 0:Pt.over)==null?void 0:Et.id)&&($e((mt=Pt==null?void 0:Pt.active)==null?void 0:mt.id),ft(!0)),(nn=Pt==null?void 0:Pt.over)!=null&&nn.id&&((oe=Pt==null?void 0:Pt.active)==null?void 0:oe.id)!=((Qt=Pt==null?void 0:Pt.over)==null?void 0:Qt.id)&&(console.log((sn=Pt==null?void 0:Pt.active)==null?void 0:sn.id),console.log((an=Pt==null?void 0:Pt.over)==null?void 0:an.id))};return e.createElement(Pe.default,{footer:null,title:null,closable:!1,open:Ue,width:"auto",centered:!0,bodyStyle:{padding:0,overflow:"hidden"}},e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("div",{style:{width:"800px",height:"640px",padding:"20px"}},e.createElement("div",{style:{display:"flex",height:"30px",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{style:{fontSize:"16px",fontWeight:500}},"\u8BFE\u4EF6\u5B66\u4E60\u8FDB\u5EA6"),e.createElement("i",{className:"iconfont icon-guanbi11 font14",style:{cursor:"pointer"},onClick:()=>{l()}})),e.createElement("div",{className:_a.header_style},e.createElement("div",null,"\u7CFB\u7EDF\u5C06\u5B9E\u65F6\u8BB0\u5F55\u5B66\u751F\u7684\u5B66\u4E60\u5B8C\u6210\u60C5\u51B5\uFF0C\u5B8C\u6210\u5B66\u4E60\u89C4\u5219\u5982\u4E0B\uFF1A"),e.createElement("div",null,"1.\u5305\u542B\u4EA4\u4E92\u5185\u5BB9\u7684\u5E7B\u706F\u7247\uFF1A\u9700\u8981\u5B66\u751F\u5B8C\u6210\u6240\u6709\u4EA4\u4E92\u64CD\u4F5C\u624D\u53EF\u6807\u8BB0\u4E3A\u5B8C\u6210\u5B66\u4E60"),e.createElement("div",null,"2.\u65E0\u4EA4\u4E92\u5185\u5BB9\u7684\u5E7B\u706F\u7247\uFF1A\u5B66\u751F\u6301\u7EED\u89C2\u770B\u8FBE10\u79D2\u540E\u81EA\u52A8\u8BB0\u5F55\u4E3A\u5B8C\u6210\u5B66\u4E60")),e.createElement("div",{className:_a.content},e.createElement("div",{className:_a.legend},e.createElement("div",{className:_a.legend_icon,style:{background:"#2EC25B"}}),e.createElement("div",null,"\u5DF2\u5B8C\u6210\u5B66\u4E60\u7684\u5E7B\u706F\u7247"),e.createElement("div",{className:_a.legend_icon,style:{background:"#C8D2E0",marginLeft:"40px"}}),e.createElement("div",null,"\u672A\u5B8C\u6210\u5B66\u4E60\u7684\u5E7B\u706F\u7247")),e.createElement("div",{style:{height:"380px",overflowY:"auto"}},e.createElement("div",{className:_a.item_list},e.createElement("div",{className:_a.item_list_title},(Q=Array.from({length:Math.ceil((Kt==null?void 0:Kt.length)/5)},(Pt,dt)=>dt+1))==null?void 0:Q.map((Pt,dt)=>e.createElement("div",{className:_a.item_title},e.createElement("div",{className:_a.item_top},e.createElement("div",null,"\u5E7B\u706F\u7247"),e.createElement("div",null,"\u9875\xA0\xA0\xA0\u7801")),e.createElement("div",{className:_a.item_bottom},"\u4EA4\xA0\xA0\xA0\u4E92")))),e.createElement("div",{className:_a.box}," ",Kt==null?void 0:Kt.map(Pt=>{var dt,Et,mt;return e.createElement("div",{className:Pt!=null&&Pt.learn_finish?_a.page_item_acitve:_a.page_item,style:{background:fe===(Pt==null?void 0:Pt.position)?"rgba(48, 97, 208, 0.2)":""}},e.createElement("div",{className:_a.item_top,onClick:()=>{nt(Pt==null?void 0:Pt.position)}},e.createElement("div",{className:_a.top_content},Pt==null?void 0:Pt.position)),!!((dt=Pt==null?void 0:Pt.module_sort)!=null&&dt.length)&&e.createElement("div",{className:_a.drag_style,onClick:()=>{nt(Pt==null?void 0:Pt.position)}},e.createElement("div",{className:_a.item_bottom},(mt=(Et=Pt==null?void 0:Pt.module_sort)==null?void 0:Et.map((nn,oe)=>`\u4EA4\u4E92${oe+1}`))==null?void 0:mt.join(" "))))}))))))))};var xd=(0,D.connect)(({globalSetting:r})=>({globalSetting:r}))(Dd),ol=n(59301),wd=Object.defineProperty,Sd=Object.defineProperties,bd=Object.getOwnPropertyDescriptors,Zs=Object.getOwnPropertySymbols,Id=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,zs=(r,u,l)=>u in r?wd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,_i=(r,u)=>{for(var l in u||(u={}))Id.call(u,l)&&zs(r,l,u[l]);if(Zs)for(var l of Zs(u))Md.call(u,l)&&zs(r,l,u[l]);return r},Ji=(r,u)=>Sd(r,bd(u)),Io=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const Nd=({user:r,officeToken:u,classroomList:l,globalSetting:b,loading:O,problemset:ct,dispatch:nt,pageCache:fe,pageNum:Q,maxPage:Ue,aiImg:Mt,changePage:yt,isSimulate:ft,gotoSlide:Ve})=>{var $e,Kt,It,kt,at,Pt,dt,Et,mt,nn,oe,Qt,sn,an,al,Nt,$t,Rn,Jt,wn,Ml,$l,xl,Dl,Pn,On,wl,Qu,Pa,xu,Ju,Oa,er,ha,Ou,la,Ja,nr,Pr,Or,Rr,gr,Qr,or,kr,lr,Br,Yr,Dr,Tr,eu,Ra,Sa,Er,pr,ka,Ar,xr,mn,Vr,Eo,Wr,Lr,uo,No,ao,Hr,hr,Po,po;const[Jl,Gr]=(0,e.useState)(0),ja=(0,D.useParams)(),[Ko,Ao]=(0,e.useState)(!1),[ro,Xa]=(0,e.useState)(!1),[Xu,Kr]=(0,e.useState)(0),[ml,ho]=(0,e.useState)([]),_r=(0,e.useRef)(null),qa=(0,e.useRef)([]),[oo,jr]=(0,e.useState)(!1),[Ya,Oo]=(0,e.useState)(null),[io,_o]=(0,e.useState)([]),[Ro,ko]=(0,e.useState)(!1),[Jo,ir]=(0,e.useState)(!1),[Za]=(0,D.useSearchParams)(),[so,To]=(0,e.useState)(!1),{SmartPlanItemBanks:_e}=l,[Xo,Lo]=(0,e.useState)(),[Ta,co]=(0,e.useState)(""),wr=(0,e.useRef)(null),Wa=(0,e.useRef)(null);(0,e.useEffect)(()=>{var Wn;((Wn=_e==null?void 0:_e.page)==null?void 0:Wn.current_limit_time)>0?co(_e.page.current_limit_time+1):co("")},[($e=_e==null?void 0:_e.page)==null?void 0:$e.current_limit_time]);const jo=()=>{if(!wr.current)return Ta;const Wn=Math.floor((Date.now()-wr.current)/1e3);return Math.max(0,Ta-Wn)},yo=()=>{const Wn=jo();if(co(Wn),Wn<=0){Wa.current&&(clearTimeout(Wa.current),Wa.current=null),setTimeout(()=>{Lo(new Date),on()},2e3);return}Wa.current&&clearTimeout(Wa.current),Wa.current=setTimeout(yo,1e3)};(0,e.useEffect)(()=>{if(Ta<=0)return;Ta==1&&setTimeout(()=>{S.ZP.warning("\u7B54\u9898\u7ED3\u675F\uFF0C\u65E0\u6CD5\u7EE7\u7EED\u63D0\u4EA4")},1e3),wr.current=Date.now(),yo();const Wn=()=>{document.hidden?Wa.current&&(clearTimeout(Wa.current),Wa.current=null):!Wa.current&&Ta>0&&(wr.current=Date.now()-(Ta-jo())*1e3,yo())};return document.addEventListener("visibilitychange",Wn),()=>{Wa.current&&clearTimeout(Wa.current),document.removeEventListener("visibilitychange",Wn)}},[Ta]);const Zo=Wn=>{const Nl=Math.floor(Wn/60),Ru=Wn%60;return`${String(Nl).padStart(2,"0")}:${String(Ru).padStart(2,"0")}`},qo={item_bank:"\u8BD5\u9898\u4F5C\u7B54",ai_qna:"\u667A\u6167\u4F34\u5B66",page_info:"\u9605\u8BFB\u89E3\u6790",animation_code:"\u52A8\u6548\u5B66\u4E60"},Ci={page_info:"1",ai_qna:"2",item_bank:"4"},[sr,Co]=(0,e.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[zo,Sr]=(0,e.useState)(""),Jr=(0,e.useRef)(null),et=(0,e.useRef)(null);(0,e.useEffect)(()=>{var Wn;((Wn=_e==null?void 0:_e.page)==null?void 0:Wn.animation_code)!==""&&(clearTimeout(et.current),et.current=setTimeout(()=>{var Nl;const Ru=document.createElement("iframe");Ru.style.width="100%",Ru.style.height="100%",Ru.style.overflow="auto",Ru.style.border="0";const qu=mu=>{try{const ia=mu.documentElement.scrollHeight;Ru.style.height=`${Math.max(ia+10,400)}px`,ia||setTimeout(()=>{qu(mu)},1e3)}catch(ia){console.error("\u65E0\u6CD5\u8BBF\u95EE iframe \u5185\u5BB9",ia)}};if(Jr.current){Jr.current.innerHTML="",Jr.current.appendChild(Ru);const mu=Ru.contentDocument||Ru.contentWindow.document;mu.open(),mu.write((Nl=_e==null?void 0:_e.page)==null?void 0:Nl.animation_code),mu.documentElement.scrollHeight,qu(mu),setTimeout(()=>{qu(mu)},1e3)}},1e3))},[(Kt=_e==null?void 0:_e.page)==null?void 0:Kt.animation_code,sr.open,Xu,zo]),(0,e.useEffect)(()=>{var Wn;if(Q){const Nl=((Wn=_e==null?void 0:_e.page)==null?void 0:Wn.lesson_mode)==="self_learning";(!Nl||Nl&&_r.current!==Q)&&on()}_r.current=Q},[Q,Jl,fe==null?void 0:fe.randomData]),(0,e.useEffect)(()=>{qa.current=[]},[Jl]),(0,e.useEffect)(()=>{Gr(0),Kr(0),ko(!1),ir(!1)},[Q]);const on=()=>Io(void 0,null,function*(){Ao(!0);const Wn=yield nt({type:"classroomList/getSmartPlanItemBanks",payload:{course_id:ja==null?void 0:ja.coursesId,id:ja==null?void 0:ja.id,position:Q,max_position:Ue,is_simulate:ft||null}});Ao(!1)});(0,e.useEffect)(()=>{var Wn,Nl,Ru,qu;Co(Ji(_i({},sr),{defaultValue:(Wn=_e==null?void 0:_e.page)==null?void 0:Wn.animation_code})),Sr(new Date),Xl((Nl=_e==null?void 0:_e.item_banks)==null?void 0:Nl[Jl]),_e!=null&&_e.relation_positions&&yt(_e==null?void 0:_e.relation_positions);let mu=[];mu=(qu=(Ru=_e==null?void 0:_e.page)==null?void 0:Ru.module_sort)==null?void 0:qu.map((ia,Zr)=>({key:Zr+1,label:qo[ia]})),console.log("items---",mu),ho([...mu||[]])},[_e]);const Hn=Wn=>Io(void 0,null,function*(){var Nl,Ru,qu,mu,ia;(Wn==null?void 0:Wn.length)!==0&&(yield(0,Se.ZP)(`/api/smart_plan_item_banks/${(Nl=_e==null?void 0:_e.page)==null?void 0:Nl.id}/user_answers.json`,{method:"post",body:{item_bank_id:(qu=(Ru=_e==null?void 0:_e.item_banks)==null?void 0:Ru[Jl])==null?void 0:qu.id,item_choice_id:((ia=(mu=_e==null?void 0:_e.item_banks)==null?void 0:mu[Jl])==null?void 0:ia.item_type)=="MULTIPLE"?Wn:Wn==null?void 0:Wn[0],is_simulate:ft||null,is_answered:!1}}))}),Wl=()=>Io(void 0,null,function*(){var Wn,Nl,Ru,qu,mu;if(qa.current.length===0){S.ZP.warning("\u8BF7\u60A8\u4F5C\u7B54\u540E\u518D\u63D0\u4EA4");return}jr(!0);const ia=yield(0,Se.ZP)(`/api/smart_plan_item_banks/${(Wn=_e==null?void 0:_e.page)==null?void 0:Wn.id}/user_answers.json`,{method:"post",body:{item_bank_id:(Ru=(Nl=_e==null?void 0:_e.item_banks)==null?void 0:Nl[Jl])==null?void 0:Ru.id,item_choice_id:((mu=(qu=_e==null?void 0:_e.item_banks)==null?void 0:qu[Jl])==null?void 0:mu.item_type)=="MULTIPLE"?qa.current:qa.current[0],is_simulate:ft||null,is_answered:!0}});jr(!1),(ia==null?void 0:ia.status)===0&&(yield on(),S.ZP.success("\u63D0\u4EA4\u6210\u529F"))}),Xl=Wn=>{var Nl,Ru;if(fe!=null&&fe.is_end){if(_e!=null&&_e.allow_answer_after_end&&!(Wn!=null&&Wn.is_answered)){Xa(!1);return}Xa(!0);return}switch((Nl=_e==null?void 0:_e.page)==null?void 0:Nl.solution_visibility){case"hidden":Xa(!1);break;case"show_after_edit":Wn!=null&&Wn.is_answered?Xa(!0):Xa(!1);break;case"show_after_submission":((Ru=_e==null?void 0:_e.page)==null?void 0:Ru.status)==="ended"?Xa(!0):Xa(!1);break;case"show_after_ended":fe!=null&&fe.is_end?Xa(!0):Xa(!1);break;default:Xa(!1)}},_n=(Wn=0)=>{var Nl,Ru,qu,mu;switch((Nl=ml==null?void 0:ml[Wn])==null?void 0:Nl.label){case"\u8BD5\u9898\u4F5C\u7B54":return((Ru=_e==null?void 0:_e.item_banks)==null?void 0:Ru.length)&&((qu=_e==null?void 0:_e.item_banks)==null?void 0:qu.every(ia=>ia==null?void 0:ia.is_answered));case"\u667A\u6167\u4F34\u5B66":return((mu=_e==null?void 0:_e.page)==null?void 0:mu.finish_ai_qna)||Ro;case"\u9605\u8BFB\u89E3\u6790":return(_e==null?void 0:_e.page.finish_read_page_info)||Jo;case"\u52A8\u6548\u5B66\u4E60":return!0}};(0,e.useEffect)(()=>{var Wn;Xl((Wn=_e==null?void 0:_e.item_banks)==null?void 0:Wn[Jl])},[Jl]);const tu=()=>{if(!_n()){S.ZP.info("\u8BF7\u5B8C\u6210\u672C\u9636\u6BB5\u7684\u5B66\u4E60\u4EFB\u52A1");return}Kr(1)},aa=()=>Io(void 0,null,function*(){var Wn,Nl,Ru,qu,mu,ia,Zr,Ti;if((Nl=(Wn=_e==null?void 0:_e.item_banks)==null?void 0:Wn[Jl])!=null&&Nl.hack_identifier){const zr=yield(0,Os.nF)({id:(qu=(Ru=_e==null?void 0:_e.item_banks)==null?void 0:Ru[Jl])==null?void 0:qu.hack_identifier});if((zr==null?void 0:zr.status)===0){const Li=window.open(`/myproblems/${zr==null?void 0:zr.identifier}?type=smartPlan&exercisesId=${ja==null?void 0:ja.id}&coursesId=${ja==null?void 0:ja.coursesId}&questionId=${(ia=(mu=_e==null?void 0:_e.item_banks)==null?void 0:mu[Jl])==null?void 0:ia.id}&smartPlanItemBankId=${(Ti=(Zr=_e==null?void 0:_e.item_banks)==null?void 0:Zr[Jl])==null?void 0:Ti.smart_plan_page_item_bank_id}&isSimulate=${ft}&is_smart_plan=true`,"_blank");Oo(Li),io.push(Li),_o([...io])}}}),tn=()=>{if(ml!=null&&ml.length){const Wn=ml==null?void 0:ml.findIndex(Nl=>(Nl==null?void 0:Nl.label)=="\u8BD5\u9898\u4F5C\u7B54");return Wn>-1?Wn==0?_n(0):_n(1):!0}else return!0};return(0,e.useEffect)(()=>{var Wn,Nl;if(!Ya||Ya.closed||((Nl=(Wn=_e==null?void 0:_e.item_banks)==null?void 0:Wn[Jl])==null?void 0:Nl.item_type)!="PROGRAM")return;const Ru=()=>{var mu,ia;const Zr={type:"showIntelligentTeacherStatus",aiStatus:(mu=_e==null?void 0:_e.page)==null?void 0:mu.enable_ai_tutor,questionStatus:((ia=_e==null?void 0:_e.page)==null?void 0:ia.status)==="ended",SmartPlanItemBanks:_e};Ya.postMessage(Zr,"*")};if(Ya.document.readyState==="complete")setTimeout(()=>{Ru()},3e3);else{const mu=()=>{Ru(),Ya.removeEventListener("load",mu)};Ya.addEventListener("load",mu)}const qu=()=>Io(void 0,null,function*(){console.log("\u5B50\u7A97\u53E3\u5DF2\u5173\u95ED")});return Ya==null||Ya.addEventListener("unload",qu),()=>{Ya==null||Ya.removeEventListener("unload",qu)}},[Ya,_e,Xu,Jl]),ol.createElement("section",null,ol.createElement(ye.Z,{spinning:!1},(_e==null?void 0:_e.smart_plan_status)=="not_started"&&!(_e!=null&&_e.is_simulate)?ol.createElement(Il.Z,{styles:{margin:"35vh auto"},customText:"\u6682\u672A\u5F00\u8BFE"}):ol.createElement("div",{className:Da.box},ol.createElement("div",{className:Da.box_header,style:{height:Xu==1?"140px":"95px"}},ol.createElement("div",{className:Da.box_wrap},!!ml.length&&ol.createElement("div",{className:Da.progressbarWrap},ol.createElement("div",{className:`${Da.progressItem} ${Xu==0?Da.activeWrap:""}`,onClick:()=>Io(void 0,null,function*(){Kr(0),yield on()})},ml.length>1&&(_n()?ol.createElement("i",{className:"iconfont icon-duigou mr10 font24",style:{color:"#3061D0"}}):ol.createElement("div",{className:Da.circle},"1")),ol.createElement("div",null,(It=ml==null?void 0:ml[0])==null?void 0:It.label),Xu==0&&((kt=ml==null?void 0:ml[0])==null?void 0:kt.label)=="\u8BD5\u9898\u4F5C\u7B54"&&Ta&&((at=_e==null?void 0:_e.page)==null?void 0:at.status)=="in_progress"?ol.createElement("span",{className:Da.daojishi},ol.createElement("i",{className:"iconfont icon-dingbu-shiyanhuanjingdaojishi mr5"}),ol.createElement("span",{style:{width:"45px"}},Zo(Ta))):ol.createElement("span",null),Xu==0&&((Pt=ml==null?void 0:ml[0])==null?void 0:Pt.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((dt=_e==null?void 0:_e.page)==null?void 0:dt.status)=="ended"?ol.createElement("span",{className:Da.datijieshu},"\u7B54\u9898\u5DF2\u7ED3\u675F"):ol.createElement("span",null)),ml.length>1&&ol.createElement(ol.Fragment,null,ol.createElement("img",{src:n(922),width:46,height:10,style:{marginLeft:"10px",marginRight:"10px"}}),ol.createElement("div",{className:`${Da.progressItem} ${Xu==1?Da.activeWrap:""}`,onClick:()=>Io(void 0,null,function*(){tu(),_n()&&(yield on())})},_n(0)&&_n(1)?ol.createElement("i",{className:"iconfont icon-duigou mr10 font24",style:{color:"#3061D0"}}):ol.createElement("div",{className:Da.circle},"2"),ol.createElement("div",null,(Et=ml==null?void 0:ml[1])==null?void 0:Et.label),Xu==1&&((mt=ml==null?void 0:ml[1])==null?void 0:mt.label)=="\u8BD5\u9898\u4F5C\u7B54"&&Ta&&((nn=_e==null?void 0:_e.page)==null?void 0:nn.status)=="in_progress"?ol.createElement("span",{className:Da.daojishi},ol.createElement("i",{className:"iconfont icon-dingbu-shiyanhuanjingdaojishi mr5"}),ol.createElement("span",{style:{width:"45px"}},Zo(Ta))):ol.createElement("span",null),Xu==1&&((oe=ml==null?void 0:ml[1])==null?void 0:oe.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((Qt=_e==null?void 0:_e.page)==null?void 0:Qt.status)=="ended"?ol.createElement("span",{className:Da.datijieshu},"\u7B54\u9898\u5DF2\u7ED3\u675F"):ol.createElement("span",null)))),ol.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center"}},!ft&&ol.createElement("div",{className:Da.box_botton,style:{marginRight:"20px"},onClick:()=>{To(!0)}},ol.createElement("img",{src:n(49324),width:18}),ol.createElement("div",{style:{color:"#5F6A95",marginLeft:"5px"}},"\u5B66\u4E60\u8FDB\u5EA6")),ol.createElement("div",{className:Da.quit,onClick:()=>{D.history.push(`/classrooms/${ja==null?void 0:ja.coursesId}/smart_plan`)}},ol.createElement("i",{className:"iconfont icon-tuichukejian",style:{width:"16px",height:"16px",marginTop:"2px"}}),ol.createElement("div",{style:{marginLeft:"5px"}},"\u9000\u51FA\u5B66\u4E60"))))),ol.createElement("div",{className:Da.mainContent,style:{height:Xu==1?((sn=ml==null?void 0:ml[Xu])==null?void 0:sn.label)=="\u8BD5\u9898\u4F5C\u7B54"?"calc(100vh - 220px)":"calc(100vh - 140px)":((an=ml==null?void 0:ml[Xu])==null?void 0:an.label)=="\u8BD5\u9898\u4F5C\u7B54"?"calc(100vh - 175px)":"calc(100vh - 95px)"}},!(ml!=null&&ml.length)&&ol.createElement("div",null,ol.createElement(Il.Z,{customText:"\u672C\u9875\u91CD\u70B9\u4E3A\u638C\u63E1\u5DE6\u4FA7\u5E7B\u706F\u7247\u7684\u77E5\u8BC6\u8981\u70B9\uFF0C\u8BF7\u8BA4\u771F\u9605\u8BFB\u3002"})),((al=ml==null?void 0:ml[Xu])==null?void 0:al.label)=="\u667A\u6167\u4F34\u5B66"&&ol.createElement(Ed.Z,{onNextButtonClick:()=>{tu(),on()},style:{height:"100%"},onStatusChange:Wn=>{ko(Wn)},showNextButton:Xu+1!=(ml==null?void 0:ml.length),showInterText:(u==null?void 0:u.Status)=="ended"||(fe==null?void 0:fe.is_end),interactionTotal:(Nt=_e==null?void 0:_e.page)==null?void 0:Nt.knowledge_size,initDefaultChatDataKey:(($t=_e==null?void 0:_e.page)==null?void 0:$t.id)+((Rn=_e==null?void 0:_e.page)==null?void 0:Rn.update_size),defaultChatData:(Jt=_e==null?void 0:_e.student_qna_records)==null?void 0:Jt.knowledge,data:{ppt_url:Mt==null?void 0:Mt.map(Wn=>Wn==null?void 0:Wn.url),questionable_type:"SmartPlanItemBank",questionable_id:(wn=_e==null?void 0:_e.page)==null?void 0:wn.id,position:Q,type:11,scene_type:ft?13:null}}),((Ml=ml==null?void 0:ml[Xu])==null?void 0:Ml.label)=="\u9605\u8BFB\u89E3\u6790"&&ol.createElement(pd.Z,{onNextButtonClick:()=>{tu(),on()},style:{height:"100%"},openRecord:(($l=_e==null?void 0:_e.page)==null?void 0:$l.finish_read_page_info)===!1,showNextButton:Xu+1!=(ml==null?void 0:ml.length),showInterText:(u==null?void 0:u.Status)=="ended"||(fe==null?void 0:fe.is_end),onStatusChange:Wn=>{ir(Wn)},readingTime:(xl=_e==null?void 0:_e.page)==null?void 0:xl.info_read_time,analysis:(Dl=_e==null?void 0:_e.page)==null?void 0:Dl.page_info,totalTime:(Pn=_e==null?void 0:_e.page)==null?void 0:Pn.info_read_min_time,initDefaultChatDataKey:(On=_e==null?void 0:_e.page)==null?void 0:On.id,defaultChatData:(wl=_e==null?void 0:_e.student_qna_records)==null?void 0:wl.page_info,data:{ppt_url:Mt==null?void 0:Mt.map(Wn=>Wn==null?void 0:Wn.url),questionable_type:"SmartPlanItemBank",questionable_id:(Qu=_e==null?void 0:_e.page)==null?void 0:Qu.id,position:Q,type:10,scene_type:ft?13:null}}),ol.createElement("div",{style:{padding:"0px 20px"}},ol.createElement(Ql.Z,{key:zo,defaultValue:sr.defaultValue,open:sr.open,onOpenChange:Wn=>{Co(Ji(_i({},sr),{open:0}))},language:sr.language,height:sr.height,showExtra:!1}),((Pa=ml==null?void 0:ml[Xu])==null?void 0:Pa.label)=="\u52A8\u6548\u5B66\u4E60"&&((xu=_e==null?void 0:_e.page)==null?void 0:xu.animation_code)&&ol.createElement("div",{className:Da.code_style},ol.createElement("div",{style:{display:"flex",alignItems:"center"}},ol.createElement("div",{style:{color:"#333",fontWeight:500,fontSize:"14px"}},"\u667A\u80FD\u52A8\u6548"),ol.createElement(H.Z,{title:"\u5168\u5C4F\u5C55\u793A"},ol.createElement("i",{className:"iconfont icon-quanping5 font14",style:{marginLeft:"auto",color:"#3061D0",cursor:"pointer"},onClick:()=>{Co(Ji(_i({},sr),{open:sr.open+1}))}}))),ol.createElement("div",{className:"mt10",ref:Jr})),((Ju=ml==null?void 0:ml[Xu])==null?void 0:Ju.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((Oa=_e==null?void 0:_e.item_banks)!=null&&Oa[Jl]&&((ha=["in_progress","ended"])!=null&&ha.includes((er=_e==null?void 0:_e.page)==null?void 0:er.status))?ol.createElement(ol.Fragment,null,ol.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center"}},((la=(Ou=_e==null?void 0:_e.item_banks)==null?void 0:Ou[Jl])==null?void 0:la.item_type)==="SINGLE"&&ol.createElement($c,{questionIndex:((Ja=_e==null?void 0:_e.item_banks)==null?void 0:Ja.length)>1?Jl+1:0,question:(nr=_e==null?void 0:_e.item_banks)==null?void 0:nr[Jl],questionChoiceIdsRef:qa,changeChoiceIds:Hn,pageCache:fe,solutionVis:ro,pageInfo:_e==null?void 0:_e.page,SmartPlanItemBanks:_e}),((Or=(Pr=_e==null?void 0:_e.item_banks)==null?void 0:Pr[Jl])==null?void 0:Or.item_type)==="MULTIPLE"&&ol.createElement(Hc,{questionIndex:((Rr=_e==null?void 0:_e.item_banks)==null?void 0:Rr.length)>1?Jl+1:0,question:(gr=_e==null?void 0:_e.item_banks)==null?void 0:gr[Jl],questionChoiceIdsRef:qa,changeChoiceIds:Hn,pageCache:fe,solutionVis:ro,pageInfo:_e==null?void 0:_e.page,SmartPlanItemBanks:_e}),((or=(Qr=_e==null?void 0:_e.item_banks)==null?void 0:Qr[Jl])==null?void 0:or.item_type)==="JUDGMENT"&&ol.createElement(rd,{questionIndex:((kr=_e==null?void 0:_e.item_banks)==null?void 0:kr.length)>1?Jl+1:0,question:(lr=_e==null?void 0:_e.item_banks)==null?void 0:lr[Jl],questionChoiceIdsRef:qa,changeChoiceIds:Hn,pageCache:fe,solutionVis:ro,pageInfo:_e==null?void 0:_e.page,SmartPlanItemBanks:_e}),((Yr=(Br=_e==null?void 0:_e.item_banks)==null?void 0:Br[Jl])==null?void 0:Yr.item_type)==="PROGRAM"&&ol.createElement(gd,{questionIndex:((Dr=_e==null?void 0:_e.item_banks)==null?void 0:Dr.length)>1?Jl+1:0,question:(Tr=_e==null?void 0:_e.item_banks)==null?void 0:Tr[Jl],questionChoiceIdsRef:qa,SmartPlanItemBanks:_e,pageCache:fe,solutionVis:ro,handleRefresh:on,childWindow:Ya,closeProgram:Xo,setCloseProgram:Lo,childsWindow:io}),((eu=ml==null?void 0:ml[Xu])==null?void 0:eu.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((u==null?void 0:u.Status)=="ended"||(fe==null?void 0:fe.is_end))&&!(_e!=null&&_e.allow_answer_after_end)&&!((Sa=(Ra=_e==null?void 0:_e.item_banks)==null?void 0:Ra[Jl])!=null&&Sa.is_answered)&&ol.createElement("div",{className:"flex justify-center mb20 mt20"},"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u7ED3\u675F\uFF0C\u65E0\u6CD5\u8FDB\u884C\u64CD\u4F5C"))):_e!=null&&_e.is_extra?fe!=null&&fe.enable_extra?"\u6E29\u99A8\u63D0\u793A\uFF1A\u5F53\u524D\u9875\u9762\u6682\u65E0\u62D3\u5C55\u4E60\u9898\uFF0C\u53EF\u4EE5\u5411\u6388\u8BFE\u6559\u5E08\u5EFA\u8BAE\u8865\u5145\u3002":"\u6E29\u99A8\u63D0\u793A\uFF1A\u5B8C\u6210\u5F53\u524D\u8BFE\u4EF6\u7684\u6240\u6709\u57FA\u7840\u9898\u540E\uFF0C\u4F60\u624D\u53EF\u4EE5\u89E3\u9501\u62D3\u5C55\u7EC3\u4E60\u54E6\u3002":ol.createElement(Il.Z,{customText:"\u5F53\u524D\u5B66\u4E60\u5185\u5BB9\u5305\u542B\u8BD5\u9898\u4F5C\u7B54\u73AF\u8282\uFF0C\u5728\u8001\u5E08\u542F\u52A8\u7B54\u9898\u540E\u5373\u53EF\u4F5C\u7B54\u3002"})))),((Er=ml==null?void 0:ml[Xu])==null?void 0:Er.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((ka=["in_progress","ended"])==null?void 0:ka.includes((pr=_e==null?void 0:_e.page)==null?void 0:pr.status))&&ol.createElement("div",{className:Da.page_footer},((Ar=_e==null?void 0:_e.item_banks)==null?void 0:Ar.length)>1&&((xr=Array.from({length:_e==null?void 0:_e.count},(Wn,Nl)=>Nl+1))==null?void 0:xr.map((Wn,Nl)=>ol.createElement("div",{key:Nl,className:Nl==Jl?Da.num_style_active:Da.num_style,onClick:()=>{Gr(Nl)}},Wn))),ol.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center"}},Jl>0?ol.createElement("div",{className:Da.button1,onClick:()=>{Jl>0&&Gr(Jl-1)}},"\u4E0A\u4E00\u9898"):null,Jl+1<(_e==null?void 0:_e.count)?ol.createElement("div",{className:Da.button1,style:{marginLeft:"10px"},onClick:()=>{Jl<(_e==null?void 0:_e.count)&&Gr(Jl+1)}},"\u4E0B\u4E00\u9898"):null,((Vr=(mn=_e==null?void 0:_e.item_banks)==null?void 0:mn[Jl])==null?void 0:Vr.item_type)!="PROGRAM"&&!((Wr=(Eo=_e==null?void 0:_e.item_banks)==null?void 0:Eo[Jl])!=null&&Wr.is_answered)&&(((Lr=_e==null?void 0:_e.page)==null?void 0:Lr.status)!="ended"||ft||fe!=null&&fe.is_end&&(_e!=null&&_e.allow_answer_after_end)&&((uo=_e==null?void 0:_e.page)==null?void 0:uo.status)=="ended")?ol.createElement(ut.ZP,{className:"ml10",type:"primary",loading:oo,onClick:()=>{Wl()}},"\u63D0\u4EA4"):null,((ao=(No=_e==null?void 0:_e.item_banks)==null?void 0:No[Jl])==null?void 0:ao.item_type)=="PROGRAM"&&!((hr=(Hr=_e==null?void 0:_e.item_banks)==null?void 0:Hr[Jl])!=null&&hr.is_answered)&&(((Po=_e==null?void 0:_e.page)==null?void 0:Po.status)!="ended"||ft||fe!=null&&fe.is_end&&(_e!=null&&_e.allow_answer_after_end)&&((po=_e==null?void 0:_e.page)==null?void 0:po.status)=="ended")?ol.createElement(ut.ZP,{className:"ml10",type:"primary",onClick:()=>{aa()}},"\u8FDB\u5165\u7B54\u9898"):null,_n()&&(Xu==1||Xu==0&&(ml==null?void 0:ml.length)==2)?ol.createElement(ut.ZP,{type:"primary",className:"ml10",onClick:()=>{Xu==1?Kr(0):Kr(1)}},Xu==1?"\u8FD4\u56DE\u4E0A\u4E00\u9636\u6BB5":"\u8FDB\u5165\u4E0B\u4E00\u9636\u6BB5"):null)),ol.createElement(xd,{interactiveOpen:so,maxPage:Ue,onClose:()=>To(!1),currentPage:Q,paramsHttp:ja,handlePageClick:Wn=>{var Nl;if(!(_e!=null&&_e.enable_progress_control)){S.ZP.warning("\u4E0D\u5141\u8BB8\u7FFB\u9875\uFF0C\u5DF2\u5F3A\u5236\u8DDF\u968F\u6559\u5E08\u8FDB\u5EA6\u81EA\u52A8\u7FFB\u9875");return}if(Wn>(fe==null?void 0:fe.class_max_position)&&(u==null?void 0:u.Status)=="in_progress"&&((Nl=_e==null?void 0:_e.page)==null?void 0:Nl.lesson_mode)=="online_lesson"){S.ZP.warning("\u8BE5\u9875\u672A\u8BB2\u89E3\uFF0C\u5C06\u8DF3\u8F6C\u81F3\u6559\u5E08\u5F53\u524D\u9875\u9762"),Ve(fe==null?void 0:fe.page);return}Ve(Wn)},currentPosition:Q}))))};var Pd=(0,D.connect)(({user:r,classroomList:u,loading:l,globalSetting:b,problemset:O})=>({user:r,classroomList:u,globalSetting:b,loading:l.effects,problemset:O}))(Nd),Va={box:"box___TOI8U",code_style:"code_style___HqBfy",box_header:"box_header___aw0DM",header_title:"header_title___aeL59",ewm:"ewm___vQtyb",ewm_img:"ewm_img___qqWwF",ewm_text:"ewm_text___i4Jyd",question_buuton:"question_buuton___dQRn4",selectQuestion:"selectQuestion___ziNOo",addQuestion:"addQuestion___aHncw",submit_button:"submit_button___KEeMK",evalueWrap:"evalueWrap___NEAE5",evalueSty:"evalueSty___Fk0S3",title:"title___Mq_RW",label:"label___ZOLLS",asnCont:"asnCont___wrZOg",ansWrap:"ansWrap____M3UH",page_footer:"page_footer___bYve1",num_style:"num_style___dooAY",num_style_active:"num_style_active___tFy8m",question_add:"question_add___WXNyb",yulan_style:"yulan_style___shO_G",yulan_style_end:"yulan_style_end___gxZaC"},Od=Object.defineProperty,Us=Object.getOwnPropertySymbols,Rd=Object.prototype.hasOwnProperty,kd=Object.prototype.propertyIsEnumerable,Qs=(r,u,l)=>u in r?Od(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Ys=(r,u)=>{for(var l in u||(u={}))Rd.call(u,l)&&Qs(r,l,u[l]);if(Us)for(var l of Us(u))kd.call(u,l)&&Qs(r,l,u[l]);return r};const Td=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{const[O,ct]=(0,e.useState)({}),[nt,fe]=(0,e.useState)([]),Q={fontSize:"18px"},Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,e.useEffect)(()=>{const yt=(0,Bt.cloneDeep)(l);ct(yt),fe(yt.choices)},[l]);const Mt=(yt=!1)=>{let ft="";return nt.forEach((Ve,$e)=>{yt?Ve!=null&&Ve.me_answered&&(ft=ft+Ue[$e]):Ve!=null&&Ve.is_answer&&(ft=ft+Ue[$e])}),ft};return e.createElement("div",null,e.createElement("div",{className:En.questionWrap},e.createElement(F.Z,{value:'\u591A\u9009\u9898
'+(O==null?void 0:O.name),style:Ys({},Q)}),nt==null?void 0:nt.map((yt,ft)=>{const{is_answer:Ve,checked:$e,choice_text:Kt,me_answered:It}=yt;let kt="";return Ve&&(kt=En.rightAnswerBox),!Ve&&($e||It)&&(kt=En.errorAnswerBox),e.createElement(U.Z,{key:ft,className:`${En.choiceBox} ${kt}`,align:"middle",wrap:!1,style:{cursor:"pointer",marginTop:ft==0?"30px":"20px"}},e.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:En.choiceIndex},Ue[ft]),e.createElement(z.Z,{flex:1,className:"ml30"},e.createElement(F.Z,{className:En.html,value:Kt,style:Ys({},Q)})),Ve&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),!Ve&&($e||It)&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))})),e.createElement("div",{className:En.solutionWrap},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),e.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Mt(!1))),e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),nt.find(yt=>yt==null?void 0:yt.me_answered)?e.createElement(e.Fragment,null,(()=>{const yt=nt.map((It,kt)=>It!=null&&It.me_answered?kt:-1).filter(It=>It!==-1),ft=nt.map((It,kt)=>It!=null&&It.is_answer?kt:-1).filter(It=>It!==-1),$e=yt.length===ft.length&&yt.every(It=>ft.includes(It))?En.greenColor:En.redColor,Kt=yt.map(It=>Ue[It]).join("");return e.createElement("span",{className:$e,style:{fontWeight:600,fontSize:"16px"}},Kt||"\u672A\u4F5C\u7B54")})()):e.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),e.createElement("div",null,e.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((O==null?void 0:O.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))))};var Ld=(0,D.connect)(({problemset:r})=>({problemset:r}))(Td),Aa=n(59301),jd=Object.defineProperty,Vs=Object.getOwnPropertySymbols,Zd=Object.prototype.hasOwnProperty,zd=Object.prototype.propertyIsEnumerable,Ws=(r,u,l)=>u in r?jd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Hs=(r,u)=>{for(var l in u||(u={}))Zd.call(u,l)&&Ws(r,l,u[l]);if(Vs)for(var l of Vs(u))zd.call(u,l)&&Ws(r,l,u[l]);return r};const Ud=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{const[O,ct]=(0,e.useState)({}),[nt,fe]=(0,e.useState)([]),Q={fontSize:"18px"},Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];return(0,e.useEffect)(()=>{const Mt=(0,Bt.cloneDeep)(l);ct(Mt),fe(Mt.choices)},[l]),Aa.createElement("div",null,Aa.createElement("div",{className:En.questionWrap},Aa.createElement(F.Z,{value:'\u5355\u9009\u9898
'+(O==null?void 0:O.name),style:Hs({},Q)}),nt==null?void 0:nt.map((Mt,yt)=>{const{is_answer:ft,checked:Ve,choice_text:$e,me_answered:Kt}=Mt;let It="";return ft&&(It=En.rightAnswerBox),!ft&&(Ve||Kt)&&(It=En.errorAnswerBox),Aa.createElement(U.Z,{key:yt,className:`${En.choiceBox} ${It}`,align:"middle",wrap:!1,style:{cursor:"pointer",marginTop:yt==0?"30px":"20px"}},Aa.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:En.choiceIndex},Ue[yt]),Aa.createElement(z.Z,{flex:1,className:"ml30"},Aa.createElement(F.Z,{className:En.html,value:$e,style:Hs({},Q)})),ft&&Aa.createElement(z.Z,null,Aa.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),!ft&&(Ve||Kt)&&Aa.createElement(z.Z,null,Aa.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))})),Aa.createElement("div",{className:En.solutionWrap},Aa.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Aa.createElement("div",{className:"c-grey-333 mb5 font16"},Aa.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),Aa.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Ue[nt.findIndex(Mt=>Mt==null?void 0:Mt.is_answer)])),Aa.createElement("div",{className:"c-grey-333 mb5 font16"},Aa.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),nt.find(Mt=>Mt==null?void 0:Mt.me_answered)?Aa.createElement(Aa.Fragment,null,(()=>{var Mt;const yt=nt.findIndex($e=>$e==null?void 0:$e.me_answered),Ve=((Mt=nt[yt])==null?void 0:Mt.is_answer)?En.greenColor:En.redColor;return Aa.createElement("span",{className:Ve,style:{fontWeight:600,fontSize:"16px"}},Ue[yt])})()):Aa.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),Aa.createElement("div",null,Aa.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((O==null?void 0:O.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))))};var Qd=(0,D.connect)(({problemset:r})=>({problemset:r}))(Ud),Yd=Object.defineProperty,Gs=Object.getOwnPropertySymbols,Vd=Object.prototype.hasOwnProperty,Wd=Object.prototype.propertyIsEnumerable,Ks=(r,u,l)=>u in r?Yd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,_s=(r,u)=>{for(var l in u||(u={}))Vd.call(u,l)&&Ks(r,l,u[l]);if(Gs)for(var l of Gs(u))Wd.call(u,l)&&Ks(r,l,u[l]);return r};const Hd=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{const[O,ct]=(0,e.useState)({}),[nt,fe]=(0,e.useState)([]),Q={fontSize:"18px"};(0,e.useEffect)(()=>{const Mt=(0,Bt.cloneDeep)(l);ct(Mt),fe(Mt.choices)},[l]);const Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];return e.createElement("div",null,e.createElement("div",{className:En.questionWrap},e.createElement(F.Z,{value:'\u5224\u65AD\u9898
'+(O==null?void 0:O.name),style:_s({},Q)}),nt==null?void 0:nt.map((Mt,yt)=>{const{is_answer:ft,checked:Ve,choice_text:$e,me_answered:Kt}=Mt;let It="";return ft&&(It=En.rightAnswerBox),!ft&&(Ve||Kt)&&(It=En.errorAnswerBox),e.createElement(U.Z,{key:yt,className:`${En.choiceBox} ${It}`,align:"middle",wrap:!1,style:{cursor:"pointer",marginTop:yt==0?"30px":"20px"}},e.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:En.choiceIndex},Ue[yt]),e.createElement(z.Z,{flex:1,className:"ml30"},e.createElement(F.Z,{className:En.html,value:$e,style:_s({},Q)})),ft&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),!ft&&(Ve||Kt)&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))})),e.createElement("div",{className:En.solutionWrap},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),e.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Ue[nt.findIndex(Mt=>Mt==null?void 0:Mt.is_answer)])),e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),nt.find(Mt=>Mt==null?void 0:Mt.me_answered)?e.createElement(e.Fragment,null,(()=>{var Mt;const yt=nt.findIndex($e=>$e==null?void 0:$e.me_answered),Ve=((Mt=nt[yt])==null?void 0:Mt.is_answer)?En.greenColor:En.redColor;return e.createElement("span",{className:Ve,style:{fontWeight:600,fontSize:"16px"}},Ue[yt])})()):e.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),e.createElement("div",null,e.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((O==null?void 0:O.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))))};var Gd=(0,D.connect)(({problemset:r})=>({problemset:r}))(Hd),da=n(59301),Kd=Object.defineProperty,Js=Object.getOwnPropertySymbols,_d=Object.prototype.hasOwnProperty,Jd=Object.prototype.propertyIsEnumerable,Xs=(r,u,l)=>u in r?Kd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Xd=(r,u)=>{for(var l in u||(u={}))_d.call(u,l)&&Xs(r,l,u[l]);if(Js)for(var l of Js(u))Jd.call(u,l)&&Xs(r,l,u[l]);return r};const qd={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},$d=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{var O;const ct={fontSize:"18px"},nt={C:da.createElement("span",{className:En.c},"C"),"C++":da.createElement("span",{className:En.cpp},"C++"),Java:da.createElement("span",{className:En.java},"Java"),Python:da.createElement("span",{className:En.python},"Python")},fe={not_started:da.createElement("span",{style:{fontSize:"18px",color:"rgb(144,150,163)"}},"\u672A\u5F00\u542F"),not_pass:da.createElement("span",{style:{fontSize:"18px",color:"rgb(227,0,0)"}},"\u672A\u901A\u5173"),passed:da.createElement("span",{style:{fontSize:"18px",color:"rgb(0,177,135)"}},"\u5DF2\u901A\u5173"),delay_passed:da.createElement("span",{style:{fontSize:"18px",color:"rgb(178, 173, 8)"}},"\u7ED3\u675F\u7B54\u9898\u540E\u901A\u5173")};return da.createElement("div",null,da.createElement("div",{className:En.questionWrap},da.createElement(F.Z,{value:'\u7F16\u7A0B\u9898
'+(l==null?void 0:l.name),style:Xd({},ct)})),da.createElement("div",{className:En.descBox},da.createElement("div",{className:En.title},da.createElement("span",{style:{fontSize:"16px",color:"#666",marginRight:"8px"}},"\u5141\u8BB8\u7F16\u7A0B\u8BED\u8A00\uFF1A"),(O=l==null?void 0:l.languages)==null?void 0:O.map((Q,Ue,Mt)=>da.createElement(e.Fragment,{key:Ue},nt[Q==null?void 0:Q.language]))),da.createElement("div",{className:En.desc},da.createElement(F.Z,{value:'\u95EE\u9898\u63CF\u8FF0'+(l==null?void 0:l.description),style:{fontSize:"16px",color:"#000"}}))),(l==null?void 0:l.answer_status)!="not_started"&&da.createElement("div",{style:{display:"flex",alignItems:"center",marginTop:"30px",fontWeight:500}},da.createElement("span",{style:{fontSize:"18px",color:"#000",fontWeight:"500",marginRight:"10px"}},"\u7B54\u9898\u72B6\u6001"),fe[l==null?void 0:l.answer_status]),["passed","delay_passed"].includes(l==null?void 0:l.answer_status)&&da.createElement("div",{className:En.descBox},da.createElement("div",{className:En.title},da.createElement("span",{style:{fontSize:"16px",color:"#000",marginRight:"8px"}},"\u6700\u540E\u901A\u5173\u4EE3\u7801"),da.createElement("span",{style:{fontSize:"14px",color:"#666"}},"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u6253\u901A\u5173\u4EE3\u7801")),da.createElement("div",{className:En.desc,style:{backgroundColor:"#fff"}},da.createElement(xn.ZP,{height:300,language:l==null?void 0:l.language,value:l!=null&&l.passed_code?qn.Base64.decode(l==null?void 0:l.passed_code):"",theme:"default",options:qd}))))};var e0=(0,D.connect)(({problemset:r})=>({problemset:r}))($d),Vl=n(59301),Xi=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const t0=({user:r,globalSetting:u,classroomList:l,loading:b,problemset:O,dispatch:ct,pageNum:nt,maxPage:fe})=>{var Q,Ue,Mt,yt,ft,Ve,$e,Kt,It,kt,at,Pt,dt,Et,mt,nn,oe,Qt,sn;const[an]=(0,D.useSearchParams)(),[al,Nt]=(0,e.useState)(0),$t=(0,D.useParams)(),[Rn,Jt]=(0,e.useState)(!1);console.log("paramsHttp--",$t);const[wn,Ml]=(0,e.useState)(null),[$l,xl]=(0,e.useState)(!1),[Dl,Pn]=(0,e.useState)(!1),{SmartPlanItemBanks:On}=l,wl={not_started:"\u672A\u5F00\u542F",not_pass:"\u672A\u901A\u5173",passed:"\u5DF2\u901A\u5173",delay_passed:"\u7ED3\u675F\u7B54\u9898\u540E\u901A\u5173"};(0,e.useEffect)(()=>{nt&&Qu()},[nt,$t==null?void 0:$t.user_login]);const Qu=()=>Xi(void 0,null,function*(){Jt(!0),ct({type:"classroomList/getSmartPlanItemBanks",payload:{login:$t==null?void 0:$t.user_login,course_id:$t==null?void 0:$t.coursesId,id:$t==null?void 0:$t.id,position:nt,max_position:fe}}),Jt(!1)});(0,e.useEffect)(()=>{var xu,Ju;Nt(0),(xu=On==null?void 0:On.page)!=null&&xu.id&&Pa((Ju=On==null?void 0:On.page)==null?void 0:Ju.id)},[On]);const Pa=xu=>Xi(void 0,null,function*(){xl(!0);const Ju=yield(0,Se.ZP)(`/api/smart_plan_item_banks/${xu}/student_comment.json`,{method:"get",params:{user_id:$t==null?void 0:$t.user_login}});(Ju==null?void 0:Ju.status)===0&&Ml(Ju==null?void 0:Ju.data),xl(!1)});return Vl.createElement("section",null,Vl.createElement(ye.Z,{spinning:Rn},Vl.createElement("div",{className:Va.box},Vl.createElement("div",{className:Va.box_header,style:{padding:"20px"}},Vl.createElement("div",{style:{display:"flex",alignItems:"center"}},Vl.createElement("div",{className:Va.header_title},On!=null&&On.is_extra?"\u62D3\u5C55\u4E60\u9898":"\u5B66\u4E60\u4E92\u52A8"))),Vl.createElement("div",{style:{padding:"0px 20px",marginBottom:"20px"}},Vl.createElement("div",{style:{background:"#F6F7F9",padding:"14px 20px",margin:"10px auto"}},Vl.createElement("span",{style:{color:"#5F6A95",marginRight:"10px"}},"\u59D3\u540D"),Vl.createElement("span",{style:{color:"#333333"}},((Q=On==null?void 0:On.user_info)==null?void 0:Q.user_name)||"--"),Vl.createElement("span",{style:{color:"#5F6A95",marginRight:"10px",marginLeft:"60px"}},"\u5B66\u53F7"),Vl.createElement("span",{style:{color:"#333333"}},((Ue=On==null?void 0:On.user_info)==null?void 0:Ue.student_id)||"--"),Vl.createElement("span",{style:{color:"#5F6A95",marginRight:"10px",marginLeft:"60px"}},"\u5206\u73ED"),Vl.createElement("span",{style:{color:"#333333"}},((Mt=On==null?void 0:On.user_info)==null?void 0:Mt.group_name)||"--"))),Vl.createElement("div",{id:"scroll-container",style:{height:"calc(100vh - 250px)",overflowY:"auto",overflowX:"hidden",marginBottom:"20px",padding:"0px 20px 0 20px"}},Vl.createElement("div",{className:"mt10"},((ft=(yt=On==null?void 0:On.item_banks)==null?void 0:yt[al])==null?void 0:ft.item_type)==="SINGLE"&&Vl.createElement(Qd,{question:(Ve=On==null?void 0:On.item_banks)==null?void 0:Ve[al],questionIndex:al+1}),((Kt=($e=On==null?void 0:On.item_banks)==null?void 0:$e[al])==null?void 0:Kt.item_type)==="MULTIPLE"&&Vl.createElement(Ld,{question:(It=On==null?void 0:On.item_banks)==null?void 0:It[al],questionIndex:al+1}),((at=(kt=On==null?void 0:On.item_banks)==null?void 0:kt[al])==null?void 0:at.item_type)==="JUDGMENT"&&Vl.createElement(Gd,{question:(Pt=On==null?void 0:On.item_banks)==null?void 0:Pt[al],questionIndex:al+1}),((Et=(dt=On==null?void 0:On.item_banks)==null?void 0:dt[al])==null?void 0:Et.item_type)==="PROGRAM"&&Vl.createElement(Vl.Fragment,null,Vl.createElement(e0,{question:(mt=On==null?void 0:On.item_banks)==null?void 0:mt[al],questionIndex:al+1}),Vl.createElement(hl,{item:(nn=On==null?void 0:On.item_banks)==null?void 0:nn[al]}))),((oe=On==null?void 0:On.page)==null?void 0:oe.knowledge_test)&&Vl.createElement(Vl.Fragment,null,Vl.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:14,marginTop:"20px"}},Vl.createElement("div",{style:{color:"#333333",fontWeight:500}},"\u5B66\u4E60\u8BC4\u4EF7"),Vl.createElement(ut.ZP,{type:"link",loading:$l,style:{color:"#3061D0",marginLeft:"auto",cursor:"pointer"},onClick:()=>Xi(void 0,null,function*(){Pn(!0)})},"\u67E5\u770B\u95EE\u7B54\u8BB0\u5F55")),Vl.createElement("div",{style:{background:"#F6F7F9",marginTop:"10px"}},Vl.createElement(F.Z,{className:Va.ansWrap,value:(wn==null?void 0:wn.comment)||"\u6682\u65E0\u8BC4\u4EF7"})))),Vl.createElement("div",{className:Va.page_footer},(On==null?void 0:On.count)>1&&((Qt=Array.from({length:On==null?void 0:On.count},(xu,Ju)=>Ju+1))==null?void 0:Qt.map((xu,Ju)=>Vl.createElement("div",{key:Ju,className:Ju==al?Va.num_style_active:Va.num_style,onClick:()=>{Nt(xu-1)}},xu))))),Vl.createElement(Pe.default,{centered:!0,title:"\u5B66\u4E60\u8BC4\u4EF7",keyboard:!1,maskClosable:!1,okText:"\u77E5\u9053\u4E86",open:Dl,width:800,forceRender:!0,cancelButtonProps:{style:{display:"none"}},onOk:()=>{Pn(!1)},onCancel:()=>{Pn(!1)}},Vl.createElement(ye.Z,{spinning:$l},Vl.createElement("div",{className:Va.evalueWrap},Vl.createElement("div",{className:Va.evalueSty},Vl.createElement("div",{className:Va.title},"\u5B66\u4E60\u8BC4\u4EF7"),Vl.createElement(F.Z,{className:Va.ansWrap,value:(wn==null?void 0:wn.comment)||"\u6682\u65E0\u8BC4\u4EF7"})),Vl.createElement("div",{className:Va.evalueSty,style:{marginTop:"20px"}},Vl.createElement("div",{className:Va.title},"\u95EE\u7B54\u8BB0\u5F55"),Vl.createElement("div",{className:Va.ansWrap,style:{padding:"0px 12px 12px 12px"}},(sn=wn==null?void 0:wn.question_and_answer_list)==null?void 0:sn.map((xu,Ju)=>Vl.createElement("div",{key:Ju,className:"mt10"},Vl.createElement("div",{style:{display:"flex"}},Vl.createElement("div",{className:Va.label},"\u667A\u80FD\u52A9\u624B\uFF1A"),Vl.createElement(F.Z,{className:Va.asnCont,value:xu==null?void 0:xu.question})),Vl.createElement("div",{style:{display:"flex"}},Vl.createElement("div",{className:Va.label},"\u56DE\u7B54\uFF1A"),Vl.createElement(F.Z,{className:Va.asnCont,value:xu==null?void 0:xu.answer})))))))))))};var n0=(0,D.connect)(({user:r,classroomList:u,loading:l,globalSetting:b,problemset:O})=>({user:r,classroomList:u,globalSetting:b,loading:l.effects,problemset:O}))(t0),l0=n(35921),u0=n(79829),a0=n(30857),Na={qiandao:"qiandao___foQ6t",qiandao_title:"qiandao_title___OOono",qiandao_text:"qiandao_text___okCw5",start_dianming:"start_dianming___qybXD",start_dianming_title:"start_dianming_title___XA9ne",start_dianming_text:"start_dianming_text___CU9en",end_dianming:"end_dianming___C2H9e",end_dianming_name:"end_dianming_name___oYlne",end_dianming_number:"end_dianming_number___iq5C_",end_dianming_text:"end_dianming_text___ApSkk",continue_dianming:"continue_dianming___Yh1KA",continue_user:"continue_user___XOIei",continue_user_name:"continue_user_name___FDI4n",continue_user_number:"continue_user_number___fX7k5",continue_user_text:"continue_user_text___qWeW4",user_list:"user_list___zJeNk",user_list_title:"user_list_title___ihh_B",list:"list___QRd_Q",list_item:"list_item___tBr64",list_item_name:"list_item_name___AgrNX",list_item_number:"list_item_number___VFONZ"},oa=n(59301),qi=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const r0=({classroomList:r,loading:u,dispatch:l,user:b,openEwm:O})=>{var ct,nt,fe,Q,Ue,Mt;const[yt,ft]=(0,e.useState)(""),Ve=(0,D.useParams)(),[$e,Kt]=(0,e.useState)({}),[It,kt]=(0,e.useState)([]),[at,Pt]=(0,e.useState)({}),[dt,Et]=(0,e.useState)(0);(0,e.useEffect)(()=>{b.actionTabs.key=="\u5907\u8BFE\u968F\u673A\u70B9\u540D"&&mt()},[b.actionTabs.key]);const mt=()=>qi(void 0,null,function*(){var Qt;let sn=yield(0,Se.ZP)(`/api/courses/${Ve==null?void 0:Ve.coursesId}/smart_plans/${Ve==null?void 0:Ve.id}/get_attendance_students.json`,{method:"get",params:{page:1,limit:1e3}});(sn==null?void 0:sn.status)==0&&(Kt(sn==null?void 0:sn.data),((Qt=sn==null?void 0:sn.data)==null?void 0:Qt.count)==0?ft("\u5728\u7EBF\u7B7E\u5230"):ft("\u5F00\u59CB\u70B9\u540D"))}),nn=()=>qi(void 0,null,function*(){let Qt=yield(0,Se.ZP)(`/api/courses/${Ve==null?void 0:Ve.coursesId}/smart_plans/${Ve==null?void 0:Ve.id}/roll_call.json`,{method:"post"});(Qt==null?void 0:Qt.status)==0&&(Pt(Qt==null?void 0:Qt.data),oe())}),oe=()=>qi(void 0,null,function*(){var Qt;let sn=yield(0,Se.ZP)(`/api/courses/${Ve==null?void 0:Ve.coursesId}/smart_plans/${Ve==null?void 0:Ve.id}/get_roll_call_records.json`,{method:"get",params:{page:1,limit:1e3}});(sn==null?void 0:sn.status)==0&&kt((Qt=sn==null?void 0:sn.data)==null?void 0:Qt.list)});return(0,e.useEffect)(()=>{let Qt=null;return yt=="\u6682\u505C"?(Qt=setInterval(()=>{Et(sn=>{var an;return(sn+1)%((an=$e==null?void 0:$e.list)==null?void 0:an.length)})},150),()=>clearInterval(Qt)):()=>clearInterval(Qt)},[yt]),oa.createElement(Pe.default,{centered:!0,title:"\u968F\u673A\u70B9\u540D",open:b.actionTabs.key==="\u5907\u8BFE\u968F\u673A\u70B9\u540D",width:600,destroyOnClose:!0,cancelText:"\u53D6\u6D88",okText:yt,onCancel:()=>{l({type:"user/setActionTabs",payload:{}})},onOk:()=>{yt=="\u5728\u7EBF\u7B7E\u5230"?(O(),l({type:"user/setActionTabs",payload:{}})):yt=="\u5F00\u59CB\u70B9\u540D"?ft("\u6682\u505C"):yt=="\u6682\u505C"?(nn(),ft("\u7EE7\u7EED\u70B9\u540D")):yt=="\u7EE7\u7EED\u70B9\u540D"&&ft("\u6682\u505C")}},yt==="\u5728\u7EBF\u7B7E\u5230"&&oa.createElement("div",{className:Na.qiandao},oa.createElement("div",{className:Na.qiandao_title},"\u5F53\u524D\u8BFE\u4EF6\u6CA1\u6709\u5B66\u751F\u7B7E\u5230\uFF0C\u65E0\u6CD5\u70B9\u540D\u3002"),oa.createElement("div",{className:Na.qiandao_text},"\u8BF7\u70B9\u51FB\u3010\u5728\u7EBF\u7B7E\u5230\u3011\uFF0C\u5B66\u751F\u626B\u7801\u5373\u53EF\u5B8C\u6210\u7B7E\u5230")),yt==="\u5F00\u59CB\u70B9\u540D"&&oa.createElement("div",{className:Na.start_dianming},oa.createElement("div",{className:Na.start_dianming_title},"\u5DF2\u7B7E\u5230\u4EBA\u6570\uFF1A",oa.createElement("span",{style:{color:"#FA6400"}},$e==null?void 0:$e.count," \u4EBA")),oa.createElement("div",{className:Na.start_dianming_text},"\u8BF7\u70B9\u51FB\u3010\u5F00\u59CB\u70B9\u540D\u3011\uFF0C\u5C06\u5F00\u59CB\u968F\u673A\u70B9\u540D")),yt==="\u6682\u505C"&&oa.createElement("div",{className:Na.end_dianming},oa.createElement("img",{src:J.Z.API_SERVER+"/images/"+((nt=(ct=$e==null?void 0:$e.list)==null?void 0:ct[dt])==null?void 0:nt.image_url),style:{width:"60px",height:"60px",borderRadius:"30px"}}),oa.createElement("div",{className:Na.end_dianming_name},(Q=(fe=$e==null?void 0:$e.list)==null?void 0:fe[dt])==null?void 0:Q.username),oa.createElement("div",{className:Na.end_dianming_number},(Mt=(Ue=$e==null?void 0:$e.list)==null?void 0:Ue[dt])==null?void 0:Mt.id),oa.createElement("div",{className:Na.end_dianming_text},"\u6B63\u5728\u968F\u673A\u7B5B\u9009...")),yt==="\u7EE7\u7EED\u70B9\u540D"&&oa.createElement("div",{className:Na.continue_dianming},oa.createElement("div",{className:Na.continue_user},oa.createElement("img",{src:J.Z.API_SERVER+"/images/"+(at==null?void 0:at.image_url),style:{width:"62px",height:"62px",borderRadius:"32px",border:"2px solid #FA6400"}}),oa.createElement("div",{className:Na.continue_user_name},at==null?void 0:at.username),oa.createElement("div",{className:Na.continue_user_number},at==null?void 0:at.student_id),oa.createElement("div",{className:Na.continue_user_text},"\u8BF7 ",at==null?void 0:at.username," \u540C\u5B66\u4F5C\u7B54\uFF01")),oa.createElement("div",{className:Na.user_list},oa.createElement("div",{className:Na.user_list_title},"\u70B9\u540D\u8BB0\u5F55"),oa.createElement("div",{className:Na.list},It==null?void 0:It.map((Qt,sn)=>oa.createElement("div",{className:Na.list_item,key:sn},oa.createElement("img",{src:J.Z.API_SERVER+"/images/"+(Qt==null?void 0:Qt.image_url),style:{width:"40px",height:"40px",borderRadius:"20px"}}),oa.createElement("div",{className:Na.list_item_name},Qt==null?void 0:Qt.username),oa.createElement("div",{className:Na.list_item_number},Qt==null?void 0:Qt.student_id)))))))};var o0=(0,D.connect)(({classroomList:r,loading:u,user:l})=>({classroomList:r,loading:u,user:l}))(r0),Mo={summaryWrap:"summaryWrap___OG35q",summaryItem:"summaryItem___hoOKu",label:"label___MqI4a",percentSty:"percentSty___gHG8D",title:"title___mNpYU",chart_container:"chart_container___i1Iuj",Onerow:"Onerow___OiT1e",detailSty:"detailSty___a5EG5",detailItem:"detailItem___yYmqy",questionTag:"questionTag___bwScr",numSty:"numSty___wOs1Q",detailBtn:"detailBtn___LPYU4",questionTitle:"questionTitle___tXMUJ",proSty:"proSty___OnC9j",commentBody:"commentBody___MMxP6",box_title:"box_title___nS6XP",modal:"modal___WqWsA",erweima:"erweima___WMbXK",drawer_ewm:"drawer_ewm___gWIAW",drawer_ewm_title:"drawer_ewm_title___xS0o0",drawer_text:"drawer_text___hEhSn",drawer_code:"drawer_code___bnaj8"},Wu=n(59301),i0=Object.defineProperty,s0=Object.defineProperties,c0=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,d0=Object.prototype.hasOwnProperty,m0=Object.prototype.propertyIsEnumerable,$s=(r,u,l)=>u in r?i0(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Oi=(r,u)=>{for(var l in u||(u={}))d0.call(u,l)&&$s(r,l,u[l]);if(qs)for(var l of qs(u))m0.call(u,l)&&$s(r,l,u[l]);return r},v0=(r,u)=>s0(r,c0(u)),Ri=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const f0=({classroomList:r,loading:u,dispatch:l,setCheckInfo:b,checkInfo:O,openRollCall:ct,pptInfo:nt,SmartPlanItemBanks:fe,globalSetting:Q,getQuestionData:Ue})=>{var Mt,yt,ft,Ve;const $e=(0,D.useParams)(),[Kt,It]=(0,e.useState)([]),[kt,at]=(0,e.useState)({page:1,limit:1e4,course_group_id:"all",status:"all",search:""}),[Pt,dt]=(0,e.useState)(!1),[Et,mt]=(0,e.useState)({}),[nn,oe]=(0,e.useState)(null);(0,e.useEffect)(()=>{O?Qt():clearInterval(nn)},[O]);const Qt=()=>Ri(void 0,null,function*(){const Jt=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/header_info.json`,{method:"get"});(Jt==null?void 0:Jt.status)===0&&mt(Jt==null?void 0:Jt.data)});(0,e.useEffect)(()=>{clearInterval(nn),O&&(Rn(),oe(setInterval(()=>{Rn()},3e3)))},[kt,O]);const[sn,an]=(0,e.useState)(""),[al,Nt]=(0,e.useState)(10);(0,e.useEffect)(()=>{if(!(fe!=null&&fe.open_rolling_qrcode_sign))return;const Jt=setInterval(()=>{Nt(wn=>wn==1?10:wn-1)},1e3);return()=>clearInterval(Jt)},[fe]),(0,e.useEffect)(()=>{al==1&&$t()},[al]);const $t=()=>Ri(void 0,null,function*(){var Jt;let wn=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/refresh_qrcode_token.json`,{method:"post"});(wn==null?void 0:wn.status)==0&&an((Jt=wn==null?void 0:wn.data)==null?void 0:Jt.qrcode_token)}),Rn=()=>Ri(void 0,null,function*(){var Jt;dt(!0);const wn=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/smart_plan_users.json`,{method:"get",params:v0(Oi({},kt),{status:(kt==null?void 0:kt.status)=="all"?"":kt==null?void 0:kt.status,course_group_id:(kt==null?void 0:kt.course_group_id)=="all"?"":kt==null?void 0:kt.course_group_id})});(wn==null?void 0:wn.status)===0&&It((Jt=wn==null?void 0:wn.data)==null?void 0:Jt.smart_plan_users),dt(!1)});return Wu.createElement(k.Z,{bodyStyle:{padding:25},headerStyle:{display:"none"},width:700,onClose:()=>{b(!1)},destroyOnClose:!0,forceRender:!0,open:O},Wu.createElement("div",{className:Mo.drawer_ewm},Wu.createElement("div",{className:Mo.drawer_ewm_title,style:{marginBottom:"10px"}},fe==null?void 0:fe.smart_plan_name),fe!=null&&fe.open_rolling_qrcode_sign?Wu.createElement("div",{className:Mo.modal},"\u6253\u5F00",Wu.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},Wu.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C \u52A8\u6001\u4E8C\u7EF4\u7801\u5C06\u5728",Wu.createElement("span",{style:{color:"#3061D0",width:"30px",textAlign:"center"}},al,"s"),"\u540E\u5237\u65B0"):Wu.createElement("div",{className:Mo.modal},"\u6253\u5F00",Wu.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},Wu.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C\u5373\u53EF\u624B\u673A\u7AEF\u7545\u5B66\u8BFE\u4EF6\uFF0C\u968F\u65F6\u5F00\u542F\u9AD8\u6548\u5B66\u4E60\uFF01"),Wu.createElement("div",{className:Mo.erweima},Wu.createElement(G.Z,{key:sn,errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${$e==null?void 0:$e.coursesId}&id=${$e==null?void 0:$e.id}&codeKey=${sn}`,bgColor:"#FFF",size:260,icon:`${J.Z.IMG_SERVER}/${(Mt=Q==null?void 0:Q.setting)==null?void 0:Mt.tab_logo_url}`})),(nt==null?void 0:nt.status)=="in_progress"&&((yt=fe==null?void 0:fe.page)==null?void 0:yt.lesson_mode)=="online_lesson"&&Wu.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"20px"}},Wu.createElement(We.Z,{checked:fe==null?void 0:fe.open_rolling_qrcode_sign,onChange:Jt=>Ri(void 0,null,function*(){let wn=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/change_rolling_qrcode_sign.json`,{method:"post",body:{open_rolling_qrcode_sign:Jt}});(wn==null?void 0:wn.status)==0&&(Jt?$t():(an(""),Nt(10)),S.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ue())}),size:"small"}),Wu.createElement("div",{style:{margin:"0 10px",color:"#333333"}},"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230"),Wu.createElement(H.Z,{title:"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\u540E\uFF0C\u5B66\u751F\u4EC5\u80FD\u626B\u63CF\u4E8C\u7EF4\u7801\u5B8C\u6210\u7B7E\u5230\uFF0C\u5176\u4ED6\u65B9\u5F0F\u7B7E\u5230\u65E0\u6548\u5E76\u4E14\u65E0\u6CD5\u8FDB\u5165\u8BFE\u4EF6\u3002"},Wu.createElement("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#ccc",cursor:"pointer"}})))),Wu.createElement("div",{className:Mo.box_title},"\u7B7E\u5230\u8BE6\u60C5",Wu.createElement("i",{className:"iconfont icon-guanbi10 font12",style:{cursor:"pointer"},onClick:()=>{b(!1)}})),Wu.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"}},Wu.createElement("div",{className:"mr10"},"\u7B7E\u5230\u72B6\u6001"),Wu.createElement(Fe.default,{style:{width:"130px",borderRadius:"2px"},size:"large",value:kt.status,placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",options:[{label:"\u5168\u90E8",value:"all"},{label:"\u5DF2\u7B7E\u5230",value:"started"},{label:"\u672A\u7B7E\u5230",value:"not_started"}],onChange:Jt=>{kt.status=Jt,at(Oi({},kt))}}),Wu.createElement("div",{className:"ml20 mr10"},"\u5206\u73ED"),Wu.createElement(Fe.default,{style:{width:"130px",borderRadius:"2px"},size:"large",value:kt.course_group_id,placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",options:((ft=Et==null?void 0:Et.course_groups)==null?void 0:ft.length)>0?[{label:"\u5168\u90E8\u73ED\u7EA7",value:"all"},...(Ve=Et==null?void 0:Et.course_groups)==null?void 0:Ve.map(Jt=>({label:Jt==null?void 0:Jt.name,value:Jt==null?void 0:Jt.id}))]:[{label:"\u5168\u90E8\u73ED\u7EA7",value:"all"}],onChange:Jt=>{kt.course_group_id=Jt,at(Oi({},kt))}}),Wu.createElement(yl.t7,{style:{width:220,marginLeft:"auto"},placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u548C\u5B66\u53F7\u641C\u7D22",value:kt.search,onChange:Jt=>{kt.search=Jt,kt.page=1,at(Oi({},kt))}})),Wu.createElement(ye.Z,{spinning:Pt},Wu.createElement(ne.default,{dataSource:Kt,className:Mo.commentBody,scroll:{y:600},pagination:!1,columns:[{title:"\u5E8F\u53F7",align:"left",dataIndex:"name",width:60,ellipsis:!0,render:(Jt,wn,Ml)=>`${Ml+1}`},{title:"\u59D3\u540D",align:"left",dataIndex:"user_name",ellipsis:!0,width:180,render:Jt=>Wu.createElement("span",{style:{color:"#000"}},Jt||"--")},{title:"\u5B66\u53F7",align:"left",dataIndex:"student_id",ellipsis:!0,width:120,render:Jt=>Wu.createElement("span",{style:{color:"#000"}},Jt||"--")},{title:"\u73ED\u7EA7",align:"left",dataIndex:"group_name",ellipsis:!0,width:180,render:Jt=>Wu.createElement("span",{style:{color:"#000"}},Jt||"--")},{title:"\u7B7E\u5230\u72B6\u6001",align:"left",dataIndex:"status",ellipsis:!0,render:Jt=>Wu.createElement("span",null,Jt=="not_started"?"\u672A\u7B7E\u5230":"\u5DF2\u7B7E\u5230")}]})),(nt==null?void 0:nt.status)=="in_progress"&&(nt==null?void 0:nt.lesson_mode)=="online_lesson"&&Wu.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},Wu.createElement(ut.ZP,{type:"primary",style:{marginTop:"50px"},onClick:()=>{ct(),b(!1)}},"\u968F\u673A\u70B9\u540D")))};var g0=(0,D.connect)(({classroomList:r,loading:u,user:l,globalSetting:b})=>({classroomList:r,loading:u,user:l,globalSetting:b}))(f0),Du={toolbar:"toolbar___Uo7LQ","line-menu":"line-menu___mAWlG","chat-dialog":"chat-dialog___KJCds","chat-header":"chat-header___D2PUI","chat-content":"chat-content___C0vtj","chat-actions":"chat-actions___TYIxs",over_item_list:"over_item_list___rJ28g",over_item:"over_item___NX1fq",close_button:"close_button___hqqIO",over_button:"over_button___g0Acf",ewm_img:"ewm_img___CgU19",ewm_text:"ewm_text___qJOQD",kjgj_style:"kjgj_style___LpPYV",kjgj_item:"kjgj_item___znzOt",kjgj_img:"kjgj_img___g7zps",kjgj_text:"kjgj_text___Ua7tW",over_content:"over_content___aH5pL",overcont2wrap:"overcont2wrap___PAra8",over_content2:"over_content2___c8jx0",over_button2:"over_button2___dQ7lA",ewm_img2:"ewm_img2___Ba35z",ewm_text2:"ewm_text2___v3R_z",officeWrp:"officeWrp___B0eRV",left:"left___wU_GS",btn_float:"btn_float___nXsLR",to_page_style:"to_page_style___bmH79",left_float:"left_float___N_wk1",float_icon:"float_icon___xmC9W",float_text:"float_text___m_LGU",float_more:"float_more___nbaug",right:"right___jQ8G4",footer_button:"footer_button___xLWDh",quxiao:"quxiao___nHatU",queren:"queren___BRoLo",close_drawer:"close_drawer___vZp3v",erweima:"erweima___YfDc7",arrow:"arrow___ElSwz",modal:"modal___CqCC8"},ki=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const E0=({src:r,onClick:u,topPercentage:l=.8,draggableExtraNode:b,showAvatarEditData:O,tokenInfo:ct,pptInfo:nt,isPptFullScreen:fe,handleEndClass:Q,toggleFullOrExitScreen:Ue,setStudentListVis:Mt,user:yt,openEwm:ft,setOpenEwm:Ve,setAlterVis:$e,dispatch:Kt})=>{const It=(0,e.useRef)(null),kt=(0,e.useRef)(!1),at=(0,e.useRef)(!1),Pt=(0,D.useParams)(),[dt,Et]=(0,e.useState)(!0),[mt,nn]=(0,e.useState)(!1),[oe,Qt]=(0,e.useState)(window.innerHeight-100),[sn,an]=(0,e.useState)((window.innerWidth-900)/2),[al,Nt]=(0,e.useState)(!1),$t=10;return(0,e.useEffect)(()=>{if(It.current){let Rn=function(Pn){var On;kt.current=!0,xl=Pn.pageY,Dl=Pn.pageX;const wl=(On=It.current)==null?void 0:On.getBoundingClientRect();Ml=Pn.pageY-((wl==null?void 0:wl.top)||0),$l=Pn.pageX-((wl==null?void 0:wl.left)||0),(0,Ge.kk)("none"),document.onselectstart=()=>!1},Jt=function(){kt.current&&!at.current&&u&&u(),kt.current=!1,at.current=!1,(0,Ge.kk)("auto"),document.onselectstart=null},wn=function(Pn){var On,wl;if(!kt.current)return;const Qu=Pn.pageY,Pa=Pn.pageX,xu=Qu-Ml,Ju=Pa-$l,Oa=window.innerHeight-(((On=It.current)==null?void 0:On.offsetHeight)||0)-50,er=window.innerWidth-(((wl=It.current)==null?void 0:wl.offsetWidth)||0)-20,ha=50,Ou=10;if(!at.current&&(Math.abs(xl-Pn.pageY)>$t||Math.abs(Dl-Pn.pageX)>$t)&&(at.current=!0),at.current){const la=Math.max(ha,Math.min(xu,Oa)),Ja=Math.max(Ou,Math.min(Ju,er));Qt(la),an(Ja)}},Ml=0,$l=0,xl=0,Dl=0;return It.current.addEventListener("mousedown",Rn),document.addEventListener("mousemove",wn),document.addEventListener("mouseup",Jt),()=>{var Pn,On;(On=(Pn=It.current)==null?void 0:Pn.removeEventListener)==null||On.call(Pn,"mousedown",Rn),document.removeEventListener("mousemove",wn),document.removeEventListener("mouseup",Jt)}}},[u]),(0,e.useEffect)(()=>{const Rn=()=>{fe?(Qt(window.innerHeight-100),an(window.innerWidth*.4)):(Qt(window.innerHeight-100),an((window.innerWidth-900)/2))};return window.addEventListener("resize",Rn),()=>{window.removeEventListener("resize",Rn)}},[l,fe]),(0,e.useEffect)(()=>{mt&&(dt?(an(sn-130),nn(!1)):(an(sn+130),nn(!1)))},[dt,mt]),e.createElement("div",{className:Du.draggableImage,style:{top:`${oe}px`,left:`${sn}px`,position:"fixed",display:al?"none":"block",cursor:kt.current?"grabbing":"grab",zIndex:100},ref:It},b&&e.createElement("div",{className:Du.extraNode,onMouseUp:Rn=>Rn.stopPropagation(),onMouseDownCapture:Rn=>Rn.stopPropagation()},b),(Pt==null?void 0:Pt.user_login)&&dt&&e.createElement("div",{className:Du.over_item_list},e.createElement("div",{className:Du.over_item},e.createElement("div",{className:Du.close_button,onClick:()=>{Et(!1),nn(!0)}},e.createElement("i",{className:"iconfont icon-shouqi5 mr5",style:{fontSize:8}}),"\u6536\u8D77"),e.createElement("div",{className:Du.over_button,onClick:()=>{Mt(!0)}},e.createElement("img",{src:n(78868),className:Du.ewm_img,style:{width:"16px",height:"15px"}}),e.createElement("div",{className:Du.ewm_text},"\u5B66\u751F\u5217\u8868")),e.createElement("div",{className:Du.over_button,onClick:()=>{D.history.push(`/classrooms/${Pt==null?void 0:Pt.coursesId}/smart_plan/${Pt==null?void 0:Pt.id}/detail`)}},e.createElement("img",{src:n(50066),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u9000\u51FA\u8BFE\u4EF6")))),!(Pt!=null&&Pt.user_login)&&(ct==null?void 0:ct.IsSuper)&&dt&&e.createElement("div",{className:Du.over_item_list},e.createElement("div",{className:Du.over_item},e.createElement("div",{className:Du.close_button,onClick:()=>{Et(!1),nn(!0)}},e.createElement("i",{className:"iconfont icon-shouqi5 mr5",style:{fontSize:8}}),"\u6536\u8D77"),e.createElement("div",{className:Du.over_button,onClick:()=>{Ue(!fe)}},!fe&&e.createElement("img",{src:n(15091),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),fe&&e.createElement("img",{src:n(24639),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},fe?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F\u64AD\u653E")),(nt==null?void 0:nt.status)=="not_started"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){Kt({type:"classroomList/setActionTabs",payload:{key:"start_smart_plan_shang",params:{coursesId:Pt==null?void 0:Pt.coursesId,smart_plans_id:Pt==null?void 0:Pt.id}}})})},e.createElement("img",{src:n(76502),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u5F00\u59CB\u4E0A\u8BFE")),(nt==null?void 0:nt.status)=="not_started"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){$e(!0)})},e.createElement("img",{src:n(93026),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u66F4\u6362\u8BFE\u4EF6")),(nt==null?void 0:nt.status)=="in_progress"&&(nt==null?void 0:nt.lesson_mode)=="online_lesson"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){Kt({type:"user/setActionTabs",payload:{key:"\u5907\u8BFE\u968F\u673A\u70B9\u540D"}})})},e.createElement("img",{src:n(59717),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u968F\u673A\u70B9\u540D")),(nt==null?void 0:nt.status)=="in_progress"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){yield Q()})},e.createElement("img",{src:n(3540),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u7ED3\u675F\u6388\u8BFE")),e.createElement("div",{className:Du.over_button,onClick:()=>{Ve(new Date)}},e.createElement("img",{src:n(56440),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u8BFE\u4EF6\u4E8C\u7EF4\u7801")))),!dt&&(ct==null?void 0:ct.IsSuper)&&e.createElement("div",{className:Du.kjgj_style},e.createElement("div",{className:Du.kjgj_item,onClick:()=>{Et(!0),nn(!0)}},e.createElement("div",{className:Du.kjgj_img},e.createElement("img",{src:n(22335),style:{width:"30px",height:"30px"}})),e.createElement("div",{className:Du.kjgj_text},"\u8BFE\u4EF6\u5DE5\u5177"))))};var p0=(0,D.connect)(({user:r})=>({user:r}))(E0),A0=Object.defineProperty,ec=Object.getOwnPropertySymbols,h0=Object.prototype.hasOwnProperty,y0=Object.prototype.propertyIsEnumerable,tc=(r,u,l)=>u in r?A0(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,yi=(r,u)=>{for(var l in u||(u={}))h0.call(u,l)&&tc(r,l,u[l]);if(ec)for(var l of ec(u))y0.call(u,l)&&tc(r,l,u[l]);return r},su=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const C0=({user:r,classroomList:u,globalSetting:l,loading:b,dispatch:O})=>{var ct,nt,fe,Q,Ue,Mt,yt,ft,Ve;const[$e,Kt]=di.ZP.useNotification(),It=(0,e.useRef)(),[kt]=(0,D.useSearchParams)(),[at,Pt]=(0,e.useState)({}),[dt,Et]=(0,e.useState)(""),[mt,nn]=(0,e.useState)(""),oe=(0,D.useParams)(),[Qt,sn]=(0,e.useState)({}),[an,al]=(0,e.useState)(),Nt=(0,e.useRef)(),[$t,Rn]=(0,e.useState)(!1),[Jt,wn]=(0,e.useState)([]),[Ml,$l]=(0,e.useState)(!0),[xl,Dl]=(0,e.useState)(!1),[Pn,On]=(0,e.useState)([]),[wl,Qu]=(0,e.useState)(!1),[Pa,xu]=(0,e.useState)([]),[Ju,Oa]=(0,e.useState)(!1),[er,ha]=(0,e.useState)(0),[Ou,la]=(0,e.useState)(!1),[Ja,nr]=(0,e.useState)([]),[Pr,Or]=(0,e.useState)(""),[Rr,gr]=(0,e.useState)(!1),[Qr,or]=(0,e.useState)(""),[kr,lr]=(0,e.useState)(0),Br=(0,e.useRef)(null),[Yr,Dr]=(0,e.useState)(!1),[Tr,eu]=(0,e.useState)(!1),[Ra,Sa]=(0,e.useState)(!1),[Er,pr]=(0,e.useState)(!1),[ka,Ar]=(0,e.useState)(!1),xr=(0,e.useRef)(!1),{SmartPlanItemBanks:mn}=u,Vr=(0,e.useRef)(at),Eo=(0,e.useRef)(),Wr=(0,e.useRef)([1]),Lr=kt.get("simulate")=="true",uo=kt.get("pptPage")?Number(kt.get("pptPage")):1,[No,ao]=(0,e.useState)(!1),[Hr,hr]=e.useState(["60%","40%"]),[Po,po]=(0,e.useState)(!1),Jl=(0,e.useRef)(!1),[Gr,ja]=(0,e.useState)(!1),Ko=(0,e.useRef)(null),Ao=(0,e.useRef)(window.innerWidth),[ro,Xa]=(0,e.useState)(!1),[Xu,Kr]=(0,e.useState)(!1),[ml,ho]=(0,e.useState)(yi({},{page:1,limit:20,course_group_id:"",status:"all",search:""})),[_r,qa]=(0,e.useState)(""),[oo,jr]=(0,e.useState)(10);(0,e.useEffect)(()=>{if(!Tr&&!Er||!(mn!=null&&mn.open_rolling_qrcode_sign))return;const et=setInterval(()=>{jr(on=>on==1?10:on-1)},1e3);return()=>clearInterval(et)},[Tr,Er,mn]),(0,e.useEffect)(()=>{oo==1&&Ya()},[oo]);const Ya=()=>su(void 0,null,function*(){var et;let on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_qrcode_token.json`,{method:"post"});(on==null?void 0:on.status)==0&&qa((et=on==null?void 0:on.data)==null?void 0:et.qrcode_token)});(0,e.useEffect)(()=>{const Hn=700/window.innerWidth*100,Wl=100-Hn;ka?at!=null&&at.IsSuper?hr(["100%","0%"]):hr([`${Wl.toFixed(2)}%`,`${Hn.toFixed(2)}%`]):hr([`${Wl.toFixed(2)}%`,`${Hn.toFixed(2)}%`]),xr.current=ka,ka||(la(!1),lr(""))},[ka]),(0,e.useEffect)(()=>{Yr&&mt>0&&(mn!=null&&mn.open_rolling_qrcode_sign&&(mn==null?void 0:mn.smart_plan_status)=="in_progress"?(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_qrcode_token.json`,{method:"post"}).then(et=>{var on;(et==null?void 0:et.status)==0&&(jr(10),qa((on=et==null?void 0:et.data)==null?void 0:on.qrcode_token),eu(!0))}):eu(!0))},[mt,Yr]),(0,e.useEffect)(()=>{Ra?setTimeout(()=>{mn!=null&&mn.open_rolling_qrcode_sign&&(mn==null?void 0:mn.smart_plan_status)=="in_progress"?(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_qrcode_token.json`,{method:"post"}).then(et=>{var on;(et==null?void 0:et.status)==0&&(jr(10),qa((on=et==null?void 0:et.data)==null?void 0:on.qrcode_token),pr(!0))}):pr(!0)},300):pr(!1)},[Ra]),window.addEventListener("resize",()=>{clearTimeout(Ko.current),Ko.current=setTimeout(()=>{const et=window.innerWidth;if(et==Ao.current)return;const Wl=700/window.innerWidth*100,Xl=100-Wl;ka?at!=null&&at.IsSuper?hr(["100%","0%"]):hr([`${Xl.toFixed(2)}%`,`${Wl.toFixed(2)}%`]):hr([`${Xl.toFixed(2)}%`,`${Wl.toFixed(2)}%`]),xr.current=ka,ka||la(!1),ir(),Ao.current=et},300)}),(0,e.useEffect)(()=>{const et=()=>su(void 0,null,function*(){if(!Jl.current){Jl.current=!0;try{yield ir()}catch(on){console.error("toResize \u51FD\u6570\u6267\u884C\u51FA\u9519:",on)}finally{Jl.current=!1}}});return window.addEventListener("resize",et),()=>{window.removeEventListener("resize",et)}},[]),(0,e.useEffect)(()=>(document.body.addEventListener((0,fr.gH)(),Ro),()=>{document.body.removeEventListener((0,fr.gH)(),Ro)}),[]),(0,e.useEffect)(()=>(window.addEventListener("visibilitychange",io),()=>{window.removeEventListener("visibilitychange",io)}),[dt]);const Oo=()=>su(void 0,null,function*(){var et,on;yield(et=It.current)==null?void 0:et.ready();const Hn=(on=It.current)==null?void 0:on.Application;Hn&&(yield Hn.ActivePresentation.SlideShowWindow.View.Exit())}),io=()=>su(void 0,null,function*(){document.visibilityState==="visible"&&(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:dt,randomData:new Date}}})});(0,e.useEffect)(()=>{_o(),!(at!=null&&at.IsSuper)&&!kt.get("pptPage")&&(Et(uo),O({type:"classroomList/getSmartPlanItemBanks",payload:{course_id:oe==null?void 0:oe.coursesId,id:oe==null?void 0:oe.id,position:uo}})),(0,Ge.s2)()&&D.history.replace(`/miniprogram/courseware/study?course_id=${oe==null?void 0:oe.coursesId}&id=${oe==null?void 0:oe.id}`)},[]);const _o=()=>su(void 0,null,function*(){yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/check_start.json`,{method:"post"})});(0,e.useEffect)(()=>{Vr.current=at,at!=null&&at.WebofficeURL&&setTimeout(()=>{jo()},300)},[at]),(0,e.useEffect)(()=>{var et;return(et=r==null?void 0:r.userInfo)!=null&&et.login&&co(),()=>{clearInterval(Nt.current)}},[(ct=r==null?void 0:r.userInfo)==null?void 0:ct.login]),(0,e.useEffect)(()=>{!(at!=null&&at.IsSuper)&&(an==null?void 0:an.is_end)===!1&&(at==null?void 0:at.Status)=="in_progress"&&Xo()},[an==null?void 0:an.is_end,at]),(0,e.useEffect)(()=>{if(an!=null&&an.is_end&&clearInterval(Nt.current),!(at!=null&&at.IsSuper)&&(an!=null&&an.is_end)){let et=JSON.parse(sessionStorage.getItem("endPPTIds"))||[];et&&(et!=null&&et.includes(oe==null?void 0:oe.id))||(S.ZP.info("\u672C\u6B21\u6388\u8BFE\u5DF2\u7ED3\u675F\uFF0C\u611F\u8C22\u60A8\u7684\u53C2\u4E0E\uFF01"),(et==null?void 0:et.length)===0?et=[oe==null?void 0:oe.id]:et.push(oe==null?void 0:oe.id),sessionStorage.setItem("endPPTIds",JSON.stringify(et)))}},[an==null?void 0:an.is_end,at]),(0,e.useEffect)(()=>{if(an!=null&&an.enable_extra&&!(an!=null&&an.is_end)){let et=JSON.parse(localStorage.getItem("extraPPTIds"))||[];et&&!(et!=null&&et.includes(oe==null?void 0:oe.id))&&Pe.default.confirm({centered:!0,okText:"\u77E5\u9053\u4E86",icon:null,maskClosable:!1,keyboard:!1,title:"\u63D0\u793A",closable:!1,cancelButtonProps:{style:{display:"none"}},content:"\u606D\u559C\u4F60\u5DF2\u5B8C\u6210\u6240\u6709\u57FA\u7840\u4E60\u9898\uFF01\u8001\u5E08\u8FD8\u51C6\u5907\u4E86\u62D3\u5C55\u4E60\u9898\uFF0C\u53EF\u4EE5\u5F00\u59CB\u6311\u6218\u4E86\u54E6\uFF01",onOk:()=>su(void 0,null,function*(){(et==null?void 0:et.length)===0?et=[oe==null?void 0:oe.id]:et.push(oe==null?void 0:oe.id),Za(an==null?void 0:an.extra_position),localStorage.setItem("extraPPTIds",JSON.stringify(et))})})}},[an==null?void 0:an.enable_extra]);const Ro=()=>{(0,fr.vp)()||Oo()};(0,e.useEffect)(()=>{var et,on;(et=r==null?void 0:r.userInfo)!=null&&et.login&&(on=It.current)!=null&&on.ready&&ir()},[(nt=r==null?void 0:r.userInfo)==null?void 0:nt.login,at]),(0,e.useEffect)(()=>{var et;an!=null&&an.page&&((et=mn==null?void 0:mn.page)==null?void 0:et.lesson_mode)=="online_lesson"&&!(at!=null&&at.IsSuper)&&!Lr&&Za(an==null?void 0:an.page)},[an==null?void 0:an.page]),(0,e.useEffect)(()=>{var et;((et=r==null?void 0:r.userInfo)==null?void 0:et.real_name)==="\u6E38\u5BA2"&&O({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!1}})},[(fe=r==null?void 0:r.userInfo)==null?void 0:fe.real_name]);const ko=()=>{var et,on,Hn,Wl,Xl;let _n=[];return(((on=(et=mn==null?void 0:mn.page)==null?void 0:et.smart_plan_page_knowledges)==null?void 0:on.length)>0||(Hn=mn==null?void 0:mn.page)!=null&&Hn.is_ai_question)&&_n.push({key:"2",title:"\u667A\u80FD\u4E92\u52A8"}),(Wl=mn==null?void 0:mn.page)!=null&&Wl.page_info&&_n.push({key:"1",title:"\u667A\u80FD\u89E3\u6790"}),(mn==null?void 0:mn.count)>0&&_n.push({key:"4",title:"\u8BD5\u9898"}),(Xl=mn==null?void 0:mn.page)!=null&&Xl.animation_code&&_n.push({key:"3",title:"\u667A\u80FD\u52A8\u6548"}),e.createElement(e.Fragment,null,_n==null?void 0:_n.map((tu,aa)=>e.createElement("span",{style:{cursor:"pointer"},onClick:()=>{Sa(!0),Or(tu==null?void 0:tu.key)}},tu==null?void 0:tu.title,aa!=(_n==null?void 0:_n.length)-1?"\u3001":"")))};(0,e.useEffect)(()=>{var et,on,Hn,Wl,Xl,_n,tu;dt&&(mn!=null&&mn.alert_addendance_tips)&&!(mn!=null&&mn.is_super)&&!kt.get("simulate")&&(Xu||(Kr(!0),Pe.default.confirm({centered:!0,okText:"\u77E5\u9053\u4E86",icon:null,title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\uFF0C\u8BF7\u8054\u7CFB\u6388\u8BFE\u6559\u5E08\u626B\u7801\u7B7E\u5230\u3002",onOk:()=>su(void 0,null,function*(){D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan`)})}))),dt&&((et=mn==null?void 0:mn.page)==null?void 0:et.position)!=kr&&ka&&(lr((on=mn==null?void 0:mn.page)==null?void 0:on.position),gr(!0),setTimeout(()=>{gr(!1)},6e3),at!=null&&at.IsSuper&&(((Wl=(Hn=mn==null?void 0:mn.page)==null?void 0:Hn.smart_plan_page_knowledges)==null?void 0:Wl.length)>0||(Xl=mn==null?void 0:mn.page)!=null&&Xl.is_ai_question||(_n=mn==null?void 0:mn.page)!=null&&_n.page_info||(mn==null?void 0:mn.count)>0||(tu=mn==null?void 0:mn.page)!=null&&tu.animation_code?$e.open({message:"",style:{width:"auto",marginBottom:"0px",padding:"12px 30px 20px",whiteSpace:"nowrap",border:"1px solid rgba(20,93,255,0.2)",boxShadow:"0px 0px 10px 0px #E3E1FF",borderRadius:"40px 0 0 40px"},closeIcon:null,description:e.createElement("div",{className:"font18"},"\u5F53\u524D\u9875\u9762\u5305\u542B\uFF1A",e.createElement("span",{style:{color:"#3061D0"}},ko())),duration:2,pauseOnHover:!0,onClose:()=>{la(!0)}}):la(!0)))},[mn]),(0,e.useEffect)(()=>{Jo()},[dt,an==null?void 0:an.randomData]);const Jo=()=>su(void 0,null,function*(){var et,on;if(!(at!=null&&at.IsSuper)&&(at==null?void 0:at.Status)=="in_progress"&&dt){const Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/check_page_progress.json`,{method:"post",body:{position:dt}});(Hn==null?void 0:Hn.status)==0&&((et=Hn==null?void 0:Hn.data)!=null&&et.allow||(On((on=Hn==null?void 0:Hn.data)==null?void 0:on.not_finish_positions),Dl(!0)))}});function ir(){return su(this,null,function*(){try{yield It.current.ready();const Hn=yield(yield It.current.Application.ActiveWindow).View;Hn.ZoomToFit=-1;const Wl=new Event("resize");window.dispatchEvent(Wl)}catch(et){}})}function Za(et){return su(this,null,function*(){yield It.current.ready(),It.current.Application.ActivePresentation.SlideShowWindow.View.GotoSlide(et)})}(0,e.useEffect)(()=>{Gr&&It.current&&(so(!0),ir())},[Gr,It.current]);function so(et){return su(this,null,function*(){if(!(oe!=null&&oe.user_login)){et?(Ar(!0),(0,fr.Dj)(document.body)):(Ar(!1),(0,fr.BU)()),yield It.current.ready();const on=It.current.Application,Hn=yield on.ActivePresentation,Wl=yield on.ActivePresentation.SlideShowSettings,Xl=yield Hn.SlideShowWindow;et?yield Wl.Run():(Xl.IsFullScreen=!1,Oo());const _n=(yield on.ActivePresentation.SlideShowWindow)!==null;Ar(_n),ir()}})}function To(){return su(this,null,function*(){try{const et=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:1}});al(yi({},(et==null?void 0:et.data)||{}))}catch(et){}})}const _e=()=>su(void 0,null,function*(){var et,on;let Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}.json`,{method:"get"});(Hn==null?void 0:Hn.status)==0&&(sn(Hn==null?void 0:Hn.data),oe!=null&&oe.user_login||(kt.get("type")=="view"&&(((et=Hn==null?void 0:Hn.data)==null?void 0:et.status)=="in_progress"?Dr(!0):ja(!0)),((on=Hn==null?void 0:Hn.data)==null?void 0:on.status)=="in_progress"&&kt.get("type")!="update"&&Dr(!0)))}),Xo=()=>su(void 0,null,function*(){const et=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/start_class.json`,{method:"post"})}),Lo=()=>su(void 0,null,function*(){var et;const on=yield(0,Se.ZP)(`/api/smart_plan_item_banks/${(et=mn==null?void 0:mn.page)==null?void 0:et.id}/smart_plan_user_page_studies.json`,{method:"post"})}),Ta=()=>su(void 0,null,function*(){O({type:"classroomList/getSmartPlanItemBanks",payload:{course_id:oe==null?void 0:oe.coursesId,id:oe==null?void 0:oe.id,position:dt||(an==null?void 0:an.page)||1,max_position:mt}})}),co=()=>su(void 0,null,function*(){var et,on,Hn;const Wl={};oe!=null&&oe.user_login&&(Wl.login=oe.user_login),Lr&&(Wl.is_simulate=!0);const Xl=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/get_office_token.json`,{method:"get",params:Wl});Pt(Xl==null?void 0:Xl.data),$l(!1);const _n=((et=Xl==null?void 0:Xl.data)==null?void 0:et.FileName)||"";document.title=_n,(on=Xl==null?void 0:Xl.data)!=null&&on.IsSuper?_e():Lr?ja(!0):(((Hn=Xl==null?void 0:Xl.data)==null?void 0:Hn.Status)=="in_progress"&&ja(!0),Nt.current=setInterval(()=>{To()},2e3))});function wr(){return su(this,null,function*(){if(!It.current)return;clearTimeout(Eo.current),yield It.current.ready();const et=It.current.Application,Hn=(Xl=>{if(!Xl||Xl.length===0)return[];const _n=[...Xl].sort((tn,Wn)=>tn-Wn),tu=[];let aa={From:_n[0],To:_n[0]};for(let tn=1;tn<_n.length;tn++)_n[tn]===_n[tn-1]+1?aa.To=_n[tn]:(tu.push(aa),aa={From:_n[tn],To:_n[tn]});return tu.push(aa),tu})(Wr.current),Wl=[];for(const Xl of Hn){const _n=yield et.ActivePresentation.ExportAsFixedFormat({FixedFormatType:et.Enum.PpFixedFormatType.ppFixedFormatTypeIMG,Combine2LongPic:!0,From:Xl.From,To:Xl.To});Wl.push(_n)}wn(Wl),Eo.current=setTimeout(()=>wr(),4*60*1e3)})}function Wa(et){return su(this,null,function*(){Wr.current=et,wr()})}function jo(){return su(this,null,function*(){var et=document.getElementById("weboffice-zone");It.current=C().config({mount:et,url:at==null?void 0:at.WebofficeURL,refreshToken:yo,previewLimit:4,pptOptions:{isShowBottomStatusBar:!0,isShowRemark:!1,isShowComment:!1},commonOptions:{isShowTopArea:!!(at!=null&&at.IsSuper),isBrowserViewFullscreen:!0,isIframeViewFullscreen:!1,acceptVisualViewportResizeEvent:!0}}),It.current.setToken({token:at==null?void 0:at.AccessToken,timeout:25*60*1e3}),It.current.on("fileStatus",function(on){return su(this,null,function*(){yield It.current.ready();const Wl=yield It.current.Application.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;Et(Wl),Wr.current=[Wl],wr()})}),It.current.on("fileOpen",function(on){qo();const Hn=et==null?void 0:et.querySelector("iframe");Hn&&Hn.focus()}),It.current.on("fullscreenChange",function(on){on.status==1?kt.get("type")!="update"&&ja(!0):(0,fr.BU)()})})}function yo(){return new Promise(function(et){return su(this,null,function*(){var on,Hn,Wl,Xl;const _n=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_office_token.json`,{method:"get",params:{access_token:(on=Vr.current)==null?void 0:on.AccessToken,refresh_token:(Hn=Vr.current)==null?void 0:Hn.RefreshToken}});((Wl=_n==null?void 0:_n.data)==null?void 0:Wl.Code)=="InvalidArgument.AccessToken"&&co(),Vr.current=_n.data,et({token:(Xl=_n==null?void 0:_n.data)==null?void 0:Xl.AccessToken,timeout:2*60*1e3}),et(_n==null?void 0:_n.data)})})}function Zo(){return su(this,null,function*(){$l(!0),yield It.current.ready();const et=It.current.Application,on=yield et.ActivePresentation,Wl=yield(yield on.Slides).Count;nn(Wl);let Xl=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/create_item_banks.json`,{method:"post",body:{create_ppt:!0,is_extra:!0}});(Xl==null?void 0:Xl.status)==0&&S.ZP.success("\u64CD\u4F5C\u6210\u529F"),yield et.ActivePresentation.Slides.AddSlide(Wl),setTimeout(()=>su(this,null,function*(){$l(!1),on.Slides.Item(Wl).Shapes.AddPicture({FileName:"https://www.educoder.net/images/tzppt.png",LinkToFile:-1,SaveWithDocument:0,Left:0,Top:0,Width:1,Height:1,Scale:!0})}),1e3)})}function qo(){return su(this,null,function*(){yield It.current.ready();const et=It.current.Application,on=yield et.ActivePresentation.GetSlideRemark(),Wl=yield(yield et.ActivePresentation).Slides,Xl=yield Wl.Count;nn(Xl),et.Sub.SlideShowEnd=()=>su(this,null,function*(){Ar(!1),ir(),ja(!1)}),et.Sub.SlideShowBegin=()=>su(this,null,function*(){Ar(!0),ir()});const _n=yield et.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;Et(_n),Wr.current=[_n],wr(),et.Sub.ActiveSlideChange=tu=>su(this,null,function*(){var aa;nn(yield Wl.Count),Et(((aa=tu==null?void 0:tu.Data)==null?void 0:aa.slideIndex)+1)}),et.Sub.SlideDelete=tu=>su(this,null,function*(){var aa;let tn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/delete_page.json`,{method:"delete",body:{position:(aa=tu==null?void 0:tu.Data)==null?void 0:aa.SlideIndex}});(tn==null?void 0:tn.status)==0&&(S.ZP.success("\u5220\u9664\u6210\u529F"),nn(yield Wl.Count))}),et.Sub.PresentationNewSlide=tu=>su(this,null,function*(){console.log("\u76D1\u542C\u65B0\u589E\u5E7B\u706F\u7247\u7684\u64CD\u4F5C\u4E8B\u4EF6",tu)}),et.Sub.SlideMove=tu=>su(this,null,function*(){var aa,tn,Wn;if(at!=null&&at.IsSuper&&document.hasFocus()){Et("");let Nl=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_page_postition.json`,{method:"post",body:{origin_position:(aa=tu==null?void 0:tu.Data)==null?void 0:aa.SlideFromIndex,target_position:(tn=tu==null?void 0:tu.Data)==null?void 0:tn.SlideIndex}});(Nl==null?void 0:Nl.status)==0&&(S.ZP.success("\u79FB\u52A8\u6210\u529F"),Et((Wn=tu==null?void 0:tu.Data)==null?void 0:Wn.SlideIndex))}}),yield et.ActivePresentation.SlideShowWindow.View.GotoSlide(uo)})}const Ci=()=>su(void 0,null,function*(){var et,on;Oa(!0);const Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/smart_plan_users.json`,{method:"get",params:ml});(Hn==null?void 0:Hn.status)==0&&(xu((et=Hn==null?void 0:Hn.data)==null?void 0:et.smart_plan_users),ha((on=Hn==null?void 0:Hn.data)==null?void 0:on.count)),Oa(!1)}),sr=()=>su(void 0,null,function*(){var et;Oa(!0);const on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/header_info.json`,{method:"get"});(on==null?void 0:on.status)===0&&nr([{name:"\u5168\u90E8",id:""},...((et=on==null?void 0:on.data)==null?void 0:et.course_groups)||[]]),Oa(!1)});(0,e.useEffect)(()=>{var et,on;return mn&&((et=mn==null?void 0:mn.page)!=null&&et.id)&&!((on=mn==null?void 0:mn.page)!=null&&on.has_study_record)&&(at==null?void 0:at.IsSuper)===!1&&(at==null?void 0:at.Status)=="in_progress"&&(Br.current=setTimeout(()=>{mn!=null&&mn.alert_addendance_tips||Lo()},1e4)),()=>{Br.current&&clearTimeout(Br.current)}},[b["classroomList/getSmartPlanItemBanks"],mn,at==null?void 0:at.IsSuper]),(0,e.useEffect)(()=>{wl&&(sr(),Ci())},[wl,ml]);const Co=()=>{const et=JSON.parse(localStorage.getItem("pptBrowsingHistory")||"[]");(et==null?void 0:et.findIndex(Hn=>(Hn==null?void 0:Hn.id)==(oe==null?void 0:oe.id)&&(Hn==null?void 0:Hn.courseId)==(oe==null?void 0:oe.coursesId)))==-1&&(et.push({id:oe==null?void 0:oe.id,courseId:oe==null?void 0:oe.coursesId}),localStorage.setItem("pptBrowsingHistory",JSON.stringify(et)),Za(1))},zo=()=>su(void 0,null,function*(){var et,on,Hn,Wl,Xl;const _n=()=>su(void 0,null,function*(){O({type:"classroomList/setActionTabs",payload:{key:"start_smart_plan_xia",params:{coursesId:oe==null?void 0:oe.coursesId,smart_plans_id:oe==null?void 0:oe.id}}})}),tu=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}.json`,{method:"get"});(on=(et=tu==null?void 0:tu.data)==null?void 0:et.not_start_positions)!=null&&on.length?Pe.default.confirm({centered:!0,okText:"\u786E\u8BA4\u7ED3\u675F\u6388\u8BFE",cancelText:"\u8FD4\u56DE\u7EE7\u7EED\u6388\u8BFE",icon:null,title:"\u63D0\u793A",content:e.createElement("span",null,"\u7CFB\u7EDF\u68C0\u6D4B\u5230 ",e.createElement("span",{style:{color:"#3061D0"}},"\u7B2C",(Xl=(Wl=(Hn=tu==null?void 0:tu.data)==null?void 0:Hn.not_start_positions)==null?void 0:Wl.sort((aa,tn)=>Number(aa)-Number(tn)))==null?void 0:Xl.join("\u3001"),"\u9875")," \u6709\u672A\u542F\u52A8\u7684\u7B54\u9898\uFF0C\u7ED3\u675F\u6388\u8BFE\u540E\uFF0C\u8FD9\u4E9B\u8BD5\u9898\u5C06\u65E0\u6CD5\u542F\u52A8\u7B54\u9898\u3002\u786E\u8BA4\u7ED3\u675F\u6388\u8BFE\uFF1F"),onCancel:()=>su(void 0,null,function*(){var aa,tn,Wn;Za((Wn=(tn=(aa=tu==null?void 0:tu.data)==null?void 0:aa.not_start_positions)==null?void 0:tn.sort((Nl,Ru)=>Number(Nl)-Number(Ru)))==null?void 0:Wn[0])}),onOk:()=>su(void 0,null,function*(){yield _n()})}):yield _n()}),Sr=()=>e.createElement(e.Fragment,null,oe!=null&&oe.user_login?e.createElement("div",{className:Nu.right},e.createElement(n0,{pageNum:dt,maxPage:mt})):e.createElement("div",{className:Nu.right},e.createElement(ye.Z,{spinning:b["classroomList/getSmartPlanItemBanks"]},e.createElement("div",{style:{visibility:mn?"visible":"hidden",height:"100vh",overflow:"hidden"}},(at==null?void 0:at.IsSuper)!==void 0&&e.createElement("div",{style:mt?{}:{display:"none"}},at!=null&&at.IsSuper?e.createElement(ci,{clickTab:Pr,pptFullScreen:ka,pageNum:dt,maxPage:mt,pptInfo:Qt,openEwm:$t,changePage:Wa,setOpenEwm:()=>{Rn(null)},aiImg:Jt,addPage:()=>{Zo()},gotoSlide:et=>{Za(et)},openCheckInfo:()=>{Xa(!0)}}):e.createElement(Pd,{isSimulate:Lr,officeToken:at,pageCache:an,pageNum:dt,aiImg:Jt,maxPage:mt,changePage:Wa,gotoSlide:et=>{Za(et)}}))))));(0,e.useEffect)(()=>{an!=null&&an.page&&Za(an==null?void 0:an.page)},[mn==null?void 0:mn.enable_progress_control]);const Jr=()=>{var et,on,Hn,Wl,Xl;return e.createElement("div",{className:Nu.left},e.createElement("div",{className:at!=null&&at.IsSuper?"":Nu.left_zone,id:"weboffice-zone"}),!Ra&&ka&&(at==null?void 0:at.IsSuper)&&Ou&&e.createElement("div",{className:Nu.left_float},e.createElement("div",{className:Nu.float_icon},e.createElement("img",{src:n(23175),width:20,height:20})),e.createElement("div",{className:Nu.float_more},e.createElement("div",{className:Nu.float_text,onClick:()=>{Sa(!0)}},"\u67E5\u770B\u5B66\u4E60\u4E92\u52A8"),(Qt==null?void 0:Qt.status)=="in_progress"&&((et=mn==null?void 0:mn.page)==null?void 0:et.lesson_mode)!="self_learning"&&!(mn!=null&&mn.is_extra)&&(((on=mn==null?void 0:mn.page)==null?void 0:on.status)=="not_started"||((Hn=mn==null?void 0:mn.page)==null?void 0:Hn.status)=="ended")&&(at==null?void 0:at.IsSuper)&&(mn==null?void 0:mn.count)>0&&e.createElement(e.Fragment,null,e.createElement("div",{className:Nu.float_icon},e.createElement("img",{src:n(68045),width:20,height:20})),e.createElement("div",{className:Nu.float_text,onClick:()=>su(void 0,null,function*(){O({type:"classroomList/setActionTabs",payload:{key:"question_time",params:{title:"\u8BBE\u7F6E\u7B54\u9898\u65F6\u957F",smart_plans_id:oe==null?void 0:oe.id,SmartPlanItemBanks:mn}}})})},((Wl=mn==null?void 0:mn.page)==null?void 0:Wl.status)=="ended"?"\u91CD\u542F\u7B54\u9898":"\u542F\u52A8\u7B54\u9898")),(Qt==null?void 0:Qt.status)=="in_progress"&&!(mn!=null&&mn.is_extra)&&((Xl=mn==null?void 0:mn.page)==null?void 0:Xl.status)=="in_progress"&&(at==null?void 0:at.IsSuper)&&(mn==null?void 0:mn.count)>0&&e.createElement(e.Fragment,null,e.createElement("div",{className:Nu.float_icon,style:{background:"rgba(227,0,0,0.1)"}},e.createElement("img",{src:n(7891),width:20,height:20})),e.createElement("div",{className:Nu.float_text,onClick:()=>su(void 0,null,function*(){var _n;let tu=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(_n=mn==null?void 0:mn.page)==null?void 0:_n.id,status:"ended"}});(tu==null?void 0:tu.status)==0&&(S.ZP.success("\u5DF2\u7ED3\u675F\u7B54\u9898"),Ta())})},"\u7ED3\u675F\u7B54\u9898")))),kt.get("simulate")=="true"&&e.createElement("div",{className:Nu.btn_float,style:{bottom:0,right:120}},e.createElement(yl.op,{className:"mb20",onClick:()=>{so(!1),kt.get("type")?D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan/${oe==null?void 0:oe.id}/ppt_info/info?type=${kt.get("type")}`):D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan/${oe==null?void 0:oe.id}/ppt_info/info`),window.location.reload()}},"\u8FD4\u56DE\u6559\u5E08\u8EAB\u4EFD")),!Ra&&ka&&((at==null?void 0:at.IsSuper)||kt.get("simulate")=="true")&&e.createElement("div",{className:Nu.btn_float,style:{right:at!=null&&at.IsSuper?"0px":"20px"}},e.createElement("div",null,e.createElement(yl.op,{disabled:dt==1,className:"mb20",onClick:()=>{if(dt==1){S.ZP.info("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u9875\u4E86\uFF01");return}or(""),Za(dt-1)}},"\u4E0A\u4E00\u9875")),e.createElement("div",null,e.createElement(yl.op,{disabled:dt==mt,onClick:()=>{if(dt==mt){S.ZP.info("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u9875\u4E86\uFF01");return}or(""),Za(dt+1)}},"\u4E0B\u4E00\u9875")),(at==null?void 0:at.IsSuper)&&e.createElement("div",{className:Nu.to_page_style},"\u8DF3\u8F6C\u5230",e.createElement(Fe.default,{style:{width:"65px",marginLeft:"10px"},size:"small",value:Qr||void 0,placeholder:"\u9875\u7801",onChange:_n=>{Za(_n),or(_n)}},Array.from({length:mt},(_n,tu)=>tu+1).map(_n=>e.createElement(Fe.default.Option,{key:_n,value:_n},_n))))),e.createElement(p0,{tokenInfo:at,isPptFullScreen:ka,pptInfo:Qt,handleEndClass:zo,openEwm:$t,setOpenEwm:Rn,toggleFullOrExitScreen:so,setAlterVis:ao,setStudentListVis:Qu}),!(oe!=null&&oe.user_login)&&!(at!=null&&at.IsSuper)&&!Lr&&e.createElement("div",{className:Nu.overcont2wrap},((mn==null?void 0:mn.enable_progress_control)||(at==null?void 0:at.Status)!="in_progress")&&e.createElement(yl.op,{disabled:dt==1,className:"mr30",onClick:()=>{if(dt==1){S.ZP.info("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u9875\u4E86\uFF01");return}Za(dt-1)}},"\u4E0A\u4E00\u9875"),e.createElement("div",{className:Nu.over_content2},e.createElement("div",{className:Nu.over_button2,onClick:()=>{D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan`)}},e.createElement("img",{src:n(50066),className:Nu.ewm_img2,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Nu.ewm_text2},"\u9000\u51FA\u8BFE\u4EF6"))),((mn==null?void 0:mn.enable_progress_control)||(at==null?void 0:at.Status)!="in_progress")&&e.createElement(yl.op,{disabled:dt==mt,className:"ml30",onClick:()=>{var _n;if(dt==mt){S.ZP.info("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u9875\u4E86\uFF01");return}dt==(an==null?void 0:an.class_max_position)&&!(at!=null&&at.IsSuper)&&(at==null?void 0:at.Status)=="in_progress"&&((_n=mn==null?void 0:mn.page)==null?void 0:_n.lesson_mode)=="online_lesson"?(S.ZP.warning("\u8BE5\u9875\u672A\u8BB2\u89E3\uFF0C\u5C06\u8DF3\u8F6C\u81F3\u6559\u5E08\u5F53\u524D\u9875\u9762"),Za(an==null?void 0:an.page)):Za(dt+1)}},"\u4E0B\u4E00\u9875")))};return e.createElement(ye.Z,{spinning:Ml},e.createElement("div",{style:{display:"flex"}},Kt,Rr&&e.createElement("div",{className:Nu.page_style},"\u7B2C",dt,"\u9875"),e.createElement(hi,{className:`${Nu.officeWrp} ${Po?Nu.arrow:""}`,lazy:!0,onResizeEnd:()=>{},onResize:et=>{const on=et[0]+et[1],Hn=[et[0]/on*100,et[1]/on*100];Hn[0]<20&&(Hn[0]=20,Hn[1]=80),Hn[1]==0?po(!0):po(!1),hr(Hn),ir()}},ka?e.createElement(e.Fragment,null,e.createElement(hi.Panel,{size:Hr[0]}," ",Jr()),e.createElement(hi.Panel,{size:Hr[1],collapsible:!(at!=null&&at.IsSuper),style:{overflow:"hidden"}},at!=null&&at.IsSuper?e.createElement(k.Z,{bodyStyle:{padding:0},headerStyle:{display:"none"},width:700,onClose:()=>{Sa(!1)},destroyOnClose:!0,forceRender:!0,open:Ra},Sr(),Er&&e.createElement("div",{className:Nu.drawer_ewm},e.createElement("div",{className:Nu.drawer_ewm_title,style:{marginBottom:"10px"}},mn==null?void 0:mn.smart_plan_name,e.createElement("i",{className:"iconfont icon-guanbi",style:{cursor:"pointer",color:"#000"},onClick:()=>{pr(!1)}})),mn!=null&&mn.open_rolling_qrcode_sign?e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C \u52A8\u6001\u4E8C\u7EF4\u7801\u5C06\u5728",e.createElement("span",{style:{color:"#3061D0",width:"30px",textAlign:"center"}},oo,"s"),"\u540E\u5237\u65B0"):e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C\u5373\u53EF\u624B\u673A\u7AEF\u7545\u5B66\u8BFE\u4EF6\uFF0C\u968F\u65F6\u5F00\u542F\u9AD8\u6548\u5B66\u4E60\uFF01"),e.createElement("div",{className:Nu.erweima},e.createElement(G.Z,{key:_r,errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${oe==null?void 0:oe.coursesId}&id=${oe==null?void 0:oe.id}&codeKey=${_r}`,bgColor:"#FFF",size:260,icon:`${J.Z.IMG_SERVER}/${(Q=l==null?void 0:l.setting)==null?void 0:Q.tab_logo_url}`})),(Qt==null?void 0:Qt.status)=="in_progress"&&((Ue=mn==null?void 0:mn.page)==null?void 0:Ue.lesson_mode)=="online_lesson"&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(We.Z,{checked:mn==null?void 0:mn.open_rolling_qrcode_sign,onChange:et=>su(void 0,null,function*(){let on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_rolling_qrcode_sign.json`,{method:"post",body:{open_rolling_qrcode_sign:et}});(on==null?void 0:on.status)==0&&(et?Ya():(qa(""),jr(10)),S.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ta())}),size:"small"}),e.createElement("div",{style:{margin:"0 10px",color:"#333333"}},"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230"),e.createElement(H.Z,{title:"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\u540E\uFF0C\u5B66\u751F\u4EC5\u80FD\u626B\u63CF\u4E8C\u7EF4\u7801\u5B8C\u6210\u7B7E\u5230\uFF0C\u5176\u4ED6\u65B9\u5F0F\u7B7E\u5230\u65E0\u6548\u5E76\u4E14\u65E0\u6CD5\u8FDB\u5165\u8BFE\u4EF6\u3002"},e.createElement("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#ccc",cursor:"pointer"}})))),e.createElement("div",{className:Nu.close_drawer,onClick:et=>{et.stopPropagation(),Sa(!1)}},e.createElement("i",{className:"iconfont icon-shouqi10 font14"}))):Sr())):e.createElement(e.Fragment,null,e.createElement(hi.Panel,{size:Hr[0],min:"20%",collapsible:!0}," ",Jr()),e.createElement(hi.Panel,{size:Hr[1],collapsible:!0,style:{overflow:"hidden"}},(!ka||!(at!=null&&at.IsSuper))&&Sr()))),e.createElement(l0.Z,{Callback:()=>{_e(),Ta(),(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:dt,allow_answer:!1,is_end:!1}}})}}),e.createElement(u0.Z,{v:Qt,params:oe,user:r,visible:No,afterOk:()=>{ao(!1),window.location.reload()},afterCancel:()=>{ao(!1)}}),e.createElement(o0,{openEwm:()=>{Rn(new Date)}}),e.createElement(g0,{setCheckInfo:Xa,checkInfo:ro,pptInfo:Qt,SmartPlanItemBanks:mn,getQuestionData:Ta,openRollCall:()=>{O({type:"user/setActionTabs",payload:{key:"\u5907\u8BFE\u968F\u673A\u70B9\u540D"}})}}),e.createElement(Pe.default,{centered:!0,maskClosable:!1,keyboard:!1,open:Tr,title:"\u8BFE\u4EF6\u4E8C\u7EF4\u7801",width:530,forceRender:!0,footer:null,closeIcon:null},mn!=null&&mn.open_rolling_qrcode_sign?e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C \u52A8\u6001\u4E8C\u7EF4\u7801\u5C06\u5728",e.createElement("span",{style:{color:"#3061D0",width:"30px",textAlign:"center"}},oo,"s"),"\u540E\u5237\u65B0"):e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C\u5373\u53EF\u624B\u673A\u7AEF\u7545\u5B66\u8BFE\u4EF6\uFF0C\u968F\u65F6\u5F00\u542F\u9AD8\u6548\u5B66\u4E60\uFF01"),e.createElement("div",{className:Nu.erweima},e.createElement(G.Z,{key:_r,errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${oe==null?void 0:oe.coursesId}&id=${oe==null?void 0:oe.id}&codeKey=${_r}`,bgColor:"#FFF",size:260,icon:`${J.Z.IMG_SERVER}/${(Mt=l==null?void 0:l.setting)==null?void 0:Mt.tab_logo_url}`})),(Qt==null?void 0:Qt.status)=="in_progress"&&((yt=mn==null?void 0:mn.page)==null?void 0:yt.lesson_mode)=="online_lesson"&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(We.Z,{checked:mn==null?void 0:mn.open_rolling_qrcode_sign,onChange:et=>su(void 0,null,function*(){let on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_rolling_qrcode_sign.json`,{method:"post",body:{open_rolling_qrcode_sign:et}});(on==null?void 0:on.status)==0&&(et?Ya():(qa(""),jr(10)),S.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ta())}),size:"small"}),e.createElement("div",{style:{margin:"0 10px",color:"#333333"}},"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230"),e.createElement(H.Z,{title:"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\u540E\uFF0C\u5B66\u751F\u4EC5\u80FD\u626B\u63CF\u4E8C\u7EF4\u7801\u5B8C\u6210\u7B7E\u5230\uFF0C\u5176\u4ED6\u65B9\u5F0F\u7B7E\u5230\u65E0\u6548\u5E76\u4E14\u65E0\u6CD5\u8FDB\u5165\u8BFE\u4EF6\u3002"},e.createElement("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#ccc",cursor:"pointer"}}))),e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"10px",marginTop:"20px"}},e.createElement(ut.ZP,{style:{marginRight:"20px"},onClick:()=>{eu(!1),Dr(!1)}},"\u67E5\u770B\u8BFE\u4EF6"),e.createElement(ut.ZP,{type:"primary",onClick:()=>{eu(!1),Dr(!1),Rn(null),so(!0),Co()}},"\u5168\u5C4F\u4E0A\u8BFE"),e.createElement(ut.ZP,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{eu(!1),Xa(!0)}},"\u67E5\u770B\u7B7E\u5230\u8BE6\u60C5"))),e.createElement(Pe.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:xl,title:"\u63D0\u793A",width:"450px",cancelButtonProps:{style:{display:"none"}},okText:"\u77E5\u9053\u4E86",onCancel:()=>{var et;Dl(!1),Za((et=Pn==null?void 0:Pn.sort())==null?void 0:et[0])},onOk:()=>su(void 0,null,function*(){var et;Dl(!1),Za((et=Pn==null?void 0:Pn.sort())==null?void 0:et[0])})},e.createElement("div",null,"\u8BF7\u5B8C\u6210 ",(ft=Pn==null?void 0:Pn.sort())==null?void 0:ft.map((et,on)=>e.createElement("span",{key:on,style:{color:"#3061d0",cursor:"pointer"},onClick:()=>{Dl(!1),Za(et)}},"\u7B2C",et,"\u9875",on+1==(Pn==null?void 0:Pn.length)?"":"\u3001"))," \u6240\u6709\u8BD5\u9898\u4EE5\u89E3\u9501\u4E0B\u4E00\u9875\u5185\u5BB9\u3002")),e.createElement(Pe.default,{centered:!0,keyboard:!1,destroyOnClose:!0,maskClosable:!1,open:wl,title:"\u5B66\u751F\u5217\u8868",width:"800px",onCancel:()=>{Qu(!1)},footer:null},e.createElement(ye.Z,{spinning:!1},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"}},e.createElement(Fe.default,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",value:ml==null?void 0:ml.course_group_id,options:(Ve=Ja||[])==null?void 0:Ve.map(et=>({label:et==null?void 0:et.name,value:et==null?void 0:et.id})),onChange:et=>{ml.page=1,ml.course_group_id=et,ho(yi({},ml))}}),e.createElement(yl.t7,{style:{width:300},value:{value:ml.search},onChange:(et,on)=>{ml.page=1,ml.search=et,ho(yi({},ml))},placeholder:"\u8F93\u5165\u5B66\u751F\u59D3\u540D\u6216\u5B66\u53F7\u641C\u7D22"})),e.createElement(ne.default,{loading:Ju,style:{marginBottom:"10px"},className:"mt10",scroll:{y:400},columns:[{title:"\u59D3\u540D",dataIndex:"user_name",ellipsis:!0,render:et=>e.createElement("span",{style:{color:"#666666"}},et||"--")},{title:"\u5B66\u53F7",dataIndex:"student_id",ellipsis:!0,render:et=>e.createElement("span",{style:{color:"#666666"}},et||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",ellipsis:!0,render:et=>e.createElement("span",{style:{color:"#666666"}},et||"--")},{title:"\u64CD\u4F5C",dataIndex:"gender",key:"gender",width:80,fixed:"right",align:"center",render:(et,on)=>e.createElement("span",{className:"c-grey-666",style:{cursor:"pointer",color:"#3061d0"},onClick:()=>{Qu(!1),D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan/${oe==null?void 0:oe.id}/users/${on==null?void 0:on.user_login}/ppt_info/info`)}},"\u67E5\u770B")}],dataSource:Pa,pagination:{size:"default",showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["50","100","150","200"],pageSize:ml.limit,current:ml.page,position:["bottomRight"],onChange:(et,on)=>{ml.page=et,ml.limit=on,ho(yi({},ml))},total:er,showTotal:(et,on)=>e.createElement("span",null,"\u5171",e.createElement("span",{style:{color:"#165DFF"}}," ",et," "),"\u6761\u6570\u636E")}}))),e.createElement(Vo,{Callback:et=>su(void 0,null,function*(){var on;let Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(on=mn==null?void 0:mn.page)==null?void 0:on.id,status:"in_progress",answer_limit_time:et}});(Hn==null?void 0:Hn.status)==0&&(S.ZP.success("\u5DF2\u542F\u52A8\u7B54\u9898"),Ta(),Sa(!0),O({type:"classroomList/setActionTabs",payload:{key:""}}))})}),e.createElement(a0.Z,{Callback:()=>{D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan`),(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:dt,allow_answer:!1,is_end:!0}}})}})))};var F0=(0,D.connect)(({user:r,classroomList:u,loading:l,globalSetting:b})=>({user:r,classroomList:u,globalSetting:b,loading:l.effects}))(C0)},79829:function(gt,Xe,n){"use strict";n.d(Xe,{Z:function(){return Ie}});var e=n(59301),E=n(6767),C=n(62957),D=n(14566),ae=n(25399),S=n(60242),Pe=n(57193),pe={box:"box___542Xs",row:"row___hSJJt",icon:"icon___qExRj"},H=n(71951),o=n(79633),k=n(47257),ne=n.n(k),ut=n(63949),Fe=n(59301),G=Object.defineProperty,We=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,J=(W,Tt,Yt)=>Tt in W?G(W,Tt,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):W[Tt]=Yt,F=(W,Tt)=>{for(var Yt in Tt||(Tt={}))ye.call(Tt,Yt)&&J(W,Yt,Tt[Yt]);if(We)for(var Yt of We(Tt))Se.call(Tt,Yt)&&J(W,Yt,Tt[Yt]);return W},me=(W,Tt,Yt)=>new Promise((Xt,_t)=>{var Ut=X=>{try{_(Yt.next(X))}catch(Ge){_t(Ge)}},ce=X=>{try{_(Yt.throw(X))}catch(Ge){_t(Ge)}},_=X=>X.done?Xt(X.value):Promise.resolve(X.value).then(Ut,ce);_((Yt=Yt.apply(W,Tt)).next())}),Ie=({v:W,visible:Tt,params:Yt,user:Xt,afterOk:_t,afterCancel:Ut})=>{var ce;const[_,X]=(0,e.useState)([]),Ge=(0,e.useRef)([]),[rt,te]=(0,e.useState)(!1),Me={multiple:!1,withCredentials:!0,showUploadList:!1,onRemove:()=>{X([])},accept:".ppt,.pptx",beforeUpload:ve=>me(void 0,null,function*(){var ge,we;const se=ve.name.endsWith(".ppt"),ke=ve.name.endsWith(".pptx");if(!se&&!ke)return E.ZP.warning("\u53EA\u80FD\u4E0A\u4F20PPT\u6216PPTX\u7C7B\u578B\u7684\u6587\u4EF6"),Promise.reject();if(ve.size/1024/1024>200)return E.ZP.warning("\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u9650\u5236200MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Promise.reject();let j=ve==null?void 0:ve.name,ie=j.lastIndexOf("."),xe=j.substring(0,ie);xe.length>20&&(xe=xe.substring(0,20));const bt=yield(0,Pe.ZP)(`/api/courses/${Yt==null?void 0:Yt.coursesId}/smart_plans/check_exist.json`,{method:"post",body:{filename:xe}});(ge=bt==null?void 0:bt.data)!=null&&ge.exist&&E.ZP.info("\u68C0\u6D4B\u5230\u8BFE\u5802\u5DF2\u6709\u540C\u540D\u8BFE\u4EF6\uFF0C\u65B0\u4E0A\u4F20\u7684\u8BFE\u4EF6\u540D\u79F0\u5C06\u6DFB\u52A0\u201C\u526F\u672C\u201D\u8FDB\u884C\u533A\u5206");const ht={id:String(Math.random()).slice(-6),name:ve.name,size:ve.size,file:ve,description:"",percent:0,status:"uploading"};return Qe(ht,{container_type:"SmartPlan",login:(we=Xt==null?void 0:Xt.userInfo)==null?void 0:we.login,container_id:null,description:"",realFileName:!1}),X(wt=>[ht]),Promise.reject()})},Qe=(ve,ge)=>me(void 0,null,function*(){var we,se,ke,Ze,j,ie,xe,bt,ht,wt;ge.file_name=ve.name;const Ct=ve.name,Te=yield(0,Pe.ZP)("/api/buckets/get_smart_plan_token.json",{method:"get"});if((Te==null?void 0:Te.status)!==0){X(Ye=>(Ye[Ye.findIndex(x=>x.name===Ct)].status="error",[...Ye])),E.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}Te.data=JSON.parse((0,o.pe)(Te.data));const Ft=new(ne())({endpoint:(we=Te==null?void 0:Te.data)==null?void 0:we.end_point,region:(se=Te==null?void 0:Te.data)==null?void 0:se.region,accessKeyId:(ke=Te==null?void 0:Te.data)==null?void 0:ke.access_key_id,accessKeySecret:(Ze=Te==null?void 0:Te.data)==null?void 0:Ze.access_key_secret,bucket:(j=Te==null?void 0:Te.data)==null?void 0:j.bucket,stsToken:(ie=Te==null?void 0:Te.data)==null?void 0:ie.security_token});ve.name.split(".").pop(),Ft.multipartUpload(`smartplans/${Yt.coursesId}/${Yt==null?void 0:Yt.id}/${(xe=Xt==null?void 0:Xt.userInfo)==null?void 0:xe.login}/${Date.now()}/${Ct}`,new Blob([ve.file],{type:ve.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ye,x,U)=>{X(z=>{const w=z.findIndex(V=>V.name===Ct);return z[w].client=Ft,z[w].percent=Ye*100,z[w].checkpoint=x,[...z]})},checkpoint:(ht=Ge.current[(bt=Ge.current)==null?void 0:bt.findIndex(Ye=>Ye.name===Ct)])==null?void 0:ht.checkpoint,callback:{customValue:{id:Ct+""},url:(wt=Te==null?void 0:Te.data)==null?void 0:wt.callback_url,host:Te==null?void 0:Te.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Pe.rz)(ge)}}).then(function(Ye){X(x=>{var U,z,w;const V=x.findIndex(ue=>ue.name===Ct);let lt="done";return((U=Ye.data)==null?void 0:U.status)===0?x[V].response=(z=Ye.data)==null?void 0:z.data:(E.ZP.warning((w=Ye.data)==null?void 0:w.message),lt="error"),x[V].status=lt,[...x]})}).catch(function(Ye){(Ye==null?void 0:Ye.name)!=="cancel"&&X(x=>{const U=x.findIndex(z=>z.name===Ct);return x[U].status="error",[...x]})})});return Fe.createElement(C.default,{maskClosable:!1,centered:!0,open:Tt,title:"\u66F4\u6362\u8BFE\u4EF6",width:550,destroyOnClose:!0,onCancel:()=>{Ut(),X([])},okButtonProps:{loading:rt,disabled:(_==null?void 0:_.length)>0&&((ce=_==null?void 0:_[0])==null?void 0:ce.status)=="uploading"},onOk:()=>me(void 0,null,function*(){var ve,ge,we;if((_==null?void 0:_.length)>0&&((ve=_==null?void 0:_[0])==null?void 0:ve.status)=="uploading"){E.ZP.warning("\u8BFE\u4EF6\u6B63\u5728\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...");return}te(!0);const se=yield(0,Pe.ZP)(`/api/courses/${Yt==null?void 0:Yt.coursesId}/smart_plans/${W==null?void 0:W.id}/change_attachment.json`,{method:"put",body:{attachment_id:(we=(ge=_==null?void 0:_[0])==null?void 0:ge.response)==null?void 0:we.attachment_id,smart_plan_id:W==null?void 0:W.id}});return te(!1),(se==null?void 0:se.status)===0&&(E.ZP.success("\u66F4\u6362\u6210\u529F\uFF01"),_t(),X([])),se})},Fe.createElement("div",null,Fe.createElement("div",{style:{fontSize:"14px",color:"#000",marginBottom:"20px"}},"\u652F\u6301\u4E0A\u4F20\u65B0\u7248PPT\u6587\u4EF6\u8986\u76D6\u5F53\u524DPPT\u5185\u5BB9\u3002\u66F4\u6362PPT\u540E\uFF0C\u4EA4\u4E92\u529F\u80FD\u4ECD\u4E0E\u539F\u9875\u7801\u5173\u8054\u3002\u5982\u9700\u8C03\u6574\uFF0C\u53EF\u901A\u8FC7 ",Fe.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>{}},"\u8BFE\u4EF6\u4EA4\u4E92\u8BE6\u60C5")," \u5FEB\u901F\u4FEE\u6539\u4EA4\u4E92\u529F\u80FD\u5173\u8054\u7684\u5E7B\u706F\u7247\u3002 "),Fe.createElement(D.default,F({},Me),Fe.createElement("div",{style:{display:"flex",alignItems:"center"}},Fe.createElement(H.op,{shape:"default"},Fe.createElement("div",{style:{display:"flex",alignItems:"center"}},Fe.createElement("img",{width:14,src:n(69629)}),Fe.createElement("span",{style:{marginLeft:"5px"}},"\u4E0A\u4F20\u66F4\u6362\u8BFE\u4EF6"))),Fe.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},"\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC7200MB\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1APPT\u3001PPTX"))),Fe.createElement("div",{className:pe.box},_.map(ve=>Fe.createElement("div",{key:ve.id,className:pe.row},Fe.createElement("div",{className:pe.icon},ve.status==="done"&&Fe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),ve.status==="error"&&Fe.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),Fe.createElement("div",null,Fe.createElement(ae.Z,{title:ve==null?void 0:ve.name},Fe.createElement("div",{style:{color:ve.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,ut.tP)(ve==null?void 0:ve.name,9))),ve.status==="uploading"&&Fe.createElement(S.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:ve.percent,showInfo:!1,size:[168,4]})))))))}},76888:function(gt,Xe,n){"use strict";n.d(Xe,{i:function(){return me},q:function(){return F}});var e=n(59301),E={flex_box_center:"flex_box_center___yMUhy",flex_space_between:"flex_space_between___KNvG9",flex_box_vertical_center:"flex_box_vertical_center___yqWY9",flex_box_center_end:"flex_box_center_end___DJKuV",flex_box_column:"flex_box_column___NTtN1",singleSelect:"singleSelect___fU3O9",multipleSelect:"multipleSelect___LFXCB",plus:"plus___gdDhG"},C=n(92310),D=n.n(C),ae=n(25399),S=n(82326),Pe=n(99571),pe=n(57193),H=Object.defineProperty,o=Object.defineProperties,k=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,G=(st,Ie,W)=>Ie in st?H(st,Ie,{enumerable:!0,configurable:!0,writable:!0,value:W}):st[Ie]=W,We=(st,Ie)=>{for(var W in Ie||(Ie={}))ut.call(Ie,W)&&G(st,W,Ie[W]);if(ne)for(var W of ne(Ie))Fe.call(Ie,W)&&G(st,W,Ie[W]);return st},ye=(st,Ie)=>o(st,k(Ie)),Se=(st,Ie)=>{var W={};for(var Tt in st)ut.call(st,Tt)&&Ie.indexOf(Tt)<0&&(W[Tt]=st[Tt]);if(st!=null&&ne)for(var Tt of ne(st))Ie.indexOf(Tt)<0&&Fe.call(st,Tt)&&(W[Tt]=st[Tt]);return W},J=(st,Ie,W)=>new Promise((Tt,Yt)=>{var Xt=ce=>{try{Ut(W.next(ce))}catch(_){Yt(_)}},_t=ce=>{try{Ut(W.throw(ce))}catch(_){Yt(_)}},Ut=ce=>ce.done?Tt(ce.value):Promise.resolve(ce.value).then(Xt,_t);Ut((W=W.apply(st,Ie)).next())});const F=st=>{var Ie=st,{wrapClassName:W,wrapStyle:Tt={},showLinkButton:Yt=!0,tooltipTitle:Xt="",loadGeneral:_t=!1,data:Ut={}}=Ie,ce=Se(Ie,["wrapClassName","wrapStyle","showLinkButton","tooltipTitle","loadGeneral","data"]);const _="course_disciplines_list",[X,Ge]=(0,e.useState)(()=>{const ge=sessionStorage.getItem(_);return ge?JSON.parse(ge):[]}),[rt,te]=(0,e.useState)(!1),[Me,Qe]=(0,e.useState)(!0);(0,e.useEffect)(()=>{ve()},[]);const ve=()=>J(void 0,null,function*(){var ge,we,se,ke;te(!0);const Ze=yield(0,pe.U2)("v2/course_disciplines.json",Ut);if(Ze.status===0){const j=((we=(ge=Ze==null?void 0:Ze.data)==null?void 0:ge.list)==null?void 0:we.map(ie=>({value:ie.id,label:ie.name})))||[];if(Ge(j),Qe(!1),sessionStorage.setItem(_,JSON.stringify(j)),Me){const ie=(ke=(se=Ze==null?void 0:Ze.data)==null?void 0:se.list)==null?void 0:ke.find(xe=>xe.is_default);_t&&ie&&ce.onChange(ie==null?void 0:ie.id)}}te(!1)});return e.createElement("div",{className:D()(E.singleSelect,W),style:Tt},e.createElement(ae.Z,{title:Xt},e.createElement(S.default,We({allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B",loading:rt,options:X,onDropdownVisibleChange:ge=>{ge&&ve()}},ce))),Yt&&e.createElement(Pe.ZP,{type:"link",target:"_blank",href:"/knowledgeHub"},"\u7BA1\u7406\u8BFE\u7A0B"))},me=st=>{var Ie=st,{wrapClassName:W,wrapStyle:Tt={},showLinkButton:Yt=!0,courseDisciplineId:Xt="",isPlusHeight:_t=!1,tooltipTitle:Ut,allowAcceptEmpty:ce=!1,data:_={}}=Ie,X=Se(Ie,["wrapClassName","wrapStyle","showLinkButton","courseDisciplineId","isPlusHeight","tooltipTitle","allowAcceptEmpty","data"]);const[Ge,rt]=(0,e.useState)([]),[te,Me]=(0,e.useState)(!1);(0,e.useEffect)(()=>{Qe()},[Xt]);const Qe=()=>J(void 0,null,function*(){var ve,ge;if(!ce&&!Xt){rt([]);return}Me(!0);const we=yield(0,pe.U2)(`v2/course_disciplines/${Xt||"all"}.json`,_);if(we.status===0){const se=((ge=(ve=we==null?void 0:we.data)==null?void 0:ve.tag_disciplines)==null?void 0:ge.map(ke=>({value:ke.id,label:ke.name})))||[];se.length&&rt(se)}Me(!1)});return e.createElement("div",{className:D()(E.multipleSelect,W),style:Tt},e.createElement(ae.Z,{title:Ut},e.createElement(S.default,ye(We({allowClear:!0,mode:"multiple",optionFilterProp:"label",placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9",loading:te,options:Ge,maxTagCount:"responsive",onDropdownVisibleChange:ve=>{ve&&Qe()}},X),{className:D()(X.className,_t&&E.plus)}))),Yt&&e.createElement(Pe.ZP,{className:E.btn,type:"link",target:"_blank",href:"/knowledgeHub"},"\u7BA1\u7406\u77E5\u8BC6\u70B9"))}},85091:function(gt,Xe,n){"use strict";n.d(Xe,{Z:function(){return G}});var e=n(59301),E=n(95392),C=n(62957),D=n(99571),ae=n(29787),S=n(20885),Pe=n(62998),pe=n(95440),H=n(24334),o=n(56656),k=n.n(o),ne=n(99268),ut=n(59301),Fe=(We,ye,Se)=>new Promise((J,F)=>{var me=W=>{try{Ie(Se.next(W))}catch(Tt){F(Tt)}},st=W=>{try{Ie(Se.throw(W))}catch(Tt){F(Tt)}},Ie=W=>W.done?J(W.value):Promise.resolve(W.value).then(me,st);Ie((Se=Se.apply(We,ye)).next())}),G=({open:We,onClose:ye})=>{const[Se,J]=(0,e.useState)(void 0);console.log((0,E.useLocation)(),33);const F=(0,E.useLocation)();(0,e.useEffect)(()=>{We&&function(){return Fe(this,null,function*(){const we=yield(0,S.X6)(We);J(we.data)})}()},[We]);const{status:me,created_at:st,code:Ie,name:W,language:Tt,pass_sets_count:Yt,set_count:Xt,error_msg:_t,output:Ut,input:ce,expected_output:_,execute_memory:X,user:Ge,execute_time:rt,input_file_url:te,output_file_url:Me,is_file:Qe,expected_output_file_url:ve}=Se||{};return ut.createElement(C.default,{open:We,width:1e3,onCancel:()=>ye(!1),footer:ut.createElement(D.ZP,{type:"primary",onClick:()=>ye(!1)},"\u5173\u95ED"),centered:!0},ut.createElement(ae.Z,{spinning:!Se,delay:500},ut.createElement("div",{className:"record-detail-info"},Se?ut.createElement(ut.Fragment,null,ut.createElement("div",{className:"record-detail-body"},ut.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),ut.createElement("ul",{className:"record-info"},ut.createElement("li",null," \u8BC4\u6D4B\u7ED3\u679C\uFF1A",ut.createElement("span",{className:me===0?"c-green":"c-red"},Pe.Im[me])," "),ut.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",ut.createElement("span",null,k()(st).format("YYYY-MM-DD HH:mm:ss"))," "),ut.createElement("li",null," \u8BED\u8A00\uFF1A",ut.createElement("span",null,Tt)," "),ut.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",ut.createElement("span",null,rt*1e3,"ms")," "),ut.createElement("li",null," ",`${me===ne.h.HIDE_COMPILE_STATUS?"--":Yt} / ${Xt} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,Pe.gZ)({status:me,error_msg:_t,execute_time:rt,output:Ut,input:ce,expected_output:_,input_file_url:te,output_file_url:Me,is_file:Qe,expected_output_file_url:ve}),ut.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),ut.createElement(pe.ZP,{height:"200px",width:"100%",language:Tt==null?void 0:Tt.toLocaleLowerCase(),value:H.Base64.decode(Ie),options:{readOnly:!0}}))):null)))}},62969:function(gt,Xe,n){"use strict";n.d(Xe,{Im:function(){return Xt},Y4:function(){return Ut}});var e=n(59301),E=n(37568),C=n(6767),D=n(99571),ae=n(10786),S=n(24334),Pe=n.n(S),pe=n(89517),H=n(35191),o=n(97231),k=n(63949),ne=n(34376),ut=n.n(ne),Fe=n(57193),G=n(95392),We=n(85091),ye=n(27035),Se=n(20885),J=n(57753),F=n(9931),me=n(92310),st=n.n(me),Ie=n(91415),W=n(59301),Tt=(X,Ge,rt)=>new Promise((te,Me)=>{var Qe=we=>{try{ge(rt.next(we))}catch(se){Me(se)}},ve=we=>{try{ge(rt.throw(we))}catch(se){Me(se)}},ge=we=>we.done?te(we.value):Promise.resolve(we.value).then(Qe,ve);ge((rt=rt.apply(X,Ge)).next())});const{TextArea:Yt}=E.default,Xt={[ae.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[ae.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[ae.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 _t=(X=>(X[X.SET_VISIBLE=0]="SET_VISIBLE",X[X.SET_TABINDEX=1]="SET_TABINDEX",X))(_t||{});function Ut(X){const{status:Ge,error_msg:rt,output:te,input:Me,expected_output:Qe,is_file:ve,input_file_url:ge,output_file_url:we,expected_output_file_url:se,setMonacoValue:ke,setData:Ze,highlightEndEntry:j}=X,ie=(0,e.useRef)(),xe=(0,e.useRef)(),bt=(0,e.useRef)();let ht=null;const wt={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,e.useEffect)(()=>{if(te&&!ve&&ie.current){const Ct=new ne.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});Ct.open(ie.current);const Te=(j?k.jl:k.pp)(S.Base64.decode(te));Ct.write(Te),Ct.setOption("theme",{background:"#1e1e1e"})}if(Me&&!ve&&xe.current){const Ct=new ne.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});Ct.open(xe.current),Ct.write((j?k.jl:k.pp)(Me)),Ct.setOption("theme",{background:"#1e1e1e"})}if(Qe&&!ve&&bt.current){const Ct=new ne.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});Ct.open(bt.current),Ct.write((j?k.jl:k.pp)(S.Base64.decode(Qe))),Ct.setOption("theme",{background:"#1e1e1e"})}},[te]),Ge){case ae.h.NOMATCH:ht=W.createElement(W.Fragment,null,W.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!ve&&W.createElement("div",{ref:ie}),ve&&W.createElement("div",{style:wt},W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(this,null,function*(){const Ct=yield(0,Fe.ZP)(we,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});ke(Ct),setTimeout(()=>{Ze(we)},200)})},te)),W.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!ve&&W.createElement("div",{ref:bt}),ve&&W.createElement("div",{style:wt},W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(this,null,function*(){const Ct=yield fetch(se,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});ke(yield Ct.text()),setTimeout(()=>{Ze(se)},200)})},Qe)));break;case ae.h.EXECUTEFAILURE:ht=W.createElement(W.Fragment,null,W.createElement("div",{style:{border:"1px #F6F7F9 solid"}},W.createElement("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"}},"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!ve&&W.createElement(o.Z,{value:Me,style:wt}),ve&&W.createElement("div",{style:wt},W.createElement("a",{onClick:()=>(0,k.LR)(ge,Me)},Me))),W.createElement("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"}},W.createElement("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"}},"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),W.createElement("pre",{className:pe.Z.error,style:{color:"#E30000",padding:"0 10px"}},S.Base64.decode(rt),"111")));break;case ae.h.COMPILEFAILURE:ht=W.createElement(W.Fragment,null,W.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),W.createElement("pre",{className:pe.Z.error},S.Base64.decode(rt)));break;case ae.h.PODFAILURE:ht=W.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case ae.h.TIMEOUT:ht=W.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return W.createElement(W.Fragment,null," ",ht," ")}function ce(X){const{status:Ge,error_msg:rt,execute_time:te,output:Me,input:Qe,expected_output:ve,is_file:ge,input_file_url:we,output_file_url:se,expected_output_file_url:ke}=X;let Ze=null;switch(Ge){case ae.h.OK:case ae.h.NOMATCH:case ae.h.EXECUTEFAILURE:case ae.h.COMPILEFAILURE:Ze=W.createElement("div",{id:"outputResultRef",className:"h100"});break;case ae.h.PODFAILURE:Ze=W.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case ae.h.TIMEOUT:Ze=W.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return W.createElement(W.Fragment,null," ",Ze," ")}function _({value:X,className:Ge}){return W.createElement("span",{className:Ge},X)}Xe.ZP=({input:X,is_file:Ge,debuging:rt,submitting:te,executingMessage:Me,debugResult:Qe,onChangeInput:ve,onDebugCode:ge,onSubmitCode:we,hack:se,user:ke,submitResult:Ze,isWhiteTheme:j,topDispatch:ie})=>{const[xe]=(0,G.useSearchParams)(),bt=(0,G.useParams)(),[ht,wt]=(0,e.useState)(!1),[Ct,Te]=(0,e.useState)(!1),[Ft,Bt]=(0,e.useState)(1),[Ye,x]=(0,e.useState)(!1),[U,z]=(0,e.useState)(0),[w,V]=(0,e.useState)(!1),[lt,ue]=(0,e.useState)(""),[Z,de]=(0,e.useState)(""),M=(0,e.useRef)(),q=(0,e.useRef)(),Le=(0,e.useRef)(null),P=(0,e.useRef)(null),R=(0,e.useRef)(null);console.log(Ze,"submitResult",bt);const{status:s,id:p,input:h,output:T,expected_output:Ae,is_file:he,input_file_url:Be,output_file_url:K,expected_output_file_url:be,error_msg:vt,hack_sets:en}=Ze||{};(0,e.useEffect)(()=>{s===0&&(Bt(1),z(0))},[s,p]),(0,e.useEffect)(()=>{Tt(void 0,null,function*(){var jt;const ln=yield(0,Se.rX)(bt==null?void 0:bt.id,"submit");(ln==null?void 0:ln.status)===0&&(ln!=null&&ln.data&&((jt=ln==null?void 0:ln.data)==null?void 0:jt.status)!==0?(ie({type:J.Types.SET_SUBMIT_RESULT,payload:{submitResult:ln==null?void 0:ln.data}}),Bt(2),z(320)):(Bt(1),z(0)))})},[bt==null?void 0:bt.id]),(0,e.useEffect)(()=>{if(M.current){let At=function(cn){fn=Bn.offsetHeight,Mn=!0,In=cn.pageY,R.current.style.display="block"},jt=function(){Mn=!1,R.current.style.display="none"},ln=function(cn){if(Mn){qe();let tl=In-cn.pageY,gl=fn+tl;if(gl<0&&(gl=0),gl>window.innerHeight-150&&(gl=window.innerHeight-150),Ft===1){gl<=34?z(0):z(gl);return}console.log(gl,"resizeH"),z(gl)}};const Bn=Le.current;let fn=0,Mn=!1,In=0;const sl=document.getElementById("case-y-bar");return sl==null||sl.addEventListener("mousedown",At),document.addEventListener("mousemove",ln),document.addEventListener("mouseup",jt),()=>{const cn=document.getElementById("case-y-bar");cn==null||cn.removeEventListener("mousedown",At),document.removeEventListener("mousemove",ln),document.removeEventListener("mouseup",jt)}}},[M,Ft]),(0,e.useEffect)(()=>{const At=ye.Z.subscribe("resize-move-bar",qe);if(xe.get("type")!=="exercises")return document.addEventListener((0,Ie.gH)(),xt),()=>{document.removeEventListener((0,Ie.gH)(),xt),At()}},[]),(0,e.useEffect)(()=>{});function qe(){var At,jt,ln,Bn;const fn=document.getElementById("outputResultRef");if(fn){let Mn=fn.dataset.text;q.current.reset(),q.current.writeln(Mn);const In=document.getElementById("outputResultRef").offsetWidth-20,sl=((Bn=(ln=(jt=(At=q.current)==null?void 0:At._core)==null?void 0:jt._renderService)==null?void 0:ln.dimensions)==null?void 0:Bn.actualCellWidth)||10,cn=Math.ceil(In/sl);q.current.resize(cn,Math.ceil(fn.clientHeight/16))}}function pt(){wt(!ht),setTimeout(()=>{qe()},300),ht?z(320):(z(window.innerHeight-150),x(!0))}function qt(){Ct?(Te(!1),(0,Ie.BU)()):(Te(!0),(0,Ie.Dj)(P.current))}const xt=At=>{(0,Ie.vp)()||Te(!1)},Wt=(0,e.useMemo)(()=>{if(Qe){const{status:At,output:jt,error_msg:ln}=Qe;return setTimeout(()=>{let Bn="",fn=document.getElementById("outputResultRef");jt?Bn=S.Base64.decode(jt):ln&&(Bn=S.Base64.decode(ln)),q.current=new ne.Terminal({fontSize:14,theme:{background:"#181e2e",cursor:"transparent"},rendererType:"dom"}),q.current.open(fn),q.current.onKey(function(Mn){var In;if(Mn.domEvent.key.toLocaleUpperCase()==="C"&&Mn.domEvent.ctrlKey){Mn.domEvent.preventDefault();let sl=(In=q.current)==null?void 0:In.getSelection();navigator.clipboard.writeText(sl).then(()=>{})}}),fn.dataset.text=Bn,q.current.setOption("convertEol",!0),qe()},300),W.createElement(W.Fragment,null,ce(Qe))}return null},[Qe]);function tt(){var At,jt;if(!(se!=null&&se.code)||((At=se==null?void 0:se.code)==null?void 0:At.trim().length)===0){(jt=C.ZP)==null||jt.warning("\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01");return}Bt(1),z(320),ge()}const Dt=At=>Tt(void 0,null,function*(){let jt=yield(0,Fe.ZP)(`/api/problems/${At}/start.json`,{method:"get",params:{hack_user_id:ke==null?void 0:ke.user_id}});jt&&(window.location.href=`/myproblems/${jt==null?void 0:jt.identifier}${window.location.search}`)});function Lt(){he?navigator.clipboard.writeText(S.Base64.decode(vt)).then(()=>{C.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(S.Base64.decode(T)).then(()=>{C.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return W.createElement(e.Fragment,null,W.createElement("div",{className:st()(pe.Z.case,j&&pe.Z.whiteCase),style:{height:U},ref:Le},W.createElement("div",{className:pe.Z.fullMask,ref:R}),W.createElement("div",{className:pe.Z["resize-y-bar"],id:"case-y-bar",ref:M,draggable:!1},Ft===2&&W.createElement("i",{className:"iconfont icon-guangbiao",draggable:!1})),Ft===1&&(U<=34?W.createElement("div",{onClick:()=>{z(320)},className:pe.Z.unfoldBtn},"\u63A7\u5236\u53F0",W.createElement("i",{className:"iconfont icon-zhankai9 ml10 font12"})):W.createElement("div",{onClick:()=>{z(0)},className:pe.Z.unfoldBtn,style:{borderRadius:"0px 0px 8px 8px",top:0}},"\u63A7\u5236\u53F0",W.createElement("i",{className:"iconfont icon-shouqi8 ml10 font12"}))),W.createElement("div",null,W.createElement("div",{className:pe.Z.caseHead},W.createElement("div",{className:pe.Z.dot}),W.createElement("div",{className:pe.Z.text},Ft===1?"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C":"\u8BC4\u6D4B\u7ED3\u679C"),Ft===2&&!te&&typeof s=="number"&&W.createElement(W.Fragment,null,s===ae.h.OK?W.createElement("div",{className:pe.Z.pass},W.createElement("i",{className:"iconfont icon-tongguo font14 mr5"}),"\u8BC4\u6D4B\u901A\u8FC7"):W.createElement("div",{className:pe.Z.noPass},W.createElement("i",{className:"iconfont icon-jinggao-3 font14 mr5"}),Xt[s])),W.createElement("div",{className:pe.Z.btns},Ft===2&&!te&&W.createElement(W.Fragment,null,s!==ae.h.OK&&W.createElement("div",{onClick:Lt},W.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236\u9519\u8BEF\u4FE1\u606F"),W.createElement("div",{onClick:()=>{V(p)}},W.createElement("i",{className:"iconfont icon-danceng-xinjianwenjian"}),"\u663E\u793A\u8BE6\u60C5")),xe.get("type")!=="exercises"&&W.createElement("div",{title:"\u5C55\u5F00/\u6536\u7F29",onClick:()=>pt()},W.createElement("i",{className:`iconfont icon-${ht?"suoxiao1":"fangda"}`})))),W.createElement("div",{style:{display:Ft===1?"block":"none"}},rt?W.createElement(H.Z,{style:{color:"#1976d2"},message:"\u670D\u52A1\u542F\u52A8\u4E2D..."}):W.createElement("div",{style:{height:U-34}},W.createElement("div",{className:pe.Z.result},W.createElement("div",{className:pe.Z.left},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00FA95"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),W.createElement("span",null,"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),W.createElement("div",{className:pe.Z.leftNode},W.createElement(Yt,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\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:Ge?"":X,onChange:ve}))),W.createElement("div",{className:pe.Z.right},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),W.createElement("span",null,"\u4EE3\u7801\u6267\u884C\u7ED3\u679C")),W.createElement("div",{className:pe.Z.node},Qe?Wt:W.createElement("p",{style:{color:"#8F96B1"}},"\u8BF7\u5728\u5DE6\u4FA7\u8F93\u5165\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D\uFF0C\u5373\u53EF\u751F\u6210\u4EE3\u7801\u6267\u884C\u7ED3\u679C")))))),W.createElement("div",{style:{display:Ft===2?"block":"none"}},te?W.createElement(H.Z,{style:{color:"#1976d2"},message:"\u670D\u52A1\u542F\u52A8\u4E2D..."}):W.createElement("div",{style:{height:U-34,display:"flex",flexDirection:"column",overflow:"hidden"}},W.createElement("div",{ref:P,className:pe.Z.elseNode},W.createElement("div",{className:pe.Z.nameWrap},W.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),W.createElement("span",null,"\u5B9E\u9645\u8F93\u5165")),W.createElement("div",{className:pe.Z.scroll},W.createElement("pre",{className:pe.Z.scrollBox,style:Ye?{height:Ct?"calc(100vh - 20px)":200}:{height:24,overflow:"hidden"}},!he&&W.createElement(_,{value:h}),he&&W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(void 0,null,function*(){const At=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});de(yield At.text()),setTimeout(()=>{ue(Be)},200)})},h)),h&&W.createElement("div",{className:pe.Z.action},W.createElement("span",{onClick:()=>x(!Ye)},Ye?"\u6536\u8D77":"\u5C55\u5F00")))),W.createElement("div",{className:pe.Z.result,style:{flex:1,overflow:"hidden"}},W.createElement("div",{className:pe.Z.left},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00FA95"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),W.createElement("span",null,"\u9884\u671F\u8F93\u51FA")),W.createElement("div",{className:pe.Z.node,style:{background:"#1B2333",color:"#2ABD8C"}},W.createElement("pre",null,!he&&W.createElement(_,{className:"mb10",value:Ae&&S.Base64.decode(Ae)||""}),he&&W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(void 0,null,function*(){const At=yield fetch(be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});de(yield At.text()),setTimeout(()=>{ue(be)},200)})},Ae)))),W.createElement("div",{className:pe.Z.right},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),W.createElement("span",null,"\u5B9E\u9645\u8F93\u51FA")),W.createElement("div",{className:pe.Z.node,style:{color:s===ae.h.OK?"#2ABD8C":"#FF2C29"}},W.createElement("pre",null,(s===4||s===5)&&W.createElement(_,{className:"mb10",value:vt&&S.Base64.decode(vt)||""}),s!=4&&s!=5&&(he?W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(void 0,null,function*(){const At=yield(0,Fe.ZP)(K,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});try{de(At)}catch(jt){de("")}setTimeout(()=>{ue(K)},200)})},T):W.createElement(_,{className:"mb10",value:T&&S.Base64.decode(T)||""})))))))))),W.createElement("div",{className:st()(pe.Z.footer,j&&pe.Z.whiteFooter),style:{zIndex:100}},(se==null?void 0:se.is_program)&&(se==null?void 0:se.above_question)&&W.createElement(D.ZP,{className:"mr10",type:"primary",onClick:()=>Dt(se==null?void 0:se.above_question),id:"oj-prev",ghost:!0},"\u4E0A\u4E00\u9898"),(se==null?void 0:se.is_program)&&(se==null?void 0:se.under_question)&&W.createElement(D.ZP,{className:"mr10",type:"primary",onClick:()=>Dt(se==null?void 0:se.under_question),id:"oj-next",ghost:!0},"\u4E0B\u4E00\u9898"),W.createElement(D.ZP,{style:{border:"1px solid #2ABD8C",color:"#2ABD8C"},ghost:!0,disabled:rt||te,loading:rt,color:"#2ABD8C",className:"mr10",onClick:tt},"\u8C03\u8BD5\u4EE3\u7801"),xe.get("qtype")!=="8"&&W.createElement(D.ZP,{className:pe.Z.disabled,type:"primary",icon:W.createElement("i",{className:"iconfont icon-bofang1"}),loading:te,disabled:rt||te,onClick:()=>{var At,jt;if(!(se!=null&&se.code)||((At=se==null?void 0:se.code)==null?void 0:At.trim().length)===0){(jt=C.ZP)==null||jt.warning("\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01");return}Bt(2),z(320),we()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4")),W.createElement(We.Z,{onClose:V,open:w}),W.createElement(F.Z,{close:!0,data:lt,type:lt.length?"txt":"",onClose:()=>ue(""),monacoEditor:{value:Z,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}}))}},57753:function(gt,Xe,n){"use strict";n.r(Xe),n.d(Xe,{Types:function(){return je},default:function(){return c}});var e=n(59301),E=n(95392),C=n(11938),D=n(62957),ae=n(29787),S=n(99571),Pe=n(25399),pe=n(77019),H=n(20885),o=n(75823),k=n(91415),ne=n(67786),ut=n(78323),Fe=n(87169),G=n(30641),We=n(95440),ye=n(81123),Se=n(83090),J=n(11979),F=n(6767),me={list:"list___IRN6i",copy:"copy___qCn9B"},st=n(56102),Ie=n(57193),W=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())}),Yt=({showResourceCentre:i,identifier:f})=>{const A=(0,E.useParams)(),[Y,le]=(0,e.useState)(null);(0,e.useEffect)(()=>{i&&L()},[i]);const L=()=>W(void 0,null,function*(){const De=yield(0,Ie.ZP)(`/api/problems/${f}/attachment_list.json`,{method:"get"});(De==null?void 0:De.status)==0&&le(De.data||[])});return e.createElement("div",{className:"tpi-code-setting"},e.createElement("h3",null,"\u8D44\u6E90\u4E2D\u5FC3"),!(Y!=null&&Y.length)&&e.createElement("div",{className:"tc mt50 c-grey-999"},"\u6682\u65E0\u8D44\u6E90\u6570\u636E"),Y==null?void 0:Y.map((De,Re)=>e.createElement("dl",{className:me.list,key:Re},e.createElement(Pe.Z,{title:De.title},e.createElement("dt",null,e.createElement("i",{className:"icon-wenjian4 mr5"}),De.title)),e.createElement("dd",null,e.createElement(st.CopyToClipboard,{text:De.saved_file_path,onCopy:()=>F.ZP.success("\u590D\u5236\u6210\u529F")},e.createElement("span",{className:`${me.copy} current`},"\u70B9\u51FB\u590D\u5236"))))))},Xt=n(59301),_t=Object.defineProperty,Ut=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,rt=(i,f,A)=>f in i?_t(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,te=(i,f)=>{for(var A in f||(f={}))X.call(f,A)&&rt(i,A,f[A]);if(_)for(var A of _(f))Ge.call(f,A)&&rt(i,A,f[A]);return i},Me=(i,f)=>Ut(i,ce(f));const Qe={theme:(0,Se.G)("ProgrammingCodeMode","vs-dark"),fontSize:(0,Se.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,Se.G)("cmTabToSpace",!0),showResourceCentre:!1};var ve=(i=>(i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting",i[i.set_show_respurce_center=4]="set_show_respurce_center",i))(ve||{});function ge(i,f){switch(f.type){case 3:return Me(te({},i),{showEditorSetting:f.payload});case 1:return Me(te({},i),{theme:f.payload});case 0:return Me(te({},i),{fontSize:f.payload});case 2:return Me(te({},i),{tabToSpace:f.payload});case 4:return Me(te({},i),{showResourceCentre:f.payload});default:throw new Error}}var we=({isLoading:i,value:f,onChange:A,language:Y,onUpdateCode:le,ActionBarRender:L,setIsWhiteTheme:De,identifier:Re})=>{const[Ce,Ne]=(0,e.useReducer)(ge,Qe),{theme:it,fontSize:He,showEditorSetting:Ke,tabToSpace:St,showResourceCentre:Ot}=Ce,Ee=(0,e.useRef)(),dn=(0,e.useRef)();(0,e.useEffect)(()=>{De(it==="vs")},[it]);const Rt={onFontSizeChange:hn=>{Ne({type:0,payload:hn}),(0,Se.t)("cmFontSize",hn)},tabToSpace:St,cmFontSize:He,className:"oj",cmCodeMode:it,onTabToSpace:hn=>{Ne({type:2,payload:hn}),(0,Se.t)("cmTabToSpace",hn)},onCodeModeChange:hn=>{Ne({type:1,payload:hn}),(0,Se.t)("ProgrammingCodeMode",hn)}};function rn(){Ne({type:3,payload:!1})}function An(){Ne({type:3,payload:!0})}function bn(){Ne({type:4,payload:!1})}function Un(){Ne({type:4,payload:!0})}const un={value:f,language:Y,theme:it,options:{fontSize:He,insertSpaces:St},onChange:hn=>{A(hn),dn.current=hn,clearTimeout(Ee.current),Ee.current=setTimeout(()=>{le(dn.current)},1e4)},onEditBlur:hn=>{dn.current&&le(dn.current)}};return Xt.createElement(e.Fragment,null,L(An,Un),Xt.createElement("div",{style:{flex:1,overflow:"hidden"}},!i&&Xt.createElement(We.ZP,te({},un))),Xt.createElement(ye.Z,null,Xt.createElement(G.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Ke,onClose:rn},Xt.createElement(J.Z,te({},Rt)))),Xt.createElement(ye.Z,null,Xt.createElement(G.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Ot,onClose:bn},Xt.createElement(Yt,{showResourceCentre:Ot,identifier:Re}))))},se=n(60141),ke=n(24334),Ze=n(62969),j={flex_box_center:"flex_box_center___rM3g8",flex_space_between:"flex_space_between___Oc7SE",flex_box_vertical_center:"flex_box_vertical_center___MnmYE",flex_box_center_end:"flex_box_center_end___QQh83",flex_box_column:"flex_box_column___ZRFbL","left-panel":"left-panel___SKGyd","tab-panel-body":"tab-panel-body___gABdv",b1:"b1___QpbmK","oj-width-input":"oj-width-input___eJQWT","oj-mr":"oj-mr___AxILO","s-navs":"s-navs___FXwOi","bg-white":"bg-white___kbZ6r",active:"active___QGOnZ",list:"list___PXTsq",btns:"btns___F8yZK",drawer:"drawer___xdGaT",tour:"tour___oMkVh"},ie={pagination:"pagination___yDAjZ",info:"info___ATmsa",wrap:"wrap____KX19"},xe=n(54172),bt=n(13747),ht=n(58617),wt=n(85091),Ct=n(56656),Te=n.n(Ct),Ft=n(59301);const{Column:Bt}=xe.default;var Ye=({submitResult:i,submitting:f,submitRecords:A,page:Y,onPageChange:le,topicId:L})=>{const[De]=(0,E.useSearchParams)(),{records:Re,records_count:Ce}=A||{},[Ne,it]=(0,e.useState)(!1),He=De.get("type")==="1";return Ft.createElement(ae.Z,{spinning:f,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Ft.createElement(ht.Z,{style:{fontSize:24},spin:!0})},(Re==null?void 0:Re.length)>0?Ft.createElement(xe.default,{dataSource:Re,rowKey:"id",pagination:!1},Ft.createElement(Bt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ke,St)=>Ft.createElement("span",null," ",Te()(Ke).format("YYYY-MM-DD HH:mm:ss"))}),Ft.createElement(Bt,{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ke,St)=>{var Ot;return Ft.createElement("span",{className:`${Ke===0?"c-green":"c-red"} current`,onClick:()=>{it(St.id)}},(Ot=Ze.Im[Ke])==null?void 0:Ot.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Ft.createElement(Bt,{title:`\u6267\u884C\u7528\u65F6 (${He?"MS":"S"})`,dataIndex:"execute_time",key:"execute_time",render:Ke=>Ke?He?Ke:Ke/1e3:""}),Ft.createElement(Bt,{title:`\u5185\u5B58\u6D88\u8017\uFF08${He?"KB":"MB"}\uFF09`,dataIndex:"execute_memory",key:"execute_memory",render:Ke=>Ke?He?Ke:parseFloat((Ke/1024).toFixed(2)):""}),Ft.createElement(Bt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"}),Ft.createElement(Bt,{title:"\u64CD\u4F5C",dataIndex:"status",key:"status",render:(Ke,St)=>Ft.createElement("span",{className:"c-light-primary current",onClick:()=>{it(St.id)}},"\u67E5\u770B")})):Ft.createElement("div",{style:{height:300,width:"100%"}}),Ft.createElement(wt.Z,{onClose:it,open:Ne}),Ce>15?Ft.createElement(bt.Z,{className:ie.pagination,current:Y,pageSize:15,total:Ce,onChange:le}):null)},x=n(13922),U=n(96599),z={desc:"desc___iOAgd",info:"info___GPALq",info_tag:"info_tag___CFEn8"},w=n(97231),V=n(59301);const lt={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u4E2D\u7B49",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var ue=({hack:i})=>{const{language:f,difficult:A,time_limit:Y,description:le}=i,[L]=(0,E.useSearchParams)(),De=lt[A];return V.createElement(V.Fragment,null,V.createElement("ul",{className:z.info},V.createElement("li",null,"\u7F16\u7A0B\u8BED\u8A00\xA0\xA0",V.createElement("b",{className:z.info_tag},f)),V.createElement("li",null,V.createElement("span",{className:"ml20"},"\u96BE\u5EA6"),"\xA0\xA0",V.createElement(U.default,{color:De==null?void 0:De.color},De==null?void 0:De.name)),V.createElement("li",null,V.createElement("span",{className:"ml20"},"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"),"\xA0\xA0",V.createElement("span",{style:{color:"#333333"}},Y,"\u79D2"))),L.get("qtype")==="8"?V.createElement(w.Z,{value:le,showProgramFill:!0,className:z.desc}):V.createElement(w.Z,{value:le,className:z.desc}))},Z={},de=n(59301),M=({hack:i,current_user:f})=>de.createElement("div",{className:Z.answer},i!=null&&i.answer_text?de.createElement(w.Z,{style:{padding:"13px 0"},value:(i==null?void 0:i.answer_text)||""}):de.createElement(x.Z,{customText:"\u6682\u672A\u8BBE\u7F6E\u53C2\u8003\u7B54\u6848~"})),q=n(27035);function Le(i,f){return(0,Ie.U2)(`/problems/${i}/comments.json`,{page:f,limit:10})}function P(i){return(0,Ie.v_)(`/discusses/${i}/plus.json`,{container_type:"Discuss",type:1})}function R(i,f,A){return(0,Ie.v_)(`/problems/${i}/comments/reply.json`,{comments:{content:A,parent_id:f}})}function s(i,f){return(0,Ie.v_)(`/problems/${i}/comments.json`,{comments:{content:f}})}function p(i,f,A){return(0,Ie.v_)(`/problems/${i}/comments/${f}/hidden.json`,A)}function h(i,f){return(0,Ie.IV)(`/problems/${i}/comments/${f}`)}var T=n(63386);function Ae({author:i}){return e.createElement("a",{href:`/users/${i.login}`,target:"_blank"},e.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ut.Z.IMG_SERVER}/images/${i.image_url}`,width:"50"}))}function he({data:i,index:f,parentDiscussIndex:A,user:Y,onSetActionType:le}){const{author:L,can_delete:De,content:Re,id:Ce,time:Ne}=i;function it(){le({id:Ce,index:f,type:"delete-discuss",parentDiscussIndex:A,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const He=Y.admin||De||L.user_id===Y.user_id;return e.createElement("div",{className:"discuss-item-container second-discuss "},e.createElement(Ae,{author:L}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${L.login}`,target:"_blank"},L.name),e.createElement("span",{className:"grey"},Ne),e.createElement("div",{className:"btn-group",style:{marginBottom:0}},He?e.createElement("a",{onClick:it,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null)),e.createElement(w.Z,{className:"discuss-content",value:Re})))}var Be=({user:i,data:f,index:A,onPlusDiscuss:Y,onSetActionType:le,activeDiscussIndex:L,onReplyDiscuss:De,onSetActiveDiscussIndex:Re})=>{const{content:Ce,children:Ne,hidden:it,id:He,praise_count:Ke,time:St,user_praise:Ot,can_delete:Ee,author:dn}=f;function Rt(){Re(He)}function rn(){Y(He,!Ot,A)}function An(){le({id:He,index:A,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function bn(){le({id:He,index:A,params:{hidden:it?"0":"1"},type:"hidden-discuss",message:it?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Un=i.admin||i.user_id===dn.user_id;return e.createElement("div",{className:"discuss-item-container",key:He},e.createElement(Ae,{author:dn}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${dn.login}`,target:"_blank"}," ",dn.name," "),e.createElement("span",{className:"grey"},St)),e.createElement(w.Z,{className:"discuss-content",value:Ce}),Ne&&Ne.length>0?e.createElement("div",{className:"reply-discuss-container"},Ne.map((un,hn)=>e.createElement(he,{key:un.id,data:un,index:hn,user:i,onSetActionType:le,parentDiscussIndex:A}))):null,e.createElement("div",{className:"btn-group"},Un?e.createElement("a",{onClick:bn,title:it?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.createElement("i",{className:it?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Ee&&(!Ne||Ne.length==0)?e.createElement("a",{onClick:An,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null,e.createElement("a",{onClick:Rt,title:"\u56DE\u590D"}," ",e.createElement("i",{className:"iconfont icon-huifu1"})," "),e.createElement("a",{onClick:rn,className:Ot?"c-orange":""},e.createElement("i",{className:Ot?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.createElement("span",null,Ke||""))),e.createElement(T.Z,{id:He,activeDiscussIndex:L,onReplyDiscuss:De})))},K=n(48775),be={"dis-input-editor-container":"dis-input-editor-container___nKGxx",active:"active___tmt7T","input-mask":"input-mask___epEle","text-area":"text-area___Vry8W","tip-container":"tip-container___plpA3",hide:"hide___kPfyC","md-container":"md-container___u85aq","btn-send":"btn-send___deQ5v"},vt=n(17949),en=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())}),qe=({user_praise:i,praise_count:f,praisePlus:A,onCreateDiscuss:Y,discuss_count:le})=>{const[L,De]=(0,e.useState)(!1),[Re,Ce]=(0,e.useState)("");function Ne(St){Ce(St)}function it(){De(!0)}function He(){De(!1)}function Ke(){return en(this,null,function*(){Y(Re),Ce(""),De(!1)})}return e.createElement("div",{className:`${be["dis-input-editor-container"]} ${L?be.active:""} `},e.createElement("div",{className:L?`hide ${be["text-area"]}`:be["text-area"]},e.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:it}),e.createElement("a",null," ",e.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",le," "),e.createElement("a",{className:"c-light-black",onClick:A,title:i?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},e.createElement("i",{className:`mr3 ${i?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),f?e.createElement("span",null,f):"")),L?e.createElement("div",{className:be["input-mask"],onClick:He}):null,e.createElement("div",{className:L?be["md-container"]:`${be["md-container"]} hide`},e.createElement(vt.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Re,height:240,onChange:Ne}),e.createElement("div",{className:be["tip-container"],onClick:He},e.createElement("a",{className:be["btn-send"],onClick:Ke}," \u53D1\u9001 "))))},pt=n(59301),qt=Object.defineProperty,xt=Object.defineProperties,Wt=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,At=(i,f,A)=>f in i?qt(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,jt=(i,f)=>{for(var A in f||(f={}))Dt.call(f,A)&&At(i,A,f[A]);if(tt)for(var A of tt(f))Lt.call(f,A)&&At(i,A,f[A]);return i},ln=(i,f)=>xt(i,Wt(f)),Bn=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())});const fn={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Mn=(i=>(i[i.GET_DISCUSSES=0]="GET_DISCUSSES",i[i.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",i[i.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",i[i.PLUS_DISCUSS=3]="PLUS_DISCUSS",i[i.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",i[i.SET_PAGE=5]="SET_PAGE",i[i.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",i))(Mn||{});function In(i,f){switch(f.type){case 6:return ln(jt({},i),{loading:!0});case 0:return jt(jt({},i),f.payload);case 1:return jt(jt({},i),f.payload);case 4:return jt(jt({},i),f.payload);case 3:return jt(jt({},i),f.payload);case 5:return ln(jt({},i),{page:f.payload});case 2:return jt(jt({},i),f.payload);default:throw new Error}}var sl=({user:i,identifier:f,hack:A,onTriggerPraise:Y,activeIndex:le})=>{const[L,De]=(0,e.useReducer)(In,fn),{loading:Re,page:Ce,data:Ne,count:it,actionType:He,activeDiscussIndex:Ke}=L,St=(0,e.useCallback)(()=>Bn(void 0,null,function*(){De({type:6});const un=yield Le(f,Ce),{comments:hn,disscuss_count:yn}=un;De({type:0,payload:{data:hn,count:yn,loading:!1}})}),[Ce,f]);(0,e.useEffect)(()=>{le==="2"&&St()},[f,Ce,le]);function Ot(un){De({type:5,payload:un})}function Ee(un){De({type:4,payload:{actionType:un}})}function dn(un){De(Ke===un?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:un}})}function Rt(un,hn,yn){return Bn(this,null,function*(){try{const jn=yield P(un);Ne[yn].user_praise=hn,Ne[yn].praise_count=jn.praise_count,De({type:3,payload:{data:[...Ne]}})}catch(jn){console.log(jn)}})}function rn(){return Bn(this,null,function*(){const{id:un,params:hn,type:yn,index:jn,parentDiscussIndex:Cn}=He;if(yn==="hidden-discuss"&&(yield p(f,un,hn),Cn?Ne[Cn].children[jn].hidden=hn.hidden==1:Ne[jn].hidden=hn.hidden==1,De({type:4,payload:{actionType:null,data:[...Ne]}})),yn==="delete-discuss"){if(yield h(f,un),Cn||Cn===0){let Qn=Ne[Cn].children;for(let Gn=Qn.length-1;Gn>=0;Gn--)if(Qn[Gn].id===un){Qn.splice(Gn,1);break}Ne[Cn].children=Qn}else for(let Qn=Ne.length-1;Qn>=0;Qn--)if(Ne[Qn].id===un){Ne.splice(Qn,1);break}De({type:4,payload:{actionType:null,data:[...Ne]}})}})}function An(){De({type:4,payload:{actionType:null}})}function bn(un,hn){return Bn(this,null,function*(){try{yield R(f,un,hn),St()}catch(yn){console.log(yn)}})}function Un(un){return Bn(this,null,function*(){De({type:6}),yield s(f,un),St()})}return pt.createElement(pt.Fragment,null,pt.createElement("div",{className:"discuss-panel"},Ne.length===0?pt.createElement(x.Z,null):Ne.map((un,hn)=>pt.createElement(Be,{onReplyDiscuss:bn,onPlusDiscuss:Rt,onSetActiveDiscussIndex:dn,onSetActionType:Ee,data:un,index:hn,user:i,activeDiscussIndex:Ke})),it>10?pt.createElement("div",{className:"pagination-container"},pt.createElement(bt.Z,{showQuickJumper:!0,onChange:Ot,current:Ce,total:it})):null),pt.createElement(qe,{user_praise:A.user_praise,praise_count:A.praises_count,praisePlus:Y,discuss_count:A.comments_count,onCreateDiscuss:Un}),pt.createElement(ye.Z,null,pt.createElement(D.default,{centered:!0,title:"\u63D0\u793A",open:!!He,onOk:rn,onCancel:An},pt.createElement("p",null,He?He.message:"")),pt.createElement(K.Z,null)))},cn=n(82326),tl=n(37568),gl=n(86743),cl={},Fl=n(59301),Zl=({hack:i,current_user:f})=>Fl.createElement("div",{className:cl.answer},i!=null&&i.analysis?Fl.createElement(w.Z,{style:{padding:"13px 0"},value:(i==null?void 0:i.analysis)||""}):Fl.createElement(x.Z,{customText:"\u6682\u672A\u8BBE\u7F6E\u9898\u76EE\u89E3\u6790~"})),Ul={hackSets:"hackSets___tw75g",collapseWrapper:"collapseWrapper___TteKi",panelHeader:"panelHeader___Y_Xjq",rateInput:"rateInput___y1qUi",open:"open___xrixP",close:"close___jb6D2",uploadTableWrapper:"uploadTableWrapper___U9Tz_"},au=n(8848),cu=n(5269),pl=n(28284),fu=n(1439),ql=n(87960),Bl=n(59301);const{TextArea:wu}=tl.default,{Panel:ot}=au.default;var Vt=({data:i,hack:f})=>(console.log(i,f,"data"),f!=null&&f.is_file?Bl.createElement(ql.Y2,{disabled:!0,className:Ul.uploadTableWrapper,showScore:!f.test_set_score,data:i,isProgramHomework:!0}):Bl.createElement("div",{className:Ul.hackSets},i==null?void 0:i.map((A,Y)=>Bl.createElement(au.default,{accordion:!0,bordered:!1,key:Y,defaultActiveKey:Y===0&&A.id,className:Ul.collapseWrapper,expandIcon:({isActive:le})=>Bl.createElement("i",{className:`iconfont icon-weizhankai ${le?Ul.open:Ul.close}`,style:{fontSize:14,transition:"all .2s"}})},Bl.createElement(ot,{key:A.id,header:Bl.createElement(pe.Z,{align:"middle",justify:"space-between",wrap:!1},Bl.createElement(cu.Z,{className:Ul.panelHeader},Bl.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Y+1)),Bl.createElement(cu.Z,{flex:1},Bl.createElement(pe.Z,{align:"middle",justify:"end",wrap:!1},!(f!=null&&f.test_set_score)&&Bl.createElement(cu.Z,{className:Ul.rateInput},Bl.createElement("span",{className:"mr20"},"\u8BC4\u5206\u5360\u6BD4"),Bl.createElement("div",null,Bl.createElement(pl.default.Item,{noStyle:!0},Bl.createElement(fu.Z,{value:A==null?void 0:A.score,className:Ul.baseFormItem,min:0,max:100,disabled:!0}))),Bl.createElement("span",{className:"ml10"},"%")))))},Bl.createElement(pl.default.Item,{label:"\u8F93\u5165",labelCol:{span:24}},Bl.createElement(wu,{readOnly:!0,value:A==null?void 0:A.input,rows:4})),Bl.createElement(pl.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24}},Bl.createElement(wu,{readOnly:!0,value:A==null?void 0:A.output,rows:4}))))))),ll={tabs:"tabs___p2jIb",tabWarp:"tabWarp___mt05L",tab:"tab___IYGdQ",active:"active___fQMlP",content:"content___GWVJY"},Sn=n(59301),dl=(0,e.forwardRef)(({data:i=[]},f)=>{var A;const[Y,le]=(0,e.useState)(),L=i.filter(Re=>Re.show);(0,e.useEffect)(()=>{L.length&&le(L[0].id)},[i==null?void 0:i.length]);const De=((A=L.find(Re=>Re.id===Y))==null?void 0:A.element)||null;return(0,e.useImperativeHandle)(f,()=>({setActiveTab:Re=>le(Re)})),Sn.createElement("div",{className:ll.tabs},Sn.createElement("div",{className:ll.tabWarp},L.map(Re=>Sn.createElement("div",{onClick:()=>le(Re.id),className:`${ll.tab} ${Re.id===Y?ll.active:""}`,key:Re.id},Re.name))),Sn.createElement("div",{className:ll.content},De))}),Ht=n(59301),Al=Object.defineProperty,Sl=Object.defineProperties,Xn=Object.getOwnPropertyDescriptors,nl=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Yu=Object.prototype.propertyIsEnumerable,Au=(i,f,A)=>f in i?Al(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,Vu=(i,f)=>{for(var A in f||(f={}))Ol.call(f,A)&&Au(i,A,f[A]);if(nl)for(var A of nl(f))Yu.call(f,A)&&Au(i,A,f[A]);return i},ju=(i,f)=>Sl(i,Xn(f)),Ql=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())});const ba={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Zu={1:"#2fa34f",2:"#0152d9",3:"#fa6400"};var Ha=({hack:i,onTriggerPraise:f,topicId:A,page:Y,onPageChange:le,user:L,current_user:De,submitRecords:Re,submitting:Ce,submitResult:Ne,setActiveIndex:it,hack_sets:He})=>{var Ke,St;const[Ot]=(0,E.useSearchParams)(),[Ee,dn]=(0,e.useState)("0"),Rt=(0,E.useLocation)(),[rn,An]=(0,e.useState)(!1),[bn,Un]=(0,e.useState)(null),[un,hn]=(0,e.useState)([]),[yn,jn]=(0,e.useState)([]),[Cn,Qn]=(0,e.useState)({page:1,limit:10}),Gn=(0,e.useRef)(null),vl=(0,e.useRef)(null);console.log(L,"user");let[pn,rl]=(0,e.useState)(ju(Vu({},(0,E.useParams)()),{page:1,per_page:20,name:""}));(0,e.useEffect)(()=>{vl.current&&(i==null?void 0:i.is_close_tips)===!1&&bn===null&&Un(!0)},[vl.current,i==null?void 0:i.is_close_tips,bn]);function Zn(){return Ql(this,null,function*(){yield(0,Ie.ZP)("/api/users/close_tips.json",{method:"post"})})}(0,e.useEffect)(()=>{it(Ee)},[Ee]);function Dn(xn){return Ql(this,null,function*(){let qn=xn.target.id;if(qn==="1"){let En=yield(0,Ie.ZP)(`/api/myproblems/${pn.id}/redo_logs.json`,{method:"get",params:Vu({},Cn)});(En==null?void 0:En.status)===0&&jn(En==null?void 0:En.data)}dn(qn)})}(0,e.useEffect)(()=>q.Z.subscribe("to-commit-info",()=>{dn("1"),Gn.current&&Gn.current.setActiveTab("1")}),[]),(0,e.useEffect)(()=>q.Z.subscribe("to-reset-info",()=>{Dn({target:{id:"1"}}),Gn.current&&Gn.current.setActiveTab("2")}),[]);function Tn(){dn("2")}function Ln(){return Ql(this,null,function*(){let xn=yield(0,Ie.ZP)("/api/problems/my_hack_list.json",{method:"get",params:Vu({identifier:pn==null?void 0:pn.id},pn)});hn(xn)})}const fl=[{title:null,description:Ht.createElement("div",null,Ht.createElement("b",{onClick:()=>{Un(!1),Zn(),An(!0),Ln()},className:"c-light-primary font16 current"},"\u67E5\u770B\u9898\u76EE\u5217\u8868\u5165\u53E3"),Ht.createElement("div",{className:"c-grey-333 mt10 mb20"},"\u672C\u6B21\u4F5C\u4E1A\u6240\u9700\u5B8C\u6210\u7684\u8BD5\u9898\u90FD\u53EF\u4EE5\u5728\u8FD9\u91CC\u627E\u5230\uFF0C\u5E76\u652F\u6301\u70B9\u51FB\u8BD5\u9898\u8C03\u6574\u5230\u505A\u9898\u9875"),Ht.createElement(S.ZP,{onClick:()=>{Un(!1),Zn()},style:{padding:"2px 29px",height:30,float:"right"},type:"primary"},"\u77E5\u9053\u4E86")),target:()=>vl.current}];return Ht.createElement("div",{className:j["left-panel"]},Ht.createElement("ul",{className:`${j["s-navs"]} ${j["bg-white"]} ${j.b1}`},(i==null?void 0:i.is_program)&&!Ot.get("pageId")&&Ht.createElement(Pe.Z,{title:"\u9898\u76EE\u5217\u8868"},Ht.createElement("div",{onClick:()=>{Ln(),An(!0)},className:j.btns,ref:vl,style:bn?{pointerEvents:"none"}:{}},Ht.createElement("i",{className:"iconfont icon-yidongdaomulu1 font14 c-white"}))),Ht.createElement("li",{style:{marginLeft:20}},Ht.createElement("a",{className:Ee==="0"?j.active:"",id:"0",onClick:Dn},"\u9898\u76EE\u63CF\u8FF0")),Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="1"?j.active:"",id:"1",onClick:Dn},"\u64CD\u4F5C\u8BB0\u5F55")),(Ot.get("type")!=="exercises"&&(i==null?void 0:i.answer_text_show)||Ot.get("type")!=="exercises"&&(i==null?void 0:i.analysis_show))&&Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="4"?j.active:"",id:"4",onClick:Dn},"\u89E3\u7B54\u53C2\u8003")),Ot.get("type")!=="exercises"&&Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="2"?j.active:"",id:"2",onClick:Dn},"\u8BC4\u8BBA")),!!(He!=null&&He.length)&&Ot.get("type")!=="exercises"&&Ot.get("type")!=="1"&&Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="5"?j.active:"",id:"5",onClick:Dn},"\u6D4B\u8BD5\u7528\u4F8B"))),Ht.createElement("div",{className:`${j["tab-panel-body"]} ${Ee==="0"?"":"hide"}`,style:{borderRight:"1px #dddddd solid",padding:0}},Ht.createElement(ue,{hack:i,onTriggerPraise:f,toDiscuss:Tn})),Ht.createElement("div",{style:{padding:"12px"},className:`${j["tab-panel-body"]} ${Ee==="1"?"":"hide"}`},Ht.createElement(dl,{ref:Gn,data:[{id:"1",show:Ot.get("qtype")!=="8",name:"\u63D0\u4EA4\u8BB0\u5F55",element:Ht.createElement(Ht.Fragment,null,Re!=null&&Re.records_count||Ce?Ht.createElement(Ye,{page:Y,onPageChange:le,topicId:A,submitting:Ce,key:(Ne==null?void 0:Ne.id)||1,submitRecords:Re,submitResult:Ne}):Ht.createElement(x.Z,null))},{id:"2",show:Ot.get("type")==="exercises"||(i==null?void 0:i.homework_common_id),name:"\u91CD\u7F6E\u8BB0\u5F55",element:Ht.createElement(Ht.Fragment,null,Ht.createElement(xe.default,{pagination:!1,dataSource:yn==null?void 0:yn.list,columns:[{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801\u65F6\u95F4",dataIndex:"created_at",render:(xn,qn,En)=>Te()(xn).format("YYYY-MM-DD HH:mm:ss")},{title:"\u64CD\u4F5C\u4EBA",dataIndex:"operator"},{title:"\u64CD\u4F5C",dataIndex:"redo_type",render:(xn,qn,En)=>{var Yn;return(Yn=[{id:1,name:"\u6253\u56DE\u91CD\u505A"},{id:2,name:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"},{id:3,name:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"}].find(Gt=>Gt.id===xn))==null?void 0:Yn.name}}]}),Ht.createElement(bt.Z,{style:{marginTop:10},current:Cn.page,total:yn==null?void 0:yn.count,hideOnSinglePage:!0,onChange:xn=>Ql(void 0,null,function*(){Cn.page=xn,Qn(Cn);let qn=yield(0,Ie.ZP)(`/api/myproblems/${pn.id}/redo_logs.json`,{method:"get",params:ju(Vu({},Cn),{courseId:pn.courseId})});(qn==null?void 0:qn.status)===0&&jn(qn==null?void 0:qn.data)})}))}]})),Ht.createElement("div",{style:{padding:"12px"},className:`${j["tab-panel-body"]} ${Ee==="4"?"":"hide"}`},Ht.createElement(dl,{data:[{id:"1",show:Ot.get("type")!=="exercises"&&(i==null?void 0:i.answer_text_show),name:"\u7B54\u6848",element:Ht.createElement(Ht.Fragment,null,Ht.createElement(M,{hack:i,current_user:De}))},{id:"2",show:Ot.get("type")!=="exercises"&&(i==null?void 0:i.analysis_show),name:"\u89E3\u6790",element:Ht.createElement(Ht.Fragment,null,Ht.createElement(Zl,{hack:i,current_user:De}))}]})),Ht.createElement("div",{className:`${j["tab-panel-body"]} ${Ee==="2"?"":"hide"}`,style:{padding:0}},Ht.createElement(sl,{user:L,activeIndex:Ee,identifier:i.identifier,hack:i,onTriggerPraise:f})),Ht.createElement("div",{className:`${j["tab-panel-body"]} ${Ee==="5"?"":"hide"}`,style:{padding:12}},Ht.createElement(Vt,{data:He||[],hack:i})),Ht.createElement(G.Z,{rootClassName:j.drawer,closable:!1,title:null,bodyStyle:{background:"#1B2333",padding:25,display:"flex",flexDirection:"column"},footer:null,width:500,placement:"left",onClose:()=>An(!1),open:rn},Ht.createElement(pe.Z,null,Ht.createElement("b",{style:{color:"#008CFF",fontWeight:500,lineHeight:"19px"},className:"font16"},"\u9898\u76EE\u5217\u8868"),Ht.createElement("span",{style:{color:"#FA8D30",fontWeight:500},className:"font12 ml10"},"\u5171",un==null?void 0:un.total_count,"\u9898\xA0[\xA0",un==null?void 0:un.total_score,"\u5206\xA0]\xA0"),!(L!=null&&L.hack_manager)&&Ht.createElement("span",{style:{color:"#FA8D30",fontWeight:500,marginLeft:"auto"},className:"font12"},"\u6211\u7684\u5F97\u5206\xA0:\xA0",un==null?void 0:un.work_score,"\u5206")),Ht.createElement("div",{style:{height:1,background:"#1C313F",marginTop:12}}),Ht.createElement(pe.Z,{align:"middle",className:"mt10 mb10"},!(L!=null&&L.hack_manager)&&Ht.createElement(cn.default,{size:"large",className:"mr10",style:{width:104},placeholder:"\u901A\u8FC7\u60C5\u51B5",onChange:xn=>{pn.page=1,pn.finish_status=xn,rl(Vu({},pn)),Ln()}},Ht.createElement(cn.default.Option,{value:""},"\u5168\u90E8"),Ht.createElement(cn.default.Option,{value:0},"\u672A\u5F00\u59CB"),Ht.createElement(cn.default.Option,{value:1},"\u8FDB\u884C\u4E2D"),Ht.createElement(cn.default.Option,{value:2},"\u5DF2\u5B8C\u6210")),Ht.createElement(cn.default,{size:"large",className:"mr10",style:{width:104},placeholder:"\u9898\u76EE\u96BE\u5EA6",onChange:xn=>{pn.page=1,pn.difficult=xn||null,rl(Vu({},pn)),Ln()}},Ht.createElement(cn.default.Option,{value:0},"\u5168\u90E8"),Ht.createElement(cn.default.Option,{value:1},"\u7B80\u5355"),Ht.createElement(cn.default.Option,{value:2},"\u9002\u4E2D"),Ht.createElement(cn.default.Option,{value:3},"\u56F0\u96BE")),Ht.createElement(tl.default.Search,{size:"large",onSearch:xn=>{pn.name=xn,pn.page=1,rl(Vu({},pn)),Ln()},style:{flex:1},placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u8FDB\u884C\u641C\u7D22"})),Ht.createElement("div",{className:j.list,style:{height:36,background:"#3D445C"}},!(L!=null&&L.hack_manager)&&Ht.createElement("span",null,"\u72B6\u6001"),Ht.createElement("span",null,"\u5E8F\u53F7"),Ht.createElement("span",{style:{flex:1}},"\u9898\u76EE\u540D\u79F0"),Ht.createElement("span",{style:{flexBasis:48,paddingRight:0}},"\u96BE\u5EA6")),Ht.createElement("div",{style:{overflow:"auto",flex:1}},(Ke=un==null?void 0:un.data)!=null&&Ke.length?(St=un==null?void 0:un.data)==null?void 0:St.map((xn,qn)=>Ht.createElement("div",{onClick:()=>Ql(void 0,null,function*(){let En=yield(0,Ie.ZP)(`/api/problems/${xn==null?void 0:xn.identifier}/start.json`,{method:"get",params:{hack_user_id:L==null?void 0:L.user_id}});En&&(E.history.replace(`/myproblems/${En==null?void 0:En.identifier}${window.location.search}`),window.location.reload())}),className:`${j.list} ${xn!=null&&xn.checked?j.active:""}`},!(L!=null&&L.hack_manager)&&Ht.createElement(Ht.Fragment,null,!(xn!=null&&xn.opened)&&Ht.createElement("span",{style:{color:"#E02020"}},"\u672A\u5F00\u59CB"),(xn==null?void 0:xn.opened)&&!(xn!=null&&xn.passed)&&Ht.createElement("span",{style:{color:"#FA6400"}},"\u8FDB\u884C\u4E2D"),(xn==null?void 0:xn.opened)&&(xn==null?void 0:xn.passed)&&Ht.createElement("span",{style:{color:"#24C074"}},"\u5DF2\u5B8C\u6210")),Ht.createElement("span",null,(pn.page-1)*20+(qn+1)),Ht.createElement("span",{style:{flex:1},title:xn.name},`[${xn==null?void 0:xn.score}\u5206]`,"\xA0",xn.name),Ht.createElement("span",{style:{flexBasis:48,paddingRight:0}},ba[xn.difficult]))):Ht.createElement(x.Z,null)),Ht.createElement(bt.Z,{current:pn.page,className:"mt20",hideOnSinglePage:!0,total:un==null?void 0:un.count,pageSize:pn.per_page,onChange:(xn,qn)=>{pn.page=xn,pn.per_page=qn,Ln()}})),Ht.createElement(gl.Z,{rootClassName:j.tour,closeIcon:!1,open:!!bn,steps:fl,gap:{offset:3,radius:2}}))},yl=n(62522),ta=n(2398),zn=n(7605),Fa=n(58382),yu=n(46553),Cu=n(50601),El=n(89517),Rl=n(92310),Tu=n.n(Rl),Su=n(38241),bu=n(20310),ma=n(81779),ra=n(96345),Ua=n(62595),Qa=n(14699),gn=n(59301),tr=Object.defineProperty,va=Object.defineProperties,rr=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,I=(i,f,A)=>f in i?tr(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,$=(i,f)=>{for(var A in f||(f={}))v.call(f,A)&&I(i,A,f[A]);if(Ba)for(var A of Ba(f))y.call(f,A)&&I(i,A,f[A]);return i},ze=(i,f)=>va(i,rr(f)),Je=(i,f)=>{var A={};for(var Y in i)v.call(i,Y)&&f.indexOf(Y)<0&&(A[Y]=i[Y]);if(i!=null&&Ba)for(var Y of Ba(i))f.indexOf(Y)<0&&y.call(i,Y)&&(A[Y]=i[Y]);return A},a=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())});const{Countdown:N}=C.default,re={Java:"java",C:"c",Python:"py","C++":"c"};var je=(i=>(i[i.SET_LOADING=0]="SET_LOADING",i[i.GET_DATA=1]="GET_DATA",i[i.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",i[i.SET_DATA=3]="SET_DATA",i[i.SET_DEBUGING=4]="SET_DEBUGING",i[i.SET_SUBMITING=5]="SET_SUBMITING",i[i.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",i[i.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",i[i.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",i[i.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",i[i.SET_PAGE=10]="SET_PAGE",i))(je||{});function ee(){return new Date().getTime()}const t={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function d(i,f){switch(f.type){case 1:return $($({},i),f.payload);case 3:return ze($({},i),{data:f.payload});case 0:return ze($({},i),{loading:f.payload});case 9:return ze($({},i),{showNote:f.payload});case 4:return ze($({},i),{debuging:f.payload});case 5:return ze($({},i),{submitting:f.payload});case 2:return ze($({},i),{submitRecords:f.payload});case 10:return ze($({},i),{submitRecordPage:f.payload});case 6:return ze($({},i),{executingMessage:f.payload});case 7:return $($({},i),f.payload);case 8:return $($({},i),f.payload);default:throw new Error}}var c=({children:i})=>{var f,A,Y,le,L,De,Re,Ce,Ne,it;const[He,Ke]=(0,e.useReducer)(d,t),{id:St}=(0,E.useParams)(),Ot=(0,E.useLocation)(),[Ee]=(0,E.useSearchParams)(),{loading:dn,data:Rt,debugResult:rn,submitResult:An,submitRecords:bn,submitRecordPage:Un,showNote:un,debuging:hn,submitting:yn,executingMessage:jn}=He,[Cn,Qn]=(0,e.useState)("#37AD83"),[Gn,vl]=(0,e.useState)(null),[pn,rl]=(0,e.useState)({}),[Zn,Dn]=(0,e.useState)(!0),[Tn,Ln]=(0,e.useState)(!1),[fl,xn]=(0,e.useState)(!1),qn=(0,e.useRef)(null),En=(0,e.useRef)(0),Yn=Rt==null?void 0:Rt.user,Gt=Rt==null?void 0:Rt.hack,[kl,Il]=(0,e.useState)(!1),ul=(0,e.useRef)(1),jl=(0,e.useRef)(!1);(0,Su.y)(Ee.get("type")==="exercises");const{setOpenDisableCopyAndPaste:hu}=(0,Su.X)(),[hl,zt]=(0,e.useState)(""),Tl=(0,yu._)(pn),[gu,ru]=(0,e.useState)({open:!1,text:""}),[Hl,Yl]=(0,e.useState)(null),Fu=(0,e.useRef)(null);(0,e.useEffect)(()=>{var Fn;let kn=(Fn=Gt==null?void 0:Gt.homework_extension)==null?void 0:Fn.failed_evaluate_num;typeof kn=="number"&&Yl(kn)},[(f=Gt==null?void 0:Gt.homework_extension)==null?void 0:f.failed_evaluate_num]),(0,e.useEffect)(()=>{function Fn(){return a(this,null,function*(){var kn,_u,na,Ea,sa;Dn(!0);const ua=yield(0,H.fu)(St,{exercise_id:Ee.get("exercisesId")});if(setTimeout(()=>{Dn(!1)},800),ua.status!==401){try{ua.hack.code=ke.Base64.decode(ua.hack.code)}catch(Mu){console.log(Mu)}ua.hack=ze($({},ua.hack),{is_program:Ee.get("type")==="1"}),Ke({type:1,payload:{loading:!1,data:ua}})}if(Ee.get("type")==="exercises"){if(window.self===window.top){window.top.location.href="/";return}let Mu;Ee.get("coursesId")=="coursesId"?Mu=yield(0,o._F)({categoryId:Ee.get("exercisesId"),login:Ee.get("login")}):Mu=yield(0,o._B)({categoryId:Ee.get("exercisesId"),login:Ee.get("login")}),rl($({},Mu)),hu((kn=Mu==null?void 0:Mu.exercise)==null?void 0:kn.forbid_copy),typeof((_u=Mu==null?void 0:Mu.exercise)==null?void 0:_u.left_time)=="number"&&(vl(Date.now()+((na=Mu==null?void 0:Mu.exercise)==null?void 0:na.left_time)*1e3),setTimeout(()=>{Qn("red")},(((Ea=Mu==null?void 0:Mu.exercise)==null?void 0:Ea.left_time)-300>0?((sa=Mu==null?void 0:Mu.exercise)==null?void 0:sa.left_time)-300:0)*1e3))}})}St&&Fn()},[St]),(0,e.useEffect)(()=>{var Fn;return Ee.get("type")==="exercises"&&((Fn=pn==null?void 0:pn.exercise)!=null&&Fn.screen_open)&&(window.removeEventListener("blur",zu,!1),Cu.U.forEach((kn,_u)=>{window.addEventListener(kn,zu,!1)}),window.addEventListener("blur",zu,!1),window.focus()),()=>{document.removeEventListener((0,k.gH)(),zu)}},[pn]),(0,e.useEffect)(()=>{hl==="1"&&St&&Gt!=null&&Gt.language&&lu()},[St,Un,Gt==null?void 0:Gt.language,hl]),(0,e.useEffect)(()=>(Gt!=null&&Gt.is_program&&(En.current=0,qn.current=setInterval(()=>{Bu()},15e3)),()=>{clearInterval(qn.current)}),[Gt==null?void 0:Gt.is_program]);const Bu=()=>a(void 0,null,function*(){let Fn=yield(0,Ie.ZP)(`/api/myproblems/${St}/save_long_time.json`,{method:"get",params:{answer_long_time:En.current}})}),zu=()=>{jl.current||(0,k.BU)(),window.parent.postMessage("backExercise","*")};function lu(){return a(this,null,function*(){try{const Fn=yield(0,H.zO)(St,{limit:15,page:Un,language:Gt==null?void 0:Gt.language});Ke({type:2,payload:Fn})}catch(Fn){console.log(Fn)}})}function fa(Fn){Ke({type:10,payload:Fn})}function iu(Fn){return a(this,null,function*(){var kn;let _u;(Ee.get("ip_limit")==="inner"||Ee.get("ip_bind_type")==="true")&&(_u=yield(0,ta.y)({ip_limit:Ee.get("ip_limit"),ip_bind:Ee.get("ip_bind_type")==="true"}));const na=yield(0,H.n4)(St,{code:ke.Base64.encode(Fn||Gt.code),language:Gt==null?void 0:Gt.language,exercise_id:Ee.get("exercisesId"),question_id:Ee.get("questionId"),ip:_u});return na.status===-5&&(0,E.getDvaApp)()._store.dispatch({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:ze($({errorMessage:na==null?void 0:na.message},(pn==null?void 0:pn.exercise)||{}),{exercise_user_id:(kn=pn==null?void 0:pn.exercise)==null?void 0:kn.exercise_user_id,id:Ee.get("exercisesId")})}}),na})}function Gl(){return a(this,null,function*(){if(ul.current=2,!yn){Ke({type:5,payload:!0});try{q.Z.publish("to-commit-info");const Fn=yield iu();if(console.log(Fn,1),Fn.status===0){let ua=function(){return a(this,null,function*(){const{status:Mu,data:La}=yield(0,H.rX)(St,"submit"),vr=ee()-sa>(na*Ea+3)*1e3;if(Mu!==0&&!vr&&setTimeout(ua,1e3),vr){D.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Ke({type:5,payload:!1});return}if(Mu===0){La.status===2&&D.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),(La==null?void 0:La.status)===0&&Ee.get("type")==="1"&&xn(!0),(La==null?void 0:La.status)!==0&&Ee.get("type")==="1"&&Yl(no=>no+1);const Ir=yield(0,H.zO)(St,{limit:15,page:Un,language:Gt==null?void 0:Gt.language});Ke({type:8,payload:ze($({},He),{submitResult:La,submitting:!1,submitRecords:Ir})})}})},kn={};if(Ee.get("type")==="exercises"?(kn.extras={exercise_id:Ee.get("exercisesId"),question_id:Ee.get("questionId")},(Ee.get("ip_limit")==="inner"||Ee.get("ip_bind_type")==="true")&&(kn.extras.ip=yield(0,ta.y)({ip_limit:Ee.get("ip_limit"),ip_bind:Ee.get("ip_bind_type")==="true"}))):Ee.get("type")==="smartPlan"&&(kn.extras={smart_plan_page_item_bank_id:Ee.get("smartPlanItemBankId"),simulate:Ee.get("simulate")==="true"}),(yield(0,H.bM)(St,kn)).status===-1&&Ee.get("exercisesId")){window.parent.location.href=`/classrooms/${Ee.get("coursesId")}/exercise/${Ee.get("exercisesId")}/detail`;return}const{time_limit:na,test_case_size:Ea}=Gt,sa=ee();ua()}else Ke({type:5,payload:!1})}catch(Fn){console.log(Fn),Ke({type:5,payload:!1})}Il(!1)}})}function du(){return a(this,null,function*(){ul.current=1,He.debuging=!0,Ke({type:4,payload:!0});try{if((yield iu()).status===0){let sa=function(){return a(this,null,function*(){const{status:ua,message:Mu,data:La}=yield(0,H.rX)(St,"debug"),vr=ee()-Ea>(kn+3)*1e3;if(ua!==0&&!vr&&(Ke({type:6,payload:Mu}),setTimeout(sa,1e3)),vr){D.default.error({title:"\u63D0\u793A",centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Ke({type:4,payload:!1}),Ke({type:7,payload:ze($({},He),{debugResult:{status:2},debuging:!1})});return}ua===0&&(La.status===2&&D.default.error({title:"\u63D0\u793A",centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Ke({type:4,payload:!1}),Ke({type:7,payload:ze($({},He),{debugResult:La,debuging:!1})}))})};const{time_limit:kn}=Gt;let _u={input:encodeURIComponent(Rt.test_case.input)};if(Ee.get("type")==="exercises"&&(_u.exercise_id=Ee.get("exercisesId")),(yield(0,H.MU)(St,_u)).status===-1&&Ee.get("exercisesId")){window.parent.location.href=`/classrooms/${Ee.get("coursesId")}/exercise/${Ee.get("exercisesId")}/detail`;return}const Ea=ee();sa()}else Ke({type:4,payload:!1})}catch(Fn){console.log(Fn)}finally{}})}function Hu(Fn,kn){const _u=kn?{modify_code:!1}:{};Ke({type:3,payload:ze($({},Rt),{hack:$(ze($({},Gt),{code:Fn}),_u)})}),Il(!0)}const il=Fn=>a(void 0,null,function*(){let kn=yield(0,Ie.ZP)(`/api/problems/${Gt==null?void 0:Gt.identifier}/start.json`,{method:"get",params:{language:Fn==="C++"||Fn==="c++"?encodeURIComponent(Fn):Fn,hack_user_id:Yn==null?void 0:Yn.user_id}});kn.status!==-1&&E.history.replace(`/myproblems/${kn==null?void 0:kn.identifier}${window.location.search}`)});function Gu(Fn){let kn=Fn.target.value;Ke({type:3,payload:ze($({},Rt),{test_case:{input:kn}})})}function Jn(){return a(this,null,function*(){try{let Fn={};Ee.get("type")==="exercises"?Fn.exercise_id=Ee.get("exercisesId"):Gt!=null&&Gt.homework_common_id&&(Fn.homework_common_id=Gt==null?void 0:Gt.homework_common_id);const kn=yield(0,H.H7)(St,$({},Fn));kn.status===401||(Hu(ke.Base64.decode(kn.code)),(Ee.get("type")==="exercises"||Gt!=null&&Gt.homework_common_id)&&q.Z.publish("to-reset-info"))}catch(Fn){console.log(Fn)}})}function Vn(){D.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:gn.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",gn.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return a(this,null,function*(){const Fn=yield(0,H.fi)(St);Fn.status===401||Hu(ke.Base64.decode(Fn.code),!0)})}})}function bl(){Ke({type:9,payload:!0})}function Nn(){Ke({type:9,payload:!1})}function Kn(Fn){return a(this,null,function*(){yield(0,H.MK)(St,Fn),Ke({type:1,payload:{showNote:!1,data:ze($({},Rt),{hack:ze($({},Gt),{notes:Fn.notes})})}})})}const Lu={hack:Gt,isLoading:Zn,input:(A=Rt==null?void 0:Rt.test_case)==null?void 0:A.input,is_file:(Y=Rt==null?void 0:Rt.test_case)==null?void 0:Y.is_file,identifier:Gt==null?void 0:Gt.identifier,attachments_count:Rt==null?void 0:Rt.attachments_count,language:Gt==null?void 0:Gt.language,code:Gt==null?void 0:Gt.code,title:"main."+re[Gt==null?void 0:Gt.language],modify_code:Gt==null?void 0:Gt.modify_code,notes:Gt==null?void 0:Gt.notes,debugResult:rn,debuging:hn,submitting:yn,submitResult:An,executingMessage:jn,onCancelNote:Nn,onAddNote:Kn,showNote:un,user:Yn,onShowNote:bl,onSubmitCode:Gl,onChangeCode:Hu,onChangeInput:Gu,onDebugCode:du,onResetCode:Jn,onSyncCode:Vn,onUpdateCode:iu,onChangeLanguage:il,isWhiteTheme:Tn,setIsWhiteTheme:Ln,topDispatch:Ke};function Kl(){return a(this,null,function*(){const{praise_count:Fn}=yield(0,H.vl)(Gt.id,{container_type:"Hack",type:1});let kn=ze($({},Rt),{hack:ze($({},Gt),{praises_count:Fn,user_praise:!Gt.user_praise})});Ke({type:3,payload:kn})})}const Uu={topicId:St,submitResult:An,submitRecords:bn,submitting:yn,page:Un,onPageChange:fa,hack:Gt,user:Rt==null?void 0:Rt.user,hack_sets:Rt==null?void 0:Rt.hack_sets,current_user:Rt==null?void 0:Rt.current_user,onTriggerPraise:Kl,setActiveIndex:zt};console.log(pn);const[Iu,Ku]=(0,e.useState)(!1),[Ga,wa]=(0,e.useState)(!1);(0,e.useEffect)(()=>{const Fn=kn=>{var _u,na;if(console.log("event-----",kn),kn.data.type==="showIntelligentTeacherStatus"&&!((na=(_u=kn==null?void 0:kn.data)==null?void 0:_u.SmartPlanItemBanks)!=null&&na.allow_answer_after_end)){const{aiStatus:Ea,questionStatus:sa}=kn.data;if(Ku(Ea),sa){let ua=JSON.parse(localStorage.getItem("smartPlanProgramIds")||"[]");if(ua.includes(Ee.get("smartPlanItemBankId")))return;D.default.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:gn.createElement("div",{className:"tc font16"},sa?"\u8001\u5E08\u5DF2\u7ED3\u675F\u7B54\u9898":"\u8001\u5E08\u5DF2\u7ED3\u675F\u6388\u8BFE","\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u4E86\u3002"),onOk:()=>a(void 0,null,function*(){Gl(),localStorage.setItem("smartPlanProgramIds",JSON.stringify(ua.push(Ee.get("smartPlanItemBankId"))));let Mu="";Ee.get("isMiniprogram")?Mu=`/miniprogram/courseware/study?courses_id=${Ee.get("coursesId")}&id=${Ee.get("exercisesId")}`:Mu=`/classrooms/${Ee.get("coursesId")}/smart_plan/${Ee.get("exercisesId")}/ppt_info/info`,window.opener?window.close():E.history.push(Mu)})})}}if(kn.data.type=="closeIntelligentTeacherStatus"){Gl();let Ea="";Ee.get("isMiniprogram")?Ea=`/miniprogram/courseware/study?courses_id=${Ee.get("coursesId")}&id=${Ee.get("exercisesId")}`:Ea=`/classrooms/${Ee.get("coursesId")}/smart_plan/${Ee.get("exercisesId")}/ppt_info/info`,window.opener?window.close():E.history.push(Ea)}};return window.addEventListener("message",Fn),()=>{window.removeEventListener("message",Fn)}},[]);const ga=()=>{if(Ee.get("type")==="exercises")return!1;const Fn=Object.entries((Gt==null?void 0:Gt.homework_extension)||{}).some(([kn,_u])=>kn!=="ai_code_evaluation_promote"&&!!_u);return!!(Ee.get("type")==="1"&&((0,ma.$O)()||Fn)||Ee.get("type")==="smartPlan"&&(Iu||Ee.get("showAi")))};return(0,e.useEffect)(()=>{var Fn,kn,_u,na,Ea,sa,ua;ga()&&(Hl>((kn=(Fn=Gt==null?void 0:Gt.homework_extension)==null?void 0:Fn.ai_guide_data)==null?void 0:kn.evaluation_num)&&ru({open:!0,text:(na=(_u=Gt==null?void 0:Gt.homework_extension)==null?void 0:_u.ai_guide_data)==null?void 0:na.evaluation_msg}),(Ea=Gt==null?void 0:Gt.homework_extension)!=null&&Ea.ai_guide&&Hl==0&&!Fu.current&&(Fu.current=setTimeout(()=>{var Mu,La;ru({open:!0,text:(La=(Mu=Gt==null?void 0:Gt.homework_extension)==null?void 0:Mu.ai_guide_data)==null?void 0:La.unanswered_msg})},(((ua=(sa=Gt==null?void 0:Gt.homework_extension)==null?void 0:sa.ai_guide_data)==null?void 0:ua.unanswered_time)||0)*60*1e3)),Fu.current&&Hl>0&&clearTimeout(Fu.current))},[Hl,Gt]),gn.createElement(gn.Fragment,null,gn.createElement(ae.Z,{spinning:dn,delay:500},Rt?gn.createElement("div",{style:{minWidth:"1200px"}},gn.createElement("header",{className:Tu()(El.Z.header,Tn&&El.Z.whiteHeader)},!((le=["smartPlan","exercises"])!=null&&le.includes(Ee.get("type")))&&gn.createElement("div",null,gn.createElement("img",{src:`${ut.Z.IMG_SERVER}/images/${Yn==null?void 0:Yn.image_url}`,alt:"user",width:36}),gn.createElement("span",{style:{color:Tn?"#333":"#B2BACB",fontSize:16}},Yn==null?void 0:Yn.name)),((L=["smartPlan","exercises"])==null?void 0:L.includes(Ee.get("type")))&&gn.createElement("div",null,gn.createElement("div",{className:"exercise_user_info"},"\u59D3\u540D",gn.createElement("span",{className:"ml10"},((De=pn==null?void 0:pn.exercise)==null?void 0:De.user_name)||(Yn==null?void 0:Yn.name)||"--")),gn.createElement("div",{className:"exercise_user_info ml30"},"\u5B66\u53F7",gn.createElement("span",{className:"ml10"},((Re=pn==null?void 0:pn.exercise)==null?void 0:Re.student_id)||(Yn==null?void 0:Yn.student_id)||"--"))),gn.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},gn.createElement("div",null,Gt.name)),(Ee.get("type")==="smartPlan"||(Gt==null?void 0:Gt.is_program))&&gn.createElement(zn.Z,{defaultValue:(Gt==null?void 0:Gt.answer_long_time)||0,onChange:Fn=>{En.current=Fn},className:El.Z.timepiece}),Yn!=null&&Yn.hack_manager&&!Ee.get("is_smart_plan")?gn.createElement(E.Link,{className:El.Z.btn_edit,to:Ee.get("type")==="1"?Ee.get("pageId")?`/problems/newedit/${Gt.identifier}?type=1&pageId=${Ee.get("pageId")}&backUrl=${Ee.get("backUrl")}`:`/problems/newedit/${Gt.identifier}?type=1`:Ee.get("backUrl")?`/problems/newedit/${Gt.identifier}?backUrl=${Ee.get("backUrl")}`:`/problems/newedit/${Gt.identifier}`}," ",gn.createElement("i",{className:"iconfont icon-bianji13 font14 mr5"})," \u7F16\u8F91"):null,!!((Ce=pn==null?void 0:pn.exercise)!=null&&Ce.left_time)&&gn.createElement(gn.Fragment,null,gn.createElement("span",{style:{color:Cn,marginRight:6},className:`iconfont icon-daojishi ${El.Z.djs}`}),gn.createElement("span",{className:"c-white mr20"},gn.createElement(N,{valueStyle:{color:Cn,fontSize:20,fontWeight:500},title:gn.createElement("span",{style:{color:Cn,fontSize:14,marginRight:10},className:"time"},"\u5269\u4F59\u7B54\u9898\u65F6\u957F"),value:Gn,onFinish:()=>a(void 0,null,function*(){const Fn=yield(0,o.VL)({categoryId:Ee.get("exercisesId"),commit_method:2});if((Fn==null?void 0:Fn.status)===0&&(iu(),D.default.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:gn.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",gn.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:()=>a(void 0,null,function*(){window.parent.location.href=`/classrooms/${Ee.get("coursesId")}/exercise/${Ee.get("exercisesId")}/detail`})})),(Fn==null?void 0:Fn.status)===-3){const kn=parseInt(Fn==null?void 0:Fn.message);vl(Date.now()+kn*1e3)}})}))),(Ne=["smartPlan","exercises"])!=null&&Ne.includes(Ee.get("type"))?gn.createElement(S.ZP,{type:"primary",onClick:()=>{if(Ee.get("type")==="exercises"){const Fn=()=>a(void 0,null,function*(){yield iu(),Il(!1),Tl(),jl.current=!0,zu()});if(!(bn!=null&&bn.records_count)||kl){D.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u63D0\u793A",content:gn.createElement("div",{style:{color:"#FF0000"}},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u662F\u5426\u8FDB\u884C\u8BC4\u6D4B\u5E76\u63D0\u4EA4\uFF0C\u672A\u8BC4\u6D4B\u5219\u4F1A\u5BFC\u81F4\u8BE5\u9898\u65E0\u6CD5\u83B7\u5F97\u5206\u6570"),onOk:Fn});return}Fn()}else{let Fn="";Ee.get("isMiniprogram")=="true"?Fn=`/miniprogram/courseware/study?courses_id=${Ee.get("coursesId")}&id=${Ee.get("exercisesId")}`:Fn=`/classrooms/${Ee.get("coursesId")}/smart_plan/${Ee.get("exercisesId")}/ppt_info/info`,window.opener?window.close():(console.log("11",`program_${Ee.get("coursesId")}_${Ee.get("exercisesId")}`),console.log(Ee.get("isMiniprogram")=="true"),Ee.get("isMiniprogram")=="true"?localStorage.removeItem(`iframeprogram_${Ee.get("coursesId")}_${Ee.get("exercisesId")}`):E.history.push(Fn))}}},Ee.get("type")==="exercises"?"\u8FD4\u56DE\u8BD5\u5377":"\u8FD4\u56DE\u8BFE\u4EF6"," "):gn.createElement("span",{onClick:()=>{var Fn;if(Ee.get("backUrl"))E.history.push(Ee.get("backUrl"));else if(Ee.get("type")==="1"){let kn=(Fn=localStorage.getItem("program_homework"))==null?void 0:Fn.split(",");E.history.push(`/classrooms/${kn==null?void 0:kn[0]}/program_homework/${kn==null?void 0:kn[1]}/detail`)}else E.history.push("/problemset")}},gn.createElement(Pe.Z,{title:"\u5173\u95ED"},gn.createElement("i",{style:{color:Tn?"#8D929F":"#fff"},className:"iconfont icon-fanhuishijuan font16 "})))),gn.createElement(ae.Z,{size:"large",spinning:Zn},gn.createElement(ne.Z,{className:Tu()(El.Z.myProblems,Tn&&El.Z.whiteMyProblems),leftChild:gn.createElement(Ha,$({},Uu)),rightChild:gn.createElement(g,$({},Lu))}))):null,gn.createElement(D.default,{centered:!0,closable:!1,width:680,footer:null,open:fl,className:"oj-modal"},gn.createElement("section",{className:"oj-modal-content"},gn.createElement("div",{className:"oj-modal-head"},gn.createElement("img",{src:yl,alt:""}),gn.createElement("i",{onClick:()=>xn(!1),className:"iconfont icon-guanbi1"})),gn.createElement("aside",null,gn.createElement("img",{className:"mr30",src:Qa.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",gn.createElement("span",{style:{color:"#75d6ba",marginRight:100}},An==null?void 0:An.execute_time,"ms"),"\u4F18\u4E8E",gn.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(An==null?void 0:An.time_better_than)||100,"%"),"\u7684\u7528\u6237"),gn.createElement("aside",{className:"mb50"},gn.createElement("img",{src:Ua.Z,className:"mr30"}),gn.createElement("span",{className:"oj-modal-tt"},gn.createElement("span",null,gn.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),gn.createElement("span",{className:"c-light-primary"},An==null?void 0:An.execute_memory,"kb")),gn.createElement("span",null,gn.createElement("span",null))),"\u4F18\u4E8E",gn.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(An==null?void 0:An.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),gn.createElement("div",{id:"oj-modal-next",onClick:()=>a(void 0,null,function*(){var Fn;if(An!=null&&An.next_identifier){let kn=yield(0,Ie.ZP)(`/api/problems/${An==null?void 0:An.next_identifier}/start.json`,{method:"get",params:{hack_user_id:Yn==null?void 0:Yn.user_id}});kn&&(E.history.replace(`/myproblems/${kn==null?void 0:kn.identifier}${window.location.search}`),window.location.reload())}else{let kn=(Fn=localStorage.getItem("program_homework"))==null?void 0:Fn.split(",");E.history.push(`/classrooms/${kn==null?void 0:kn[0]}/program_homework/${kn==null?void 0:kn[1]}/detail`)}}),className:"oj-modal-btn"},An!=null&&An.next_identifier?"\u8FDB\u5165\u4E0B\u4E00\u9898":"\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875"))),ga()&&gn.createElement(bu.Z,{showData:Ee.get("type")==="smartPlan"?{ai_exam_question:!0,ai_syntax_check:!0,ai_code_diagnosis:!0,ai_guidance:!0,ai_q_and_a:!0}:Gt==null?void 0:Gt.homework_extension,description:Gt==null?void 0:Gt.description,allShow:(0,ma.$O)(),code:Gt==null?void 0:Gt.code,sendParams:{source:"hack",hack_id:St},draggableExtraNode:((it=Gt==null?void 0:Gt.homework_extension)==null?void 0:it.ai_guide)&&(gu==null?void 0:gu.open)&&gn.createElement("div",{className:"bg-white rounded-2px-rem p-10px flex item-center justify-between gap-10px",style:{position:"absolute",top:"50%",transform:"translateY(-50%)",right:"75px",width:"400px"}},gn.createElement("div",{className:"bg-white absolute",style:{WebkitClipPath:"polygon(0 0, 0% 100%, 100% 50%)",clipPath:"polygon(0 0, 0% 100%, 100% 50%)",width:"10px",height:"15px",right:"-10px"}}),gn.createElement(ra.Z,{text:(gu==null?void 0:gu.text)||""}),gn.createElement("span",{className:"iconfont icon-tupianguanbi font14 current c-grey-666",onClick:Fn=>{ru({open:!1,text:""})}}))})),gn.createElement(Fa.Z,{successCb:()=>{ul.current===1?du():Gl()}}))};function m({title:i,modify_code:f,onSyncCode:A,onShowCodeSetting:Y,onResetCode:le,hack:L,onChangeLanguage:De,isWhiteTheme:Re,onShowResourceCentre:Ce,attachments_count:Ne}){var it;const He=()=>{D.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:gn.createElement(Fe.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:le})},[Ke]=(0,E.useSearchParams)(),St=Ke.get("language"),Ot=Ee=>Ee==="1"?"c++":Ee==="2"?"C++":Ee;return(0,e.useEffect)(()=>{St&&De(Ot(St))},[]),(0,e.useEffect)(()=>{L!=null&&L.tpm_code_modified&&D.default.confirm({title:"\u66F4\u65B0\u521D\u59CB\u4EE3\u7801",icon:gn.createElement(Fe.Z,null),content:gn.createElement("div",null,gn.createElement("div",null,"\u7F16\u7A0B\u9898\u7684\u521D\u59CB\u4EE3\u7801\u5185\u5BB9\u6709\u66F4\u65B0,"),gn.createElement("div",null,"\u66F4\u65B0\u64CD\u4F5C\u5C06\u4FDD\u7559\u5DF2\u5B8C\u6210\u7684\u8BC4\u6D4B\u8BB0\u5F55\u548C\u6210\u7EE9,"),gn.createElement("div",null,"\u8FD8\u672A\u5B8C\u6210\u8BC4\u6D4B\u7684\u4EFB\u52A1\u4EFB\u52A1\u4EE3\u7801\uFF0C\u8BF7\u81EA\u884C\u4FDD\u5B58\uFF01")),centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>le()})},[L==null?void 0:L.language]),console.log(L,Re,"hack"),gn.createElement("div",{className:`${El.Z.codeHead} ${Re?El.Z.whiteCodeHead:""}`},gn.createElement("div",{className:El.Z.navWrap},(it=L==null?void 0:L.all_language)==null?void 0:it.map(Ee=>gn.createElement("div",{className:`${El.Z.nav} ${Ee===(L==null?void 0:L.language)?El.Z.active:""}`,key:Ee,onClick:()=>De(Ee)},gn.createElement(Pe.Z,{title:"\u7F16\u7A0B\u8BED\u8A00"},gn.createElement("i",{className:"iconfont icon-bianchengyuyan1"})),gn.createElement("span",null,Ee)))),gn.createElement(pe.Z,{align:"middle",style:{marginLeft:"auto"}},f?gn.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:A},gn.createElement("img",{src:se,alt:"notice",style:{height:13,transform:"translateY(-2px)"}})):null,Ne>0&&gn.createElement("a",{onClick:Ce},gn.createElement(Pe.Z,{title:"\u8D44\u6E90\u4E2D\u5FC3"},gn.createElement("i",{style:{color:"#8D929F"},className:"iconfont icon-ziyuanzhongxin mr15"}))),gn.createElement("a",{onClick:He},gn.createElement(Pe.Z,{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"},gn.createElement("i",{style:{color:"#8D929F"},className:"iconfont icon-huifuchushihuashezhi mr15"}))),gn.createElement("a",{onClick:Y},gn.createElement(Pe.Z,{title:"\u8BBE\u7F6E"},gn.createElement("i",{style:{color:"#8D929F"},className:"iconfont icon-shezhi8 font14 mr15"})))))}function g(i){var f=i,{input:A,is_file:Y,identifier:le,showNote:L,onShowNote:De,notes:Re,onCancelNote:Ce,onAddNote:Ne,debugResult:it,language:He,debuging:Ke,submitting:St,executingMessage:Ot,code:Ee,onSubmitCode:dn,onDebugCode:Rt,onChangeCode:rn,onChangeInput:An,onUpdateCode:bn,user:Un,isLoading:un,submitResult:hn}=f,yn=Je(f,["input","is_file","identifier","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode","user","isLoading","submitResult"]);function jn(Qn,Gn){return gn.createElement(m,ze($({},yn),{onShowCodeSetting:Qn,onShowResourceCentre:Gn}))}const Cn=$({input:A,is_file:Y,debugResult:it,debuging:Ke,submitting:St,executingMessage:Ot,onDebugCode:Rt,onChangeCode:rn,onSubmitCode:dn,onChangeInput:An,user:Un,submitResult:hn},yn);return gn.createElement("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#1B2333"}},gn.createElement(we,{setIsWhiteTheme:yn==null?void 0:yn.setIsWhiteTheme,isLoading:un,language:He,value:Ee,identifier:le,onChange:rn,onUpdateCode:bn,ActionBarRender:jn}),gn.createElement(Ze.ZP,$({},Cn)))}},10786:function(gt,Xe,n){"use strict";n.d(Xe,{h:function(){return e}});var e=(E=>(E[E.NOMATCH=-1]="NOMATCH",E[E.OK=0]="OK",E[E.TIMEOUT=2]="TIMEOUT",E[E.PODFAILURE=3]="PODFAILURE",E[E.COMPILEFAILURE=4]="COMPILEFAILURE",E[E.EXECUTEFAILURE=5]="EXECUTEFAILURE",E[E.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",E))(e||{})},20885:function(gt,Xe,n){"use strict";n.d(Xe,{H7:function(){return G},MK:function(){return Fe},MU:function(){return o},X6:function(){return ne},bM:function(){return H},fi:function(){return We},fu:function(){return pe},n4:function(){return ye},rX:function(){return ut},vl:function(){return Se},zO:function(){return k}});var e=n(57193),E=Object.defineProperty,C=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,S=(J,F,me)=>F in J?E(J,F,{enumerable:!0,configurable:!0,writable:!0,value:me}):J[F]=me,Pe=(J,F)=>{for(var me in F||(F={}))D.call(F,me)&&S(J,me,F[me]);if(C)for(var me of C(F))ae.call(F,me)&&S(J,me,F[me]);return J};function pe(J,F){return(0,e.U2)(`myproblems/${J}.json`,Pe({hidePopLogin:!0},F||{}))}function H(J,F){return(0,e.v_)(`myproblems/${J}/code_submit.json`,F)}function o(J,F){return(0,e.v_)(`myproblems/${J}/code_debug.json`,F)}function k(J,F){return F.language&&(F.language=encodeURIComponent(F.language)),(0,e.U2)(`myproblems/${J}/submit_records.json`,F)}function ne(J){return(0,e.U2)("myproblems/record_detail.json",{id:J})}function ut(J,F){return(0,e.U2)(`myproblems/${J}/result.json`,{mode:F})}function Fe(J,F){return(0,e.v_)(`myproblems/${J}/add_notes.json`,F)}function G(J,F){return(0,e.v_)(`myproblems/${J}/restore_initial_code.json`,F)}function We(J){return(0,e.v_)(`myproblems/${J}/sync_code.json`)}function ye(J,F){return(0,e.v_)(`myproblems/${J}/update_code.json`,F)}function Se(J,F){return(0,e.v_)(`discusses/${J}/plus.json`,F)}},72850:function(gt,Xe,n){"use strict";n.d(Xe,{Z:function(){return Ze}});var e=n(59301),E=n(28284),C=n(6767),D=n(62957),ae=n(20554),S=n(82326),Pe=n(17149),pe=n(69219),H=n(37568),o=n(54172),k=n(25399),ne=n(13747),ut=n(99571),Fe=n(57193),G={flex_box_center:"flex_box_center___kuaVT",flex_space_between:"flex_space_between___exKHH",flex_box_vertical_center:"flex_box_vertical_center___BzvkN",flex_box_center_end:"flex_box_center_end___Ss2DJ",flex_box_column:"flex_box_column___p1LEr",scoremodal:"scoremodal___upTFR",selectWrapper:"selectWrapper___HH3RX",selectWrappers:"selectWrappers___fUWwr",allqingchu:"allqingchu___BFF1D",title:"title___hFasb",score:"score___DXG3o",close:"close___kEIiB",content:"content___Mco8L",items:"items___j98jk",bottom:"bottom___A1n1C",yes:"yes___P1zzb",no:"no___xZqXd",titlecount:"titlecount___fqA9P",add:"add___MqV0R",search:"search___NREgv",searchIcon:"searchIcon___qny3A",tabWrap:"tabWrap___dR18c",previewModal:"previewModal___uSiGS",q_title:"q_title___a9NY9"},We=n(41576),ye={flex_box_center:"flex_box_center___nnwwA",flex_space_between:"flex_space_between___cRir9",flex_box_vertical_center:"flex_box_vertical_center___FqTZ8",flex_box_center_end:"flex_box_center_end___WU5_v",flex_box_column:"flex_box_column___QZFa1",warp:"warp___aLZwN",shixunbutton:"shixunbutton___Eoa1i",redio:"redio___LJ4js",redioitem:"redioitem___YicCC",redioitemyes:"redioitemyes___lX4Nr",title:"title___pi1jH",titleyes:"titleyes___jiEh7",yestag:"yestag___DLWoP",qcount:"qcount___U9kkL",score:"score___vLK4B",qtitle:"qtitle___kyg0t",checkbox:"checkbox___vjiBw",checkboxitem:"checkboxitem___HW3CP",checkboxitemyes:"checkboxitemyes___kpjek",bottom:"bottom___uG8Zq",bottomitem:"bottomitem___TnJQQ",left:"left___M8WXX",right:"right____dkCI",completion:"completion___H6RmA",content:"content___a2hGC",items:"items___D8mLd",simple:"simple___fQ0OS",shixun:"shixun___nB6Jk",combination:"combination___YrOdz",program:"program___lG0JA"},Se=n(97231),J=n(63949),F=n(24334);const me=["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"];var Ie=({qitem:j})=>{var ie,xe,bt,ht,wt,Ct,Te,Ft,Bt,Ye;return e.createElement("div",{className:ye.warp},e.createElement("div",{className:ye.mainPart},e.createElement("div",{className:ye.qcount},(j==null?void 0:j.question_type)===8&&e.createElement(Se.Z,{className:ye.content,showProgramFill:!0,value:(ie=j==null?void 0:j.program_attr)==null?void 0:ie.description}),(j==null?void 0:j.question_type)!=8&&e.createElement(Se.Z,{className:ye.qtitle,value:(j==null?void 0:j.name)||(j==null?void 0:j.title)})),((j==null?void 0:j.question_type)===0||(j==null?void 0:j.question_type)===2)&&e.createElement("div",null,(xe=j==null?void 0:j.choices)==null?void 0:xe.map((x,U)=>e.createElement("div",{className:ye.redio},!(x!=null&&x.is_answer)&&e.createElement("span",{className:ye.redioitem}),(x==null?void 0:x.is_answer)&&e.createElement("i",{className:`${ye.redioitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:x!=null&&x.is_answer?ye.titleyes:ye.title,value:me[U]+(x==null?void 0:x.choice_text)}),(x==null?void 0:x.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(j==null?void 0:j.question_type)===1&&e.createElement("div",null,(bt=j==null?void 0:j.choices)==null?void 0:bt.map((x,U)=>e.createElement("div",{className:ye.checkbox},!(x!=null&&x.is_answer)&&e.createElement("span",{className:ye.checkboxitem}),(x==null?void 0:x.is_answer)&&e.createElement("i",{className:`${ye.checkboxitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:x!=null&&x.is_answer?ye.titleyes:ye.title,value:me[U]+(x==null?void 0:x.choice_text)}),(x==null?void 0:x.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(j==null?void 0:j.question_type)===3&&e.createElement("div",{className:ye.completion},(ht=j==null?void 0:j.standard_answer)==null?void 0:ht.map((x,U)=>{var z;return e.createElement("div",{style:{display:"flex"}},e.createElement("span",{className:ye.title},"\u586B\u7A7A\u9879",U+1),e.createElement("div",{className:ye.content},(z=x==null?void 0:x.answer_text)==null?void 0:z.map((w,V)=>e.createElement("div",{className:ye.items},w))))})),(j==null?void 0:j.question_type)===4&&e.createElement("div",{className:ye.simple},e.createElement("div",{className:ye.title},"\u53C2\u8003\u7B54\u6848"),e.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(wt=j==null?void 0:j.answer_texts)!=null&&wt[0]?e.createElement(Se.Z,{className:ye.content,value:(Ct=j==null?void 0:j.answer_texts)==null?void 0:Ct[0]}):e.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),(j==null?void 0:j.question_type)===5&&((Te=j==null?void 0:j.challenge_names)==null?void 0:Te.map((x,U)=>e.createElement("div",{className:ye.shixun},e.createElement("span",{className:ye.qtitle},e.createElement("span",{style:{marginRight:10}},"\u7B2C",(0,J.EM)(U+1),"\u9898"),x)))),(j==null?void 0:j.question_type)===6&&e.createElement("div",{className:ye.program},e.createElement(Se.Z,{className:ye.content,value:((Ft=j==null?void 0:j.program_attr)==null?void 0:Ft.description)||"- -"})),(j==null?void 0:j.question_type)===7&&((Bt=j==null?void 0:j.sub_item_banks)==null?void 0:Bt.map((x,U)=>{var z,w,V,lt,ue;return e.createElement("div",null,e.createElement("div",{className:ye.combination},e.createElement("span",{className:ye.qtitle},x==null?void 0:x.name)),e.createElement("div",{className:ye.warp,style:{padding:"0px",paddingTop:20}},e.createElement("div",null,((x==null?void 0:x.item_type)=="SINGLE"||(x==null?void 0:x.item_type)=="JUDGMENT")&&((z=x==null?void 0:x.choices)==null?void 0:z.map((Z,de)=>e.createElement("div",{className:ye.redio},!(Z!=null&&Z.is_answer)&&e.createElement("span",{className:ye.redioitem}),(Z==null?void 0:Z.is_answer)&&e.createElement("i",{className:`${ye.redioitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:Z!=null&&Z.is_answer?ye.titleyes:ye.title,value:me[de]+(Z==null?void 0:Z.choice_text)}),(Z==null?void 0:Z.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(x==null?void 0:x.item_type)=="MULTIPLE"&&((w=x==null?void 0:x.choices)==null?void 0:w.map((Z,de)=>e.createElement("div",{className:ye.checkbox},!(Z!=null&&Z.is_answer)&&e.createElement("span",{className:ye.checkboxitem}),(Z==null?void 0:Z.is_answer)&&e.createElement("i",{className:`${ye.checkboxitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:Z!=null&&Z.is_answer?ye.titleyes:ye.title,value:me[de]+(Z==null?void 0:Z.choice_text)}),(Z==null?void 0:Z.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(x==null?void 0:x.item_type)=="COMPLETION"&&e.createElement("div",{className:ye.completion},(V=x==null?void 0:x.standard_answer)==null?void 0:V.map((Z,de)=>{var M;return e.createElement("div",{style:{display:"flex"}},e.createElement("span",{className:ye.title},"\u586B\u7A7A\u9879",de+1),e.createElement("div",{className:ye.content},(M=Z==null?void 0:Z.answer_text)==null?void 0:M.map((q,Le)=>e.createElement("div",{className:ye.items},q))))})),(x==null?void 0:x.item_type)=="SUBJECTIVE"&&e.createElement("div",{className:ye.simple},e.createElement("div",{className:ye.title},"\u53C2\u8003\u7B54\u6848"),e.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(lt=x==null?void 0:x.answer_texts)!=null&<[0]?e.createElement(Se.Z,{className:ye.content,value:(ue=x==null?void 0:x.answer_texts)==null?void 0:ue[0]}):e.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))))))})),(j==null?void 0:j.question_type)===8&&e.createElement("div",null,e.createElement(Se.Z,{disabledFill:!0,className:ye.content,showProgramFill:!0,value:F.Base64.decode(((Ye=j==null?void 0:j.program_attr)==null?void 0:Ye.code)||"")})),(j==null?void 0:j.question_type)===5&&e.createElement("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"}},e.createElement("div",{style:{flex:1,alignItems:"center",display:"flex"}},e.createElement("div",{style:{marginRight:30}},e.createElement("span",{style:{marginRight:10}},"\u521B\u5EFA\u8005"),e.createElement("span",{style:{color:"#000000"}},(j==null?void 0:j.author_name)||"- -")),e.createElement("div",{style:{marginRight:30}},e.createElement("span",{style:{marginRight:10}},"\u6240\u5C5E\u5355\u4F4D"),e.createElement("span",{style:{color:"#000000"}},(j==null?void 0:j.author_school_name)||"- -")),e.createElement("div",{style:{marginRight:30}},e.createElement("span",{style:{marginRight:10}},"\u5B66\u4E60\u4EBA\u6570"),e.createElement("span",{style:{color:"#000000"}},(j==null?void 0:j.study_count)||"0"))),e.createElement("a",{className:ye.shixunbutton,href:`/shixuns/${j==null?void 0:j.identifier}/challenges?exercise=true`,target:"_blank"},e.createElement("i",{onClick:()=>{},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"\u5B9E\u8BAD\u8BE6\u60C5"))),((j==null?void 0:j.question_type)<=4||[6,8].includes(j==null?void 0:j.question_type))&&e.createElement("div",{className:ye.bottom},e.createElement("div",{className:ye.bottomitem},e.createElement("span",{className:ye.left},"\u89E3\u6790"),e.createElement("span",{className:ye.right},j!=null&&j.analysis?e.createElement(Se.Z,{value:j==null?void 0:j.analysis}):e.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),e.createElement("div",{className:ye.bottomitem},e.createElement("span",{className:ye.left},"\u96BE\u5EA6"),e.createElement("span",{className:ye.right},(j==null?void 0:j.difficulty)===1?"\u7B80\u5355":(j==null?void 0:j.difficulty)===2?"\u9002\u4E2D":"\u56F0\u96BE")),e.createElement("div",{className:ye.bottomitem},e.createElement("span",{className:ye.left},"\u77E5\u8BC6\u70B9"),e.createElement("span",{className:ye.right},j!=null&&j.tag_discipline?j==null?void 0:j.tag_discipline:e.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~")))))},W=n(12082),Tt=n(53956),Yt=n(95392),Xt=n(61485),_t=n(66807),Ut=n(55301),ce=n(76888),_=n(59301),X=Object.defineProperty,Ge=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,ve=(j,ie,xe)=>ie in j?X(j,ie,{enumerable:!0,configurable:!0,writable:!0,value:xe}):j[ie]=xe,ge=(j,ie)=>{for(var xe in ie||(ie={}))Me.call(ie,xe)&&ve(j,xe,ie[xe]);if(te)for(var xe of te(ie))Qe.call(ie,xe)&&ve(j,xe,ie[xe]);return j},we=(j,ie)=>Ge(j,rt(ie)),se=(j,ie,xe)=>new Promise((bt,ht)=>{var wt=Ft=>{try{Te(xe.next(Ft))}catch(Bt){ht(Bt)}},Ct=Ft=>{try{Te(xe.throw(Ft))}catch(Bt){ht(Bt)}},Te=Ft=>Ft.done?bt(Ft.value):Promise.resolve(Ft.value).then(wt,Ct);Te((xe=xe.apply(j,ie)).next())});const ke=({setScoreShow:j,ScoreShow:ie,onOk:xe,isshixuns:bt,isloadings:ht,dispatch:wt,isIntelligentAssistant:Ct=!1,ispptModal:Te=!1,isChangeQuestion:Ft=!1,newExercisePaper:Bt,shixunsDetail:Ye})=>{var x,U,z;let[w,V]=(0,e.useState)({type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,bigmodel:Ct,is_smart_plan:Te,group_id:[]}),[lt,ue]=(0,e.useState)([]),[Z,de]=(0,e.useState)([]),[M,q]=(0,e.useState)([]),[Le,P]=(0,e.useState)([]);const[R,s]=(0,e.useState)(!1),[p]=E.default.useForm(),[h,T]=(0,e.useState)(),[Ae,he]=(0,e.useState)(!1);let[Be,K]=(0,e.useState)(bt);const[be,vt]=(0,e.useState)([]),[en,qe]=(0,e.useState)(0),[pt,qt]=(0,e.useState)(!0),[xt,Wt]=(0,e.useState)([]),[tt,Dt]=(0,e.useState)([]),Lt=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u586B\u7A7A\u9898",value:"COMPLETION",question_type:3},{name:"\u7B80\u7B54\u9898",value:"SUBJECTIVE",question_type:4},{name:"\u5B9E\u8BAD\u9898",value:"SHIXUN",question_type:5},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6},{name:"\u7EC4\u5408\u9898",value:"COMBINATION",question_type:7},{name:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM",question_type:8}],At=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6}];let[jt,ln]=(0,e.useState)({gg:{type:"1",page:1,updated_at:"",quotes:"",item_type:null,courseid:null,per_page:10,tag_discipline_id:null,difficulty:null,keyword:null},ttgx:{type:"3",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},scj:{type:"2",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null},wcjd:{type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},yx:{type:"5",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,group_id:null}});const Bn=(0,e.useRef)(new Set),fn=(0,e.useRef)(new Set),Mn=E.default.useWatch("courseid",p),In=[{name:"\u7B80\u5355",value:1},{name:"\u9002\u4E2D",value:2},{name:"\u56F0\u96BE",value:3}],sl=[{name:"\u521D\u7EA7",value:1},{name:"\u4E2D\u7EA7",value:2},{name:"\u4E2D\u9AD8\u7EA7",value:3},{name:"\u9AD8\u7EA7",value:4}],cn=[{name:"\u672A\u53D1\u5E03",value:"unpublish"},{name:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{name:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],[tl,gl]=(0,e.useState)(!1),cl=()=>{p.resetFields(),Be=!1,K(!1),gl(!1),p.submit()};(0,e.useEffect)(()=>{var ot,Vt,ll,Sn,el,dl,Ht,Al,Sl,Xn;(((ll=(Vt=(ot=Bt==null?void 0:Bt.editData)==null?void 0:ot.exercise)==null?void 0:Vt.exist_item_bank_ids)==null?void 0:ll.length)>0||((dl=(el=(Sn=Bt==null?void 0:Bt.editData)==null?void 0:Sn.exercise)==null?void 0:el.exist_item_bank_shixun_ids)==null?void 0:dl.length)>0)&&Dt([...(Al=(Ht=Bt==null?void 0:Bt.editData)==null?void 0:Ht.exercise)==null?void 0:Al.exist_item_bank_ids,...(Xn=(Sl=Bt==null?void 0:Bt.editData)==null?void 0:Sl.exercise)==null?void 0:Xn.exist_item_bank_shixun_ids])},[(U=(x=Bt==null?void 0:Bt.editData)==null?void 0:x.exercise)==null?void 0:U.exist_item_bank_ids]),(0,e.useEffect)(()=>{ie&&(p.setFieldsValue({item_type:"",courseid:null,tag_discipline_id:null,difficulty:null,keyword:null}),pt&&Be&&(p.setFieldsValue({item_type:"SHIXUN"}),w.item_type="SHIXUN",V(ge({},w)),qt(!1)),Fl(w),Zl(),Ul({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}))},[ie]),(0,e.useEffect)(()=>{en>0&&setTimeout(()=>{qe(0)},2e3)},[en]);function Fl(ot){return se(this,null,function*(){var Vt,ll,Sn;if(s(!0),V(ge({},ot)),(M==null?void 0:M.length)<=0&&ot.type==="5"){P([]),s(!1);return}console.log("----",M,be);let el=ot.type==="5"?M==null?void 0:M.filter(Sl=>!be.includes(Sl)):null,dl=ot.type==="5"?M==null?void 0:M.filter(Sl=>be.includes(Sl)):null,Ht={course_discipline_id:ot==null?void 0:ot.courseid};(ot==null?void 0:ot.type)==="1"&&(Ht={discipline_id:((Vt=ot==null?void 0:ot.courseid)==null?void 0:Vt[0])||null,sub_discipline_id:((ll=ot==null?void 0:ot.courseid)==null?void 0:ll[1])||null});let Al=yield(0,Fe.ZP)("/api/item_banks.json",{method:"get",params:we(ge(ge({},ot),Ht),{ids:el,shixun_ids:dl,include_shixuns:!Ct,group_id:((Sn=ot.group_id)==null?void 0:Sn.map(Sl=>Sl==null?void 0:Sl.value))||null,keyword:ot.keyword?encodeURIComponent(ot.keyword):ot.keyword,type:ot.type==="5"?null:ot.type,clazz:ot.type==="3"?"ItemBanksGroup":null,bigmodel:Ct,is_smart_plan:Te})});P(Al),s(!1)})}function Zl(){return se(this,null,function*(){let ot=yield(0,Fe.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:w.type==="5"?null:w.type,clazz:"ItemBanksGroup"}});ue((0,We.L)(ot==null?void 0:ot.disciplines))})}function Ul(ot){return se(this,null,function*(){var Vt;let ll=yield(0,Fe.ZP)("/api/item_banks_groups/for_problemset.json",{method:"post",body:ot}),Sn=[{title:"\u6839\u76EE\u5F55",id:0,pid:0,value:0,key:0,isLeaf:!1,children:(Vt=ll==null?void 0:ll.data)==null?void 0:Vt.map(el=>({title:el.name,id:el.id,pid:el.id,value:el.id,key:el.id,isLeaf:!el.have_child}))}];Wt(Sn)})}function au(ot){return se(this,null,function*(){var Vt,ll,Sn,el;s(!0);let dl=(Vt=ot.list)==null?void 0:Vt.filter(Xn=>!be.includes(Xn)),Ht=(ll=ot.list)==null?void 0:ll.filter(Xn=>be.includes(Xn));if(dl.length===0&&Ht.length===0){s(!1),P([]);return}let Al={course_discipline_id:ot==null?void 0:ot.courseid};(ot==null?void 0:ot.type)==="1"&&(Al={discipline_id:((Sn=ot==null?void 0:ot.courseid)==null?void 0:Sn[0])||null,sub_discipline_id:((el=ot==null?void 0:ot.courseid)==null?void 0:el[1])||null});let Sl=yield(0,Fe.ZP)("/api/item_banks.json",{method:"get",params:we(ge(ge({},ot),Al),{ids:dl,shixun_ids:Ht,type:ot.type==="5"?null:ot.type,clazz:ot.type==="3"?"ItemBanksGroup":null})});s(!1),P(Sl)})}const cu=ot=>se(void 0,null,function*(){const Vt=yield wt({type:"shixunsDetail/release",payload:{id:ot}});let ll=Vt==null?void 0:Vt.tag_position,Sn=(Vt==null?void 0:Vt.evaluation_set_position)||[],el=Vt.status;return el===0?(C.ZP.success("\u53D1\u5E03\u6210\u529F"),Fl(w),!0):(el===2?C.ZP.error(`\u7B2C${Sn.join(",")}\u5173\u5C1A\u672A\u5B8C\u6210\uFF0C\u65E0\u6CD5\u7533\u8BF7\u53D1\u5E03`):el===3?C.ZP.error(`\u6BCF\u4E00\u4E2A\u5173\u5361\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u6280\u80FD\u6807\u7B7E, \u7B2C${ll.join(",")}\u5173\u5C1A\u672A\u8BBE\u7F6E\u6280\u80FD\u6807\u7B7E\uFF0C\u8BF7\u8865\u5145`):C.ZP.error("\u5C1A\u672A\u521B\u5EFA\u4EFB\u52A1\u7684\u5B9E\u8BAD\uFF0C\u4E0D\u80FD\u7533\u8BF7\u53D1\u5E03"),!1)}),pl=ot=>(ot==null?void 0:ot.shixun_tag_num)===1?"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528\uFF0C\u8BF7\u5148\u8FDB\u884C\u53D1\u5E03":"",fu=(ot,Vt,ll)=>ot.map(Sn=>Sn.key===Vt?ge(ge({},Sn),ll):Sn.children?we(ge({},Sn),{children:fu(Sn.children,Vt,ll)}):Sn),ql=ot=>se(void 0,null,function*(){const{key:Vt}=ot;let ll=w.type;const Sn=yield(0,Ut.ex)({page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",group_id:Math.abs(Vt),type:ll}),{data:el,total_count:dl}=Sn||{};dl>0&&Wt(Ht=>fu(Ht,Vt,{children:el.map(Al=>({title:Al.name,id:Al.id,pid:Al.id,value:Al.id,key:Al.id,isLeaf:!Al.have_child}))}))});function Bl(ot){console.log("----",w),ot==="1"&&(jt.gg=ge({},w)),ot==="2"&&(jt.scj=ge({},w)),ot==="3"&&(jt.ttgx=ge({},w)),ot==="0"&&(jt.wcjd=ge({},w)),ot==="5"&&(jt.yx=ge({},w)),ln(ge({},jt))}function wu(){w.type==="1"&&(w=jt.gg),w.type==="2"&&(w=jt.scj),w.type==="3"&&(w=jt.ttgx),w.type==="0"&&(w=jt.wcjd),w.type==="5"&&(w=jt.yx),(w==null?void 0:w.item_type)==="SHIXUN"?(Be=!0,K(!0)):(Be=!1,K(!1)),p.setFieldsValue(ge({},w)),V(ge({},w)),Fl(ge({},w))}return _.createElement("div",null,_.createElement(D.default,{title:!1,footer:!1,open:ie,width:1200,centered:!0,className:G.scoremodal,onCancel:()=>{j(!1)}},_.createElement("div",{style:{display:"flex",alignItems:"center"}},_.createElement("div",{className:G.title},Ct?"\u4EE5\u9898\u6362\u9898":"\u9898\u5E93\u9009\u9898")),Ct&&_.createElement("div",{style:{padding:10,background:"#F6F7F9",borderRadius:4,marginTop:14}},"\u6839\u636E\u73B0\u6709\u8BD5\u9898\u7684\u9898\u578B\u3001\u65B9\u5411\u3001\u77E5\u8BC6\u70B9\u3001\u96BE\u6613\u5EA6\uFF0C\u5FEB\u901F\u751F\u6210\u65B0\u7684\u8BD5\u9898\uFF0C\u589E\u52A0\u8BD5\u9898\u7684\u4E30\u5BCC\u5EA6"),_.createElement(ae.default,{className:G.tabWrap,activeKey:w.type,onChange:ot=>{ot==="3"?(w.show_all_share=!0,Ul({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"3"})):w.show_all_share=null,ot==="0"&&Ul({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}),Bl(w.type),w.type=ot,(w==null?void 0:w.item_type)==="SHIXUN"&&w.type!=="5"&&(Be=!0,K(!0)),gl(!1),w.type==="5"&&(Be=!1,K(!1)),wu(),Zl()},items:[{label:"\u516C\u5171",key:"1"},{label:"\u56E2\u961F\u5171\u4EAB",key:"3"},{label:"\u6536\u85CF\u5939",key:"2"},{label:"\u6211\u521B\u5EFA\u7684",key:"0"},{label:_.createElement("div",null,"\u5DF2\u9009",M.length>0&&_.createElement("span",{className:G.titlecount},M.length),en>0&&_.createElement("span",{className:G.add},"+",en)),key:"5"}]}),_.createElement(E.default,{layout:"inline",form:p,onValuesChange:(ot,Vt)=>{const ll=Object.values(Vt).some(el=>el!==null&&el!==""&&el!==void 0),Sn=Vt.keyword==="";if(gl(ll||!Sn),w.page=1,(Vt==null?void 0:Vt.item_type)==="SHIXUN"){if(w.type==="5"?K(!1):K(!0),ot.keyword||ot.keyword==="")return;p.submit()}else{if(ot!=null&&ot.courseid&&p.setFieldsValue({tag_discipline_id:null}),K(!1),ot.keyword||ot.keyword==="")return;p.submit()}},onFinish:ot=>{var Vt;w.type==="3"&&(!ot.group_id||((Vt=ot==null?void 0:ot.group_id)==null?void 0:Vt.length)===0)?w.show_all_share=!0:w.show_all_share=null,V(ge(ge({},w),ot)),Fl(ge(ge({},w),ot))}},_.createElement(E.default.Item,{name:"item_type"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u9898\u578B",style:{width:110},size:"middle"},(Te?At:Ct?Lt==null?void 0:Lt.filter(ot=>ot.question_type!==5):Lt).map(ot=>_.createElement(S.default.Option,{key:ot.value},ot.name)))),["1","2"].includes(w.type)?_.createElement(_.Fragment,null,_.createElement(E.default.Item,{name:"courseid"},_.createElement(Pe.Z,{className:G.selectWrapper,style:{width:160},size:"middle",placeholder:"\u65B9\u5411&\u8BFE\u7A0B",options:lt})),!Be&&_.createElement(E.default.Item,{name:"tag_discipline_id"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u77E5\u8BC6\u70B9",style:{width:160},size:"middle",allowClear:!0},(z=Le==null?void 0:Le.tag_disciplines)==null?void 0:z.map(ot=>_.createElement(S.default.Option,{key:ot.id},ot.name))))):_.createElement(_.Fragment,null,_.createElement(E.default.Item,{name:"courseid"},_.createElement(ce.q,{style:{width:160,height:38},size:"middle",showLinkButton:!1,data:{container_type:"ItemBank",type:w==null?void 0:w.type}})),!Be&&_.createElement(E.default.Item,{name:"tag_discipline_id"},_.createElement(ce.i,{allowAcceptEmpty:!0,key:String(w.type==="3"),data:{container_type:"ItemBank",search:!0,type:w.type},style:{width:160,height:38},size:"middle",courseDisciplineId:Mn,showLinkButton:!1}))),_.createElement(E.default.Item,{name:Be?"diff":"difficulty"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u96BE\u5EA6",style:{width:118},size:"middle",allowClear:!0},In.map(ot=>_.createElement(S.default.Option,{key:ot.value},ot.name)))),Be&&_.createElement(E.default.Item,{name:"shixun_publish_status"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"middle",allowClear:!0},cn.map(ot=>_.createElement(S.default.Option,{key:ot.value},ot.name)))),(w.type==="3"||w.type==="0")&&!Be&&_.createElement(E.default.Item,{name:"group_id"},_.createElement(pe.default,{treeDataSimpleMode:!0,style:{width:134},className:G.selectWrappers,multiple:!0,allowClear:!0,showSearch:!0,filterTreeNode:(ot,Vt)=>Vt.title.toUpperCase().indexOf(ot.toUpperCase())!==-1,dropdownStyle:{maxHeight:400,width:500,overflow:"auto"},placeholder:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939",treeCheckStrictly:!0,loadData:ql,treeDefaultExpandedKeys:[0],maxTagCount:0,treeCheckable:!0,treeData:xt})),tl&&_.createElement("span",{className:G.allqingchu,onClick:cl},_.createElement("i",{className:"iconfont icon-guanbi4"}),_.createElement("span",null,"\u6E05\u9664\u7B5B\u9009\u6761\u4EF6")),_.createElement(E.default.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword"},_.createElement(H.default.Search,{className:G.search,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",allowClear:!0,suffix:_.createElement("i",{className:`iconfont icon-sousuo9 font14 ${G.searchIcon}`,onClick:()=>p.submit()}),onSearch:ot=>{p.submit()}}))),_.createElement("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20}},_.createElement("div",{onClick:()=>{w.updated_at==="asc"?w.updated_at="desc":w.updated_at="asc",V(we(ge({},w),{page:1})),Fl(we(ge({},w),{page:1}))}}," ",w.updated_at?_.createElement("img",{src:w.updated_at==="asc"?W.Z:Tt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):_.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u66F4\u65B0\u65F6\u95F4\u6392\u5E8F"),_.createElement("div",{onClick:()=>{w.quotes==="asc"?w.quotes="desc":w.quotes="asc",V(we(ge({},w),{page:1})),Fl(we(ge({},w),{page:1}))},style:{marginLeft:20}}," ",w.quotes?_.createElement("img",{src:w.quotes==="asc"?W.Z:Tt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):_.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u4F7F\u7528\u6B21\u6570\u6392\u5E8F")),_.createElement(o.default,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(Le==null?void 0:Le.items)||(Le==null?void 0:Le.shixun_list),pagination:!1,loading:R,rowKey:ot=>ot.id,rowSelection:{type:Ct||Ft?"radio":"checkbox",selectedRowKeys:Z,getCheckboxProps:ot=>({disabled:ot.shixun_tag_num===1||(tt==null?void 0:tt.find(Vt=>ot.id===Vt))}),onSelect(ot,Vt,ll){if(Ct||Ft){de([ot.id]),fn.current=new Set([ot.id]),qe(1),q([ot.id]);return}if(Vt)(Be||ot!=null&&ot.challenge_names)&&vt([...be,ot.id]),de([...Z,ot.id]),ot.identifier?Bn.current.add(ot.id):fn.current.add(ot.id),qe(1),q([...M,ot.id]);else{ot.identifier?Bn.current.delete(ot.id):fn.current.delete(ot.id);let Sn=M.filter(el=>el!==ot.id);if(de(Sn),q(Sn),Be||ot!=null&&ot.challenge_names){let el=be.filter(dl=>dl!==ot.id);vt([...el])}if(w.type==="5"){au(we(ge({},w),{list:[...Sn]}));return}}},onSelectAll(ot,Vt,ll){var Sn,el;if(ot){const dl=ll.map(Al=>Al.id),Ht=(el=ll==null?void 0:ll.filter(Al=>Al==null?void 0:Al.challenge_names))==null?void 0:el.map(Al=>Al.id);vt([...be,...Ht]),de([...Z,...dl]),q([...M,...dl]);for(const Al of ll)Al.identifier?Bn.current.add(Al.id):fn.current.add(Al.id)}else{const dl=ll.map(Xn=>Xn.id),Ht=Z.filter(Xn=>!dl.some(nl=>nl===Xn)),Al=(Sn=ll==null?void 0:ll.filter(Xn=>Xn==null?void 0:Xn.challenge_names))==null?void 0:Sn.map(Xn=>Xn.id);de([...Ht]),q([...Ht]);let Sl=be.filter(Xn=>!Al.some(nl=>nl===Xn.id));vt([...Sl]),w.type==="5"&&au(we(ge({},w),{list:[...Ht]}));for(const Xn of dl)Xn.identifier?Bn.current.delete(Xn):fn.current.delete(Xn)}}},columns:[{title:"\u9898\u578B",dataIndex:"item_type",key:"item_type",render:(ot,Vt,ll)=>{var Sn,el;return _.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,Be||Vt!=null&&Vt.challenge_names?"\u5B9E\u8BAD\u9898":(el=(Sn=Lt==null?void 0:Lt.filter(dl=>dl.value===ot))==null?void 0:Sn[0])==null?void 0:el.name))}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:Be?"30%":"60%",key:"name",render:(ot,Vt,ll)=>{var Sn;return _.createElement("div",{style:{display:"flex",alignItems:"center"}},_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",{className:Vt!=null&&Vt.high_resources_consume?G.q_title:""},_.createElement(Se.Z,{key:1,showLines:1,showTextOnly:!0,value:Be||Vt!=null&&Vt.challenge_names?Vt!=null&&Vt.title||ot===null?"--":ot:(Vt==null?void 0:Vt.item_type)=="BPROGRAM"?(Sn=Vt==null?void 0:Vt.program_attr)==null?void 0:Sn.description:ot}))),(Vt==null?void 0:Vt.high_resources_consume)&&_.createElement(_t.Z,{type:"shixun",style:{marginLeft:10}}))}},{title:"\u521B\u5EFA\u8005",dataIndex:"author_name",key:"author_name",hidden:!Be,render:(ot,Vt,ll)=>{var Sn;return _.createElement(k.Z,{title:pl(Vt)},_.createElement("span",null,ot?(Sn=ot==null?void 0:ot.split("\u3001"))==null?void 0:Sn[0]:"- -"))}},{title:"\u6240\u5C5E\u5355\u4F4D",dataIndex:"author_school_name",key:"author_school_name",hidden:!Be,render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("span",null,ot||"- -"))},{title:"\u96BE\u5EA6",dataIndex:"difficulty",key:"difficulty",render:(ot,Vt,ll)=>{var Sn,el,dl,Ht;return _.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,Be||Vt!=null&&Vt.challenge_names?(Vt==null?void 0:Vt.level)||((el=(Sn=In==null?void 0:In.filter(Al=>Al.value===ot))==null?void 0:Sn[0])==null?void 0:el.name):(Ht=(dl=In==null?void 0:In.filter(Al=>Al.value===ot))==null?void 0:dl[0])==null?void 0:Ht.name))}},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",hidden:!Be,render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,ot||"- -"))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"quotes",key:"quotes",render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,Be||Vt!=null&&Vt.challenge_names?(Vt==null?void 0:Vt.study_count)||(Vt==null?void 0:Vt.stu_num):ot))},{title:_.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",_.createElement(k.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},_.createElement(Xt.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!Be,render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,ot||"- -"))},{title:"\u64CD\u4F5C",dataIndex:"id",key:"item_type",render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",{style:{flex:1,textAlign:"start"}},_.createElement("a",{onClick:()=>{var Sn,el;T(we(ge({},Vt),{question_type:Be||Vt!=null&&Vt.challenge_names?5:(el=(Sn=Lt==null?void 0:Lt.filter(dl=>dl.value===(Vt==null?void 0:Vt.item_type)))==null?void 0:Sn[0])==null?void 0:el.question_type})),he(!0)}},"\u67E5\u770B"),(Vt==null?void 0:Vt.shixun_tag_num)===1&&_.createElement("a",{style:{marginLeft:10},onClick:()=>{D.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,width:400,content:_.createElement("div",null,"\u662F\u5426\u786E\u5B9A\u53D1\u5E03",_.createElement("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:()=>{window.open(`/shixuns/${Vt==null?void 0:Vt.identifier}/challenges`)}},(Vt==null?void 0:Vt.shixun_name)||"--"),"\uFF1F"),onOk:()=>se(void 0,null,function*(){if(!cu(Vt==null?void 0:Vt.identifier))return new Promise((Sn,el)=>{el()})})})}},"\u53D1\u5E03")))}].filter(ot=>!ot.hidden)}),_.createElement(ne.Z,{current:w.page,total:(Le==null?void 0:Le.items_count)||(Le==null?void 0:Le.shixuns_count),style:{marginBottom:20},defaultPageSize:w.per_page,showTotal:ot=>_.createElement("span",null,"\u5171\xA0",_.createElement("span",{style:{color:"#165DFF"}},ot),"\xA0\u6761\u6570\u636E"),pageSize:w.per_page,onChange:(ot,Vt)=>{w.page=ot,w.per_page=Vt,V(ge({},w)),Fl(ge({},w))}}),_.createElement("div",{className:G.bottom},_.createElement(ut.ZP,{className:G.no,onClick:()=>{j(!1)}},"\u53D6\u6D88"),_.createElement(ut.ZP,{loading:ht,style:{width:ht&&75},className:G.yes,onClick:()=>se(void 0,null,function*(){if((M==null?void 0:M.length)<=0){C.ZP.info(Ct||Ft?"\u8BF7\u9009\u62E9\u4E00\u9053\u8BD5\u9898":"\u5F53\u524D\u6682\u672A\u9009\u62E9\u6570\u636E");return}xe([...fn.current],[...Bn.current],!0,M==null?void 0:M.length)})},Ct?"\u5F00\u59CB\u6362\u9898":"\u786E\u8BA4"))),_.createElement(D.default,{open:Ae,title:"\u9898\u76EE\u8BE6\u60C5",footer:!1,className:G.previewModal,width:1e3,centered:!0,onCancel:()=>{he(!1)},onOk:()=>{he(!1)}},_.createElement(Ie,{qitem:h})))};var Ze=(0,Yt.connect)(({shixunsDetail:j,newExercisePaper:ie})=>({shixunsDetail:j,newExercisePaper:ie}))(ke)},62998:function(gt,Xe,n){"use strict";n.d(Xe,{Im:function(){return Xt},ZP:function(){return Ge},gZ:function(){return _}});var e=n(59301),E=n(37568),C=n(99571),D=n(84105),ae=n(87395),S=n(99268),Pe=n(24334),pe=n(35191),H=n(97231),o=n(63949),k=n(7181),ne=n(34376),ut=n(92310),Fe=n.n(ut),G=n(59301),We=Object.defineProperty,ye=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,st=(rt,te,Me)=>te in rt?We(rt,te,{enumerable:!0,configurable:!0,writable:!0,value:Me}):rt[te]=Me,Ie=(rt,te)=>{for(var Me in te||(te={}))F.call(te,Me)&&st(rt,Me,te[Me]);if(J)for(var Me of J(te))me.call(te,Me)&&st(rt,Me,te[Me]);return rt},W=(rt,te)=>ye(rt,Se(te));const{TextArea:Tt}=E.default,Yt={visible:!1,tabIndex:"0"},Xt={[S.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[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 _t=(rt=>(rt[rt.SET_VISIBLE=0]="SET_VISIBLE",rt[rt.SET_TABINDEX=1]="SET_TABINDEX",rt))(_t||{});function Ut(rt,te){switch(te.type){case 0:return W(Ie({},rt),{visible:te.payload});case 1:return W(Ie({},rt),{tabIndex:te.payload});default:throw new Error}}function ce({value:rt,className:te}){const[Me,Qe]=(0,e.useState)(!1),ve=(0,e.useRef)(),ge=(0,e.useRef)();return(0,e.useEffect)(()=>{Me&&(ge.current.reset(),ge.current.write((0,o.pp)(rt||"")))},[rt,Me]),(0,e.useEffect)(()=>{var we,se,ke,Ze;if(ve.current){ge.current=new ne.Terminal({fontSize:14,disableStdin:!0}),ge.current.open(ve.current);const j=ve.current.offsetWidth-14,ie=((Ze=(ke=(se=(we=ge.current)==null?void 0:we._core)==null?void 0:se._renderService)==null?void 0:ke.dimensions)==null?void 0:Ze.actualCellWidth)||9.5,xe=Math.ceil(j/ie);ge.current.resize(xe,8),Qe(!0)}},[]),G.createElement("div",{ref:ve,className:Fe()("XtermText-valueRef",te)})}function _(rt){const{status:te,error_msg:Me,output:Qe,input:ve,expected_output:ge,is_file:we,input_file_url:se,output_file_url:ke,expected_output_file_url:Ze}=rt;let j=null;const ie={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(te){case S.h.NOMATCH:j=G.createElement(G.Fragment,null,G.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!we&&G.createElement(ce,{className:"mb10",value:ve}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(se,ve)},ve)),G.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!we&&G.createElement(ce,{className:"mb10",value:Qe&&Pe.Base64.decode(Qe)||""}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(ke,Qe)},Qe)),G.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!we&&G.createElement(ce,{className:"mb10",value:ge&&Pe.Base64.decode(ge)||""}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(Ze,ge)},ge)));break;case S.h.EXECUTEFAILURE:j=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!we&&G.createElement(H.Z,{value:ve,style:ie}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(se,ve)},ve)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.COMPILEFAILURE:j=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!we&&G.createElement(H.Z,{value:ve,style:ie}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(se,ve)},ve)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.PODFAILURE:j=G.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case S.h.TIMEOUT:j=G.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return G.createElement(G.Fragment,null," ",j," ")}function X(rt){const{status:te,error_msg:Me,execute_time:Qe,output:ve,input:ge,expected_output:we,is_file:se,input_file_url:ke,output_file_url:Ze,expected_output_file_url:j}=rt;let ie=null;switch(te){case S.h.OK:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Qe,"\u79D2"),G.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),G.createElement("pre",null,Pe.Base64.decode(ve)));break;case S.h.NOMATCH:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u8F93\u5165\uFF1A",G.createElement("pre",null,ge)),G.createElement("p",null,"\u8F93\u51FA\uFF1A",ve&&Pe.Base64.decode(ve)),G.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",we&&Pe.Base64.decode(we)));break;case S.h.EXECUTEFAILURE:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",G.createElement("pre",null,ge)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.COMPILEFAILURE:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",G.createElement("pre",null,ge)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.PODFAILURE:ie=G.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case S.h.TIMEOUT:ie=G.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return G.createElement(G.Fragment,null," ",ie," ")}var Ge=({id:rt,is_file:te,input:Me,debuging:Qe,submitting:ve,executingMessage:ge,debugResult:we,onChangeInput:se,onDebugCode:ke,onSubmitCode:Ze})=>{const[j,ie]=(0,e.useReducer)(Ut,Yt),{visible:xe,tabIndex:bt}=j;(0,e.useEffect)(()=>{ie({type:0,payload:!1})},[rt]);function ht(Ft){let Bt=Ft.target.id;ie({type:1,payload:Bt})}function wt(){ie({type:0,payload:!xe})}const Ct=(0,e.useMemo)(()=>{if(we){const{status:Ft}=we;return G.createElement(G.Fragment,null,X(we))}return null},[we]);function Te(){ie({type:0,payload:!0}),ie({type:1,payload:"1"}),ke()}return G.createElement("div",{className:"test-case-panel"},G.createElement("div",{className:`test-case-panel-body ${xe?"active":""}`},G.createElement("ul",{className:"s-navs"},G.createElement("li",null,G.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),G.createElement(k.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:G.createElement(Tt,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\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:te?"":Me,onChange:se}),rightNode:Qe?G.createElement(pe.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):we?Ct:G.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")})),G.createElement("a",{className:`btn-collapse ${xe?"up":""}`,onClick:wt},xe?G.createElement(D.Z,null):G.createElement(ae.Z,null)),G.createElement("footer",{className:"footer"},G.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),G.createElement("div",{className:"flex-container"},G.createElement(C.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),G.createElement(C.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),G.createElement(C.ZP,{className:"btn-green",type:"ghost",loading:Qe,onClick:Te},"\u8C03\u8BD5\u4EE3\u7801"),G.createElement(C.ZP,{type:"primary",className:"custom-ant-disabled",loading:ve,disabled:ve,onClick:()=>{ie({type:0,payload:!1}),Ze()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},99268:function(gt,Xe,n){"use strict";n.d(Xe,{h:function(){return e}});var e=(E=>(E[E.NOMATCH=-1]="NOMATCH",E[E.OK=0]="OK",E[E.TIMEOUT=2]="TIMEOUT",E[E.PODFAILURE=3]="PODFAILURE",E[E.COMPILEFAILURE=4]="COMPILEFAILURE",E[E.EXECUTEFAILURE=5]="EXECUTEFAILURE",E[E.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",E))(e||{})},87960:function(gt,Xe,n){"use strict";n.d(Xe,{Y2:function(){return rt},ZP:function(){return te}});var e=n(59301),E=n(14566),C=n(6767),D=n(62957),ae=n(77019),S=n(47889),Pe=n(99571),pe=n(62673),H=n(25399),o=n(37568),k={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",ut=n(47257),Fe=n.n(ut),G=n(79633),We=n(57193),ye=n(1012),Se=n(63949),J=n(9931),F=n(59301),me=Object.defineProperty,st=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Xt=(Me,Qe,ve)=>Qe in Me?me(Me,Qe,{enumerable:!0,configurable:!0,writable:!0,value:ve}):Me[Qe]=ve,_t=(Me,Qe)=>{for(var ve in Qe||(Qe={}))Tt.call(Qe,ve)&&Xt(Me,ve,Qe[ve]);if(W)for(var ve of W(Qe))Yt.call(Qe,ve)&&Xt(Me,ve,Qe[ve]);return Me},Ut=(Me,Qe)=>st(Me,Ie(Qe)),ce=(Me,Qe,ve)=>new Promise((ge,we)=>{var se=j=>{try{Ze(ve.next(j))}catch(ie){we(ie)}},ke=j=>{try{Ze(ve.throw(j))}catch(ie){we(ie)}},Ze=j=>j.done?ge(j.value):Promise.resolve(j.value).then(se,ke);Ze((ve=ve.apply(Me,Qe)).next())});const{Dragger:_}=E.default,X=Me=>{const Qe=ie=>ie&&ie.substring(0,ie.lastIndexOf("."));for(var ve=[...Me],ge=0,we=[],se=0;se\u7F16\u7A0B\u9898
'+(l==null?void 0:l.name),style:vd({},oe)}),pu.createElement("div",{className:uu.descBox},pu.createElement("div",{className:uu.title},pu.createElement("span",{style:{fontSize:"16px",color:"#666",marginRight:"8px"}},"\u5141\u8BB8\u7F16\u7A0B\u8BED\u8A00\uFF1A"),($e=l==null?void 0:l.languages)==null?void 0:$e.map((Pn,On,wl)=>pu.createElement(e.Fragment,{key:On},$l[Pn==null?void 0:Pn.language]))),pu.createElement("div",{className:uu.desc,style:{height:"max-content",maxHeight:"210px",overflowY:"auto"}},pu.createElement(F.Z,{value:'\u95EE\u9898\u63CF\u8FF0'+(l==null?void 0:l.description),style:{fontSize:"16px",color:"#000"}}))),O&&pu.createElement("div",{className:uu.solutionWrap},pu.createElement("div",null,pu.createElement(F.Z,{value:'\u53C2\u8003\u7B54\u6848'+((l==null?void 0:l.answer_text)||"\u6682\u65E0\u53C2\u8003\u7B54\u6848"),style:{color:"#000"}})),pu.createElement("div",null,pu.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((l==null?void 0:l.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))),(l==null?void 0:l.answer_status)!="not_started"&&pu.createElement("div",{style:{display:"flex",alignItems:"center",marginTop:"30px",fontWeight:500}},pu.createElement("span",{style:{fontSize:"18px",color:"#000",fontWeight:"500",marginRight:"10px"}},"\u7B54\u9898\u72B6\u6001"),xl[l==null?void 0:l.answer_status]),(l==null?void 0:l.answer_status)!="not_started"&&pu.createElement("div",{className:uu.descBox},pu.createElement("div",{className:uu.title},pu.createElement("span",{style:{fontSize:"16px",color:"#000",marginRight:"8px"}},"\u6700\u540E\u901A\u5173\u4EE3\u7801"),pu.createElement("span",{style:{fontSize:"14px",color:"#666"}},"(\u672A\u901A\u5173\u5219\u5C55\u793A\u6700\u540E\u7F16\u5199\u7684\u4EE3\u7801\u8BE6\u60C5)")),pu.createElement("div",{className:uu.desc,style:{backgroundColor:"#fff"}},pu.createElement(xn.ZP,{height:300,language:l==null?void 0:l.language,value:l!=null&&l.passed_code?qn.Base64.decode(l==null?void 0:l.passed_code):"",theme:"default",options:wn}))),(l==null?void 0:l.answer_status)!="not_started"&&!!Nt&&pu.createElement(ne.default,{style:{marginTop:"40px"},columns:[{title:"\u8BC4\u6D4B\u5E8F\u53F7",dataIndex:"query_index",width:80,render:(Pn,On,wl)=>pu.createElement("span",{style:{color:"#000"}},(an.page-1)*an.limit+wl+1)},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center",width:140,render:(Pn,On)=>pu.createElement("span",{style:{color:"#000"}},On!=null&&On.created_at?id()(On==null?void 0:On.created_at).format("YYYY-MM-DD HH:mm"):"--")},{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"status",key:"status",align:"center",render:(Pn,On)=>{var wl;return pu.createElement("span",{className:`${Pn===0?"c-green":"c-red"}`},(wl=Yn.Im[Pn])==null?void 0:wl.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}},{title:"\u64CD\u4F5C",align:"center",dataIndex:"code",key:"code",width:100,render:(Pn,On)=>pu.createElement("span",{style:{cursor:"pointer",color:"#3061d0"},onClick:()=>Pi(void 0,null,function*(){var wl,Qu,Pa;const xu=yield(0,sd.X6)(On==null?void 0:On.id);Pe.default.confirm({centered:!0,icon:null,width:700,okText:"\u5173\u95ED",autoFocusButton:null,cancelButtonProps:{style:{display:"none"}},title:"\u4EE3\u7801\u5185\u5BB9",content:pu.createElement("div",{className:"mb10"},pu.createElement(xn.ZP,{height:300,language:(wl=xu==null?void 0:xu.data)==null?void 0:wl.language,theme:"vs-light",value:(Qu=xu==null?void 0:xu.data)!=null&&Qu.code?qn.Base64.decode((Pa=xu==null?void 0:xu.data)==null?void 0:Pa.code):"",options:wn}))})})},"\u67E5\u770B\u4EE3\u7801")}].filter(Pn=>!!Pn),pagination:{total:Nt||0,onChange:(Pn,On)=>Pi(void 0,null,function*(){al({page:Pn,limit:On}),yield Dl()}),current:an==null?void 0:an.page,pageSize:an==null?void 0:an.limit,showTotal:Pn=>pu.createElement(pu.Fragment,null,"\u5171",pu.createElement("span",{className:"ml5 mr5",style:{color:"#3061d0"}},Pn),"\u6761\u6570\u636E")},dataSource:Qt})))};var gd=(0,D.connect)(({problemset:r})=>({problemset:r}))(fd),Ed=n(57764),pd=n(69367),_a={header_style:"header_style___Dx0vL",content:"content___RXnuY",legend:"legend___evR3g",legend_icon:"legend_icon___EEW5x",item_list:"item_list___Kl2Op",item_list_title:"item_list_title___NB3Cg",item_title:"item_title___koibo",item_top:"item_top___fIB7h",item_bottom:"item_bottom___wsbMe",box:"box___VtbZB",page_item_acitve:"page_item_acitve___FbAiG",top_content:"top_content___BwoGH",drag_style:"drag_style___t_nRF",page_item:"page_item____ovHq"},Ad=Object.defineProperty,hd=Object.defineProperties,yd=Object.getOwnPropertyDescriptors,Ts=Object.getOwnPropertySymbols,Cd=Object.prototype.hasOwnProperty,Fd=Object.prototype.propertyIsEnumerable,Ls=(r,u,l)=>u in r?Ad(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Gi=(r,u)=>{for(var l in u||(u={}))Cd.call(u,l)&&Ls(r,l,u[l]);if(Ts)for(var l of Ts(u))Fd.call(u,l)&&Ls(r,l,u[l]);return r},Ki=(r,u)=>hd(r,yd(u)),Bd=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const js={cursor:"move",transition:"unset"},$0=r=>{const{tag:u}=r,{listeners:l,transform:b,transition:O,isDragging:ct,setNodeRef:nt}=useSortable({id:u.id}),fe=ct&&b?Ki(Gi({},js),{transform:`translate3d(${b.x}px, ${b.y}px, 0)`,transition:"unset",zIndex:20,cursor:"pointer"}):Ki(Gi({},js),{transition:"none",zIndex:10,cursor:"pointer"});return React.createElement("div",Ki(Gi({style:fe,ref:nt},l),{className:styles.drag_style}),React.createElement("div",{className:styles.item_bottom},(u==null?void 0:u.id)==1?"\u4EA4\u4E921":"\u7ED1\u5B9A\u4EA4\u4E92"))},Dd=({globalSetting:r,interactiveOpen:u,onClose:l,maxPage:b,currentPage:O,paramsHttp:ct,handlePageClick:nt,currentPosition:fe})=>{var Q;const[Ue,Mt]=(0,e.useState)(!1),[yt,ft]=(0,e.useState)(!1),[Ve,$e]=(0,e.useState)("1");(0,e.useEffect)(()=>{Mt(u),ft(!1)},[u]);const[Kt,It]=(0,e.useState)([]),kt=()=>Bd(void 0,null,function*(){const Pt=yield(0,Se.ZP)(`/api/courses/${ct==null?void 0:ct.coursesId}/smart_plans/${ct==null?void 0:ct.id}/get_user_learn_records.json`,{method:"get"});(Pt==null?void 0:Pt.status)==0&&It(Pt==null?void 0:Pt.data)});(0,e.useEffect)(()=>{u&&kt()},[u]);const at=Pt=>{var dt,Et,mt,nn,oe,Qt,sn,an;((dt=Pt==null?void 0:Pt.active)==null?void 0:dt.id)==((Et=Pt==null?void 0:Pt.over)==null?void 0:Et.id)&&($e((mt=Pt==null?void 0:Pt.active)==null?void 0:mt.id),ft(!0)),(nn=Pt==null?void 0:Pt.over)!=null&&nn.id&&((oe=Pt==null?void 0:Pt.active)==null?void 0:oe.id)!=((Qt=Pt==null?void 0:Pt.over)==null?void 0:Qt.id)&&(console.log((sn=Pt==null?void 0:Pt.active)==null?void 0:sn.id),console.log((an=Pt==null?void 0:Pt.over)==null?void 0:an.id))};return e.createElement(Pe.default,{footer:null,title:null,closable:!1,open:Ue,width:"auto",centered:!0,bodyStyle:{padding:0,overflow:"hidden"}},e.createElement("div",{style:{display:"flex",alignItems:"center"}},e.createElement("div",{style:{width:"800px",height:"640px",padding:"20px"}},e.createElement("div",{style:{display:"flex",height:"30px",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{style:{fontSize:"16px",fontWeight:500}},"\u8BFE\u4EF6\u5B66\u4E60\u8FDB\u5EA6"),e.createElement("i",{className:"iconfont icon-guanbi11 font14",style:{cursor:"pointer"},onClick:()=>{l()}})),e.createElement("div",{className:_a.header_style},e.createElement("div",null,"\u7CFB\u7EDF\u5C06\u5B9E\u65F6\u8BB0\u5F55\u5B66\u751F\u7684\u5B66\u4E60\u5B8C\u6210\u60C5\u51B5\uFF0C\u5B8C\u6210\u5B66\u4E60\u89C4\u5219\u5982\u4E0B\uFF1A"),e.createElement("div",null,"1.\u5305\u542B\u4EA4\u4E92\u5185\u5BB9\u7684\u5E7B\u706F\u7247\uFF1A\u9700\u8981\u5B66\u751F\u5B8C\u6210\u6240\u6709\u4EA4\u4E92\u64CD\u4F5C\u624D\u53EF\u6807\u8BB0\u4E3A\u5B8C\u6210\u5B66\u4E60"),e.createElement("div",null,"2.\u65E0\u4EA4\u4E92\u5185\u5BB9\u7684\u5E7B\u706F\u7247\uFF1A\u5B66\u751F\u6301\u7EED\u89C2\u770B\u8FBE10\u79D2\u540E\u81EA\u52A8\u8BB0\u5F55\u4E3A\u5B8C\u6210\u5B66\u4E60")),e.createElement("div",{className:_a.content},e.createElement("div",{className:_a.legend},e.createElement("div",{className:_a.legend_icon,style:{background:"#2EC25B"}}),e.createElement("div",null,"\u5DF2\u5B8C\u6210\u5B66\u4E60\u7684\u5E7B\u706F\u7247"),e.createElement("div",{className:_a.legend_icon,style:{background:"#C8D2E0",marginLeft:"40px"}}),e.createElement("div",null,"\u672A\u5B8C\u6210\u5B66\u4E60\u7684\u5E7B\u706F\u7247")),e.createElement("div",{style:{height:"380px",overflowY:"auto"}},e.createElement("div",{className:_a.item_list},e.createElement("div",{className:_a.item_list_title},(Q=Array.from({length:Math.ceil((Kt==null?void 0:Kt.length)/5)},(Pt,dt)=>dt+1))==null?void 0:Q.map((Pt,dt)=>e.createElement("div",{className:_a.item_title},e.createElement("div",{className:_a.item_top},e.createElement("div",null,"\u5E7B\u706F\u7247"),e.createElement("div",null,"\u9875\xA0\xA0\xA0\u7801")),e.createElement("div",{className:_a.item_bottom},"\u4EA4\xA0\xA0\xA0\u4E92")))),e.createElement("div",{className:_a.box}," ",Kt==null?void 0:Kt.map(Pt=>{var dt,Et,mt;return e.createElement("div",{className:Pt!=null&&Pt.learn_finish?_a.page_item_acitve:_a.page_item,style:{background:fe===(Pt==null?void 0:Pt.position)?"rgba(48, 97, 208, 0.2)":""}},e.createElement("div",{className:_a.item_top,onClick:()=>{nt(Pt==null?void 0:Pt.position)}},e.createElement("div",{className:_a.top_content},Pt==null?void 0:Pt.position)),!!((dt=Pt==null?void 0:Pt.module_sort)!=null&&dt.length)&&e.createElement("div",{className:_a.drag_style,onClick:()=>{nt(Pt==null?void 0:Pt.position)}},e.createElement("div",{className:_a.item_bottom},(mt=(Et=Pt==null?void 0:Pt.module_sort)==null?void 0:Et.map((nn,oe)=>`\u4EA4\u4E92${oe+1}`))==null?void 0:mt.join(" "))))}))))))))};var xd=(0,D.connect)(({globalSetting:r})=>({globalSetting:r}))(Dd),ol=n(59301),wd=Object.defineProperty,Sd=Object.defineProperties,bd=Object.getOwnPropertyDescriptors,Zs=Object.getOwnPropertySymbols,Id=Object.prototype.hasOwnProperty,Md=Object.prototype.propertyIsEnumerable,zs=(r,u,l)=>u in r?wd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,_i=(r,u)=>{for(var l in u||(u={}))Id.call(u,l)&&zs(r,l,u[l]);if(Zs)for(var l of Zs(u))Md.call(u,l)&&zs(r,l,u[l]);return r},Ji=(r,u)=>Sd(r,bd(u)),Io=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const Nd=({user:r,officeToken:u,classroomList:l,globalSetting:b,loading:O,problemset:ct,dispatch:nt,pageCache:fe,pageNum:Q,maxPage:Ue,aiImg:Mt,changePage:yt,isSimulate:ft,gotoSlide:Ve})=>{var $e,Kt,It,kt,at,Pt,dt,Et,mt,nn,oe,Qt,sn,an,al,Nt,$t,Rn,Jt,wn,Ml,$l,xl,Dl,Pn,On,wl,Qu,Pa,xu,Ju,Oa,er,ha,Ou,la,Ja,nr,Pr,Or,Rr,gr,Qr,or,kr,lr,Br,Yr,Dr,Tr,eu,Ra,Sa,Er,pr,ka,Ar,xr,mn,Vr,Eo,Wr,Lr,uo,No,ao,Hr,hr,Po,po;const[Jl,Gr]=(0,e.useState)(0),ja=(0,D.useParams)(),[Ko,Ao]=(0,e.useState)(!1),[ro,Xa]=(0,e.useState)(!1),[Xu,Kr]=(0,e.useState)(0),[ml,ho]=(0,e.useState)([]),_r=(0,e.useRef)(null),qa=(0,e.useRef)([]),[oo,jr]=(0,e.useState)(!1),[Ya,Oo]=(0,e.useState)(null),[io,_o]=(0,e.useState)([]),[Ro,ko]=(0,e.useState)(!1),[Jo,ir]=(0,e.useState)(!1),[Za]=(0,D.useSearchParams)(),[so,To]=(0,e.useState)(!1),{SmartPlanItemBanks:_e}=l,[Xo,Lo]=(0,e.useState)(),[Ta,co]=(0,e.useState)(""),wr=(0,e.useRef)(null),Wa=(0,e.useRef)(null);(0,e.useEffect)(()=>{var Wn;((Wn=_e==null?void 0:_e.page)==null?void 0:Wn.current_limit_time)>0?co(_e.page.current_limit_time+1):co("")},[($e=_e==null?void 0:_e.page)==null?void 0:$e.current_limit_time]);const jo=()=>{if(!wr.current)return Ta;const Wn=Math.floor((Date.now()-wr.current)/1e3);return Math.max(0,Ta-Wn)},yo=()=>{const Wn=jo();if(co(Wn),Wn<=0){Wa.current&&(clearTimeout(Wa.current),Wa.current=null),setTimeout(()=>{Lo(new Date),on()},2e3);return}Wa.current&&clearTimeout(Wa.current),Wa.current=setTimeout(yo,1e3)};(0,e.useEffect)(()=>{if(Ta<=0)return;Ta==1&&setTimeout(()=>{S.ZP.warning("\u7B54\u9898\u7ED3\u675F\uFF0C\u65E0\u6CD5\u7EE7\u7EED\u63D0\u4EA4")},1e3),wr.current=Date.now(),yo();const Wn=()=>{document.hidden?Wa.current&&(clearTimeout(Wa.current),Wa.current=null):!Wa.current&&Ta>0&&(wr.current=Date.now()-(Ta-jo())*1e3,yo())};return document.addEventListener("visibilitychange",Wn),()=>{Wa.current&&clearTimeout(Wa.current),document.removeEventListener("visibilitychange",Wn)}},[Ta]);const Zo=Wn=>{const Nl=Math.floor(Wn/60),Ru=Wn%60;return`${String(Nl).padStart(2,"0")}:${String(Ru).padStart(2,"0")}`},qo={item_bank:"\u8BD5\u9898\u4F5C\u7B54",ai_qna:"\u667A\u6167\u4F34\u5B66",page_info:"\u9605\u8BFB\u89E3\u6790",animation_code:"\u52A8\u6548\u5B66\u4E60"},Ci={page_info:"1",ai_qna:"2",item_bank:"4"},[sr,Co]=(0,e.useState)({defaultValue:"",open:0,language:"",placement:"right",height:"100vh"}),[zo,Sr]=(0,e.useState)(""),Jr=(0,e.useRef)(null),et=(0,e.useRef)(null);(0,e.useEffect)(()=>{var Wn;((Wn=_e==null?void 0:_e.page)==null?void 0:Wn.animation_code)!==""&&(clearTimeout(et.current),et.current=setTimeout(()=>{var Nl;const Ru=document.createElement("iframe");Ru.style.width="100%",Ru.style.height="100%",Ru.style.overflow="auto",Ru.style.border="0";const qu=mu=>{try{const ia=mu.documentElement.scrollHeight;Ru.style.height=`${Math.max(ia+10,400)}px`,ia||setTimeout(()=>{qu(mu)},1e3)}catch(ia){console.error("\u65E0\u6CD5\u8BBF\u95EE iframe \u5185\u5BB9",ia)}};if(Jr.current){Jr.current.innerHTML="",Jr.current.appendChild(Ru);const mu=Ru.contentDocument||Ru.contentWindow.document;mu.open(),mu.write((Nl=_e==null?void 0:_e.page)==null?void 0:Nl.animation_code),mu.documentElement.scrollHeight,qu(mu),setTimeout(()=>{qu(mu)},1e3)}},1e3))},[(Kt=_e==null?void 0:_e.page)==null?void 0:Kt.animation_code,sr.open,Xu,zo]),(0,e.useEffect)(()=>{var Wn;if(Q){const Nl=((Wn=_e==null?void 0:_e.page)==null?void 0:Wn.lesson_mode)==="self_learning";(!Nl||Nl&&_r.current!==Q)&&on()}_r.current=Q},[Q,Jl,fe==null?void 0:fe.randomData]),(0,e.useEffect)(()=>{qa.current=[]},[Jl]),(0,e.useEffect)(()=>{Gr(0),Kr(0),ko(!1),ir(!1)},[Q]);const on=()=>Io(void 0,null,function*(){Ao(!0);const Wn=yield nt({type:"classroomList/getSmartPlanItemBanks",payload:{course_id:ja==null?void 0:ja.coursesId,id:ja==null?void 0:ja.id,position:Q,max_position:Ue,is_simulate:ft||null}});Ao(!1)});(0,e.useEffect)(()=>{var Wn,Nl,Ru,qu;Co(Ji(_i({},sr),{defaultValue:(Wn=_e==null?void 0:_e.page)==null?void 0:Wn.animation_code})),Sr(new Date),Xl((Nl=_e==null?void 0:_e.item_banks)==null?void 0:Nl[Jl]),_e!=null&&_e.relation_positions&&yt(_e==null?void 0:_e.relation_positions);let mu=[];mu=(qu=(Ru=_e==null?void 0:_e.page)==null?void 0:Ru.module_sort)==null?void 0:qu.map((ia,Zr)=>({key:Zr+1,label:qo[ia]})),console.log("items---",mu),ho([...mu||[]])},[_e]);const Hn=Wn=>Io(void 0,null,function*(){var Nl,Ru,qu,mu,ia;(Wn==null?void 0:Wn.length)!==0&&(yield(0,Se.ZP)(`/api/smart_plan_item_banks/${(Nl=_e==null?void 0:_e.page)==null?void 0:Nl.id}/user_answers.json`,{method:"post",body:{item_bank_id:(qu=(Ru=_e==null?void 0:_e.item_banks)==null?void 0:Ru[Jl])==null?void 0:qu.id,item_choice_id:((ia=(mu=_e==null?void 0:_e.item_banks)==null?void 0:mu[Jl])==null?void 0:ia.item_type)=="MULTIPLE"?Wn:Wn==null?void 0:Wn[0],is_simulate:ft||null,is_answered:!1}}))}),Wl=()=>Io(void 0,null,function*(){var Wn,Nl,Ru,qu,mu;if(qa.current.length===0){S.ZP.warning("\u8BF7\u60A8\u4F5C\u7B54\u540E\u518D\u63D0\u4EA4");return}jr(!0);const ia=yield(0,Se.ZP)(`/api/smart_plan_item_banks/${(Wn=_e==null?void 0:_e.page)==null?void 0:Wn.id}/user_answers.json`,{method:"post",body:{item_bank_id:(Ru=(Nl=_e==null?void 0:_e.item_banks)==null?void 0:Nl[Jl])==null?void 0:Ru.id,item_choice_id:((mu=(qu=_e==null?void 0:_e.item_banks)==null?void 0:qu[Jl])==null?void 0:mu.item_type)=="MULTIPLE"?qa.current:qa.current[0],is_simulate:ft||null,is_answered:!0}});jr(!1),(ia==null?void 0:ia.status)===0&&(yield on(),S.ZP.success("\u63D0\u4EA4\u6210\u529F"))}),Xl=Wn=>{var Nl,Ru;if(fe!=null&&fe.is_end){if(_e!=null&&_e.allow_answer_after_end&&!(Wn!=null&&Wn.is_answered)){Xa(!1);return}Xa(!0);return}switch((Nl=_e==null?void 0:_e.page)==null?void 0:Nl.solution_visibility){case"hidden":Xa(!1);break;case"show_after_edit":Wn!=null&&Wn.is_answered?Xa(!0):Xa(!1);break;case"show_after_submission":((Ru=_e==null?void 0:_e.page)==null?void 0:Ru.status)==="ended"?Xa(!0):Xa(!1);break;case"show_after_ended":fe!=null&&fe.is_end?Xa(!0):Xa(!1);break;default:Xa(!1)}},_n=(Wn=0)=>{var Nl,Ru,qu,mu;switch((Nl=ml==null?void 0:ml[Wn])==null?void 0:Nl.label){case"\u8BD5\u9898\u4F5C\u7B54":return((Ru=_e==null?void 0:_e.item_banks)==null?void 0:Ru.length)&&((qu=_e==null?void 0:_e.item_banks)==null?void 0:qu.every(ia=>ia==null?void 0:ia.is_answered));case"\u667A\u6167\u4F34\u5B66":return((mu=_e==null?void 0:_e.page)==null?void 0:mu.finish_ai_qna)||Ro;case"\u9605\u8BFB\u89E3\u6790":return(_e==null?void 0:_e.page.finish_read_page_info)||Jo;case"\u52A8\u6548\u5B66\u4E60":return!0}};(0,e.useEffect)(()=>{var Wn;Xl((Wn=_e==null?void 0:_e.item_banks)==null?void 0:Wn[Jl])},[Jl]);const tu=()=>{if(!_n()){S.ZP.info("\u8BF7\u5B8C\u6210\u672C\u9636\u6BB5\u7684\u5B66\u4E60\u4EFB\u52A1");return}Kr(1)},aa=()=>Io(void 0,null,function*(){var Wn,Nl,Ru,qu,mu,ia,Zr,Ti;if((Nl=(Wn=_e==null?void 0:_e.item_banks)==null?void 0:Wn[Jl])!=null&&Nl.hack_identifier){const zr=yield(0,Os.nF)({id:(qu=(Ru=_e==null?void 0:_e.item_banks)==null?void 0:Ru[Jl])==null?void 0:qu.hack_identifier});if((zr==null?void 0:zr.status)===0){const Li=window.open(`/myproblems/${zr==null?void 0:zr.identifier}?type=smartPlan&exercisesId=${ja==null?void 0:ja.id}&coursesId=${ja==null?void 0:ja.coursesId}&questionId=${(ia=(mu=_e==null?void 0:_e.item_banks)==null?void 0:mu[Jl])==null?void 0:ia.id}&smartPlanItemBankId=${(Ti=(Zr=_e==null?void 0:_e.item_banks)==null?void 0:Zr[Jl])==null?void 0:Ti.smart_plan_page_item_bank_id}&isSimulate=${ft}&is_smart_plan=true`,"_blank");Oo(Li),io.push(Li),_o([...io])}}}),tn=()=>{if(ml!=null&&ml.length){const Wn=ml==null?void 0:ml.findIndex(Nl=>(Nl==null?void 0:Nl.label)=="\u8BD5\u9898\u4F5C\u7B54");return Wn>-1?Wn==0?_n(0):_n(1):!0}else return!0};return(0,e.useEffect)(()=>{var Wn,Nl;if(!Ya||Ya.closed||((Nl=(Wn=_e==null?void 0:_e.item_banks)==null?void 0:Wn[Jl])==null?void 0:Nl.item_type)!="PROGRAM")return;const Ru=()=>{var mu,ia;const Zr={type:"showIntelligentTeacherStatus",aiStatus:(mu=_e==null?void 0:_e.page)==null?void 0:mu.enable_ai_tutor,questionStatus:((ia=_e==null?void 0:_e.page)==null?void 0:ia.status)==="ended",SmartPlanItemBanks:_e};Ya.postMessage(Zr,"*")};if(Ya.document.readyState==="complete")setTimeout(()=>{Ru()},3e3);else{const mu=()=>{Ru(),Ya.removeEventListener("load",mu)};Ya.addEventListener("load",mu)}const qu=()=>Io(void 0,null,function*(){console.log("\u5B50\u7A97\u53E3\u5DF2\u5173\u95ED")});return Ya==null||Ya.addEventListener("unload",qu),()=>{Ya==null||Ya.removeEventListener("unload",qu)}},[Ya,_e,Xu,Jl]),ol.createElement("section",null,ol.createElement(ye.Z,{spinning:!1},(_e==null?void 0:_e.smart_plan_status)=="not_started"&&!(_e!=null&&_e.is_simulate)?ol.createElement(Il.Z,{styles:{margin:"35vh auto"},customText:"\u6682\u672A\u5F00\u8BFE"}):ol.createElement("div",{className:Da.box},ol.createElement("div",{className:Da.box_header,style:{height:Xu==1?"140px":"95px"}},ol.createElement("div",{className:Da.box_wrap},!!ml.length&&ol.createElement("div",{className:Da.progressbarWrap},ol.createElement("div",{className:`${Da.progressItem} ${Xu==0?Da.activeWrap:""}`,onClick:()=>Io(void 0,null,function*(){Kr(0),yield on()})},ml.length>1&&(_n()?ol.createElement("i",{className:"iconfont icon-duigou mr10 font24",style:{color:"#3061D0"}}):ol.createElement("div",{className:Da.circle},"1")),ol.createElement("div",null,(It=ml==null?void 0:ml[0])==null?void 0:It.label),Xu==0&&((kt=ml==null?void 0:ml[0])==null?void 0:kt.label)=="\u8BD5\u9898\u4F5C\u7B54"&&Ta&&((at=_e==null?void 0:_e.page)==null?void 0:at.status)=="in_progress"?ol.createElement("span",{className:Da.daojishi},ol.createElement("i",{className:"iconfont icon-dingbu-shiyanhuanjingdaojishi mr5"}),ol.createElement("span",{style:{width:"45px"}},Zo(Ta))):ol.createElement("span",null),Xu==0&&((Pt=ml==null?void 0:ml[0])==null?void 0:Pt.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((dt=_e==null?void 0:_e.page)==null?void 0:dt.status)=="ended"?ol.createElement("span",{className:Da.datijieshu},"\u7B54\u9898\u5DF2\u7ED3\u675F"):ol.createElement("span",null)),ml.length>1&&ol.createElement(ol.Fragment,null,ol.createElement("img",{src:n(922),width:46,height:10,style:{marginLeft:"10px",marginRight:"10px"}}),ol.createElement("div",{className:`${Da.progressItem} ${Xu==1?Da.activeWrap:""}`,onClick:()=>Io(void 0,null,function*(){tu(),_n()&&(yield on())})},_n(0)&&_n(1)?ol.createElement("i",{className:"iconfont icon-duigou mr10 font24",style:{color:"#3061D0"}}):ol.createElement("div",{className:Da.circle},"2"),ol.createElement("div",null,(Et=ml==null?void 0:ml[1])==null?void 0:Et.label),Xu==1&&((mt=ml==null?void 0:ml[1])==null?void 0:mt.label)=="\u8BD5\u9898\u4F5C\u7B54"&&Ta&&((nn=_e==null?void 0:_e.page)==null?void 0:nn.status)=="in_progress"?ol.createElement("span",{className:Da.daojishi},ol.createElement("i",{className:"iconfont icon-dingbu-shiyanhuanjingdaojishi mr5"}),ol.createElement("span",{style:{width:"45px"}},Zo(Ta))):ol.createElement("span",null),Xu==1&&((oe=ml==null?void 0:ml[1])==null?void 0:oe.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((Qt=_e==null?void 0:_e.page)==null?void 0:Qt.status)=="ended"?ol.createElement("span",{className:Da.datijieshu},"\u7B54\u9898\u5DF2\u7ED3\u675F"):ol.createElement("span",null)))),ol.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center"}},!ft&&ol.createElement("div",{className:Da.box_botton,style:{marginRight:"20px"},onClick:()=>{To(!0)}},ol.createElement("img",{src:n(49324),width:18}),ol.createElement("div",{style:{color:"#5F6A95",marginLeft:"5px"}},"\u5B66\u4E60\u8FDB\u5EA6")),ol.createElement("div",{className:Da.quit,onClick:()=>{D.history.push(`/classrooms/${ja==null?void 0:ja.coursesId}/smart_plan`)}},ol.createElement("i",{className:"iconfont icon-tuichukejian",style:{width:"16px",height:"16px",marginTop:"2px"}}),ol.createElement("div",{style:{marginLeft:"5px"}},"\u9000\u51FA\u5B66\u4E60"))))),ol.createElement("div",{className:Da.mainContent,style:{height:Xu==1?((sn=ml==null?void 0:ml[Xu])==null?void 0:sn.label)=="\u8BD5\u9898\u4F5C\u7B54"?"calc(100vh - 220px)":"calc(100vh - 140px)":((an=ml==null?void 0:ml[Xu])==null?void 0:an.label)=="\u8BD5\u9898\u4F5C\u7B54"?"calc(100vh - 175px)":"calc(100vh - 95px)"}},!(ml!=null&&ml.length)&&ol.createElement("div",null,ol.createElement(Il.Z,{customText:"\u672C\u9875\u91CD\u70B9\u4E3A\u638C\u63E1\u5DE6\u4FA7\u5E7B\u706F\u7247\u7684\u77E5\u8BC6\u8981\u70B9\uFF0C\u8BF7\u8BA4\u771F\u9605\u8BFB\u3002"})),((al=ml==null?void 0:ml[Xu])==null?void 0:al.label)=="\u667A\u6167\u4F34\u5B66"&&ol.createElement(Ed.Z,{onNextButtonClick:()=>{tu(),on()},style:{height:"100%"},onStatusChange:Wn=>{ko(Wn)},showNextButton:Xu+1!=(ml==null?void 0:ml.length),showInterText:(u==null?void 0:u.Status)=="ended"||(fe==null?void 0:fe.is_end),interactionTotal:(Nt=_e==null?void 0:_e.page)==null?void 0:Nt.knowledge_size,initDefaultChatDataKey:(($t=_e==null?void 0:_e.page)==null?void 0:$t.id)+((Rn=_e==null?void 0:_e.page)==null?void 0:Rn.update_size),defaultChatData:(Jt=_e==null?void 0:_e.student_qna_records)==null?void 0:Jt.knowledge,data:{ppt_url:Mt==null?void 0:Mt.map(Wn=>Wn==null?void 0:Wn.url),questionable_type:"SmartPlanItemBank",questionable_id:(wn=_e==null?void 0:_e.page)==null?void 0:wn.id,position:Q,type:11,scene_type:ft?13:null}}),((Ml=ml==null?void 0:ml[Xu])==null?void 0:Ml.label)=="\u9605\u8BFB\u89E3\u6790"&&ol.createElement(pd.Z,{onNextButtonClick:()=>{tu(),on()},style:{height:"100%"},openRecord:(($l=_e==null?void 0:_e.page)==null?void 0:$l.finish_read_page_info)===!1,showNextButton:Xu+1!=(ml==null?void 0:ml.length),showInterText:(u==null?void 0:u.Status)=="ended"||(fe==null?void 0:fe.is_end),onStatusChange:Wn=>{ir(Wn)},readingTime:(xl=_e==null?void 0:_e.page)==null?void 0:xl.info_read_time,analysis:(Dl=_e==null?void 0:_e.page)==null?void 0:Dl.page_info,totalTime:(Pn=_e==null?void 0:_e.page)==null?void 0:Pn.info_read_min_time,initDefaultChatDataKey:(On=_e==null?void 0:_e.page)==null?void 0:On.id,defaultChatData:(wl=_e==null?void 0:_e.student_qna_records)==null?void 0:wl.page_info,data:{ppt_url:Mt==null?void 0:Mt.map(Wn=>Wn==null?void 0:Wn.url),questionable_type:"SmartPlanItemBank",questionable_id:(Qu=_e==null?void 0:_e.page)==null?void 0:Qu.id,position:Q,type:10,scene_type:ft?13:null}}),ol.createElement("div",{style:{padding:"0px 20px"}},ol.createElement(Ql.Z,{key:zo,defaultValue:sr.defaultValue,open:sr.open,onOpenChange:Wn=>{Co(Ji(_i({},sr),{open:0}))},language:sr.language,height:sr.height,showExtra:!1}),((Pa=ml==null?void 0:ml[Xu])==null?void 0:Pa.label)=="\u52A8\u6548\u5B66\u4E60"&&((xu=_e==null?void 0:_e.page)==null?void 0:xu.animation_code)&&ol.createElement("div",{className:Da.code_style},ol.createElement("div",{style:{display:"flex",alignItems:"center"}},ol.createElement("div",{style:{color:"#333",fontWeight:500,fontSize:"14px"}},"\u667A\u80FD\u52A8\u6548"),ol.createElement(H.Z,{title:"\u5168\u5C4F\u5C55\u793A"},ol.createElement("i",{className:"iconfont icon-quanping5 font14",style:{marginLeft:"auto",color:"#3061D0",cursor:"pointer"},onClick:()=>{Co(Ji(_i({},sr),{open:sr.open+1}))}}))),ol.createElement("div",{className:"mt10",ref:Jr})),((Ju=ml==null?void 0:ml[Xu])==null?void 0:Ju.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((Oa=_e==null?void 0:_e.item_banks)!=null&&Oa[Jl]&&((ha=["in_progress","ended"])!=null&&ha.includes((er=_e==null?void 0:_e.page)==null?void 0:er.status))?ol.createElement(ol.Fragment,null,ol.createElement("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center"}},((la=(Ou=_e==null?void 0:_e.item_banks)==null?void 0:Ou[Jl])==null?void 0:la.item_type)==="SINGLE"&&ol.createElement($c,{questionIndex:((Ja=_e==null?void 0:_e.item_banks)==null?void 0:Ja.length)>1?Jl+1:0,question:(nr=_e==null?void 0:_e.item_banks)==null?void 0:nr[Jl],questionChoiceIdsRef:qa,changeChoiceIds:Hn,pageCache:fe,solutionVis:ro,pageInfo:_e==null?void 0:_e.page,SmartPlanItemBanks:_e}),((Or=(Pr=_e==null?void 0:_e.item_banks)==null?void 0:Pr[Jl])==null?void 0:Or.item_type)==="MULTIPLE"&&ol.createElement(Hc,{questionIndex:((Rr=_e==null?void 0:_e.item_banks)==null?void 0:Rr.length)>1?Jl+1:0,question:(gr=_e==null?void 0:_e.item_banks)==null?void 0:gr[Jl],questionChoiceIdsRef:qa,changeChoiceIds:Hn,pageCache:fe,solutionVis:ro,pageInfo:_e==null?void 0:_e.page,SmartPlanItemBanks:_e}),((or=(Qr=_e==null?void 0:_e.item_banks)==null?void 0:Qr[Jl])==null?void 0:or.item_type)==="JUDGMENT"&&ol.createElement(rd,{questionIndex:((kr=_e==null?void 0:_e.item_banks)==null?void 0:kr.length)>1?Jl+1:0,question:(lr=_e==null?void 0:_e.item_banks)==null?void 0:lr[Jl],questionChoiceIdsRef:qa,changeChoiceIds:Hn,pageCache:fe,solutionVis:ro,pageInfo:_e==null?void 0:_e.page,SmartPlanItemBanks:_e}),((Yr=(Br=_e==null?void 0:_e.item_banks)==null?void 0:Br[Jl])==null?void 0:Yr.item_type)==="PROGRAM"&&ol.createElement(gd,{questionIndex:((Dr=_e==null?void 0:_e.item_banks)==null?void 0:Dr.length)>1?Jl+1:0,question:(Tr=_e==null?void 0:_e.item_banks)==null?void 0:Tr[Jl],questionChoiceIdsRef:qa,SmartPlanItemBanks:_e,pageCache:fe,solutionVis:ro,handleRefresh:on,childWindow:Ya,closeProgram:Xo,setCloseProgram:Lo,childsWindow:io}),((eu=ml==null?void 0:ml[Xu])==null?void 0:eu.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((u==null?void 0:u.Status)=="ended"||(fe==null?void 0:fe.is_end))&&!(_e!=null&&_e.allow_answer_after_end)&&!((Sa=(Ra=_e==null?void 0:_e.item_banks)==null?void 0:Ra[Jl])!=null&&Sa.is_answered)&&ol.createElement("div",{className:"flex justify-center mb20 mt20"},"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u7ED3\u675F\uFF0C\u65E0\u6CD5\u8FDB\u884C\u64CD\u4F5C"))):_e!=null&&_e.is_extra?fe!=null&&fe.enable_extra?"\u6E29\u99A8\u63D0\u793A\uFF1A\u5F53\u524D\u9875\u9762\u6682\u65E0\u62D3\u5C55\u4E60\u9898\uFF0C\u53EF\u4EE5\u5411\u6388\u8BFE\u6559\u5E08\u5EFA\u8BAE\u8865\u5145\u3002":"\u6E29\u99A8\u63D0\u793A\uFF1A\u5B8C\u6210\u5F53\u524D\u8BFE\u4EF6\u7684\u6240\u6709\u57FA\u7840\u9898\u540E\uFF0C\u4F60\u624D\u53EF\u4EE5\u89E3\u9501\u62D3\u5C55\u7EC3\u4E60\u54E6\u3002":ol.createElement(Il.Z,{customText:"\u5F53\u524D\u5B66\u4E60\u5185\u5BB9\u5305\u542B\u8BD5\u9898\u4F5C\u7B54\u73AF\u8282\uFF0C\u5728\u8001\u5E08\u542F\u52A8\u7B54\u9898\u540E\u5373\u53EF\u4F5C\u7B54\u3002"})))),((Er=ml==null?void 0:ml[Xu])==null?void 0:Er.label)=="\u8BD5\u9898\u4F5C\u7B54"&&((ka=["in_progress","ended"])==null?void 0:ka.includes((pr=_e==null?void 0:_e.page)==null?void 0:pr.status))&&ol.createElement("div",{className:Da.page_footer},((Ar=_e==null?void 0:_e.item_banks)==null?void 0:Ar.length)>1&&((xr=Array.from({length:_e==null?void 0:_e.count},(Wn,Nl)=>Nl+1))==null?void 0:xr.map((Wn,Nl)=>ol.createElement("div",{key:Nl,className:Nl==Jl?Da.num_style_active:Da.num_style,onClick:()=>{Gr(Nl)}},Wn))),ol.createElement("div",{style:{marginLeft:"auto",display:"flex",alignItems:"center"}},Jl>0?ol.createElement("div",{className:Da.button1,onClick:()=>{Jl>0&&Gr(Jl-1)}},"\u4E0A\u4E00\u9898"):null,Jl+1<(_e==null?void 0:_e.count)?ol.createElement("div",{className:Da.button1,style:{marginLeft:"10px"},onClick:()=>{Jl<(_e==null?void 0:_e.count)&&Gr(Jl+1)}},"\u4E0B\u4E00\u9898"):null,((Vr=(mn=_e==null?void 0:_e.item_banks)==null?void 0:mn[Jl])==null?void 0:Vr.item_type)!="PROGRAM"&&!((Wr=(Eo=_e==null?void 0:_e.item_banks)==null?void 0:Eo[Jl])!=null&&Wr.is_answered)&&(((Lr=_e==null?void 0:_e.page)==null?void 0:Lr.status)!="ended"||ft||fe!=null&&fe.is_end&&(_e!=null&&_e.allow_answer_after_end)&&((uo=_e==null?void 0:_e.page)==null?void 0:uo.status)=="ended")?ol.createElement(ut.ZP,{className:"ml10",type:"primary",loading:oo,onClick:()=>{Wl()}},"\u63D0\u4EA4"):null,((ao=(No=_e==null?void 0:_e.item_banks)==null?void 0:No[Jl])==null?void 0:ao.item_type)=="PROGRAM"&&!((hr=(Hr=_e==null?void 0:_e.item_banks)==null?void 0:Hr[Jl])!=null&&hr.is_answered)&&(((Po=_e==null?void 0:_e.page)==null?void 0:Po.status)!="ended"||ft||fe!=null&&fe.is_end&&(_e!=null&&_e.allow_answer_after_end)&&((po=_e==null?void 0:_e.page)==null?void 0:po.status)=="ended")?ol.createElement(ut.ZP,{className:"ml10",type:"primary",onClick:()=>{aa()}},"\u8FDB\u5165\u7B54\u9898"):null,_n()&&(Xu==1||Xu==0&&(ml==null?void 0:ml.length)==2)?ol.createElement(ut.ZP,{type:"primary",className:"ml10",onClick:()=>{Xu==1?Kr(0):Kr(1)}},Xu==1?"\u8FD4\u56DE\u4E0A\u4E00\u9636\u6BB5":"\u8FDB\u5165\u4E0B\u4E00\u9636\u6BB5"):null)),ol.createElement(xd,{interactiveOpen:so,maxPage:Ue,onClose:()=>To(!1),currentPage:Q,paramsHttp:ja,handlePageClick:Wn=>{var Nl;if(!(_e!=null&&_e.enable_progress_control)){S.ZP.warning("\u4E0D\u5141\u8BB8\u7FFB\u9875\uFF0C\u5DF2\u5F3A\u5236\u8DDF\u968F\u6559\u5E08\u8FDB\u5EA6\u81EA\u52A8\u7FFB\u9875");return}if(Wn>(fe==null?void 0:fe.class_max_position)&&(u==null?void 0:u.Status)=="in_progress"&&((Nl=_e==null?void 0:_e.page)==null?void 0:Nl.lesson_mode)=="online_lesson"){S.ZP.warning("\u8BE5\u9875\u672A\u8BB2\u89E3\uFF0C\u5C06\u8DF3\u8F6C\u81F3\u6559\u5E08\u5F53\u524D\u9875\u9762"),Ve(fe==null?void 0:fe.page);return}Ve(Wn)},currentPosition:Q}))))};var Pd=(0,D.connect)(({user:r,classroomList:u,loading:l,globalSetting:b,problemset:O})=>({user:r,classroomList:u,globalSetting:b,loading:l.effects,problemset:O}))(Nd),Va={box:"box___TOI8U",code_style:"code_style___HqBfy",box_header:"box_header___aw0DM",header_title:"header_title___aeL59",ewm:"ewm___vQtyb",ewm_img:"ewm_img___qqWwF",ewm_text:"ewm_text___i4Jyd",question_buuton:"question_buuton___dQRn4",selectQuestion:"selectQuestion___ziNOo",addQuestion:"addQuestion___aHncw",submit_button:"submit_button___KEeMK",evalueWrap:"evalueWrap___NEAE5",evalueSty:"evalueSty___Fk0S3",title:"title___Mq_RW",label:"label___ZOLLS",asnCont:"asnCont___wrZOg",ansWrap:"ansWrap____M3UH",page_footer:"page_footer___bYve1",num_style:"num_style___dooAY",num_style_active:"num_style_active___tFy8m",question_add:"question_add___WXNyb",yulan_style:"yulan_style___shO_G",yulan_style_end:"yulan_style_end___gxZaC"},Od=Object.defineProperty,Us=Object.getOwnPropertySymbols,Rd=Object.prototype.hasOwnProperty,kd=Object.prototype.propertyIsEnumerable,Qs=(r,u,l)=>u in r?Od(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Ys=(r,u)=>{for(var l in u||(u={}))Rd.call(u,l)&&Qs(r,l,u[l]);if(Us)for(var l of Us(u))kd.call(u,l)&&Qs(r,l,u[l]);return r};const Td=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{const[O,ct]=(0,e.useState)({}),[nt,fe]=(0,e.useState)([]),Q={fontSize:"18px"},Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,e.useEffect)(()=>{const yt=(0,Bt.cloneDeep)(l);ct(yt),fe(yt.choices)},[l]);const Mt=(yt=!1)=>{let ft="";return nt.forEach((Ve,$e)=>{yt?Ve!=null&&Ve.me_answered&&(ft=ft+Ue[$e]):Ve!=null&&Ve.is_answer&&(ft=ft+Ue[$e])}),ft};return e.createElement("div",null,e.createElement("div",{className:En.questionWrap},e.createElement(F.Z,{value:'\u591A\u9009\u9898
'+(O==null?void 0:O.name),style:Ys({},Q)}),nt==null?void 0:nt.map((yt,ft)=>{const{is_answer:Ve,checked:$e,choice_text:Kt,me_answered:It}=yt;let kt="";return Ve&&(kt=En.rightAnswerBox),!Ve&&($e||It)&&(kt=En.errorAnswerBox),e.createElement(U.Z,{key:ft,className:`${En.choiceBox} ${kt}`,align:"middle",wrap:!1,style:{cursor:"pointer",marginTop:ft==0?"30px":"20px"}},e.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:En.choiceIndex},Ue[ft]),e.createElement(z.Z,{flex:1,className:"ml30"},e.createElement(F.Z,{className:En.html,value:Kt,style:Ys({},Q)})),Ve&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),!Ve&&($e||It)&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))})),e.createElement("div",{className:En.solutionWrap},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),e.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Mt(!1))),e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),nt.find(yt=>yt==null?void 0:yt.me_answered)?e.createElement(e.Fragment,null,(()=>{const yt=nt.map((It,kt)=>It!=null&&It.me_answered?kt:-1).filter(It=>It!==-1),ft=nt.map((It,kt)=>It!=null&&It.is_answer?kt:-1).filter(It=>It!==-1),$e=yt.length===ft.length&&yt.every(It=>ft.includes(It))?En.greenColor:En.redColor,Kt=yt.map(It=>Ue[It]).join("");return e.createElement("span",{className:$e,style:{fontWeight:600,fontSize:"16px"}},Kt||"\u672A\u4F5C\u7B54")})()):e.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),e.createElement("div",null,e.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((O==null?void 0:O.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))))};var Ld=(0,D.connect)(({problemset:r})=>({problemset:r}))(Td),Aa=n(59301),jd=Object.defineProperty,Vs=Object.getOwnPropertySymbols,Zd=Object.prototype.hasOwnProperty,zd=Object.prototype.propertyIsEnumerable,Ws=(r,u,l)=>u in r?jd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Hs=(r,u)=>{for(var l in u||(u={}))Zd.call(u,l)&&Ws(r,l,u[l]);if(Vs)for(var l of Vs(u))zd.call(u,l)&&Ws(r,l,u[l]);return r};const Ud=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{const[O,ct]=(0,e.useState)({}),[nt,fe]=(0,e.useState)([]),Q={fontSize:"18px"},Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];return(0,e.useEffect)(()=>{const Mt=(0,Bt.cloneDeep)(l);ct(Mt),fe(Mt.choices)},[l]),Aa.createElement("div",null,Aa.createElement("div",{className:En.questionWrap},Aa.createElement(F.Z,{value:'\u5355\u9009\u9898
'+(O==null?void 0:O.name),style:Hs({},Q)}),nt==null?void 0:nt.map((Mt,yt)=>{const{is_answer:ft,checked:Ve,choice_text:$e,me_answered:Kt}=Mt;let It="";return ft&&(It=En.rightAnswerBox),!ft&&(Ve||Kt)&&(It=En.errorAnswerBox),Aa.createElement(U.Z,{key:yt,className:`${En.choiceBox} ${It}`,align:"middle",wrap:!1,style:{cursor:"pointer",marginTop:yt==0?"30px":"20px"}},Aa.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:En.choiceIndex},Ue[yt]),Aa.createElement(z.Z,{flex:1,className:"ml30"},Aa.createElement(F.Z,{className:En.html,value:$e,style:Hs({},Q)})),ft&&Aa.createElement(z.Z,null,Aa.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),!ft&&(Ve||Kt)&&Aa.createElement(z.Z,null,Aa.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))})),Aa.createElement("div",{className:En.solutionWrap},Aa.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},Aa.createElement("div",{className:"c-grey-333 mb5 font16"},Aa.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),Aa.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Ue[nt.findIndex(Mt=>Mt==null?void 0:Mt.is_answer)])),Aa.createElement("div",{className:"c-grey-333 mb5 font16"},Aa.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),nt.find(Mt=>Mt==null?void 0:Mt.me_answered)?Aa.createElement(Aa.Fragment,null,(()=>{var Mt;const yt=nt.findIndex($e=>$e==null?void 0:$e.me_answered),Ve=((Mt=nt[yt])==null?void 0:Mt.is_answer)?En.greenColor:En.redColor;return Aa.createElement("span",{className:Ve,style:{fontWeight:600,fontSize:"16px"}},Ue[yt])})()):Aa.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),Aa.createElement("div",null,Aa.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((O==null?void 0:O.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))))};var Qd=(0,D.connect)(({problemset:r})=>({problemset:r}))(Ud),Yd=Object.defineProperty,Gs=Object.getOwnPropertySymbols,Vd=Object.prototype.hasOwnProperty,Wd=Object.prototype.propertyIsEnumerable,Ks=(r,u,l)=>u in r?Yd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,_s=(r,u)=>{for(var l in u||(u={}))Vd.call(u,l)&&Ks(r,l,u[l]);if(Gs)for(var l of Gs(u))Wd.call(u,l)&&Ks(r,l,u[l]);return r};const Hd=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{const[O,ct]=(0,e.useState)({}),[nt,fe]=(0,e.useState)([]),Q={fontSize:"18px"};(0,e.useEffect)(()=>{const Mt=(0,Bt.cloneDeep)(l);ct(Mt),fe(Mt.choices)},[l]);const Ue=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];return e.createElement("div",null,e.createElement("div",{className:En.questionWrap},e.createElement(F.Z,{value:'\u5224\u65AD\u9898
'+(O==null?void 0:O.name),style:_s({},Q)}),nt==null?void 0:nt.map((Mt,yt)=>{const{is_answer:ft,checked:Ve,choice_text:$e,me_answered:Kt}=Mt;let It="";return ft&&(It=En.rightAnswerBox),!ft&&(Ve||Kt)&&(It=En.errorAnswerBox),e.createElement(U.Z,{key:yt,className:`${En.choiceBox} ${It}`,align:"middle",wrap:!1,style:{cursor:"pointer",marginTop:yt==0?"30px":"20px"}},e.createElement(z.Z,{style:{fontWeight:500,fontSize:"20px"},className:En.choiceIndex},Ue[yt]),e.createElement(z.Z,{flex:1,className:"ml30"},e.createElement(F.Z,{className:En.html,value:$e,style:_s({},Q)})),ft&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-duigou1 font16 c-green"})),!ft&&(Ve||Kt)&&e.createElement(z.Z,null,e.createElement("i",{className:"iconfont icon-guanbi10 font16 c-red"})))})),e.createElement("div",{className:En.solutionWrap},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u6B63\u786E\u7B54\u6848"),e.createElement("span",{style:{color:"#2EC25B",fontWeight:600,fontSize:"16px"}},Ue[nt.findIndex(Mt=>Mt==null?void 0:Mt.is_answer)])),e.createElement("div",{className:"c-grey-333 mb5 font16"},e.createElement("span",{style:{color:"#000",fontWeight:600,marginRight:"10px",fontSize:"16px"}},"\u5DF2\u9009\u7B54\u6848"),nt.find(Mt=>Mt==null?void 0:Mt.me_answered)?e.createElement(e.Fragment,null,(()=>{var Mt;const yt=nt.findIndex($e=>$e==null?void 0:$e.me_answered),Ve=((Mt=nt[yt])==null?void 0:Mt.is_answer)?En.greenColor:En.redColor;return e.createElement("span",{className:Ve,style:{fontWeight:600,fontSize:"16px"}},Ue[yt])})()):e.createElement("span",{style:{color:"#E30000",fontWeight:600,fontSize:"16px"}},"\u672A\u4F5C\u7B54"))),e.createElement("div",null,e.createElement(F.Z,{value:'\u9898\u76EE\u89E3\u6790'+((O==null?void 0:O.analysis)||"\u6682\u65E0\u89E3\u6790"),style:{color:"#000"}}))))};var Gd=(0,D.connect)(({problemset:r})=>({problemset:r}))(Hd),da=n(59301),Kd=Object.defineProperty,Js=Object.getOwnPropertySymbols,_d=Object.prototype.hasOwnProperty,Jd=Object.prototype.propertyIsEnumerable,Xs=(r,u,l)=>u in r?Kd(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Xd=(r,u)=>{for(var l in u||(u={}))_d.call(u,l)&&Xs(r,l,u[l]);if(Js)for(var l of Js(u))Jd.call(u,l)&&Xs(r,l,u[l]);return r};const qd={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1,enableSplitViewResizing:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1},$d=({problemset:r,dispatch:u,question:l,questionIndex:b})=>{var O;const ct={fontSize:"18px"},nt={C:da.createElement("span",{className:En.c},"C"),"C++":da.createElement("span",{className:En.cpp},"C++"),Java:da.createElement("span",{className:En.java},"Java"),Python:da.createElement("span",{className:En.python},"Python")},fe={not_started:da.createElement("span",{style:{fontSize:"18px",color:"rgb(144,150,163)"}},"\u672A\u5F00\u542F"),not_pass:da.createElement("span",{style:{fontSize:"18px",color:"rgb(227,0,0)"}},"\u672A\u901A\u5173"),passed:da.createElement("span",{style:{fontSize:"18px",color:"rgb(0,177,135)"}},"\u5DF2\u901A\u5173"),delay_passed:da.createElement("span",{style:{fontSize:"18px",color:"rgb(178, 173, 8)"}},"\u7ED3\u675F\u7B54\u9898\u540E\u901A\u5173")};return da.createElement("div",null,da.createElement("div",{className:En.questionWrap},da.createElement(F.Z,{value:'\u7F16\u7A0B\u9898
'+(l==null?void 0:l.name),style:Xd({},ct)})),da.createElement("div",{className:En.descBox},da.createElement("div",{className:En.title},da.createElement("span",{style:{fontSize:"16px",color:"#666",marginRight:"8px"}},"\u5141\u8BB8\u7F16\u7A0B\u8BED\u8A00\uFF1A"),(O=l==null?void 0:l.languages)==null?void 0:O.map((Q,Ue,Mt)=>da.createElement(e.Fragment,{key:Ue},nt[Q==null?void 0:Q.language]))),da.createElement("div",{className:En.desc},da.createElement(F.Z,{value:'\u95EE\u9898\u63CF\u8FF0'+(l==null?void 0:l.description),style:{fontSize:"16px",color:"#000"}}))),(l==null?void 0:l.answer_status)!="not_started"&&da.createElement("div",{style:{display:"flex",alignItems:"center",marginTop:"30px",fontWeight:500}},da.createElement("span",{style:{fontSize:"18px",color:"#000",fontWeight:"500",marginRight:"10px"}},"\u7B54\u9898\u72B6\u6001"),fe[l==null?void 0:l.answer_status]),["passed","delay_passed"].includes(l==null?void 0:l.answer_status)&&da.createElement("div",{className:En.descBox},da.createElement("div",{className:En.title},da.createElement("span",{style:{fontSize:"16px",color:"#000",marginRight:"8px"}},"\u6700\u540E\u901A\u5173\u4EE3\u7801"),da.createElement("span",{style:{fontSize:"14px",color:"#666"}},"\u901A\u8FC7\u4E86\u672C\u9898\uFF0C\u5728\u4F5C\u4E1A\u65F6\u95F4\u5185\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u6253\u901A\u5173\u4EE3\u7801")),da.createElement("div",{className:En.desc,style:{backgroundColor:"#fff"}},da.createElement(xn.ZP,{height:300,language:l==null?void 0:l.language,value:l!=null&&l.passed_code?qn.Base64.decode(l==null?void 0:l.passed_code):"",theme:"default",options:qd}))))};var e0=(0,D.connect)(({problemset:r})=>({problemset:r}))($d),Vl=n(59301),Xi=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const t0=({user:r,globalSetting:u,classroomList:l,loading:b,problemset:O,dispatch:ct,pageNum:nt,maxPage:fe})=>{var Q,Ue,Mt,yt,ft,Ve,$e,Kt,It,kt,at,Pt,dt,Et,mt,nn,oe,Qt,sn;const[an]=(0,D.useSearchParams)(),[al,Nt]=(0,e.useState)(0),$t=(0,D.useParams)(),[Rn,Jt]=(0,e.useState)(!1);console.log("paramsHttp--",$t);const[wn,Ml]=(0,e.useState)(null),[$l,xl]=(0,e.useState)(!1),[Dl,Pn]=(0,e.useState)(!1),{SmartPlanItemBanks:On}=l,wl={not_started:"\u672A\u5F00\u542F",not_pass:"\u672A\u901A\u5173",passed:"\u5DF2\u901A\u5173",delay_passed:"\u7ED3\u675F\u7B54\u9898\u540E\u901A\u5173"};(0,e.useEffect)(()=>{nt&&Qu()},[nt,$t==null?void 0:$t.user_login]);const Qu=()=>Xi(void 0,null,function*(){Jt(!0),ct({type:"classroomList/getSmartPlanItemBanks",payload:{login:$t==null?void 0:$t.user_login,course_id:$t==null?void 0:$t.coursesId,id:$t==null?void 0:$t.id,position:nt,max_position:fe}}),Jt(!1)});(0,e.useEffect)(()=>{var xu,Ju;Nt(0),(xu=On==null?void 0:On.page)!=null&&xu.id&&Pa((Ju=On==null?void 0:On.page)==null?void 0:Ju.id)},[On]);const Pa=xu=>Xi(void 0,null,function*(){xl(!0);const Ju=yield(0,Se.ZP)(`/api/smart_plan_item_banks/${xu}/student_comment.json`,{method:"get",params:{user_id:$t==null?void 0:$t.user_login}});(Ju==null?void 0:Ju.status)===0&&Ml(Ju==null?void 0:Ju.data),xl(!1)});return Vl.createElement("section",null,Vl.createElement(ye.Z,{spinning:Rn},Vl.createElement("div",{className:Va.box},Vl.createElement("div",{className:Va.box_header,style:{padding:"20px"}},Vl.createElement("div",{style:{display:"flex",alignItems:"center"}},Vl.createElement("div",{className:Va.header_title},On!=null&&On.is_extra?"\u62D3\u5C55\u4E60\u9898":"\u5B66\u4E60\u4E92\u52A8"))),Vl.createElement("div",{style:{padding:"0px 20px",marginBottom:"20px"}},Vl.createElement("div",{style:{background:"#F6F7F9",padding:"14px 20px",margin:"10px auto"}},Vl.createElement("span",{style:{color:"#5F6A95",marginRight:"10px"}},"\u59D3\u540D"),Vl.createElement("span",{style:{color:"#333333"}},((Q=On==null?void 0:On.user_info)==null?void 0:Q.user_name)||"--"),Vl.createElement("span",{style:{color:"#5F6A95",marginRight:"10px",marginLeft:"60px"}},"\u5B66\u53F7"),Vl.createElement("span",{style:{color:"#333333"}},((Ue=On==null?void 0:On.user_info)==null?void 0:Ue.student_id)||"--"),Vl.createElement("span",{style:{color:"#5F6A95",marginRight:"10px",marginLeft:"60px"}},"\u5206\u73ED"),Vl.createElement("span",{style:{color:"#333333"}},((Mt=On==null?void 0:On.user_info)==null?void 0:Mt.group_name)||"--"))),Vl.createElement("div",{id:"scroll-container",style:{height:"calc(100vh - 250px)",overflowY:"auto",overflowX:"hidden",marginBottom:"20px",padding:"0px 20px 0 20px"}},Vl.createElement("div",{className:"mt10"},((ft=(yt=On==null?void 0:On.item_banks)==null?void 0:yt[al])==null?void 0:ft.item_type)==="SINGLE"&&Vl.createElement(Qd,{question:(Ve=On==null?void 0:On.item_banks)==null?void 0:Ve[al],questionIndex:al+1}),((Kt=($e=On==null?void 0:On.item_banks)==null?void 0:$e[al])==null?void 0:Kt.item_type)==="MULTIPLE"&&Vl.createElement(Ld,{question:(It=On==null?void 0:On.item_banks)==null?void 0:It[al],questionIndex:al+1}),((at=(kt=On==null?void 0:On.item_banks)==null?void 0:kt[al])==null?void 0:at.item_type)==="JUDGMENT"&&Vl.createElement(Gd,{question:(Pt=On==null?void 0:On.item_banks)==null?void 0:Pt[al],questionIndex:al+1}),((Et=(dt=On==null?void 0:On.item_banks)==null?void 0:dt[al])==null?void 0:Et.item_type)==="PROGRAM"&&Vl.createElement(Vl.Fragment,null,Vl.createElement(e0,{question:(mt=On==null?void 0:On.item_banks)==null?void 0:mt[al],questionIndex:al+1}),Vl.createElement(hl,{item:(nn=On==null?void 0:On.item_banks)==null?void 0:nn[al]}))),((oe=On==null?void 0:On.page)==null?void 0:oe.knowledge_test)&&Vl.createElement(Vl.Fragment,null,Vl.createElement("div",{style:{display:"flex",alignItems:"center",fontSize:14,marginTop:"20px"}},Vl.createElement("div",{style:{color:"#333333",fontWeight:500}},"\u5B66\u4E60\u8BC4\u4EF7"),Vl.createElement(ut.ZP,{type:"link",loading:$l,style:{color:"#3061D0",marginLeft:"auto",cursor:"pointer"},onClick:()=>Xi(void 0,null,function*(){Pn(!0)})},"\u67E5\u770B\u95EE\u7B54\u8BB0\u5F55")),Vl.createElement("div",{style:{background:"#F6F7F9",marginTop:"10px"}},Vl.createElement(F.Z,{className:Va.ansWrap,value:(wn==null?void 0:wn.comment)||"\u6682\u65E0\u8BC4\u4EF7"})))),Vl.createElement("div",{className:Va.page_footer},(On==null?void 0:On.count)>1&&((Qt=Array.from({length:On==null?void 0:On.count},(xu,Ju)=>Ju+1))==null?void 0:Qt.map((xu,Ju)=>Vl.createElement("div",{key:Ju,className:Ju==al?Va.num_style_active:Va.num_style,onClick:()=>{Nt(xu-1)}},xu))))),Vl.createElement(Pe.default,{centered:!0,title:"\u5B66\u4E60\u8BC4\u4EF7",keyboard:!1,maskClosable:!1,okText:"\u77E5\u9053\u4E86",open:Dl,width:800,forceRender:!0,cancelButtonProps:{style:{display:"none"}},onOk:()=>{Pn(!1)},onCancel:()=>{Pn(!1)}},Vl.createElement(ye.Z,{spinning:$l},Vl.createElement("div",{className:Va.evalueWrap},Vl.createElement("div",{className:Va.evalueSty},Vl.createElement("div",{className:Va.title},"\u5B66\u4E60\u8BC4\u4EF7"),Vl.createElement(F.Z,{className:Va.ansWrap,value:(wn==null?void 0:wn.comment)||"\u6682\u65E0\u8BC4\u4EF7"})),Vl.createElement("div",{className:Va.evalueSty,style:{marginTop:"20px"}},Vl.createElement("div",{className:Va.title},"\u95EE\u7B54\u8BB0\u5F55"),Vl.createElement("div",{className:Va.ansWrap,style:{padding:"0px 12px 12px 12px"}},(sn=wn==null?void 0:wn.question_and_answer_list)==null?void 0:sn.map((xu,Ju)=>Vl.createElement("div",{key:Ju,className:"mt10"},Vl.createElement("div",{style:{display:"flex"}},Vl.createElement("div",{className:Va.label},"\u667A\u80FD\u52A9\u624B\uFF1A"),Vl.createElement(F.Z,{className:Va.asnCont,value:xu==null?void 0:xu.question})),Vl.createElement("div",{style:{display:"flex"}},Vl.createElement("div",{className:Va.label},"\u56DE\u7B54\uFF1A"),Vl.createElement(F.Z,{className:Va.asnCont,value:xu==null?void 0:xu.answer})))))))))))};var n0=(0,D.connect)(({user:r,classroomList:u,loading:l,globalSetting:b,problemset:O})=>({user:r,classroomList:u,globalSetting:b,loading:l.effects,problemset:O}))(t0),l0=n(35921),u0=n(79829),a0=n(30857),Na={qiandao:"qiandao___foQ6t",qiandao_title:"qiandao_title___OOono",qiandao_text:"qiandao_text___okCw5",start_dianming:"start_dianming___qybXD",start_dianming_title:"start_dianming_title___XA9ne",start_dianming_text:"start_dianming_text___CU9en",end_dianming:"end_dianming___C2H9e",end_dianming_name:"end_dianming_name___oYlne",end_dianming_number:"end_dianming_number___iq5C_",end_dianming_text:"end_dianming_text___ApSkk",continue_dianming:"continue_dianming___Yh1KA",continue_user:"continue_user___XOIei",continue_user_name:"continue_user_name___FDI4n",continue_user_number:"continue_user_number___fX7k5",continue_user_text:"continue_user_text___qWeW4",user_list:"user_list___zJeNk",user_list_title:"user_list_title___ihh_B",list:"list___QRd_Q",list_item:"list_item___tBr64",list_item_name:"list_item_name___AgrNX",list_item_number:"list_item_number___VFONZ"},oa=n(59301),qi=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const r0=({classroomList:r,loading:u,dispatch:l,user:b,openEwm:O})=>{var ct,nt,fe,Q,Ue,Mt;const[yt,ft]=(0,e.useState)(""),Ve=(0,D.useParams)(),[$e,Kt]=(0,e.useState)({}),[It,kt]=(0,e.useState)([]),[at,Pt]=(0,e.useState)({}),[dt,Et]=(0,e.useState)(0);(0,e.useEffect)(()=>{b.actionTabs.key=="\u5907\u8BFE\u968F\u673A\u70B9\u540D"&&mt()},[b.actionTabs.key]);const mt=()=>qi(void 0,null,function*(){var Qt;let sn=yield(0,Se.ZP)(`/api/courses/${Ve==null?void 0:Ve.coursesId}/smart_plans/${Ve==null?void 0:Ve.id}/get_attendance_students.json`,{method:"get",params:{page:1,limit:1e3}});(sn==null?void 0:sn.status)==0&&(Kt(sn==null?void 0:sn.data),((Qt=sn==null?void 0:sn.data)==null?void 0:Qt.count)==0?ft("\u5728\u7EBF\u7B7E\u5230"):ft("\u5F00\u59CB\u70B9\u540D"))}),nn=()=>qi(void 0,null,function*(){let Qt=yield(0,Se.ZP)(`/api/courses/${Ve==null?void 0:Ve.coursesId}/smart_plans/${Ve==null?void 0:Ve.id}/roll_call.json`,{method:"post"});(Qt==null?void 0:Qt.status)==0&&(Pt(Qt==null?void 0:Qt.data),oe())}),oe=()=>qi(void 0,null,function*(){var Qt;let sn=yield(0,Se.ZP)(`/api/courses/${Ve==null?void 0:Ve.coursesId}/smart_plans/${Ve==null?void 0:Ve.id}/get_roll_call_records.json`,{method:"get",params:{page:1,limit:1e3}});(sn==null?void 0:sn.status)==0&&kt((Qt=sn==null?void 0:sn.data)==null?void 0:Qt.list)});return(0,e.useEffect)(()=>{let Qt=null;return yt=="\u6682\u505C"?(Qt=setInterval(()=>{Et(sn=>{var an;return(sn+1)%((an=$e==null?void 0:$e.list)==null?void 0:an.length)})},150),()=>clearInterval(Qt)):()=>clearInterval(Qt)},[yt]),oa.createElement(Pe.default,{centered:!0,title:"\u968F\u673A\u70B9\u540D",open:b.actionTabs.key==="\u5907\u8BFE\u968F\u673A\u70B9\u540D",width:600,destroyOnClose:!0,cancelText:"\u53D6\u6D88",okText:yt,onCancel:()=>{l({type:"user/setActionTabs",payload:{}})},onOk:()=>{yt=="\u5728\u7EBF\u7B7E\u5230"?(O(),l({type:"user/setActionTabs",payload:{}})):yt=="\u5F00\u59CB\u70B9\u540D"?ft("\u6682\u505C"):yt=="\u6682\u505C"?(nn(),ft("\u7EE7\u7EED\u70B9\u540D")):yt=="\u7EE7\u7EED\u70B9\u540D"&&ft("\u6682\u505C")}},yt==="\u5728\u7EBF\u7B7E\u5230"&&oa.createElement("div",{className:Na.qiandao},oa.createElement("div",{className:Na.qiandao_title},"\u5F53\u524D\u8BFE\u4EF6\u6CA1\u6709\u5B66\u751F\u7B7E\u5230\uFF0C\u65E0\u6CD5\u70B9\u540D\u3002"),oa.createElement("div",{className:Na.qiandao_text},"\u8BF7\u70B9\u51FB\u3010\u5728\u7EBF\u7B7E\u5230\u3011\uFF0C\u5B66\u751F\u626B\u7801\u5373\u53EF\u5B8C\u6210\u7B7E\u5230")),yt==="\u5F00\u59CB\u70B9\u540D"&&oa.createElement("div",{className:Na.start_dianming},oa.createElement("div",{className:Na.start_dianming_title},"\u5DF2\u7B7E\u5230\u4EBA\u6570\uFF1A",oa.createElement("span",{style:{color:"#FA6400"}},$e==null?void 0:$e.count," \u4EBA")),oa.createElement("div",{className:Na.start_dianming_text},"\u8BF7\u70B9\u51FB\u3010\u5F00\u59CB\u70B9\u540D\u3011\uFF0C\u5C06\u5F00\u59CB\u968F\u673A\u70B9\u540D")),yt==="\u6682\u505C"&&oa.createElement("div",{className:Na.end_dianming},oa.createElement("img",{src:J.Z.API_SERVER+"/images/"+((nt=(ct=$e==null?void 0:$e.list)==null?void 0:ct[dt])==null?void 0:nt.image_url),style:{width:"60px",height:"60px",borderRadius:"30px"}}),oa.createElement("div",{className:Na.end_dianming_name},(Q=(fe=$e==null?void 0:$e.list)==null?void 0:fe[dt])==null?void 0:Q.username),oa.createElement("div",{className:Na.end_dianming_number},(Mt=(Ue=$e==null?void 0:$e.list)==null?void 0:Ue[dt])==null?void 0:Mt.id),oa.createElement("div",{className:Na.end_dianming_text},"\u6B63\u5728\u968F\u673A\u7B5B\u9009...")),yt==="\u7EE7\u7EED\u70B9\u540D"&&oa.createElement("div",{className:Na.continue_dianming},oa.createElement("div",{className:Na.continue_user},oa.createElement("img",{src:J.Z.API_SERVER+"/images/"+(at==null?void 0:at.image_url),style:{width:"62px",height:"62px",borderRadius:"32px",border:"2px solid #FA6400"}}),oa.createElement("div",{className:Na.continue_user_name},at==null?void 0:at.username),oa.createElement("div",{className:Na.continue_user_number},at==null?void 0:at.student_id),oa.createElement("div",{className:Na.continue_user_text},"\u8BF7 ",at==null?void 0:at.username," \u540C\u5B66\u4F5C\u7B54\uFF01")),oa.createElement("div",{className:Na.user_list},oa.createElement("div",{className:Na.user_list_title},"\u70B9\u540D\u8BB0\u5F55"),oa.createElement("div",{className:Na.list},It==null?void 0:It.map((Qt,sn)=>oa.createElement("div",{className:Na.list_item,key:sn},oa.createElement("img",{src:J.Z.API_SERVER+"/images/"+(Qt==null?void 0:Qt.image_url),style:{width:"40px",height:"40px",borderRadius:"20px"}}),oa.createElement("div",{className:Na.list_item_name},Qt==null?void 0:Qt.username),oa.createElement("div",{className:Na.list_item_number},Qt==null?void 0:Qt.student_id)))))))};var o0=(0,D.connect)(({classroomList:r,loading:u,user:l})=>({classroomList:r,loading:u,user:l}))(r0),Mo={summaryWrap:"summaryWrap___OG35q",summaryItem:"summaryItem___hoOKu",label:"label___MqI4a",percentSty:"percentSty___gHG8D",title:"title___mNpYU",chart_container:"chart_container___i1Iuj",Onerow:"Onerow___OiT1e",detailSty:"detailSty___a5EG5",detailItem:"detailItem___yYmqy",questionTag:"questionTag___bwScr",numSty:"numSty___wOs1Q",detailBtn:"detailBtn___LPYU4",questionTitle:"questionTitle___tXMUJ",proSty:"proSty___OnC9j",commentBody:"commentBody___MMxP6",box_title:"box_title___nS6XP",modal:"modal___WqWsA",erweima:"erweima___WMbXK",drawer_ewm:"drawer_ewm___gWIAW",drawer_ewm_title:"drawer_ewm_title___xS0o0",drawer_text:"drawer_text___hEhSn",drawer_code:"drawer_code___bnaj8"},Wu=n(59301),i0=Object.defineProperty,s0=Object.defineProperties,c0=Object.getOwnPropertyDescriptors,qs=Object.getOwnPropertySymbols,d0=Object.prototype.hasOwnProperty,m0=Object.prototype.propertyIsEnumerable,$s=(r,u,l)=>u in r?i0(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,Oi=(r,u)=>{for(var l in u||(u={}))d0.call(u,l)&&$s(r,l,u[l]);if(qs)for(var l of qs(u))m0.call(u,l)&&$s(r,l,u[l]);return r},v0=(r,u)=>s0(r,c0(u)),Ri=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const f0=({classroomList:r,loading:u,dispatch:l,setCheckInfo:b,checkInfo:O,openRollCall:ct,pptInfo:nt,SmartPlanItemBanks:fe,globalSetting:Q,getQuestionData:Ue})=>{var Mt,yt,ft,Ve;const $e=(0,D.useParams)(),[Kt,It]=(0,e.useState)([]),[kt,at]=(0,e.useState)({page:1,limit:1e4,course_group_id:"all",status:"all",search:""}),[Pt,dt]=(0,e.useState)(!1),[Et,mt]=(0,e.useState)({}),[nn,oe]=(0,e.useState)(null);(0,e.useEffect)(()=>{O?Qt():clearInterval(nn)},[O]);const Qt=()=>Ri(void 0,null,function*(){const Jt=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/header_info.json`,{method:"get"});(Jt==null?void 0:Jt.status)===0&&mt(Jt==null?void 0:Jt.data)});(0,e.useEffect)(()=>{clearInterval(nn),O&&(Rn(),oe(setInterval(()=>{Rn()},3e3)))},[kt,O]);const[sn,an]=(0,e.useState)(""),[al,Nt]=(0,e.useState)(10);(0,e.useEffect)(()=>{if(!(fe!=null&&fe.open_rolling_qrcode_sign))return;const Jt=setInterval(()=>{Nt(wn=>wn==1?10:wn-1)},1e3);return()=>clearInterval(Jt)},[fe]),(0,e.useEffect)(()=>{al==1&&$t()},[al]);const $t=()=>Ri(void 0,null,function*(){var Jt;let wn=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/refresh_qrcode_token.json`,{method:"post"});(wn==null?void 0:wn.status)==0&&an((Jt=wn==null?void 0:wn.data)==null?void 0:Jt.qrcode_token)}),Rn=()=>Ri(void 0,null,function*(){var Jt;dt(!0);const wn=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/smart_plan_users.json`,{method:"get",params:v0(Oi({},kt),{status:(kt==null?void 0:kt.status)=="all"?"":kt==null?void 0:kt.status,course_group_id:(kt==null?void 0:kt.course_group_id)=="all"?"":kt==null?void 0:kt.course_group_id})});(wn==null?void 0:wn.status)===0&&It((Jt=wn==null?void 0:wn.data)==null?void 0:Jt.smart_plan_users),dt(!1)});return Wu.createElement(k.Z,{bodyStyle:{padding:25},headerStyle:{display:"none"},width:700,onClose:()=>{b(!1)},destroyOnClose:!0,forceRender:!0,open:O},Wu.createElement("div",{className:Mo.drawer_ewm},Wu.createElement("div",{className:Mo.drawer_ewm_title,style:{marginBottom:"10px"}},fe==null?void 0:fe.smart_plan_name),fe!=null&&fe.open_rolling_qrcode_sign?Wu.createElement("div",{className:Mo.modal},"\u6253\u5F00",Wu.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},Wu.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C \u52A8\u6001\u4E8C\u7EF4\u7801\u5C06\u5728",Wu.createElement("span",{style:{color:"#3061D0",width:"30px",textAlign:"center"}},al,"s"),"\u540E\u5237\u65B0"):Wu.createElement("div",{className:Mo.modal},"\u6253\u5F00",Wu.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},Wu.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C\u5373\u53EF\u624B\u673A\u7AEF\u7545\u5B66\u8BFE\u4EF6\uFF0C\u968F\u65F6\u5F00\u542F\u9AD8\u6548\u5B66\u4E60\uFF01"),Wu.createElement("div",{className:Mo.erweima},Wu.createElement(G.Z,{key:sn,errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${$e==null?void 0:$e.coursesId}&id=${$e==null?void 0:$e.id}&codeKey=${sn}`,bgColor:"#FFF",size:260,icon:`${J.Z.IMG_SERVER}/${(Mt=Q==null?void 0:Q.setting)==null?void 0:Mt.tab_logo_url}`})),(nt==null?void 0:nt.status)=="in_progress"&&((yt=fe==null?void 0:fe.page)==null?void 0:yt.lesson_mode)=="online_lesson"&&Wu.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"20px"}},Wu.createElement(We.Z,{checked:fe==null?void 0:fe.open_rolling_qrcode_sign,onChange:Jt=>Ri(void 0,null,function*(){let wn=yield(0,Se.ZP)(`/api/courses/${$e==null?void 0:$e.coursesId}/smart_plans/${$e==null?void 0:$e.id}/change_rolling_qrcode_sign.json`,{method:"post",body:{open_rolling_qrcode_sign:Jt}});(wn==null?void 0:wn.status)==0&&(Jt?$t():(an(""),Nt(10)),S.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ue())}),size:"small"}),Wu.createElement("div",{style:{margin:"0 10px",color:"#333333"}},"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230"),Wu.createElement(H.Z,{title:"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\u540E\uFF0C\u5B66\u751F\u4EC5\u80FD\u626B\u63CF\u4E8C\u7EF4\u7801\u5B8C\u6210\u7B7E\u5230\uFF0C\u5176\u4ED6\u65B9\u5F0F\u7B7E\u5230\u65E0\u6548\u5E76\u4E14\u65E0\u6CD5\u8FDB\u5165\u8BFE\u4EF6\u3002"},Wu.createElement("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#ccc",cursor:"pointer"}})))),Wu.createElement("div",{className:Mo.box_title},"\u7B7E\u5230\u8BE6\u60C5",Wu.createElement("i",{className:"iconfont icon-guanbi10 font12",style:{cursor:"pointer"},onClick:()=>{b(!1)}})),Wu.createElement("div",{style:{display:"flex",alignItems:"center",marginBottom:"20px"}},Wu.createElement("div",{className:"mr10"},"\u7B7E\u5230\u72B6\u6001"),Wu.createElement(Fe.default,{style:{width:"130px",borderRadius:"2px"},size:"large",value:kt.status,placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",options:[{label:"\u5168\u90E8",value:"all"},{label:"\u5DF2\u7B7E\u5230",value:"started"},{label:"\u672A\u7B7E\u5230",value:"not_started"}],onChange:Jt=>{kt.status=Jt,at(Oi({},kt))}}),Wu.createElement("div",{className:"ml20 mr10"},"\u5206\u73ED"),Wu.createElement(Fe.default,{style:{width:"130px",borderRadius:"2px"},size:"large",value:kt.course_group_id,placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",options:((ft=Et==null?void 0:Et.course_groups)==null?void 0:ft.length)>0?[{label:"\u5168\u90E8\u73ED\u7EA7",value:"all"},...(Ve=Et==null?void 0:Et.course_groups)==null?void 0:Ve.map(Jt=>({label:Jt==null?void 0:Jt.name,value:Jt==null?void 0:Jt.id}))]:[{label:"\u5168\u90E8\u73ED\u7EA7",value:"all"}],onChange:Jt=>{kt.course_group_id=Jt,at(Oi({},kt))}}),Wu.createElement(yl.t7,{style:{width:220,marginLeft:"auto"},placeholder:"\u8BF7\u8F93\u5165\u59D3\u540D\u548C\u5B66\u53F7\u641C\u7D22",value:kt.search,onChange:Jt=>{kt.search=Jt,kt.page=1,at(Oi({},kt))}})),Wu.createElement(ye.Z,{spinning:Pt},Wu.createElement(ne.default,{dataSource:Kt,className:Mo.commentBody,scroll:{y:600},pagination:!1,columns:[{title:"\u5E8F\u53F7",align:"left",dataIndex:"name",width:60,ellipsis:!0,render:(Jt,wn,Ml)=>`${Ml+1}`},{title:"\u59D3\u540D",align:"left",dataIndex:"user_name",ellipsis:!0,width:180,render:Jt=>Wu.createElement("span",{style:{color:"#000"}},Jt||"--")},{title:"\u5B66\u53F7",align:"left",dataIndex:"student_id",ellipsis:!0,width:120,render:Jt=>Wu.createElement("span",{style:{color:"#000"}},Jt||"--")},{title:"\u73ED\u7EA7",align:"left",dataIndex:"group_name",ellipsis:!0,width:180,render:Jt=>Wu.createElement("span",{style:{color:"#000"}},Jt||"--")},{title:"\u7B7E\u5230\u72B6\u6001",align:"left",dataIndex:"status",ellipsis:!0,render:Jt=>Wu.createElement("span",null,Jt=="not_started"?"\u672A\u7B7E\u5230":"\u5DF2\u7B7E\u5230")}]})),(nt==null?void 0:nt.status)=="in_progress"&&(nt==null?void 0:nt.lesson_mode)=="online_lesson"&&Wu.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},Wu.createElement(ut.ZP,{type:"primary",style:{marginTop:"50px"},onClick:()=>{ct(),b(!1)}},"\u968F\u673A\u70B9\u540D")))};var g0=(0,D.connect)(({classroomList:r,loading:u,user:l,globalSetting:b})=>({classroomList:r,loading:u,user:l,globalSetting:b}))(f0),Du={toolbar:"toolbar___Uo7LQ","line-menu":"line-menu___mAWlG","chat-dialog":"chat-dialog___KJCds","chat-header":"chat-header___D2PUI","chat-content":"chat-content___C0vtj","chat-actions":"chat-actions___TYIxs",over_item_list:"over_item_list___rJ28g",over_item:"over_item___NX1fq",close_button:"close_button___hqqIO",over_button:"over_button___g0Acf",ewm_img:"ewm_img___CgU19",ewm_text:"ewm_text___qJOQD",kjgj_style:"kjgj_style___LpPYV",kjgj_item:"kjgj_item___znzOt",kjgj_img:"kjgj_img___g7zps",kjgj_text:"kjgj_text___Ua7tW",over_content:"over_content___aH5pL",overcont2wrap:"overcont2wrap___PAra8",over_content2:"over_content2___c8jx0",over_button2:"over_button2___dQ7lA",ewm_img2:"ewm_img2___Ba35z",ewm_text2:"ewm_text2___v3R_z",officeWrp:"officeWrp___B0eRV",left:"left___wU_GS",btn_float:"btn_float___nXsLR",to_page_style:"to_page_style___bmH79",left_float:"left_float___N_wk1",float_icon:"float_icon___xmC9W",float_text:"float_text___m_LGU",float_more:"float_more___nbaug",right:"right___jQ8G4",footer_button:"footer_button___xLWDh",quxiao:"quxiao___nHatU",queren:"queren___BRoLo",close_drawer:"close_drawer___vZp3v",erweima:"erweima___YfDc7",arrow:"arrow___ElSwz",modal:"modal___CqCC8"},ki=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const E0=({src:r,onClick:u,topPercentage:l=.8,draggableExtraNode:b,showAvatarEditData:O,tokenInfo:ct,pptInfo:nt,isPptFullScreen:fe,handleEndClass:Q,toggleFullOrExitScreen:Ue,setStudentListVis:Mt,user:yt,openEwm:ft,setOpenEwm:Ve,setAlterVis:$e,dispatch:Kt})=>{const It=(0,e.useRef)(null),kt=(0,e.useRef)(!1),at=(0,e.useRef)(!1),Pt=(0,D.useParams)(),[dt,Et]=(0,e.useState)(!0),[mt,nn]=(0,e.useState)(!1),[oe,Qt]=(0,e.useState)(window.innerHeight-100),[sn,an]=(0,e.useState)((window.innerWidth-900)/2),[al,Nt]=(0,e.useState)(!1),$t=10;return(0,e.useEffect)(()=>{if(It.current){let Rn=function(Pn){var On;kt.current=!0,xl=Pn.pageY,Dl=Pn.pageX;const wl=(On=It.current)==null?void 0:On.getBoundingClientRect();Ml=Pn.pageY-((wl==null?void 0:wl.top)||0),$l=Pn.pageX-((wl==null?void 0:wl.left)||0),(0,Ge.kk)("none"),document.onselectstart=()=>!1},Jt=function(){kt.current&&!at.current&&u&&u(),kt.current=!1,at.current=!1,(0,Ge.kk)("auto"),document.onselectstart=null},wn=function(Pn){var On,wl;if(!kt.current)return;const Qu=Pn.pageY,Pa=Pn.pageX,xu=Qu-Ml,Ju=Pa-$l,Oa=window.innerHeight-(((On=It.current)==null?void 0:On.offsetHeight)||0)-50,er=window.innerWidth-(((wl=It.current)==null?void 0:wl.offsetWidth)||0)-20,ha=50,Ou=10;if(!at.current&&(Math.abs(xl-Pn.pageY)>$t||Math.abs(Dl-Pn.pageX)>$t)&&(at.current=!0),at.current){const la=Math.max(ha,Math.min(xu,Oa)),Ja=Math.max(Ou,Math.min(Ju,er));Qt(la),an(Ja)}},Ml=0,$l=0,xl=0,Dl=0;return It.current.addEventListener("mousedown",Rn),document.addEventListener("mousemove",wn),document.addEventListener("mouseup",Jt),()=>{var Pn,On;(On=(Pn=It.current)==null?void 0:Pn.removeEventListener)==null||On.call(Pn,"mousedown",Rn),document.removeEventListener("mousemove",wn),document.removeEventListener("mouseup",Jt)}}},[u]),(0,e.useEffect)(()=>{const Rn=()=>{fe?(Qt(window.innerHeight-100),an(window.innerWidth*.4)):(Qt(window.innerHeight-100),an((window.innerWidth-900)/2))};return window.addEventListener("resize",Rn),()=>{window.removeEventListener("resize",Rn)}},[l,fe]),(0,e.useEffect)(()=>{mt&&(dt?(an(sn-130),nn(!1)):(an(sn+130),nn(!1)))},[dt,mt]),e.createElement("div",{className:Du.draggableImage,style:{top:`${oe}px`,left:`${sn}px`,position:"fixed",display:al?"none":"block",cursor:kt.current?"grabbing":"grab",zIndex:100},ref:It},b&&e.createElement("div",{className:Du.extraNode,onMouseUp:Rn=>Rn.stopPropagation(),onMouseDownCapture:Rn=>Rn.stopPropagation()},b),(Pt==null?void 0:Pt.user_login)&&dt&&e.createElement("div",{className:Du.over_item_list},e.createElement("div",{className:Du.over_item},e.createElement("div",{className:Du.close_button,onClick:()=>{Et(!1),nn(!0)}},e.createElement("i",{className:"iconfont icon-shouqi5 mr5",style:{fontSize:8}}),"\u6536\u8D77"),e.createElement("div",{className:Du.over_button,onClick:()=>{Mt(!0)}},e.createElement("img",{src:n(78868),className:Du.ewm_img,style:{width:"16px",height:"15px"}}),e.createElement("div",{className:Du.ewm_text},"\u5B66\u751F\u5217\u8868")),e.createElement("div",{className:Du.over_button,onClick:()=>{D.history.push(`/classrooms/${Pt==null?void 0:Pt.coursesId}/smart_plan/${Pt==null?void 0:Pt.id}/detail`)}},e.createElement("img",{src:n(50066),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u9000\u51FA\u8BFE\u4EF6")))),!(Pt!=null&&Pt.user_login)&&(ct==null?void 0:ct.IsSuper)&&dt&&e.createElement("div",{className:Du.over_item_list},e.createElement("div",{className:Du.over_item},e.createElement("div",{className:Du.close_button,onClick:()=>{Et(!1),nn(!0)}},e.createElement("i",{className:"iconfont icon-shouqi5 mr5",style:{fontSize:8}}),"\u6536\u8D77"),e.createElement("div",{className:Du.over_button,onClick:()=>{Ue(!fe)}},!fe&&e.createElement("img",{src:n(15091),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),fe&&e.createElement("img",{src:n(24639),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},fe?"\u9000\u51FA\u5168\u5C4F":"\u5168\u5C4F\u64AD\u653E")),(nt==null?void 0:nt.status)=="not_started"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){Kt({type:"classroomList/setActionTabs",payload:{key:"start_smart_plan_shang",params:{coursesId:Pt==null?void 0:Pt.coursesId,smart_plans_id:Pt==null?void 0:Pt.id}}})})},e.createElement("img",{src:n(76502),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u5F00\u59CB\u4E0A\u8BFE")),(nt==null?void 0:nt.status)=="not_started"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){$e(!0)})},e.createElement("img",{src:n(93026),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u66F4\u6362\u8BFE\u4EF6")),(nt==null?void 0:nt.status)=="in_progress"&&(nt==null?void 0:nt.lesson_mode)=="online_lesson"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){Kt({type:"user/setActionTabs",payload:{key:"\u5907\u8BFE\u968F\u673A\u70B9\u540D"}})})},e.createElement("img",{src:n(59717),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u968F\u673A\u70B9\u540D")),(nt==null?void 0:nt.status)=="in_progress"&&e.createElement("div",{className:Du.over_button,onClick:()=>ki(void 0,null,function*(){yield Q()})},e.createElement("img",{src:n(3540),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u7ED3\u675F\u6388\u8BFE")),e.createElement("div",{className:Du.over_button,onClick:()=>{Ve(new Date)}},e.createElement("img",{src:n(56440),className:Du.ewm_img,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Du.ewm_text},"\u8BFE\u4EF6\u4E8C\u7EF4\u7801")))),!dt&&(ct==null?void 0:ct.IsSuper)&&e.createElement("div",{className:Du.kjgj_style},e.createElement("div",{className:Du.kjgj_item,onClick:()=>{Et(!0),nn(!0)}},e.createElement("div",{className:Du.kjgj_img},e.createElement("img",{src:n(22335),style:{width:"30px",height:"30px"}})),e.createElement("div",{className:Du.kjgj_text},"\u8BFE\u4EF6\u5DE5\u5177"))))};var p0=(0,D.connect)(({user:r})=>({user:r}))(E0),A0=Object.defineProperty,ec=Object.getOwnPropertySymbols,h0=Object.prototype.hasOwnProperty,y0=Object.prototype.propertyIsEnumerable,tc=(r,u,l)=>u in r?A0(r,u,{enumerable:!0,configurable:!0,writable:!0,value:l}):r[u]=l,yi=(r,u)=>{for(var l in u||(u={}))h0.call(u,l)&&tc(r,l,u[l]);if(ec)for(var l of ec(u))y0.call(u,l)&&tc(r,l,u[l]);return r},su=(r,u,l)=>new Promise((b,O)=>{var ct=Q=>{try{fe(l.next(Q))}catch(Ue){O(Ue)}},nt=Q=>{try{fe(l.throw(Q))}catch(Ue){O(Ue)}},fe=Q=>Q.done?b(Q.value):Promise.resolve(Q.value).then(ct,nt);fe((l=l.apply(r,u)).next())});const C0=({user:r,classroomList:u,globalSetting:l,loading:b,dispatch:O})=>{var ct,nt,fe,Q,Ue,Mt,yt,ft,Ve;const[$e,Kt]=di.ZP.useNotification(),It=(0,e.useRef)(),[kt]=(0,D.useSearchParams)(),[at,Pt]=(0,e.useState)({}),[dt,Et]=(0,e.useState)(""),[mt,nn]=(0,e.useState)(""),oe=(0,D.useParams)(),[Qt,sn]=(0,e.useState)({}),[an,al]=(0,e.useState)(),Nt=(0,e.useRef)(),[$t,Rn]=(0,e.useState)(!1),[Jt,wn]=(0,e.useState)([]),[Ml,$l]=(0,e.useState)(!0),[xl,Dl]=(0,e.useState)(!1),[Pn,On]=(0,e.useState)([]),[wl,Qu]=(0,e.useState)(!1),[Pa,xu]=(0,e.useState)([]),[Ju,Oa]=(0,e.useState)(!1),[er,ha]=(0,e.useState)(0),[Ou,la]=(0,e.useState)(!1),[Ja,nr]=(0,e.useState)([]),[Pr,Or]=(0,e.useState)(""),[Rr,gr]=(0,e.useState)(!1),[Qr,or]=(0,e.useState)(""),[kr,lr]=(0,e.useState)(0),Br=(0,e.useRef)(null),[Yr,Dr]=(0,e.useState)(!1),[Tr,eu]=(0,e.useState)(!1),[Ra,Sa]=(0,e.useState)(!1),[Er,pr]=(0,e.useState)(!1),[ka,Ar]=(0,e.useState)(!1),xr=(0,e.useRef)(!1),{SmartPlanItemBanks:mn}=u,Vr=(0,e.useRef)(at),Eo=(0,e.useRef)(),Wr=(0,e.useRef)([1]),Lr=kt.get("simulate")=="true",uo=kt.get("pptPage")?Number(kt.get("pptPage")):1,[No,ao]=(0,e.useState)(!1),[Hr,hr]=e.useState(["60%","40%"]),[Po,po]=(0,e.useState)(!1),Jl=(0,e.useRef)(!1),[Gr,ja]=(0,e.useState)(!1),Ko=(0,e.useRef)(null),Ao=(0,e.useRef)(window.innerWidth),[ro,Xa]=(0,e.useState)(!1),[Xu,Kr]=(0,e.useState)(!1),[ml,ho]=(0,e.useState)(yi({},{page:1,limit:20,course_group_id:"",status:"all",search:""})),[_r,qa]=(0,e.useState)(""),[oo,jr]=(0,e.useState)(10);(0,e.useEffect)(()=>{if(!Tr&&!Er||!(mn!=null&&mn.open_rolling_qrcode_sign))return;const et=setInterval(()=>{jr(on=>on==1?10:on-1)},1e3);return()=>clearInterval(et)},[Tr,Er,mn]),(0,e.useEffect)(()=>{oo==1&&Ya()},[oo]);const Ya=()=>su(void 0,null,function*(){var et;let on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_qrcode_token.json`,{method:"post"});(on==null?void 0:on.status)==0&&qa((et=on==null?void 0:on.data)==null?void 0:et.qrcode_token)});(0,e.useEffect)(()=>{const Hn=700/window.innerWidth*100,Wl=100-Hn;ka?at!=null&&at.IsSuper?hr(["100%","0%"]):hr([`${Wl.toFixed(2)}%`,`${Hn.toFixed(2)}%`]):hr([`${Wl.toFixed(2)}%`,`${Hn.toFixed(2)}%`]),xr.current=ka,ka||(la(!1),lr(""))},[ka]),(0,e.useEffect)(()=>{Yr&&mt>0&&(mn!=null&&mn.open_rolling_qrcode_sign&&(mn==null?void 0:mn.smart_plan_status)=="in_progress"?(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_qrcode_token.json`,{method:"post"}).then(et=>{var on;(et==null?void 0:et.status)==0&&(jr(10),qa((on=et==null?void 0:et.data)==null?void 0:on.qrcode_token),eu(!0))}):eu(!0))},[mt,Yr]),(0,e.useEffect)(()=>{Ra?setTimeout(()=>{mn!=null&&mn.open_rolling_qrcode_sign&&(mn==null?void 0:mn.smart_plan_status)=="in_progress"?(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_qrcode_token.json`,{method:"post"}).then(et=>{var on;(et==null?void 0:et.status)==0&&(jr(10),qa((on=et==null?void 0:et.data)==null?void 0:on.qrcode_token),pr(!0))}):pr(!0)},300):pr(!1)},[Ra]),window.addEventListener("resize",()=>{clearTimeout(Ko.current),Ko.current=setTimeout(()=>{const et=window.innerWidth;if(et==Ao.current)return;const Wl=700/window.innerWidth*100,Xl=100-Wl;ka?at!=null&&at.IsSuper?hr(["100%","0%"]):hr([`${Xl.toFixed(2)}%`,`${Wl.toFixed(2)}%`]):hr([`${Xl.toFixed(2)}%`,`${Wl.toFixed(2)}%`]),xr.current=ka,ka||la(!1),ir(),Ao.current=et},300)}),(0,e.useEffect)(()=>{const et=()=>su(void 0,null,function*(){if(!Jl.current){Jl.current=!0;try{yield ir()}catch(on){console.error("toResize \u51FD\u6570\u6267\u884C\u51FA\u9519:",on)}finally{Jl.current=!1}}});return window.addEventListener("resize",et),()=>{window.removeEventListener("resize",et)}},[]),(0,e.useEffect)(()=>(document.body.addEventListener((0,fr.gH)(),Ro),()=>{document.body.removeEventListener((0,fr.gH)(),Ro)}),[]),(0,e.useEffect)(()=>(window.addEventListener("visibilitychange",io),()=>{window.removeEventListener("visibilitychange",io)}),[dt]);const Oo=()=>su(void 0,null,function*(){var et,on;yield(et=It.current)==null?void 0:et.ready();const Hn=(on=It.current)==null?void 0:on.Application;Hn&&(yield Hn.ActivePresentation.SlideShowWindow.View.Exit())}),io=()=>su(void 0,null,function*(){document.visibilityState==="visible"&&(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:dt,randomData:new Date}}})});(0,e.useEffect)(()=>{_o(),!(at!=null&&at.IsSuper)&&!kt.get("pptPage")&&(Et(uo),O({type:"classroomList/getSmartPlanItemBanks",payload:{course_id:oe==null?void 0:oe.coursesId,id:oe==null?void 0:oe.id,position:uo}})),(0,Ge.s2)()&&D.history.replace(`/miniprogram/courseware/study?course_id=${oe==null?void 0:oe.coursesId}&id=${oe==null?void 0:oe.id}`)},[]);const _o=()=>su(void 0,null,function*(){yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/check_start.json`,{method:"post"})});(0,e.useEffect)(()=>{Vr.current=at,at!=null&&at.WebofficeURL&&setTimeout(()=>{jo()},300)},[at]),(0,e.useEffect)(()=>{var et;return(et=r==null?void 0:r.userInfo)!=null&&et.login&&co(),()=>{clearInterval(Nt.current)}},[(ct=r==null?void 0:r.userInfo)==null?void 0:ct.login]),(0,e.useEffect)(()=>{!(at!=null&&at.IsSuper)&&(an==null?void 0:an.is_end)===!1&&(at==null?void 0:at.Status)=="in_progress"&&Xo()},[an==null?void 0:an.is_end,at]),(0,e.useEffect)(()=>{if(an!=null&&an.is_end&&clearInterval(Nt.current),!(at!=null&&at.IsSuper)&&(an!=null&&an.is_end)){let et=JSON.parse(sessionStorage.getItem("endPPTIds"))||[];et&&(et!=null&&et.includes(oe==null?void 0:oe.id))||(S.ZP.info("\u672C\u6B21\u6388\u8BFE\u5DF2\u7ED3\u675F\uFF0C\u611F\u8C22\u60A8\u7684\u53C2\u4E0E\uFF01"),(et==null?void 0:et.length)===0?et=[oe==null?void 0:oe.id]:et.push(oe==null?void 0:oe.id),sessionStorage.setItem("endPPTIds",JSON.stringify(et)))}},[an==null?void 0:an.is_end,at]),(0,e.useEffect)(()=>{if(an!=null&&an.enable_extra&&!(an!=null&&an.is_end)){let et=JSON.parse(localStorage.getItem("extraPPTIds"))||[];et&&!(et!=null&&et.includes(oe==null?void 0:oe.id))&&Pe.default.confirm({centered:!0,okText:"\u77E5\u9053\u4E86",icon:null,maskClosable:!1,keyboard:!1,title:"\u63D0\u793A",closable:!1,cancelButtonProps:{style:{display:"none"}},content:"\u606D\u559C\u4F60\u5DF2\u5B8C\u6210\u6240\u6709\u57FA\u7840\u4E60\u9898\uFF01\u8001\u5E08\u8FD8\u51C6\u5907\u4E86\u62D3\u5C55\u4E60\u9898\uFF0C\u53EF\u4EE5\u5F00\u59CB\u6311\u6218\u4E86\u54E6\uFF01",onOk:()=>su(void 0,null,function*(){(et==null?void 0:et.length)===0?et=[oe==null?void 0:oe.id]:et.push(oe==null?void 0:oe.id),Za(an==null?void 0:an.extra_position),localStorage.setItem("extraPPTIds",JSON.stringify(et))})})}},[an==null?void 0:an.enable_extra]);const Ro=()=>{(0,fr.vp)()||Oo()};(0,e.useEffect)(()=>{var et,on;(et=r==null?void 0:r.userInfo)!=null&&et.login&&(on=It.current)!=null&&on.ready&&ir()},[(nt=r==null?void 0:r.userInfo)==null?void 0:nt.login,at]),(0,e.useEffect)(()=>{var et;an!=null&&an.page&&((et=mn==null?void 0:mn.page)==null?void 0:et.lesson_mode)=="online_lesson"&&!(at!=null&&at.IsSuper)&&!Lr&&Za(an==null?void 0:an.page)},[an==null?void 0:an.page]),(0,e.useEffect)(()=>{var et;((et=r==null?void 0:r.userInfo)==null?void 0:et.real_name)==="\u6E38\u5BA2"&&O({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!1}})},[(fe=r==null?void 0:r.userInfo)==null?void 0:fe.real_name]);const ko=()=>{var et,on,Hn,Wl,Xl;let _n=[];return(((on=(et=mn==null?void 0:mn.page)==null?void 0:et.smart_plan_page_knowledges)==null?void 0:on.length)>0||(Hn=mn==null?void 0:mn.page)!=null&&Hn.is_ai_question)&&_n.push({key:"2",title:"\u667A\u80FD\u4E92\u52A8"}),(Wl=mn==null?void 0:mn.page)!=null&&Wl.page_info&&_n.push({key:"1",title:"\u667A\u80FD\u89E3\u6790"}),(mn==null?void 0:mn.count)>0&&_n.push({key:"4",title:"\u8BD5\u9898"}),(Xl=mn==null?void 0:mn.page)!=null&&Xl.animation_code&&_n.push({key:"3",title:"\u667A\u80FD\u52A8\u6548"}),e.createElement(e.Fragment,null,_n==null?void 0:_n.map((tu,aa)=>e.createElement("span",{style:{cursor:"pointer"},onClick:()=>{Sa(!0),Or(tu==null?void 0:tu.key)}},tu==null?void 0:tu.title,aa!=(_n==null?void 0:_n.length)-1?"\u3001":"")))};(0,e.useEffect)(()=>{var et,on,Hn,Wl,Xl,_n,tu;dt&&(mn!=null&&mn.alert_addendance_tips)&&!(mn!=null&&mn.is_super)&&!kt.get("simulate")&&(Xu||(Kr(!0),Pe.default.confirm({centered:!0,okText:"\u77E5\u9053\u4E86",icon:null,title:"\u63D0\u793A",cancelButtonProps:{style:{display:"none"}},content:"\u5F53\u524D\u8BFE\u4EF6\u5DF2\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\uFF0C\u8BF7\u8054\u7CFB\u6388\u8BFE\u6559\u5E08\u626B\u7801\u7B7E\u5230\u3002",onOk:()=>su(void 0,null,function*(){D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan`)})}))),dt&&((et=mn==null?void 0:mn.page)==null?void 0:et.position)!=kr&&ka&&(lr((on=mn==null?void 0:mn.page)==null?void 0:on.position),gr(!0),setTimeout(()=>{gr(!1)},6e3),at!=null&&at.IsSuper&&(((Wl=(Hn=mn==null?void 0:mn.page)==null?void 0:Hn.smart_plan_page_knowledges)==null?void 0:Wl.length)>0||(Xl=mn==null?void 0:mn.page)!=null&&Xl.is_ai_question||(_n=mn==null?void 0:mn.page)!=null&&_n.page_info||(mn==null?void 0:mn.count)>0||(tu=mn==null?void 0:mn.page)!=null&&tu.animation_code?$e.open({message:"",style:{width:"auto",marginBottom:"0px",padding:"12px 30px 20px",whiteSpace:"nowrap",border:"1px solid rgba(20,93,255,0.2)",boxShadow:"0px 0px 10px 0px #E3E1FF",borderRadius:"40px 0 0 40px"},closeIcon:null,description:e.createElement("div",{className:"font18"},"\u5F53\u524D\u9875\u9762\u5305\u542B\uFF1A",e.createElement("span",{style:{color:"#3061D0"}},ko())),duration:2,pauseOnHover:!0,onClose:()=>{la(!0)}}):la(!0)))},[mn]),(0,e.useEffect)(()=>{Jo()},[dt,an==null?void 0:an.randomData]);const Jo=()=>su(void 0,null,function*(){var et,on;if(!(at!=null&&at.IsSuper)&&(at==null?void 0:at.Status)=="in_progress"&&dt){const Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/check_page_progress.json`,{method:"post",body:{position:dt}});(Hn==null?void 0:Hn.status)==0&&((et=Hn==null?void 0:Hn.data)!=null&&et.allow||(On((on=Hn==null?void 0:Hn.data)==null?void 0:on.not_finish_positions),Dl(!0)))}});function ir(){return su(this,null,function*(){try{yield It.current.ready();const Hn=yield(yield It.current.Application.ActiveWindow).View;Hn.ZoomToFit=-1;const Wl=new Event("resize");window.dispatchEvent(Wl)}catch(et){}})}function Za(et){return su(this,null,function*(){yield It.current.ready(),It.current.Application.ActivePresentation.SlideShowWindow.View.GotoSlide(et)})}(0,e.useEffect)(()=>{Gr&&It.current&&(so(!0),ir())},[Gr,It.current]);function so(et){return su(this,null,function*(){if(!(oe!=null&&oe.user_login)){et?(Ar(!0),(0,fr.Dj)(document.body)):(Ar(!1),(0,fr.BU)()),yield It.current.ready();const on=It.current.Application,Hn=yield on.ActivePresentation,Wl=yield on.ActivePresentation.SlideShowSettings,Xl=yield Hn.SlideShowWindow;et?yield Wl.Run():(Xl.IsFullScreen=!1,Oo());const _n=(yield on.ActivePresentation.SlideShowWindow)!==null;Ar(_n),ir()}})}function To(){return su(this,null,function*(){try{const et=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:1}});al(yi({},(et==null?void 0:et.data)||{}))}catch(et){}})}const _e=()=>su(void 0,null,function*(){var et,on;let Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}.json`,{method:"get"});(Hn==null?void 0:Hn.status)==0&&(sn(Hn==null?void 0:Hn.data),oe!=null&&oe.user_login||(kt.get("type")=="view"&&(((et=Hn==null?void 0:Hn.data)==null?void 0:et.status)=="in_progress"?Dr(!0):ja(!0)),((on=Hn==null?void 0:Hn.data)==null?void 0:on.status)=="in_progress"&&kt.get("type")!="update"&&Dr(!0)))}),Xo=()=>su(void 0,null,function*(){const et=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/start_class.json`,{method:"post"})}),Lo=()=>su(void 0,null,function*(){var et;const on=yield(0,Se.ZP)(`/api/smart_plan_item_banks/${(et=mn==null?void 0:mn.page)==null?void 0:et.id}/smart_plan_user_page_studies.json`,{method:"post"})}),Ta=()=>su(void 0,null,function*(){O({type:"classroomList/getSmartPlanItemBanks",payload:{course_id:oe==null?void 0:oe.coursesId,id:oe==null?void 0:oe.id,position:dt||(an==null?void 0:an.page)||1,max_position:mt}})}),co=()=>su(void 0,null,function*(){var et,on,Hn;const Wl={};oe!=null&&oe.user_login&&(Wl.login=oe.user_login),Lr&&(Wl.is_simulate=!0);const Xl=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/get_office_token.json`,{method:"get",params:Wl});Pt(Xl==null?void 0:Xl.data),$l(!1);const _n=((et=Xl==null?void 0:Xl.data)==null?void 0:et.FileName)||"";document.title=_n,(on=Xl==null?void 0:Xl.data)!=null&&on.IsSuper?_e():Lr?ja(!0):(((Hn=Xl==null?void 0:Xl.data)==null?void 0:Hn.Status)=="in_progress"&&ja(!0),Nt.current=setInterval(()=>{To()},2e3))});function wr(){return su(this,null,function*(){if(!It.current)return;clearTimeout(Eo.current),yield It.current.ready();const et=It.current.Application,Hn=(Xl=>{if(!Xl||Xl.length===0)return[];const _n=[...Xl].sort((tn,Wn)=>tn-Wn),tu=[];let aa={From:_n[0],To:_n[0]};for(let tn=1;tn<_n.length;tn++)_n[tn]===_n[tn-1]+1?aa.To=_n[tn]:(tu.push(aa),aa={From:_n[tn],To:_n[tn]});return tu.push(aa),tu})(Wr.current),Wl=[];for(const Xl of Hn){const _n=yield et.ActivePresentation.ExportAsFixedFormat({FixedFormatType:et.Enum.PpFixedFormatType.ppFixedFormatTypeIMG,Combine2LongPic:!0,From:Xl.From,To:Xl.To});Wl.push(_n)}wn(Wl),Eo.current=setTimeout(()=>wr(),4*60*1e3)})}function Wa(et){return su(this,null,function*(){Wr.current=et,wr()})}function jo(){return su(this,null,function*(){var et=document.getElementById("weboffice-zone");It.current=C().config({mount:et,url:at==null?void 0:at.WebofficeURL,refreshToken:yo,previewLimit:4,pptOptions:{isShowBottomStatusBar:!0,isShowRemark:!1,isShowComment:!1},commonOptions:{isShowTopArea:!!(at!=null&&at.IsSuper),isBrowserViewFullscreen:!0,isIframeViewFullscreen:!1,acceptVisualViewportResizeEvent:!0}}),It.current.setToken({token:at==null?void 0:at.AccessToken,timeout:25*60*1e3}),It.current.on("fileStatus",function(on){return su(this,null,function*(){yield It.current.ready();const Wl=yield It.current.Application.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;Et(Wl),Wr.current=[Wl],wr()})}),It.current.on("fileOpen",function(on){qo();const Hn=et==null?void 0:et.querySelector("iframe");Hn&&Hn.focus()}),It.current.on("fullscreenChange",function(on){on.status==1?kt.get("type")!="update"&&ja(!0):(0,fr.BU)()})})}function yo(){return new Promise(function(et){return su(this,null,function*(){var on,Hn,Wl,Xl;const _n=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/refresh_office_token.json`,{method:"get",params:{access_token:(on=Vr.current)==null?void 0:on.AccessToken,refresh_token:(Hn=Vr.current)==null?void 0:Hn.RefreshToken}});((Wl=_n==null?void 0:_n.data)==null?void 0:Wl.Code)=="InvalidArgument.AccessToken"&&co(),Vr.current=_n.data,et({token:(Xl=_n==null?void 0:_n.data)==null?void 0:Xl.AccessToken,timeout:2*60*1e3}),et(_n==null?void 0:_n.data)})})}function Zo(){return su(this,null,function*(){$l(!0),yield It.current.ready();const et=It.current.Application,on=yield et.ActivePresentation,Wl=yield(yield on.Slides).Count;nn(Wl);let Xl=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/create_item_banks.json`,{method:"post",body:{create_ppt:!0,is_extra:!0}});(Xl==null?void 0:Xl.status)==0&&S.ZP.success("\u64CD\u4F5C\u6210\u529F"),yield et.ActivePresentation.Slides.AddSlide(Wl),setTimeout(()=>su(this,null,function*(){$l(!1),on.Slides.Item(Wl).Shapes.AddPicture({FileName:"https://www.educoder.net/images/tzppt.png",LinkToFile:-1,SaveWithDocument:0,Left:0,Top:0,Width:1,Height:1,Scale:!0})}),1e3)})}function qo(){return su(this,null,function*(){yield It.current.ready();const et=It.current.Application,on=yield et.ActivePresentation.GetSlideRemark(),Wl=yield(yield et.ActivePresentation).Slides,Xl=yield Wl.Count;nn(Xl),et.Sub.SlideShowEnd=()=>su(this,null,function*(){Ar(!1),ir(),ja(!1)}),et.Sub.SlideShowBegin=()=>su(this,null,function*(){Ar(!0),ir()});const _n=yield et.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;Et(_n),Wr.current=[_n],wr(),et.Sub.ActiveSlideChange=tu=>su(this,null,function*(){var aa;nn(yield Wl.Count),Et(((aa=tu==null?void 0:tu.Data)==null?void 0:aa.slideIndex)+1)}),et.Sub.SlideDelete=tu=>su(this,null,function*(){var aa;let tn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/delete_page.json`,{method:"delete",body:{position:(aa=tu==null?void 0:tu.Data)==null?void 0:aa.SlideIndex}});(tn==null?void 0:tn.status)==0&&(S.ZP.success("\u5220\u9664\u6210\u529F"),nn(yield Wl.Count))}),et.Sub.PresentationNewSlide=tu=>su(this,null,function*(){console.log("\u76D1\u542C\u65B0\u589E\u5E7B\u706F\u7247\u7684\u64CD\u4F5C\u4E8B\u4EF6",tu)}),et.Sub.SlideMove=tu=>su(this,null,function*(){var aa,tn,Wn;if(at!=null&&at.IsSuper&&document.hasFocus()){Et("");let Nl=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_page_postition.json`,{method:"post",body:{origin_position:(aa=tu==null?void 0:tu.Data)==null?void 0:aa.SlideFromIndex,target_position:(tn=tu==null?void 0:tu.Data)==null?void 0:tn.SlideIndex}});(Nl==null?void 0:Nl.status)==0&&(S.ZP.success("\u79FB\u52A8\u6210\u529F"),Et((Wn=tu==null?void 0:tu.Data)==null?void 0:Wn.SlideIndex))}}),yield et.ActivePresentation.SlideShowWindow.View.GotoSlide(uo)})}const Ci=()=>su(void 0,null,function*(){var et,on;Oa(!0);const Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/smart_plan_users.json`,{method:"get",params:ml});(Hn==null?void 0:Hn.status)==0&&(xu((et=Hn==null?void 0:Hn.data)==null?void 0:et.smart_plan_users),ha((on=Hn==null?void 0:Hn.data)==null?void 0:on.count)),Oa(!1)}),sr=()=>su(void 0,null,function*(){var et;Oa(!0);const on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/header_info.json`,{method:"get"});(on==null?void 0:on.status)===0&&nr([{name:"\u5168\u90E8",id:""},...((et=on==null?void 0:on.data)==null?void 0:et.course_groups)||[]]),Oa(!1)});(0,e.useEffect)(()=>{var et,on;return mn&&((et=mn==null?void 0:mn.page)!=null&&et.id)&&!((on=mn==null?void 0:mn.page)!=null&&on.has_study_record)&&(at==null?void 0:at.IsSuper)===!1&&(at==null?void 0:at.Status)=="in_progress"&&(Br.current=setTimeout(()=>{mn!=null&&mn.alert_addendance_tips||Lo()},1e4)),()=>{Br.current&&clearTimeout(Br.current)}},[b["classroomList/getSmartPlanItemBanks"],mn,at==null?void 0:at.IsSuper]),(0,e.useEffect)(()=>{wl&&(sr(),Ci())},[wl,ml]);const Co=()=>{const et=JSON.parse(localStorage.getItem("pptBrowsingHistory")||"[]");(et==null?void 0:et.findIndex(Hn=>(Hn==null?void 0:Hn.id)==(oe==null?void 0:oe.id)&&(Hn==null?void 0:Hn.courseId)==(oe==null?void 0:oe.coursesId)))==-1&&(et.push({id:oe==null?void 0:oe.id,courseId:oe==null?void 0:oe.coursesId}),localStorage.setItem("pptBrowsingHistory",JSON.stringify(et)),Za(1))},zo=()=>su(void 0,null,function*(){var et,on,Hn,Wl,Xl;const _n=()=>su(void 0,null,function*(){O({type:"classroomList/setActionTabs",payload:{key:"start_smart_plan_xia",params:{coursesId:oe==null?void 0:oe.coursesId,smart_plans_id:oe==null?void 0:oe.id}}})}),tu=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}.json`,{method:"get"});(on=(et=tu==null?void 0:tu.data)==null?void 0:et.not_start_positions)!=null&&on.length?Pe.default.confirm({centered:!0,okText:"\u786E\u8BA4\u7ED3\u675F\u6388\u8BFE",cancelText:"\u8FD4\u56DE\u7EE7\u7EED\u6388\u8BFE",icon:null,title:"\u63D0\u793A",content:e.createElement("span",null,"\u7CFB\u7EDF\u68C0\u6D4B\u5230 ",e.createElement("span",{style:{color:"#3061D0"}},"\u7B2C",(Xl=(Wl=(Hn=tu==null?void 0:tu.data)==null?void 0:Hn.not_start_positions)==null?void 0:Wl.sort((aa,tn)=>Number(aa)-Number(tn)))==null?void 0:Xl.join("\u3001"),"\u9875")," \u6709\u672A\u542F\u52A8\u7684\u7B54\u9898\uFF0C\u7ED3\u675F\u6388\u8BFE\u540E\uFF0C\u8FD9\u4E9B\u8BD5\u9898\u5C06\u65E0\u6CD5\u542F\u52A8\u7B54\u9898\u3002\u786E\u8BA4\u7ED3\u675F\u6388\u8BFE\uFF1F"),onCancel:()=>su(void 0,null,function*(){var aa,tn,Wn;Za((Wn=(tn=(aa=tu==null?void 0:tu.data)==null?void 0:aa.not_start_positions)==null?void 0:tn.sort((Nl,Ru)=>Number(Nl)-Number(Ru)))==null?void 0:Wn[0])}),onOk:()=>su(void 0,null,function*(){yield _n()})}):yield _n()}),Sr=()=>e.createElement(e.Fragment,null,oe!=null&&oe.user_login?e.createElement("div",{className:Nu.right},e.createElement(n0,{pageNum:dt,maxPage:mt})):e.createElement("div",{className:Nu.right},e.createElement(ye.Z,{spinning:b["classroomList/getSmartPlanItemBanks"]},e.createElement("div",{style:{visibility:mn?"visible":"hidden",height:"100vh",overflow:"hidden"}},(at==null?void 0:at.IsSuper)!==void 0&&e.createElement("div",{style:mt?{}:{display:"none"}},at!=null&&at.IsSuper?e.createElement(ci,{clickTab:Pr,pptFullScreen:ka,pageNum:dt,maxPage:mt,pptInfo:Qt,openEwm:$t,changePage:Wa,setOpenEwm:()=>{Rn(null)},aiImg:Jt,addPage:()=>{Zo()},gotoSlide:et=>{Za(et)},openCheckInfo:()=>{Xa(!0)}}):e.createElement(Pd,{isSimulate:Lr,officeToken:at,pageCache:an,pageNum:dt,aiImg:Jt,maxPage:mt,changePage:Wa,gotoSlide:et=>{Za(et)}}))))));(0,e.useEffect)(()=>{an!=null&&an.page&&Za(an==null?void 0:an.page)},[mn==null?void 0:mn.enable_progress_control]);const Jr=()=>{var et,on,Hn,Wl,Xl;return e.createElement("div",{className:Nu.left},e.createElement("div",{className:at!=null&&at.IsSuper?"":Nu.left_zone,id:"weboffice-zone"}),!Ra&&ka&&(at==null?void 0:at.IsSuper)&&Ou&&e.createElement("div",{className:Nu.left_float},e.createElement("div",{className:Nu.float_icon},e.createElement("img",{src:n(23175),width:20,height:20})),e.createElement("div",{className:Nu.float_more},e.createElement("div",{className:Nu.float_text,onClick:()=>{Sa(!0)}},"\u67E5\u770B\u5B66\u4E60\u4E92\u52A8"),(Qt==null?void 0:Qt.status)=="in_progress"&&((et=mn==null?void 0:mn.page)==null?void 0:et.lesson_mode)!="self_learning"&&!(mn!=null&&mn.is_extra)&&(((on=mn==null?void 0:mn.page)==null?void 0:on.status)=="not_started"||((Hn=mn==null?void 0:mn.page)==null?void 0:Hn.status)=="ended")&&(at==null?void 0:at.IsSuper)&&(mn==null?void 0:mn.count)>0&&e.createElement(e.Fragment,null,e.createElement("div",{className:Nu.float_icon},e.createElement("img",{src:n(68045),width:20,height:20})),e.createElement("div",{className:Nu.float_text,onClick:()=>su(void 0,null,function*(){O({type:"classroomList/setActionTabs",payload:{key:"question_time",params:{title:"\u8BBE\u7F6E\u7B54\u9898\u65F6\u957F",smart_plans_id:oe==null?void 0:oe.id,SmartPlanItemBanks:mn}}})})},((Wl=mn==null?void 0:mn.page)==null?void 0:Wl.status)=="ended"?"\u91CD\u542F\u7B54\u9898":"\u542F\u52A8\u7B54\u9898")),(Qt==null?void 0:Qt.status)=="in_progress"&&!(mn!=null&&mn.is_extra)&&((Xl=mn==null?void 0:mn.page)==null?void 0:Xl.status)=="in_progress"&&(at==null?void 0:at.IsSuper)&&(mn==null?void 0:mn.count)>0&&e.createElement(e.Fragment,null,e.createElement("div",{className:Nu.float_icon,style:{background:"rgba(227,0,0,0.1)"}},e.createElement("img",{src:n(7891),width:20,height:20})),e.createElement("div",{className:Nu.float_text,onClick:()=>su(void 0,null,function*(){var _n;let tu=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(_n=mn==null?void 0:mn.page)==null?void 0:_n.id,status:"ended"}});(tu==null?void 0:tu.status)==0&&(S.ZP.success("\u5DF2\u7ED3\u675F\u7B54\u9898"),Ta())})},"\u7ED3\u675F\u7B54\u9898")))),kt.get("simulate")=="true"&&e.createElement("div",{className:Nu.btn_float,style:{bottom:0,right:120}},e.createElement(yl.op,{className:"mb20",onClick:()=>{so(!1),kt.get("type")?D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan/${oe==null?void 0:oe.id}/ppt_info/info?type=${kt.get("type")}`):D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan/${oe==null?void 0:oe.id}/ppt_info/info`),window.location.reload()}},"\u8FD4\u56DE\u6559\u5E08\u8EAB\u4EFD")),!Ra&&ka&&((at==null?void 0:at.IsSuper)||kt.get("simulate")=="true")&&e.createElement("div",{className:Nu.btn_float,style:{right:at!=null&&at.IsSuper?"0px":"20px"}},e.createElement("div",null,e.createElement(yl.op,{disabled:dt==1,className:"mb20",onClick:()=>{if(dt==1){S.ZP.info("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u9875\u4E86\uFF01");return}or(""),Za(dt-1)}},"\u4E0A\u4E00\u9875")),e.createElement("div",null,e.createElement(yl.op,{disabled:dt==mt,onClick:()=>{if(dt==mt){S.ZP.info("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u9875\u4E86\uFF01");return}or(""),Za(dt+1)}},"\u4E0B\u4E00\u9875")),(at==null?void 0:at.IsSuper)&&e.createElement("div",{className:Nu.to_page_style},"\u8DF3\u8F6C\u5230",e.createElement(Fe.default,{style:{width:"65px",marginLeft:"10px"},size:"small",value:Qr||void 0,placeholder:"\u9875\u7801",onChange:_n=>{Za(_n),or(_n)}},Array.from({length:mt},(_n,tu)=>tu+1).map(_n=>e.createElement(Fe.default.Option,{key:_n,value:_n},_n))))),e.createElement(p0,{tokenInfo:at,isPptFullScreen:ka,pptInfo:Qt,handleEndClass:zo,openEwm:$t,setOpenEwm:Rn,toggleFullOrExitScreen:so,setAlterVis:ao,setStudentListVis:Qu}),!(oe!=null&&oe.user_login)&&!(at!=null&&at.IsSuper)&&!Lr&&e.createElement("div",{className:Nu.overcont2wrap},((mn==null?void 0:mn.enable_progress_control)||(at==null?void 0:at.Status)!="in_progress")&&e.createElement(yl.op,{disabled:dt==1,className:"mr30",onClick:()=>{if(dt==1){S.ZP.info("\u5DF2\u7ECF\u662F\u7B2C\u4E00\u9875\u4E86\uFF01");return}Za(dt-1)}},"\u4E0A\u4E00\u9875"),e.createElement("div",{className:Nu.over_content2},e.createElement("div",{className:Nu.over_button2,onClick:()=>{D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan`)}},e.createElement("img",{src:n(50066),className:Nu.ewm_img2,style:{width:"14px",height:"14px"}}),e.createElement("div",{className:Nu.ewm_text2},"\u9000\u51FA\u8BFE\u4EF6"))),((mn==null?void 0:mn.enable_progress_control)||(at==null?void 0:at.Status)!="in_progress")&&e.createElement(yl.op,{disabled:dt==mt,className:"ml30",onClick:()=>{var _n;if(dt==mt){S.ZP.info("\u5DF2\u7ECF\u662F\u6700\u540E\u4E00\u9875\u4E86\uFF01");return}dt==(an==null?void 0:an.class_max_position)&&!(at!=null&&at.IsSuper)&&(at==null?void 0:at.Status)=="in_progress"&&((_n=mn==null?void 0:mn.page)==null?void 0:_n.lesson_mode)=="online_lesson"?(S.ZP.warning("\u8BE5\u9875\u672A\u8BB2\u89E3\uFF0C\u5C06\u8DF3\u8F6C\u81F3\u6559\u5E08\u5F53\u524D\u9875\u9762"),Za(an==null?void 0:an.page)):Za(dt+1)}},"\u4E0B\u4E00\u9875")))};return e.createElement(ye.Z,{spinning:Ml},e.createElement("div",{style:{display:"flex"}},Kt,Rr&&e.createElement("div",{className:Nu.page_style},"\u7B2C",dt,"\u9875"),e.createElement(hi,{className:`${Nu.officeWrp} ${Po?Nu.arrow:""}`,lazy:!0,onResizeEnd:()=>{},onResize:et=>{const on=et[0]+et[1],Hn=[et[0]/on*100,et[1]/on*100];Hn[0]<20&&(Hn[0]=20,Hn[1]=80),Hn[1]==0?po(!0):po(!1),hr(Hn),ir()}},ka?e.createElement(e.Fragment,null,e.createElement(hi.Panel,{size:Hr[0]}," ",Jr()),e.createElement(hi.Panel,{size:Hr[1],collapsible:!(at!=null&&at.IsSuper),style:{overflow:"hidden"}},at!=null&&at.IsSuper?e.createElement(k.Z,{bodyStyle:{padding:0},headerStyle:{display:"none"},width:700,onClose:()=>{Sa(!1)},destroyOnClose:!0,forceRender:!0,open:Ra},Sr(),Er&&e.createElement("div",{className:Nu.drawer_ewm},e.createElement("div",{className:Nu.drawer_ewm_title,style:{marginBottom:"10px"}},mn==null?void 0:mn.smart_plan_name,e.createElement("i",{className:"iconfont icon-guanbi",style:{cursor:"pointer",color:"#000"},onClick:()=>{pr(!1)}})),mn!=null&&mn.open_rolling_qrcode_sign?e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C \u52A8\u6001\u4E8C\u7EF4\u7801\u5C06\u5728",e.createElement("span",{style:{color:"#3061D0",width:"30px",textAlign:"center"}},oo,"s"),"\u540E\u5237\u65B0"):e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C\u5373\u53EF\u624B\u673A\u7AEF\u7545\u5B66\u8BFE\u4EF6\uFF0C\u968F\u65F6\u5F00\u542F\u9AD8\u6548\u5B66\u4E60\uFF01"),e.createElement("div",{className:Nu.erweima},e.createElement(G.Z,{key:_r,errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${oe==null?void 0:oe.coursesId}&id=${oe==null?void 0:oe.id}&codeKey=${_r}`,bgColor:"#FFF",size:260,icon:`${J.Z.IMG_SERVER}/${(Q=l==null?void 0:l.setting)==null?void 0:Q.tab_logo_url}`})),(Qt==null?void 0:Qt.status)=="in_progress"&&((Ue=mn==null?void 0:mn.page)==null?void 0:Ue.lesson_mode)=="online_lesson"&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(We.Z,{checked:mn==null?void 0:mn.open_rolling_qrcode_sign,onChange:et=>su(void 0,null,function*(){let on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_rolling_qrcode_sign.json`,{method:"post",body:{open_rolling_qrcode_sign:et}});(on==null?void 0:on.status)==0&&(et?Ya():(qa(""),jr(10)),S.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ta())}),size:"small"}),e.createElement("div",{style:{margin:"0 10px",color:"#333333"}},"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230"),e.createElement(H.Z,{title:"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\u540E\uFF0C\u5B66\u751F\u4EC5\u80FD\u626B\u63CF\u4E8C\u7EF4\u7801\u5B8C\u6210\u7B7E\u5230\uFF0C\u5176\u4ED6\u65B9\u5F0F\u7B7E\u5230\u65E0\u6548\u5E76\u4E14\u65E0\u6CD5\u8FDB\u5165\u8BFE\u4EF6\u3002"},e.createElement("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#ccc",cursor:"pointer"}})))),e.createElement("div",{className:Nu.close_drawer,onClick:et=>{et.stopPropagation(),Sa(!1)}},e.createElement("i",{className:"iconfont icon-shouqi10 font14"}))):Sr())):e.createElement(e.Fragment,null,e.createElement(hi.Panel,{size:Hr[0],min:"20%",collapsible:!0}," ",Jr()),e.createElement(hi.Panel,{size:Hr[1],collapsible:!0,style:{overflow:"hidden"}},(!ka||!(at!=null&&at.IsSuper))&&Sr()))),e.createElement(l0.Z,{Callback:()=>{_e(),Ta(),(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:dt,allow_answer:!1,is_end:!1}}})}}),e.createElement(u0.Z,{v:Qt,params:oe,user:r,visible:No,afterOk:()=>{ao(!1),window.location.reload()},afterCancel:()=>{ao(!1)}}),e.createElement(o0,{openEwm:()=>{Rn(new Date)}}),e.createElement(g0,{setCheckInfo:Xa,checkInfo:ro,pptInfo:Qt,SmartPlanItemBanks:mn,getQuestionData:Ta,openRollCall:()=>{O({type:"user/setActionTabs",payload:{key:"\u5907\u8BFE\u968F\u673A\u70B9\u540D"}})}}),e.createElement(Pe.default,{centered:!0,maskClosable:!1,keyboard:!1,open:Tr,title:"\u8BFE\u4EF6\u4E8C\u7EF4\u7801",width:530,forceRender:!0,footer:null,closeIcon:null},mn!=null&&mn.open_rolling_qrcode_sign?e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C \u52A8\u6001\u4E8C\u7EF4\u7801\u5C06\u5728",e.createElement("span",{style:{color:"#3061D0",width:"30px",textAlign:"center"}},oo,"s"),"\u540E\u5237\u65B0"):e.createElement("div",{className:Nu.modal},"\u6253\u5F00",e.createElement("span",{style:{color:"#57BE6A",margin:"0 6px"}},e.createElement("i",{className:"iconfont icon-icon-weixin mr5"}),"\u5FAE\u4FE1"),"\u626B\u4E00\u626B\uFF0C\u5373\u53EF\u624B\u673A\u7AEF\u7545\u5B66\u8BFE\u4EF6\uFF0C\u968F\u65F6\u5F00\u542F\u9AD8\u6548\u5B66\u4E60\uFF01"),e.createElement("div",{className:Nu.erweima},e.createElement(G.Z,{key:_r,errorLevel:"H",value:`${location.origin}/miniprogram/courseware/study?course_id=${oe==null?void 0:oe.coursesId}&id=${oe==null?void 0:oe.id}&codeKey=${_r}`,bgColor:"#FFF",size:260,icon:`${J.Z.IMG_SERVER}/${(Mt=l==null?void 0:l.setting)==null?void 0:Mt.tab_logo_url}`})),(Qt==null?void 0:Qt.status)=="in_progress"&&((yt=mn==null?void 0:mn.page)==null?void 0:yt.lesson_mode)=="online_lesson"&&e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(We.Z,{checked:mn==null?void 0:mn.open_rolling_qrcode_sign,onChange:et=>su(void 0,null,function*(){let on=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_rolling_qrcode_sign.json`,{method:"post",body:{open_rolling_qrcode_sign:et}});(on==null?void 0:on.status)==0&&(et?Ya():(qa(""),jr(10)),S.ZP.success("\u64CD\u4F5C\u6210\u529F"),Ta())}),size:"small"}),e.createElement("div",{style:{margin:"0 10px",color:"#333333"}},"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230"),e.createElement(H.Z,{title:"\u5F00\u542F\u52A8\u6001\u4E8C\u7EF4\u7801\u7B7E\u5230\u540E\uFF0C\u5B66\u751F\u4EC5\u80FD\u626B\u63CF\u4E8C\u7EF4\u7801\u5B8C\u6210\u7B7E\u5230\uFF0C\u5176\u4ED6\u65B9\u5F0F\u7B7E\u5230\u65E0\u6548\u5E76\u4E14\u65E0\u6CD5\u8FDB\u5165\u8BFE\u4EF6\u3002"},e.createElement("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#ccc",cursor:"pointer"}}))),e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",marginBottom:"10px",marginTop:"20px"}},e.createElement(ut.ZP,{style:{marginRight:"20px"},onClick:()=>{eu(!1),Dr(!1)}},"\u67E5\u770B\u8BFE\u4EF6"),e.createElement(ut.ZP,{type:"primary",onClick:()=>{eu(!1),Dr(!1),Rn(null),so(!0),Co()}},"\u5168\u5C4F\u4E0A\u8BFE"),e.createElement(ut.ZP,{type:"primary",style:{marginLeft:"20px"},onClick:()=>{eu(!1),Xa(!0)}},"\u67E5\u770B\u7B7E\u5230\u8BE6\u60C5"))),e.createElement(Pe.default,{centered:!0,keyboard:!1,maskClosable:!1,destroyOnClose:!0,open:xl,title:"\u63D0\u793A",width:"450px",cancelButtonProps:{style:{display:"none"}},okText:"\u77E5\u9053\u4E86",onCancel:()=>{var et;Dl(!1),Za((et=Pn==null?void 0:Pn.sort())==null?void 0:et[0])},onOk:()=>su(void 0,null,function*(){var et;Dl(!1),Za((et=Pn==null?void 0:Pn.sort())==null?void 0:et[0])})},e.createElement("div",null,"\u8BF7\u5B8C\u6210 ",(ft=Pn==null?void 0:Pn.sort())==null?void 0:ft.map((et,on)=>e.createElement("span",{key:on,style:{color:"#3061d0",cursor:"pointer"},onClick:()=>{Dl(!1),Za(et)}},"\u7B2C",et,"\u9875",on+1==(Pn==null?void 0:Pn.length)?"":"\u3001"))," \u6240\u6709\u8BD5\u9898\u4EE5\u89E3\u9501\u4E0B\u4E00\u9875\u5185\u5BB9\u3002")),e.createElement(Pe.default,{centered:!0,keyboard:!1,destroyOnClose:!0,maskClosable:!1,open:wl,title:"\u5B66\u751F\u5217\u8868",width:"800px",onCancel:()=>{Qu(!1)},footer:null},e.createElement(ye.Z,{spinning:!1},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"20px"}},e.createElement(Fe.default,{style:{width:160},size:"large",placeholder:"\u8BF7\u9009\u62E9\u73ED\u7EA7",value:ml==null?void 0:ml.course_group_id,options:(Ve=Ja||[])==null?void 0:Ve.map(et=>({label:et==null?void 0:et.name,value:et==null?void 0:et.id})),onChange:et=>{ml.page=1,ml.course_group_id=et,ho(yi({},ml))}}),e.createElement(yl.t7,{style:{width:300},value:{value:ml.search},onChange:(et,on)=>{ml.page=1,ml.search=et,ho(yi({},ml))},placeholder:"\u8F93\u5165\u5B66\u751F\u59D3\u540D\u6216\u5B66\u53F7\u641C\u7D22"})),e.createElement(ne.default,{loading:Ju,style:{marginBottom:"10px"},className:"mt10",scroll:{y:400},columns:[{title:"\u59D3\u540D",dataIndex:"user_name",ellipsis:!0,render:et=>e.createElement("span",{style:{color:"#666666"}},et||"--")},{title:"\u5B66\u53F7",dataIndex:"student_id",ellipsis:!0,render:et=>e.createElement("span",{style:{color:"#666666"}},et||"--")},{title:"\u5206\u73ED",dataIndex:"group_name",ellipsis:!0,render:et=>e.createElement("span",{style:{color:"#666666"}},et||"--")},{title:"\u64CD\u4F5C",dataIndex:"gender",key:"gender",width:80,fixed:"right",align:"center",render:(et,on)=>e.createElement("span",{className:"c-grey-666",style:{cursor:"pointer",color:"#3061d0"},onClick:()=>{Qu(!1),D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan/${oe==null?void 0:oe.id}/users/${on==null?void 0:on.user_login}/ppt_info/info`)}},"\u67E5\u770B")}],dataSource:Pa,pagination:{size:"default",showQuickJumper:!0,showSizeChanger:!0,pageSizeOptions:["50","100","150","200"],pageSize:ml.limit,current:ml.page,position:["bottomRight"],onChange:(et,on)=>{ml.page=et,ml.limit=on,ho(yi({},ml))},total:er,showTotal:(et,on)=>e.createElement("span",null,"\u5171",e.createElement("span",{style:{color:"#165DFF"}}," ",et," "),"\u6761\u6570\u636E")}}))),e.createElement(Vo,{Callback:et=>su(void 0,null,function*(){var on;let Hn=yield(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/change_item_banks.json`,{method:"post",body:{smart_plan_item_bank_id:(on=mn==null?void 0:mn.page)==null?void 0:on.id,status:"in_progress",answer_limit_time:et}});(Hn==null?void 0:Hn.status)==0&&(S.ZP.success("\u5DF2\u542F\u52A8\u7B54\u9898"),Ta(),Sa(!0),O({type:"classroomList/setActionTabs",payload:{key:""}}))})}),e.createElement(a0.Z,{Callback:()=>{D.history.push(`/classrooms/${oe==null?void 0:oe.coursesId}/smart_plan`),(0,Se.ZP)(`/api/courses/${oe==null?void 0:oe.coursesId}/smart_plans/${oe==null?void 0:oe.id}/set_page_cache.json`,{method:"post",body:{type:0,data:{page:dt,allow_answer:!1,is_end:!0}}})}})))};var F0=(0,D.connect)(({user:r,classroomList:u,loading:l,globalSetting:b})=>({user:r,classroomList:u,globalSetting:b,loading:l.effects}))(C0)},79829:function(gt,Xe,n){"use strict";n.d(Xe,{Z:function(){return Ie}});var e=n(59301),E=n(6767),C=n(62957),D=n(14566),ae=n(25399),S=n(60242),Pe=n(57193),pe={box:"box___542Xs",row:"row___hSJJt",icon:"icon___qExRj"},H=n(71951),o=n(79633),k=n(47257),ne=n.n(k),ut=n(63949),Fe=n(59301),G=Object.defineProperty,We=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,Se=Object.prototype.propertyIsEnumerable,J=(W,Tt,Yt)=>Tt in W?G(W,Tt,{enumerable:!0,configurable:!0,writable:!0,value:Yt}):W[Tt]=Yt,F=(W,Tt)=>{for(var Yt in Tt||(Tt={}))ye.call(Tt,Yt)&&J(W,Yt,Tt[Yt]);if(We)for(var Yt of We(Tt))Se.call(Tt,Yt)&&J(W,Yt,Tt[Yt]);return W},me=(W,Tt,Yt)=>new Promise((Xt,_t)=>{var Ut=X=>{try{_(Yt.next(X))}catch(Ge){_t(Ge)}},ce=X=>{try{_(Yt.throw(X))}catch(Ge){_t(Ge)}},_=X=>X.done?Xt(X.value):Promise.resolve(X.value).then(Ut,ce);_((Yt=Yt.apply(W,Tt)).next())}),Ie=({v:W,visible:Tt,params:Yt,user:Xt,afterOk:_t,afterCancel:Ut})=>{var ce;const[_,X]=(0,e.useState)([]),Ge=(0,e.useRef)([]),[rt,te]=(0,e.useState)(!1),Me={multiple:!1,withCredentials:!0,showUploadList:!1,onRemove:()=>{X([])},accept:".ppt,.pptx",beforeUpload:ve=>me(void 0,null,function*(){var ge,we;const se=ve.name.endsWith(".ppt"),ke=ve.name.endsWith(".pptx");if(!se&&!ke)return E.ZP.warning("\u53EA\u80FD\u4E0A\u4F20PPT\u6216PPTX\u7C7B\u578B\u7684\u6587\u4EF6"),Promise.reject();if(ve.size/1024/1024>200)return E.ZP.warning("\u4E0A\u4F20\u7684\u6587\u4EF6\u5927\u5C0F\u9650\u5236200MB\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u4E0A\u4F20"),Promise.reject();let j=ve==null?void 0:ve.name,ie=j.lastIndexOf("."),xe=j.substring(0,ie);xe.length>20&&(xe=xe.substring(0,20));const bt=yield(0,Pe.ZP)(`/api/courses/${Yt==null?void 0:Yt.coursesId}/smart_plans/check_exist.json`,{method:"post",body:{filename:xe}});(ge=bt==null?void 0:bt.data)!=null&&ge.exist&&E.ZP.info("\u68C0\u6D4B\u5230\u8BFE\u5802\u5DF2\u6709\u540C\u540D\u8BFE\u4EF6\uFF0C\u65B0\u4E0A\u4F20\u7684\u8BFE\u4EF6\u540D\u79F0\u5C06\u6DFB\u52A0\u201C\u526F\u672C\u201D\u8FDB\u884C\u533A\u5206");const ht={id:String(Math.random()).slice(-6),name:ve.name,size:ve.size,file:ve,description:"",percent:0,status:"uploading"};return Qe(ht,{container_type:"SmartPlan",login:(we=Xt==null?void 0:Xt.userInfo)==null?void 0:we.login,container_id:null,description:"",realFileName:!1}),X(wt=>[ht]),Promise.reject()})},Qe=(ve,ge)=>me(void 0,null,function*(){var we,se,ke,Ze,j,ie,xe,bt,ht,wt;ge.file_name=ve.name;const Ct=ve.name,Te=yield(0,Pe.ZP)("/api/buckets/get_smart_plan_token.json",{method:"get"});if((Te==null?void 0:Te.status)!==0){X(Ye=>(Ye[Ye.findIndex(x=>x.name===Ct)].status="error",[...Ye])),E.ZP.warning("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u5C1D\u8BD5");return}Te.data=JSON.parse((0,o.pe)(Te.data));const Ft=new(ne())({endpoint:(we=Te==null?void 0:Te.data)==null?void 0:we.end_point,region:(se=Te==null?void 0:Te.data)==null?void 0:se.region,accessKeyId:(ke=Te==null?void 0:Te.data)==null?void 0:ke.access_key_id,accessKeySecret:(Ze=Te==null?void 0:Te.data)==null?void 0:Ze.access_key_secret,bucket:(j=Te==null?void 0:Te.data)==null?void 0:j.bucket,stsToken:(ie=Te==null?void 0:Te.data)==null?void 0:ie.security_token});ve.name.split(".").pop(),Ft.multipartUpload(`smartplans/${Yt.coursesId}/${Yt==null?void 0:Yt.id}/${(xe=Xt==null?void 0:Xt.userInfo)==null?void 0:xe.login}/${Date.now()}/${Ct}`,new Blob([ve.file],{type:ve.file.type}),{timeout:3600*1e3,partSize:1002400,progress:(Ye,x,U)=>{X(z=>{const w=z.findIndex(V=>V.name===Ct);return z[w].client=Ft,z[w].percent=Ye*100,z[w].checkpoint=x,[...z]})},checkpoint:(ht=Ge.current[(bt=Ge.current)==null?void 0:bt.findIndex(Ye=>Ye.name===Ct)])==null?void 0:ht.checkpoint,callback:{customValue:{id:Ct+""},url:(wt=Te==null?void 0:Te.data)==null?void 0:wt.callback_url,host:Te==null?void 0:Te.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,Pe.rz)(ge)}}).then(function(Ye){X(x=>{var U,z,w;const V=x.findIndex(ue=>ue.name===Ct);let lt="done";return((U=Ye.data)==null?void 0:U.status)===0?x[V].response=(z=Ye.data)==null?void 0:z.data:(E.ZP.warning((w=Ye.data)==null?void 0:w.message),lt="error"),x[V].status=lt,[...x]})}).catch(function(Ye){(Ye==null?void 0:Ye.name)!=="cancel"&&X(x=>{const U=x.findIndex(z=>z.name===Ct);return x[U].status="error",[...x]})})});return Fe.createElement(C.default,{maskClosable:!1,centered:!0,open:Tt,title:"\u66F4\u6362\u8BFE\u4EF6",width:550,destroyOnClose:!0,onCancel:()=>{Ut(),X([])},okButtonProps:{loading:rt,disabled:(_==null?void 0:_.length)>0&&((ce=_==null?void 0:_[0])==null?void 0:ce.status)=="uploading"},onOk:()=>me(void 0,null,function*(){var ve,ge,we;if((_==null?void 0:_.length)>0&&((ve=_==null?void 0:_[0])==null?void 0:ve.status)=="uploading"){E.ZP.warning("\u8BFE\u4EF6\u6B63\u5728\u4E0A\u4F20\u4E2D\uFF0C\u8BF7\u7A0D\u7B49...");return}te(!0);const se=yield(0,Pe.ZP)(`/api/courses/${Yt==null?void 0:Yt.coursesId}/smart_plans/${W==null?void 0:W.id}/change_attachment.json`,{method:"put",body:{attachment_id:(we=(ge=_==null?void 0:_[0])==null?void 0:ge.response)==null?void 0:we.attachment_id,smart_plan_id:W==null?void 0:W.id}});return te(!1),(se==null?void 0:se.status)===0&&(E.ZP.success("\u66F4\u6362\u6210\u529F\uFF01"),_t(),X([])),se})},Fe.createElement("div",null,Fe.createElement("div",{style:{fontSize:"14px",color:"#000",marginBottom:"20px"}},"\u652F\u6301\u4E0A\u4F20\u65B0\u7248PPT\u6587\u4EF6\u8986\u76D6\u5F53\u524DPPT\u5185\u5BB9\u3002\u66F4\u6362PPT\u540E\uFF0C\u4EA4\u4E92\u529F\u80FD\u4ECD\u4E0E\u539F\u9875\u7801\u5173\u8054\u3002\u5982\u9700\u8C03\u6574\uFF0C\u53EF\u901A\u8FC7 ",Fe.createElement("span",{style:{color:"#3061D0",cursor:"pointer"},onClick:()=>{}},"\u8BFE\u4EF6\u4EA4\u4E92\u8BE6\u60C5")," \u5FEB\u901F\u4FEE\u6539\u4EA4\u4E92\u529F\u80FD\u5173\u8054\u7684\u5E7B\u706F\u7247\u3002 "),Fe.createElement(D.default,F({},Me),Fe.createElement("div",{style:{display:"flex",alignItems:"center"}},Fe.createElement(H.op,{shape:"default"},Fe.createElement("div",{style:{display:"flex",alignItems:"center"}},Fe.createElement("img",{width:14,src:n(69629)}),Fe.createElement("span",{style:{marginLeft:"5px"}},"\u4E0A\u4F20\u66F4\u6362\u8BFE\u4EF6"))),Fe.createElement("span",{style:{color:"#9096A3",fontSize:"12px",marginLeft:"10px"}},"\u6587\u4EF6\u5927\u5C0F\u4E0D\u8D85\u8FC7200MB\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1APPT\u3001PPTX"))),Fe.createElement("div",{className:pe.box},_.map(ve=>Fe.createElement("div",{key:ve.id,className:pe.row},Fe.createElement("div",{className:pe.icon},ve.status==="done"&&Fe.createElement("i",{className:"iconfont icon-wancheng",style:{color:"#19CB70"}}),ve.status==="error"&&Fe.createElement("i",{className:"iconfont icon-cuowu",style:{color:"#E30000",marginLeft:1,fontSize:13}})),Fe.createElement("div",null,Fe.createElement(ae.Z,{title:ve==null?void 0:ve.name},Fe.createElement("div",{style:{color:ve.status==="error"?"#E30000":"#3061D0",textDecoration:"underline"}},(0,ut.tP)(ve==null?void 0:ve.name,9))),ve.status==="uploading"&&Fe.createElement(S.Z,{strokeColor:"#3061D0",trailColor:"rgba(144, 150, 163, 0.1)",percent:ve.percent,showInfo:!1,size:[168,4]})))))))}},76888:function(gt,Xe,n){"use strict";n.d(Xe,{i:function(){return me},q:function(){return F}});var e=n(59301),E={flex_box_center:"flex_box_center___yMUhy",flex_space_between:"flex_space_between___KNvG9",flex_box_vertical_center:"flex_box_vertical_center___yqWY9",flex_box_center_end:"flex_box_center_end___DJKuV",flex_box_column:"flex_box_column___NTtN1",singleSelect:"singleSelect___fU3O9",multipleSelect:"multipleSelect___LFXCB",plus:"plus___gdDhG"},C=n(92310),D=n.n(C),ae=n(25399),S=n(82326),Pe=n(99571),pe=n(57193),H=Object.defineProperty,o=Object.defineProperties,k=Object.getOwnPropertyDescriptors,ne=Object.getOwnPropertySymbols,ut=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,G=(st,Ie,W)=>Ie in st?H(st,Ie,{enumerable:!0,configurable:!0,writable:!0,value:W}):st[Ie]=W,We=(st,Ie)=>{for(var W in Ie||(Ie={}))ut.call(Ie,W)&&G(st,W,Ie[W]);if(ne)for(var W of ne(Ie))Fe.call(Ie,W)&&G(st,W,Ie[W]);return st},ye=(st,Ie)=>o(st,k(Ie)),Se=(st,Ie)=>{var W={};for(var Tt in st)ut.call(st,Tt)&&Ie.indexOf(Tt)<0&&(W[Tt]=st[Tt]);if(st!=null&&ne)for(var Tt of ne(st))Ie.indexOf(Tt)<0&&Fe.call(st,Tt)&&(W[Tt]=st[Tt]);return W},J=(st,Ie,W)=>new Promise((Tt,Yt)=>{var Xt=ce=>{try{Ut(W.next(ce))}catch(_){Yt(_)}},_t=ce=>{try{Ut(W.throw(ce))}catch(_){Yt(_)}},Ut=ce=>ce.done?Tt(ce.value):Promise.resolve(ce.value).then(Xt,_t);Ut((W=W.apply(st,Ie)).next())});const F=st=>{var Ie=st,{wrapClassName:W,wrapStyle:Tt={},showLinkButton:Yt=!0,tooltipTitle:Xt="",loadGeneral:_t=!1,data:Ut={}}=Ie,ce=Se(Ie,["wrapClassName","wrapStyle","showLinkButton","tooltipTitle","loadGeneral","data"]);const _="course_disciplines_list",[X,Ge]=(0,e.useState)(()=>{const ge=sessionStorage.getItem(_);return ge?JSON.parse(ge):[]}),[rt,te]=(0,e.useState)(!1),[Me,Qe]=(0,e.useState)(!0);(0,e.useEffect)(()=>{ve()},[]);const ve=()=>J(void 0,null,function*(){var ge,we,se,ke;te(!0);const Ze=yield(0,pe.U2)("v2/course_disciplines.json",Ut);if(Ze.status===0){const j=((we=(ge=Ze==null?void 0:Ze.data)==null?void 0:ge.list)==null?void 0:we.map(ie=>({value:ie.id,label:ie.name})))||[];if(Ge(j),Qe(!1),sessionStorage.setItem(_,JSON.stringify(j)),Me){const ie=(ke=(se=Ze==null?void 0:Ze.data)==null?void 0:se.list)==null?void 0:ke.find(xe=>xe.is_default);_t&&ie&&ce.onChange(ie==null?void 0:ie.id)}}te(!1)});return e.createElement("div",{className:D()(E.singleSelect,W),style:Tt},e.createElement(ae.Z,{title:Xt},e.createElement(S.default,We({allowClear:!0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B",loading:rt,options:X,onDropdownVisibleChange:ge=>{ge&&ve()}},ce))),Yt&&e.createElement(Pe.ZP,{type:"link",target:"_blank",href:"/knowledgeHub"},"\u7BA1\u7406\u8BFE\u7A0B"))},me=st=>{var Ie=st,{wrapClassName:W,wrapStyle:Tt={},showLinkButton:Yt=!0,courseDisciplineId:Xt="",isPlusHeight:_t=!1,tooltipTitle:Ut,allowAcceptEmpty:ce=!1,data:_={}}=Ie,X=Se(Ie,["wrapClassName","wrapStyle","showLinkButton","courseDisciplineId","isPlusHeight","tooltipTitle","allowAcceptEmpty","data"]);const[Ge,rt]=(0,e.useState)([]),[te,Me]=(0,e.useState)(!1);(0,e.useEffect)(()=>{Qe()},[Xt]);const Qe=()=>J(void 0,null,function*(){var ve,ge;if(!ce&&!Xt){rt([]);return}Me(!0);const we=yield(0,pe.U2)(`v2/course_disciplines/${Xt||"all"}.json`,_);if(we.status===0){const se=((ge=(ve=we==null?void 0:we.data)==null?void 0:ve.tag_disciplines)==null?void 0:ge.map(ke=>({value:ke.id,label:ke.name})))||[];se.length&&rt(se)}Me(!1)});return e.createElement("div",{className:D()(E.multipleSelect,W),style:Tt},e.createElement(ae.Z,{title:Ut},e.createElement(S.default,ye(We({allowClear:!0,mode:"multiple",optionFilterProp:"label",placeholder:"\u8BF7\u9009\u62E9\u77E5\u8BC6\u70B9",loading:te,options:Ge,maxTagCount:"responsive",onDropdownVisibleChange:ve=>{ve&&Qe()}},X),{className:D()(X.className,_t&&E.plus)}))),Yt&&e.createElement(Pe.ZP,{className:E.btn,type:"link",target:"_blank",href:"/knowledgeHub"},"\u7BA1\u7406\u77E5\u8BC6\u70B9"))}},85091:function(gt,Xe,n){"use strict";n.d(Xe,{Z:function(){return G}});var e=n(59301),E=n(95392),C=n(62957),D=n(99571),ae=n(29787),S=n(20885),Pe=n(62998),pe=n(95440),H=n(24334),o=n(56656),k=n.n(o),ne=n(99268),ut=n(59301),Fe=(We,ye,Se)=>new Promise((J,F)=>{var me=W=>{try{Ie(Se.next(W))}catch(Tt){F(Tt)}},st=W=>{try{Ie(Se.throw(W))}catch(Tt){F(Tt)}},Ie=W=>W.done?J(W.value):Promise.resolve(W.value).then(me,st);Ie((Se=Se.apply(We,ye)).next())}),G=({open:We,onClose:ye})=>{const[Se,J]=(0,e.useState)(void 0);console.log((0,E.useLocation)(),33);const F=(0,E.useLocation)();(0,e.useEffect)(()=>{We&&function(){return Fe(this,null,function*(){const we=yield(0,S.X6)(We);J(we.data)})}()},[We]);const{status:me,created_at:st,code:Ie,name:W,language:Tt,pass_sets_count:Yt,set_count:Xt,error_msg:_t,output:Ut,input:ce,expected_output:_,execute_memory:X,user:Ge,execute_time:rt,input_file_url:te,output_file_url:Me,is_file:Qe,expected_output_file_url:ve}=Se||{};return ut.createElement(C.default,{open:We,width:1e3,onCancel:()=>ye(!1),footer:ut.createElement(D.ZP,{type:"primary",onClick:()=>ye(!1)},"\u5173\u95ED"),centered:!0},ut.createElement(ae.Z,{spinning:!Se,delay:500},ut.createElement("div",{className:"record-detail-info"},Se?ut.createElement(ut.Fragment,null,ut.createElement("div",{className:"record-detail-body"},ut.createElement("h2",null," \u63D0\u4EA4\u8BB0\u5F55 "),ut.createElement("ul",{className:"record-info"},ut.createElement("li",null," \u8BC4\u6D4B\u7ED3\u679C\uFF1A",ut.createElement("span",{className:me===0?"c-green":"c-red"},Pe.Im[me])," "),ut.createElement("li",null," \u63D0\u4EA4\u65F6\u95F4\uFF1A",ut.createElement("span",null,k()(st).format("YYYY-MM-DD HH:mm:ss"))," "),ut.createElement("li",null," \u8BED\u8A00\uFF1A",ut.createElement("span",null,Tt)," "),ut.createElement("li",null," \u6267\u884C\u7528\u65F6\uFF1A",ut.createElement("span",null,rt*1e3,"ms")," "),ut.createElement("li",null," ",`${me===ne.h.HIDE_COMPILE_STATUS?"--":Yt} / ${Xt} \u4E2A\u901A\u8FC7\u7684\u6D4B\u8BD5\u7528\u4F8B`," ")),(0,Pe.gZ)({status:me,error_msg:_t,execute_time:rt,output:Ut,input:ce,expected_output:_,input_file_url:te,output_file_url:Me,is_file:Qe,expected_output_file_url:ve}),ut.createElement("h2",null," \u63D0\u4EA4\u7684\u5185\u5BB9 "),ut.createElement(pe.ZP,{height:"200px",width:"100%",language:Tt==null?void 0:Tt.toLocaleLowerCase(),value:H.Base64.decode(Ie),options:{readOnly:!0}}))):null)))}},62969:function(gt,Xe,n){"use strict";n.d(Xe,{Im:function(){return Xt},Y4:function(){return Ut}});var e=n(59301),E=n(37568),C=n(6767),D=n(99571),ae=n(10786),S=n(24334),Pe=n.n(S),pe=n(89517),H=n(35191),o=n(97231),k=n(63949),ne=n(34376),ut=n.n(ne),Fe=n(57193),G=n(95392),We=n(85091),ye=n(27035),Se=n(20885),J=n(57753),F=n(9931),me=n(92310),st=n.n(me),Ie=n(91415),W=n(59301),Tt=(X,Ge,rt)=>new Promise((te,Me)=>{var Qe=we=>{try{ge(rt.next(we))}catch(se){Me(se)}},ve=we=>{try{ge(rt.throw(we))}catch(se){Me(se)}},ge=we=>we.done?te(we.value):Promise.resolve(we.value).then(Qe,ve);ge((rt=rt.apply(X,Ge)).next())});const{TextArea:Yt}=E.default,Xt={[ae.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[ae.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[ae.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 _t=(X=>(X[X.SET_VISIBLE=0]="SET_VISIBLE",X[X.SET_TABINDEX=1]="SET_TABINDEX",X))(_t||{});function Ut(X){const{status:Ge,error_msg:rt,output:te,input:Me,expected_output:Qe,is_file:ve,input_file_url:ge,output_file_url:we,expected_output_file_url:se,setMonacoValue:ke,setData:Ze,highlightEndEntry:j}=X,ie=(0,e.useRef)(),xe=(0,e.useRef)(),bt=(0,e.useRef)();let ht=null;const wt={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,e.useEffect)(()=>{if(te&&!ve&&ie.current){const Ct=new ne.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});Ct.open(ie.current);const Te=(j?k.jl:k.pp)(S.Base64.decode(te));Ct.write(Te),Ct.setOption("theme",{background:"#1e1e1e"})}if(Me&&!ve&&xe.current){const Ct=new ne.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});Ct.open(xe.current),Ct.write((j?k.jl:k.pp)(Me)),Ct.setOption("theme",{background:"#1e1e1e"})}if(Qe&&!ve&&bt.current){const Ct=new ne.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});Ct.open(bt.current),Ct.write((j?k.jl:k.pp)(S.Base64.decode(Qe))),Ct.setOption("theme",{background:"#1e1e1e"})}},[te]),Ge){case ae.h.NOMATCH:ht=W.createElement(W.Fragment,null,W.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!ve&&W.createElement("div",{ref:ie}),ve&&W.createElement("div",{style:wt},W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(this,null,function*(){const Ct=yield(0,Fe.ZP)(we,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});ke(Ct),setTimeout(()=>{Ze(we)},200)})},te)),W.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!ve&&W.createElement("div",{ref:bt}),ve&&W.createElement("div",{style:wt},W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(this,null,function*(){const Ct=yield fetch(se,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});ke(yield Ct.text()),setTimeout(()=>{Ze(se)},200)})},Qe)));break;case ae.h.EXECUTEFAILURE:ht=W.createElement(W.Fragment,null,W.createElement("div",{style:{border:"1px #F6F7F9 solid"}},W.createElement("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"}},"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!ve&&W.createElement(o.Z,{value:Me,style:wt}),ve&&W.createElement("div",{style:wt},W.createElement("a",{onClick:()=>(0,k.LR)(ge,Me)},Me))),W.createElement("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"}},W.createElement("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"}},"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),W.createElement("pre",{className:pe.Z.error,style:{color:"#E30000",padding:"0 10px"}},S.Base64.decode(rt),"111")));break;case ae.h.COMPILEFAILURE:ht=W.createElement(W.Fragment,null,W.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),W.createElement("pre",{className:pe.Z.error},S.Base64.decode(rt)));break;case ae.h.PODFAILURE:ht=W.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case ae.h.TIMEOUT:ht=W.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return W.createElement(W.Fragment,null," ",ht," ")}function ce(X){const{status:Ge,error_msg:rt,execute_time:te,output:Me,input:Qe,expected_output:ve,is_file:ge,input_file_url:we,output_file_url:se,expected_output_file_url:ke}=X;let Ze=null;switch(Ge){case ae.h.OK:case ae.h.NOMATCH:case ae.h.EXECUTEFAILURE:case ae.h.COMPILEFAILURE:Ze=W.createElement("div",{id:"outputResultRef",className:"h100"});break;case ae.h.PODFAILURE:Ze=W.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case ae.h.TIMEOUT:Ze=W.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return W.createElement(W.Fragment,null," ",Ze," ")}function _({value:X,className:Ge}){return W.createElement("span",{className:Ge},X)}Xe.ZP=({input:X,is_file:Ge,debuging:rt,submitting:te,executingMessage:Me,debugResult:Qe,onChangeInput:ve,onDebugCode:ge,onSubmitCode:we,hack:se,user:ke,submitResult:Ze,isWhiteTheme:j,topDispatch:ie})=>{const[xe]=(0,G.useSearchParams)(),bt=(0,G.useParams)(),[ht,wt]=(0,e.useState)(!1),[Ct,Te]=(0,e.useState)(!1),[Ft,Bt]=(0,e.useState)(1),[Ye,x]=(0,e.useState)(!1),[U,z]=(0,e.useState)(0),[w,V]=(0,e.useState)(!1),[lt,ue]=(0,e.useState)(""),[Z,de]=(0,e.useState)(""),M=(0,e.useRef)(),q=(0,e.useRef)(),Le=(0,e.useRef)(null),P=(0,e.useRef)(null),R=(0,e.useRef)(null);console.log(Ze,"submitResult",bt);const{status:s,id:p,input:h,output:T,expected_output:Ae,is_file:he,input_file_url:Be,output_file_url:K,expected_output_file_url:be,error_msg:vt,hack_sets:en}=Ze||{};(0,e.useEffect)(()=>{s===0&&(Bt(1),z(0))},[s,p]),(0,e.useEffect)(()=>{Tt(void 0,null,function*(){var jt;const ln=yield(0,Se.rX)(bt==null?void 0:bt.id,"submit");(ln==null?void 0:ln.status)===0&&(ln!=null&&ln.data&&((jt=ln==null?void 0:ln.data)==null?void 0:jt.status)!==0?(ie({type:J.Types.SET_SUBMIT_RESULT,payload:{submitResult:ln==null?void 0:ln.data}}),Bt(2),z(320)):(Bt(1),z(0)))})},[bt==null?void 0:bt.id]),(0,e.useEffect)(()=>{if(M.current){let At=function(cn){fn=Bn.offsetHeight,Mn=!0,In=cn.pageY,R.current.style.display="block"},jt=function(){Mn=!1,R.current.style.display="none"},ln=function(cn){if(Mn){qe();let tl=In-cn.pageY,gl=fn+tl;if(gl<0&&(gl=0),gl>window.innerHeight-150&&(gl=window.innerHeight-150),Ft===1){gl<=34?z(0):z(gl);return}console.log(gl,"resizeH"),z(gl)}};const Bn=Le.current;let fn=0,Mn=!1,In=0;const sl=document.getElementById("case-y-bar");return sl==null||sl.addEventListener("mousedown",At),document.addEventListener("mousemove",ln),document.addEventListener("mouseup",jt),()=>{const cn=document.getElementById("case-y-bar");cn==null||cn.removeEventListener("mousedown",At),document.removeEventListener("mousemove",ln),document.removeEventListener("mouseup",jt)}}},[M,Ft]),(0,e.useEffect)(()=>{const At=ye.Z.subscribe("resize-move-bar",qe);if(xe.get("type")!=="exercises")return document.addEventListener((0,Ie.gH)(),xt),()=>{document.removeEventListener((0,Ie.gH)(),xt),At()}},[]),(0,e.useEffect)(()=>{});function qe(){var At,jt,ln,Bn;const fn=document.getElementById("outputResultRef");if(fn){let Mn=fn.dataset.text;q.current.reset(),q.current.writeln(Mn);const In=document.getElementById("outputResultRef").offsetWidth-20,sl=((Bn=(ln=(jt=(At=q.current)==null?void 0:At._core)==null?void 0:jt._renderService)==null?void 0:ln.dimensions)==null?void 0:Bn.actualCellWidth)||10,cn=Math.ceil(In/sl);q.current.resize(cn,Math.ceil(fn.clientHeight/16))}}function pt(){wt(!ht),setTimeout(()=>{qe()},300),ht?z(320):(z(window.innerHeight-150),x(!0))}function qt(){Ct?(Te(!1),(0,Ie.BU)()):(Te(!0),(0,Ie.Dj)(P.current))}const xt=At=>{(0,Ie.vp)()||Te(!1)},Wt=(0,e.useMemo)(()=>{if(Qe){const{status:At,output:jt,error_msg:ln}=Qe;return setTimeout(()=>{let Bn="",fn=document.getElementById("outputResultRef");jt?Bn=S.Base64.decode(jt):ln&&(Bn=S.Base64.decode(ln)),q.current=new ne.Terminal({fontSize:14,theme:{background:"#181e2e",cursor:"transparent"},rendererType:"dom"}),q.current.open(fn),q.current.onKey(function(Mn){var In;if(Mn.domEvent.key.toLocaleUpperCase()==="C"&&Mn.domEvent.ctrlKey){Mn.domEvent.preventDefault();let sl=(In=q.current)==null?void 0:In.getSelection();navigator.clipboard.writeText(sl).then(()=>{})}}),fn.dataset.text=Bn,q.current.setOption("convertEol",!0),qe()},300),W.createElement(W.Fragment,null,ce(Qe))}return null},[Qe]);function tt(){var At,jt;if(!(se!=null&&se.code)||((At=se==null?void 0:se.code)==null?void 0:At.trim().length)===0){(jt=C.ZP)==null||jt.warning("\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01");return}Bt(1),z(320),ge()}const Dt=At=>Tt(void 0,null,function*(){let jt=yield(0,Fe.ZP)(`/api/problems/${At}/start.json`,{method:"get",params:{hack_user_id:ke==null?void 0:ke.user_id}});jt&&(window.location.href=`/myproblems/${jt==null?void 0:jt.identifier}${window.location.search}`)});function Lt(){he?navigator.clipboard.writeText(S.Base64.decode(vt)).then(()=>{C.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(S.Base64.decode(T)).then(()=>{C.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return W.createElement(e.Fragment,null,W.createElement("div",{className:st()(pe.Z.case,j&&pe.Z.whiteCase),style:{height:U},ref:Le},W.createElement("div",{className:pe.Z.fullMask,ref:R}),W.createElement("div",{className:pe.Z["resize-y-bar"],id:"case-y-bar",ref:M,draggable:!1},Ft===2&&W.createElement("i",{className:"iconfont icon-guangbiao",draggable:!1})),Ft===1&&(U<=34?W.createElement("div",{onClick:()=>{z(320)},className:pe.Z.unfoldBtn},"\u63A7\u5236\u53F0",W.createElement("i",{className:"iconfont icon-zhankai9 ml10 font12"})):W.createElement("div",{onClick:()=>{z(0)},className:pe.Z.unfoldBtn,style:{borderRadius:"0px 0px 8px 8px",top:0}},"\u63A7\u5236\u53F0",W.createElement("i",{className:"iconfont icon-shouqi8 ml10 font12"}))),W.createElement("div",null,W.createElement("div",{className:pe.Z.caseHead},W.createElement("div",{className:pe.Z.dot}),W.createElement("div",{className:pe.Z.text},Ft===1?"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C":"\u8BC4\u6D4B\u7ED3\u679C"),Ft===2&&!te&&typeof s=="number"&&W.createElement(W.Fragment,null,s===ae.h.OK?W.createElement("div",{className:pe.Z.pass},W.createElement("i",{className:"iconfont icon-tongguo font14 mr5"}),"\u8BC4\u6D4B\u901A\u8FC7"):W.createElement("div",{className:pe.Z.noPass},W.createElement("i",{className:"iconfont icon-jinggao-3 font14 mr5"}),Xt[s])),W.createElement("div",{className:pe.Z.btns},Ft===2&&!te&&W.createElement(W.Fragment,null,s!==ae.h.OK&&W.createElement("div",{onClick:Lt},W.createElement("i",{className:"iconfont icon-fuzhi8"}),"\u590D\u5236\u9519\u8BEF\u4FE1\u606F"),W.createElement("div",{onClick:()=>{V(p)}},W.createElement("i",{className:"iconfont icon-danceng-xinjianwenjian"}),"\u663E\u793A\u8BE6\u60C5")),xe.get("type")!=="exercises"&&W.createElement("div",{title:"\u5C55\u5F00/\u6536\u7F29",onClick:()=>pt()},W.createElement("i",{className:`iconfont icon-${ht?"suoxiao1":"fangda"}`})))),W.createElement("div",{style:{display:Ft===1?"block":"none"}},rt?W.createElement(H.Z,{style:{color:"#1976d2"},message:"\u670D\u52A1\u542F\u52A8\u4E2D..."}):W.createElement("div",{style:{height:U-34}},W.createElement("div",{className:pe.Z.result},W.createElement("div",{className:pe.Z.left},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00FA95"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),W.createElement("span",null,"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B")),W.createElement("div",{className:pe.Z.leftNode},W.createElement(Yt,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\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:Ge?"":X,onChange:ve}))),W.createElement("div",{className:pe.Z.right},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),W.createElement("span",null,"\u4EE3\u7801\u6267\u884C\u7ED3\u679C")),W.createElement("div",{className:pe.Z.node},Qe?Wt:W.createElement("p",{style:{color:"#8F96B1"}},"\u8BF7\u5728\u5DE6\u4FA7\u8F93\u5165\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D\uFF0C\u5373\u53EF\u751F\u6210\u4EE3\u7801\u6267\u884C\u7ED3\u679C")))))),W.createElement("div",{style:{display:Ft===2?"block":"none"}},te?W.createElement(H.Z,{style:{color:"#1976d2"},message:"\u670D\u52A1\u542F\u52A8\u4E2D..."}):W.createElement("div",{style:{height:U-34,display:"flex",flexDirection:"column",overflow:"hidden"}},W.createElement("div",{ref:P,className:pe.Z.elseNode},W.createElement("div",{className:pe.Z.nameWrap},W.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),W.createElement("span",null,"\u5B9E\u9645\u8F93\u5165")),W.createElement("div",{className:pe.Z.scroll},W.createElement("pre",{className:pe.Z.scrollBox,style:Ye?{height:Ct?"calc(100vh - 20px)":200}:{height:24,overflow:"hidden"}},!he&&W.createElement(_,{value:h}),he&&W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(void 0,null,function*(){const At=yield fetch(Be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});de(yield At.text()),setTimeout(()=>{ue(Be)},200)})},h)),h&&W.createElement("div",{className:pe.Z.action},W.createElement("span",{onClick:()=>x(!Ye)},Ye?"\u6536\u8D77":"\u5C55\u5F00")))),W.createElement("div",{className:pe.Z.result,style:{flex:1,overflow:"hidden"}},W.createElement("div",{className:pe.Z.left},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00FA95"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),W.createElement("span",null,"\u9884\u671F\u8F93\u51FA")),W.createElement("div",{className:pe.Z.node,style:{background:"#1B2333",color:"#2ABD8C"}},W.createElement("pre",null,!he&&W.createElement(_,{className:"mb10",value:Ae&&S.Base64.decode(Ae)||""}),he&&W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(void 0,null,function*(){const At=yield fetch(be,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});de(yield At.text()),setTimeout(()=>{ue(be)},200)})},Ae)))),W.createElement("div",{className:pe.Z.right},W.createElement("div",{className:pe.Z.title},W.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),W.createElement("span",null,"\u5B9E\u9645\u8F93\u51FA")),W.createElement("div",{className:pe.Z.node,style:{color:s===ae.h.OK?"#2ABD8C":"#FF2C29"}},W.createElement("pre",null,(s===4||s===5)&&W.createElement(_,{className:"mb10",value:vt&&S.Base64.decode(vt)||""}),s!=4&&s!=5&&(he?W.createElement("a",{style:{fontSize:"16px"},onClick:()=>Tt(void 0,null,function*(){const At=yield(0,Fe.ZP)(K,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});try{de(At)}catch(jt){de("")}setTimeout(()=>{ue(K)},200)})},T):W.createElement(_,{className:"mb10",value:T&&S.Base64.decode(T)||""})))))))))),W.createElement("div",{className:st()(pe.Z.footer,j&&pe.Z.whiteFooter),style:{zIndex:100}},(se==null?void 0:se.is_program)&&(se==null?void 0:se.above_question)&&W.createElement(D.ZP,{className:"mr10",type:"primary",onClick:()=>Dt(se==null?void 0:se.above_question),id:"oj-prev",ghost:!0},"\u4E0A\u4E00\u9898"),(se==null?void 0:se.is_program)&&(se==null?void 0:se.under_question)&&W.createElement(D.ZP,{className:"mr10",type:"primary",onClick:()=>Dt(se==null?void 0:se.under_question),id:"oj-next",ghost:!0},"\u4E0B\u4E00\u9898"),W.createElement(D.ZP,{style:{border:"1px solid #2ABD8C",color:"#2ABD8C"},ghost:!0,disabled:rt||te,loading:rt,color:"#2ABD8C",className:"mr10",onClick:tt},"\u8C03\u8BD5\u4EE3\u7801"),xe.get("qtype")!=="8"&&W.createElement(D.ZP,{className:pe.Z.disabled,type:"primary",icon:W.createElement("i",{className:"iconfont icon-bofang1"}),loading:te,disabled:rt||te,onClick:()=>{var At,jt;if(!(se!=null&&se.code)||((At=se==null?void 0:se.code)==null?void 0:At.trim().length)===0){(jt=C.ZP)==null||jt.warning("\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01");return}Bt(2),z(320),we()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4")),W.createElement(We.Z,{onClose:V,open:w}),W.createElement(F.Z,{close:!0,data:lt,type:lt.length?"txt":"",onClose:()=>ue(""),monacoEditor:{value:Z,language:"txt",onChange:()=>{},options:{fontSize:14,readOnly:!0,minimap:{enabled:!1}}}}))}},57753:function(gt,Xe,n){"use strict";n.r(Xe),n.d(Xe,{Types:function(){return je},default:function(){return c}});var e=n(59301),E=n(95392),C=n(11938),D=n(62957),ae=n(29787),S=n(99571),Pe=n(25399),pe=n(77019),H=n(20885),o=n(75823),k=n(91415),ne=n(67786),ut=n(78323),Fe=n(87169),G=n(30641),We=n(95440),ye=n(81123),Se=n(83090),J=n(11979),F=n(6767),me={list:"list___IRN6i",copy:"copy___qCn9B"},st=n(56102),Ie=n(57193),W=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())}),Yt=({showResourceCentre:i,identifier:f})=>{const A=(0,E.useParams)(),[Y,le]=(0,e.useState)(null);(0,e.useEffect)(()=>{i&&L()},[i]);const L=()=>W(void 0,null,function*(){const De=yield(0,Ie.ZP)(`/api/problems/${f}/attachment_list.json`,{method:"get"});(De==null?void 0:De.status)==0&&le(De.data||[])});return e.createElement("div",{className:"tpi-code-setting"},e.createElement("h3",null,"\u8D44\u6E90\u4E2D\u5FC3"),!(Y!=null&&Y.length)&&e.createElement("div",{className:"tc mt50 c-grey-999"},"\u6682\u65E0\u8D44\u6E90\u6570\u636E"),Y==null?void 0:Y.map((De,Re)=>e.createElement("dl",{className:me.list,key:Re},e.createElement(Pe.Z,{title:De.title},e.createElement("dt",null,e.createElement("i",{className:"icon-wenjian4 mr5"}),De.title)),e.createElement("dd",null,e.createElement(st.CopyToClipboard,{text:De.saved_file_path,onCopy:()=>F.ZP.success("\u590D\u5236\u6210\u529F")},e.createElement("span",{className:`${me.copy} current`},"\u70B9\u51FB\u590D\u5236"))))))},Xt=n(59301),_t=Object.defineProperty,Ut=Object.defineProperties,ce=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,Ge=Object.prototype.propertyIsEnumerable,rt=(i,f,A)=>f in i?_t(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,te=(i,f)=>{for(var A in f||(f={}))X.call(f,A)&&rt(i,A,f[A]);if(_)for(var A of _(f))Ge.call(f,A)&&rt(i,A,f[A]);return i},Me=(i,f)=>Ut(i,ce(f));const Qe={theme:(0,Se.G)("ProgrammingCodeMode","vs-dark"),fontSize:(0,Se.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,Se.G)("cmTabToSpace",!0),showResourceCentre:!1};var ve=(i=>(i[i.set_font_size=0]="set_font_size",i[i.set_theme=1]="set_theme",i[i.on_tab_to_space=2]="on_tab_to_space",i[i.set_show_editor_setting=3]="set_show_editor_setting",i[i.set_show_respurce_center=4]="set_show_respurce_center",i))(ve||{});function ge(i,f){switch(f.type){case 3:return Me(te({},i),{showEditorSetting:f.payload});case 1:return Me(te({},i),{theme:f.payload});case 0:return Me(te({},i),{fontSize:f.payload});case 2:return Me(te({},i),{tabToSpace:f.payload});case 4:return Me(te({},i),{showResourceCentre:f.payload});default:throw new Error}}var we=({isLoading:i,value:f,onChange:A,language:Y,onUpdateCode:le,ActionBarRender:L,setIsWhiteTheme:De,identifier:Re})=>{const[Ce,Ne]=(0,e.useReducer)(ge,Qe),{theme:it,fontSize:He,showEditorSetting:Ke,tabToSpace:St,showResourceCentre:Ot}=Ce,Ee=(0,e.useRef)(),dn=(0,e.useRef)();(0,e.useEffect)(()=>{De(it==="vs")},[it]);const Rt={onFontSizeChange:hn=>{Ne({type:0,payload:hn}),(0,Se.t)("cmFontSize",hn)},tabToSpace:St,cmFontSize:He,className:"oj",cmCodeMode:it,onTabToSpace:hn=>{Ne({type:2,payload:hn}),(0,Se.t)("cmTabToSpace",hn)},onCodeModeChange:hn=>{Ne({type:1,payload:hn}),(0,Se.t)("ProgrammingCodeMode",hn)}};function rn(){Ne({type:3,payload:!1})}function An(){Ne({type:3,payload:!0})}function bn(){Ne({type:4,payload:!1})}function Un(){Ne({type:4,payload:!0})}const un={value:f,language:Y,theme:it,options:{fontSize:He,insertSpaces:St},onChange:hn=>{A(hn),dn.current=hn,clearTimeout(Ee.current),Ee.current=setTimeout(()=>{le(dn.current)},1e4)},onEditBlur:hn=>{dn.current&&le(dn.current)}};return Xt.createElement(e.Fragment,null,L(An,Un),Xt.createElement("div",{style:{flex:1,overflow:"hidden"}},!i&&Xt.createElement(We.ZP,te({},un))),Xt.createElement(ye.Z,null,Xt.createElement(G.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Ke,onClose:rn},Xt.createElement(J.Z,te({},Rt)))),Xt.createElement(ye.Z,null,Xt.createElement(G.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:Ot,onClose:bn},Xt.createElement(Yt,{showResourceCentre:Ot,identifier:Re}))))},se=n(60141),ke=n(24334),Ze=n(62969),j={flex_box_center:"flex_box_center___rM3g8",flex_space_between:"flex_space_between___Oc7SE",flex_box_vertical_center:"flex_box_vertical_center___MnmYE",flex_box_center_end:"flex_box_center_end___QQh83",flex_box_column:"flex_box_column___ZRFbL","left-panel":"left-panel___SKGyd","tab-panel-body":"tab-panel-body___gABdv",b1:"b1___QpbmK","oj-width-input":"oj-width-input___eJQWT","oj-mr":"oj-mr___AxILO","s-navs":"s-navs___FXwOi","bg-white":"bg-white___kbZ6r",active:"active___QGOnZ",list:"list___PXTsq",btns:"btns___F8yZK",drawer:"drawer___xdGaT",tour:"tour___oMkVh"},ie={pagination:"pagination___yDAjZ",info:"info___ATmsa",wrap:"wrap____KX19"},xe=n(54172),bt=n(13747),ht=n(58617),wt=n(85091),Ct=n(56656),Te=n.n(Ct),Ft=n(59301);const{Column:Bt}=xe.default;var Ye=({submitResult:i,submitting:f,submitRecords:A,page:Y,onPageChange:le,topicId:L})=>{const[De]=(0,E.useSearchParams)(),{records:Re,records_count:Ce}=A||{},[Ne,it]=(0,e.useState)(!1),He=De.get("type")==="1";return Ft.createElement(ae.Z,{spinning:f,tip:"\u8BC4\u6D4B\u4E2D...",indicator:Ft.createElement(ht.Z,{style:{fontSize:24},spin:!0})},(Re==null?void 0:Re.length)>0?Ft.createElement(xe.default,{dataSource:Re,rowKey:"id",pagination:!1},Ft.createElement(Bt,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(Ke,St)=>Ft.createElement("span",null," ",Te()(Ke).format("YYYY-MM-DD HH:mm:ss"))}),Ft.createElement(Bt,{title:"\u8BC4\u6D4B\u7ED3\u679C",dataIndex:"status",key:"status",render:(Ke,St)=>{var Ot;return Ft.createElement("span",{className:`${Ke===0?"c-green":"c-red"} current`,onClick:()=>{it(St.id)}},(Ot=Ze.Im[Ke])==null?void 0:Ot.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),Ft.createElement(Bt,{title:`\u6267\u884C\u7528\u65F6 (${He?"MS":"S"})`,dataIndex:"execute_time",key:"execute_time",render:Ke=>Ke?He?Ke:Ke/1e3:""}),Ft.createElement(Bt,{title:`\u5185\u5B58\u6D88\u8017\uFF08${He?"KB":"MB"}\uFF09`,dataIndex:"execute_memory",key:"execute_memory",render:Ke=>Ke?He?Ke:parseFloat((Ke/1024).toFixed(2)):""}),Ft.createElement(Bt,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"}),Ft.createElement(Bt,{title:"\u64CD\u4F5C",dataIndex:"status",key:"status",render:(Ke,St)=>Ft.createElement("span",{className:"c-light-primary current",onClick:()=>{it(St.id)}},"\u67E5\u770B")})):Ft.createElement("div",{style:{height:300,width:"100%"}}),Ft.createElement(wt.Z,{onClose:it,open:Ne}),Ce>15?Ft.createElement(bt.Z,{className:ie.pagination,current:Y,pageSize:15,total:Ce,onChange:le}):null)},x=n(13922),U=n(96599),z={desc:"desc___iOAgd",info:"info___GPALq",info_tag:"info_tag___CFEn8"},w=n(97231),V=n(59301);const lt={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u4E2D\u7B49",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var ue=({hack:i})=>{const{language:f,difficult:A,time_limit:Y,description:le}=i,[L]=(0,E.useSearchParams)(),De=lt[A];return V.createElement(V.Fragment,null,V.createElement("ul",{className:z.info},V.createElement("li",null,"\u7F16\u7A0B\u8BED\u8A00\xA0\xA0",V.createElement("b",{className:z.info_tag},f)),V.createElement("li",null,V.createElement("span",{className:"ml20"},"\u96BE\u5EA6"),"\xA0\xA0",V.createElement(U.default,{color:De==null?void 0:De.color},De==null?void 0:De.name)),V.createElement("li",null,V.createElement("span",{className:"ml20"},"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236"),"\xA0\xA0",V.createElement("span",{style:{color:"#333333"}},Y,"\u79D2"))),L.get("qtype")==="8"?V.createElement(w.Z,{value:le,showProgramFill:!0,className:z.desc}):V.createElement(w.Z,{value:le,className:z.desc}))},Z={},de=n(59301),M=({hack:i,current_user:f})=>de.createElement("div",{className:Z.answer},i!=null&&i.answer_text?de.createElement(w.Z,{style:{padding:"13px 0"},value:(i==null?void 0:i.answer_text)||""}):de.createElement(x.Z,{customText:"\u6682\u672A\u8BBE\u7F6E\u53C2\u8003\u7B54\u6848~"})),q=n(27035);function Le(i,f){return(0,Ie.U2)(`/problems/${i}/comments.json`,{page:f,limit:10})}function P(i){return(0,Ie.v_)(`/discusses/${i}/plus.json`,{container_type:"Discuss",type:1})}function R(i,f,A){return(0,Ie.v_)(`/problems/${i}/comments/reply.json`,{comments:{content:A,parent_id:f}})}function s(i,f){return(0,Ie.v_)(`/problems/${i}/comments.json`,{comments:{content:f}})}function p(i,f,A){return(0,Ie.v_)(`/problems/${i}/comments/${f}/hidden.json`,A)}function h(i,f){return(0,Ie.IV)(`/problems/${i}/comments/${f}`)}var T=n(63386);function Ae({author:i}){return e.createElement("a",{href:`/users/${i.login}`,target:"_blank"},e.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${ut.Z.IMG_SERVER}/images/${i.image_url}`,width:"50"}))}function he({data:i,index:f,parentDiscussIndex:A,user:Y,onSetActionType:le}){const{author:L,can_delete:De,content:Re,id:Ce,time:Ne}=i;function it(){le({id:Ce,index:f,type:"delete-discuss",parentDiscussIndex:A,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const He=Y.admin||De||L.user_id===Y.user_id;return e.createElement("div",{className:"discuss-item-container second-discuss "},e.createElement(Ae,{author:L}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${L.login}`,target:"_blank"},L.name),e.createElement("span",{className:"grey"},Ne),e.createElement("div",{className:"btn-group",style:{marginBottom:0}},He?e.createElement("a",{onClick:it,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null)),e.createElement(w.Z,{className:"discuss-content",value:Re})))}var Be=({user:i,data:f,index:A,onPlusDiscuss:Y,onSetActionType:le,activeDiscussIndex:L,onReplyDiscuss:De,onSetActiveDiscussIndex:Re})=>{const{content:Ce,children:Ne,hidden:it,id:He,praise_count:Ke,time:St,user_praise:Ot,can_delete:Ee,author:dn}=f;function Rt(){Re(He)}function rn(){Y(He,!Ot,A)}function An(){le({id:He,index:A,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function bn(){le({id:He,index:A,params:{hidden:it?"0":"1"},type:"hidden-discuss",message:it?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Un=i.admin||i.user_id===dn.user_id;return e.createElement("div",{className:"discuss-item-container",key:He},e.createElement(Ae,{author:dn}),e.createElement("section",null,e.createElement("div",{className:"discuss-info"},e.createElement("a",{href:`/users/${dn.login}`,target:"_blank"}," ",dn.name," "),e.createElement("span",{className:"grey"},St)),e.createElement(w.Z,{className:"discuss-content",value:Ce}),Ne&&Ne.length>0?e.createElement("div",{className:"reply-discuss-container"},Ne.map((un,hn)=>e.createElement(he,{key:un.id,data:un,index:hn,user:i,onSetActionType:le,parentDiscussIndex:A}))):null,e.createElement("div",{className:"btn-group"},Un?e.createElement("a",{onClick:bn,title:it?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},e.createElement("i",{className:it?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Ee&&(!Ne||Ne.length==0)?e.createElement("a",{onClick:An,title:"\u5220\u9664"},e.createElement("i",{className:"iconfont icon-shanchu"})):null,e.createElement("a",{onClick:Rt,title:"\u56DE\u590D"}," ",e.createElement("i",{className:"iconfont icon-huifu1"})," "),e.createElement("a",{onClick:rn,className:Ot?"c-orange":""},e.createElement("i",{className:Ot?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),e.createElement("span",null,Ke||""))),e.createElement(T.Z,{id:He,activeDiscussIndex:L,onReplyDiscuss:De})))},K=n(48775),be={"dis-input-editor-container":"dis-input-editor-container___nKGxx",active:"active___tmt7T","input-mask":"input-mask___epEle","text-area":"text-area___Vry8W","tip-container":"tip-container___plpA3",hide:"hide___kPfyC","md-container":"md-container___u85aq","btn-send":"btn-send___deQ5v"},vt=n(17949),en=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())}),qe=({user_praise:i,praise_count:f,praisePlus:A,onCreateDiscuss:Y,discuss_count:le})=>{const[L,De]=(0,e.useState)(!1),[Re,Ce]=(0,e.useState)("");function Ne(St){Ce(St)}function it(){De(!0)}function He(){De(!1)}function Ke(){return en(this,null,function*(){Y(Re),Ce(""),De(!1)})}return e.createElement("div",{className:`${be["dis-input-editor-container"]} ${L?be.active:""} `},e.createElement("div",{className:L?`hide ${be["text-area"]}`:be["text-area"]},e.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:it}),e.createElement("a",null," ",e.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",le," "),e.createElement("a",{className:"c-light-black",onClick:A,title:i?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},e.createElement("i",{className:`mr3 ${i?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),f?e.createElement("span",null,f):"")),L?e.createElement("div",{className:be["input-mask"],onClick:He}):null,e.createElement("div",{className:L?be["md-container"]:`${be["md-container"]} hide`},e.createElement(vt.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:Re,height:240,onChange:Ne}),e.createElement("div",{className:be["tip-container"],onClick:He},e.createElement("a",{className:be["btn-send"],onClick:Ke}," \u53D1\u9001 "))))},pt=n(59301),qt=Object.defineProperty,xt=Object.defineProperties,Wt=Object.getOwnPropertyDescriptors,tt=Object.getOwnPropertySymbols,Dt=Object.prototype.hasOwnProperty,Lt=Object.prototype.propertyIsEnumerable,At=(i,f,A)=>f in i?qt(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,jt=(i,f)=>{for(var A in f||(f={}))Dt.call(f,A)&&At(i,A,f[A]);if(tt)for(var A of tt(f))Lt.call(f,A)&&At(i,A,f[A]);return i},ln=(i,f)=>xt(i,Wt(f)),Bn=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())});const fn={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var Mn=(i=>(i[i.GET_DISCUSSES=0]="GET_DISCUSSES",i[i.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",i[i.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",i[i.PLUS_DISCUSS=3]="PLUS_DISCUSS",i[i.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",i[i.SET_PAGE=5]="SET_PAGE",i[i.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",i))(Mn||{});function In(i,f){switch(f.type){case 6:return ln(jt({},i),{loading:!0});case 0:return jt(jt({},i),f.payload);case 1:return jt(jt({},i),f.payload);case 4:return jt(jt({},i),f.payload);case 3:return jt(jt({},i),f.payload);case 5:return ln(jt({},i),{page:f.payload});case 2:return jt(jt({},i),f.payload);default:throw new Error}}var sl=({user:i,identifier:f,hack:A,onTriggerPraise:Y,activeIndex:le})=>{const[L,De]=(0,e.useReducer)(In,fn),{loading:Re,page:Ce,data:Ne,count:it,actionType:He,activeDiscussIndex:Ke}=L,St=(0,e.useCallback)(()=>Bn(void 0,null,function*(){De({type:6});const un=yield Le(f,Ce),{comments:hn,disscuss_count:yn}=un;De({type:0,payload:{data:hn,count:yn,loading:!1}})}),[Ce,f]);(0,e.useEffect)(()=>{le==="2"&&St()},[f,Ce,le]);function Ot(un){De({type:5,payload:un})}function Ee(un){De({type:4,payload:{actionType:un}})}function dn(un){De(Ke===un?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:un}})}function Rt(un,hn,yn){return Bn(this,null,function*(){try{const jn=yield P(un);Ne[yn].user_praise=hn,Ne[yn].praise_count=jn.praise_count,De({type:3,payload:{data:[...Ne]}})}catch(jn){console.log(jn)}})}function rn(){return Bn(this,null,function*(){const{id:un,params:hn,type:yn,index:jn,parentDiscussIndex:Cn}=He;if(yn==="hidden-discuss"&&(yield p(f,un,hn),Cn?Ne[Cn].children[jn].hidden=hn.hidden==1:Ne[jn].hidden=hn.hidden==1,De({type:4,payload:{actionType:null,data:[...Ne]}})),yn==="delete-discuss"){if(yield h(f,un),Cn||Cn===0){let Qn=Ne[Cn].children;for(let Gn=Qn.length-1;Gn>=0;Gn--)if(Qn[Gn].id===un){Qn.splice(Gn,1);break}Ne[Cn].children=Qn}else for(let Qn=Ne.length-1;Qn>=0;Qn--)if(Ne[Qn].id===un){Ne.splice(Qn,1);break}De({type:4,payload:{actionType:null,data:[...Ne]}})}})}function An(){De({type:4,payload:{actionType:null}})}function bn(un,hn){return Bn(this,null,function*(){try{yield R(f,un,hn),St()}catch(yn){console.log(yn)}})}function Un(un){return Bn(this,null,function*(){De({type:6}),yield s(f,un),St()})}return pt.createElement(pt.Fragment,null,pt.createElement("div",{className:"discuss-panel"},Ne.length===0?pt.createElement(x.Z,null):Ne.map((un,hn)=>pt.createElement(Be,{onReplyDiscuss:bn,onPlusDiscuss:Rt,onSetActiveDiscussIndex:dn,onSetActionType:Ee,data:un,index:hn,user:i,activeDiscussIndex:Ke})),it>10?pt.createElement("div",{className:"pagination-container"},pt.createElement(bt.Z,{showQuickJumper:!0,onChange:Ot,current:Ce,total:it})):null),pt.createElement(qe,{user_praise:A.user_praise,praise_count:A.praises_count,praisePlus:Y,discuss_count:A.comments_count,onCreateDiscuss:Un}),pt.createElement(ye.Z,null,pt.createElement(D.default,{centered:!0,title:"\u63D0\u793A",open:!!He,onOk:rn,onCancel:An},pt.createElement("p",null,He?He.message:"")),pt.createElement(K.Z,null)))},cn=n(82326),tl=n(37568),gl=n(86743),cl={},Fl=n(59301),Zl=({hack:i,current_user:f})=>Fl.createElement("div",{className:cl.answer},i!=null&&i.analysis?Fl.createElement(w.Z,{style:{padding:"13px 0"},value:(i==null?void 0:i.analysis)||""}):Fl.createElement(x.Z,{customText:"\u6682\u672A\u8BBE\u7F6E\u9898\u76EE\u89E3\u6790~"})),Ul={hackSets:"hackSets___tw75g",collapseWrapper:"collapseWrapper___TteKi",panelHeader:"panelHeader___Y_Xjq",rateInput:"rateInput___y1qUi",open:"open___xrixP",close:"close___jb6D2",uploadTableWrapper:"uploadTableWrapper___U9Tz_"},au=n(8848),cu=n(5269),pl=n(28284),fu=n(1439),ql=n(87960),Bl=n(59301);const{TextArea:wu}=tl.default,{Panel:ot}=au.default;var Vt=({data:i,hack:f})=>(console.log(i,f,"data"),f!=null&&f.is_file?Bl.createElement(ql.Y2,{disabled:!0,className:Ul.uploadTableWrapper,showScore:!f.test_set_score,data:i,isProgramHomework:!0}):Bl.createElement("div",{className:Ul.hackSets},i==null?void 0:i.map((A,Y)=>Bl.createElement(au.default,{accordion:!0,bordered:!1,key:Y,defaultActiveKey:Y===0&&A.id,className:Ul.collapseWrapper,expandIcon:({isActive:le})=>Bl.createElement("i",{className:`iconfont icon-weizhankai ${le?Ul.open:Ul.close}`,style:{fontSize:14,transition:"all .2s"}})},Bl.createElement(ot,{key:A.id,header:Bl.createElement(pe.Z,{align:"middle",justify:"space-between",wrap:!1},Bl.createElement(cu.Z,{className:Ul.panelHeader},Bl.createElement("span",null,"\u6D4B\u8BD5\u7528\u4F8B",Y+1)),Bl.createElement(cu.Z,{flex:1},Bl.createElement(pe.Z,{align:"middle",justify:"end",wrap:!1},!(f!=null&&f.test_set_score)&&Bl.createElement(cu.Z,{className:Ul.rateInput},Bl.createElement("span",{className:"mr20"},"\u8BC4\u5206\u5360\u6BD4"),Bl.createElement("div",null,Bl.createElement(pl.default.Item,{noStyle:!0},Bl.createElement(fu.Z,{value:A==null?void 0:A.score,className:Ul.baseFormItem,min:0,max:100,disabled:!0}))),Bl.createElement("span",{className:"ml10"},"%")))))},Bl.createElement(pl.default.Item,{label:"\u8F93\u5165",labelCol:{span:24}},Bl.createElement(wu,{readOnly:!0,value:A==null?void 0:A.input,rows:4})),Bl.createElement(pl.default.Item,{label:"\u8F93\u51FA",labelCol:{span:24}},Bl.createElement(wu,{readOnly:!0,value:A==null?void 0:A.output,rows:4}))))))),ll={tabs:"tabs___p2jIb",tabWarp:"tabWarp___mt05L",tab:"tab___IYGdQ",active:"active___fQMlP",content:"content___GWVJY"},Sn=n(59301),dl=(0,e.forwardRef)(({data:i=[]},f)=>{var A;const[Y,le]=(0,e.useState)(),L=i.filter(Re=>Re.show);(0,e.useEffect)(()=>{L.length&&le(L[0].id)},[i==null?void 0:i.length]);const De=((A=L.find(Re=>Re.id===Y))==null?void 0:A.element)||null;return(0,e.useImperativeHandle)(f,()=>({setActiveTab:Re=>le(Re)})),Sn.createElement("div",{className:ll.tabs},Sn.createElement("div",{className:ll.tabWarp},L.map(Re=>Sn.createElement("div",{onClick:()=>le(Re.id),className:`${ll.tab} ${Re.id===Y?ll.active:""}`,key:Re.id},Re.name))),Sn.createElement("div",{className:ll.content},De))}),Ht=n(59301),Al=Object.defineProperty,Sl=Object.defineProperties,Xn=Object.getOwnPropertyDescriptors,nl=Object.getOwnPropertySymbols,Ol=Object.prototype.hasOwnProperty,Yu=Object.prototype.propertyIsEnumerable,Au=(i,f,A)=>f in i?Al(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,Vu=(i,f)=>{for(var A in f||(f={}))Ol.call(f,A)&&Au(i,A,f[A]);if(nl)for(var A of nl(f))Yu.call(f,A)&&Au(i,A,f[A]);return i},ju=(i,f)=>Sl(i,Xn(f)),Ql=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())});const ba={1:"\u7B80\u5355",2:"\u9002\u4E2D",3:"\u56F0\u96BE"},Zu={1:"#2fa34f",2:"#0152d9",3:"#fa6400"};var Ha=({hack:i,onTriggerPraise:f,topicId:A,page:Y,onPageChange:le,user:L,current_user:De,submitRecords:Re,submitting:Ce,submitResult:Ne,setActiveIndex:it,hack_sets:He})=>{var Ke,St;const[Ot]=(0,E.useSearchParams)(),[Ee,dn]=(0,e.useState)("0"),Rt=(0,E.useLocation)(),[rn,An]=(0,e.useState)(!1),[bn,Un]=(0,e.useState)(null),[un,hn]=(0,e.useState)([]),[yn,jn]=(0,e.useState)([]),[Cn,Qn]=(0,e.useState)({page:1,limit:10}),Gn=(0,e.useRef)(null),vl=(0,e.useRef)(null);console.log(L,"user");let[pn,rl]=(0,e.useState)(ju(Vu({},(0,E.useParams)()),{page:1,per_page:20,name:""}));(0,e.useEffect)(()=>{vl.current&&(i==null?void 0:i.is_close_tips)===!1&&bn===null&&Un(!0)},[vl.current,i==null?void 0:i.is_close_tips,bn]);function Zn(){return Ql(this,null,function*(){yield(0,Ie.ZP)("/api/users/close_tips.json",{method:"post"})})}(0,e.useEffect)(()=>{it(Ee)},[Ee]);function Dn(xn){return Ql(this,null,function*(){let qn=xn.target.id;if(qn==="1"){let En=yield(0,Ie.ZP)(`/api/myproblems/${pn.id}/redo_logs.json`,{method:"get",params:Vu({},Cn)});(En==null?void 0:En.status)===0&&jn(En==null?void 0:En.data)}dn(qn)})}(0,e.useEffect)(()=>q.Z.subscribe("to-commit-info",()=>{dn("1"),Gn.current&&Gn.current.setActiveTab("1")}),[]),(0,e.useEffect)(()=>q.Z.subscribe("to-reset-info",()=>{Dn({target:{id:"1"}}),Gn.current&&Gn.current.setActiveTab("2")}),[]);function Tn(){dn("2")}function Ln(){return Ql(this,null,function*(){let xn=yield(0,Ie.ZP)("/api/problems/my_hack_list.json",{method:"get",params:Vu({identifier:pn==null?void 0:pn.id},pn)});hn(xn)})}const fl=[{title:null,description:Ht.createElement("div",null,Ht.createElement("b",{onClick:()=>{Un(!1),Zn(),An(!0),Ln()},className:"c-light-primary font16 current"},"\u67E5\u770B\u9898\u76EE\u5217\u8868\u5165\u53E3"),Ht.createElement("div",{className:"c-grey-333 mt10 mb20"},"\u672C\u6B21\u4F5C\u4E1A\u6240\u9700\u5B8C\u6210\u7684\u8BD5\u9898\u90FD\u53EF\u4EE5\u5728\u8FD9\u91CC\u627E\u5230\uFF0C\u5E76\u652F\u6301\u70B9\u51FB\u8BD5\u9898\u8C03\u6574\u5230\u505A\u9898\u9875"),Ht.createElement(S.ZP,{onClick:()=>{Un(!1),Zn()},style:{padding:"2px 29px",height:30,float:"right"},type:"primary"},"\u77E5\u9053\u4E86")),target:()=>vl.current}];return Ht.createElement("div",{className:j["left-panel"]},Ht.createElement("ul",{className:`${j["s-navs"]} ${j["bg-white"]} ${j.b1}`},(i==null?void 0:i.is_program)&&!Ot.get("pageId")&&Ht.createElement(Pe.Z,{title:"\u9898\u76EE\u5217\u8868"},Ht.createElement("div",{onClick:()=>{Ln(),An(!0)},className:j.btns,ref:vl,style:bn?{pointerEvents:"none"}:{}},Ht.createElement("i",{className:"iconfont icon-yidongdaomulu1 font14 c-white"}))),Ht.createElement("li",{style:{marginLeft:20}},Ht.createElement("a",{className:Ee==="0"?j.active:"",id:"0",onClick:Dn},"\u9898\u76EE\u63CF\u8FF0")),Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="1"?j.active:"",id:"1",onClick:Dn},"\u64CD\u4F5C\u8BB0\u5F55")),(Ot.get("type")!=="exercises"&&(i==null?void 0:i.answer_text_show)||Ot.get("type")!=="exercises"&&(i==null?void 0:i.analysis_show))&&Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="4"?j.active:"",id:"4",onClick:Dn},"\u89E3\u7B54\u53C2\u8003")),Ot.get("type")!=="exercises"&&Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="2"?j.active:"",id:"2",onClick:Dn},"\u8BC4\u8BBA")),!!(He!=null&&He.length)&&Ot.get("type")!=="exercises"&&Ot.get("type")!=="1"&&Ht.createElement("li",null,Ht.createElement("a",{className:Ee==="5"?j.active:"",id:"5",onClick:Dn},"\u6D4B\u8BD5\u7528\u4F8B"))),Ht.createElement("div",{className:`${j["tab-panel-body"]} ${Ee==="0"?"":"hide"}`,style:{borderRight:"1px #dddddd solid",padding:0}},Ht.createElement(ue,{hack:i,onTriggerPraise:f,toDiscuss:Tn})),Ht.createElement("div",{style:{padding:"12px"},className:`${j["tab-panel-body"]} ${Ee==="1"?"":"hide"}`},Ht.createElement(dl,{ref:Gn,data:[{id:"1",show:Ot.get("qtype")!=="8",name:"\u63D0\u4EA4\u8BB0\u5F55",element:Ht.createElement(Ht.Fragment,null,Re!=null&&Re.records_count||Ce?Ht.createElement(Ye,{page:Y,onPageChange:le,topicId:A,submitting:Ce,key:(Ne==null?void 0:Ne.id)||1,submitRecords:Re,submitResult:Ne}):Ht.createElement(x.Z,null))},{id:"2",show:Ot.get("type")==="exercises"||(i==null?void 0:i.homework_common_id),name:"\u91CD\u7F6E\u8BB0\u5F55",element:Ht.createElement(Ht.Fragment,null,Ht.createElement(xe.default,{pagination:!1,dataSource:yn==null?void 0:yn.list,columns:[{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801\u65F6\u95F4",dataIndex:"created_at",render:(xn,qn,En)=>Te()(xn).format("YYYY-MM-DD HH:mm:ss")},{title:"\u64CD\u4F5C\u4EBA",dataIndex:"operator"},{title:"\u64CD\u4F5C",dataIndex:"redo_type",render:(xn,qn,En)=>{var Yn;return(Yn=[{id:1,name:"\u6253\u56DE\u91CD\u505A"},{id:2,name:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"},{id:3,name:"\u91CD\u7F6E\u4EE3\u7801\u4ED3\u5E93"}].find(Gt=>Gt.id===xn))==null?void 0:Yn.name}}]}),Ht.createElement(bt.Z,{style:{marginTop:10},current:Cn.page,total:yn==null?void 0:yn.count,hideOnSinglePage:!0,onChange:xn=>Ql(void 0,null,function*(){Cn.page=xn,Qn(Cn);let qn=yield(0,Ie.ZP)(`/api/myproblems/${pn.id}/redo_logs.json`,{method:"get",params:ju(Vu({},Cn),{courseId:pn.courseId})});(qn==null?void 0:qn.status)===0&&jn(qn==null?void 0:qn.data)})}))}]})),Ht.createElement("div",{style:{padding:"12px"},className:`${j["tab-panel-body"]} ${Ee==="4"?"":"hide"}`},Ht.createElement(dl,{data:[{id:"1",show:Ot.get("type")!=="exercises"&&(i==null?void 0:i.answer_text_show),name:"\u7B54\u6848",element:Ht.createElement(Ht.Fragment,null,Ht.createElement(M,{hack:i,current_user:De}))},{id:"2",show:Ot.get("type")!=="exercises"&&(i==null?void 0:i.analysis_show),name:"\u89E3\u6790",element:Ht.createElement(Ht.Fragment,null,Ht.createElement(Zl,{hack:i,current_user:De}))}]})),Ht.createElement("div",{className:`${j["tab-panel-body"]} ${Ee==="2"?"":"hide"}`,style:{padding:0}},Ht.createElement(sl,{user:L,activeIndex:Ee,identifier:i.identifier,hack:i,onTriggerPraise:f})),Ht.createElement("div",{className:`${j["tab-panel-body"]} ${Ee==="5"?"":"hide"}`,style:{padding:12}},Ht.createElement(Vt,{data:He||[],hack:i})),Ht.createElement(G.Z,{rootClassName:j.drawer,closable:!1,title:null,bodyStyle:{background:"#1B2333",padding:25,display:"flex",flexDirection:"column"},footer:null,width:500,placement:"left",onClose:()=>An(!1),open:rn},Ht.createElement(pe.Z,null,Ht.createElement("b",{style:{color:"#008CFF",fontWeight:500,lineHeight:"19px"},className:"font16"},"\u9898\u76EE\u5217\u8868"),Ht.createElement("span",{style:{color:"#FA8D30",fontWeight:500},className:"font12 ml10"},"\u5171",un==null?void 0:un.total_count,"\u9898\xA0[\xA0",un==null?void 0:un.total_score,"\u5206\xA0]\xA0"),!(L!=null&&L.hack_manager)&&Ht.createElement("span",{style:{color:"#FA8D30",fontWeight:500,marginLeft:"auto"},className:"font12"},"\u6211\u7684\u5F97\u5206\xA0:\xA0",un==null?void 0:un.work_score,"\u5206")),Ht.createElement("div",{style:{height:1,background:"#1C313F",marginTop:12}}),Ht.createElement(pe.Z,{align:"middle",className:"mt10 mb10"},!(L!=null&&L.hack_manager)&&Ht.createElement(cn.default,{size:"large",className:"mr10",style:{width:104},placeholder:"\u901A\u8FC7\u60C5\u51B5",onChange:xn=>{pn.page=1,pn.finish_status=xn,rl(Vu({},pn)),Ln()}},Ht.createElement(cn.default.Option,{value:""},"\u5168\u90E8"),Ht.createElement(cn.default.Option,{value:0},"\u672A\u5F00\u59CB"),Ht.createElement(cn.default.Option,{value:1},"\u8FDB\u884C\u4E2D"),Ht.createElement(cn.default.Option,{value:2},"\u5DF2\u5B8C\u6210")),Ht.createElement(cn.default,{size:"large",className:"mr10",style:{width:104},placeholder:"\u9898\u76EE\u96BE\u5EA6",onChange:xn=>{pn.page=1,pn.difficult=xn||null,rl(Vu({},pn)),Ln()}},Ht.createElement(cn.default.Option,{value:0},"\u5168\u90E8"),Ht.createElement(cn.default.Option,{value:1},"\u7B80\u5355"),Ht.createElement(cn.default.Option,{value:2},"\u9002\u4E2D"),Ht.createElement(cn.default.Option,{value:3},"\u56F0\u96BE")),Ht.createElement(tl.default.Search,{size:"large",onSearch:xn=>{pn.name=xn,pn.page=1,rl(Vu({},pn)),Ln()},style:{flex:1},placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u8FDB\u884C\u641C\u7D22"})),Ht.createElement("div",{className:j.list,style:{height:36,background:"#3D445C"}},!(L!=null&&L.hack_manager)&&Ht.createElement("span",null,"\u72B6\u6001"),Ht.createElement("span",null,"\u5E8F\u53F7"),Ht.createElement("span",{style:{flex:1}},"\u9898\u76EE\u540D\u79F0"),Ht.createElement("span",{style:{flexBasis:48,paddingRight:0}},"\u96BE\u5EA6")),Ht.createElement("div",{style:{overflow:"auto",flex:1}},(Ke=un==null?void 0:un.data)!=null&&Ke.length?(St=un==null?void 0:un.data)==null?void 0:St.map((xn,qn)=>Ht.createElement("div",{onClick:()=>Ql(void 0,null,function*(){let En=yield(0,Ie.ZP)(`/api/problems/${xn==null?void 0:xn.identifier}/start.json`,{method:"get",params:{hack_user_id:L==null?void 0:L.user_id}});En&&(E.history.replace(`/myproblems/${En==null?void 0:En.identifier}${window.location.search}`),window.location.reload())}),className:`${j.list} ${xn!=null&&xn.checked?j.active:""}`},!(L!=null&&L.hack_manager)&&Ht.createElement(Ht.Fragment,null,!(xn!=null&&xn.opened)&&Ht.createElement("span",{style:{color:"#E02020"}},"\u672A\u5F00\u59CB"),(xn==null?void 0:xn.opened)&&!(xn!=null&&xn.passed)&&Ht.createElement("span",{style:{color:"#FA6400"}},"\u8FDB\u884C\u4E2D"),(xn==null?void 0:xn.opened)&&(xn==null?void 0:xn.passed)&&Ht.createElement("span",{style:{color:"#24C074"}},"\u5DF2\u5B8C\u6210")),Ht.createElement("span",null,(pn.page-1)*20+(qn+1)),Ht.createElement("span",{style:{flex:1},title:xn.name},`[${xn==null?void 0:xn.score}\u5206]`,"\xA0",xn.name),Ht.createElement("span",{style:{flexBasis:48,paddingRight:0}},ba[xn.difficult]))):Ht.createElement(x.Z,null)),Ht.createElement(bt.Z,{current:pn.page,className:"mt20",hideOnSinglePage:!0,total:un==null?void 0:un.count,pageSize:pn.per_page,onChange:(xn,qn)=>{pn.page=xn,pn.per_page=qn,Ln()}})),Ht.createElement(gl.Z,{rootClassName:j.tour,closeIcon:!1,open:!!bn,steps:fl,gap:{offset:3,radius:2}}))},yl=n(62522),ta=n(2398),zn=n(7605),Fa=n(58382),yu=n(46553),Cu=n(50601),El=n(89517),Rl=n(92310),Tu=n.n(Rl),Su=n(38241),bu=n(20310),ma=n(81779),ra=n(96345),Ua=n(62595),Qa=n(14699),gn=n(59301),tr=Object.defineProperty,va=Object.defineProperties,rr=Object.getOwnPropertyDescriptors,Ba=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,I=(i,f,A)=>f in i?tr(i,f,{enumerable:!0,configurable:!0,writable:!0,value:A}):i[f]=A,$=(i,f)=>{for(var A in f||(f={}))v.call(f,A)&&I(i,A,f[A]);if(Ba)for(var A of Ba(f))y.call(f,A)&&I(i,A,f[A]);return i},ze=(i,f)=>va(i,rr(f)),Je=(i,f)=>{var A={};for(var Y in i)v.call(i,Y)&&f.indexOf(Y)<0&&(A[Y]=i[Y]);if(i!=null&&Ba)for(var Y of Ba(i))f.indexOf(Y)<0&&y.call(i,Y)&&(A[Y]=i[Y]);return A},a=(i,f,A)=>new Promise((Y,le)=>{var L=Ce=>{try{Re(A.next(Ce))}catch(Ne){le(Ne)}},De=Ce=>{try{Re(A.throw(Ce))}catch(Ne){le(Ne)}},Re=Ce=>Ce.done?Y(Ce.value):Promise.resolve(Ce.value).then(L,De);Re((A=A.apply(i,f)).next())});const{Countdown:N}=C.default,re={Java:"java",C:"c",Python:"py","C++":"c"};var je=(i=>(i[i.SET_LOADING=0]="SET_LOADING",i[i.GET_DATA=1]="GET_DATA",i[i.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",i[i.SET_DATA=3]="SET_DATA",i[i.SET_DEBUGING=4]="SET_DEBUGING",i[i.SET_SUBMITING=5]="SET_SUBMITING",i[i.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",i[i.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",i[i.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",i[i.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",i[i.SET_PAGE=10]="SET_PAGE",i))(je||{});function ee(){return new Date().getTime()}const t={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:""};function d(i,f){switch(f.type){case 1:return $($({},i),f.payload);case 3:return ze($({},i),{data:f.payload});case 0:return ze($({},i),{loading:f.payload});case 9:return ze($({},i),{showNote:f.payload});case 4:return ze($({},i),{debuging:f.payload});case 5:return ze($({},i),{submitting:f.payload});case 2:return ze($({},i),{submitRecords:f.payload});case 10:return ze($({},i),{submitRecordPage:f.payload});case 6:return ze($({},i),{executingMessage:f.payload});case 7:return $($({},i),f.payload);case 8:return $($({},i),f.payload);default:throw new Error}}var c=({children:i})=>{var f,A,Y,le,L,De,Re,Ce,Ne,it;const[He,Ke]=(0,e.useReducer)(d,t),{id:St}=(0,E.useParams)(),Ot=(0,E.useLocation)(),[Ee]=(0,E.useSearchParams)(),{loading:dn,data:Rt,debugResult:rn,submitResult:An,submitRecords:bn,submitRecordPage:Un,showNote:un,debuging:hn,submitting:yn,executingMessage:jn}=He,[Cn,Qn]=(0,e.useState)("#37AD83"),[Gn,vl]=(0,e.useState)(null),[pn,rl]=(0,e.useState)({}),[Zn,Dn]=(0,e.useState)(!0),[Tn,Ln]=(0,e.useState)(!1),[fl,xn]=(0,e.useState)(!1),qn=(0,e.useRef)(null),En=(0,e.useRef)(0),Yn=Rt==null?void 0:Rt.user,Gt=Rt==null?void 0:Rt.hack,[kl,Il]=(0,e.useState)(!1),ul=(0,e.useRef)(1),jl=(0,e.useRef)(!1);(0,Su.y)(Ee.get("type")==="exercises");const{setOpenDisableCopyAndPaste:hu}=(0,Su.X)(),[hl,zt]=(0,e.useState)(""),Tl=(0,yu._)(pn),[gu,ru]=(0,e.useState)({open:!1,text:""}),[Hl,Yl]=(0,e.useState)(null),Fu=(0,e.useRef)(null);(0,e.useEffect)(()=>{var Fn;let kn=(Fn=Gt==null?void 0:Gt.homework_extension)==null?void 0:Fn.failed_evaluate_num;typeof kn=="number"&&Yl(kn)},[(f=Gt==null?void 0:Gt.homework_extension)==null?void 0:f.failed_evaluate_num]),(0,e.useEffect)(()=>{function Fn(){return a(this,null,function*(){var kn,_u,na,Ea,sa;Dn(!0);const ua=yield(0,H.fu)(St,{exercise_id:Ee.get("exercisesId")});if(setTimeout(()=>{Dn(!1)},800),ua.status!==401){try{ua.hack.code=ke.Base64.decode(ua.hack.code)}catch(Mu){console.log(Mu)}ua.hack=ze($({},ua.hack),{is_program:Ee.get("type")==="1"}),Ke({type:1,payload:{loading:!1,data:ua}})}if(Ee.get("type")==="exercises"){if(window.self===window.top){window.top.location.href="/";return}let Mu;Ee.get("coursesId")=="coursesId"?Mu=yield(0,o._F)({categoryId:Ee.get("exercisesId"),login:Ee.get("login")}):Mu=yield(0,o._B)({categoryId:Ee.get("exercisesId"),login:Ee.get("login")}),rl($({},Mu)),hu((kn=Mu==null?void 0:Mu.exercise)==null?void 0:kn.forbid_copy),typeof((_u=Mu==null?void 0:Mu.exercise)==null?void 0:_u.left_time)=="number"&&(vl(Date.now()+((na=Mu==null?void 0:Mu.exercise)==null?void 0:na.left_time)*1e3),setTimeout(()=>{Qn("red")},(((Ea=Mu==null?void 0:Mu.exercise)==null?void 0:Ea.left_time)-300>0?((sa=Mu==null?void 0:Mu.exercise)==null?void 0:sa.left_time)-300:0)*1e3))}})}St&&Fn()},[St]),(0,e.useEffect)(()=>{var Fn;return Ee.get("type")==="exercises"&&((Fn=pn==null?void 0:pn.exercise)!=null&&Fn.screen_open)&&(window.removeEventListener("blur",zu,!1),Cu.U.forEach((kn,_u)=>{window.addEventListener(kn,zu,!1)}),window.addEventListener("blur",zu,!1),window.focus()),()=>{document.removeEventListener((0,k.gH)(),zu)}},[pn]),(0,e.useEffect)(()=>{hl==="1"&&St&&Gt!=null&&Gt.language&&lu()},[St,Un,Gt==null?void 0:Gt.language,hl]),(0,e.useEffect)(()=>(Gt!=null&&Gt.is_program&&(En.current=0,qn.current=setInterval(()=>{Bu()},15e3)),()=>{clearInterval(qn.current)}),[Gt==null?void 0:Gt.is_program]);const Bu=()=>a(void 0,null,function*(){let Fn=yield(0,Ie.ZP)(`/api/myproblems/${St}/save_long_time.json`,{method:"get",params:{answer_long_time:En.current}})}),zu=()=>{jl.current||(0,k.BU)(),window.parent.postMessage("backExercise","*")};function lu(){return a(this,null,function*(){try{const Fn=yield(0,H.zO)(St,{limit:15,page:Un,language:Gt==null?void 0:Gt.language});Ke({type:2,payload:Fn})}catch(Fn){console.log(Fn)}})}function fa(Fn){Ke({type:10,payload:Fn})}function iu(Fn){return a(this,null,function*(){var kn;let _u;(Ee.get("ip_limit")==="inner"||Ee.get("ip_bind_type")==="true")&&(_u=yield(0,ta.y)({ip_limit:Ee.get("ip_limit"),ip_bind:Ee.get("ip_bind_type")==="true"}));const na=yield(0,H.n4)(St,{code:ke.Base64.encode(Fn||Gt.code),language:Gt==null?void 0:Gt.language,exercise_id:Ee.get("exercisesId"),question_id:Ee.get("questionId"),ip:_u});return na.status===-5&&(0,E.getDvaApp)()._store.dispatch({type:"exercise/setActionTabs",payload:{key:"student-unlock",exerciseParams:ze($({errorMessage:na==null?void 0:na.message},(pn==null?void 0:pn.exercise)||{}),{exercise_user_id:(kn=pn==null?void 0:pn.exercise)==null?void 0:kn.exercise_user_id,id:Ee.get("exercisesId")})}}),na})}function Gl(){return a(this,null,function*(){if(ul.current=2,!yn){Ke({type:5,payload:!0});try{q.Z.publish("to-commit-info");const Fn=yield iu();if(console.log(Fn,1),Fn.status===0){let ua=function(){return a(this,null,function*(){const{status:Mu,data:La}=yield(0,H.rX)(St,"submit"),vr=ee()-sa>(na*Ea+3)*1e3;if(Mu!==0&&!vr&&setTimeout(ua,1e3),vr){D.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Ke({type:5,payload:!1});return}if(Mu===0){La.status===2&&D.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),(La==null?void 0:La.status)===0&&Ee.get("type")==="1"&&xn(!0),(La==null?void 0:La.status)!==0&&Ee.get("type")==="1"&&Yl(no=>no+1);const Ir=yield(0,H.zO)(St,{limit:15,page:Un,language:Gt==null?void 0:Gt.language});Ke({type:8,payload:ze($({},He),{submitResult:La,submitting:!1,submitRecords:Ir})})}})},kn={};if(Ee.get("type")==="exercises"?(kn.extras={exercise_id:Ee.get("exercisesId"),question_id:Ee.get("questionId")},(Ee.get("ip_limit")==="inner"||Ee.get("ip_bind_type")==="true")&&(kn.extras.ip=yield(0,ta.y)({ip_limit:Ee.get("ip_limit"),ip_bind:Ee.get("ip_bind_type")==="true"}))):Ee.get("type")==="smartPlan"&&(kn.extras={smart_plan_page_item_bank_id:Ee.get("smartPlanItemBankId"),simulate:Ee.get("simulate")==="true"}),(yield(0,H.bM)(St,kn)).status===-1&&Ee.get("exercisesId")){window.parent.location.href=`/classrooms/${Ee.get("coursesId")}/exercise/${Ee.get("exercisesId")}/detail`;return}const{time_limit:na,test_case_size:Ea}=Gt,sa=ee();ua()}else Ke({type:5,payload:!1})}catch(Fn){console.log(Fn),Ke({type:5,payload:!1})}Il(!1)}})}function du(){return a(this,null,function*(){ul.current=1,He.debuging=!0,Ke({type:4,payload:!0});try{if((yield iu()).status===0){let sa=function(){return a(this,null,function*(){const{status:ua,message:Mu,data:La}=yield(0,H.rX)(St,"debug"),vr=ee()-Ea>(kn+3)*1e3;if(ua!==0&&!vr&&(Ke({type:6,payload:Mu}),setTimeout(sa,1e3)),vr){D.default.error({title:"\u63D0\u793A",centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Ke({type:4,payload:!1}),Ke({type:7,payload:ze($({},He),{debugResult:{status:2},debuging:!1})});return}ua===0&&(La.status===2&&D.default.error({title:"\u63D0\u793A",centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Ke({type:4,payload:!1}),Ke({type:7,payload:ze($({},He),{debugResult:La,debuging:!1})}))})};const{time_limit:kn}=Gt;let _u={input:encodeURIComponent(Rt.test_case.input)};if(Ee.get("type")==="exercises"&&(_u.exercise_id=Ee.get("exercisesId")),(yield(0,H.MU)(St,_u)).status===-1&&Ee.get("exercisesId")){window.parent.location.href=`/classrooms/${Ee.get("coursesId")}/exercise/${Ee.get("exercisesId")}/detail`;return}const Ea=ee();sa()}else Ke({type:4,payload:!1})}catch(Fn){console.log(Fn)}finally{}})}function Hu(Fn,kn){const _u=kn?{modify_code:!1}:{};Ke({type:3,payload:ze($({},Rt),{hack:$(ze($({},Gt),{code:Fn}),_u)})}),Il(!0)}const il=Fn=>a(void 0,null,function*(){let kn=yield(0,Ie.ZP)(`/api/problems/${Gt==null?void 0:Gt.identifier}/start.json`,{method:"get",params:{language:Fn==="C++"||Fn==="c++"?encodeURIComponent(Fn):Fn,hack_user_id:Yn==null?void 0:Yn.user_id}});kn.status!==-1&&E.history.replace(`/myproblems/${kn==null?void 0:kn.identifier}${window.location.search}`)});function Gu(Fn){let kn=Fn.target.value;Ke({type:3,payload:ze($({},Rt),{test_case:{input:kn}})})}function Jn(){return a(this,null,function*(){try{let Fn={};Ee.get("type")==="exercises"?Fn.exercise_id=Ee.get("exercisesId"):Gt!=null&&Gt.homework_common_id&&(Fn.homework_common_id=Gt==null?void 0:Gt.homework_common_id);const kn=yield(0,H.H7)(St,$({},Fn));kn.status===401||(Hu(ke.Base64.decode(kn.code)),(Ee.get("type")==="exercises"||Gt!=null&&Gt.homework_common_id)&&q.Z.publish("to-reset-info"))}catch(Fn){console.log(Fn)}})}function Vn(){D.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:gn.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",gn.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return a(this,null,function*(){const Fn=yield(0,H.fi)(St);Fn.status===401||Hu(ke.Base64.decode(Fn.code),!0)})}})}function bl(){Ke({type:9,payload:!0})}function Nn(){Ke({type:9,payload:!1})}function Kn(Fn){return a(this,null,function*(){yield(0,H.MK)(St,Fn),Ke({type:1,payload:{showNote:!1,data:ze($({},Rt),{hack:ze($({},Gt),{notes:Fn.notes})})}})})}const Lu={hack:Gt,isLoading:Zn,input:(A=Rt==null?void 0:Rt.test_case)==null?void 0:A.input,is_file:(Y=Rt==null?void 0:Rt.test_case)==null?void 0:Y.is_file,identifier:Gt==null?void 0:Gt.identifier,attachments_count:Rt==null?void 0:Rt.attachments_count,language:Gt==null?void 0:Gt.language,code:Gt==null?void 0:Gt.code,title:"main."+re[Gt==null?void 0:Gt.language],modify_code:Gt==null?void 0:Gt.modify_code,notes:Gt==null?void 0:Gt.notes,debugResult:rn,debuging:hn,submitting:yn,submitResult:An,executingMessage:jn,onCancelNote:Nn,onAddNote:Kn,showNote:un,user:Yn,onShowNote:bl,onSubmitCode:Gl,onChangeCode:Hu,onChangeInput:Gu,onDebugCode:du,onResetCode:Jn,onSyncCode:Vn,onUpdateCode:iu,onChangeLanguage:il,isWhiteTheme:Tn,setIsWhiteTheme:Ln,topDispatch:Ke};function Kl(){return a(this,null,function*(){const{praise_count:Fn}=yield(0,H.vl)(Gt.id,{container_type:"Hack",type:1});let kn=ze($({},Rt),{hack:ze($({},Gt),{praises_count:Fn,user_praise:!Gt.user_praise})});Ke({type:3,payload:kn})})}const Uu={topicId:St,submitResult:An,submitRecords:bn,submitting:yn,page:Un,onPageChange:fa,hack:Gt,user:Rt==null?void 0:Rt.user,hack_sets:Rt==null?void 0:Rt.hack_sets,current_user:Rt==null?void 0:Rt.current_user,onTriggerPraise:Kl,setActiveIndex:zt};console.log(pn);const[Iu,Ku]=(0,e.useState)(!1),[Ga,wa]=(0,e.useState)(!1);(0,e.useEffect)(()=>{const Fn=kn=>{var _u,na;if(console.log("event-----",kn),kn.data.type==="showIntelligentTeacherStatus"&&!((na=(_u=kn==null?void 0:kn.data)==null?void 0:_u.SmartPlanItemBanks)!=null&&na.allow_answer_after_end)){const{aiStatus:Ea,questionStatus:sa}=kn.data;if(Ku(Ea),sa){let ua=JSON.parse(localStorage.getItem("smartPlanProgramIds")||"[]");if(ua.includes(Ee.get("smartPlanItemBankId")))return;D.default.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:gn.createElement("div",{className:"tc font16"},sa?"\u8001\u5E08\u5DF2\u7ED3\u675F\u7B54\u9898":"\u8001\u5E08\u5DF2\u7ED3\u675F\u6388\u8BFE","\uFF0C\u4E0D\u80FD\u518D\u4FEE\u6539\u4E86\u3002"),onOk:()=>a(void 0,null,function*(){Gl(),localStorage.setItem("smartPlanProgramIds",JSON.stringify(ua.push(Ee.get("smartPlanItemBankId"))));let Mu="";Ee.get("isMiniprogram")?Mu=`/miniprogram/courseware/study?courses_id=${Ee.get("coursesId")}&id=${Ee.get("exercisesId")}`:Mu=`/classrooms/${Ee.get("coursesId")}/smart_plan/${Ee.get("exercisesId")}/ppt_info/info`,window.opener?window.close():E.history.push(Mu)})})}}if(kn.data.type=="closeIntelligentTeacherStatus"){Gl();let Ea="";Ee.get("isMiniprogram")?Ea=`/miniprogram/courseware/study?courses_id=${Ee.get("coursesId")}&id=${Ee.get("exercisesId")}`:Ea=`/classrooms/${Ee.get("coursesId")}/smart_plan/${Ee.get("exercisesId")}/ppt_info/info`,window.opener?window.close():E.history.push(Ea)}};return window.addEventListener("message",Fn),()=>{window.removeEventListener("message",Fn)}},[]);const ga=()=>{if(Ee.get("type")==="exercises")return!1;const Fn=Object.entries((Gt==null?void 0:Gt.homework_extension)||{}).some(([kn,_u])=>kn!=="ai_code_evaluation_promote"&&!!_u);return!!(Ee.get("type")==="1"&&((0,ma.$O)()||Fn)||Ee.get("type")==="smartPlan"&&(Iu||Ee.get("showAi")))};return(0,e.useEffect)(()=>{var Fn,kn,_u,na,Ea,sa,ua;ga()&&(Hl>((kn=(Fn=Gt==null?void 0:Gt.homework_extension)==null?void 0:Fn.ai_guide_data)==null?void 0:kn.evaluation_num)&&ru({open:!0,text:(na=(_u=Gt==null?void 0:Gt.homework_extension)==null?void 0:_u.ai_guide_data)==null?void 0:na.evaluation_msg}),(Ea=Gt==null?void 0:Gt.homework_extension)!=null&&Ea.ai_guide&&Hl==0&&!Fu.current&&(Fu.current=setTimeout(()=>{var Mu,La;ru({open:!0,text:(La=(Mu=Gt==null?void 0:Gt.homework_extension)==null?void 0:Mu.ai_guide_data)==null?void 0:La.unanswered_msg})},(((ua=(sa=Gt==null?void 0:Gt.homework_extension)==null?void 0:sa.ai_guide_data)==null?void 0:ua.unanswered_time)||0)*60*1e3)),Fu.current&&Hl>0&&clearTimeout(Fu.current))},[Hl,Gt]),gn.createElement(gn.Fragment,null,gn.createElement(ae.Z,{spinning:dn,delay:500},Rt?gn.createElement("div",{style:{minWidth:"1200px"}},gn.createElement("header",{className:Tu()(El.Z.header,Tn&&El.Z.whiteHeader)},!((le=["smartPlan","exercises"])!=null&&le.includes(Ee.get("type")))&&gn.createElement("div",null,gn.createElement("img",{src:`${ut.Z.IMG_SERVER}/images/${Yn==null?void 0:Yn.image_url}`,alt:"user",width:36}),gn.createElement("span",{style:{color:Tn?"#333":"#B2BACB",fontSize:16}},Yn==null?void 0:Yn.name)),((L=["smartPlan","exercises"])==null?void 0:L.includes(Ee.get("type")))&&gn.createElement("div",null,gn.createElement("div",{className:"exercise_user_info"},"\u59D3\u540D",gn.createElement("span",{className:"ml10"},((De=pn==null?void 0:pn.exercise)==null?void 0:De.user_name)||(Yn==null?void 0:Yn.name)||"--")),gn.createElement("div",{className:"exercise_user_info ml30"},"\u5B66\u53F7",gn.createElement("span",{className:"ml10"},((Re=pn==null?void 0:pn.exercise)==null?void 0:Re.student_id)||(Yn==null?void 0:Yn.student_id)||"--"))),gn.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},gn.createElement("div",null,Gt.name)),(Ee.get("type")==="smartPlan"||(Gt==null?void 0:Gt.is_program))&&gn.createElement(zn.Z,{defaultValue:(Gt==null?void 0:Gt.answer_long_time)||0,onChange:Fn=>{En.current=Fn},className:El.Z.timepiece}),Yn!=null&&Yn.hack_manager&&!Ee.get("is_smart_plan")?gn.createElement(E.Link,{className:El.Z.btn_edit,to:Ee.get("type")==="1"?Ee.get("pageId")?`/problems/newedit/${Gt.identifier}?type=1&pageId=${Ee.get("pageId")}&backUrl=${Ee.get("backUrl")}`:`/problems/newedit/${Gt.identifier}?type=1`:Ee.get("backUrl")?`/problems/newedit/${Gt.identifier}?backUrl=${Ee.get("backUrl")}`:`/problems/newedit/${Gt.identifier}`}," ",gn.createElement("i",{className:"iconfont icon-bianji13 font14 mr5"})," \u7F16\u8F91"):null,!!((Ce=pn==null?void 0:pn.exercise)!=null&&Ce.left_time)&&gn.createElement(gn.Fragment,null,gn.createElement("span",{style:{color:Cn,marginRight:6},className:`iconfont icon-daojishi ${El.Z.djs}`}),gn.createElement("span",{className:"c-white mr20"},gn.createElement(N,{valueStyle:{color:Cn,fontSize:20,fontWeight:500},title:gn.createElement("span",{style:{color:Cn,fontSize:14,marginRight:10},className:"time"},"\u5269\u4F59\u7B54\u9898\u65F6\u957F"),value:Gn,onFinish:()=>a(void 0,null,function*(){const Fn=yield(0,o.VL)({categoryId:Ee.get("exercisesId"),commit_method:2});if((Fn==null?void 0:Fn.status)===0&&(iu(),D.default.info({width:530,title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",content:gn.createElement("div",{className:"tc font16"},"\u7B54\u9898\u7ED3\u675F\u4E86\uFF0C\u7CFB\u7EDF\u5DF2\u81EA\u52A8\u63D0\u4EA4\u8BD5\u5377",gn.createElement("br",null),"\u4E0D\u80FD\u518D\u4FEE\u6539\u7B54\u9898"),onOk:()=>a(void 0,null,function*(){window.parent.location.href=`/classrooms/${Ee.get("coursesId")}/exercise/${Ee.get("exercisesId")}/detail`})})),(Fn==null?void 0:Fn.status)===-3){const kn=parseInt(Fn==null?void 0:Fn.message);vl(Date.now()+kn*1e3)}})}))),(Ne=["smartPlan","exercises"])!=null&&Ne.includes(Ee.get("type"))?gn.createElement(S.ZP,{type:"primary",onClick:()=>{if(Ee.get("type")==="exercises"){const Fn=()=>a(void 0,null,function*(){yield iu(),Il(!1),Tl(),jl.current=!0,zu()});if(!(bn!=null&&bn.records_count)||kl){D.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",icon:null,title:"\u63D0\u793A",content:gn.createElement("div",{style:{color:"#FF0000"}},"\u8BF7\u786E\u8BA4\u4F60\u7684\u7B54\u9898\u5185\u5BB9\u662F\u5426\u8FDB\u884C\u8BC4\u6D4B\u5E76\u63D0\u4EA4\uFF0C\u672A\u8BC4\u6D4B\u5219\u4F1A\u5BFC\u81F4\u8BE5\u9898\u65E0\u6CD5\u83B7\u5F97\u5206\u6570"),onOk:Fn});return}Fn()}else{let Fn="";Ee.get("isMiniprogram")=="true"?Fn=`/miniprogram/courseware/study?courses_id=${Ee.get("coursesId")}&id=${Ee.get("exercisesId")}`:Fn=`/classrooms/${Ee.get("coursesId")}/smart_plan/${Ee.get("exercisesId")}/ppt_info/info`,window.opener?window.close():(console.log("11",`program_${Ee.get("coursesId")}_${Ee.get("exercisesId")}`),console.log(Ee.get("isMiniprogram")=="true"),Ee.get("isMiniprogram")=="true"?localStorage.removeItem(`iframeprogram_${Ee.get("coursesId")}_${Ee.get("exercisesId")}`):E.history.push(Fn))}}},Ee.get("type")==="exercises"?"\u8FD4\u56DE\u8BD5\u5377":"\u8FD4\u56DE\u8BFE\u4EF6"," "):gn.createElement("span",{onClick:()=>{var Fn;if(Ee.get("backUrl"))E.history.push(Ee.get("backUrl"));else if(Ee.get("type")==="1"){let kn=(Fn=localStorage.getItem("program_homework"))==null?void 0:Fn.split(",");E.history.push(`/classrooms/${kn==null?void 0:kn[0]}/program_homework/${kn==null?void 0:kn[1]}/detail`)}else E.history.push("/problemset")}},gn.createElement(Pe.Z,{title:"\u5173\u95ED"},gn.createElement("i",{style:{color:Tn?"#8D929F":"#fff"},className:"iconfont icon-fanhuishijuan font16 "})))),gn.createElement(ae.Z,{size:"large",spinning:Zn},gn.createElement(ne.Z,{className:Tu()(El.Z.myProblems,Tn&&El.Z.whiteMyProblems),leftChild:gn.createElement(Ha,$({},Uu)),rightChild:gn.createElement(g,$({},Lu))}))):null,gn.createElement(D.default,{centered:!0,closable:!1,width:680,footer:null,open:fl,className:"oj-modal"},gn.createElement("section",{className:"oj-modal-content"},gn.createElement("div",{className:"oj-modal-head"},gn.createElement("img",{src:yl,alt:""}),gn.createElement("i",{onClick:()=>xn(!1),className:"iconfont icon-guanbi1"})),gn.createElement("aside",null,gn.createElement("img",{className:"mr30",src:Qa.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",gn.createElement("span",{style:{color:"#75d6ba",marginRight:100}},An==null?void 0:An.execute_time,"ms"),"\u4F18\u4E8E",gn.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(An==null?void 0:An.time_better_than)||100,"%"),"\u7684\u7528\u6237"),gn.createElement("aside",{className:"mb50"},gn.createElement("img",{src:Ua.Z,className:"mr30"}),gn.createElement("span",{className:"oj-modal-tt"},gn.createElement("span",null,gn.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),gn.createElement("span",{className:"c-light-primary"},An==null?void 0:An.execute_memory,"kb")),gn.createElement("span",null,gn.createElement("span",null))),"\u4F18\u4E8E",gn.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(An==null?void 0:An.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),gn.createElement("div",{id:"oj-modal-next",onClick:()=>a(void 0,null,function*(){var Fn;if(An!=null&&An.next_identifier){let kn=yield(0,Ie.ZP)(`/api/problems/${An==null?void 0:An.next_identifier}/start.json`,{method:"get",params:{hack_user_id:Yn==null?void 0:Yn.user_id}});kn&&(E.history.replace(`/myproblems/${kn==null?void 0:kn.identifier}${window.location.search}`),window.location.reload())}else{let kn=(Fn=localStorage.getItem("program_homework"))==null?void 0:Fn.split(",");E.history.push(`/classrooms/${kn==null?void 0:kn[0]}/program_homework/${kn==null?void 0:kn[1]}/detail`)}}),className:"oj-modal-btn"},An!=null&&An.next_identifier?"\u8FDB\u5165\u4E0B\u4E00\u9898":"\u56DE\u5230\u4F5C\u4E1A\u8BE6\u60C5\u9875"))),ga()&&gn.createElement(bu.Z,{showData:Ee.get("type")==="smartPlan"?{ai_exam_question:!0,ai_syntax_check:!0,ai_code_diagnosis:!0,ai_guidance:!0,ai_q_and_a:!0}:Gt==null?void 0:Gt.homework_extension,description:Gt==null?void 0:Gt.description,allShow:(0,ma.$O)(),code:Gt==null?void 0:Gt.code,sendParams:{source:"hack",hack_id:St},draggableExtraNode:((it=Gt==null?void 0:Gt.homework_extension)==null?void 0:it.ai_guide)&&(gu==null?void 0:gu.open)&&gn.createElement("div",{className:"bg-white rounded-2px-rem p-10px flex item-center justify-between gap-10px",style:{position:"absolute",top:"50%",transform:"translateY(-50%)",right:"75px",width:"400px"}},gn.createElement("div",{className:"bg-white absolute",style:{WebkitClipPath:"polygon(0 0, 0% 100%, 100% 50%)",clipPath:"polygon(0 0, 0% 100%, 100% 50%)",width:"10px",height:"15px",right:"-10px"}}),gn.createElement(ra.Z,{text:(gu==null?void 0:gu.text)||""}),gn.createElement("span",{className:"iconfont icon-tupianguanbi font14 current c-grey-666",onClick:Fn=>{ru({open:!1,text:""})}}))})),gn.createElement(Fa.Z,{successCb:()=>{ul.current===1?du():Gl()}}))};function m({title:i,modify_code:f,onSyncCode:A,onShowCodeSetting:Y,onResetCode:le,hack:L,onChangeLanguage:De,isWhiteTheme:Re,onShowResourceCentre:Ce,attachments_count:Ne}){var it;const He=()=>{D.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:gn.createElement(Fe.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:le})},[Ke]=(0,E.useSearchParams)(),St=Ke.get("language"),Ot=Ee=>Ee==="1"?"c++":Ee==="2"?"C++":Ee;return(0,e.useEffect)(()=>{St&&De(Ot(St))},[]),(0,e.useEffect)(()=>{L!=null&&L.tpm_code_modified&&D.default.confirm({title:"\u66F4\u65B0\u521D\u59CB\u4EE3\u7801",icon:gn.createElement(Fe.Z,null),content:gn.createElement("div",null,gn.createElement("div",null,"\u7F16\u7A0B\u9898\u7684\u521D\u59CB\u4EE3\u7801\u5185\u5BB9\u6709\u66F4\u65B0,"),gn.createElement("div",null,"\u66F4\u65B0\u64CD\u4F5C\u5C06\u4FDD\u7559\u5DF2\u5B8C\u6210\u7684\u8BC4\u6D4B\u8BB0\u5F55\u548C\u6210\u7EE9,"),gn.createElement("div",null,"\u8FD8\u672A\u5B8C\u6210\u8BC4\u6D4B\u7684\u4EFB\u52A1\u4EFB\u52A1\u4EE3\u7801\uFF0C\u8BF7\u81EA\u884C\u4FDD\u5B58\uFF01")),centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:()=>le()})},[L==null?void 0:L.language]),console.log(L,Re,"hack"),gn.createElement("div",{className:`${El.Z.codeHead} ${Re?El.Z.whiteCodeHead:""}`},gn.createElement("div",{className:El.Z.navWrap},(it=L==null?void 0:L.all_language)==null?void 0:it.map(Ee=>gn.createElement("div",{className:`${El.Z.nav} ${Ee===(L==null?void 0:L.language)?El.Z.active:""}`,key:Ee,onClick:()=>De(Ee)},gn.createElement(Pe.Z,{title:"\u7F16\u7A0B\u8BED\u8A00"},gn.createElement("i",{className:"iconfont icon-bianchengyuyan1"})),gn.createElement("span",null,Ee)))),gn.createElement(pe.Z,{align:"middle",style:{marginLeft:"auto"}},f?gn.createElement("a",{title:"\u66F4\u65B0\u901A\u77E5",onClick:A},gn.createElement("img",{src:se,alt:"notice",style:{height:13,transform:"translateY(-2px)"}})):null,Ne>0&&gn.createElement("a",{onClick:Ce},gn.createElement(Pe.Z,{title:"\u8D44\u6E90\u4E2D\u5FC3"},gn.createElement("i",{style:{color:"#8D929F"},className:"iconfont icon-ziyuanzhongxin mr15"}))),gn.createElement("a",{onClick:He},gn.createElement(Pe.Z,{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801"},gn.createElement("i",{style:{color:"#8D929F"},className:"iconfont icon-huifuchushihuashezhi mr15"}))),gn.createElement("a",{onClick:Y},gn.createElement(Pe.Z,{title:"\u8BBE\u7F6E"},gn.createElement("i",{style:{color:"#8D929F"},className:"iconfont icon-shezhi8 font14 mr15"})))))}function g(i){var f=i,{input:A,is_file:Y,identifier:le,showNote:L,onShowNote:De,notes:Re,onCancelNote:Ce,onAddNote:Ne,debugResult:it,language:He,debuging:Ke,submitting:St,executingMessage:Ot,code:Ee,onSubmitCode:dn,onDebugCode:Rt,onChangeCode:rn,onChangeInput:An,onUpdateCode:bn,user:Un,isLoading:un,submitResult:hn}=f,yn=Je(f,["input","is_file","identifier","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode","user","isLoading","submitResult"]);function jn(Qn,Gn){return gn.createElement(m,ze($({},yn),{onShowCodeSetting:Qn,onShowResourceCentre:Gn}))}const Cn=$({input:A,is_file:Y,debugResult:it,debuging:Ke,submitting:St,executingMessage:Ot,onDebugCode:Rt,onChangeCode:rn,onSubmitCode:dn,onChangeInput:An,user:Un,submitResult:hn},yn);return gn.createElement("div",{style:{display:"flex",flexDirection:"column",height:"100%",background:"#1B2333"}},gn.createElement(we,{setIsWhiteTheme:yn==null?void 0:yn.setIsWhiteTheme,isLoading:un,language:He,value:Ee,identifier:le,onChange:rn,onUpdateCode:bn,ActionBarRender:jn}),gn.createElement(Ze.ZP,$({},Cn)))}},10786:function(gt,Xe,n){"use strict";n.d(Xe,{h:function(){return e}});var e=(E=>(E[E.NOMATCH=-1]="NOMATCH",E[E.OK=0]="OK",E[E.TIMEOUT=2]="TIMEOUT",E[E.PODFAILURE=3]="PODFAILURE",E[E.COMPILEFAILURE=4]="COMPILEFAILURE",E[E.EXECUTEFAILURE=5]="EXECUTEFAILURE",E[E.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",E))(e||{})},20885:function(gt,Xe,n){"use strict";n.d(Xe,{H7:function(){return G},MK:function(){return Fe},MU:function(){return o},X6:function(){return ne},bM:function(){return H},fi:function(){return We},fu:function(){return pe},n4:function(){return ye},rX:function(){return ut},vl:function(){return Se},zO:function(){return k}});var e=n(57193),E=Object.defineProperty,C=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,S=(J,F,me)=>F in J?E(J,F,{enumerable:!0,configurable:!0,writable:!0,value:me}):J[F]=me,Pe=(J,F)=>{for(var me in F||(F={}))D.call(F,me)&&S(J,me,F[me]);if(C)for(var me of C(F))ae.call(F,me)&&S(J,me,F[me]);return J};function pe(J,F){return(0,e.U2)(`myproblems/${J}.json`,Pe({hidePopLogin:!0},F||{}))}function H(J,F){return(0,e.v_)(`myproblems/${J}/code_submit.json`,F)}function o(J,F){return(0,e.v_)(`myproblems/${J}/code_debug.json`,F)}function k(J,F){return F.language&&(F.language=encodeURIComponent(F.language)),(0,e.U2)(`myproblems/${J}/submit_records.json`,F)}function ne(J){return(0,e.U2)("myproblems/record_detail.json",{id:J})}function ut(J,F){return(0,e.U2)(`myproblems/${J}/result.json`,{mode:F})}function Fe(J,F){return(0,e.v_)(`myproblems/${J}/add_notes.json`,F)}function G(J,F){return(0,e.v_)(`myproblems/${J}/restore_initial_code.json`,F)}function We(J){return(0,e.v_)(`myproblems/${J}/sync_code.json`)}function ye(J,F){return(0,e.v_)(`myproblems/${J}/update_code.json`,F)}function Se(J,F){return(0,e.v_)(`discusses/${J}/plus.json`,F)}},72850:function(gt,Xe,n){"use strict";n.d(Xe,{Z:function(){return Ze}});var e=n(59301),E=n(28284),C=n(6767),D=n(62957),ae=n(20554),S=n(82326),Pe=n(17149),pe=n(69219),H=n(37568),o=n(54172),k=n(25399),ne=n(13747),ut=n(99571),Fe=n(57193),G={flex_box_center:"flex_box_center___kuaVT",flex_space_between:"flex_space_between___exKHH",flex_box_vertical_center:"flex_box_vertical_center___BzvkN",flex_box_center_end:"flex_box_center_end___Ss2DJ",flex_box_column:"flex_box_column___p1LEr",scoremodal:"scoremodal___upTFR",selectWrapper:"selectWrapper___HH3RX",selectWrappers:"selectWrappers___fUWwr",allqingchu:"allqingchu___BFF1D",title:"title___hFasb",score:"score___DXG3o",close:"close___kEIiB",content:"content___Mco8L",items:"items___j98jk",bottom:"bottom___A1n1C",yes:"yes___P1zzb",no:"no___xZqXd",titlecount:"titlecount___fqA9P",add:"add___MqV0R",search:"search___NREgv",searchIcon:"searchIcon___qny3A",tabWrap:"tabWrap___dR18c",previewModal:"previewModal___uSiGS",q_title:"q_title___a9NY9"},We=n(41576),ye={flex_box_center:"flex_box_center___nnwwA",flex_space_between:"flex_space_between___cRir9",flex_box_vertical_center:"flex_box_vertical_center___FqTZ8",flex_box_center_end:"flex_box_center_end___WU5_v",flex_box_column:"flex_box_column___QZFa1",warp:"warp___aLZwN",shixunbutton:"shixunbutton___Eoa1i",redio:"redio___LJ4js",redioitem:"redioitem___YicCC",redioitemyes:"redioitemyes___lX4Nr",title:"title___pi1jH",titleyes:"titleyes___jiEh7",yestag:"yestag___DLWoP",qcount:"qcount___U9kkL",score:"score___vLK4B",qtitle:"qtitle___kyg0t",checkbox:"checkbox___vjiBw",checkboxitem:"checkboxitem___HW3CP",checkboxitemyes:"checkboxitemyes___kpjek",bottom:"bottom___uG8Zq",bottomitem:"bottomitem___TnJQQ",left:"left___M8WXX",right:"right____dkCI",completion:"completion___H6RmA",content:"content___a2hGC",items:"items___D8mLd",simple:"simple___fQ0OS",shixun:"shixun___nB6Jk",combination:"combination___YrOdz",program:"program___lG0JA"},Se=n(97231),J=n(63949),F=n(24334);const me=["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"];var Ie=({qitem:j})=>{var ie,xe,bt,ht,wt,Ct,Te,Ft,Bt,Ye;return e.createElement("div",{className:ye.warp},e.createElement("div",{className:ye.mainPart},e.createElement("div",{className:ye.qcount},(j==null?void 0:j.question_type)===8&&e.createElement(Se.Z,{className:ye.content,showProgramFill:!0,value:(ie=j==null?void 0:j.program_attr)==null?void 0:ie.description}),(j==null?void 0:j.question_type)!=8&&e.createElement(Se.Z,{className:ye.qtitle,value:(j==null?void 0:j.name)||(j==null?void 0:j.title)})),((j==null?void 0:j.question_type)===0||(j==null?void 0:j.question_type)===2)&&e.createElement("div",null,(xe=j==null?void 0:j.choices)==null?void 0:xe.map((x,U)=>e.createElement("div",{className:ye.redio},!(x!=null&&x.is_answer)&&e.createElement("span",{className:ye.redioitem}),(x==null?void 0:x.is_answer)&&e.createElement("i",{className:`${ye.redioitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:x!=null&&x.is_answer?ye.titleyes:ye.title,value:me[U]+(x==null?void 0:x.choice_text)}),(x==null?void 0:x.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(j==null?void 0:j.question_type)===1&&e.createElement("div",null,(bt=j==null?void 0:j.choices)==null?void 0:bt.map((x,U)=>e.createElement("div",{className:ye.checkbox},!(x!=null&&x.is_answer)&&e.createElement("span",{className:ye.checkboxitem}),(x==null?void 0:x.is_answer)&&e.createElement("i",{className:`${ye.checkboxitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:x!=null&&x.is_answer?ye.titleyes:ye.title,value:me[U]+(x==null?void 0:x.choice_text)}),(x==null?void 0:x.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(j==null?void 0:j.question_type)===3&&e.createElement("div",{className:ye.completion},(ht=j==null?void 0:j.standard_answer)==null?void 0:ht.map((x,U)=>{var z;return e.createElement("div",{style:{display:"flex"}},e.createElement("span",{className:ye.title},"\u586B\u7A7A\u9879",U+1),e.createElement("div",{className:ye.content},(z=x==null?void 0:x.answer_text)==null?void 0:z.map((w,V)=>e.createElement("div",{className:ye.items},w))))})),(j==null?void 0:j.question_type)===4&&e.createElement("div",{className:ye.simple},e.createElement("div",{className:ye.title},"\u53C2\u8003\u7B54\u6848"),e.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(wt=j==null?void 0:j.answer_texts)!=null&&wt[0]?e.createElement(Se.Z,{className:ye.content,value:(Ct=j==null?void 0:j.answer_texts)==null?void 0:Ct[0]}):e.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),(j==null?void 0:j.question_type)===5&&((Te=j==null?void 0:j.challenge_names)==null?void 0:Te.map((x,U)=>e.createElement("div",{className:ye.shixun},e.createElement("span",{className:ye.qtitle},e.createElement("span",{style:{marginRight:10}},"\u7B2C",(0,J.EM)(U+1),"\u9898"),x)))),(j==null?void 0:j.question_type)===6&&e.createElement("div",{className:ye.program},e.createElement(Se.Z,{className:ye.content,value:((Ft=j==null?void 0:j.program_attr)==null?void 0:Ft.description)||"- -"})),(j==null?void 0:j.question_type)===7&&((Bt=j==null?void 0:j.sub_item_banks)==null?void 0:Bt.map((x,U)=>{var z,w,V,lt,ue;return e.createElement("div",null,e.createElement("div",{className:ye.combination},e.createElement("span",{className:ye.qtitle},x==null?void 0:x.name)),e.createElement("div",{className:ye.warp,style:{padding:"0px",paddingTop:20}},e.createElement("div",null,((x==null?void 0:x.item_type)=="SINGLE"||(x==null?void 0:x.item_type)=="JUDGMENT")&&((z=x==null?void 0:x.choices)==null?void 0:z.map((Z,de)=>e.createElement("div",{className:ye.redio},!(Z!=null&&Z.is_answer)&&e.createElement("span",{className:ye.redioitem}),(Z==null?void 0:Z.is_answer)&&e.createElement("i",{className:`${ye.redioitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:Z!=null&&Z.is_answer?ye.titleyes:ye.title,value:me[de]+(Z==null?void 0:Z.choice_text)}),(Z==null?void 0:Z.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(x==null?void 0:x.item_type)=="MULTIPLE"&&((w=x==null?void 0:x.choices)==null?void 0:w.map((Z,de)=>e.createElement("div",{className:ye.checkbox},!(Z!=null&&Z.is_answer)&&e.createElement("span",{className:ye.checkboxitem}),(Z==null?void 0:Z.is_answer)&&e.createElement("i",{className:`${ye.checkboxitemyes} icon-duigou1`}),e.createElement(Se.Z,{className:Z!=null&&Z.is_answer?ye.titleyes:ye.title,value:me[de]+(Z==null?void 0:Z.choice_text)}),(Z==null?void 0:Z.is_answer)&&e.createElement("div",{className:ye.yestag},"\u6B63\u786E\u7B54\u6848")))),(x==null?void 0:x.item_type)=="COMPLETION"&&e.createElement("div",{className:ye.completion},(V=x==null?void 0:x.standard_answer)==null?void 0:V.map((Z,de)=>{var M;return e.createElement("div",{style:{display:"flex"}},e.createElement("span",{className:ye.title},"\u586B\u7A7A\u9879",de+1),e.createElement("div",{className:ye.content},(M=Z==null?void 0:Z.answer_text)==null?void 0:M.map((q,Le)=>e.createElement("div",{className:ye.items},q))))})),(x==null?void 0:x.item_type)=="SUBJECTIVE"&&e.createElement("div",{className:ye.simple},e.createElement("div",{className:ye.title},"\u53C2\u8003\u7B54\u6848"),e.createElement("div",{className:"mt10",style:{fontSize:"16px"}},(lt=x==null?void 0:x.answer_texts)!=null&<[0]?e.createElement(Se.Z,{className:ye.content,value:(ue=x==null?void 0:x.answer_texts)==null?void 0:ue[0]}):e.createElement("div",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))))))})),(j==null?void 0:j.question_type)===8&&e.createElement("div",null,e.createElement(Se.Z,{disabledFill:!0,className:ye.content,showProgramFill:!0,value:F.Base64.decode(((Ye=j==null?void 0:j.program_attr)==null?void 0:Ye.code)||"")})),(j==null?void 0:j.question_type)===5&&e.createElement("div",{style:{background:"#F6F7F9",padding:"0px 20px",height:46,lineHeight:"46px",marginTop:40,display:"flex",alignItems:"center"}},e.createElement("div",{style:{flex:1,alignItems:"center",display:"flex"}},e.createElement("div",{style:{marginRight:30}},e.createElement("span",{style:{marginRight:10}},"\u521B\u5EFA\u8005"),e.createElement("span",{style:{color:"#000000"}},(j==null?void 0:j.author_name)||"- -")),e.createElement("div",{style:{marginRight:30}},e.createElement("span",{style:{marginRight:10}},"\u6240\u5C5E\u5355\u4F4D"),e.createElement("span",{style:{color:"#000000"}},(j==null?void 0:j.author_school_name)||"- -")),e.createElement("div",{style:{marginRight:30}},e.createElement("span",{style:{marginRight:10}},"\u5B66\u4E60\u4EBA\u6570"),e.createElement("span",{style:{color:"#000000"}},(j==null?void 0:j.study_count)||"0"))),e.createElement("a",{className:ye.shixunbutton,href:`/shixuns/${j==null?void 0:j.identifier}/challenges?exercise=true`,target:"_blank"},e.createElement("i",{onClick:()=>{},style:{marginRight:20},className:"iconfont icon-shixunkecheng mr5 "}),"\u5B9E\u8BAD\u8BE6\u60C5"))),((j==null?void 0:j.question_type)<=4||[6,8].includes(j==null?void 0:j.question_type))&&e.createElement("div",{className:ye.bottom},e.createElement("div",{className:ye.bottomitem},e.createElement("span",{className:ye.left},"\u89E3\u6790"),e.createElement("span",{className:ye.right},j!=null&&j.analysis?e.createElement(Se.Z,{value:j==null?void 0:j.analysis}):e.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~"))),e.createElement("div",{className:ye.bottomitem},e.createElement("span",{className:ye.left},"\u96BE\u5EA6"),e.createElement("span",{className:ye.right},(j==null?void 0:j.difficulty)===1?"\u7B80\u5355":(j==null?void 0:j.difficulty)===2?"\u9002\u4E2D":"\u56F0\u96BE")),e.createElement("div",{className:ye.bottomitem},e.createElement("span",{className:ye.left},"\u77E5\u8BC6\u70B9"),e.createElement("span",{className:ye.right},j!=null&&j.tag_discipline?j==null?void 0:j.tag_discipline:e.createElement("span",{style:{color:"#C1C1C1"}},"\u6682\u672A\u8BBE\u7F6E~")))))},W=n(12082),Tt=n(53956),Yt=n(95392),Xt=n(61485),_t=n(66807),Ut=n(55301),ce=n(76888),_=n(59301),X=Object.defineProperty,Ge=Object.defineProperties,rt=Object.getOwnPropertyDescriptors,te=Object.getOwnPropertySymbols,Me=Object.prototype.hasOwnProperty,Qe=Object.prototype.propertyIsEnumerable,ve=(j,ie,xe)=>ie in j?X(j,ie,{enumerable:!0,configurable:!0,writable:!0,value:xe}):j[ie]=xe,ge=(j,ie)=>{for(var xe in ie||(ie={}))Me.call(ie,xe)&&ve(j,xe,ie[xe]);if(te)for(var xe of te(ie))Qe.call(ie,xe)&&ve(j,xe,ie[xe]);return j},we=(j,ie)=>Ge(j,rt(ie)),se=(j,ie,xe)=>new Promise((bt,ht)=>{var wt=Ft=>{try{Te(xe.next(Ft))}catch(Bt){ht(Bt)}},Ct=Ft=>{try{Te(xe.throw(Ft))}catch(Bt){ht(Bt)}},Te=Ft=>Ft.done?bt(Ft.value):Promise.resolve(Ft.value).then(wt,Ct);Te((xe=xe.apply(j,ie)).next())});const ke=({setScoreShow:j,ScoreShow:ie,onOk:xe,isshixuns:bt,isloadings:ht,dispatch:wt,isIntelligentAssistant:Ct=!1,ispptModal:Te=!1,isChangeQuestion:Ft=!1,newExercisePaper:Bt,shixunsDetail:Ye})=>{var x,U,z;let[w,V]=(0,e.useState)({type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,bigmodel:Ct,is_smart_plan:Te,group_id:[]}),[lt,ue]=(0,e.useState)([]),[Z,de]=(0,e.useState)([]),[M,q]=(0,e.useState)([]),[Le,P]=(0,e.useState)([]);const[R,s]=(0,e.useState)(!1),[p]=E.default.useForm(),[h,T]=(0,e.useState)(),[Ae,he]=(0,e.useState)(!1);let[Be,K]=(0,e.useState)(bt);const[be,vt]=(0,e.useState)([]),[en,qe]=(0,e.useState)(0),[pt,qt]=(0,e.useState)(!0),[xt,Wt]=(0,e.useState)([]),[tt,Dt]=(0,e.useState)([]),Lt=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u586B\u7A7A\u9898",value:"COMPLETION",question_type:3},{name:"\u7B80\u7B54\u9898",value:"SUBJECTIVE",question_type:4},{name:"\u5B9E\u8BAD\u9898",value:"SHIXUN",question_type:5},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6},{name:"\u7EC4\u5408\u9898",value:"COMBINATION",question_type:7},{name:"\u7A0B\u5E8F\u586B\u7A7A\u9898",value:"BPROGRAM",question_type:8}],At=[{name:"\u5168\u90E8",value:"",question_type:0},{name:"\u5355\u9009\u9898",value:"SINGLE",question_type:0},{name:"\u591A\u9009\u9898",value:"MULTIPLE",question_type:1},{name:"\u5224\u65AD\u9898",value:"JUDGMENT",question_type:2},{name:"\u7F16\u7A0B\u9898",value:"PROGRAM",question_type:6}];let[jt,ln]=(0,e.useState)({gg:{type:"1",page:1,updated_at:"",quotes:"",item_type:null,courseid:null,per_page:10,tag_discipline_id:null,difficulty:null,keyword:null},ttgx:{type:"3",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},scj:{type:"2",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null},wcjd:{type:"0",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,group_id:[]},yx:{type:"5",page:1,updated_at:"",quotes:"",item_type:null,per_page:10,courseid:null,tag_discipline_id:null,difficulty:null,keyword:null,group_id:null}});const Bn=(0,e.useRef)(new Set),fn=(0,e.useRef)(new Set),Mn=E.default.useWatch("courseid",p),In=[{name:"\u7B80\u5355",value:1},{name:"\u9002\u4E2D",value:2},{name:"\u56F0\u96BE",value:3}],sl=[{name:"\u521D\u7EA7",value:1},{name:"\u4E2D\u7EA7",value:2},{name:"\u4E2D\u9AD8\u7EA7",value:3},{name:"\u9AD8\u7EA7",value:4}],cn=[{name:"\u672A\u53D1\u5E03",value:"unpublish"},{name:"\u9759\u9ED8\u53D1\u5E03",value:"silent_publish"},{name:"\u516C\u5F00\u53D1\u5E03",value:"public_publish"}],[tl,gl]=(0,e.useState)(!1),cl=()=>{p.resetFields(),Be=!1,K(!1),gl(!1),p.submit()};(0,e.useEffect)(()=>{var ot,Vt,ll,Sn,el,dl,Ht,Al,Sl,Xn;(((ll=(Vt=(ot=Bt==null?void 0:Bt.editData)==null?void 0:ot.exercise)==null?void 0:Vt.exist_item_bank_ids)==null?void 0:ll.length)>0||((dl=(el=(Sn=Bt==null?void 0:Bt.editData)==null?void 0:Sn.exercise)==null?void 0:el.exist_item_bank_shixun_ids)==null?void 0:dl.length)>0)&&Dt([...(Al=(Ht=Bt==null?void 0:Bt.editData)==null?void 0:Ht.exercise)==null?void 0:Al.exist_item_bank_ids,...(Xn=(Sl=Bt==null?void 0:Bt.editData)==null?void 0:Sl.exercise)==null?void 0:Xn.exist_item_bank_shixun_ids])},[(U=(x=Bt==null?void 0:Bt.editData)==null?void 0:x.exercise)==null?void 0:U.exist_item_bank_ids]),(0,e.useEffect)(()=>{ie&&(p.setFieldsValue({item_type:"",courseid:null,tag_discipline_id:null,difficulty:null,keyword:null}),pt&&Be&&(p.setFieldsValue({item_type:"SHIXUN"}),w.item_type="SHIXUN",V(ge({},w)),qt(!1)),Fl(w),Zl(),Ul({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}))},[ie]),(0,e.useEffect)(()=>{en>0&&setTimeout(()=>{qe(0)},2e3)},[en]);function Fl(ot){return se(this,null,function*(){var Vt,ll,Sn;if(s(!0),V(ge({},ot)),(M==null?void 0:M.length)<=0&&ot.type==="5"){P([]),s(!1);return}console.log("----",M,be);let el=ot.type==="5"?M==null?void 0:M.filter(Sl=>!be.includes(Sl)):null,dl=ot.type==="5"?M==null?void 0:M.filter(Sl=>be.includes(Sl)):null,Ht={course_discipline_id:ot==null?void 0:ot.courseid};(ot==null?void 0:ot.type)==="1"&&(Ht={discipline_id:((Vt=ot==null?void 0:ot.courseid)==null?void 0:Vt[0])||null,sub_discipline_id:((ll=ot==null?void 0:ot.courseid)==null?void 0:ll[1])||null});let Al=yield(0,Fe.ZP)("/api/item_banks.json",{method:"get",params:we(ge(ge({},ot),Ht),{ids:el,shixun_ids:dl,include_shixuns:!Ct,group_id:((Sn=ot.group_id)==null?void 0:Sn.map(Sl=>Sl==null?void 0:Sl.value))||null,keyword:ot.keyword?encodeURIComponent(ot.keyword):ot.keyword,type:ot.type==="5"?null:ot.type,clazz:ot.type==="3"?"ItemBanksGroup":null,bigmodel:Ct,is_smart_plan:Te})});P(Al),s(!1)})}function Zl(){return se(this,null,function*(){let ot=yield(0,Fe.ZP)("/api/disciplines.json",{method:"get",params:{source:"question",group_id:0,group_type:w.type==="5"?null:w.type,clazz:"ItemBanksGroup"}});ue((0,We.L)(ot==null?void 0:ot.disciplines))})}function Ul(ot){return se(this,null,function*(){var Vt;let ll=yield(0,Fe.ZP)("/api/item_banks_groups/for_problemset.json",{method:"post",body:ot}),Sn=[{title:"\u6839\u76EE\u5F55",id:0,pid:0,value:0,key:0,isLeaf:!1,children:(Vt=ll==null?void 0:ll.data)==null?void 0:Vt.map(el=>({title:el.name,id:el.id,pid:el.id,value:el.id,key:el.id,isLeaf:!el.have_child}))}];Wt(Sn)})}function au(ot){return se(this,null,function*(){var Vt,ll,Sn,el;s(!0);let dl=(Vt=ot.list)==null?void 0:Vt.filter(Xn=>!be.includes(Xn)),Ht=(ll=ot.list)==null?void 0:ll.filter(Xn=>be.includes(Xn));if(dl.length===0&&Ht.length===0){s(!1),P([]);return}let Al={course_discipline_id:ot==null?void 0:ot.courseid};(ot==null?void 0:ot.type)==="1"&&(Al={discipline_id:((Sn=ot==null?void 0:ot.courseid)==null?void 0:Sn[0])||null,sub_discipline_id:((el=ot==null?void 0:ot.courseid)==null?void 0:el[1])||null});let Sl=yield(0,Fe.ZP)("/api/item_banks.json",{method:"get",params:we(ge(ge({},ot),Al),{ids:dl,shixun_ids:Ht,type:ot.type==="5"?null:ot.type,clazz:ot.type==="3"?"ItemBanksGroup":null})});s(!1),P(Sl)})}const cu=ot=>se(void 0,null,function*(){const Vt=yield wt({type:"shixunsDetail/release",payload:{id:ot}});let ll=Vt==null?void 0:Vt.tag_position,Sn=(Vt==null?void 0:Vt.evaluation_set_position)||[],el=Vt.status;return el===0?(C.ZP.success("\u53D1\u5E03\u6210\u529F"),Fl(w),!0):(el===2?C.ZP.error(`\u7B2C${Sn.join(",")}\u5173\u5C1A\u672A\u5B8C\u6210\uFF0C\u65E0\u6CD5\u7533\u8BF7\u53D1\u5E03`):el===3?C.ZP.error(`\u6BCF\u4E00\u4E2A\u5173\u5361\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u6280\u80FD\u6807\u7B7E, \u7B2C${ll.join(",")}\u5173\u5C1A\u672A\u8BBE\u7F6E\u6280\u80FD\u6807\u7B7E\uFF0C\u8BF7\u8865\u5145`):C.ZP.error("\u5C1A\u672A\u521B\u5EFA\u4EFB\u52A1\u7684\u5B9E\u8BAD\uFF0C\u4E0D\u80FD\u7533\u8BF7\u53D1\u5E03"),!1)}),pl=ot=>(ot==null?void 0:ot.shixun_tag_num)===1?"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528\uFF0C\u8BF7\u5148\u8FDB\u884C\u53D1\u5E03":"",fu=(ot,Vt,ll)=>ot.map(Sn=>Sn.key===Vt?ge(ge({},Sn),ll):Sn.children?we(ge({},Sn),{children:fu(Sn.children,Vt,ll)}):Sn),ql=ot=>se(void 0,null,function*(){const{key:Vt}=ot;let ll=w.type;const Sn=yield(0,Ut.ex)({page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",group_id:Math.abs(Vt),type:ll}),{data:el,total_count:dl}=Sn||{};dl>0&&Wt(Ht=>fu(Ht,Vt,{children:el.map(Al=>({title:Al.name,id:Al.id,pid:Al.id,value:Al.id,key:Al.id,isLeaf:!Al.have_child}))}))});function Bl(ot){console.log("----",w),ot==="1"&&(jt.gg=ge({},w)),ot==="2"&&(jt.scj=ge({},w)),ot==="3"&&(jt.ttgx=ge({},w)),ot==="0"&&(jt.wcjd=ge({},w)),ot==="5"&&(jt.yx=ge({},w)),ln(ge({},jt))}function wu(){w.type==="1"&&(w=jt.gg),w.type==="2"&&(w=jt.scj),w.type==="3"&&(w=jt.ttgx),w.type==="0"&&(w=jt.wcjd),w.type==="5"&&(w=jt.yx),(w==null?void 0:w.item_type)==="SHIXUN"?(Be=!0,K(!0)):(Be=!1,K(!1)),p.setFieldsValue(ge({},w)),V(ge({},w)),Fl(ge({},w))}return _.createElement("div",null,_.createElement(D.default,{title:!1,footer:!1,open:ie,width:1200,centered:!0,className:G.scoremodal,onCancel:()=>{j(!1)}},_.createElement("div",{style:{display:"flex",alignItems:"center"}},_.createElement("div",{className:G.title},Ct?"\u4EE5\u9898\u6362\u9898":"\u9898\u5E93\u9009\u9898")),Ct&&_.createElement("div",{style:{padding:10,background:"#F6F7F9",borderRadius:4,marginTop:14}},"\u6839\u636E\u73B0\u6709\u8BD5\u9898\u7684\u9898\u578B\u3001\u65B9\u5411\u3001\u77E5\u8BC6\u70B9\u3001\u96BE\u6613\u5EA6\uFF0C\u5FEB\u901F\u751F\u6210\u65B0\u7684\u8BD5\u9898\uFF0C\u589E\u52A0\u8BD5\u9898\u7684\u4E30\u5BCC\u5EA6"),_.createElement(ae.default,{className:G.tabWrap,activeKey:w.type,onChange:ot=>{ot==="3"?(w.show_all_share=!0,Ul({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"3"})):w.show_all_share=null,ot==="0"&&Ul({group_id:0,page:1,per_page:20,sort_by:"updated_at",sort_direction:"desc",type:"0"}),Bl(w.type),w.type=ot,(w==null?void 0:w.item_type)==="SHIXUN"&&w.type!=="5"&&(Be=!0,K(!0)),gl(!1),w.type==="5"&&(Be=!1,K(!1)),wu(),Zl()},items:[{label:"\u516C\u5171",key:"1"},{label:"\u56E2\u961F\u5171\u4EAB",key:"3"},{label:"\u6536\u85CF\u5939",key:"2"},{label:"\u6211\u521B\u5EFA\u7684",key:"0"},{label:_.createElement("div",null,"\u5DF2\u9009",M.length>0&&_.createElement("span",{className:G.titlecount},M.length),en>0&&_.createElement("span",{className:G.add},"+",en)),key:"5"}]}),_.createElement(E.default,{layout:"inline",form:p,onValuesChange:(ot,Vt)=>{const ll=Object.values(Vt).some(el=>el!==null&&el!==""&&el!==void 0),Sn=Vt.keyword==="";if(gl(ll||!Sn),w.page=1,(Vt==null?void 0:Vt.item_type)==="SHIXUN"){if(w.type==="5"?K(!1):K(!0),ot.keyword||ot.keyword==="")return;p.submit()}else{if(ot!=null&&ot.courseid&&p.setFieldsValue({tag_discipline_id:null}),K(!1),ot.keyword||ot.keyword==="")return;p.submit()}},onFinish:ot=>{var Vt;w.type==="3"&&(!ot.group_id||((Vt=ot==null?void 0:ot.group_id)==null?void 0:Vt.length)===0)?w.show_all_share=!0:w.show_all_share=null,V(ge(ge({},w),ot)),Fl(ge(ge({},w),ot))}},_.createElement(E.default.Item,{name:"item_type"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u9898\u578B",style:{width:110},size:"middle"},(Te?At:Ct?Lt==null?void 0:Lt.filter(ot=>ot.question_type!==5):Lt).map(ot=>_.createElement(S.default.Option,{key:ot.value},ot.name)))),["1","2"].includes(w.type)?_.createElement(_.Fragment,null,_.createElement(E.default.Item,{name:"courseid"},_.createElement(Pe.Z,{className:G.selectWrapper,style:{width:160},size:"middle",placeholder:"\u65B9\u5411&\u8BFE\u7A0B",options:lt})),!Be&&_.createElement(E.default.Item,{name:"tag_discipline_id"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u77E5\u8BC6\u70B9",style:{width:160},size:"middle",allowClear:!0},(z=Le==null?void 0:Le.tag_disciplines)==null?void 0:z.map(ot=>_.createElement(S.default.Option,{key:ot.id},ot.name))))):_.createElement(_.Fragment,null,_.createElement(E.default.Item,{name:"courseid"},_.createElement(ce.q,{style:{width:160,height:38},size:"middle",showLinkButton:!1,data:{container_type:"ItemBank",type:w==null?void 0:w.type}})),!Be&&_.createElement(E.default.Item,{name:"tag_discipline_id"},_.createElement(ce.i,{allowAcceptEmpty:!0,key:String(w.type==="3"),data:{container_type:"ItemBank",search:!0,type:w.type},style:{width:160,height:38},size:"middle",courseDisciplineId:Mn,showLinkButton:!1}))),_.createElement(E.default.Item,{name:Be?"diff":"difficulty"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u96BE\u5EA6",style:{width:118},size:"middle",allowClear:!0},In.map(ot=>_.createElement(S.default.Option,{key:ot.value},ot.name)))),Be&&_.createElement(E.default.Item,{name:"shixun_publish_status"},_.createElement(S.default,{className:G.selectWrapper,placeholder:"\u5168\u90E8\u72B6\u6001",style:{width:118},size:"middle",allowClear:!0},cn.map(ot=>_.createElement(S.default.Option,{key:ot.value},ot.name)))),(w.type==="3"||w.type==="0")&&!Be&&_.createElement(E.default.Item,{name:"group_id"},_.createElement(pe.default,{treeDataSimpleMode:!0,style:{width:134},className:G.selectWrappers,multiple:!0,allowClear:!0,showSearch:!0,filterTreeNode:(ot,Vt)=>Vt.title.toUpperCase().indexOf(ot.toUpperCase())!==-1,dropdownStyle:{maxHeight:400,width:500,overflow:"auto"},placeholder:"\u8BF7\u9009\u62E9\u6587\u4EF6\u5939",treeCheckStrictly:!0,loadData:ql,treeDefaultExpandedKeys:[0],maxTagCount:0,treeCheckable:!0,treeData:xt})),tl&&_.createElement("span",{className:G.allqingchu,onClick:cl},_.createElement("i",{className:"iconfont icon-guanbi4"}),_.createElement("span",null,"\u6E05\u9664\u7B5B\u9009\u6761\u4EF6")),_.createElement(E.default.Item,{style:{flex:"0 0 auto",marginRight:0,marginLeft:"auto"},name:"keyword"},_.createElement(H.default.Search,{className:G.search,placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u8BCD\u641C\u7D22",allowClear:!0,suffix:_.createElement("i",{className:`iconfont icon-sousuo9 font14 ${G.searchIcon}`,onClick:()=>p.submit()}),onSearch:ot=>{p.submit()}}))),_.createElement("div",{style:{background:"#F6F7F9",display:"flex",alignItems:"center",marginTop:18,height:40,paddingLeft:10,paddingRight:20}},_.createElement("div",{onClick:()=>{w.updated_at==="asc"?w.updated_at="desc":w.updated_at="asc",V(we(ge({},w),{page:1})),Fl(we(ge({},w),{page:1}))}}," ",w.updated_at?_.createElement("img",{src:w.updated_at==="asc"?W.Z:Tt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):_.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u66F4\u65B0\u65F6\u95F4\u6392\u5E8F"),_.createElement("div",{onClick:()=>{w.quotes==="asc"?w.quotes="desc":w.quotes="asc",V(we(ge({},w),{page:1})),Fl(we(ge({},w),{page:1}))},style:{marginLeft:20}}," ",w.quotes?_.createElement("img",{src:w.quotes==="asc"?W.Z:Tt.Z,style:{width:"15px",verticalAlign:"text-bottom"},className:"font14 mr5 c-light-primary"}):_.createElement("i",{style:{fontSize:"14px"},className:"iconfont icon-jiangxu mr5 c-light-primary"}),"\u6309\u4F7F\u7528\u6B21\u6570\u6392\u5E8F")),_.createElement(o.default,{style:{marginTop:2,marginBottom:20},scroll:{y:260},dataSource:(Le==null?void 0:Le.items)||(Le==null?void 0:Le.shixun_list),pagination:!1,loading:R,rowKey:ot=>ot.id,rowSelection:{type:Ct||Ft?"radio":"checkbox",selectedRowKeys:Z,getCheckboxProps:ot=>({disabled:ot.shixun_tag_num===1||(tt==null?void 0:tt.find(Vt=>ot.id===Vt))}),onSelect(ot,Vt,ll){if(Ct||Ft){de([ot.id]),fn.current=new Set([ot.id]),qe(1),q([ot.id]);return}if(Vt)(Be||ot!=null&&ot.challenge_names)&&vt([...be,ot.id]),de([...Z,ot.id]),ot.identifier?Bn.current.add(ot.id):fn.current.add(ot.id),qe(1),q([...M,ot.id]);else{ot.identifier?Bn.current.delete(ot.id):fn.current.delete(ot.id);let Sn=M.filter(el=>el!==ot.id);if(de(Sn),q(Sn),Be||ot!=null&&ot.challenge_names){let el=be.filter(dl=>dl!==ot.id);vt([...el])}if(w.type==="5"){au(we(ge({},w),{list:[...Sn]}));return}}},onSelectAll(ot,Vt,ll){var Sn,el;if(ot){const dl=ll.map(Al=>Al.id),Ht=(el=ll==null?void 0:ll.filter(Al=>Al==null?void 0:Al.challenge_names))==null?void 0:el.map(Al=>Al.id);vt([...be,...Ht]),de([...Z,...dl]),q([...M,...dl]);for(const Al of ll)Al.identifier?Bn.current.add(Al.id):fn.current.add(Al.id)}else{const dl=ll.map(Xn=>Xn.id),Ht=Z.filter(Xn=>!dl.some(nl=>nl===Xn)),Al=(Sn=ll==null?void 0:ll.filter(Xn=>Xn==null?void 0:Xn.challenge_names))==null?void 0:Sn.map(Xn=>Xn.id);de([...Ht]),q([...Ht]);let Sl=be.filter(Xn=>!Al.some(nl=>nl===Xn.id));vt([...Sl]),w.type==="5"&&au(we(ge({},w),{list:[...Ht]}));for(const Xn of dl)Xn.identifier?Bn.current.delete(Xn):fn.current.delete(Xn)}}},columns:[{title:"\u9898\u578B",dataIndex:"item_type",key:"item_type",render:(ot,Vt,ll)=>{var Sn,el;return _.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,Be||Vt!=null&&Vt.challenge_names?"\u5B9E\u8BAD\u9898":(el=(Sn=Lt==null?void 0:Lt.filter(dl=>dl.value===ot))==null?void 0:Sn[0])==null?void 0:el.name))}},{title:"\u8BD5\u9898\u540D\u79F0",dataIndex:"name",width:Be?"30%":"60%",key:"name",render:(ot,Vt,ll)=>{var Sn;return _.createElement("div",{style:{display:"flex",alignItems:"center"}},_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",{className:Vt!=null&&Vt.high_resources_consume?G.q_title:""},_.createElement(Se.Z,{key:1,showLines:1,showTextOnly:!0,value:Be||Vt!=null&&Vt.challenge_names?Vt!=null&&Vt.title||ot===null?"--":ot:(Vt==null?void 0:Vt.item_type)=="BPROGRAM"?(Sn=Vt==null?void 0:Vt.program_attr)==null?void 0:Sn.description:ot}))),(Vt==null?void 0:Vt.high_resources_consume)&&_.createElement(_t.Z,{type:"shixun",style:{marginLeft:10}}))}},{title:"\u521B\u5EFA\u8005",dataIndex:"author_name",key:"author_name",hidden:!Be,render:(ot,Vt,ll)=>{var Sn;return _.createElement(k.Z,{title:pl(Vt)},_.createElement("span",null,ot?(Sn=ot==null?void 0:ot.split("\u3001"))==null?void 0:Sn[0]:"- -"))}},{title:"\u6240\u5C5E\u5355\u4F4D",dataIndex:"author_school_name",key:"author_school_name",hidden:!Be,render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("span",null,ot||"- -"))},{title:"\u96BE\u5EA6",dataIndex:"difficulty",key:"difficulty",render:(ot,Vt,ll)=>{var Sn,el,dl,Ht;return _.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,Be||Vt!=null&&Vt.challenge_names?(Vt==null?void 0:Vt.level)||((el=(Sn=In==null?void 0:In.filter(Al=>Al.value===ot))==null?void 0:Sn[0])==null?void 0:el.name):(Ht=(dl=In==null?void 0:In.filter(Al=>Al.value===ot))==null?void 0:dl[0])==null?void 0:Ht.name))}},{title:"\u5173\u5361\u6570\u91CF",dataIndex:"challenges_count",key:"challenges_count",hidden:!Be,render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,ot||"- -"))},{title:"\u4F7F\u7528\u6B21\u6570",dataIndex:"quotes",key:"quotes",render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,Be||Vt!=null&&Vt.challenge_names?(Vt==null?void 0:Vt.study_count)||(Vt==null?void 0:Vt.stu_num):ot))},{title:_.createElement("span",null,"\u53D1\u5E03\u72B6\u6001 ",_.createElement(k.Z,{title:"\u672A\u53D1\u5E03\u7684\u5B9E\u8DF5\u9879\u76EE\u4E0D\u80FD\u88AB\u9009\u7528"},_.createElement(Xt.Z,null))),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",hidden:!Be,render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",null,ot||"- -"))},{title:"\u64CD\u4F5C",dataIndex:"id",key:"item_type",render:(ot,Vt,ll)=>_.createElement(k.Z,{title:pl(Vt)},_.createElement("div",{style:{flex:1,textAlign:"start"}},_.createElement("a",{onClick:()=>{var Sn,el;T(we(ge({},Vt),{question_type:Be||Vt!=null&&Vt.challenge_names?5:(el=(Sn=Lt==null?void 0:Lt.filter(dl=>dl.value===(Vt==null?void 0:Vt.item_type)))==null?void 0:Sn[0])==null?void 0:el.question_type})),he(!0)}},"\u67E5\u770B"),(Vt==null?void 0:Vt.shixun_tag_num)===1&&_.createElement("a",{style:{marginLeft:10},onClick:()=>{D.default.confirm({title:"\u63D0\u793A",icon:null,centered:!0,width:400,content:_.createElement("div",null,"\u662F\u5426\u786E\u5B9A\u53D1\u5E03",_.createElement("span",{style:{cursor:"pointer",color:"#3061D0"},onClick:()=>{window.open(`/shixuns/${Vt==null?void 0:Vt.identifier}/challenges`)}},(Vt==null?void 0:Vt.shixun_name)||"--"),"\uFF1F"),onOk:()=>se(void 0,null,function*(){if(!cu(Vt==null?void 0:Vt.identifier))return new Promise((Sn,el)=>{el()})})})}},"\u53D1\u5E03")))}].filter(ot=>!ot.hidden)}),_.createElement(ne.Z,{current:w.page,total:(Le==null?void 0:Le.items_count)||(Le==null?void 0:Le.shixuns_count),style:{marginBottom:20},defaultPageSize:w.per_page,showTotal:ot=>_.createElement("span",null,"\u5171\xA0",_.createElement("span",{style:{color:"#165DFF"}},ot),"\xA0\u6761\u6570\u636E"),pageSize:w.per_page,onChange:(ot,Vt)=>{w.page=ot,w.per_page=Vt,V(ge({},w)),Fl(ge({},w))}}),_.createElement("div",{className:G.bottom},_.createElement(ut.ZP,{className:G.no,onClick:()=>{j(!1)}},"\u53D6\u6D88"),_.createElement(ut.ZP,{loading:ht,style:{width:ht&&75},className:G.yes,onClick:()=>se(void 0,null,function*(){if((M==null?void 0:M.length)<=0){C.ZP.info(Ct||Ft?"\u8BF7\u9009\u62E9\u4E00\u9053\u8BD5\u9898":"\u5F53\u524D\u6682\u672A\u9009\u62E9\u6570\u636E");return}xe([...fn.current],[...Bn.current],!0,M==null?void 0:M.length)})},Ct?"\u5F00\u59CB\u6362\u9898":"\u786E\u8BA4"))),_.createElement(D.default,{open:Ae,title:"\u9898\u76EE\u8BE6\u60C5",footer:!1,className:G.previewModal,width:1e3,centered:!0,onCancel:()=>{he(!1)},onOk:()=>{he(!1)}},_.createElement(Ie,{qitem:h})))};var Ze=(0,Yt.connect)(({shixunsDetail:j,newExercisePaper:ie})=>({shixunsDetail:j,newExercisePaper:ie}))(ke)},62998:function(gt,Xe,n){"use strict";n.d(Xe,{Im:function(){return Xt},ZP:function(){return Ge},gZ:function(){return _}});var e=n(59301),E=n(37568),C=n(99571),D=n(84105),ae=n(87395),S=n(99268),Pe=n(24334),pe=n(35191),H=n(97231),o=n(63949),k=n(7181),ne=n(34376),ut=n(92310),Fe=n.n(ut),G=n(59301),We=Object.defineProperty,ye=Object.defineProperties,Se=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,F=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,st=(rt,te,Me)=>te in rt?We(rt,te,{enumerable:!0,configurable:!0,writable:!0,value:Me}):rt[te]=Me,Ie=(rt,te)=>{for(var Me in te||(te={}))F.call(te,Me)&&st(rt,Me,te[Me]);if(J)for(var Me of J(te))me.call(te,Me)&&st(rt,Me,te[Me]);return rt},W=(rt,te)=>ye(rt,Se(te));const{TextArea:Tt}=E.default,Yt={visible:!1,tabIndex:"0"},Xt={[S.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[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 _t=(rt=>(rt[rt.SET_VISIBLE=0]="SET_VISIBLE",rt[rt.SET_TABINDEX=1]="SET_TABINDEX",rt))(_t||{});function Ut(rt,te){switch(te.type){case 0:return W(Ie({},rt),{visible:te.payload});case 1:return W(Ie({},rt),{tabIndex:te.payload});default:throw new Error}}function ce({value:rt,className:te}){const[Me,Qe]=(0,e.useState)(!1),ve=(0,e.useRef)(),ge=(0,e.useRef)();return(0,e.useEffect)(()=>{Me&&(ge.current.reset(),ge.current.write((0,o.pp)(rt||"")))},[rt,Me]),(0,e.useEffect)(()=>{var we,se,ke,Ze;if(ve.current){ge.current=new ne.Terminal({fontSize:14,disableStdin:!0}),ge.current.open(ve.current);const j=ve.current.offsetWidth-14,ie=((Ze=(ke=(se=(we=ge.current)==null?void 0:we._core)==null?void 0:se._renderService)==null?void 0:ke.dimensions)==null?void 0:Ze.actualCellWidth)||9.5,xe=Math.ceil(j/ie);ge.current.resize(xe,8),Qe(!0)}},[]),G.createElement("div",{ref:ve,className:Fe()("XtermText-valueRef",te)})}function _(rt){const{status:te,error_msg:Me,output:Qe,input:ve,expected_output:ge,is_file:we,input_file_url:se,output_file_url:ke,expected_output_file_url:Ze}=rt;let j=null;const ie={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(te){case S.h.NOMATCH:j=G.createElement(G.Fragment,null,G.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!we&&G.createElement(ce,{className:"mb10",value:ve}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(se,ve)},ve)),G.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!we&&G.createElement(ce,{className:"mb10",value:Qe&&Pe.Base64.decode(Qe)||""}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(ke,Qe)},Qe)),G.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!we&&G.createElement(ce,{className:"mb10",value:ge&&Pe.Base64.decode(ge)||""}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(Ze,ge)},ge)));break;case S.h.EXECUTEFAILURE:j=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!we&&G.createElement(H.Z,{value:ve,style:ie}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(se,ve)},ve)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.COMPILEFAILURE:j=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!we&&G.createElement(H.Z,{value:ve,style:ie}),we&&G.createElement("div",{style:ie},G.createElement("a",{onClick:()=>(0,o.LR)(se,ve)},ve)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.PODFAILURE:j=G.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case S.h.TIMEOUT:j=G.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return G.createElement(G.Fragment,null," ",j," ")}function X(rt){const{status:te,error_msg:Me,execute_time:Qe,output:ve,input:ge,expected_output:we,is_file:se,input_file_url:ke,output_file_url:Ze,expected_output_file_url:j}=rt;let ie=null;switch(te){case S.h.OK:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Qe,"\u79D2"),G.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),G.createElement("pre",null,Pe.Base64.decode(ve)));break;case S.h.NOMATCH:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u8F93\u5165\uFF1A",G.createElement("pre",null,ge)),G.createElement("p",null,"\u8F93\u51FA\uFF1A",ve&&Pe.Base64.decode(ve)),G.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",we&&Pe.Base64.decode(we)));break;case S.h.EXECUTEFAILURE:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",G.createElement("pre",null,ge)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.COMPILEFAILURE:ie=G.createElement(G.Fragment,null,G.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",G.createElement("pre",null,ge)),G.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),G.createElement("pre",{className:"error"},Pe.Base64.decode(Me)));break;case S.h.PODFAILURE:ie=G.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case S.h.TIMEOUT:ie=G.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return G.createElement(G.Fragment,null," ",ie," ")}var Ge=({id:rt,is_file:te,input:Me,debuging:Qe,submitting:ve,executingMessage:ge,debugResult:we,onChangeInput:se,onDebugCode:ke,onSubmitCode:Ze})=>{const[j,ie]=(0,e.useReducer)(Ut,Yt),{visible:xe,tabIndex:bt}=j;(0,e.useEffect)(()=>{ie({type:0,payload:!1})},[rt]);function ht(Ft){let Bt=Ft.target.id;ie({type:1,payload:Bt})}function wt(){ie({type:0,payload:!xe})}const Ct=(0,e.useMemo)(()=>{if(we){const{status:Ft}=we;return G.createElement(G.Fragment,null,X(we))}return null},[we]);function Te(){ie({type:0,payload:!0}),ie({type:1,payload:"1"}),ke()}return G.createElement("div",{className:"test-case-panel"},G.createElement("div",{className:`test-case-panel-body ${xe?"active":""}`},G.createElement("ul",{className:"s-navs"},G.createElement("li",null,G.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),G.createElement(k.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:G.createElement(Tt,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\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:te?"":Me,onChange:se}),rightNode:Qe?G.createElement(pe.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):we?Ct:G.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")})),G.createElement("a",{className:`btn-collapse ${xe?"up":""}`,onClick:wt},xe?G.createElement(D.Z,null):G.createElement(ae.Z,null)),G.createElement("footer",{className:"footer"},G.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),G.createElement("div",{className:"flex-container"},G.createElement(C.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),G.createElement(C.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),G.createElement(C.ZP,{className:"btn-green",type:"ghost",loading:Qe,onClick:Te},"\u8C03\u8BD5\u4EE3\u7801"),G.createElement(C.ZP,{type:"primary",className:"custom-ant-disabled",loading:ve,disabled:ve,onClick:()=>{ie({type:0,payload:!1}),Ze()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},99268:function(gt,Xe,n){"use strict";n.d(Xe,{h:function(){return e}});var e=(E=>(E[E.NOMATCH=-1]="NOMATCH",E[E.OK=0]="OK",E[E.TIMEOUT=2]="TIMEOUT",E[E.PODFAILURE=3]="PODFAILURE",E[E.COMPILEFAILURE=4]="COMPILEFAILURE",E[E.EXECUTEFAILURE=5]="EXECUTEFAILURE",E[E.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",E))(e||{})},87960:function(gt,Xe,n){"use strict";n.d(Xe,{Y2:function(){return rt},ZP:function(){return te}});var e=n(59301),E=n(14566),C=n(6767),D=n(62957),ae=n(77019),S=n(47889),Pe=n(99571),pe=n(62673),H=n(25399),o=n(37568),k={wrap:"wrap___MkYbQ",colorBlue:"colorBlue___onjbP",repeatedName:"repeatedName___nbqnE",text:"text___xvutp",greyText:"greyText___dihvZ",noData:"noData___LxOJA",dragger:"dragger___y7F4A",uploadText:"uploadText___Et3KS",btnS:"btnS___k1e6j",testCaseRadio:"testCaseRadio___q1wXT",head:"head___s4Eix",operation:"operation___JCAVh",headProgram:"headProgram___uWA_M",listWrapper:"listWrapper___xW3b4",list:"list___dCbd6",del:"del___abNho",info:"info___J1Wmf"},ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAADICAYAAACAj9YNAAAAAXNSR0IArs4c6QAAD59JREFUeF7tnet527gShsFUZFeQpJN1GkncyG46iVJBVFG4D6mLKYmSMLgQM4NXf855NrgMvm/8egBC9BD4oIBhBV7++fPlHP6n8PH/p/84Dp8XS7v8txB2N8sext/h7+G/73++3v67YZ08hz54Xhxr86fAy7c/P+ZVHQB1DaYaCz7AbBzfgVsNefPHBGL5GjJCRQUW0PpecRrp0DugJpWsXnsgVk9bRk5QQCm0nq1khhpb0Gcy1fl3IFZHV0YVKDCfa03nWeOgqdoSrODc9Lz1BGgp8qX1AWJputGrgAJz1bXd2VaBiEVDUJ2J5EpvDMTStaNnogJHeFmvuiSrB2gStYRtgZhQMJqnKWD0rCttsfd7AbPSioYQgFgFURnyQwHnW8ZUq4FZqnIr/YBYQTEZ6lKBDreNshQYxvf9v6+He298khUAYsnS0fGeAsBLmBvj+JWnmULNFs2BWLp29LxSYL4qMczXJLa4Se9Nf7aYiY4CsUTh6MbWsUoOsMUUywrExJLRYakAW8cq+UBVJpAViAnEoinV16Y5QFUWJTcQi5KJRtcKUIFtlBOA7KnQQOypRDS42D5yeN8iIdhePlAdiLVISaNzUn01No6rGKsGALHGeWllegCmxCm2lzdGADEluak5DACmzB1AdmEIEFOWn9rCAWDaHDnGA8jOxgAxpTmqIayXt/0vbt9rcOJODIBsFgaIKc7RlqFRgbVUXzA3IANignTppikAM2Z15yCjEjOWr7XDBWC1Fa40fscgA2KVcsrisADMomuLmDsFGRAznrelwj++Rmc6yOdjWYEOL8QCMcsJWyh2AFZISCXD7P976ernuqvFKskxVWEAMFV2lAmms20lECuTNmZH4S6YWeseB94RyICY0xyOWRYH+TEqGW7TCciAmOEczQmdbWSOenb69nA+BsTs5GPRSNlGFpVT72AdVGNATG/6VYuMbWQ1aXUO7BxkQExn2lWN6uVtP1adgMHVKeB5WwnE1KVb3YDYRtbVV+3ojqsxIKY268oHxmF+eU0tjei1GgNilrIwM1a2kZkCWu/utBoDYtYTMzJ+tpGRQnlv5hBkQMx70h7XRxXWidHPl7nb//fy9XkzOy2AmB2vkiPlSkWydD47OqvGgJjPNL1YFVVYByZLlgjEJGrRtrUCPJFs7YDS+R2BjEpMSY7NsDl+9j9fd6XC4kC/lJLOxgFizgzdYDnzudTpMw6fj//3DK4HIRyANoy/w9+wkwCOKmwDYy1P4QRkVGIVk/AMrnH4XniaXQzUqMIKq+5tOCDmzdH89cyVz6fwJRwqrZgqK3/SEFaBRhVWQlr/Y3i4xU8lVihPlVxj2IVxfJ+2nFRhhYz1PoyDagyIZSapEnhdr2I6R9uqEsxUkO5NFQBiTeVvOrlSeDXVhMltKmB9S0klJsw74CUUjOb6FTBejQExQYoBMIFYNLWkgOnvUwKxyFTjoDxSKJqZVMDylhKIPUk5riqY/JkkaKkChreUQOyB2WwfpT8JtDerABAza93dwAGYP09Z0WMFrG4pqcRWfGULyY97jwoAMSeuAzAnRrIMuQJGt5RUYldW8xRSnvv0cKIAELNvJACz7yEryFLA5H0xKrGj5xzkZyU/nZ0oYPFcDIiFEDgHc/ITyDKyFQBi2RK2GYBtZBvdmVWhAuP4VfL2YA0r6L4SYxupIQ2JQY0CBg/3gdjbflSTQASCAq0VAGKtHZDNTxUm04vWHSgAxOyYzGG+Ha+IdFMFzF2z6HY7yWH+pj8YTGZHASBmwSuqMAsuEWMjBYBYI+FF0wIxkVw07kwBa3fFutxOspXs7KeS5YoUAGIiudo0fuFaRRvhmdWEAkBMuU1sJZUbRHjNFQBizS14HABbSeUGEV5zBYBYcwueQowb+so9Iry2CgCxtvo/nJ2tpGJzCE2NAkBMjRW3gQAxxeYQmhoFgJgaK1Yg9u3PjzAO3xWHSGgo0FoBLru2duDR/HzhW7M7xKZEASCmxIjVMHgyqdkdYlOiABBTYgQQ02wEsWlWAIhpdodKTLM7xKZCAd4npsKGu0HwdSPd/hCdAgV4x35bE+YrFNPnUzj87/IzDp9DWPnvbUNmdhTQpQAQ286P+Unj9DnAafrcgmu7cJgJBVwoYO2O2CS6mVfxXEELYLn4kWERShXYhXF8t/Kn21RDbAEuLqgqzXbCcq+AeqCpgxjgcv9DwQLtKqASaGogxm16u5lN5B0qoOgqRnOIAa8OfwBYshcFVFRmzSAGvLzkMetAgdAUZptD7Agv7myR+SjgT4EmMNsUYlRf/rKWFaHAigKbwmwTiAEvEh0FOlRgo8P/6hADYB0mL0tGgZMCG4CsGsSOr4KeLqlyu56URoG+Fai6vawCMaqvvjOW1aPAqgKVqrLiEANgJDAKoMBdBSqArCjEABjJiwIoEKFA0bfHFoMYAIuwjiYogAInBYqBrAjEeO0zmYkCKJCgQBGQZUMMgCVYRxcUQIFiFVkWxNhCkokogALZCmQe9idDDIBlW8cAKIACJwUyQJYEMQBG7qEAChRXIBFkYogdb+L/Kr4ABkQBFECBBJDJIfa2H1EaBVAABaopIASZCGI8iaxmGwOjAAosFJD86bhoiHEORo6hAApspoCgGouCGOdgm1nHRCiAAsInlnEQe9tPB/m8Uof0kiswjO/hb9jNHYeBVzPJFey6R8y28inE2EZ2nUM5i1/9Sgn5lCNph30jtpUPIcY2ssOkKbTkR79BAVkhkXsZ5gnIHkOMbWQvaVJ2neP4df/z9bCFvPMBZGUl9z7ao1+KdyFGFeY9LSqtLwJgp5m5slPJA4/DPqjG7kOMKsxjKtRdU8T5xXUAL1yeruuJo9HvVWOrEKMKc+T8VktJANgUGrm2lUEO5rmTY+sQowpz4PiGS0gE2Hlb+c+fL2EY+D7uhpaZnCoWYvxmNGlvu6AzAXYG2bc/P8I43yPjgwL3FVjJt5tKjMNWMkigQJHXCwMygeK9N42EGG+p6D1R4tZfFGCALE50WoVwfcB/UYmxlSRFohUQXKWIHvPYkDtkUsU6a39VjV1CjAP9zrIhcbkVAXauyMjFRHP66Lasxq4hxlayjxxIX+UGAANk6fZ003ORh2eIsZXsxv70hRZ6EikJgMuwErU6arvIxQ+IUb53lAEJS20AsClKfrkmeNVHl/ODpSXE2Er2Yb58lY0AxhNLuVU99Tidi80Q47ddT9aL11rlKoU0Cp5YShXroP3xlysQ68DrjCWqABgVWYaDnrteQIzzMM9Wp65NFcAAWaqNrvvNOXqoxICYa6eTFrfhVQppfGwtpYr5bT+di50gxqG+X5/lK1MMsHNFxi9eua8eewzj+8ChvkdnM9bU+EmkJHJ2EBK1nLYFYk6NTV2WIYDNxyC8hyzVaT/9ZojxHic/huasxBjAzttKQJbjuv2+M8Q4W7BvZO4KjAKMJ5a5xrvovwNiLnzMWoTKqxTSFbGjkCrmpj0Qc2Nl2kJcAIyKLM18L72oxLw4mbIOA1cppMuiIpMqZr/9BDHuiNn3Ub4ChwCjIpOngYceQMyDi9I1OAbYGWQ8sJJmhdn2QMysdYmBG38SKVk1uwyJWnbbAjG73skj7whgkzhchpWniMUeQMyiaykxdwaw87aSy7Ap2WKqD08nTdmVHKyrqxRSFXhiKVXMVnsgZsuvlGi7BhhPLFNSxlYfIGbLL2m0AGyhGBWZNH1stAdiNnxKi7KDqxRSYQCZVDH97XmLhX6P0iIEYHd146UHaSmltNcOiCl1JissAPZUPkD2VCIrDXa82dWKVbFxdnqVIlaeZTsuw6aopqzP9D6xKSTMVGZMajgATKQcl2FFculsPI7nv3bEl8B1WiSJiieRErWObTnoTxBNU5cFxH6FEL5oio1YhApwDiYU7KM5IEuWrnnHjz/Zxnv2m5uRGQBVWIaAQCxDvLZdF388l++XtbWiwOzTb6QCw3Q5BBAzavvxDPic+BzuGzXyFDbbyWQDuW6RLF3bjsecX0KMc7G2luTPDsjEGlKFiSVT0+G0+/iAGOdiaszJDGSX1X8c3/c/X/PGyAogrvMMn+kzDp/jeqy24mFWhniNu57PgT8gxrlYY09UTa/6QQHVk6pcaRPMYtdxcRjM2UAbP1TOqvTiLBdUVWbL5kEtH2RdQowt5eZmqJ0QiKm1hsDCxU7h5rE8TylJkaMCKreUVGLkZ7h6gHULMaoxsuSgABAjE1QqcH0nEoiptElFUEBMhQ0EcaXATV6u3vJmS0niUImRAyoVWLkLuQ4xtpQq/ds4KCqxjQVnuqcKrObk3e/bUY09FdR7AyDm3WFr67vzjZT7EKMas2Zx6XiBWGlFGS9Hgbv5+PDNB1RjOZqb7wvEzFvoaAEPvhf8GGJUY46yQLwUICaWjA5VFHhy8frpO6j4nloVWywMCsQsuOQ/xqd5+BRik0ZsK/1nysoKnyZPC1W4sd9C9YZzRrxeKg5ibCsbuthsaiDWTHomPioQlYNREJurMUDWW2ZFJdDWolCJba14u/liX7keDTG2le3MbDQzEGskPNNOL7scv8a+nFMGMaqxnvILiPXktqa1Cl8DJYIY20pNTlePBYhVl5gJSjxQEkMMkHWTeECsG6v1LDT2HGwZcRLEjudj/HUkPd7XiASI1VCVMe8rIDgHKwIxQOY+G4GYe4sVLTARYNMKkiuxGWL8hSRFWVA8FCBWXFIGXFVAeJB/PUYWxACZ66QEYq7tVbK4TIBlV2InGajIlCRE2TCAWFk9Ge2mhBrf9/++Hv4IcsYnuxK7Atn3EAJ/VTnDEEVdgZgiM9yFUqACO2lSDGJnmL3teWrpI+OAmA8f9a0i4xB/bTHFITafkwEyfYkjjwiIyTWjx2MFdmEc32O/ThQrZhWIzSDjK0qxHmhtB8S0OmMxroLbx5ujtZp6HA/8OSerKXK9sYFYPW37GrkiwCYhq1ViS5fYXprMWSBm0jZVQVfZPm5aiV2A7HAxlqpMVY49DAaI2fFKX6SVq6/lgjepxC5gxlmZvoRbjwiIWXFKU5wbwuu07M0hNh/6U5VpSrt7sQAxCy5pirEBwDY7E7unMzDTlIE3sQAx1fYoCq4RvJpWYtfyAzNFCfkRChBTaYuioBrDSxXETsEAM0UJGgIQU2WHkmCG8X2KpMR3HkutqMmZWEzwAC1GpaptgFhVeU0NvgvD+FsTuJbqqYXYMkiA1iThgVgT2dVMqhpc5iB2A7T5kcR852z68NaMOnkPxOroqnXUGVrhb9iV/m5j7QWbqMSeiTBXatPnU/gSxuHzSntA90zE238HYnLNWvTYXU26lusfbSZQnT4GgbUm8P/6C+VmwqlgeQAAAABJRU5ErkJggg==",ut=n(47257),Fe=n.n(ut),G=n(79633),We=n(57193),ye=n(1012),Se=n(63949),J=n(9931),F=n(59301),me=Object.defineProperty,st=Object.defineProperties,Ie=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,Tt=Object.prototype.hasOwnProperty,Yt=Object.prototype.propertyIsEnumerable,Xt=(Me,Qe,ve)=>Qe in Me?me(Me,Qe,{enumerable:!0,configurable:!0,writable:!0,value:ve}):Me[Qe]=ve,_t=(Me,Qe)=>{for(var ve in Qe||(Qe={}))Tt.call(Qe,ve)&&Xt(Me,ve,Qe[ve]);if(W)for(var ve of W(Qe))Yt.call(Qe,ve)&&Xt(Me,ve,Qe[ve]);return Me},Ut=(Me,Qe)=>st(Me,Ie(Qe)),ce=(Me,Qe,ve)=>new Promise((ge,we)=>{var se=j=>{try{Ze(ve.next(j))}catch(ie){we(ie)}},ke=j=>{try{Ze(ve.throw(j))}catch(ie){we(ie)}},Ze=j=>j.done?ge(j.value):Promise.resolve(j.value).then(se,ke);Ze((ve=ve.apply(Me,Qe)).next())});const{Dragger:_}=E.default,X=Me=>{const Qe=ie=>ie&&ie.substring(0,ie.lastIndexOf("."));for(var ve=[...Me],ge=0,we=[],se=0;se