diff --git a/layouts__index.async.js b/layouts__index.async.js index d06de6e3e1..d1269006f1 100644 --- a/layouts__index.async.js +++ b/layouts__index.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[41717],{88289:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(82871),i=n(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},s=n(68475),o=function(e,t){return i.createElement(s.Z,(0,r.Z)({},e,{ref:t,icon:a}))};var l=i.forwardRef(o)},29624:function(e,t,n){n.r(t),n.d(t,{default:function(){return Je}});var r=n(7557),i=n.n(r),a=n(82242),s=n.n(a),o=n(41498),l=n.n(o),c=n(79800),u=n.n(c),d=n(39647),p=n.n(d),m=n(59301),g=n(92736),h=n(43418),f=n(81863),x=n(78836),j=n(78241),y=n(8591),b=n(98135),w=n(24905),v=n(3113),M=n(1434),I=n(14834),S=n(51973),N="login-panel-wrapper2___HuMNJ",k="login-panel-right-wrp___vWD_i",L="res-error-values___hV1lz",T="tabs___EwOAX",Z=n(37712),z={height:48,borderRadius:4},P=(0,x.connect)((function(e){var t=e.user,n=e.loading;return{user:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t=e.dispatch,n=e.setType,r=e.user,a=e.setusername,o=j.Z.useForm(),c=u()(o,1)[0],d=(0,x.useSearchParams)(),p=u()(d,1)[0],g=(0,x.useLocation)(),h=(0,m.useState)(""),f=u()(h,2),N=f[0],k=f[1],T=(0,m.useState)([]),P=u()(T,2),C=P[0],_=P[1],A=(0,m.useState)({}),E=u()(A,2),D=E[0],O=E[1],F=(0,m.useState)(!1),Y=u()(F,2),$=Y[0],B=Y[1],Q=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,q=function(){var e=l()(i()().mark((function e(n){var r,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!1),Q.test(n.password)||(a(n.login),k("系统检测您的密码强度过低,请及时修改")),O(s()({},n)),e.next=5,(0,M.Es)(n);case 5:if(!(r=e.sent).status){e.next=19;break}if(-4!==r.status){e.next=13;break}return t({type:"user/showPopLogin",payload:{showPopLogin:!1}}),t({type:"user/setBindAccountModal",payload:{bindAccountModalVisible:!0,userInfoForBindAccountModal:r.user,loginInfo:n}}),e.abrupt("return");case 13:if(-5!==r.status){e.next=17;break}return _([null==r?void 0:r.message]),B(!0),e.abrupt("return");case 17:return k(null==r?void 0:r.message),e.abrupt("return");case 19:if(null!=r&&r.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),"/user/login"!==g.pathname&&"/login"!==g.pathname){e.next=35;break}if(!(o=p.get("form")||p.get("back_url"))){e.next=26;break}window.location.href=decodeURIComponent(o),e.next=33;break;case 26:if(Q.test(n.password)){e.next=31;break}y.ZP.info("系统检测您的密码强度过低,请及时修改"),window.location.href="/account/secure",e.next=33;break;case 31:return window.location.reload(),e.abrupt("return");case 33:e.next=43;break;case 35:if(Q.test(n.password)){e.next=41;break}y.ZP.info("系统检测您的密码强度过低,请及时修改"),window.location.href="/account/secure?active=3",t({type:"user/showPopLogin",payload:{showPopLogin:!1}}),e.next=43;break;case 41:return window.location.reload(),e.abrupt("return");case 43:c.resetFields();case 44:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(j.Z,{layout:"vertical",form:c,initialValues:{autologin:!0,login:r.actionTabs.phone},onFinish:q,onValuesChange:function(e){k("");if("password"in e){var t=e.password.replace(/[\u4e00-\u9fa5]/g,"");c.setFieldsValue({password:t})}},children:[!!N&&(0,Z.jsxs)("div",{className:L,children:[(0,Z.jsx)("span",{children:N}),(0,Z.jsx)(I.Z,{onClick:function(){return k("")}})]}),(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入用户名、手机号或邮箱"}],children:(0,Z.jsx)(b.Z,{style:z,size:"middle",placeholder:"请输入有效的手机号/邮箱号/账号",onBlur:function(){t({type:"user/setActionTabs",payload:{phone:c.getFieldValue("login")}})}})}),(0,Z.jsx)(j.Z.Item,{name:"password",rules:[{required:!0,message:"请输入8-16位密码,区分大小写、不能使用空格"}],children:(0,Z.jsx)(b.Z.Password,{style:z,size:"middle",placeholder:"密码"})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)("div",{className:"flex-container",style:{justifyContent:"space-between"},children:[(0,Z.jsx)(j.Z.Item,{name:"autologin",noStyle:!0,valuePropName:"checked",children:(0,Z.jsx)(w.Z,{children:"下次自动登录"})}),(0,Z.jsx)("div",{children:(0,Z.jsx)("span",{className:"current font14 c-blue",onClick:function(){return n(4)},children:"找回密码"})})]})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsx)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,className:"font16",style:z,children:"登录"})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]}),(0,Z.jsx)(S.Z,{open:$,data:C,accountInfo:s()({},D)})]})})),C=n(69901),_={height:48,borderRadius:4},A=/(^(1[0-9])\d{9}$)/i,E={timer:0},D=function(e){return e[e.setTimer=0]="setTimer",e}(D||{});function O(e,t){if(t.type===D.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var F=(0,x.connect)((function(e){return{globalSetting:e.globalSetting,user:e.user}}))((function(e){var t,n=e.user,r=e.dispatch,a=e.validateName,s=e.getCode,o=e.register,c=e.style,d=void 0===c?{}:c,p=e.buttonText,g=void 0===p?"注册":p,h=e.globalSetting,f=j.Z.useForm(),x=u()(f,1)[0],y=(0,m.useReducer)(O,E),M=u()(y,2),I=M[0],S=M[1],N=(0,m.useState)(!1),k=u()(N,2),L=k[0],T=k[1],z=I.timer,P=(0,m.useState)(!1),F=u()(P,2),Y=F[0];F[1];function $(){return $=l()(i()().mark((function e(t){var n,r,a,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.login,t.password,r=t.code,e.next=3,o({login:n,code:r});case 3:if(a=e.sent,s=a.message,!(a.status<0)){e.next=9;break}return x.setFields([{name:"code",errors:[s]}]),e.abrupt("return");case 9:window.location.reload();case 10:case"end":return e.stop()}}),e)}))),$.apply(this,arguments)}function B(){return(B=l()(i()().mark((function e(){var t,n,r,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.getFieldValue("login"),n=0,A.test(t)&&!(t.indexOf(" ")>-1)){e.next=6;break}return x.setFields([{name:"login",errors:["请输入正确的手机号"]}]),n=1,e.abrupt("return",n);case 6:return e.next=8,a({login:t,type:1});case 8:return r=e.sent,s=r.status,r.message,s<0?n=2:(x.setFields([{name:"login",errors:["该手机号码不存在,请先注册"]}]),n=1),e.abrupt("return",n);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}console.log("dispatchs:",S);var Q=function(){var e=l()(i()().mark((function e(){var t,n,r,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.getFieldValue("login"),A.test(t)){e.next=5;break}x.validateFields(["login"]),e.next=20;break;case 5:return e.next=7,a({login:t,type:1});case 7:if(!((null==(n=e.sent)?void 0:n.status)>0)){e.next=11;break}return x.setFields([{name:"login",errors:["该手机号码不存在,请先注册"]}]),e.abrupt("return");case 11:return T(!0),e.next=14,s({login:t,type:6,smscode:(0,C.M)(t)});case 14:r=e.sent,o=r.status,l=r.message,o<0&&x.setFields([{name:"code",errors:[l]}]),S({type:D.setTimer,payload:60}),T(!1);case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){z>0&&setTimeout((function(){S({type:D.setTimer,payload:z-1})}),1e3)}),[z]);return(0,Z.jsxs)(j.Z,{layout:"vertical",form:x,style:d,initialValues:{autologin:!0,protool:!1,login:n.actionTabs.phone},onFinish:function(e){return $.apply(this,arguments)},children:[(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入正确的手机号"},{validator:function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("请输入正确的手机号"):A.test(t)?Promise.resolve():Promise.reject("请输入正确的手机号"):Promise.resolve()}}],children:(0,Z.jsx)(b.Z,{style:_,autoComplete:"new-login",size:"middle",placeholder:"请输入有效的手机号",maxLength:11,onBlur:function(){!function(){B.apply(this,arguments)}(),r({type:"user/setActionTabs",payload:{phone:x.getFieldValue("login")}})},onChange:function(){return x.setFieldsValue({verify:0})}})}),!(null!=h&&null!==(t=h.setting)&&void 0!==t&&t.is_local)&&(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(b.Z,{suffix:(0,Z.jsxs)(v.ZP,{loading:L,type:"link",onClick:Q,disabled:z>0||Y,children:[" ",0===z?"获取验证码":"".concat(z,"秒可重新获取")]}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsx)("div",{className:"flex-container",style:{justifyContent:"space-between"},children:(0,Z.jsx)(j.Z.Item,{name:"autologin",noStyle:!0,valuePropName:"checked",children:(0,Z.jsx)(w.Z,{children:"下次自动登录"})})})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:_,className:"font16",children:[" ",g," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),Y=n(6848),$={height:48},B=/(\b[\w\.-]+@[\w\.-]+\.\w{2,4}\b)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$)/i,Q=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,q={timer:0},G=function(e){return e[e.setTimer=0]="setTimer",e}(G||{});function U(e,t){if(t.type===G.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var V=(0,x.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){var t,n=e.validateName,r=e.getCode,a=e.register,s=e.style,o=void 0===s?{}:s,c=e.buttonText,d=void 0===c?"注册":c,p=e.globalSetting,g=j.Z.useForm(),h=u()(g,1)[0],f=(0,m.useReducer)(U,q),x=u()(f,2),y=x[0],w=x[1],M=(0,m.useState)(!1),I=u()(M,2),S=I[0],N=I[1],k=y.timer;function L(){return L=l()(i()().mark((function e(t){var n,r,s,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.login,r=t.password,s=t.code,e.next=3,a({login:n,password:r,code:s});case 3:if(o=e.sent,l=o.message,!(o.status<0)){e.next=9;break}return h.setFields([{name:"code",errors:[l]}]),e.abrupt("return");case 9:window.location.reload();case 10:case"end":return e.stop()}}),e)}))),L.apply(this,arguments)}function T(){return z.apply(this,arguments)}function z(){return z=l()(i()().mark((function e(){var t,r,a,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.getFieldValue("login"),r=0,B.test(t)&&!(t.indexOf(" ")>-1)){e.next=6;break}return h.setFields([{name:"login",errors:["请输入正确的手机号或邮箱"]}]),r=1,e.abrupt("return",r);case 6:return e.next=8,n({login:t,type:1});case 8:return a=e.sent,s=a.status,o=a.message,s>0?r=2:(h.setFields([{name:"login",errors:[o]}]),r=1),e.abrupt("return",r);case 14:case"end":return e.stop()}}),e)}))),z.apply(this,arguments)}var P=function(){var e=l()(i()().mark((function e(){var t,a,s,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.getFieldValue("verify"),t=h.getFieldValue("login")){e.next=6;break}h.validateFields(["login"]),e.next=21;break;case 6:return e.next=8,n({login:t,type:1});case 8:if(1===(null==(a=e.sent)?void 0:a.status)){e.next=12;break}return h.setFields([{name:"login",errors:[null==a?void 0:a.message]}]),e.abrupt("return");case 12:return N(!0),e.next=15,r({login:t,type:1,smscode:(0,C.M)(t)});case 15:s=e.sent,o=s.status,l=s.message,o<0&&h.setFields([{name:"code",errors:[l]}]),w({type:G.setTimer,payload:60}),N(!1);case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){k>0&&setTimeout((function(){w({type:G.setTimer,payload:k-1})}),1e3)}),[k]);return(0,Z.jsxs)(j.Z,{layout:"vertical",form:h,style:o,initialValues:{autologin:!0,protool:!1},onFinish:function(e){return L.apply(this,arguments)},children:[(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入正确的手机号或邮箱"},{validator:function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("请输入正确的手机号或邮箱"):B.test(t)?Promise.resolve():Promise.reject("请输入正确的手机号或邮箱"):Promise.resolve()}}],children:(0,Z.jsx)(b.Z,{style:$,autoComplete:"new-login",size:"middle",placeholder:"请输入有效的手机号/邮箱号",onBlur:function(){return T},onChange:function(){return h.setFieldsValue({verify:0})}})}),!(null!=p&&null!==(t=p.setting)&&void 0!==t&&t.is_local)&&(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(b.Z,{suffix:(0,Z.jsxs)(v.ZP,{loading:S,type:"link",onClick:P,disabled:k>0,children:[" ",0===k?"获取验证码":"".concat(k,"秒可重新获取")]}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"password",rules:[{required:!0,message:"请输入8-16位密码,区分大小写、不能使用空格"},{validator:function(e,t){if(!t)return Promise.resolve();if(!Q.test(t))return Promise.reject("请输入8~16位字符,字母、数字和特殊符号至少包含2种");if(t.indexOf(" ")>-1)return Promise.reject("请输入8-16位密码,区分大小写、不能使用空格");var n=t.length;return n>=8&&n<=16?Promise.resolve():Promise.reject("请输入8-16位密码,区分大小写、不能使用空格")}}],children:(0,Z.jsx)(b.Z.Password,{autoComplete:"new-password",style:$,size:"middle",placeholder:"请输入8~16位字符,字母、数字和特殊符号至少包含2种"})})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:$,className:"font16",children:[" ",d," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:35},children:["注册并登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),W=n(89392),R={height:48},H=/(\b[\w\.-]+@[\w\.-]+\.\w{2,4}\b)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$)/i,J=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,X={timer:0},K=function(e){return e[e.setTimer=0]="setTimer",e}(K||{});function ee(e,t){if(t.type===K.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var te=(0,x.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){var t,n=e.validateName,r=e.getCode,a=e.register,s=e.style,o=void 0===s?{}:s,c=e.buttonText,d=void 0===c?"注册":c,p=e.globalSetting,g=j.Z.useForm(),h=u()(g,1)[0],f=(0,m.useReducer)(ee,X),x=u()(f,2),y=x[0],w=x[1],M=(0,m.useState)(!1),I=u()(M,2),S=I[0],N=I[1],k=y.timer;function L(){return L=l()(i()().mark((function e(t){var n,r,s,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.login,r=t.new_password,s=t.code,e.next=3,a({login:n,new_password:r,code:s});case 3:if(o=e.sent,l=o.message,!(o.status<0)){e.next=9;break}return h.setFields([{name:"code",errors:[l]}]),e.abrupt("return");case 9:location.reload();case 10:case"end":return e.stop()}}),e)}))),L.apply(this,arguments)}var T=function(){var e=l()(i()().mark((function e(){var t,n,a,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.getFieldValue("verify"),t=h.getFieldValue("login"),e.next=4,h.validateFields(["login"]);case 4:if(t){e.next=8;break}h.validateFields(["login"]),e.next=17;break;case 8:return N(!0),e.next=11,r({login:t,type:2,smscode:(0,C.M)(t)});case 11:n=e.sent,a=n.status,s=n.message,a<0&&h.setFields([{name:"code",errors:[s]}]),w({type:K.setTimer,payload:60}),N(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){k>0&&setTimeout((function(){w({type:K.setTimer,payload:k-1})}),1e3)}),[k]);var z=function(){var e=l()(i()().mark((function e(t,r){var a,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:if(!(r.indexOf(" ")>-1)){e.next=4;break}return e.abrupt("return",Promise.reject("请输入正确的手机号或邮箱"));case 4:if(!H.test(r)){e.next=18;break}return e.next=7,n({login:r,type:2});case 7:if(a=e.sent,s=a.status,o=a.message,!(s>0)){e.next=15;break}return e.abrupt("return",Promise.resolve());case 15:return e.abrupt("return",Promise.reject(o));case 16:e.next=19;break;case 18:return e.abrupt("return",Promise.reject("请输入正确的手机号或邮箱"));case 19:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,Z.jsxs)(j.Z,{layout:"vertical",form:h,style:o,initialValues:{autologin:!0,protool:!1},onFinish:(0,W.throttle)((function(e){return L.apply(this,arguments)}),2e3),children:[(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入正确的手机号或邮箱"},{validator:(0,W.throttle)(z,400)}],children:(0,Z.jsx)(b.Z,{style:R,autoComplete:"new-login",size:"middle",placeholder:"请输入有效的手机号/邮箱号",onChange:function(){return h.setFieldsValue({verify:0})}})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"new_password",rules:[{required:!0,message:"请输入8-16位新密码,区分大小写、不能使用空格"},{validator:function(e,t){if(!t)return Promise.resolve();if(!J.test(t))return Promise.reject("请输入8~16位字符,字母、数字和特殊符号至少包含2种");if(t.indexOf(" ")>-1)return Promise.reject("请输入8-16位新密码,区分大小写、不能使用空格");var n=t.length;return n>=8&&n<=16?Promise.resolve():Promise.reject("请输入8-16位新密码,区分大小写、不能使用空格")}}],children:(0,Z.jsx)(b.Z.Password,{autoComplete:"new-password",style:R,size:"middle",placeholder:"输入8~16位新密码,区分大小写"})})}),!(null!=p&&null!==(t=p.setting)&&void 0!==t&&t.is_local)&&(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(b.Z,{suffix:(0,Z.jsxs)(v.ZP,{loading:S,type:"link",onClick:T,disabled:k>0,children:[" ",0===k?"获取验证码":"".concat(k,"秒可重新获取")]}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:R,className:"font16",children:[" ",d," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["修改并登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})}));Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var ne="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgNjYgNjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY2IDY2IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGU+LnN0MXtmaWxsOiMwMGI5MTN9PC9zdHlsZT48ZyBpZD0i6aG16Z2iLTEiPjxnIGlkPSLnmbvlvZVfeDJGX+azqOWGjCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwODEgLTM4MCkiPjxnIGlkPSLnvJbnu4QtMTjlpIfku70iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwNjMgMjM4KSI+PGcgaWQ9Iue8lue7hC0xMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTggMTQyKSI+PGcgaWQ9Iue8lue7hC0xMCI+PGNpcmNsZSBpZD0i5qSt5ZyG5b2iIiBjeD0iMzMiIGN5PSIzMyIgcj0iMzMiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiNjNmY0YzkiLz48ZyBpZD0i57yW57uEIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiAxNS40MjkpIj48cGF0aCBpZD0i6Lev5b6EIiBjbGFzcz0ic3QxIiBkPSJNMTYuMyAyMi44YzAtNi42IDYtMTIuMSAxMy43LTEyLjFoLjRDMjkuMSA0LjYgMjIuNyAwIDE1LjQgMCA3LjIgMCAuNCA1LjguNCAxMy4xYzAgNC4zIDIuMiA3LjcgNiAxMC41bC0xLjUgNC43IDUuMi0yLjdjMS43LjQgMy41LjcgNS4zLjguNSAwIC45IDAgMS40LS4xbC4xLS4xYy0uNC0xLjEtLjYtMi4zLS42LTMuNHoiLz48cGF0aCBpZD0i6Lev5b6EXzFfIiBjbGFzcz0ic3QxIiBkPSJNNDIuNCAyMi40YzAtNi4yLTUuOC0xMS4yLTEyLjQtMTEuMi03IDAtMTIuNCA1LjEtMTIuNCAxMS4yUzIzLjEgMzMuNiAzMCAzMy42YzEuNS0uMSAzLS4zIDQuNC0uOGw0IDIuMy0xLTMuOGMyLjgtMi4zIDUtNS41IDUtOC45eiIvPjxwYXRoIGlkPSLlvaLnirYiIGQ9Ik0yMS42IDZjMS0uMSAxLjguNyAxLjkgMS43VjhjLjEgMS0uNyAxLjktMS42IDJoLS4yYy0xLjEuMS0yLjEtLjgtMi4yLTIgMC0xLjIgMS0yLjEgMi4xLTJ6TTExLjIgOS45QzEwLjEgMTAgOS4xIDkuMiA5IDhjLjEtMS4yIDEuMS0yLjEgMi4yLTIgMS0uMSAxLjguNyAxLjggMS44VjhjLjEgMS0uNyAxLjktMS42IDJoLS4yem0xNS4yIDEwLjdjLS44LS4xLTEuNC0uNy0xLjUtMS42LjEtLjguNy0xLjUgMS41LTEuNi45LS4xIDEuNy42IDEuOSAxLjYtLjIgMS0xIDEuNy0xLjkgMS42em04LjIgMGMtLjgtLjEtMS40LS43LTEuNS0xLjYuMS0uOC43LTEuNSAxLjUtMS42LjktLjEgMS43LjYgMS45IDEuNi0uMiAxLTEgMS43LTEuOSAxLjZ6IiBzdHlsZT0iZmlsbDojZmZmIi8+PC9nPjwvZz48L2c+PC9nPjwvZz48L2c+PC9zdmc+";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var re="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTUxMiAwQzIyOS4zNTYgMCAwIDIyOS4zNTYgMCA1MTJzMjI5LjM1NiA1MTIgNTEyIDUxMiA1MTItMjI5LjM1NiA1MTItNTEyUzc5NC42NDQgMCA1MTIgMHptMjM1Ljc1IDY0Ny42MDNjLTEwLjcgNS40MTctMjcuNDE3LTYuOTYzLTQzLjM0LTMwLjE1Ny02LjI2NyAyNS4yNjItMjEuNjczIDQ3Ljk1LTQzLjYwNyA2Ni4yNTMgMjMuMjQ0IDguNTA1IDM4LjEyMyAyMi4xNyAzOC4xMjMgMzcuODk4IDAgMjUuNTE5LTQwLjk5IDQ2LjQwMy05MS4zODcgNDYuNDAzLTQ1LjQzIDAtODMuMjg3LTE3LjAxNC05MC4wNzYtMzguOTI3aC0xMC45NjdDNDk5LjQ0NiA3NTEuMjQzIDQ2MS44NSA3NjggNDE2LjQyIDc2OGMtNTAuMzk2IDAtOTEuMzg3LTIwLjYyMy05MS4zODctNDYuNDAzIDAtMTUuNzI4IDE1LjE0NS0yOS4zODggMzguMTE4LTM3Ljg5OC0yMS45MjktMTguMzA0LTM3LjU5Ni00MS4yNTItNDMuNjAyLTY2LjI1My0xNS42NjcgMjMuMTk0LTMyLjYzNCAzNS44My00My4zNCAzMC4xNTctMTUuNjY4LTcuOTg3LTEyLjUzNC01MS4wNDYgNy4wNS05Ni4xNTkgMTUuMTQ1LTM1LjMxNyAzNi4wMy02MS42MTQgNTEuNjk3LTY3LjI4Ny0uMjYyLTIuMzE5LS4yNjItNC42MzgtLjI2Mi02LjcwNyAwLTEzLjY2IDMuOTE3LTI2LjI5MSAxMC40NDUtMzYuNjA4di0yLjMxNGMwLTYuMTkgMS41NjctMTIuMTE5IDQuMTc4LTE3LjI3NUMzNTMuMjMgMzI5LjIxNiA0MTQuMDcgMjU2IDUxMi4yNDEgMjU2czE1OS4wMDYgNzMuMjE2IDE2Mi45MjMgMTY1LjI1M2EzOC4zNzQgMzguMzc0IDAgMCAxIDQuMTc4IDE3LjI3NXYyLjMyYzYuNTI4IDEwLjMxMSAxMC40NDUgMjIuOTQyIDEwLjQ0NSAzNi42MDcgMCAyLjMyIDAgNC42NC0uMjYxIDYuNzAyIDE1LjkyMyA1LjY3MyAzNi41NTcgMzEuOTcgNTEuNjk2IDY3LjI4NyAxOS4wNjIgNDUuMTE4IDIyLjE5NiA4OC4xNjcgNi41MjggOTYuMTZ6IiBmaWxsPSIjMzc4QUZFIi8+PC9zdmc+",ie="other-login___Jd48Z",ae="wechat-qrcode___bLWkh",se="driver___IuicK",oe=n(47162),le=window.location.host,ce=oe.Z.QQLoginCB,ue=function(e){var t=e.onWechatLogin,n=e.setType,r=e.loginType;function i(){return(0,C.b9)()?"https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=".concat(ce,"%2fotherloginqq&state=null,").concat(le,"&response_type=code"):"https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=".concat(ce,"%2fotherloginqq&state=null,").concat(le,"&response_type=code")}return(0,Z.jsxs)(Z.Fragment,{children:[(1===r||2===r)&&(0,Z.jsxs)("div",{style:{marginTop:4===r?20:92,marginBottom:60},className:"font16 tc",children:["没有账号?",(0,Z.jsx)("span",{onClick:function(){return n(3)},className:"c-blue current",children:"免费注册"})]}),(3===r||4===r||5===r)&&(0,Z.jsxs)("div",{style:{marginTop:92,marginBottom:60},className:"font16 tc",children:["已有账号?",(0,Z.jsx)("span",{onClick:function(){return n(1)},className:"c-blue current",children:"立即登录"})]}),(0,Z.jsx)("p",{className:se,children:(0,Z.jsx)("span",{style:{color:"#444444"},children:"快速登录"})}),(0,Z.jsxs)("div",{className:ie,children:[(0,C.s2)()&&(0,C.IS)()&&(0,Z.jsx)("a",{title:"微信登录",style:{margin:0},onClick:t,children:(0,Z.jsx)("img",{src:ne,alt:"微信",width:66})}),(0,C.s2)()&&!(0,C.IS)()&&(0,Z.jsx)("a",{title:"qq登录",rel:"noreferrer noopener nofollow",style:{margin:0},href:i(),children:(0,Z.jsx)("img",{src:re,alt:"QQ",width:66})}),(0,C.b9)()&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("a",{title:"微信登录",style:{marginRight:(0,C.IS)()?0:40},onClick:t,children:(0,Z.jsx)("img",{src:ne,alt:"微信",width:66})}),!(0,C.IS)()&&(0,Z.jsx)("a",{title:"qq登录",href:i(),children:(0,Z.jsx)("img",{src:re,alt:"QQ",width:66})})]})]})]})};function de(e){e.onBack;var t=e.setType;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{style:{overflow:"hidden",width:300,height:300,margin:"20px auto 0 auto"},children:(0,Z.jsx)("iframe",{className:ae,frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-top-navigation",scrolling:"no",src:"https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=".concat(ce,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,").concat(le,"#wechat_redirect")})}),(0,Z.jsx)("div",{style:{marginTop:17,marginBottom:10},className:"font16 bold tc c-blue current",children:(0,Z.jsx)("span",{onClick:function(){return t(1)},style:{borderBottom:"2px solid #0152d9"},children:"返回账号登录"})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:14,paddingBottom:40},children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})}var pe={height:48},me=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,ge={timer:0},he=function(e){return e[e.setTimer=0]="setTimer",e}(he||{});function fe(e,t){if(t.type===he.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var xe=(0,x.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){e.validateName,e.getCode;var t=e.register,n=e.style,r=void 0===n?{}:n,a=e.buttonText,s=void 0===a?"注册":a,o=(e.globalSetting,j.Z.useForm()),c=u()(o,1)[0],d=(0,m.useReducer)(fe,ge),p=u()(d,2),g=p[0],h=p[1],f=(0,m.useState)(!1),x=u()(f,2),y=(x[0],x[1],g.timer);function w(){return w=l()(i()().mark((function e(n){var r,a,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.old_password,a=n.newPassword,e.next=3,t({old_password:r,newPassword:a});case 3:if(s=e.sent,o=s.message,!(s.status<0)){e.next=9;break}return c.setFields([{name:"code",errors:[o]}]),e.abrupt("return");case 9:case"end":return e.stop()}}),e)}))),w.apply(this,arguments)}return(0,m.useEffect)((function(){y>0&&setTimeout((function(){h({type:he.setTimer,payload:y-1})}),1e3)}),[y]),(0,Z.jsxs)(j.Z,{layout:"vertical",form:c,style:r,initialValues:{autologin:!0,protool:!1},onFinish:function(e){return w.apply(this,arguments)},children:[(0,Z.jsx)(j.Z.Item,{name:"old_password",rules:[{required:!0,message:"请输入8~16位密码,区分大小写"}],children:(0,Z.jsx)(b.Z,{style:pe,autoComplete:"new-login",size:"middle",type:"password",placeholder:"请输入旧密码",onChange:function(){return c.setFieldsValue({verify:0})}})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"newPassword",rules:[{required:!0,message:"请输入8-16位新密码,区分大小写、不能使用空格"},{validator:function(e,t,n){t?t.indexOf(" ")>-1?n("请输入8-16位密码,区分大小写、不能使用空格"):t.length<8||t.length>16?n("请输入8-16位字符的新密码,区分大小写!"):me.test(t)?n():n("请输入8~16位字符,字母、数字和特殊符号至少包含2种"):n("请输入8-16位字符的新密码,区分大小写!")}}],children:(0,Z.jsx)(b.Z.Password,{autoComplete:"new-password",style:pe,size:"middle",placeholder:"输入8~16位新密码,区分大小写"})})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"againPassword",rules:[{required:!0,message:"请再次输入新密码"},{validator:function(e,t,n){t!=c.getFieldsValue().newPassword?n("两次输入的新密码必须一致!"):n()}}],children:(0,Z.jsx)(b.Z.Password,{autoComplete:"new-password",style:pe,size:"middle",placeholder:"请再次输入新密码"})})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:pe,className:"font16",children:[" ",s," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["修改并登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),je=n(99313),ye=n(95237),be=n(43604),we=je.Z.TabPane,ve=function(e){e.dispatch,e.is_main_site;var t=e.is_local,n=e.style,r=void 0===n?{}:n,a=(0,m.useState)(!1),o=u()(a,2),c=(o[0],o[1]),d=(0,m.useState)("1"),p=u()(d,2),g=p[0],h=p[1],f=(0,m.useState)(1),x=u()(f,2),j=x[0],b=x[1],w=(0,m.useState)(),v=u()(w,2),I=v[0],S=v[1];function L(){b(1),c(!1)}function z(e){console.log(e),h(e)}var _,A,E,D,O={buttonText:"登 录",validateName:M.Ol,getCode:M.o1,register:(_=l()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Gq)({phone:t.login,code:t.code});case 2:if(0!==(n=e.sent).status){e.next=6;break}return null!=n&&n.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==n?void 0:n.start_date)):localStorage.removeItem("extension-modal"),e.abrupt("return","/");case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},Y={buttonText:"注册并登录",validateName:M.Ol,getCode:M.o1,register:(A=l()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.z2)(s()({},t));case 2:if(0!==(n=e.sent).status){e.next=9;break}return"1"===localStorage.getItem("addinfo")?localStorage.setItem("addinfo","2"):localStorage.setItem("registeruser","1"),localStorage.removeItem("extension-modal"),y.ZP.info("注册并登陆成功"),e.abrupt("return","/");case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},$={buttonText:"修改密码",validateName:M.Ol,getCode:M.o1,register:(E=l()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Ex)(s()({login:I},t));case 2:return n=e.sent,y.ZP.info("修改密码成功"),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)}))),function(e){return E.apply(this,arguments)})},B={buttonText:"修改并登录",validateName:M.Ol,getCode:M.o1,register:(D=l()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=l()(i()().mark((function e(n){var r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.new_password_confirmation=t.new_password,e.next=3,(0,M.c0)(s()({},t));case 3:if(0!==(r=e.sent).status){e.next=9;break}return null!=r&&r.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),y.ZP.info("修改成功"),n("/"),e.abrupt("return","/");case 9:return n(r),e.abrupt("return",r);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return D.apply(this,arguments)})},Q=(0,m.useCallback)((function(){switch(j){case 1:return(0,Z.jsxs)(je.Z,{defaultActiveKey:g,onChange:z,className:T,children:[(0,Z.jsx)(we,{tab:"账号登录",children:(0,Z.jsx)("div",{className:"mt20",children:"1"===g&&(0,Z.jsx)(P,{setusername:S,setType:b})})},"1"),(0,Z.jsx)(we,{tab:"验证码登录",children:(0,Z.jsx)("div",{className:"mt20",children:"2"===g&&(0,Z.jsx)(F,s()({},O))})},"2")]});case 2:return(0,Z.jsx)(de,{setType:b,onBack:L});case 3:return(0,Z.jsxs)("div",{className:"ml40",children:[(0,Z.jsx)("h1",{className:"font18 mb20 mt35",children:"新用户注册"}),(0,Z.jsx)(V,s()({},Y))]});case 4:return(0,Z.jsxs)("div",{className:"ml40",children:[(0,Z.jsx)("h1",{className:"font18 mb20 mt35",children:"找回密码"}),(0,Z.jsx)(te,s()({},B))]});case 5:return(0,Z.jsxs)("div",{className:"ml40",children:[(0,Z.jsx)("h1",{className:"font18 mb20 mt35",children:"修改密码"}),(0,Z.jsx)(xe,s()({},$))]})}}),[j,g]);return(0,Z.jsx)("div",{className:N,style:r,children:(0,Z.jsxs)(ye.Z,{children:[(0,Z.jsx)(be.Z,{flex:"1",children:Q()}),(0,Z.jsx)(be.Z,{flex:"295px",className:k,children:!t&&(0,Z.jsx)(ue,{loginType:j,setType:b,onWechatLogin:function(){(0,C.s2)()||(0,C.IS)()?(0,C.Or)():(b(2),c(!0))}})})]})})},Me="popLogin___R8wQQ",Ie=(0,x.connect)((function(e){var t=e.user,n=e.loading;return{user:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t,n,r=e.user,i=e.globalSetting,a=(e.loading,e.dispatch),s=null===(t=i.setting)||void 0===t?void 0:t.main_site,o=null===(n=i.setting)||void 0===n?void 0:n.is_local;return(0,Z.jsx)(h.Z,{centered:!0,open:r.showPopLogin,footer:null,width:o?420:765,keyboard:!1,maskClosable:!1,wrapClassName:Me,closable:r.showClosable,onCancel:function(){a({type:"user/showPopLogin",payload:{showPopLogin:!1,showClosable:!1}})},children:r.showPopLogin&&(0,Z.jsx)(ve,{is_main_site:s,is_local:o})})})),Se=n(32157),Ne="popLogin___u08I8",ke="tips___U2xQw",Le=/^1\d{10}$/,Te=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/,Ze=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,ze=(0,x.connect)((function(e){var t=e.user,n=e.loading;return{user:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t=e.user,n=(e.globalSetting,e.dispatch),r=(0,x.useSearchParams)(),a=u()(r,1)[0],s={height:48,borderRadius:4},o=j.Z.useForm(),c=u()(o,1)[0],d=(0,m.useState)(60),p=u()(d,2),g=p[0],f=p[1],w=(0,m.useMemo)((function(){return g<60&&g>0}),[g]),I=(0,m.useRef)(),S=function(){var e=l()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:clearInterval(I.current),f(60),I.current=setInterval(function e(){return f((function(e){return e-1})),e}(),1e3);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=(0,m.useState)(!1),k=u()(N,2),L=k[0],T=k[1],z=(0,m.useState)(!1),P=u()(z,2),_=P[0],A=P[1];(0,m.useEffect)((function(){t.bindAccountModalVisible?A(!0):A(!1)}),[t]);var E=function(){var e=l()(i()().mark((function e(){var r,a,s,o,l,u,d,p;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.getFieldValue("userInput"),a=Le.test(r),s=Te.test(r),a||s){e.next=6;break}return y.ZP.error("请输入有效的手机号/邮箱号"),e.abrupt("return");case 6:if(T(!0),!a){e.next=20;break}return e.next=10,(0,Se.ZP)("/api/users/accounts/".concat(null===(o=t.userInfoForBindAccountModal)||void 0===o?void 0:o.login,"/valid_phone.json"),{method:"get",params:{phone:r}});case 10:if(-1!==(null==(l=e.sent)?void 0:l.status)){e.next=14;break}return T(!1),e.abrupt("return");case 14:if(null==l||!l.is_exists){e.next=18;break}return y.ZP.info("该手机号已被其它账号绑定"),T(!1),e.abrupt("return");case 18:e.next=27;break;case 20:return e.next=22,(0,Se.ZP)("/api/accounts/valid_email_and_phone",{method:"get",params:{login:r,type:1}});case 22:if(-3!==(null==(u=e.sent)?void 0:u.status)){e.next=27;break}return y.ZP.info("该邮箱已被注册"),T(!1),e.abrupt("return");case 27:return d=(0,C.M)(r),e.next=30,n({type:"account/getCode",payload:{login:r,type:a?3:4,smscode:d}});case 30:p=e.sent,T(!1),1===p.status&&(y.ZP.info("验证码已发送,请注意查收"),S());case 33:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=l()(i()().mark((function e(){var r,a,s,o,l,u,d,p;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.validateFields();case 2:if(r=c.getFieldValue("userInput"),a=c.getFieldValue("code"),s=Le.test(r),o=Te.test(r),s||o){e.next=9;break}return y.ZP.error("请输入有效的手机号/邮箱号"),e.abrupt("return");case 9:if(!s){e.next=16;break}return e.next=12,n({type:"account/bindPhone",payload:{login:null===(l=t.userInfoForBindAccountModal)||void 0===l?void 0:l.login,phone:r,code:a}});case 12:return u=e.sent,e.abrupt("return",0===u.status);case 16:return e.next=18,n({type:"account/bindEmail",payload:{login:null===(d=t.userInfoForBindAccountModal)||void 0===d?void 0:d.login,email:r,code:a}});case 18:return p=e.sent,e.abrupt("return",0===p.status);case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=l()(i()().mark((function e(){var r,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.loginInfo,Ze.test(r.password)||y.ZP.error("系统检测您的密码强度过低,请及时修改"),e.next=4,(0,M.Es)(r);case 4:if(!(s=e.sent).status){e.next=8;break}return y.ZP.error(null==s?void 0:s.message),e.abrupt("return");case 8:null!=s&&s.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==s?void 0:s.start_date)):localStorage.removeItem("extension-modal"),"/user/login"===location.pathname||"/login"===location.pathname?(o=a.get("from")||a.get("back_url"))?window.location.href=decodeURIComponent(o):Ze.test(r.password)?window.location.reload():(y.ZP.info("系统检测您的密码强度过低,请及时修改"),window.location.href="/account/secure"):Ze.test(r.password)?window.location.reload():(y.ZP.info("系统检测您的密码强度过低,请及时修改"),x.history.replace("/account/secure?active=3"),n({type:"user/setBindAccountModal",payload:{bindAccountModalVisible:!1}})),c.resetFields();case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=l()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!e.sent){e.next=6;break}return e.next=6,O();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,Z.jsxs)(h.Z,{centered:!0,open:_,footer:null,width:596,keyboard:!1,maskClosable:!0,wrapClassName:Ne,closable:!0,onCancel:function(){n({type:"user/setBindAccountModal",payload:{bindAccountModalVisible:!1}}),c.resetFields()},children:[(0,Z.jsx)("h1",{className:"font18 mb20",children:"手机号/邮箱绑定"}),(0,Z.jsxs)(j.Z,{layout:"vertical",form:c,autoComplete:"off",preserve:!1,children:[(0,Z.jsx)(j.Z.Item,{name:"userInput",rules:[{required:!0,message:"请输入正确的手机号/邮箱"},{validator:function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("请输入正确的手机号或邮箱"):Le.test(t)||Te.test(t)?Promise.resolve():Promise.reject("请输入正确的手机号或邮箱"):Promise.resolve()}}],children:(0,Z.jsx)(b.Z,{style:s,size:"middle",placeholder:"请输入有效的手机号/邮箱号"})}),(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(b.Z,{suffix:(0,Z.jsx)(v.ZP,{loading:L,type:"link",onClick:E,disabled:w,children:w?"".concat(g,"秒可重新获取"):"获取验证码"}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})})]}),(0,Z.jsx)("div",{className:ke,children:"为了账号安全性,绑定后可通过该手机号或邮箱找回密码"}),(0,Z.jsx)(v.ZP,{size:"middle",type:"primary",block:!0,style:s,className:"font16",onClick:F,children:"绑定并登录"}),(0,Z.jsxs)("div",{className:ke,children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),Pe=n(71418),Ce=n(99232),_e=n.n(Ce),Ae=n(985),Ee=n(37205),De=n.n(Ee),Oe=n(70236),Fe=n.n(Oe),Ye="wrap___q9xAc",$e="list___qjgdz",Be="name___ncYhC",Qe="tag___Paafn",qe=n(30188),Ge=function(e){Fe()(e);var t=(0,m.useState)(!1),n=u()(t,2),r=n[0],a=n[1],s=(0,m.useState)([]),o=u()(s,2),c=o[0],d=o[1],p=(0,m.useState)([]),g=u()(p,2),f=g[0],j=g[1],y=(0,m.useState)(!1),b=u()(y,2),M=b[0],I=b[1],S=(0,m.useState)(!1),N=u()(S,2),k=N[0],L=N[1],T=(0,x.useLocation)(),z=(0,x.useSearchParams)(),P=u()(z,1)[0];(0,m.useEffect)((function(){qe.Z.subscribe("pod-restrict-data",(function(e){console.log(e,"data"),a(e.identifier||!1),d(e.data_list||[]),j([]),I(!1)}))}),[]);var _=function(){var e=l()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),t=c.filter((function(e){return f.includes(e.tpi_id)})),e.next=4,(0,Se.ZP)("/api/myshixuns/batch_del_pods.json",{method:"delete",body:{del_pods:t}});case 4:0===e.sent.status&&window.location.reload(),L(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e;if(console.log(T,"location"),null===(e=T.pathname)||void 0===e||!e.includes("/challenges"))return"exercises"===P.get("type")?(window.parent.postMessage("backExercise","*"),void qe.Z.publish("pod-restrict-data",{identifier:!1,data_list:[]})):void(window.location.href="/shixuns/".concat(r,"/challenges"));window.location.href="/shixuns"};return(0,Z.jsx)(h.Z,{centered:!0,keyboard:!1,destroyOnClose:!0,open:r,title:"通知",width:"600px",footer:(0,Z.jsxs)(ye.Z,{align:"middle",justify:"center",children:[(0,Z.jsx)(w.Z,{onChange:function(e){var t;(console.log(e,222),I(e.target.checked),e.target.checked)?j(null==c||null===(t=c.filter((function(e){return!e.is_current_shixun})))||void 0===t?void 0:t.map((function(e){return e.tpi_id}))):j([])},checked:M,children:"全选"}),(0,Z.jsx)(v.ZP,{style:{marginLeft:"auto"},onClick:A,children:"取消"}),(0,Z.jsx)(v.ZP,{disabled:!f.length,loading:k,type:"primary",onClick:_,children:"关闭实训"})]}),onCancel:A,children:(0,Z.jsx)(Pe.Z,{spinning:k,children:(0,Z.jsxs)("div",{className:Ye,children:[(0,Z.jsx)("p",{children:"单个账号最多可同时开启10个实验环境,若想开启该实训请关闭其他实训。"}),null==c?void 0:c.map((function(e){return(0,Z.jsxs)("div",{className:$e,children:[(0,Z.jsx)(w.Z,{disabled:e.is_current_shixun,onChange:function(t){var n=De()(f);t.target.checked?n.push(e.tpi_id):n=f.filter((function(t){return t!==e.tpi_id})),j(n),I(n.length===c.length)},checked:null==f?void 0:f.includes(e.tpi_id)}),(0,Z.jsxs)("span",{className:Be,onClick:function(){return(0,C.xg)("/shixuns/".concat(e.shixun_identifier,"/challenges"))},title:e.shixun_name,children:[(0,Z.jsx)("b",{children:e.shixun_name}),e.is_current_shixun&&(0,Z.jsx)("span",{className:Qe,children:"当前实训"})]}),(0,Z.jsxs)("span",{style:{color:"#53d1a3"},children:["运行中的环境:",e.pod_num,"个"]})]},e.tpi_id)}))]})})})},Ue={token:{colorPrimary:"#3061D0",colorInfo:"#3061D0",colorLink:"#3061D0",borderRadius:2,fontSizeLG:14},components:{Radio:{radioSize:16,dotSize:6},Modal:{titleFontSize:16,titleColor:"#000"}}},Ve=["loading","globalSetting","dispatch"],We=(0,x.connect)((function(e){return{loading:e.loading,globalSetting:e.globalSetting}}))((function(e){e.loading;var t=e.globalSetting;e.dispatch,p()(e,Ve);(0,m.useEffect)((function(){C.IS&&function(){r.apply(this,arguments)}()}),[]),(0,m.useEffect)((function(){n()}),[document.body.dataset,null==t?void 0:t.shareData]);var n=function(){var e;null===(e=window.wx)||void 0===e||e.ready((function(){var e,n,r,i,a,s={title:(null==t||null===(e=t.shareData)||void 0===e?void 0:e.title)||document.title,desc:(null==t||null===(n=t.shareData)||void 0===n?void 0:n.desc)||"头歌,全称“头歌实践教学平台”,是国内高校广泛使用的在线实践教学服务平台与创新环境,为高校和企业的实践与创新能力提升赋能,是中国高校计算机教育MOOC联盟实践教学工委、全国人工智能职业教育集团实践教学工作委员会官方合作平台。",link:window.location.href,imgUrl:(null==t||null===(r=t.shareData)||void 0===r||null===(r=r.imgUrl)||void 0===r?void 0:r.replace("https://public.educoder.net","https://educoder-public.oss-cn-hangzhou.aliyuncs.com/"))||"https://educoder-public.oss-cn-hangzhou.aliyuncs.com/logo_simple.png"};null===(i=window.wx)||void 0===i||i.onMenuShareAppMessage(s),null===(a=window.wx)||void 0===a||a.onMenuShareTimeline(s)}))};function r(){return(r=l()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Se.ZP)("/api/users/js_sdk_data.json?url=".concat(encodeURIComponent(location.href)),{method:"get"});case 2:0===(null==(t=e.sent)?void 0:t.status)&&a(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function a(e){window.wx.config({debug:!1,appId:(null==e?void 0:e.appid)||"wx2402d86a6b534f77",timestamp:(null==e?void 0:e.timestamp)||1716781260,nonceStr:(null==e?void 0:e.noncestr)||"WjRUMvS[",signature:(null==e?void 0:e.signature)||"0e182307b372cf71796c33e01b462cbfca0b9930",jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","onMenuShareQZone"]})}return(0,Z.jsx)(Z.Fragment,{})})),Re=(n(43490),n(14706)),He=["loading","globalSetting","user","dispatch"];_e().locale("zh-cn");var Je=(0,x.connect)((function(e){return{loading:e.loading,globalSetting:e.globalSetting,user:e.user}}))((function(e){e.loading;var t,n=e.globalSetting,r=(e.user,e.dispatch),a=(p()(e,He),(0,x.useLocation)()),o=(0,Ae.g)(),c=(0,x.useSearchParams)(),d=(u()(c,1)[0],n.globalLoading),j=function(){var e=l()(i()().mark((function e(){var t,n,l,c,u,d;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=a.pathname.split("/"),null==a||!a.search){e.next=9;break}return c.includes("paths")?u=c[2]:c.includes("tasks")&&(d=c[2]),e.next=6,r({type:"user/getUserInfo",payload:s()(s()(s()({},o),(0,C.oP)()),{},{subject_id:u,game_id:d,websiteName:"educoder"})});case 6:n=e.sent,e.next=14;break;case 9:return c.includes("tasks")&&(l=c[2]),e.next=13,r({type:"user/getUserInfo",payload:s()(s()({},o),{},{game_id:l})});case 13:n=e.sent;case 14:"游客"!==(null===(t=n)||void 0===t?void 0:t.username)&&("/login"===a.pathname&&(window.location.href="/"),"/user/login"!==a.pathname&&"/login"!==a.pathname&&window.sessionStorage.getItem("download_url")&&((0,C.Nd)("educoder",window.sessionStorage.getItem("download_url")),window.sessionStorage.removeItem("download_url")));case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){g.ZP.config({prefixCls:"ant",iconPrefixCls:"anticon",theme:s()({},Ue)})}),[n.theme]),(0,m.useEffect)((function(){j(),(0,C.Il)()}),[]),(0,m.useEffect)((function(){r({type:"globalSetting/query",payload:{}})}),[]),(0,m.useEffect)((function(){var e,t;if(a.pathname.indexOf("classrooms")>-1&&-1===a.pathname.indexOf("detail")||document.body.scrollIntoView(),a.pathname.indexOf("/classrooms/4RW9CYHY")>-1&&"localhost"!==document.domain&&"kepukehuan.educoder.net"!==document.domain)window.location.href="https://kepukehuan.educoder.net/classrooms/4RW9CYHY/exercise";else if(a.pathname.indexOf("/classrooms/qb4ft587")>-1&&"localhost"!==document.domain&&"kepukehuan.educoder.net"!==document.domain)window.location.href="https://kepukehuan.educoder.net/classrooms/qb4ft587/exercise";else if(a.pathname.indexOf("/classrooms/c5q9bsp2")>-1&&"localhost"!==document.domain&&"kepukehuan.educoder.net"!==document.domain)window.location.href="https://kepukehuan.educoder.net/classrooms/c5q9bsp2/exercise";else if(r({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),"https://jetcoder.educoder.net"!==window.location.href&&"https://jetcoder.educoder.net/"!==window.location.href)if(null!==(e=window.location.href)&&void 0!==e&&e.includes("/problems")&&null!==(t=window.location.href)&&void 0!==t&&t.includes("/share")){var n,i=null===(n=window.location)||void 0===n||null===(n=n.pathname)||void 0===n||null===(n=n.split("/"))||void 0===n?void 0:n[2];(0,Se.ZP)("/api/practices/".concat(i,"/start"),{method:"get"}).then((function(e){0===(null==e?void 0:e.status)&&x.history.replace("/problems/".concat(null==e?void 0:e.identifier,"/oj/").concat(i))}))}else{if("/admins"===a.pathname||"/sidekiq"===a.pathname){var s=document.domain;if(s.indexOf("educoder.net")>-1)switch(s){case"www.educoder.net":case"educoder.net":window.location.href="https://data.educoder.net".concat(a.pathname);break;default:var o=document.domain.split(".");o[0]=o[0]+"-data",window.location.href="https://".concat(o.join(".")).concat(a.pathname)}}h.Z.destroyAll()}else window.location.href="https://www.educoder.net/problems"}),[a.pathname]),(0,m.useEffect)((function(){n.updateData.system_update?localStorage.updateEndTime||(new Date).getTime()0&&h.Z.info({title:"客户端版本过低",centered:!0,content:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{className:"c-red",children:"您的头歌考试系统柜客户端版本过低"}),',请升级至最新版本后再使用,点击"确定"后将下载最新版本的客户端,',(0,Z.jsx)("span",{className:"c-red",children:"下载后请先退出客户端再安装"})]}),okText:"立即升级",visible:!0,maskClosable:!1,onOk:function(){return(0,C.FH)("Educoder.exe","https://www-cdn.educoder.net/app/Educoder.exe"),new Promise((function(){}))}})}}),[null==n||null===(t=n.setting)||void 0===t?void 0:t.version]);return(0,Z.jsx)(Re.StyleProvider,{transformers:[Re.legacyLogicalPropertiesTransformer],hashPriority:"high",children:(0,Z.jsxs)(g.ZP,{locale:f.Z,autoInsertSpaceInButton:!1,componentSize:"middle",theme:Ue,children:[(0,Z.jsx)(Ie,{}),(0,Z.jsx)(ze,{}),(0,Z.jsx)(We,{}),(0,Z.jsx)(Ge,{}),(0,Z.jsx)(Pe.Z,{size:"middle",spinning:d.show,tip:d.text,className:"ant-spin-nested-loading-black",children:(0,Z.jsx)(x.Outlet,{})})]})})}))},28103:function(e,t,n){n.d(t,{Z:function(){return m}});var r=n(92310),i=n.n(r),a=n(59301),s=n(36355),o=n(17313),l=n(83116),c=n(37613);const u=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:s,verticalMarginInline:l}=e;return{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{borderBlockStart:`${i}px solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*s+"%"},"&::after":{width:100-100*s+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*s+"%"},"&::after":{width:100*s+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var d=(0,l.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[u(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{const{getPrefixCls:t,direction:n,divider:r}=a.useContext(s.E_),{prefixCls:o,type:l="horizontal",orientation:c="center",orientationMargin:u,className:m,rootClassName:g,children:h,dashed:f,plain:x,style:j}=e,y=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),b=t("divider",o),[w,v]=d(b),M=c.length>0?`-${c}`:c,I=!!h,S="left"===c&&null!=u,N="right"===c&&null!=u,k=i()(b,null==r?void 0:r.className,v,`${b}-${l}`,{[`${b}-with-text`]:I,[`${b}-with-text${M}`]:I,[`${b}-dashed`]:!!f,[`${b}-plain`]:!!x,[`${b}-rtl`]:"rtl"===n,[`${b}-no-default-orientation-margin-left`]:S,[`${b}-no-default-orientation-margin-right`]:N},m,g),L=a.useMemo((()=>"number"==typeof u?u:/^\d+$/.test(u)?Number(u):u),[u]),T=Object.assign(Object.assign({},S&&{marginLeft:L}),N&&{marginRight:L});return w(a.createElement("div",Object.assign({className:k,style:Object.assign(Object.assign({},null==r?void 0:r.style),j)},y,{role:"separator"}),h&&"vertical"!==l&&a.createElement("span",{className:`${b}-inner-text`,style:T},h)))}},44e3:function(e,t,n){var r=n(84966),i=n(10711);const a=r.ZP;a.Header=r.h4,a.Footer=r.$_,a.Content=r.VY,a.Sider=i.Z,t.Z=a}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[41717],{88289:function(e,t,n){n.d(t,{Z:function(){return l}});var r=n(82871),i=n(59301),a={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},s=n(68475),o=function(e,t){return i.createElement(s.Z,(0,r.Z)({},e,{ref:t,icon:a}))};var l=i.forwardRef(o)},29624:function(e,t,n){n.r(t),n.d(t,{default:function(){return Je}});var r=n(7557),i=n.n(r),a=n(82242),s=n.n(a),o=n(41498),l=n.n(o),c=n(79800),u=n.n(c),d=n(39647),p=n.n(d),m=n(59301),g=n(92736),h=n(43418),f=n(81863),x=n(78836),j=n(78241),y=n(8591),w=n(98135),b=n(24905),v=n(3113),M=n(1434),I=n(14834),S=n(51973),N="login-panel-wrapper2___HuMNJ",k="login-panel-right-wrp___vWD_i",L="res-error-values___hV1lz",T="tabs___EwOAX",Z=n(37712),z={height:48,borderRadius:4},C=(0,x.connect)((function(e){var t=e.user,n=e.loading;return{user:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t=e.dispatch,n=e.setType,r=e.user,a=e.setusername,o=j.Z.useForm(),c=u()(o,1)[0],d=(0,x.useSearchParams)(),p=u()(d,1)[0],g=(0,x.useLocation)(),h=(0,m.useState)(""),f=u()(h,2),N=f[0],k=f[1],T=(0,m.useState)([]),C=u()(T,2),P=C[0],_=C[1],A=(0,m.useState)({}),E=u()(A,2),D=E[0],O=E[1],F=(0,m.useState)(!1),Y=u()(F,2),$=Y[0],B=Y[1],Q=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,q=function(){var e=l()(i()().mark((function e(n){var r,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!1),Q.test(n.password)||(a(n.login),k("系统检测您的密码强度过低,请及时修改")),O(s()({},n)),e.next=5,(0,M.Es)(n);case 5:if(!(r=e.sent).status){e.next=19;break}if(-4!==r.status){e.next=13;break}return t({type:"user/showPopLogin",payload:{showPopLogin:!1}}),t({type:"user/setBindAccountModal",payload:{bindAccountModalVisible:!0,userInfoForBindAccountModal:r.user,loginInfo:n}}),e.abrupt("return");case 13:if(-5!==r.status){e.next=17;break}return _([null==r?void 0:r.message]),B(!0),e.abrupt("return");case 17:return k(null==r?void 0:r.message),e.abrupt("return");case 19:if(null!=r&&r.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),"/user/login"!==g.pathname&&"/login"!==g.pathname){e.next=35;break}if(!(o=p.get("form")||p.get("back_url"))){e.next=26;break}window.location.href=decodeURIComponent(o),e.next=33;break;case 26:if(Q.test(n.password)){e.next=31;break}y.ZP.info("系统检测您的密码强度过低,请及时修改"),window.location.href="/account/secure",e.next=33;break;case 31:return window.location.reload(),e.abrupt("return");case 33:e.next=43;break;case 35:if(Q.test(n.password)){e.next=41;break}y.ZP.info("系统检测您的密码强度过低,请及时修改"),window.location.href="/account/secure?active=3",t({type:"user/showPopLogin",payload:{showPopLogin:!1}}),e.next=43;break;case 41:return window.location.reload(),e.abrupt("return");case 43:c.resetFields();case 44:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(j.Z,{layout:"vertical",form:c,initialValues:{autologin:!0,login:r.actionTabs.phone},onFinish:q,onValuesChange:function(e){k("");if("password"in e){var t=e.password.replace(/[\u4e00-\u9fa5]/g,"");c.setFieldsValue({password:t})}},children:[!!N&&(0,Z.jsxs)("div",{className:L,children:[(0,Z.jsx)("span",{children:N}),(0,Z.jsx)(I.Z,{onClick:function(){return k("")}})]}),(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入用户名、手机号或邮箱"}],children:(0,Z.jsx)(w.Z,{style:z,size:"middle",placeholder:"请输入有效的手机号/邮箱号/账号",onBlur:function(){t({type:"user/setActionTabs",payload:{phone:c.getFieldValue("login")}})}})}),(0,Z.jsx)(j.Z.Item,{name:"password",rules:[{required:!0,message:"请输入8-16位密码,区分大小写、不能使用空格"}],children:(0,Z.jsx)(w.Z.Password,{style:z,size:"middle",placeholder:"密码"})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)("div",{className:"flex-container",style:{justifyContent:"space-between"},children:[(0,Z.jsx)(j.Z.Item,{name:"autologin",noStyle:!0,valuePropName:"checked",children:(0,Z.jsx)(b.Z,{children:"下次自动登录"})}),(0,Z.jsx)("div",{children:(0,Z.jsx)("span",{className:"current font14 c-blue",onClick:function(){return n(4)},children:"找回密码"})})]})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsx)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,className:"font16",style:z,children:"登录"})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]}),(0,Z.jsx)(S.Z,{open:$,data:P,accountInfo:s()({},D)})]})})),P=n(69901),_={height:48,borderRadius:4},A=/(^(1[0-9])\d{9}$)/i,E={timer:0},D=function(e){return e[e.setTimer=0]="setTimer",e}(D||{});function O(e,t){if(t.type===D.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var F=(0,x.connect)((function(e){return{globalSetting:e.globalSetting,user:e.user}}))((function(e){var t,n=e.user,r=e.dispatch,a=e.validateName,s=e.getCode,o=e.register,c=e.style,d=void 0===c?{}:c,p=e.buttonText,g=void 0===p?"注册":p,h=e.globalSetting,f=j.Z.useForm(),x=u()(f,1)[0],y=(0,m.useReducer)(O,E),M=u()(y,2),I=M[0],S=M[1],N=(0,m.useState)(!1),k=u()(N,2),L=k[0],T=k[1],z=I.timer,C=(0,m.useState)(!1),F=u()(C,2),Y=F[0];F[1];function $(){return $=l()(i()().mark((function e(t){var n,r,a,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.login,t.password,r=t.code,e.next=3,o({login:n,code:r});case 3:if(a=e.sent,s=a.message,!(a.status<0)){e.next=9;break}return x.setFields([{name:"code",errors:[s]}]),e.abrupt("return");case 9:window.location.reload();case 10:case"end":return e.stop()}}),e)}))),$.apply(this,arguments)}function B(){return(B=l()(i()().mark((function e(){var t,n,r,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.getFieldValue("login"),n=0,A.test(t)&&!(t.indexOf(" ")>-1)){e.next=6;break}return x.setFields([{name:"login",errors:["请输入正确的手机号"]}]),n=1,e.abrupt("return",n);case 6:return e.next=8,a({login:t,type:1});case 8:return r=e.sent,s=r.status,r.message,s<0?n=2:(x.setFields([{name:"login",errors:["该手机号码不存在,请先注册"]}]),n=1),e.abrupt("return",n);case 14:case"end":return e.stop()}}),e)})))).apply(this,arguments)}console.log("dispatchs:",S);var Q=function(){var e=l()(i()().mark((function e(){var t,n,r,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=x.getFieldValue("login"),A.test(t)){e.next=5;break}x.validateFields(["login"]),e.next=20;break;case 5:return e.next=7,a({login:t,type:1});case 7:if(!((null==(n=e.sent)?void 0:n.status)>0)){e.next=11;break}return x.setFields([{name:"login",errors:["该手机号码不存在,请先注册"]}]),e.abrupt("return");case 11:return T(!0),e.next=14,s({login:t,type:6,smscode:(0,P.M)(t)});case 14:r=e.sent,o=r.status,l=r.message,o<0&&x.setFields([{name:"code",errors:[l]}]),S({type:D.setTimer,payload:60}),T(!1);case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){z>0&&setTimeout((function(){S({type:D.setTimer,payload:z-1})}),1e3)}),[z]);return(0,Z.jsxs)(j.Z,{layout:"vertical",form:x,style:d,initialValues:{autologin:!0,protool:!1,login:n.actionTabs.phone},onFinish:function(e){return $.apply(this,arguments)},children:[(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入正确的手机号"},{validator:function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("请输入正确的手机号"):A.test(t)?Promise.resolve():Promise.reject("请输入正确的手机号"):Promise.resolve()}}],children:(0,Z.jsx)(w.Z,{style:_,autoComplete:"new-login",size:"middle",placeholder:"请输入有效的手机号",maxLength:11,onBlur:function(){!function(){B.apply(this,arguments)}(),r({type:"user/setActionTabs",payload:{phone:x.getFieldValue("login")}})},onChange:function(){return x.setFieldsValue({verify:0})}})}),!(null!=h&&null!==(t=h.setting)&&void 0!==t&&t.is_local)&&(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(w.Z,{suffix:(0,Z.jsxs)(v.ZP,{loading:L,type:"link",onClick:Q,disabled:z>0||Y,children:[" ",0===z?"获取验证码":"".concat(z,"秒可重新获取")]}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsx)("div",{className:"flex-container",style:{justifyContent:"space-between"},children:(0,Z.jsx)(j.Z.Item,{name:"autologin",noStyle:!0,valuePropName:"checked",children:(0,Z.jsx)(b.Z,{children:"下次自动登录"})})})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:_,className:"font16",children:[" ",g," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),Y=n(6848),$={height:48},B=/(\b[\w\.-]+@[\w\.-]+\.\w{2,4}\b)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$)/i,Q=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,q={timer:0},G=function(e){return e[e.setTimer=0]="setTimer",e}(G||{});function U(e,t){if(t.type===G.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var V=(0,x.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){var t,n=e.validateName,r=e.getCode,a=e.register,s=e.style,o=void 0===s?{}:s,c=e.buttonText,d=void 0===c?"注册":c,p=e.globalSetting,g=j.Z.useForm(),h=u()(g,1)[0],f=(0,m.useReducer)(U,q),x=u()(f,2),y=x[0],b=x[1],M=(0,m.useState)(!1),I=u()(M,2),S=I[0],N=I[1],k=y.timer;function L(){return L=l()(i()().mark((function e(t){var n,r,s,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.login,r=t.password,s=t.code,e.next=3,a({login:n,password:r,code:s});case 3:if(o=e.sent,l=o.message,!(o.status<0)){e.next=9;break}return h.setFields([{name:"code",errors:[l]}]),e.abrupt("return");case 9:window.location.reload();case 10:case"end":return e.stop()}}),e)}))),L.apply(this,arguments)}function T(){return z.apply(this,arguments)}function z(){return z=l()(i()().mark((function e(){var t,r,a,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=h.getFieldValue("login"),r=0,B.test(t)&&!(t.indexOf(" ")>-1)){e.next=6;break}return h.setFields([{name:"login",errors:["请输入正确的手机号或邮箱"]}]),r=1,e.abrupt("return",r);case 6:return e.next=8,n({login:t,type:1});case 8:return a=e.sent,s=a.status,o=a.message,s>0?r=2:(h.setFields([{name:"login",errors:[o]}]),r=1),e.abrupt("return",r);case 14:case"end":return e.stop()}}),e)}))),z.apply(this,arguments)}var C=function(){var e=l()(i()().mark((function e(){var t,a,s,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(h.getFieldValue("verify"),t=h.getFieldValue("login")){e.next=6;break}h.validateFields(["login"]),e.next=21;break;case 6:return e.next=8,n({login:t,type:1});case 8:if(1===(null==(a=e.sent)?void 0:a.status)){e.next=12;break}return h.setFields([{name:"login",errors:[null==a?void 0:a.message]}]),e.abrupt("return");case 12:return N(!0),e.next=15,r({login:t,type:1,smscode:(0,P.M)(t)});case 15:s=e.sent,o=s.status,l=s.message,o<0&&h.setFields([{name:"code",errors:[l]}]),b({type:G.setTimer,payload:60}),N(!1);case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){k>0&&setTimeout((function(){b({type:G.setTimer,payload:k-1})}),1e3)}),[k]);return(0,Z.jsxs)(j.Z,{layout:"vertical",form:h,style:o,initialValues:{autologin:!0,protool:!1},onFinish:function(e){return L.apply(this,arguments)},children:[(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入正确的手机号或邮箱"},{validator:function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("请输入正确的手机号或邮箱"):B.test(t)?Promise.resolve():Promise.reject("请输入正确的手机号或邮箱"):Promise.resolve()}}],children:(0,Z.jsx)(w.Z,{style:$,autoComplete:"new-login",size:"middle",placeholder:"请输入有效的手机号/邮箱号",onBlur:function(){return T},onChange:function(){return h.setFieldsValue({verify:0})}})}),!(null!=p&&null!==(t=p.setting)&&void 0!==t&&t.is_local)&&(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(w.Z,{suffix:(0,Z.jsxs)(v.ZP,{loading:S,type:"link",onClick:C,disabled:k>0,children:[" ",0===k?"获取验证码":"".concat(k,"秒可重新获取")]}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"password",rules:[{required:!0,message:"请输入8-16位密码,区分大小写、不能使用空格"},{validator:function(e,t){if(!t)return Promise.resolve();if(!Q.test(t))return Promise.reject("请输入8~16位字符,字母、数字和特殊符号至少包含2种");if(t.indexOf(" ")>-1)return Promise.reject("请输入8-16位密码,区分大小写、不能使用空格");var n=t.length;return n>=8&&n<=16?Promise.resolve():Promise.reject("请输入8-16位密码,区分大小写、不能使用空格")}}],children:(0,Z.jsx)(w.Z.Password,{autoComplete:"new-password",style:$,size:"middle",placeholder:"请输入8~16位字符,字母、数字和特殊符号至少包含2种"})})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:$,className:"font16",children:[" ",d," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:35},children:["注册并登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),W=n(89392),R={height:48},H=/(\b[\w\.-]+@[\w\.-]+\.\w{2,4}\b)|(^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$)/i,J=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,X={timer:0},K=function(e){return e[e.setTimer=0]="setTimer",e}(K||{});function ee(e,t){if(t.type===K.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var te=(0,x.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){var t,n=e.validateName,r=e.getCode,a=e.register,s=e.style,o=void 0===s?{}:s,c=e.buttonText,d=void 0===c?"注册":c,p=e.globalSetting,g=j.Z.useForm(),h=u()(g,1)[0],f=(0,m.useReducer)(ee,X),x=u()(f,2),y=x[0],b=x[1],M=(0,m.useState)(!1),I=u()(M,2),S=I[0],N=I[1],k=y.timer;function L(){return L=l()(i()().mark((function e(t){var n,r,s,o,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.login,r=t.new_password,s=t.code,e.next=3,a({login:n,new_password:r,code:s});case 3:if(o=e.sent,l=o.message,!(o.status<0)){e.next=9;break}return h.setFields([{name:"code",errors:[l]}]),e.abrupt("return");case 9:location.reload();case 10:case"end":return e.stop()}}),e)}))),L.apply(this,arguments)}var T=function(){var e=l()(i()().mark((function e(){var t,n,a,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h.getFieldValue("verify"),t=h.getFieldValue("login"),e.next=4,h.validateFields(["login"]);case 4:if(t){e.next=8;break}h.validateFields(["login"]),e.next=17;break;case 8:return N(!0),e.next=11,r({login:t,type:2,smscode:(0,P.M)(t)});case 11:n=e.sent,a=n.status,s=n.message,a<0&&h.setFields([{name:"code",errors:[s]}]),b({type:K.setTimer,payload:60}),N(!1);case 17:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){k>0&&setTimeout((function(){b({type:K.setTimer,payload:k-1})}),1e3)}),[k]);var z=function(){var e=l()(i()().mark((function e(t,r){var a,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r){e.next=2;break}return e.abrupt("return",Promise.resolve());case 2:if(!(r.indexOf(" ")>-1)){e.next=4;break}return e.abrupt("return",Promise.reject("请输入正确的手机号或邮箱"));case 4:if(!H.test(r)){e.next=18;break}return e.next=7,n({login:r,type:2});case 7:if(a=e.sent,s=a.status,o=a.message,!(s>0)){e.next=15;break}return e.abrupt("return",Promise.resolve());case 15:return e.abrupt("return",Promise.reject(o));case 16:e.next=19;break;case 18:return e.abrupt("return",Promise.reject("请输入正确的手机号或邮箱"));case 19:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,Z.jsxs)(j.Z,{layout:"vertical",form:h,style:o,initialValues:{autologin:!0,protool:!1},onFinish:(0,W.throttle)((function(e){return L.apply(this,arguments)}),2e3),children:[(0,Z.jsx)(j.Z.Item,{name:"login",rules:[{required:!0,message:"请输入正确的手机号或邮箱"},{validator:(0,W.throttle)(z,400)}],children:(0,Z.jsx)(w.Z,{style:R,autoComplete:"new-login",size:"middle",placeholder:"请输入有效的手机号/邮箱号",onChange:function(){return h.setFieldsValue({verify:0})}})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"new_password",rules:[{required:!0,message:"请输入8-16位新密码,区分大小写、不能使用空格"},{validator:function(e,t){if(!t)return Promise.resolve();if(!J.test(t))return Promise.reject("请输入8~16位字符,字母、数字和特殊符号至少包含2种");if(t.indexOf(" ")>-1)return Promise.reject("请输入8-16位新密码,区分大小写、不能使用空格");var n=t.length;return n>=8&&n<=16?Promise.resolve():Promise.reject("请输入8-16位新密码,区分大小写、不能使用空格")}}],children:(0,Z.jsx)(w.Z.Password,{autoComplete:"new-password",style:R,size:"middle",placeholder:"输入8~16位新密码,区分大小写"})})}),!(null!=p&&null!==(t=p.setting)&&void 0!==t&&t.is_local)&&(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(w.Z,{suffix:(0,Z.jsxs)(v.ZP,{loading:S,type:"link",onClick:T,disabled:k>0,children:[" ",0===k?"获取验证码":"".concat(k,"秒可重新获取")]}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:R,className:"font16",children:[" ",d," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["修改并登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})}));Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var ne="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGlkPSLlm77lsYJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4PSIwIiB5PSIwIiB2aWV3Qm94PSIwIDAgNjYgNjYiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDY2IDY2IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGU+LnN0MXtmaWxsOiMwMGI5MTN9PC9zdHlsZT48ZyBpZD0i6aG16Z2iLTEiPjxnIGlkPSLnmbvlvZVfeDJGX+azqOWGjCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTEwODEgLTM4MCkiPjxnIGlkPSLnvJbnu4QtMTjlpIfku70iIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwNjMgMjM4KSI+PGcgaWQ9Iue8lue7hC0xMiIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTggMTQyKSI+PGcgaWQ9Iue8lue7hC0xMCI+PGNpcmNsZSBpZD0i5qSt5ZyG5b2iIiBjeD0iMzMiIGN5PSIzMyIgcj0iMzMiIHN0eWxlPSJmaWxsLXJ1bGU6ZXZlbm9kZDtjbGlwLXJ1bGU6ZXZlbm9kZDtmaWxsOiNjNmY0YzkiLz48ZyBpZD0i57yW57uEIiB0cmFuc2Zvcm09InRyYW5zbGF0ZSgxMiAxNS40MjkpIj48cGF0aCBpZD0i6Lev5b6EIiBjbGFzcz0ic3QxIiBkPSJNMTYuMyAyMi44YzAtNi42IDYtMTIuMSAxMy43LTEyLjFoLjRDMjkuMSA0LjYgMjIuNyAwIDE1LjQgMCA3LjIgMCAuNCA1LjguNCAxMy4xYzAgNC4zIDIuMiA3LjcgNiAxMC41bC0xLjUgNC43IDUuMi0yLjdjMS43LjQgMy41LjcgNS4zLjguNSAwIC45IDAgMS40LS4xbC4xLS4xYy0uNC0xLjEtLjYtMi4zLS42LTMuNHoiLz48cGF0aCBpZD0i6Lev5b6EXzFfIiBjbGFzcz0ic3QxIiBkPSJNNDIuNCAyMi40YzAtNi4yLTUuOC0xMS4yLTEyLjQtMTEuMi03IDAtMTIuNCA1LjEtMTIuNCAxMS4yUzIzLjEgMzMuNiAzMCAzMy42YzEuNS0uMSAzLS4zIDQuNC0uOGw0IDIuMy0xLTMuOGMyLjgtMi4zIDUtNS41IDUtOC45eiIvPjxwYXRoIGlkPSLlvaLnirYiIGQ9Ik0yMS42IDZjMS0uMSAxLjguNyAxLjkgMS43VjhjLjEgMS0uNyAxLjktMS42IDJoLS4yYy0xLjEuMS0yLjEtLjgtMi4yLTIgMC0xLjIgMS0yLjEgMi4xLTJ6TTExLjIgOS45QzEwLjEgMTAgOS4xIDkuMiA5IDhjLjEtMS4yIDEuMS0yLjEgMi4yLTIgMS0uMSAxLjguNyAxLjggMS44VjhjLjEgMS0uNyAxLjktMS42IDJoLS4yem0xNS4yIDEwLjdjLS44LS4xLTEuNC0uNy0xLjUtMS42LjEtLjguNy0xLjUgMS41LTEuNi45LS4xIDEuNy42IDEuOSAxLjYtLjIgMS0xIDEuNy0xLjkgMS42em04LjIgMGMtLjgtLjEtMS40LS43LTEuNS0xLjYuMS0uOC43LTEuNSAxLjUtMS42LjktLjEgMS43LjYgMS45IDEuNi0uMiAxLTEgMS43LTEuOSAxLjZ6IiBzdHlsZT0iZmlsbDojZmZmIi8+PC9nPjwvZz48L2c+PC9nPjwvZz48L2c+PC9zdmc+";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var re="data:image/svg+xml;base64,PHN2ZyBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PHBhdGggZD0iTTUxMiAwQzIyOS4zNTYgMCAwIDIyOS4zNTYgMCA1MTJzMjI5LjM1NiA1MTIgNTEyIDUxMiA1MTItMjI5LjM1NiA1MTItNTEyUzc5NC42NDQgMCA1MTIgMHptMjM1Ljc1IDY0Ny42MDNjLTEwLjcgNS40MTctMjcuNDE3LTYuOTYzLTQzLjM0LTMwLjE1Ny02LjI2NyAyNS4yNjItMjEuNjczIDQ3Ljk1LTQzLjYwNyA2Ni4yNTMgMjMuMjQ0IDguNTA1IDM4LjEyMyAyMi4xNyAzOC4xMjMgMzcuODk4IDAgMjUuNTE5LTQwLjk5IDQ2LjQwMy05MS4zODcgNDYuNDAzLTQ1LjQzIDAtODMuMjg3LTE3LjAxNC05MC4wNzYtMzguOTI3aC0xMC45NjdDNDk5LjQ0NiA3NTEuMjQzIDQ2MS44NSA3NjggNDE2LjQyIDc2OGMtNTAuMzk2IDAtOTEuMzg3LTIwLjYyMy05MS4zODctNDYuNDAzIDAtMTUuNzI4IDE1LjE0NS0yOS4zODggMzguMTE4LTM3Ljg5OC0yMS45MjktMTguMzA0LTM3LjU5Ni00MS4yNTItNDMuNjAyLTY2LjI1My0xNS42NjcgMjMuMTk0LTMyLjYzNCAzNS44My00My4zNCAzMC4xNTctMTUuNjY4LTcuOTg3LTEyLjUzNC01MS4wNDYgNy4wNS05Ni4xNTkgMTUuMTQ1LTM1LjMxNyAzNi4wMy02MS42MTQgNTEuNjk3LTY3LjI4Ny0uMjYyLTIuMzE5LS4yNjItNC42MzgtLjI2Mi02LjcwNyAwLTEzLjY2IDMuOTE3LTI2LjI5MSAxMC40NDUtMzYuNjA4di0yLjMxNGMwLTYuMTkgMS41NjctMTIuMTE5IDQuMTc4LTE3LjI3NUMzNTMuMjMgMzI5LjIxNiA0MTQuMDcgMjU2IDUxMi4yNDEgMjU2czE1OS4wMDYgNzMuMjE2IDE2Mi45MjMgMTY1LjI1M2EzOC4zNzQgMzguMzc0IDAgMCAxIDQuMTc4IDE3LjI3NXYyLjMyYzYuNTI4IDEwLjMxMSAxMC40NDUgMjIuOTQyIDEwLjQ0NSAzNi42MDcgMCAyLjMyIDAgNC42NC0uMjYxIDYuNzAyIDE1LjkyMyA1LjY3MyAzNi41NTcgMzEuOTcgNTEuNjk2IDY3LjI4NyAxOS4wNjIgNDUuMTE4IDIyLjE5NiA4OC4xNjcgNi41MjggOTYuMTZ6IiBmaWxsPSIjMzc4QUZFIi8+PC9zdmc+",ie="other-login___Jd48Z",ae="wechat-qrcode___bLWkh",se="driver___IuicK",oe=n(47162),le=window.location.host,ce=oe.Z.QQLoginCB,ue=function(e){var t=e.onWechatLogin,n=e.setType,r=e.loginType;function i(){return(0,P.b9)()?"https://graph.qq.com/oauth2.0/show?which=Login&display=pc&client_id=101508858&redirect_uri=".concat(ce,"%2fotherloginqq&state=null,").concat(le,"&response_type=code"):"https://xui.ptlogin2.qq.com/cgi-bin/xlogin?appid=716027609&pt_3rd_aid=101508858&daid=383&pt_skey_valid=0&style=35&s_url=http%3A%2F%2Fconnect.qq.com&refer_cgi=authorize&which=&client_id=101508858&response_type=code&scope=get_user_info&redirect_uri=".concat(ce,"%2fotherloginqq&state=null,").concat(le,"&response_type=code")}return(0,Z.jsxs)(Z.Fragment,{children:[(1===r||2===r)&&(0,Z.jsxs)("div",{style:{marginTop:4===r?20:92,marginBottom:60},className:"font16 tc",children:["没有账号?",(0,Z.jsx)("span",{onClick:function(){return n(3)},className:"c-blue current",children:"免费注册"})]}),(3===r||4===r||5===r)&&(0,Z.jsxs)("div",{style:{marginTop:92,marginBottom:60},className:"font16 tc",children:["已有账号?",(0,Z.jsx)("span",{onClick:function(){return n(1)},className:"c-blue current",children:"立即登录"})]}),(0,Z.jsx)("p",{className:se,children:(0,Z.jsx)("span",{style:{color:"#444444"},children:"快速登录"})}),(0,Z.jsxs)("div",{className:ie,children:[(0,P.s2)()&&(0,P.IS)()&&(0,Z.jsx)("a",{title:"微信登录",style:{margin:0},onClick:t,children:(0,Z.jsx)("img",{src:ne,alt:"微信",width:66})}),(0,P.s2)()&&!(0,P.IS)()&&(0,Z.jsx)("a",{title:"qq登录",rel:"noreferrer noopener nofollow",style:{margin:0},href:i(),children:(0,Z.jsx)("img",{src:re,alt:"QQ",width:66})}),(0,P.b9)()&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("a",{title:"微信登录",style:{marginRight:(0,P.IS)()?0:40},onClick:t,children:(0,Z.jsx)("img",{src:ne,alt:"微信",width:66})}),!(0,P.IS)()&&(0,Z.jsx)("a",{title:"qq登录",href:i(),children:(0,Z.jsx)("img",{src:re,alt:"QQ",width:66})})]})]})]})};function de(e){e.onBack;var t=e.setType;return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)("div",{style:{overflow:"hidden",width:300,height:300,margin:"20px auto 0 auto"},children:(0,Z.jsx)("iframe",{className:ae,frameBorder:"0",sandbox:"allow-scripts allow-same-origin allow-top-navigation",scrolling:"no",src:"https://open.weixin.qq.com/connect/qrconnect?appid=wx6b119e2d829c13fa&redirect_uri=".concat(ce,"%2fotherloginstart&response_type=code&scope=snsapi_login&state=null,").concat(le,"#wechat_redirect")})}),(0,Z.jsx)("div",{style:{marginTop:17,marginBottom:10},className:"font16 bold tc c-blue current",children:(0,Z.jsx)("span",{onClick:function(){return t(1)},style:{borderBottom:"2px solid #0152d9"},children:"返回账号登录"})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:14,paddingBottom:40},children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})}var pe={height:48},me=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,ge={timer:0},he=function(e){return e[e.setTimer=0]="setTimer",e}(he||{});function fe(e,t){if(t.type===he.setTimer)return s()(s()({},e),{},{timer:t.payload});throw new Error}var xe=(0,x.connect)((function(e){return{globalSetting:e.globalSetting}}))((function(e){e.validateName,e.getCode;var t=e.register,n=e.style,r=void 0===n?{}:n,a=e.buttonText,s=void 0===a?"注册":a,o=(e.globalSetting,j.Z.useForm()),c=u()(o,1)[0],d=(0,m.useReducer)(fe,ge),p=u()(d,2),g=p[0],h=p[1],f=(0,m.useState)(!1),x=u()(f,2),y=(x[0],x[1],g.timer);function b(){return b=l()(i()().mark((function e(n){var r,a,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.old_password,a=n.newPassword,e.next=3,t({old_password:r,newPassword:a});case 3:if(s=e.sent,o=s.message,!(s.status<0)){e.next=9;break}return c.setFields([{name:"code",errors:[o]}]),e.abrupt("return");case 9:case"end":return e.stop()}}),e)}))),b.apply(this,arguments)}return(0,m.useEffect)((function(){y>0&&setTimeout((function(){h({type:he.setTimer,payload:y-1})}),1e3)}),[y]),(0,Z.jsxs)(j.Z,{layout:"vertical",form:c,style:r,initialValues:{autologin:!0,protool:!1},onFinish:function(e){return b.apply(this,arguments)},children:[(0,Z.jsx)(j.Z.Item,{name:"old_password",rules:[{required:!0,message:"请输入8~16位密码,区分大小写"}],children:(0,Z.jsx)(w.Z,{style:pe,autoComplete:"new-login",size:"middle",type:"password",placeholder:"请输入旧密码",onChange:function(){return c.setFieldsValue({verify:0})}})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"newPassword",rules:[{required:!0,message:"请输入8-16位新密码,区分大小写、不能使用空格"},{validator:function(e,t,n){t?t.indexOf(" ")>-1?n("请输入8-16位密码,区分大小写、不能使用空格"):t.length<8||t.length>16?n("请输入8-16位字符的新密码,区分大小写!"):me.test(t)?n():n("请输入8~16位字符,字母、数字和特殊符号至少包含2种"):n("请输入8-16位字符的新密码,区分大小写!")}}],children:(0,Z.jsx)(w.Z.Password,{autoComplete:"new-password",style:pe,size:"middle",placeholder:"输入8~16位新密码,区分大小写"})})}),(0,Z.jsx)(Y.Z,{title:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{children:"长度为8-16位字符"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"字母/数字以及标点符号至少包含2种"}),(0,Z.jsx)("br",{}),(0,Z.jsx)("span",{children:"不允许有空格、中文"})]}),placement:"topRight",children:(0,Z.jsx)(j.Z.Item,{name:"againPassword",rules:[{required:!0,message:"请再次输入新密码"},{validator:function(e,t,n){t!=c.getFieldsValue().newPassword?n("两次输入的新密码必须一致!"):n()}}],children:(0,Z.jsx)(w.Z.Password,{autoComplete:"new-password",style:pe,size:"middle",placeholder:"请再次输入新密码"})})}),(0,Z.jsx)(j.Z.Item,{children:(0,Z.jsxs)(v.ZP,{size:"middle",type:"primary",htmlType:"submit",block:!0,style:pe,className:"font16",children:[" ",s," "]})}),(0,Z.jsxs)("div",{className:"tc",style:{paddingTop:0,paddingBottom:20},children:["修改并登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),je=n(99313),ye=n(95237),we=n(43604),be=je.Z.TabPane,ve=function(e){e.dispatch,e.is_main_site;var t=e.is_local,n=e.style,r=void 0===n?{}:n,a=(0,m.useState)(!1),o=u()(a,2),c=(o[0],o[1]),d=(0,m.useState)("1"),p=u()(d,2),g=p[0],h=p[1],f=(0,m.useState)(1),x=u()(f,2),j=x[0],w=x[1],b=(0,m.useState)(),v=u()(b,2),I=v[0],S=v[1];function L(){w(1),c(!1)}function z(e){console.log(e),h(e)}var _,A,E,D,O={buttonText:"登 录",validateName:M.Ol,getCode:M.o1,register:(_=l()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Gq)({phone:t.login,code:t.code});case 2:if(0!==(n=e.sent).status){e.next=6;break}return null!=n&&n.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==n?void 0:n.start_date)):localStorage.removeItem("extension-modal"),e.abrupt("return","/");case 6:return e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)}))),function(e){return _.apply(this,arguments)})},Y={buttonText:"注册并登录",validateName:M.Ol,getCode:M.o1,register:(A=l()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.z2)(s()({},t));case 2:if(0!==(n=e.sent).status){e.next=9;break}return"1"===localStorage.getItem("addinfo")?localStorage.setItem("addinfo","2"):localStorage.setItem("registeruser","1"),localStorage.removeItem("extension-modal"),y.ZP.info("注册并登陆成功"),e.abrupt("return","/");case 9:return e.abrupt("return",n);case 10:case"end":return e.stop()}}),e)}))),function(e){return A.apply(this,arguments)})},$={buttonText:"修改密码",validateName:M.Ol,getCode:M.o1,register:(E=l()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,M.Ex)(s()({login:I},t));case 2:return n=e.sent,y.ZP.info("修改密码成功"),e.abrupt("return",n);case 5:case"end":return e.stop()}}),e)}))),function(e){return E.apply(this,arguments)})},B={buttonText:"修改并登录",validateName:M.Ol,getCode:M.o1,register:(D=l()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(){var e=l()(i()().mark((function e(n){var r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.new_password_confirmation=t.new_password,e.next=3,(0,M.c0)(s()({},t));case 3:if(0!==(r=e.sent).status){e.next=9;break}return null!=r&&r.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==r?void 0:r.start_date)):localStorage.removeItem("extension-modal"),y.ZP.info("修改成功"),n("/"),e.abrupt("return","/");case 9:return n(r),e.abrupt("return",r);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 1:case"end":return e.stop()}}),e)}))),function(e){return D.apply(this,arguments)})},Q=(0,m.useCallback)((function(){switch(j){case 1:return(0,Z.jsxs)(je.Z,{defaultActiveKey:g,onChange:z,className:T,children:[(0,Z.jsx)(be,{tab:"账号登录",children:(0,Z.jsx)("div",{className:"mt20",children:"1"===g&&(0,Z.jsx)(C,{setusername:S,setType:w})})},"1"),(0,Z.jsx)(be,{tab:"验证码登录",children:(0,Z.jsx)("div",{className:"mt20",children:"2"===g&&(0,Z.jsx)(F,s()({},O))})},"2")]});case 2:return(0,Z.jsx)(de,{setType:w,onBack:L});case 3:return(0,Z.jsxs)("div",{className:"ml40",children:[(0,Z.jsx)("h1",{className:"font18 mb20 mt35",children:"新用户注册"}),(0,Z.jsx)(V,s()({},Y))]});case 4:return(0,Z.jsxs)("div",{className:"ml40",children:[(0,Z.jsx)("h1",{className:"font18 mb20 mt35",children:"找回密码"}),(0,Z.jsx)(te,s()({},B))]});case 5:return(0,Z.jsxs)("div",{className:"ml40",children:[(0,Z.jsx)("h1",{className:"font18 mb20 mt35",children:"修改密码"}),(0,Z.jsx)(xe,s()({},$))]})}}),[j,g]);return(0,Z.jsx)("div",{className:N,style:r,children:(0,Z.jsxs)(ye.Z,{children:[(0,Z.jsx)(we.Z,{flex:"1",children:Q()}),(0,Z.jsx)(we.Z,{flex:"295px",className:k,children:!t&&(0,Z.jsx)(ue,{loginType:j,setType:w,onWechatLogin:function(){(0,P.s2)()||(0,P.IS)()?(0,P.Or)():(w(2),c(!0))}})})]})})},Me="popLogin___R8wQQ",Ie=(0,x.connect)((function(e){var t=e.user,n=e.loading;return{user:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t,n,r=e.user,i=e.globalSetting,a=(e.loading,e.dispatch),s=null===(t=i.setting)||void 0===t?void 0:t.main_site,o=null===(n=i.setting)||void 0===n?void 0:n.is_local;return(0,Z.jsx)(h.Z,{centered:!0,open:r.showPopLogin,footer:null,width:o?420:765,keyboard:!1,maskClosable:!1,wrapClassName:Me,closable:r.showClosable,onCancel:function(){a({type:"user/showPopLogin",payload:{showPopLogin:!1,showClosable:!1}})},children:r.showPopLogin&&(0,Z.jsx)(ve,{is_main_site:s,is_local:o})})})),Se=n(32157),Ne="popLogin___u08I8",ke="tips___U2xQw",Le=/^1\d{10}$/,Te=/^[a-zA-Z0-9]+([.\-_\\]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/,Ze=/^(?![\d]+$)(?![a-zA-Z]+$)(?![^\da-zA-Z]+$).{8,16}$/,ze=(0,x.connect)((function(e){var t=e.user,n=e.loading;return{user:t,globalSetting:e.globalSetting,loading:n.models.index}}))((function(e){var t=e.user,n=(e.globalSetting,e.dispatch),r=(0,x.useSearchParams)(),a=u()(r,1)[0],s={height:48,borderRadius:4},o=j.Z.useForm(),c=u()(o,1)[0],d=(0,m.useState)(60),p=u()(d,2),g=p[0],f=p[1],b=(0,m.useMemo)((function(){return g<60&&g>0}),[g]),I=(0,m.useRef)(),S=function(){var e=l()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:clearInterval(I.current),f(60),I.current=setInterval(function e(){return f((function(e){return e-1})),e}(),1e3);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=(0,m.useState)(!1),k=u()(N,2),L=k[0],T=k[1],z=(0,m.useState)(!1),C=u()(z,2),_=C[0],A=C[1];(0,m.useEffect)((function(){t.bindAccountModalVisible?A(!0):A(!1)}),[t]);var E=function(){var e=l()(i()().mark((function e(){var r,a,s,o,l,u,d,p;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=c.getFieldValue("userInput"),a=Le.test(r),s=Te.test(r),a||s){e.next=6;break}return y.ZP.error("请输入有效的手机号/邮箱号"),e.abrupt("return");case 6:if(T(!0),!a){e.next=20;break}return e.next=10,(0,Se.ZP)("/api/users/accounts/".concat(null===(o=t.userInfoForBindAccountModal)||void 0===o?void 0:o.login,"/valid_phone.json"),{method:"get",params:{phone:r}});case 10:if(-1!==(null==(l=e.sent)?void 0:l.status)){e.next=14;break}return T(!1),e.abrupt("return");case 14:if(null==l||!l.is_exists){e.next=18;break}return y.ZP.info("该手机号已被其它账号绑定"),T(!1),e.abrupt("return");case 18:e.next=27;break;case 20:return e.next=22,(0,Se.ZP)("/api/accounts/valid_email_and_phone",{method:"get",params:{login:r,type:1}});case 22:if(-3!==(null==(u=e.sent)?void 0:u.status)){e.next=27;break}return y.ZP.info("该邮箱已被注册"),T(!1),e.abrupt("return");case 27:return d=(0,P.M)(r),e.next=30,n({type:"account/getCode",payload:{login:r,type:a?3:4,smscode:d}});case 30:p=e.sent,T(!1),1===p.status&&(y.ZP.info("验证码已发送,请注意查收"),S());case 33:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=l()(i()().mark((function e(){var r,a,s,o,l,u,d,p;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c.validateFields();case 2:if(r=c.getFieldValue("userInput"),a=c.getFieldValue("code"),s=Le.test(r),o=Te.test(r),s||o){e.next=9;break}return y.ZP.error("请输入有效的手机号/邮箱号"),e.abrupt("return");case 9:if(!s){e.next=16;break}return e.next=12,n({type:"account/bindPhone",payload:{login:null===(l=t.userInfoForBindAccountModal)||void 0===l?void 0:l.login,phone:r,code:a}});case 12:return u=e.sent,e.abrupt("return",0===u.status);case 16:return e.next=18,n({type:"account/bindEmail",payload:{login:null===(d=t.userInfoForBindAccountModal)||void 0===d?void 0:d.login,email:r,code:a}});case 18:return p=e.sent,e.abrupt("return",0===p.status);case 20:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=l()(i()().mark((function e(){var r,s,o;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.loginInfo,Ze.test(r.password)||y.ZP.error("系统检测您的密码强度过低,请及时修改"),e.next=4,(0,M.Es)(r);case 4:if(!(s=e.sent).status){e.next=8;break}return y.ZP.error(null==s?void 0:s.message),e.abrupt("return");case 8:null!=s&&s.show?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",null==s?void 0:s.start_date)):localStorage.removeItem("extension-modal"),"/user/login"===location.pathname||"/login"===location.pathname?(o=a.get("from")||a.get("back_url"))?window.location.href=decodeURIComponent(o):Ze.test(r.password)?window.location.reload():(y.ZP.info("系统检测您的密码强度过低,请及时修改"),window.location.href="/account/secure"):Ze.test(r.password)?window.location.reload():(y.ZP.info("系统检测您的密码强度过低,请及时修改"),x.history.replace("/account/secure?active=3"),n({type:"user/setBindAccountModal",payload:{bindAccountModalVisible:!1}})),c.resetFields();case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){var e=l()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,D();case 2:if(!e.sent){e.next=6;break}return e.next=6,O();case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,Z.jsxs)(h.Z,{centered:!0,open:_,footer:null,width:596,keyboard:!1,maskClosable:!0,wrapClassName:Ne,closable:!0,onCancel:function(){n({type:"user/setBindAccountModal",payload:{bindAccountModalVisible:!1}}),c.resetFields()},children:[(0,Z.jsx)("h1",{className:"font18 mb20",children:"手机号/邮箱绑定"}),(0,Z.jsxs)(j.Z,{layout:"vertical",form:c,autoComplete:"off",preserve:!1,children:[(0,Z.jsx)(j.Z.Item,{name:"userInput",rules:[{required:!0,message:"请输入正确的手机号/邮箱"},{validator:function(e,t){return t?t.indexOf(" ")>-1?Promise.reject("请输入正确的手机号或邮箱"):Le.test(t)||Te.test(t)?Promise.resolve():Promise.reject("请输入正确的手机号或邮箱"):Promise.resolve()}}],children:(0,Z.jsx)(w.Z,{style:s,size:"middle",placeholder:"请输入有效的手机号/邮箱号"})}),(0,Z.jsx)(j.Z.Item,{name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,Z.jsx)(w.Z,{suffix:(0,Z.jsx)(v.ZP,{loading:L,type:"link",onClick:E,disabled:b,children:b?"".concat(g,"秒可重新获取"):"获取验证码"}),style:{paddingRight:2,height:48},placeholder:"请输入验证码",size:"middle"})})]}),(0,Z.jsx)("div",{className:ke,children:"为了账号安全性,绑定后可通过该手机号或邮箱找回密码"}),(0,Z.jsx)(v.ZP,{size:"middle",type:"primary",block:!0,style:s,className:"font16",onClick:F,children:"绑定并登录"}),(0,Z.jsxs)("div",{className:ke,children:["登录即代表您已阅读并同意",(0,Z.jsx)("a",{href:"https://engineer.educoder.net/help?index=4",target:"_blank",children:"《服务协议条款》"})]})]})})),Ce=n(71418),Pe=n(99232),_e=n.n(Pe),Ae=n(985),Ee=n(37205),De=n.n(Ee),Oe=n(70236),Fe=n.n(Oe),Ye="wrap___q9xAc",$e="list___qjgdz",Be="name___ncYhC",Qe="tag___Paafn",qe=n(30188),Ge=function(e){Fe()(e);var t=(0,m.useState)(!1),n=u()(t,2),r=n[0],a=n[1],s=(0,m.useState)([]),o=u()(s,2),c=o[0],d=o[1],p=(0,m.useState)([]),g=u()(p,2),f=g[0],j=g[1],y=(0,m.useState)(!1),w=u()(y,2),M=w[0],I=w[1],S=(0,m.useState)(!1),N=u()(S,2),k=N[0],L=N[1],T=(0,x.useLocation)(),z=(0,x.useSearchParams)(),C=u()(z,1)[0];(0,m.useEffect)((function(){qe.Z.subscribe("pod-restrict-data",(function(e){console.log(e,"data"),a(e.identifier||!1),d(e.data_list||[]),j([]),I(!1)}))}),[]);var _=function(){var e=l()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return L(!0),t=c.filter((function(e){return f.includes(e.tpi_id)})),e.next=4,(0,Se.ZP)("/api/myshixuns/batch_del_pods.json",{method:"delete",body:{del_pods:t}});case 4:0===e.sent.status&&window.location.reload(),L(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),A=function(){var e;if(console.log(T,"location"),null===(e=T.pathname)||void 0===e||!e.includes("/challenges"))return"exercises"===C.get("type")?(window.parent.postMessage("backExercise","*"),void qe.Z.publish("pod-restrict-data",{identifier:!1,data_list:[]})):void(window.location.href="/shixuns/".concat(r,"/challenges"));window.location.href="/shixuns"};return(0,Z.jsx)(h.Z,{centered:!0,keyboard:!1,destroyOnClose:!0,open:r,title:"通知",width:"600px",footer:(0,Z.jsxs)(ye.Z,{align:"middle",justify:"center",children:[(0,Z.jsx)(b.Z,{onChange:function(e){var t;(console.log(e,222),I(e.target.checked),e.target.checked)?j(null==c||null===(t=c.filter((function(e){return!e.is_current_shixun})))||void 0===t?void 0:t.map((function(e){return e.tpi_id}))):j([])},checked:M,children:"全选"}),(0,Z.jsx)(v.ZP,{style:{marginLeft:"auto"},onClick:A,children:"取消"}),(0,Z.jsx)(v.ZP,{disabled:!f.length,loading:k,type:"primary",onClick:_,children:"关闭实训"})]}),onCancel:A,children:(0,Z.jsx)(Ce.Z,{spinning:k,children:(0,Z.jsxs)("div",{className:Ye,children:[(0,Z.jsx)("p",{children:"单个账号最多可同时开启10个实验环境,若想开启该实训请关闭其他实训。"}),null==c?void 0:c.map((function(e){return(0,Z.jsxs)("div",{className:$e,children:[(0,Z.jsx)(b.Z,{disabled:e.is_current_shixun,onChange:function(t){var n=De()(f);t.target.checked?n.push(e.tpi_id):n=f.filter((function(t){return t!==e.tpi_id})),j(n),I(n.length===c.length)},checked:null==f?void 0:f.includes(e.tpi_id)}),(0,Z.jsxs)("span",{className:Be,onClick:function(){return(0,P.xg)("/shixuns/".concat(e.shixun_identifier,"/challenges"))},title:e.shixun_name,children:[(0,Z.jsx)("b",{children:e.shixun_name}),e.is_current_shixun&&(0,Z.jsx)("span",{className:Qe,children:"当前实训"})]}),(0,Z.jsxs)("span",{style:{color:"#53d1a3"},children:["运行中的环境:",e.pod_num,"个"]})]},e.tpi_id)}))]})})})},Ue={token:{colorPrimary:"#3061D0",colorInfo:"#3061D0",colorLink:"#3061D0",borderRadius:2,fontSizeLG:14},components:{Radio:{radioSize:16,dotSize:6},Modal:{titleFontSize:16,titleColor:"#000"}}},Ve=["loading","globalSetting","dispatch"],We=(0,x.connect)((function(e){return{loading:e.loading,globalSetting:e.globalSetting}}))((function(e){e.loading;var t=e.globalSetting,n=e.dispatch,r=(p()(e,Ve),"https://educoder-public.oss-cn-hangzhou.aliyuncs.com/Cover/logo_simple?x-oss-process=image/resize,h_200,w_200,m_pad");(0,m.useEffect)((function(){P.IS&&function(){s.apply(this,arguments)}()}),[]),(0,m.useEffect)((function(){n({type:"globalSetting/setShareData",payload:{desc:"头歌,全称“头歌实践教学平台”,是国内高校广泛使用的在线实践教学服务平台与创新环境,为高校和企业的实践与创新能力提升赋能,是中国高校计算机教育MOOC联盟实践教学工委、全国人工智能职业教育集团实践教学工作委员会官方合作平台。",title:document.title,imgUrl:r}})}),[location.pathname]),(0,m.useEffect)((function(){a()}),[null==t?void 0:t.shareData]);var a=function(){var e;null===(e=window.wx)||void 0===e||e.ready((function(){var e,n,i,a,s,o={title:(null==t||null===(e=t.shareData)||void 0===e?void 0:e.title)||document.title,desc:(null==t||null===(n=t.shareData)||void 0===n?void 0:n.desc)||"头歌,全称“头歌实践教学平台”,是国内高校广泛使用的在线实践教学服务平台与创新环境,为高校和企业的实践与创新能力提升赋能,是中国高校计算机教育MOOC联盟实践教学工委、全国人工智能职业教育集团实践教学工作委员会官方合作平台。",link:window.location.href,imgUrl:(null==t||null===(i=t.shareData)||void 0===i||null===(i=i.imgUrl)||void 0===i?void 0:i.replace("https://public.educoder.net","https://educoder-public.oss-cn-hangzhou.aliyuncs.com/"))||r};null===(a=window.wx)||void 0===a||a.onMenuShareAppMessage(o),null===(s=window.wx)||void 0===s||s.onMenuShareTimeline(o)}))};function s(){return(s=l()(i()().mark((function e(){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Se.ZP)("/api/users/js_sdk_data.json?url=".concat(encodeURIComponent(location.href)),{method:"get"});case 2:0===(null==(t=e.sent)?void 0:t.status)&&o(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function o(e){window.wx.config({debug:!1,appId:(null==e?void 0:e.appid)||"wx2402d86a6b534f77",timestamp:(null==e?void 0:e.timestamp)||1716781260,nonceStr:(null==e?void 0:e.noncestr)||"WjRUMvS[",signature:(null==e?void 0:e.signature)||"0e182307b372cf71796c33e01b462cbfca0b9930",jsApiList:["checkJsApi","onMenuShareTimeline","onMenuShareAppMessage","onMenuShareQQ","onMenuShareWeibo","onMenuShareQZone"]})}return(0,Z.jsx)(Z.Fragment,{})})),Re=(n(43490),n(14706)),He=["loading","globalSetting","user","dispatch"];_e().locale("zh-cn");var Je=(0,x.connect)((function(e){return{loading:e.loading,globalSetting:e.globalSetting,user:e.user}}))((function(e){e.loading;var t,n=e.globalSetting,r=(e.user,e.dispatch),a=(p()(e,He),(0,x.useLocation)()),o=(0,Ae.g)(),c=(0,x.useSearchParams)(),d=(u()(c,1)[0],n.globalLoading),j=function(){var e=l()(i()().mark((function e(){var t,n,l,c,u,d;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=a.pathname.split("/"),null==a||!a.search){e.next=9;break}return c.includes("paths")?u=c[2]:c.includes("tasks")&&(d=c[2]),e.next=6,r({type:"user/getUserInfo",payload:s()(s()(s()({},o),(0,P.oP)()),{},{subject_id:u,game_id:d,websiteName:"educoder"})});case 6:n=e.sent,e.next=14;break;case 9:return c.includes("tasks")&&(l=c[2]),e.next=13,r({type:"user/getUserInfo",payload:s()(s()({},o),{},{game_id:l})});case 13:n=e.sent;case 14:"游客"!==(null===(t=n)||void 0===t?void 0:t.username)&&("/login"===a.pathname&&(window.location.href="/"),"/user/login"!==a.pathname&&"/login"!==a.pathname&&window.sessionStorage.getItem("download_url")&&((0,P.Nd)("educoder",window.sessionStorage.getItem("download_url")),window.sessionStorage.removeItem("download_url")));case 15:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,m.useEffect)((function(){g.ZP.config({prefixCls:"ant",iconPrefixCls:"anticon",theme:s()({},Ue)})}),[n.theme]),(0,m.useEffect)((function(){j(),(0,P.Il)()}),[]),(0,m.useEffect)((function(){r({type:"globalSetting/query",payload:{}})}),[]),(0,m.useEffect)((function(){var e,t;if(a.pathname.indexOf("classrooms")>-1&&-1===a.pathname.indexOf("detail")||document.body.scrollIntoView(),a.pathname.indexOf("/classrooms/4RW9CYHY")>-1&&"localhost"!==document.domain&&"kepukehuan.educoder.net"!==document.domain)window.location.href="https://kepukehuan.educoder.net/classrooms/4RW9CYHY/exercise";else if(a.pathname.indexOf("/classrooms/qb4ft587")>-1&&"localhost"!==document.domain&&"kepukehuan.educoder.net"!==document.domain)window.location.href="https://kepukehuan.educoder.net/classrooms/qb4ft587/exercise";else if(a.pathname.indexOf("/classrooms/c5q9bsp2")>-1&&"localhost"!==document.domain&&"kepukehuan.educoder.net"!==document.domain)window.location.href="https://kepukehuan.educoder.net/classrooms/c5q9bsp2/exercise";else if(r({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),"https://jetcoder.educoder.net"!==window.location.href&&"https://jetcoder.educoder.net/"!==window.location.href)if(null!==(e=window.location.href)&&void 0!==e&&e.includes("/problems")&&null!==(t=window.location.href)&&void 0!==t&&t.includes("/share")){var n,i=null===(n=window.location)||void 0===n||null===(n=n.pathname)||void 0===n||null===(n=n.split("/"))||void 0===n?void 0:n[2];(0,Se.ZP)("/api/practices/".concat(i,"/start"),{method:"get"}).then((function(e){0===(null==e?void 0:e.status)&&x.history.replace("/problems/".concat(null==e?void 0:e.identifier,"/oj/").concat(i))}))}else{if("/admins"===a.pathname||"/sidekiq"===a.pathname){var s=document.domain;if(s.indexOf("educoder.net")>-1)switch(s){case"www.educoder.net":case"educoder.net":window.location.href="https://data.educoder.net".concat(a.pathname);break;default:var o=document.domain.split(".");o[0]=o[0]+"-data",window.location.href="https://".concat(o.join(".")).concat(a.pathname)}}h.Z.destroyAll()}else window.location.href="https://www.educoder.net/problems"}),[a.pathname]),(0,m.useEffect)((function(){n.updateData.system_update?localStorage.updateEndTime||(new Date).getTime()0&&h.Z.info({title:"客户端版本过低",centered:!0,content:(0,Z.jsxs)("div",{children:[(0,Z.jsx)("span",{className:"c-red",children:"您的头歌考试系统柜客户端版本过低"}),',请升级至最新版本后再使用,点击"确定"后将下载最新版本的客户端,',(0,Z.jsx)("span",{className:"c-red",children:"下载后请先退出客户端再安装"})]}),okText:"立即升级",visible:!0,maskClosable:!1,onOk:function(){return(0,P.FH)("Educoder.exe","https://www-cdn.educoder.net/app/Educoder.exe"),new Promise((function(){}))}})}}),[null==n||null===(t=n.setting)||void 0===t?void 0:t.version]);return(0,Z.jsx)(Re.StyleProvider,{transformers:[Re.legacyLogicalPropertiesTransformer],hashPriority:"high",children:(0,Z.jsxs)(g.ZP,{locale:f.Z,autoInsertSpaceInButton:!1,componentSize:"middle",theme:Ue,children:[(0,Z.jsx)(Ie,{}),(0,Z.jsx)(ze,{}),(0,Z.jsx)(We,{}),(0,Z.jsx)(Ge,{}),(0,Z.jsx)(Ce.Z,{size:"middle",spinning:d.show,tip:d.text,className:"ant-spin-nested-loading-black",children:(0,Z.jsx)(x.Outlet,{})})]})})}))},28103:function(e,t,n){n.d(t,{Z:function(){return m}});var r=n(92310),i=n.n(r),a=n(59301),s=n(36355),o=n(17313),l=n(83116),c=n(37613);const u=e=>{const{componentCls:t,sizePaddingEdgeHorizontal:n,colorSplit:r,lineWidth:i,textPaddingInline:a,orientationMargin:s,verticalMarginInline:l}=e;return{[t]:Object.assign(Object.assign({},(0,o.Wf)(e)),{borderBlockStart:`${i}px solid ${r}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:l,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${i}px solid ${r}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${e.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${t}-with-text`]:{display:"flex",alignItems:"center",margin:`${e.dividerHorizontalWithTextGutterMargin}px 0`,color:e.colorTextHeading,fontWeight:500,fontSize:e.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${r}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${i}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${t}-with-text-left`]:{"&::before":{width:100*s+"%"},"&::after":{width:100-100*s+"%"}},[`&-horizontal${t}-with-text-right`]:{"&::before":{width:100-100*s+"%"},"&::after":{width:100*s+"%"}},[`${t}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:a},"&-dashed":{background:"none",borderColor:r,borderStyle:"dashed",borderWidth:`${i}px 0 0`},[`&-horizontal${t}-with-text${t}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${t}-dashed`]:{borderInlineStartWidth:i,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${t}-with-text`]:{color:e.colorText,fontWeight:"normal",fontSize:e.fontSize},[`&-horizontal${t}-with-text-left${t}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${t}-inner-text`]:{paddingInlineStart:n}},[`&-horizontal${t}-with-text-right${t}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${t}-inner-text`]:{paddingInlineEnd:n}}})}};var d=(0,l.Z)("Divider",(e=>{const t=(0,c.TS)(e,{dividerHorizontalWithTextGutterMargin:e.margin,dividerHorizontalGutterMargin:e.marginLG,sizePaddingEdgeHorizontal:0});return[u(t)]}),(e=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:e.marginXS}))),p=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{const{getPrefixCls:t,direction:n,divider:r}=a.useContext(s.E_),{prefixCls:o,type:l="horizontal",orientation:c="center",orientationMargin:u,className:m,rootClassName:g,children:h,dashed:f,plain:x,style:j}=e,y=p(e,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),w=t("divider",o),[b,v]=d(w),M=c.length>0?`-${c}`:c,I=!!h,S="left"===c&&null!=u,N="right"===c&&null!=u,k=i()(w,null==r?void 0:r.className,v,`${w}-${l}`,{[`${w}-with-text`]:I,[`${w}-with-text${M}`]:I,[`${w}-dashed`]:!!f,[`${w}-plain`]:!!x,[`${w}-rtl`]:"rtl"===n,[`${w}-no-default-orientation-margin-left`]:S,[`${w}-no-default-orientation-margin-right`]:N},m,g),L=a.useMemo((()=>"number"==typeof u?u:/^\d+$/.test(u)?Number(u):u),[u]),T=Object.assign(Object.assign({},S&&{marginLeft:L}),N&&{marginRight:L});return b(a.createElement("div",Object.assign({className:k,style:Object.assign(Object.assign({},null==r?void 0:r.style),j)},y,{role:"separator"}),h&&"vertical"!==l&&a.createElement("span",{className:`${w}-inner-text`,style:T},h)))}},44e3:function(e,t,n){var r=n(84966),i=n(10711);const a=r.ZP;a.Header=r.h4,a.Footer=r.$_,a.Content=r.VY,a.Sider=i.Z,t.Z=a}}]); \ No newline at end of file