You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
30 KiB
2 lines
30 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[232],{LsG1:function(ie,Q,m){"use strict";m.r(Q);var Y=m("9og8"),A=m("q1tI"),g=m.n(A),ne=m("+L6B"),q=m("2/Rp"),re=m("5NDa"),B=m("5rEg"),pe=m("y8nQ"),W=m("Vl3Y"),ee=m("tJVT"),te=m("k1fw"),Ne=m("tJYU"),ve=m("4i/N"),ye=m("bRQS"),fe=m("VTBJ"),ge={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"},Ee=ge,we=m("6VBw"),de=function(u,S){return A.createElement(we.a,Object(fe.a)(Object(fe.a)({},u),{},{ref:S,icon:Ee}))};de.displayName="DoubleRightOutlined";var be=A.forwardRef(de),se=m("1vsH");function ue(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ue=function(){return u};var s,u={},S=Object.prototype,v=S.hasOwnProperty,P=Object.defineProperty||function(r,e,t){r[e]=t.value},F=typeof Symbol=="function"?Symbol:{},T=F.iterator||"@@iterator",D=F.asyncIterator||"@@asyncIterator",G=F.toStringTag||"@@toStringTag";function c(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{c({},"")}catch(r){c=function(t,n,a){return t[n]=a}}function $(r,e,t,n){var a=e&&e.prototype instanceof k?e:k,o=Object.create(a.prototype),i=new b(n||[]);return P(o,"_invoke",{value:V(r,t,i)}),o}function C(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=$;var z="suspendedStart",J="suspendedYield",I="executing",N="completed",d={};function k(){}function w(){}function E(){}var M={};c(M,T,function(){return this});var X=Object.getPrototypeOf,R=X&&X(X(_([])));R&&R!==S&&v.call(R,T)&&(M=R);var O=E.prototype=k.prototype=Object.create(M);function H(r){["next","throw","return"].forEach(function(e){c(r,e,function(t){return this._invoke(e,t)})})}function U(r,e){function t(a,o,i,l){var f=C(r[a],r,o);if(f.type!=="throw"){var y=f.arg,L=y.value;return L&&typeof L=="object"&&v.call(L,"__await")?e.resolve(L.__await).then(function(j){t("next",j,i,l)},function(j){t("throw",j,i,l)}):e.resolve(L).then(function(j){y.value=j,i(y)},function(j){return t("throw",j,i,l)})}l(f.arg)}var n;P(this,"_invoke",{value:function(o,i){function l(){return new e(function(f,y){t(o,i,f,y)})}return n=n?n.then(l,l):l()}})}function V(r,e,t){var n=z;return function(a,o){if(n===I)throw new Error("Generator is already running");if(n===N){if(a==="throw")throw o;return{value:s,done:!0}}for(t.method=a,t.arg=o;;){var i=t.delegate;if(i){var l=x(i,t);if(l){if(l===d)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===z)throw n=N,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=I;var f=C(r,e,t);if(f.type==="normal"){if(n=t.done?N:J,f.arg===d)continue;return{value:f.arg,done:t.done}}f.type==="throw"&&(n=N,t.method="throw",t.arg=f.arg)}}}function x(r,e){var t=e.method,n=r.iterator[t];if(n===s)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=s,x(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),d;var a=C(n,r.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,d;var o=a.arg;return o?o.done?(e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=s),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function h(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function p(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function b(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(h,this),this.reset(!0)}function _(r){if(r||r===""){var e=r[T];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function a(){for(;++t<r.length;)if(v.call(r,t))return a.value=r[t],a.done=!1,a;return a.value=s,a.done=!0,a};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return w.prototype=E,P(O,"constructor",{value:E,configurable:!0}),P(E,"constructor",{value:w,configurable:!0}),w.displayName=c(E,G,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===w||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,E):(r.__proto__=E,c(r,G,"GeneratorFunction")),r.prototype=Object.create(O),r},u.awrap=function(r){return{__await:r}},H(U.prototype),c(U.prototype,D,function(){return this}),u.AsyncIterator=U,u.async=function(r,e,t,n,a){a===void 0&&(a=Promise);var o=new U($(r,e,t,n),a);return u.isGeneratorFunction(e)?o:o.next().then(function(i){return i.done?i.value:o.next()})},H(O),c(O,G,"Generator"),c(O,T,function(){return this}),c(O,"toString",function(){return"[object Generator]"}),u.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},u.values=_,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(p),!e)for(var t in this)t.charAt(0)==="t"&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(y,L){return i.type="throw",i.arg=e,t.next=y,L&&(t.method="next",t.arg=s),!!L}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var l=v.call(o,"catchLoc"),f=v.call(o,"finallyLoc");if(l&&f){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&v.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if(a.type==="throw"){var o=a.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=s),d}},u}var Le={moveX:0,verify:0},K=function(s){return s[s.SET_MOVEX=0]="SET_MOVEX",s[s.VERIFY=1]="VERIFY",s}(K||{});function Oe(s,u){switch(u.type){case K.SET_MOVEX:return Object(te.a)(Object(te.a)({},s),{},{moveX:u.payload});case K.VERIFY:return Object(te.a)(Object(te.a)({},s),u.payload);default:throw new Error}}var _e=function(s){var u=s.value,S=s.onChange,v=s.onValidate,P=Object(A.useReducer)(Oe,Le),F=Object(ee.a)(P,2),T=F[0],D=F[1],G=T.moveX,c=T.verify,$=Object(A.useRef)(),C=Object(A.useRef)(),z=Object(A.useRef)(),J=Object(A.useRef)(),I=Object(A.useMemo)(function(){if(C.current)return C.current.getBoundingClientRect()},[C.current]);Object(A.useEffect)(function(){if(I){var d=function(){var O=Object(Y.a)(ue().mark(function H(U){var V;return ue().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!J.current){h.next=15;break}if(V=U.pageX-M,R&&(V=U.changedTouches[0].pageX-M),V<0&&(V=0),!(V>=X)){h.next=14;break}return J.current=!1,V=X,h.next=9,v();case 9:w=h.sent,D({type:K.VERIFY,payload:{moveX:V,verify:w}}),S(w),h.next=15;break;case 14:D({type:K.SET_MOVEX,payload:V});case 15:case"end":return h.stop()}},H)}));return function(U){return O.apply(this,arguments)}}(),k=function(){J.current=!1,w===0&&($.current.style.transition="left .5s ease",z.current.style.transition="width .5s ease",D({type:K.VERIFY,payload:{moveX:0}}))},w=0,E=I.width,M=I.left,X=E-48,R=!Object(se.G)();return R?(window.addEventListener("touchmove",d),window.addEventListener("touchend",k)):(window.addEventListener("mousemove",d),window.addEventListener("mouseup",k)),function(){R?(window.removeEventListener("touchmove",d),window.removeEventListener("touchend",k)):(window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",k))}}},[I,se.G]),Object(A.useEffect)(function(){D({type:K.VERIFY,payload:{verify:u,moveX:u?(I==null?void 0:I.width)-48:0}})},[u]);function N(){c||(J.current=!0,$.current.style.transition="",z.current.style.transition="")}return g.a.createElement("div",{ref:C,className:"unlock-wrapper"},g.a.createElement("div",{ref:z,className:c===1?"unlock-error-bg":"unlock-bg",style:{width:G}}),g.a.createElement("div",{className:"unlock-text"},c?c===1?"\u9A8C\u8BC1\u5931\u8D25":"\u9A8C\u8BC1\u901A\u8FC7":"\u62D6\u52A8\u6ED1\u5757\u81F3\u53F3\u4FA7\u9A8C\u8BC1"),g.a.createElement("div",{ref:$,onTouchStart:N,onMouseDown:N,style:{left:G},className:"unlock-handler"},c?c===1?g.a.createElement(ve.a,null):g.a.createElement(ye.a,null):g.a.createElement(be,null)))},je=m("Ty5D"),he=m("9kvl"),Re=m("55Ip");function Z(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Z=function(){return u};var s,u={},S=Object.prototype,v=S.hasOwnProperty,P=Object.defineProperty||function(r,e,t){r[e]=t.value},F=typeof Symbol=="function"?Symbol:{},T=F.iterator||"@@iterator",D=F.asyncIterator||"@@asyncIterator",G=F.toStringTag||"@@toStringTag";function c(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{c({},"")}catch(r){c=function(t,n,a){return t[n]=a}}function $(r,e,t,n){var a=e&&e.prototype instanceof k?e:k,o=Object.create(a.prototype),i=new b(n||[]);return P(o,"_invoke",{value:V(r,t,i)}),o}function C(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=$;var z="suspendedStart",J="suspendedYield",I="executing",N="completed",d={};function k(){}function w(){}function E(){}var M={};c(M,T,function(){return this});var X=Object.getPrototypeOf,R=X&&X(X(_([])));R&&R!==S&&v.call(R,T)&&(M=R);var O=E.prototype=k.prototype=Object.create(M);function H(r){["next","throw","return"].forEach(function(e){c(r,e,function(t){return this._invoke(e,t)})})}function U(r,e){function t(a,o,i,l){var f=C(r[a],r,o);if(f.type!=="throw"){var y=f.arg,L=y.value;return L&&typeof L=="object"&&v.call(L,"__await")?e.resolve(L.__await).then(function(j){t("next",j,i,l)},function(j){t("throw",j,i,l)}):e.resolve(L).then(function(j){y.value=j,i(y)},function(j){return t("throw",j,i,l)})}l(f.arg)}var n;P(this,"_invoke",{value:function(o,i){function l(){return new e(function(f,y){t(o,i,f,y)})}return n=n?n.then(l,l):l()}})}function V(r,e,t){var n=z;return function(a,o){if(n===I)throw new Error("Generator is already running");if(n===N){if(a==="throw")throw o;return{value:s,done:!0}}for(t.method=a,t.arg=o;;){var i=t.delegate;if(i){var l=x(i,t);if(l){if(l===d)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===z)throw n=N,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=I;var f=C(r,e,t);if(f.type==="normal"){if(n=t.done?N:J,f.arg===d)continue;return{value:f.arg,done:t.done}}f.type==="throw"&&(n=N,t.method="throw",t.arg=f.arg)}}}function x(r,e){var t=e.method,n=r.iterator[t];if(n===s)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=s,x(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),d;var a=C(n,r.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,d;var o=a.arg;return o?o.done?(e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=s),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function h(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function p(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function b(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(h,this),this.reset(!0)}function _(r){if(r||r===""){var e=r[T];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function a(){for(;++t<r.length;)if(v.call(r,t))return a.value=r[t],a.done=!1,a;return a.value=s,a.done=!0,a};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return w.prototype=E,P(O,"constructor",{value:E,configurable:!0}),P(E,"constructor",{value:w,configurable:!0}),w.displayName=c(E,G,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===w||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,E):(r.__proto__=E,c(r,G,"GeneratorFunction")),r.prototype=Object.create(O),r},u.awrap=function(r){return{__await:r}},H(U.prototype),c(U.prototype,D,function(){return this}),u.AsyncIterator=U,u.async=function(r,e,t,n,a){a===void 0&&(a=Promise);var o=new U($(r,e,t,n),a);return u.isGeneratorFunction(e)?o:o.next().then(function(i){return i.done?i.value:o.next()})},H(O),c(O,G,"Generator"),c(O,T,function(){return this}),c(O,"toString",function(){return"[object Generator]"}),u.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},u.values=_,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(p),!e)for(var t in this)t.charAt(0)==="t"&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(y,L){return i.type="throw",i.arg=e,t.next=y,L&&(t.method="next",t.arg=s),!!L}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var l=v.call(o,"catchLoc"),f=v.call(o,"finallyLoc");if(l&&f){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&v.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if(a.type==="throw"){var o=a.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=s),d}},u}var oe={height:48},me=/(\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,xe={timer:0},ae=function(s){return s[s.setTimer=0]="setTimer",s}(ae||{});function Pe(s,u){switch(u.type){case ae.setTimer:return Object(te.a)(Object(te.a)({},s),{},{timer:u.payload});default:throw new Error}}var Te=function(s){var u=s.validateName,S=s.getCode,v=s.callback,P=s.style,F=P===void 0?{}:P,T=Object(je.l)(),D=W.a.useForm(),G=Object(ee.a)(D,1),c=G[0],$=Object(A.useReducer)(Pe,xe),C=Object(ee.a)($,2),z=C[0],J=C[1],I=Object(A.useState)(!1),N=Object(ee.a)(I,2),d=N[0],k=N[1],w=z.timer;function E(x){return M.apply(this,arguments)}function M(){return M=Object(Y.a)(Z().mark(function x(h){var p,b,_,r,e,t,n,a,o,i,l;return Z().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return p=h.login,b=h.new_password,_=h.code,r=h.new_password_confirmation,y.next=3,v({login:p,new_password_confirmation:r,new_password:b,code:_});case 3:e=y.sent,t=e.message,n=e.status,a=e.show,o=e.start_date,n===0?(a?(localStorage.setItem("extension-modal","exist"),localStorage.setItem("extension-date",o)):localStorage.removeItem("extension-modal"),l=(i=T.query)===null||i===void 0?void 0:i.from,l&&l.indexOf("login")<0?he.c.replace(l):he.c.replace("/")):c.setFields([{name:"code",errors:[t]}]);case 9:case"end":return y.stop()}},x)})),M.apply(this,arguments)}function X(){return R.apply(this,arguments)}function R(){return R=Object(Y.a)(Z().mark(function x(){var h,p,b,_,r,e;return Z().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(h=c.getFieldValue("login"),p=0,!(!me.test(h)||h.indexOf(" ")>-1)){n.next=6;break}return c.setFields([{name:"login",errors:["\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"]}]),p=1,n.abrupt("return",p);case 6:return n.next=8,u({login:h,type:2});case 8:return b=n.sent,_=b.status,r=b.message,e=_>0,e?p=2:(c.setFields([{name:"login",errors:[r]}]),p=1),n.abrupt("return",p);case 14:case"end":return n.stop()}},x)})),R.apply(this,arguments)}var O=function(){var x=Object(Y.a)(Z().mark(function h(){var p,b,_,r,e;return Z().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(p=c.getFieldValue("verify"),b=c.getFieldValue("login"),p){n.next=6;break}c.validateFields(["verify"]),n.next=15;break;case 6:return k(!0),n.next=9,S({login:b,type:2,smscode:Object(se.Q)(b)});case 9:_=n.sent,r=_.status,e=_.message,r<0&&c.setFields([{name:"code",errors:[e]}]),J({type:ae.setTimer,payload:60}),k(!1);case 15:case"end":return n.stop()}},h)}));return function(){return x.apply(this,arguments)}}();function H(x,h){var p=c.getFieldValue("new_password_confirmation");if(!h)return Promise.resolve();if(c.setFields([{name:"new_password_confirmation",errors:p&&p!==h?["\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4"]:[]}]),h.indexOf(" ")>-1)return Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C");var b=h.length;return b>=8&&b<=16?Promise.resolve():Promise.reject("\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C")}Object(A.useEffect)(function(){w>0&&setTimeout(function(){J({type:ae.setTimer,payload:w-1})},1e3)},[w]);var U=function(h,p){return p?Promise.resolve():Promise.reject("\u8BF7\u62D6\u52A8\u6ED1\u5757\u9A8C\u8BC1")},V=function(h,p){return p?p.indexOf(" ")>-1?Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):me.test(p)?Promise.resolve():Promise.reject("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"):Promise.resolve()};return g.a.createElement(W.a,{layout:"vertical",form:c,style:F,initialValues:{autologin:!0,protool:!0},onFinish:E},g.a.createElement(W.a.Item,{name:"login",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u6216\u90AE\u7BB1"},{validator:V}]},g.a.createElement(B.a,{style:oe,size:"large",placeholder:"\u8BF7\u8F93\u5165\u6709\u6548\u7684\u624B\u673A\u53F7/\u90AE\u7BB1\u53F7",onChange:function(){return c.setFieldsValue({verify:0})}})),g.a.createElement(W.a.Item,{name:"verify",rules:[{validator:U}]},g.a.createElement(_e,{onValidate:X})),g.a.createElement(W.a.Item,{name:"new_password",rules:[{required:!0,message:"\u8BF7\u8F93\u51658-16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199\u3001\u4E0D\u80FD\u4F7F\u7528\u7A7A\u683C"},{validator:H}]},g.a.createElement(B.a.Password,{style:oe,size:"large",placeholder:"\u8F93\u51658\uFF5E16\u4F4D\u5BC6\u7801\uFF0C\u533A\u5206\u5927\u5C0F\u5199",visibilityToggle:!1})),g.a.createElement(W.a.Item,{name:"new_password_confirmation",rules:[{required:!0,message:"\u8BF7\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801"},function(x){var h=x.getFieldValue;return{validator:function(b,_){return!_||h("new_password")===_?Promise.resolve():Promise.reject("\u4E24\u6B21\u5BC6\u7801\u4E0D\u4E00\u81F4")}}}]},g.a.createElement(B.a.Password,{style:oe,size:"large",placeholder:"\u518D\u6B21\u8F93\u5165\u65B0\u5BC6\u7801",visibilityToggle:!1})),g.a.createElement(W.a.Item,{name:"code",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801"}]},g.a.createElement(B.a,{suffix:g.a.createElement(q.a,{loading:d,type:"link",onClick:O,disabled:w>0}," ",w===0?"\u83B7\u53D6\u9A8C\u8BC1\u7801":"".concat(w,"\u79D2\u53EF\u91CD\u65B0\u83B7\u53D6")),style:{paddingRight:2,height:48},placeholder:"\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801",size:"large"})),g.a.createElement(W.a.Item,null,g.a.createElement(q.a,{size:"large",type:"primary",htmlType:"submit",block:!0,style:oe}," \u5B8C\u6210 ")),g.a.createElement(W.a.Item,{className:"tc"},g.a.createElement(Re.Link,{to:"/user/login"},"\u8FD4\u56DE\u767B\u5F55")))},ce=m("YrPe");function le(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */le=function(){return u};var s,u={},S=Object.prototype,v=S.hasOwnProperty,P=Object.defineProperty||function(r,e,t){r[e]=t.value},F=typeof Symbol=="function"?Symbol:{},T=F.iterator||"@@iterator",D=F.asyncIterator||"@@asyncIterator",G=F.toStringTag||"@@toStringTag";function c(r,e,t){return Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}),r[e]}try{c({},"")}catch(r){c=function(t,n,a){return t[n]=a}}function $(r,e,t,n){var a=e&&e.prototype instanceof k?e:k,o=Object.create(a.prototype),i=new b(n||[]);return P(o,"_invoke",{value:V(r,t,i)}),o}function C(r,e,t){try{return{type:"normal",arg:r.call(e,t)}}catch(n){return{type:"throw",arg:n}}}u.wrap=$;var z="suspendedStart",J="suspendedYield",I="executing",N="completed",d={};function k(){}function w(){}function E(){}var M={};c(M,T,function(){return this});var X=Object.getPrototypeOf,R=X&&X(X(_([])));R&&R!==S&&v.call(R,T)&&(M=R);var O=E.prototype=k.prototype=Object.create(M);function H(r){["next","throw","return"].forEach(function(e){c(r,e,function(t){return this._invoke(e,t)})})}function U(r,e){function t(a,o,i,l){var f=C(r[a],r,o);if(f.type!=="throw"){var y=f.arg,L=y.value;return L&&typeof L=="object"&&v.call(L,"__await")?e.resolve(L.__await).then(function(j){t("next",j,i,l)},function(j){t("throw",j,i,l)}):e.resolve(L).then(function(j){y.value=j,i(y)},function(j){return t("throw",j,i,l)})}l(f.arg)}var n;P(this,"_invoke",{value:function(o,i){function l(){return new e(function(f,y){t(o,i,f,y)})}return n=n?n.then(l,l):l()}})}function V(r,e,t){var n=z;return function(a,o){if(n===I)throw new Error("Generator is already running");if(n===N){if(a==="throw")throw o;return{value:s,done:!0}}for(t.method=a,t.arg=o;;){var i=t.delegate;if(i){var l=x(i,t);if(l){if(l===d)continue;return l}}if(t.method==="next")t.sent=t._sent=t.arg;else if(t.method==="throw"){if(n===z)throw n=N,t.arg;t.dispatchException(t.arg)}else t.method==="return"&&t.abrupt("return",t.arg);n=I;var f=C(r,e,t);if(f.type==="normal"){if(n=t.done?N:J,f.arg===d)continue;return{value:f.arg,done:t.done}}f.type==="throw"&&(n=N,t.method="throw",t.arg=f.arg)}}}function x(r,e){var t=e.method,n=r.iterator[t];if(n===s)return e.delegate=null,t==="throw"&&r.iterator.return&&(e.method="return",e.arg=s,x(r,e),e.method==="throw")||t!=="return"&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+t+"' method")),d;var a=C(n,r.iterator,e.arg);if(a.type==="throw")return e.method="throw",e.arg=a.arg,e.delegate=null,d;var o=a.arg;return o?o.done?(e[r.resultName]=o.value,e.next=r.nextLoc,e.method!=="return"&&(e.method="next",e.arg=s),e.delegate=null,d):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function h(r){var e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e.afterLoc=r[3]),this.tryEntries.push(e)}function p(r){var e=r.completion||{};e.type="normal",delete e.arg,r.completion=e}function b(r){this.tryEntries=[{tryLoc:"root"}],r.forEach(h,this),this.reset(!0)}function _(r){if(r||r===""){var e=r[T];if(e)return e.call(r);if(typeof r.next=="function")return r;if(!isNaN(r.length)){var t=-1,n=function a(){for(;++t<r.length;)if(v.call(r,t))return a.value=r[t],a.done=!1,a;return a.value=s,a.done=!0,a};return n.next=n}}throw new TypeError(typeof r+" is not iterable")}return w.prototype=E,P(O,"constructor",{value:E,configurable:!0}),P(E,"constructor",{value:w,configurable:!0}),w.displayName=c(E,G,"GeneratorFunction"),u.isGeneratorFunction=function(r){var e=typeof r=="function"&&r.constructor;return!!e&&(e===w||(e.displayName||e.name)==="GeneratorFunction")},u.mark=function(r){return Object.setPrototypeOf?Object.setPrototypeOf(r,E):(r.__proto__=E,c(r,G,"GeneratorFunction")),r.prototype=Object.create(O),r},u.awrap=function(r){return{__await:r}},H(U.prototype),c(U.prototype,D,function(){return this}),u.AsyncIterator=U,u.async=function(r,e,t,n,a){a===void 0&&(a=Promise);var o=new U($(r,e,t,n),a);return u.isGeneratorFunction(e)?o:o.next().then(function(i){return i.done?i.value:o.next()})},H(O),c(O,G,"Generator"),c(O,T,function(){return this}),c(O,"toString",function(){return"[object Generator]"}),u.keys=function(r){var e=Object(r),t=[];for(var n in e)t.push(n);return t.reverse(),function a(){for(;t.length;){var o=t.pop();if(o in e)return a.value=o,a.done=!1,a}return a.done=!0,a}},u.values=_,b.prototype={constructor:b,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=s,this.done=!1,this.delegate=null,this.method="next",this.arg=s,this.tryEntries.forEach(p),!e)for(var t in this)t.charAt(0)==="t"&&v.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=s)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if(e.type==="throw")throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(y,L){return i.type="throw",i.arg=e,t.next=y,L&&(t.method="next",t.arg=s),!!L}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if(o.tryLoc==="root")return n("end");if(o.tryLoc<=this.prev){var l=v.call(o,"catchLoc"),f=v.call(o,"finallyLoc");if(l&&f){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!f)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&v.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&(e==="break"||e==="continue")&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(i)},complete:function(e,t){if(e.type==="throw")throw e.arg;return e.type==="break"||e.type==="continue"?this.next=e.arg:e.type==="return"?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):e.type==="normal"&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),p(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if(a.type==="throw"){var o=a.arg;p(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:_(e),resultName:t,nextLoc:n},this.method==="next"&&(this.arg=s),d}},u}var Ue=Q.default=function(){var s={getCode:ce.a,callback:function(){var u=Object(Y.a)(le().mark(function v(P){var F;return le().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.next=2,Object(ce.c)(P);case 2:return F=D.sent,D.abrupt("return",F);case 4:case"end":return D.stop()}},v)}));function S(v){return u.apply(this,arguments)}return S}(),validateName:ce.d};return g.a.createElement(Te,s)}},YrPe:function(ie,Q,m){"use strict";m.d(Q,"d",function(){return A}),m.d(Q,"a",function(){return g}),m.d(Q,"b",function(){return ne}),m.d(Q,"e",function(){return q}),m.d(Q,"c",function(){return re});var Y=m("ErOA");function A(B){return Object(Y.c)("accounts/valid_email_and_phone.json",B)}function g(B){return Object(Y.c)("accounts/get_verification_code.json",B)}function ne(B){return Object(Y.f)("accounts/register.json",B)}function q(B){return Object(Y.f)("weapps/register.json",B)}function re(B){return Object(Y.f)("accounts/reset_password.json",B)}},bRQS:function(ie,Q,m){"use strict";var Y=m("VTBJ"),A=m("q1tI"),g={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},ne=g,q=m("6VBw"),re=function(W,ee){return A.createElement(q.a,Object(Y.a)(Object(Y.a)({},W),{},{ref:ee,icon:ne}))};re.displayName="CheckOutlined";var B=Q.a=A.forwardRef(re)},tJYU:function(ie,Q,m){}}]);
|