PageSourceSearch

https://hoidap247.com/_next/static/QRoNg4sjQuHbBukQ_2Tk5/pages/register_page.js

js hoidap247.com collected 2026-09-26 17:57:55 UTC 77,472 bytes, 1 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([["98fb"],{"1Jdo":function(e,t,n){"use strict";function a(e){return!!new RegExp("^null|[0]{1}[1235789]{1}[0-9]{8}$").test(e)}function r(e){var t=new RegExp(".*facebook.com/.*"),n=new RegExp(".*Facebook.com/.*");return!(!t.test(e)&&!n.test(e))}n.d(t,"b",function(){return a}),n.d(t,"a",function(){return r})},"6CmU":function(e,t,n){n("LzdP"),e.exports=n("WEpk").Date.now},CXxv:function(e,t,n){"use strict";n.d(t,"d",function(){return j}),n.d(t,"a",function(){return S}),n.d(t,"b",function(){return C}),n.d(t,"c",function(){return L}),n.d(t,"i",function(){return I}),n.d(t,"j",function(){return V}),n.d(t,"h",function(){return R}),n.d(t,"e",function(){return H}),n.d(t,"g",function(){return D}),n.d(t,"f",function(){return F}),n.d(t,"s",function(){return P}),n.d(t,"t",function(){return M}),n.d(t,"F",function(){return B}),n.d(t,"x",function(){return Z}),n.d(t,"v",function(){return z}),n.d(t,"u",function(){return Q}),n.d(t,"D",function(){return X}),n.d(t,"w",function(){return J}),n.d(t,"k",function(){return ee}),n.d(t,"C",function(){return te}),n.d(t,"A",function(){return ne}),n.d(t,"z",function(){return ae}),n.d(t,"r",function(){return re}),n.d(t,"B",function(){return oe}),n.d(t,"p",function(){return se}),n.d(t,"q",function(){return le}),n.d(t,"o",function(){return he}),n.d(t,"n",function(){return fe}),n.d(t,"E",function(){return ge}),n.d(t,"m",function(){return ye}),n.d(t,"y",function(){return Ee}),n.d(t,"l",function(){return _e});var a=n("TRZx"),r=n.n(a),i=n("Bhuq"),o=n.n(i),c=n("SqZg"),s=n.n(c),u=n("Z7t5"),l=n.n(u),p=n("hfKm"),h=n.n(p),m=n("Cg2A"),f=n.n(m),d=n("O40h"),g=n("eVuF"),v=n.n(g),y=n("v3Uf"),b=n("amO9"),E=n("nOHt"),w=n.n(E),k=n("HqNx"),x=n("Mw6Q");function O(){O=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=h.a||function(e,t,n){e[t]=n.value},i="function"==typeof l.a?l.a:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",p=i.toStringTag||"@@toStringTag";function m(e,t,n){return h()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(G){m=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=s()(i.prototype),c=new I(r||[]);return a(o,"_invoke",{value:S(e,n,c)}),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(G){return{type:"throw",arg:G}}}e.wrap=f;var g={};function y(){}function b(){}function E(){}var w={};m(w,c,function(){return this});var _=o.a,k=_&&_(_(V([])));k&&k!==t&&n.call(k,c)&&(w=k);var x=E.prototype=y.prototype=s()(w);function j(e){["next","throw","return"].forEach(function(t){m(e,t,function(e){return this._invoke(t,e)})})}function N(e,t){var r;a(this,"_invoke",{value:function(a,i){function o(){return new t(function(r,o){!function a(r,i,o,c){var s=d(e[r],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){a("next",e,o,c)},function(e){a("throw",e,o,c)}):t.resolve(l).then(function(e){u.value=e,o(u)},function(e){return a("throw",e,o,c)})}c(s.arg)}(a,i,r,o)})}return r=r?r.then(o,o):o()}})}function S(e,t,n){var a="suspendedStart";return function(r,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw i;return R()}for(n.method=r,n.arg=i;;){var o=n.delegate;if(o){var c=C(o,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var s=d(e,t,n);if("normal"===s.type){if(a=n.done?"completed":"suspendedYield",s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a="completed",n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var r=d(a,e.iterator,t.arg);
1if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,g;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,g):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,g)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function V(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:R}}function R(){return{value:void 0,done:!0}}return b.prototype=E,a(x,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:b,configurable:!0}),b.displayName=m(E,p,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return r.a?r()(e,E):(e.__proto__=E,m(e,p,"GeneratorFunction")),e.prototype=s()(x),e},e.awrap=function(e){return{__await:e}},j(N.prototype),m(N.prototype,u,function(){return this}),e.AsyncIterator=N,e.async=function(t,n,a,r,i){void 0===i&&(i=v.a);var o=new N(f(t,n,a,r),i);return e.isGeneratorFunction(n)?o:o.next().then(function(e){return e.done?e.value:o.next()})},j(x),m(x,p,"Generator"),m(x,c,function(){return this}),m(x,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=V,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(n,a){return o.type="throw",o.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},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),T(n),g}},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("throw"===a.type){var r=a.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:V(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),g}},e}var j="LOGIN_SUCCESS",N="LOGIN_REQ",S="LOGIN_REQ_FULFILLED",C="LOGIN_REQ_PENDING",L="LOGIN_REQ_REJECTED",T="REGISTER_REQ",I="UPDATE_USER_INFO",V="USER_RANK",R="UPDATE_PROFILE",G="UPDATE_YOUR_INFO",H="REGISTER_FB",A="RESET_NEW_WARNING",q="UNLOCK_USER",U="CLEAR_SPECIAL_NOTIFY",D="UPDATE_LIST_WRITING_THANKED",F="UPDATE_LIST_IGNORE_NOTIFY";function P(e){return function(t){return t({type:N,payload:(n=e,b.a.removeUserRegister(),b.a.removeUser(),new v.a(function(e,t){Object(y.a)("user/loginFb","post",n).then(function(t){var n={};return(n=t.data).code=t.code,n.status=t.status,n.message=t.message,n.isGuest=!1,200==t.code&&(b.a.setUser(n),Object(x.b)("user","register","reg-fb",1)),b.a.setRegisterFb(n),e(n)}).catch(function(e){return t(e)})}))}).then(function(){t(Y(b.a.getRegisterFb()))}).catch(function(e){});var n}}function M(e){return function(t){return t({type:N,payload:(n=e,b.a.removeUserRegister(),b.a.removeUser(),new v.a(function(e,t){Object(y.a)("user/loginGG","post",n).then(function(t){var n={};return(n=t.data).code=t.code,n.status=t.status,n.message=t.message,n.isGuest=!1,200==t.code&&(b.a.setUser(n),Object(x.b)("user","register","reg-gg",1)),b.a.setRegisterFb(n),e(n)}).catch(function(e){return t(e)})}))}).then(function(){t(Y(b.a.getRegisterFb()))}).catch(function(e){});var n}}function B(e){return new v.a(function(t,n){Object(y.a)("user/validEmail","post",e).then(function(e){return t(e)}).catch(function(e){return n(e)})})}function K(e){return new v.a(function(t,n){b.a.removeUser(),Object(y.a)("user/register","post",e).then(function(e){var n={};return(n=e.data).code=e.code,n.isGuest=!1,b.a.setUser(n),200===e.code?Object(x.b)("user","register","reg-email",1):0===e.status&&Object(k.a)("error",e.message),t(e)}).catch(function(e){return n(e)})})}function Z(e){return function(t){return t({type:T,payload:K(e)}).then(function(){t(Y(b.a.getUser()))}).catch(function(e){})}}function Y(e){return 200==e.code?{type:j,userInfo:e}:{type:H,userInfo:e}}function z(e){return function(t){return t({type:N,payload:(n=e,new v.a(function(e,t){Object(y.a)("user/login","post",n).then(function(t){var n={};if((n=t.data).code=t.code,n.isGuest=!1,b.a.setUser(n),!n.easy_password)return 0===t.status&&Object(k.a)("error",t.message),e(t);Object(k.a)("warning","Mật khẩu của bạn rất dễ đoán, hãy đổi thành mật khẩu khó đoán hơn!"),setTimeout(function(){return e(t)},6e3)}).catch(function(e){return t(e)})}))}).then(function(){t(Y(b.a.getUser()))}).catch(function(e){});var n}}function Q(e){return W.apply(this,arguments)}function W(){return(W=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return b.a.clearAll(),e.next=3,Object(y.a)("user/loginPartner","post",t);case 3:if(0!=(n=e.sent).status){e.next=8;break}return Object(k.a)("error",n.message),w.a.push("/"),e.abrupt("return",{type:""});case 8:return b.a.setUser(n.data),n.data&&_.isEmpty(n.data.last_login_date)&&Object(x.b)("user","register","reg-ts247",1),e.abrupt("return",{type:j,userInfo:n.data});case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function X(e){return $.apply(this,arguments)}function $(){return($=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/updateUsername","post",t);case 2:return n=e.sent,b.a.setUser(n.data),e.abrupt("return",{type:j,userInfo:n.data});case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function J(){return function(e){b.a.clearAll(),localStorage.setItem("logout-event",f()()),w.a.push("/dang-nhap")}}function ee(e){return Object(y.a)("user/validUsername","post",e)}var te=function(e){return{type:I,data:e}},ne=function(e){return{type:D,data:e}},ae=function(e){return{type:F,data:e}};function re(e){return ie.apply(this,arguments)}function ie(){return(ie=Object(d.default)(O().mark(function e(t){var n,a,r;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/getRank","post",t);case 2:if(n=e.sent,!(a=b.a.getUser())||!n){e.next=10;break}return e.next=7,Object(y.a)("user/loggedRankInfo?subjectId=".concat(t.subjectId,"&type_filter_time=").concat(t.type_filter_time),"GET");case 7:r=e.sent,n.data.find(function(e){return e.user.id===a.id})||n.data.push(r.data);case 10:return e.abrupt("return",{type:V,data:n.data});case 11:case"end":return e.stop()}},e)}))).apply(this,arguments)}function oe(e){return ce.apply(this,arguments)}function ce(){return(ce=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/profile","post",t);case 2:return(n=e.sent)&&b.a.setUser(n),e.abrupt("return",{type:R,data:n});case 5:case"end":return e.stop()}},e)}))).apply(this,arguments)}function se(e){return ue.apply(this,arguments)}function ue(){return(ue=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/wInfo","post",t,2);case 2:if(0!=(n=e.sent).status){e.next=7;break}return Object(k.a)("error",n.message?n.message:"Có lỗi xảy ra!"),"undefined"!=typeof window&&setTimeout(function(){if(localStorage.getItem("store_url")){if(_.isEmpty(localStorage.getItem("question_data"))){var e=localStorage.getItem("store_url").split("/");"cau-hoi"==e[1]&&e[2]?(localStorage.removeItem("store_url"),w.a.push("/cau-hoi/"+e[2])):"answer_question"==e[1]&&e[2]?(localStorage.removeItem("store_url"),w.a.push("/answer_question/"+e[2])):(localStorage.removeItem("store_url"),w.a.push("/"))}}else w.a.push("/")},3e3),e.abrupt("return",null);case 7:return e.abrupt("return",n.data);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function le(e){return pe.apply(this,arguments)}function pe(){return(pe=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/infoForListAnswer","post",t);case 2:if(0!=(n=e.sent).status){e.next=7;break}return Object(k.a)("error",n.message?n.message:"Có lỗi xảy ra!"),w.a.push("/"),e.abrupt("return",null);case 7:return e.abrupt("return",n.data);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function he(e){return me.apply(this,arguments)}function me(){return(me=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/getFullRank","post",t);case 2:if(0!=(n=e.sent).status){e.next=7;break}return Object(k.a)("error",n.message?n.message:"Có lỗi xảy ra!"),w.a.push("/"),e.abrupt("return",null);case 7:return e.abrupt("return",n.data);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function fe(e){return de.apply(this,arguments)}function de(){return(de=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/editInfo","post",t);case 2:if(0!==(n=e.sent).status){e.next=8;break}return Object(k.a)("error",n.message),e.abrupt("return",{type:G,data:n});case 8:return Object(k.a)("success","Cập nhật thông tin thành công!"),e.abrupt("return",{type:G,data:n});case 10:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ge(e){return ve.apply(this,arguments)}function ve(){return(ve=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/uploadAvatar","post",t);case 2:if(0!=(n=e.sent).status){e.next=7;break}return Object(k.a)("error",n.message?n.message:"Có lỗi xảy ra!"),w.a.push("/"),e.abrupt("return",null);case 7:return e.abrupt("return",n.data);case 8:case"end":return e.stop()}},e)}))).apply(this,arguments)}function ye(){return be.apply(this,arguments)}function be(){return(be=Object(d.default)(O().mark(function e(){var t;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/reset_new_warning","post",{});case 2:return t=e.sent,e.abrupt("return",{type:A,data:t});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function Ee(){return we.apply(this,arguments)}function we(){return(we=Object(d.default)(O().mark(function e(){var t;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/unlock","post",{});case 2:return t=e.sent,e.abrupt("return",{type:q,data:t});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function _e(e){return ke.apply(this,arguments)}function ke(){return(ke=Object(d.default)(O().mark(function e(t){var n;return O().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(y.a)("user/clearSpecialNotify","post",t);case 2:return n=e.sent,e.abrupt("return",{type:U,data:n});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}},Cg2A:function(e,t,n){e.exports=n("6CmU")},EdAj:function(e,t,n){"use strict";n.d(t,"a",function(){return o}
1),n.d(t,"b",function(){return s});var a=n("q1tI"),r=n.n(a);const i=Object(a.createContext)(null);function o({clientId:e,onScriptLoadSuccess:t,onScriptLoadError:n,children:o}){const c=function(e={}){const{onScriptLoadSuccess:t,onScriptLoadError:n}=e,[r,i]=Object(a.useState)(!1),o=Object(a.useRef)(t);o.current=t;const c=Object(a.useRef)(n);return c.current=n,Object(a.useEffect)(()=>{const e=document.createElement("script");return e.src="https://accounts.google.com/gsi/client",e.async=!0,e.defer=!0,e.onload=(()=>{var e;i(!0),null===(e=o.current)||void 0===e||e.call(o)}),e.onerror=(()=>{var e;i(!1),null===(e=c.current)||void 0===e||e.call(c)}),document.body.appendChild(e),()=>{document.body.removeChild(e)}},[]),r}({onScriptLoadSuccess:t,onScriptLoadError:n}),s=Object(a.useMemo)(()=>({clientId:e,scriptLoadedSuccessfully:c}),[e,c]);return r.a.createElement(i.Provider,{value:s},o)}function c(){const e=Object(a.useContext)(i);if(!e)throw new Error("Google OAuth components must be used within GoogleOAuthProvider");return e}function s({flow:e="implicit",scope:t="",onSuccess:n,onError:r,onNonOAuthError:i,overrideScope:o,state:s,...u}){const{clientId:l,scriptLoadedSuccessfully:p}=c(),h=Object(a.useRef)(),m=Object(a.useRef)(n);m.current=n;const f=Object(a.useRef)(r);f.current=r;const d=Object(a.useRef)(i);d.current=i,Object(a.useEffect)(()=>{var n;if(!p)return;const a="implicit"===e?"initTokenClient":"initCodeClient",r=null===(n=null===window||void 0===window?void 0:window.google)||void 0===n?void 0:n.accounts.oauth2[a]({client_id:l,scope:o?t:`openid profile email ${t}`,callback:e=>{var t,n;if(e.error)return null===(t=f.current)||void 0===t?void 0:t.call(f,e);null===(n=m.current)||void 0===n||n.call(m,e)},error_callback:e=>{var t;null===(t=d.current)||void 0===t||t.call(d,e)},state:s,...u});h.current=r},[l,p,e,t,s]);const g=Object(a.useCallback)(e=>{var t;return null===(t=h.current)||void 0===t?void 0:t.requestAccessToken(e)},[]),v=Object(a.useCallback)(()=>{var e;return null===(e=h.current)||void 0===e?void 0:e.requestCode()},[]);return"implicit"===e?g:v}},LzdP:function(e,t,n){var a=n("Y7ZC");a(a.S,"Date",{now:function(){return(new Date).getTime()}})},PXnE:function(e,t,n){"use strict";n.r(t);var a=n("eVuF"),r=n.n(a),i=n("TRZx"),o=n.n(i),c=n("Bhuq"),s=n.n(c),u=n("SqZg"),l=n.n(u),p=n("Z7t5"),h=n.n(p),m=n("hfKm"),f=n.n(m),d=n("O40h"),g=n("doui"),v=n("q1tI"),y=n.n(v),b=n("LvDl"),E=n.n(b),w=n("YFqc"),_=n.n(w),k=n("CXxv"),x=n("oGV+"),O=n("f9BK"),j=n("eKWZ"),N=n("/MKj"),S=n("TJpk"),C=n.n(S),L=n("nOHt"),T=n.n(L),I=n("tseg"),V=n.n(I),R=n("oHge"),G=n("EdAj");function H(){H=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=f.a||function(e,t,n){e[t]=n.value},i="function"==typeof h.a?h.a:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",p=i.toStringTag||"@@toStringTag";function m(e,t,n){return f()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(R){m=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=l()(i.prototype),c=new T(r||[]);return a(o,"_invoke",{value:N(e,n,c)}),o}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(R){return{type:"throw",arg:R}}}e.wrap=d;var v={};function y(){}function b(){}function E(){}var w={};m(w,c,function(){return this});var _=s.a,k=_&&_(_(I([])));k&&k!==t&&n.call(k,c)&&(w=k);var x=E.prototype=y.prototype=l()(w);function O(e){["next","throw","return"].forEach(function(t){m(e,t,function(e){return this._invoke(t,e)})})}function j(e,t){var r;a(this,"_invoke",{value:function(a,i){function o(){return new t(function(r,o){!function a(r,i,o,c){var s=g(e[r],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){a("next",e,o,c)},function(e){a("throw",e,o,c)}):t.resolve(l).then(function(e){u.value=e,o(u)},function(e){return a("throw",e,o,c)})}c(s.arg)}(a,i,r,o)})}return r=r?r.then(o,o):o()}})}function N(e,t,n){var a="suspendedStart";return function(r,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw i;return V()}for(n.method=r,n.arg=i;;){var o=n.delegate;if(o){var c=S(o,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var s=g(e,t,n);if("normal"===s.type){if(a=n.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a="completed",n.method="throw",n.arg=s.arg)}}}function S(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&
1(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var r=g(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,v;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function I(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:V}}function V(){return{value:void 0,done:!0}}return b.prototype=E,a(x,"constructor",{value:E,configurable:!0}),a(E,"constructor",{value:b,configurable:!0}),b.displayName=m(E,p,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return o.a?o()(e,E):(e.__proto__=E,m(e,p,"GeneratorFunction")),e.prototype=l()(x),e},e.awrap=function(e){return{__await:e}},O(j.prototype),m(j.prototype,u,function(){return this}),e.AsyncIterator=j,e.async=function(t,n,a,i,o){void 0===o&&(o=r.a);var c=new j(d(t,n,a,i),o);return e.isGeneratorFunction(n)?c:c.next().then(function(e){return e.done?e.value:c.next()})},O(x),m(x,p,"Generator"),m(x,c,function(){return this}),m(x,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=I,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(L),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(n,a){return o.type="throw",o.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},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),L(n),v}},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("throw"===a.type){var r=a.arg;L(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:I(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),v}},e}var A=Object(N.connect)(function(e){return{user:e.user,register:e.register}},{loginFBRequest:k.s,showSearchForm:j.f,loginGGRequest:k.t})(function(e){var t=e.loginFBRequest,n=e.showSearchForm,a=e.register,r=e.loginGGRequest,i=e.user,o=Object(v.useState)(""),c=Object(g.default)(o,2),s=c[0],u=c[1],l=Object(v.useState)("init"),p=Object(g.default)(l,2),h=p[0],m=p[1];Object(v.useEffect)(function(){V.a.init("1445046295739925"),n(!1)},[]),Object(v.useEffect)(function(){if(i.items){if(V.a.track("CompleteRegistration",{currency:"VND",value:1}),localStorage.getItem("store_url")){if(E.a.isEmpty(localStorage.getItem("question_data"))){var e=localStorage.getItem("store_url").split("/");"cau-hoi"==e[1]&&e[2]?(localStorage.removeItem("store_url"),window.location.href="/cau-hoi/"+e[2]):"answer_question"==e[1]&&e[2]?(localStorage.removeItem("store_url"),window.location.href="/answer_question/"+e[2]):(localStorage.removeItem("store_url"),window.location.href="/")}}else window.location.href="/";localStorage.getItem("question_data")&&(localStorage.removeItem("store_url"),T.a.push("/them-cau-hoi/-1"))}},[i]);var f=Object(G.b)({onSuccess:function(e){return w(e)},onError:function(e){return w(e)}}),b=function(){FB.login(function(e){if(e.authResponse)!function(e){u(e),m("facebook"),t({access_token:e})}(e.authResponse.accessToken);else{if(V.a.track("CompleteRegistration",{currency:"VND",value:1}),localStorage.getItem("store_url")){if(E.a.isEmpty(localStorage.getItem("question_data"))){var n=localStorage.getItem("store_url").split("/");"cau-hoi"==n[1]&&n[2]?(localStorage.removeItem("store_url"),T.a.push("/cau-hoi/"+n[2])):"answer_question"==n[1]&&n[2]?(localStorage.removeItem("store_url"),T.a.push("/answer_question/"+n[2])):(localStorage.removeItem("store_url"),T.a.push("/"))}}else T.a.push("/");localStorage.getItem("question_data")&&(localStorage.removeItem("store_url"),T.a.push("/them-cau-hoi/-1"))}},{scope:"email,public_profile"})},w=(j=Object(d.default)(H().mark(function e(t){return H().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t&&(t.access_token?(u(t.access_token),m("google"),r({access_token:t.access_token})):"popup_closed_by_user"==t.error||"idpiframe_initialization_failed"==t.error?console.log(t.error):showNotification("error","Có lỗi xảy ra GG"));case 1:case"end":return e.stop()}},e)})),function(e){return j.apply(this,arguments)}),k=a.reg_fb;var j;return y.a.createElement("div",{className:"h247-full pt52 new-login"},y.a.createElement(C.a,{title:"Hỏi đáp 247 - Trang đăng ký",meta:[{name:"description",content:"Mô tả"},{name:"robots",content:"index,follow"},{property:"og:title",content:"t"},{property:"og:description",content:"description"},{property:"og:url",content:"url"},{property:"og:image",content:"image"}],link:[{rel:"canonical",href:"canonical"},{rel:"image_src",href:"image"}],script:[]}),y.a.createElement("div",{className:"h247-center"},y.a.createElement("div",{className:"pc12 body-center"},y.a.createElement("div",{className:"h247-body",id:"navWrap"},y.a.createElement("div",{className:"h247-col w50"},"init"===h&&y.a.createElement("div",{className:"form-signin bg-f mt24 mb24"},y.a.createElement("div",{className:"pd40"},y.a.createElement("h1",null,y.a.createElement("p",null,"Bạn muốn có câu trả lời cho câu hỏi của mình?"),y.a.createElement("p",{className:"cl-green"},"Hãy tạo tài khoản miễn phí với:")),y.a.createElement("div",{className:"box-signin-center"},y.a.createElement("div",{className:"pt24"},y.a.createElement("a",{className:"btn-signin login-with-ts247",onClick:function(){T.a.push(R.j)}},y.a.createElement("img",{alt:"social",src:"/static/img/icon_TS.jpg"}),y.a.createElement("span",null,"Tuyensinh247")),y.a.createElement("a",{className:"btn-signin login-with-fb",onClick:function(){"undefined"==typeof FB?window.loadAsync(b):b()}},y.a.createElement("img",{alt:"facebook",src:"/static/img/icon_fb.png?v=1"}),y.a.createElement("span",null,"Facebook")),y.a.createElement("a",{onClick:function(){return f()},className:"btn-signin login-with-gg"},y.a.createElement("svg",{"aria-hidden":"true",className:"native svg-icon iconGoogle",width:"18",height:"18",viewBox:"0 0 18 18"},y.a.createElement("path",{d:"M16.51 8H8.98v3h4.3c-.18 1-.74 1.48-1.6 2.04v2.01h2.6a7.8 7.8 0 0 0 2.38-5.88c0-.57-.05-.66-.15-1.18Z",fill:"#4285F4"}),y.a.createElement("path",{d:"M8.98 17c2.16 0 3.97-.72 5.3-1.94l-2.6-2a4.8 4.8 0 0 1-7.18-2.54H1.83v2.07A8 8 0 0 0 8.98 17Z",fill:"#34A853"}),y.a.createElement("path",{d:"M4.5 10.52a4.8 4.8 0 0 1 0-3.04V5.41H1.83a8 8 0 0 0 0 7.18l2.67-2.07Z",fill:"#FBBC05"}),y.a.createElement("path",{d:"M8.98 4.18c1.17 0 2.23.4 3.06 1.2l2.3-2.3A8 8 0 0 0 1.83 5.4L4.5 7.49a4.77 4.77 0 0 1 4.48-3.3Z",fill:"#EA4335"})),y.a.createElement("span",null,"Google")),y.a.createElement("a",{className:"btn-signin login-with-gmail",onClick:function(){m("email")}},y.a.createElement("img",{alt:"email",src:"/static/img/icon_email.png"}),y.a.createElement("span",null,"Email")),y.a.createElement("p",{className:"pt24"},"Hoặc nếu đã có tài khoản ",y.a.createElement(_.a,{href:"/login_page",as:"/dang-nhap"},y.a.createElement("a",{className:"cl-green"},"Hãy đăng nhập ngay!"))))))),("facebook"===h||"google"===h)&&k&&k.recommenUsername&&y.a.createElement(x.a,{status_page:h,token:s,username:k.recommenUsername}),"email"===h&&y.a.createElement(O.a,null))))))});t.default=A},UfDv:function(e,t,n){var a;e.exports=(a=n("q1tI"),function(e){function t(a){if(n[a])return n[a].exports;var r=n[a]={exports:{},id:a,loaded:!1};
1return e[a].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=n(6),o=a(i),c=n(4),s=a(c),u={className:s.default.string,onloadCallbackName:s.default.string,elementID:s.default.string,onloadCallback:s.default.func,verifyCallback:s.default.func,expiredCallback:s.default.func,render:s.default.oneOf(["onload","explicit"]),sitekey:s.default.string,theme:s.default.oneOf(["light","dark"]),type:s.default.string,verifyCallbackName:s.default.string,expiredCallbackName:s.default.string,size:s.default.oneOf(["invisible","compact","normal"]),tabindex:s.default.string,hl:s.default.string,badge:s.default.oneOf(["bottomright","bottomleft","inline"])},l=function(){return"undefined"!=typeof window&&void 0!==window.grecaptcha&&"function"==typeof window.grecaptcha.render},p=void 0,h=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n._renderGrecaptcha=n._renderGrecaptcha.bind(n),n.reset=n.reset.bind(n),n.state={ready:l(),widget:null},n.state.ready||"undefined"==typeof window||(p=setInterval(n._updateReadyState.bind(n),1e3)),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"componentDidMount",value:function(){this.state.ready&&this._renderGrecaptcha()}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,a=n.render,r=n.onloadCallback;"explicit"===a&&r&&this.state.ready&&!t.ready&&this._renderGrecaptcha()}},{key:"componentWillUnmount",value:function(){clearInterval(p)}},{key:"reset",value:function(){var e=this.state,t=e.ready,n=e.widget;t&&null!==n&&grecaptcha.reset(n)}},{key:"execute",value:function(){var e=this.state,t=e.ready,n=e.widget;t&&null!==n&&grecaptcha.execute(n)}},{key:"_updateReadyState",value:function(){l()&&(this.setState({ready:!0}),clearInterval(p))}},{key:"_renderGrecaptcha",value:function(){this.state.widget=grecaptcha.render(this.props.elementID,{sitekey:this.props.sitekey,callback:this.props.verifyCallback?this.props.verifyCallback:void 0,theme:this.props.theme,type:this.props.type,size:this.props.size,tabindex:this.props.tabindex,hl:this.props.hl,badge:this.props.badge,"expired-callback":this.props.expiredCallback?this.props.expiredCallback:void 0}),this.props.onloadCallback&&this.props.onloadCallback()}},{key:"render",value:function(){return"explicit"===this.props.render&&this.props.onloadCallback?o.default.createElement("div",{id:this.props.elementID,"data-onloadcallbackname":this.props.onloadCallbackName,"data-verifycallbackname":this.props.verifyCallbackName}):o.default.createElement("div",{id:this.props.elementID,className:this.props.className,"data-sitekey":this.props.sitekey,"data-theme":this.props.theme,"data-type":this.props.type,"data-size":this.props.size,"data-badge":this.props.badge,"data-tabindex":this.props.tabindex})}}]),t}(i.Component);t.default=h,h.propTypes=u,h.defaultProps={elementID:"g-recaptcha",className:"g-recaptcha",onloadCallback:void 0,onloadCallbackName:"onloadCallback",verifyCallback:void 0,verifyCallbackName:"verifyCallback",expiredCallback:void 0,expiredCallbackName:"expiredCallback",render:"onload",theme:"light",type:"image",size:"normal",tabindex:"0",hl:"en",badge:"bottomright"},e.exports=t.default},function(e,t){"use strict";function n(e){return function(){return e}}var a=function(){};a.thatReturns=n,a.thatReturnsFalse=n(!1),a.thatReturnsTrue=n(!0),a.thatReturnsNull=n(null),a.thatReturnsThis=function(){return this},a.thatReturnsArgument=function(e){return e},e.exports=a},function(e,t,n){"use strict";var a=function(e){};e.exports=function(e,t,n,r,i,o,c,s){if(a(t),!e){var u;if(void 0===t)u=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,i,o,c,s],p=0;(u=new Error(t.replace(/%s/g,function(){return l[p++]}))).name="Invariant Violation"}throw u.framesToPop=1,u}}},function(e,t,n){"use strict";var a=n(1),r=n(2),i=n(5);e.exports=function(){function e(e,t,n,a,o,c){c!==i&&r(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;
1var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=a,n.PropTypes=n,n}},function(e,t,n){e.exports=n(3)()},function(e,t){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=a}]))},eKWZ:function(e,t,n){"use strict";n.d(t,"b",function(){return w}),n.d(t,"a",function(){return _}),n.d(t,"c",function(){return k}),n.d(t,"e",function(){return x}),n.d(t,"d",function(){return j}),n.d(t,"f",function(){return S});var a=n("eVuF"),r=n.n(a),i=n("TRZx"),o=n.n(i),c=n("Bhuq"),s=n.n(c),u=n("SqZg"),l=n.n(u),p=n("Z7t5"),h=n.n(p),m=n("hfKm"),f=n.n(m),d=n("O40h"),g=n("MC2W"),v=n("nOHt"),y=n.n(v),b=n("Mw6Q");function E(){E=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=f.a||function(e,t,n){e[t]=n.value},i="function"==typeof h.a?h.a:{},c=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",p=i.toStringTag||"@@toStringTag";function m(e,t,n){return f()(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{m({},"")}catch(G){m=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof y?t:y,o=l()(i.prototype),c=new I(r||[]);return a(o,"_invoke",{value:S(e,n,c)}),o}function g(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(G){return{type:"throw",arg:G}}}e.wrap=d;var v={};function y(){}function b(){}function w(){}var _={};m(_,c,function(){return this});var k=s.a,x=k&&k(k(V([])));x&&x!==t&&n.call(x,c)&&(_=x);var O=w.prototype=y.prototype=l()(_);function j(e){["next","throw","return"].forEach(function(t){m(e,t,function(e){return this._invoke(t,e)})})}function N(e,t){var r;a(this,"_invoke",{value:function(a,i){function o(){return new t(function(r,o){!function a(r,i,o,c){var s=g(e[r],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then(function(e){a("next",e,o,c)},function(e){a("throw",e,o,c)}):t.resolve(l).then(function(e){u.value=e,o(u)},function(e){return a("throw",e,o,c)})}c(s.arg)}(a,i,r,o)})}return r=r?r.then(o,o):o()}})}function S(e,t,n){var a="suspendedStart";return function(r,i){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw i;return R()}for(n.method=r,n.arg=i;;){var o=n.delegate;if(o){var c=C(o,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var s=g(e,t,n);if("normal"===s.type){if(a=n.done?"completed":"suspendedYield",s.arg===v)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(a="completed",n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var r=g(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,v;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,v):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function L(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function I(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(L,this),this.reset(!0)}function V(e){if(e){var t=e[c];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:R}}function R(){return{value:void 0,done:!0}}return b.prototype=w,a(O,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:b,configurable:!0}),b.displayName=m(w,p,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return o.a?o()(e,w):(e.__proto__=w,m(e,p,"GeneratorFunction")),e.prototype=l()(O),e},e.awrap=function(e){return{__await:e}},j(N.prototype),m(N.prototype,u,function(){return this}),e.AsyncIterator=N,e.async=function(t,n,a,i,o){void 0===o&&(o=r.a);var c=new N(d(t,n,a,i),o);return e.isGeneratorFunction(n)?c:c.next().then(function(e){return e.done?e.value:c.next()})},j(O),m(O,p,"Generator"),m(O,c,function(){return this}),m(O,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=V,I.prototype={constructor:I,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
1h(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function a(n,a){return o.type="throw",o.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],o=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=e,o.arg=t,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},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),T(n),v}},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("throw"===a.type){var r=a.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:V(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),v}},e}var w="SEARCH_QUESTION",_="LOAD_MORE_SEARCH_QUESTION",k="SHOW_HIDE_SEARCH_FORM";function x(e){return O.apply(this,arguments)}function O(){return(O=Object(d.default)(E().mark(function e(t){var n;return E().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!t.img){e.next=6;break}return e.next=3,Object(g.a)("action/search_img","post",{img_id:t.img});case 3:n=e.sent,e.next=10;break;case 6:return e.next=8,Object(g.a)("action/w_search","post",t);case 8:n=e.sent,Object(b.b)("question","search",t.keyword?t.keyword.toLowerCase():"nothing",1);case 10:return y.a.push({pathname:"/search",query:t}),e.abrupt("return",function(e){e({type:w,data:n.data})});case 12:case"end":return e.stop()}},e)}))).apply(this,arguments)}function j(e){return N.apply(this,arguments)}function N(){return(N=Object(d.default)(E().mark(function e(t){var n;return E().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(g.a)("action/w_search","post",t);case 2:return n=e.sent,e.abrupt("return",function(e){e({type:_,data:n.data})});case 4:case"end":return e.stop()}},e)}))).apply(this,arguments)}function S(e){return{type:k,show_search_form:e}}},f9BK:function(e,t,n){"use strict";var a=n("pbKT"),r=n.n(a),i=n("0iUn"),o=n("sLSF"),c=n("AT/M"),s=n("Tit0"),u=n("MI3g"),l=n("a7VT"),p=n("vYYK"),h=n("q1tI"),m=n.n(h),f=n("YFqc"),d=n.n(f),g=n("CXxv"),v=n("HqNx");function y(e){var t=function(){if("undefined"==typeof Reflect||!r.a)return!1;if(r.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(r()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,a=Object(l.default)(e);if(t){var i=Object(l.default)(this).constructor;n=r()(a,arguments,i)}else n=a.apply(this,arguments);return Object(u.default)(this,n)}}var b=function(e){Object(s.default)(n,e);var t=y(n);function n(e){var a;return Object(i.default)(this,n),a=t.call(this,e),Object(p.a)(Object(c.default)(a),"handleEmailInput",function(e){a.setState({email:e.target.value,time_count_down:2,emailValid:!0}),new RegExp("^null|([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})").test(e.target.value)&&e.target.value.length>0?a.setState({emailValid:!0,check:!1}):a.setState({check:!0})}),Object(p.a)(Object(c.default)(a),"submitHandle",function(e){13===e.keyCode&&a.C
1ontinueRegister()}),Object(p.a)(Object(c.default)(a),"ContinueRegister",function(){var e=a.state,t=e.email,n=e.emailValid,r={},i=new RegExp("^null|([\\w.%+-]+)@([\\w-]+\\.)+([\\w]{2,})");t&&""!==t&&i.test(t)?(r.email=t,a.setState({emailValid:!0}),n=!0):(a.setState({emailValid:!1}),n=!1),n&&"x"!==n&&Object(g.F)(r).then(function(e){0===e.status?Object(v.a)("error",e.message):a.props._handleRequestValidEmail(e,t)})}),a.state={email:"",emailValid:"x",check:!1,time_count_down:2},a}return Object(o.default)(n,[{key:"componentDidMount",value:function(){this.timeDown()}},{key:"timeDown",value:function(){var e=this;setTimeout(function(){var t=e.state.time_count_down;e.state.check&&(t--,e.setState({time_count_down:t})),0==t&&e.state.check&&e.setState({emailValid:!1}),e.timeDown()},1e3)}},{key:"render",value:function(){var e=this,t=this.state.emailValid?"":m.a.createElement("p",{className:"cl-orange mt12"},m.a.createElement("strong",null,"Vui lòng nhập đúng định dạng email"));return m.a.createElement("div",{className:"form-signin bg-f mt24 mb24"},m.a.createElement("div",{className:"pd40"},m.a.createElement("h1",null,m.a.createElement("p",null,"Đăng ký tài khoản với Email của bạn!")),m.a.createElement("div",{className:"box-signin-center"},m.a.createElement("p",{className:"pt24"},"Nếu có tài khoản. ",m.a.createElement(d.a,{href:"/login_page",as:"/dang-nhap"},m.a.createElement("a",{className:"cl-green"},"Hãy đăng nhập"))),m.a.createElement("div",{className:"pt24"},m.a.createElement("p",null),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Email:"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("input",{className:"cl-",name:"first",placeholder:"Nhập Email của bạn",type:"text",onChange:this.handleEmailInput,onKeyDown:this.submitHandle}),t,m.a.createElement("p",null),m.a.createElement("a",{className:"btn-signin bg-gmail rs-password mt24",onClick:function(){return e.ContinueRegister()}},m.a.createElement("span",null,"Tiếp tục"))))))}}]),n}(h.Component),E=n("rYoV"),w=n("1Jdo"),_=n("/MKj"),k=n("UfDv"),x=n.n(k),O=n("oHge");function j(e){var t=function(){if("undefined"==typeof Reflect||!r.a)return!1;if(r.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(r()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,a=Object(l.default)(e);if(t){var i=Object(l.default)(this).constructor;n=r()(a,arguments,i)}else n=a.apply(this,arguments);return Object(u.default)(this,n)}}var N=function(e){Object(s.default)(n,e);var t=j(n);function n(e){var a;return Object(i.default)(this,n),a=t.call(this,e),Object(p.a)(Object(c.default)(a),"showGrade",function(){a.state.showGrade?document.addEventListener("click",a.handleOutsideChapterClick,!1):document.removeEventListener("click",a.handleOutsideChapterClick,!1),a.setState(function(e){return{showGrade:!e.showGrade}})}),Object(p.a)(Object(c.default)(a),"handleOutsideChapterClick",function(e){a.node.contains(e.target)||(""===a.state.grade_id&&a.setState({gradeValid:!1}),a.showGrade())}),Object(p.a)(Object(c.default)(a),"handleUserNameInput",function(e){var t=new RegExp("^[0-9a-zA-Z]{6,30}$");
1if(a.setState({username:e.target.value}),t.test(e.target.value)&&e.target.value.length>0){a.setState({usernameValid:!0});var n=Object(c.default)(a);n.state.typingTimeout&&clearTimeout(n.state.typingTimeout);var r=e.target.value;n.setState({typingTimeout:setTimeout(function(){Object(g.k)({username:r}).then(function(e){0!==e.status?n.setState({usernameExsited:!0}):n.setState({usernameExsited:!1})})},300)})}else a.setState({usernameValid:!1})}),Object(p.a)(Object(c.default)(a),"handleUserInputPassword",function(e){a.setState({password:e.target.value}),new RegExp("^[0-9a-zA-Z\\S]{6,30}$").test(e.target.value)&&e.target.value.length>0?a.setState({passwordValid:!0}):a.setState({passwordValid:!1});var t=e.target.value;t==a.state.re_password&&t.length>0?a.setState({RepasswordValid:!0}):a.setState({RepasswordValid:!1})}),Object(p.a)(Object(c.default)(a),"changeInputPhoneNumber",function(e){Object(w.b)(e.target.value)?a.setState({phoneNumberValid:!0,phonenumber:e.target.value}):a.setState({phoneNumberValid:!1,phonenumber:e.target.value})}),Object(p.a)(Object(c.default)(a),"chooseGrade",function(e){a.setState({grade_id:e.type,gradename:e.name,gradeValid:!0})}),Object(p.a)(Object(c.default)(a),"handleCheckbox",function(e){e.target.checked?a.setState({checkedCondition:!0}):a.setState({checkedCondition:!1})}),Object(p.a)(Object(c.default)(a),"handleSend",function(){var e=a.state,t=e.username,n=e.grade_id,r=e.phonenumber,i=e.checkedCondition,o=e.phoneNumberValid,s=e.usernameValid,u=e.gradeValid,l=e.passwordValid,p=e.password,h=e.usernameExsited,m=e.verify_captcha,f=e.token_captcha;a.setState({is_processing:!0});var d=a.props.email,v=a.state.token,y={},b=new RegExp("^[0-9a-zA-Z]{6,30}$"),E=new RegExp("^null|[0-9a-zA-Z\\S]{6,30}$");t&&""!==t&&b.test(t)?(y.username=t,a.setState({usernameValid:!0}),s=!0):(a.setState({usernameValid:!1}),s=!1),p&&""!==p&&E.test(p)?(y.password=p,a.setState({passwordValid:!0}),l=!0):(a.setState({passwordValid:!1}),l=!1),n&&""!==n||0==n?(y.grade_id=n,a.setState({gradeValid:!0}),u=!0):(a.setState({gradeValid:!1}),u=!1),Object(w.b)(r)?(a.setState({phoneNumberValid:!0}),o=!0,y.mobile=r):(a.setState({phoneNumberValid:!1}),o=!1),i&&"x"===i&&(a.setState({checkedCondition:!1}),i=!1),m&&"x"!=m?y.token_captcha=f:a.setState({verify_captcha:!1}),v&&(y.access_token=v),d&&(y.email=d),o&&"x"!==o&&s&&"x"!==s&&u&&"x"!==u&&i&&"x"!==i&&m&&"x"!==m&&l&&"x"!==l&&h&&a.props.dispatch(Object(g.x)(y));var _=Object(c.default)(a);setTimeout(function(){_.setState({is_processing:!1})},3e3)}),Object(p.a)(Object(c.default)(a),"verifyCallback",function(e){e&&a.setState({verify_captcha:!0,token_captcha:e})}),a.state={showGrade:!0,username:"",usernameValid:"x",grade_id:"",gradeValid:"x",gradename:"",phonenumber:"",phoneNumberValid:"x",checkedCondition:"x",passwordValid:"x",password:"",typingTimeout:0,usernameExsited:!0,is_processing:!1,verify_captcha:"x",token_captcha:""},a.recaptchaInstance=m.a.createRef(),a.handleExpiredCallback=a.handleExpiredCallback.bind(Object(c.default)(a)),a}return Object(o.default)(n,[{key:"componentDidMount",value:function(){this.setState({username:this.props.recommenUsername})}},{key:"handleExpiredCallback",value:function(){this.setState({verify_captcha:!1,token_captcha:""}),this.recaptchaInstance.current&&this.recaptchaInstance.current.reset()}},{key:"render",value:function(){var e=this,t=this.state.usernameValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Chỉ 6-24 ký tự và không chứa ký tự đặc biệt!"),n=this.state.checkedCondition?"":m.a.createElement("p",{style:{marginBottom:20},className:"cl-orange mt12"},"Bạn chưa chấp nhận quy định của trang"),a=this.state.phoneNumberValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Vui lòng nhập số điện thoại đúng định dạng và không để trống trường này!"),r=this.state.gradeValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Vui lòng chọn lớp!"),i=this.state.usernameExsited?"":m.a.createElement("p",{className:"cl-orange mt12"},"Tên tài khoản đã tồn tại"),o=this.state.passwordValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Vui lòng nhập mật khẩu từ 6-30 ký tự"),c=this.state.is_processing?m.a.createElement("p",{className:"cl-orange mt12",style:{height:"58px",marginTop:"30px",textAlign:"center"}},"Bạn vui lòng chờ trong giây lát..."):"",s=this.state.verify_captcha?"":m.a.createElement("p",{style:{textAlign:"left"},className:"cl-orange mt12"},"Vui lòng xác minh captcha!");return m.a.createElement("div",{className:"form-signin bg-f mt24 mb24"},m.a.createElement("span",{ref:function(t){e.node=t}}),m.a.createElement("div",{className:"pd40"},m.a.createElement("h1",null,m.a.createElement("p",{style:{lineHeight:"1.5em",marginBottom:"10px"}},"Chỉ còn 1 bước cuối cùng để tạo thành công tài khoản Hoidap247! ",m.a.createElement("br",null),"Vui lòng điền chính xác thông tin!")),m.a.createElement("div",{className:"box-signin-center pt24"},m.a.createElement("p",null),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Tên đăng nhập:"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("input",{placeholder:""!==this.state.username?this.state.username:"Nhập tên..",type:"text",value:this.state.username,onChange:this.handleUserNameInput}),t,i,m.a.createElement("p",null),m.a.createElement("p",{className:"pt12"}),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Mật khẩu:"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("input",{onChange:this.handleUserInputPassword,name:"password",type:"password",placeholder:"Mật khẩu"}),o,m.a.createElement("p",null),m.a.createElement("p",{className:"pt12"}),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Chọn lớp:"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("ul",{className:"opt-select opt-select3"},m.a.createElement("li",{style:{margin:"0"}},m.a.createElement("a",{className:"btn-select btn-select3 bd1",onClick:function(){return e.showGrade()}},m.a.createElement("span",null,""!==this.state.gradename?this.state.gradename:"Chọn lớp "),m.a.createElement("span",{className:"pl12 fr"},m.a.createElement("img",{alt:"button",src:"/static/img/icon-dow2.png"}))),m.a.createElement("ul",{className:"opt-select-child opt-select-child3 opt-select-child-show",id:"s-scroll",hidden:this.state.showGrade},E.map(function(t,n){return m.a.createElement("li",{key:n,onClick:function(){return e.chooseGrade(t)}},m.a.createElement("a",{style:{textDecoration:"none"}},t.name))}))),r,m.a.createElement("p",null),m.a.createElement("p",{className:"pt12"}),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Hãy nhập chính xác SĐT bạn hoặc người thân để được hỗ trợ nhanh nhất!"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("input",{name:"first",placeholder:""!==this.state.phonenumber?this.state.phonenumber:"0xxx.xxx.xxx",type:"text",value:this.state.phonenumber,onChange:this.changeInputPhoneNumber}),a,m.a.createElement("p",null),m.a.createElement("p",{className:"pt12",onChange:this.handleCheckbox,style:{marginBottom:10}},m.a.createElement("input",{className:"check-mark",type:"checkbox"}),m.a.createElement("span",null,"Tôi đồng ý với",m.a.createElement(d.a,{href:{pathname:"/privacy_hoidap247"},as:"/cac-dieu-khoan-tren-hoidap247"},m.a.createElement("a",{className:"cl-blue"}," các điều khoản"))," khi sử dụng Hoidap247.com")),n,m.a.createElement(x.a,{ref:this.recaptchaInstance,sitekey:O.d,render:"explicit",verifyCallback:this.verifyCallback,expiredCallback:this.handleExpiredCallback}),s,this.state.is_processing?c:m.a.createElement("a",{className:"btn-signin bg-gmail mt24 rs-password",onClick:this.handleSend},m.a.createElement("span",null,"Đăng ký"))))))}}]),n}(h.Component),S=Object(_.connect)(function(e){return{user:e.user}})(N);function C(e){var t=function(){if("undefined"==typeof Reflect||!r.a)return!1;if(r.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(r()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,a=Object(l.default)(e);if(t){var i=Object(l.default)(this).constructor;n=r()(a,arguments,i)}else n=a.apply(this,arguments);return Object(u.default)(this,n)}}var L=function(e){Object(s.default)(n,e);var t=C(n);function n(e){var a;return Object(i.default)(this,n),a=t.call(this,e),Object(p.a)(Object(c.default)(a),"handleRequestValidEmail",function(e,t){a.setState({re
1commenUsername:e.data.recommenUsername,status_page:"info",email:t})}),a.state={email:"",recommenUsername:"",status_page:"email"},a}return Object(o.default)(n,[{key:"render",value:function(){var e=this.state.status_page,t={email:m.a.createElement(b,{_handleRequestValidEmail:this.handleRequestValidEmail}),info:m.a.createElement(S,{recommenUsername:this.state.recommenUsername,email:this.state.email})};return m.a.createElement("div",null,t[e])}}]),n}(h.Component);t.a=L},"oGV+":function(e,t,n){"use strict";var a=n("pbKT"),r=n.n(a),i=n("0iUn"),o=n("sLSF"),c=n("AT/M"),s=n("Tit0"),u=n("MI3g"),l=n("a7VT"),p=n("vYYK"),h=n("q1tI"),m=n.n(h),f=n("rYoV"),d=n("1Jdo"),g=n("CXxv"),v=(n("HqNx"),n("/MKj"));function y(e){var t=function(){if("undefined"==typeof Reflect||!r.a)return!1;if(r.a.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(r()(Boolean,[],function(){})),!0}catch(e){return!1}}();return function(){var n,a=Object(l.default)(e);if(t){var i=Object(l.default)(this).constructor;n=r()(a,arguments,i)}else n=a.apply(this,arguments);return Object(u.default)(this,n)}}var b=function(e){Object(s.default)(n,e);var t=y(n);function n(e){var a;return Object(i.default)(this,n),a=t.call(this,e),Object(p.a)(Object(c.default)(a),"showGrade",function(){a.state.showGrade?document.addEventListener("click",a.handleOutsideChapterClick,!1):document.removeEventListener("click",a.handleOutsideChapterClick,!1),a.setState(function(e){return{showGrade:!e.showGrade}})}),Object(p.a)(Object(c.default)(a),"handleOutsideChapterClick",function(e){a.node.contains(e.target)||(""===a.state.grade_id&&a.setState({gradeValid:!1}),a.showGrade())}),Object(p.a)(Object(c.default)(a),"handleUserNameInput",function(e){var t=new RegExp("^[0-9a-zA-Z]{6,30}$");a.setState({username:e.target.value}),t.test(e.target.value)&&e.target.value.length>0?a.setState({usernameValid:!0}):a.setState({usernameValid:!1});var n=Object(c.default)(a);n.state.typingTimeout&&clearTimeout(n.state.typingTimeout);var r=e.target.value;n.setState({typingTimeout:setTimeout(function(){Object(g.k)({username:r}).then(function(e){0!==e.status?n.setState({usernameExsited:!0}):n.setState({usernameExsited:!1})})},300)})}),Object(p.a)(Object(c.default)(a),"changeInputPhoneNumber",function(e){Object(d.b)(e.target.value)?a.setState({phoneNumberValid:!0,phonenumber:e.target.value}):a.setState({phoneNumberValid:!1,phonenumber:e.target.value})}),Object(p.a)(Object(c.default)(a),"chooseGrade",function(e){a.setState({grade_id:e.type,gradename:e.name,gradeValid:!0})}),Object(p.a)(Object(c.default)(a),"handleCheckbox",function(e){e.target.checked?a.setState({checkedCondition:!0}):a.setState({checkedCondition:!1})}),Object(p.a)(Object(c.default)(a),"handleSend",function(){var e=Object(c.default)(a),t=a.state,n=t.username,r=t.grade_id,i=t.phonenumber,o=t.checkedCondition,s=t.phoneNumberValid,u=t.usernameValid,l=t.gradeValid,p=t.usernameExsited;a.setState({is_processing:!0});var h=a.state.token,m={},f=new RegExp("^[0-9a-zA-Z]{6,30}$");n&&""!==n&&f.test(n)?(m.username=n,a.setState({usernameValid:!0}),u=!0):(a.setState({usernameValid:!1}),u=!1),r&&""!==r||0==r?(m.grade_id=r,a.setState({gradeValid:!0}),l=!0):(a.setState({gradeValid:!1}),l=!1),Object(d.b)(i)?(a.setState({phoneNumberValid:!0}),s=!0,m.mobile=i):(a.setState({phoneNumberValid:!1}),s=!1),o&&"x"===o&&(a.setState({checkedCondition:!1}),o=!1),h&&(m.access_token=h),s&&"x"!==s&&u&&"x"!==u&&l&&"x"!==l&&o&&"x"!==o&&p&&("facebook"==a.props.status_page?e.props.dispatch(Object(g.s)(m)):"google"==a.props.status_page&&e.props.dispatch(Object(g.t)(m))),setTimeout(function(){e.setState({is_processing:!1})},3e3)}),a.state={showGrade:!0,username:"",usernameValid:"x",grade_id:"",gradeValid:"x",gradename:"",phonenumber:"",phoneNumberValid:"x",checkedCondition:"x",typingTimeout:0,usernameExsited:!0,is_processing:!1},a}return Object(o.default)(n,[{key:"componentDidMount",value:function(){this.setState({username:this.props.username,token:this.props.token})}},{key:"render",value:function(){var e=this,t=this.state.usernameValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Chỉ 6-24 ký tự và không chứa ký tự đặc biệt!"),n=this.state.checkedCondition?"":m.a.createElement("p",{className:"cl-orange mt12"},"Bạn chưa chấp nhận quy định của trang"),a=this.state.phoneNumberValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Vui lòng nhập số điện thoại đúng định dạng và không để trống trường này!"),r=this.state.gradeValid?"":m.a.createElement("p",{className:"cl-orange mt12"},"Vui lòng chọn lớp!"),i=this.state.usernameExsited?"":m.a.createElement("p",{className:"cl-orange mt12"},"Tên tài khoản đã tồn tại"),o=this.state.is_processing?m.a.createElement("p",{className:"cl-orange mt12",style:{height:"58px",marginTop:"30px",textAlign:"center"}},"Bạn vui lòng chờ trong giây lát..."):"";return m.a.createElement("div",{className:"form-signin bg-f mt24 mb24"},m.a.createElement("div",{className:"pd40"},m.a.createElement("span",{ref:function(t){e.node=t}}),m.a.createElement("h1",null,m.a.createElement("p",{style:{lineHeight:"1.5em",marginBottom:"10px"}},"Chỉ còn 1 bước cuối cùng để tạo thành công tài khoản Hoidap247! ",m.a.createElement("br",null),"Vui lòng điền chính xác thông tin!")),m.a.createElement("div",{className:"box-signin-center pt24"},m.a.createElement("p",null),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Tên đăng nhập:"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("input",{placeholder:""!==this.state.username?this.state.username:"Nhập tên..",type:"text",value:this.state.username,onChange:this.handleUserNameInput}),t,i,m.a.createElement("p",null),m.a.createElement("p",{className:"pt12"}),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Chọn lớp:"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("ul",{className:"opt-select opt-select3"},m.a.createElement("li",{style:{margin:"0"}},m.a.createElement("a",{className:"btn-select btn-select3 bd1",onClick:function(){return e.showGrade()}},m.a.createElement("span",null,""!==this.state.gradename?this.state.gradename:"Chọn lớp "),m.a.createElement("span",{className:"pl12 fr"},m.a.createElement("img",{alt:"button",src:"/static/img/icon-dow2.png"}))),m.a.createElement("ul",{className:"opt-select-child opt-select-child3 opt-select-child-show",id:"s-scroll",hidden:this.state.showGrade},f.map(function(t,n){return m.a.createElement("li",{key:n,onClick:function(){return e.chooseGrade(t)}},m.a.createElement("a",{style:{textDecoration:"none"}},t.name))}))),r,m.a.createElement("p",null),m.a.createElement("p",{className:"pb8"},m.a.createElement("strong",null,"Hãy nhập chính xác SĐT bạn hoặc người thân để được hỗ trợ nhanh nhất!"),m.a.createElement("strong",{className:"cl-orange"},"*")),m.a.createElement("input",{name:"first",placeholder:""!==this.state.phonenumber?this.state.phonenumber:"0xxx.xxx.xxx",type:"text",value:this.state.phonenumber,onChange:this.changeInputPhoneNumber}),a,m.a.createElement("p",null),m.a.createElement("p",{className:"pt12",onChange:this.handleCheckbox},m.a.createElement("input",{className:"check-mark",type:"checkbox"}),m.a.createElement("span",null,"Tôi đồng ý với ",m.a.createElement("a",{className:"cl-blue"},"các điều khoản")," khi sử dụng Hoidap247.com")),n,this.state.is_processing?o:m.a.
1createElement("a",{className:"btn-signin bg-gmail mt24 rs-password",onClick:this.handleSend},m.a.createElement("span",null,"Đăng ký"))))))}}]),n}(h.Component);t.a=Object(v.connect)()(b)},rYoV:function(e){e.exports=[{name:"Lớp 12",type:12,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Vật Lý",type:2,alias:"ly",icon:"/static/img/icon_sub.png?v=1"},{name:"Hóa Học",type:3,alias:"hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"Sinh Học",type:6,alias:"sinh",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử",type:7,alias:"su",icon:"/static/img/icon_sub.png?v=1"},{name:"Địa Lý",type:8,alias:"dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 11",type:11,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Vật Lý",type:2,alias:"ly",icon:"/static/img/icon_sub.png?v=1"},{name:"Hóa Học",type:3,alias:"hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"Sinh Học",type:6,alias:"sinh",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử",type:7,alias:"su",icon:"/static/img/icon_sub.png?v=1"},{name:"Địa Lý",type:8,alias:"dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 10",type:10,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Vật Lý",type:2,alias:"ly",icon:"/static/img/icon_sub.png?v=1"},{name:"Hóa Học",type:3,alias:"hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"Sinh Học",type:6,alias:"sinh",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử",type:7,alias:"su",icon:"/static/img/icon_sub.png?v=1"},{name:"Địa Lý",type:8,alias:"dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 9",type:9,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"KHTN",type:13,alias:"khtn",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử & Địa lý",type:14,alias:"su-dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công Nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"},{name:"Nhạc Họa",type:12,alias:"nhac-hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 8",type:8,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"KHTN",type:13,alias:"khtn",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử & Địa lý",type:14,alias:"su-dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công Nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"}
1,{name:"Nhạc Họa",type:12,alias:"nhac-hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 7",type:7,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"KHTN",type:13,alias:"khtn",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử & Địa lý",type:14,alias:"su-dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công Nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"},{name:"Nhạc Họa",type:12,alias:"nhac-hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 6",type:6,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Ngữ Văn",type:5,alias:"van",icon:"/static/img/icon_sub.png?v=1"},{name:"KHTN",type:13,alias:"khtn",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử & Địa lý",type:14,alias:"su-dia",icon:"/static/img/icon_sub.png?v=1"},{name:"GDCD",type:9,alias:"gdcd",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Công Nghệ",type:11,alias:"cong-nghe",icon:"/static/img/icon_sub.png?v=1"},{name:"Nhạc Họa",type:12,alias:"nhac-hoa",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 5",type:5,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Việt",type:5,alias:"tieng-viet",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử",type:7,alias:"su",icon:"/static/img/icon_sub.png?v=1"},{name:"Địa Lý",type:8,alias:"dia",icon:"/static/img/icon_sub.png?v=1"},{name:"Đạo đức",type:9,alias:"dao-duc",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 4",type:4,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Việt",type:5,alias:"tieng-viet",icon:"/static/img/icon_sub.png?v=1"},{name:"Lịch Sử",type:7,alias:"su",icon:"/static/img/icon_sub.png?v=1"},{name:"Địa Lý",type:8,alias:"dia",icon:"/static/img/icon_sub.png?v=1"},{name:"Đạo đức",type:9,alias:"dao-duc",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 3",type:3,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Việt",type:5,alias:"tieng-viet",icon:"/static/img/icon_sub.png?v=1"},{name:"Đạo đức",type:9,alias:"dao-duc",icon:"/static/img/icon_sub.png?v=1"},{name:"Tin Học",type:10,alias:"tin",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 2",type:2,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Việt",type:5,alias:"tieng-viet",icon:"/static/img/icon_sub.png?v=1"},{name:"Đạo đức",type:9,alias:"dao-duc",icon:"/static/img/icon_sub.png?v=1"}
1,{name:"Môn khác",type:15,alias:"mon-khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Lớp 1",type:1,subjects:[{name:"Toán Học",type:1,alias:"toan",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Anh",type:4,alias:"tieng-anh",icon:"/static/img/icon_sub.png?v=1"},{name:"Tiếng Việt",type:5,alias:"tieng-viet",icon:"/static/img/icon_sub.png?v=1"},{name:"Đạo đức",type:9,alias:"dao-duc",icon:"/static/img/icon_sub.png?v=1"},{name:"Môn khác",type:15,alias:"khac",icon:"/static/img/icon-mon-khac-light.png?v=1"}]},{name:"Khác",type:0,subjects:[]}]},sQI6:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/register_page",function(){var e=n("PXnE");return{page:e.default||e}}])},tseg:function(e,t,n){e.exports=function(e){function t(a){if(n[a])return n[a].exports;var r=n[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,a){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:a})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=!1,r=!1,i=function(){return a||console.warn("Pixel not initialized before using call ReactPixel.init with required params"),a},o=function(){for(var e,t=arguments.length,n=Array(t),a=0;a<t;a++)n[a]=arguments[a];(e=console).info.apply(e,function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(["[react-facebook-pixel]"].concat(n)))},c={autoConfig:!0,debug:!1};t.default={init:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c;!function(e,t,n,a,r,i,o){e.fbq||(r=e.fbq=function(){r.callMethod?r.callMethod.apply(r,arguments):r.queue.push(arguments)},e._fbq||(e._fbq=r),r.push=r,r.loaded=!0,r.version="2.0",r.queue=[],(i=t.createElement(n)).async=!0,i.src="https://connect.facebook.net/en_US/fbevents.js",(o=t.getElementsByTagName(n)[0]).parentNode.insertBefore(i,o))}(window,document,"script"),e?(!1===n.autoConfig&&fbq("set","autoConfig",!1,e),fbq("init",e,t),a=!0,r=n.debug):console.warn("Please insert pixel id for initializing")},pageView:function(){i()&&(fbq("track","PageView"),r&&o("called fbq('track', 'PageView');"))},track:function(e,t){i()&&(fbq("track",e,t),r&&(o("called fbq('track', '"+e+"');"),t&&o("with data",t)))},trackCustom:function(e,t){i()&&(fbq("trackCustom",e,t),r&&(o("called fbq('trackCustom', '"+e+"');"),t&&o("with data",t)))},fbq:function(e){function t(){return e.apply(this,arguments)}return t.toString=function(){return e.toString()},t}(function(){if(i()){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];fbq.apply(void 0,t),r&&(o("called fbq('"+t.slice(0,2).join("', '")+"')"),t[2]&&o("with data",t[2]))}})}},function(e,t,n){e.exports=n(0)}])}},[["sQI6","5d41","9da1"]]]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.