1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8861],{38664:function(e,n,t){"use strict";var i=t(95235),o=t(82269),r=t(2784),a=t(6277),s=t(80943),l=t.n(s),c=t(52322),u=["variant","component"];function d(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,i)}return t}function p(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?d(Object(t),!0).forEach((function(n){(0,i.Z)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):d(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var f=(0,r.memo)((function(e){var n=e.variant,t=void 0===n?"outlined":n,i=e.component,r=void 0===i?"button":i,s=(0,o.Z)(e,u);return(0,c.jsxs)(c.Fragment,{children:["div"===r&&(0,c.jsx)("div",p(p({},s),{},{className:(0,a.Z)(l().button,l()[t],s.className),children:s.children})),"button"===r&&(0,c.jsx)("button",p(p({},s),{},{className:(0,a.Z)("font-sans",l().button,l()[t],s.className),children:s.children}))]})}));n.Z=f},45330:function(e,n,t){"use strict";var i=t(2784),o=t(6277),r=t(34543),a=t(52404),s=t.n(a),l=t(52322);n.Z=(0,i.forwardRef)((function(e,n){var t=(0,i.useRef)(null),a=(0,i.useState)(!1),c=a[0],u=a[1],d=(0,i.useState)([]),p=d[0],f=d[1],m=(0,i.useCallback)((function(){return t.current.value}),[t]),h=(0,i.useCallback)((function(n){if(e.validator){var t="function"===typeof e.validator?e.validator(n):e.validator.test(n)?[]:[e.errorMsg];return f(t),t}return[]}),[e.validator]),g=(0,i.useCallback)((function(){h(m()),u(!1)}),[t,e.validator]);return(0,i.useImperativeHandle)(n,(function(){return{getFieldValue:function(){var e=m();return h(e).length>0?null:e},validate:h}})),(0,l.jsxs)("label",{className:(0,o.Z)(s().label,e.className),style:e.style,children:[(0,l.jsx)("div",{className:s().title,children:e.label}),(0,l.jsxs)("div",{className:(0,o.Z)(s().inputContainer,{focus:c&&0===p.length,error:p.length>0}),children:[(0,l.jsx)("input",{onFocus:function(){return u(!0)},onBlur:g,type:e.type,className:s().input,placeholder:e.placeholder,defaultValue:e.defaultValue,ref:t}),e.suffix]}),(0,l.jsxs)("div",{className:s().error,children:[p.length>0&&(0,l.jsx)(r.bcx,{size:12,color:"#D34343"}),p.join(", ")]})]})}))},18861:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return A}});var i,o=t(81333),r=t(2784),a=t(3908),s=t(28388),l=t(51949),c=t(73614),u=t.n(c),d=t(58333),p=t(75817),f=t(80425),m=t(32636),h=t(61170),g=t.n(h),v=t(45330),x=t(38664),j=t(70563),b=t(77658),w=t(52322),y=r.memo((function(e){var n=(0,r.useRef)(null),t=(0,r.useRef)(null),i=(0,r.useRef)(null),o=(0,r.useState)(!1),a=o[0],l=o[1],c=(0,r.useState)(!1),u=c[0],d=c[1],f=(0,r.useState)(!1),m=f[0],h=f[1],g=(0,r.useCallback)((function(){var o,r,a;
1if(!m){var s=null===(o=n.current)||void 0===o?void 0:o.getFieldValue(),l=null===(r=t.current)||void 0===r?void 0:r.getFieldValue(),c=null===(a=i.current)||void 0===a?void 0:a.getFieldValue();s&&l&&l===c&&(h(!0),(0,p.z2)(s,l).then((function(n){e.onSuccess(n)})).finally((function(){h(!1)})))}}),[n,t,i]),y=(0,r.useCallback)((function(e){var n,i=null===(n=t.current)||void 0===n?void 0:n.getFieldValue();return i&&i!==e?["Inconsistent password, please try again"]:[]}),[t,i]),k=a?j.quy:j.ONY,C=u?j.quy:j.ONY,N=e.mobile;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(v.Z,{label:"Email address",placeholder:"Email address",type:"email",ref:n,validator:b.m,errorMsg:"Invalid email format"}),(0,w.jsx)(v.Z,{validator:b.i,errorMsg:"Invalid password format",ref:t,style:{marginTop:"3px"},type:a?"text":"Password",placeholder:"8-16 letters and numbers",label:"Password",suffix:(0,w.jsx)(k,{className:"icon-eye",color:"rgba(101,101,101, 0.5)",size:20,onClick:function(){return l(!a)}})}),(0,w.jsx)(v.Z,{validator:y,errorMsg:"Invalid password format",ref:i,style:{marginTop:"3px"},type:u?"text":"Password",placeholder:"Repeat your password",label:"Confirm Password",suffix:(0,w.jsx)(C,{className:"icon-eye",color:"rgba(101,101,
1101, 0.5)",size:20,onClick:function(){return d(!u)}})}),(0,w.jsxs)("div",{className:"flex flex-col items-center my-4 mx-0 w-full",children:[(0,w.jsxs)(x.Z,{onClick:g,variant:"contained",component:"div",style:{borderRadius:40,padding:"5px 36px",fontSize:16,width:"100%"},children:[m&&(0,w.jsx)("span",{className:"mr-2",children:(0,w.jsx)(s.Z,{width:20,height:20,color:"#242424"})}),"Sign up"]}),(0,w.jsxs)("p",{className:"sign-in cursor-pointer text-sm text-center mt-3",onClick:function(){return e.changeAction("SIGNINWITHEMAIL")},children:[!N&&"Already have an account?",(0,w.jsx)("span",{className:"text-[#18a0fb]",children:" Sign in"})]})]})]})})),k=t(20406),C=t(28526),N=t.n(C),S=r.memo((function(e){var n=(0,r.useRef)(null),t=(0,r.useRef)(null),i=(0,r.useState)(!1),o=i[0],a=i[1],l=(0,r.useState)(!1),c=l[0],u=l[1],d=(0,r.useState)(null),f=d[0],m=d[1],h=function(){var i=(0,k.Z)(N().mark((function i(){var o,r,a,s,l;return N().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(m(null),!c){i.next=3;break}return i.abrupt("return");case 3:if(a=null===(o=n.current)||void 0===o?void 0:o.getFieldValue(),s=null===(r=t.current)||void 0===r?void 0:r.getFieldValue(),!a||!s){i.next=21;break}return u(!0),i.prev=7,i.next=10,(0,p.zB)(a,s);case 10:l=i.sent,e.onSuccess(l),i.next=18;break;case 14:i.prev=14,i.t0=i.catch(7),console.error("Error signing in:",i.t0),m(i.t0.message);case 18:return i.prev=18,u(!1),i.finish(18);case 21:case"end":return i.stop()}}),i,null,[[7,14,18,21]])})));return function(){return i.apply(this,arguments)}}(),g=o?j.quy:j.ONY;e.mobile;return(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(v.Z,{label:"",placeholder:"Email address",type:"email",ref:n,validator:b.m,errorMsg:"Invalid email format"}),(0,w.jsx)(v.Z,{errorMsg:"Invalid password format",ref:t,style:{marginTop:"3px"},type:o?"text":"Password",placeholder:"Password, 8-16 letters and numbers",label:"",suffix:(0,w.jsx)(g,{className:"icon-eye mx-2",color:"rgba(101,101,
1101, 0.5)",size:20,onClick:function(){return a(!o)}})}),(0,w.jsxs)("div",{className:"flex flex-col items-center my-2 mx-0 w-full",children:[(0,w.jsxs)(x.Z,{onClick:h,variant:"contained",component:"div",style:{borderRadius:40,padding:"5px 36px",fontSize:16,width:"100%"},children:[c&&(0,w.jsx)("span",{className:"mr-2",children:(0,w.jsx)(s.Z,{width:20,height:20,color:"#242424"})}),"Sign in"]}),f&&(0,w.jsx)("p",{className:"text-red-500",children:f})]})]})})),_=S,I=r.memo((function(e){var n=(0,r.useState)("SIGNINWITHEMAIL"),t=n[0],i=n[1];return(0,w.jsx)(w.Fragment,{children:"REGISTER"===t?(0,w.jsx)(y,{changeAction:i,onSuccess:e.onSuccess,appid:e.appid}):(0,w.jsx)(_,{changeAction:i,onSuccess:e.onSuccess,appid:e.appid})})})),Z=t(6277),F=t(39086),E=t.n(F),O=t(89717),V={apiKey:"AIzaSyDdD9FkiGA6oF6NIBV9uoh89SqpUz91Q-k",authDomain:"news-break.firebaseapp.com",databaseURL:"https://news-break.firebaseio.com",projectId:"news-break",storageBucket:"news-break.appspot.com",messagingSenderId:"640964063331",appId:"1:640964063331:web:8a5170b775dc9cf748c856",measurementId:"G-LFEH692HC9"},P=function(){return(0,w.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",width:"22",height:"22",children:[(0,w.jsx)("path",{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"}),(0,w.jsx)("path",{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"}),(0,w.jsx)("path",{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.202,0-9.619-3.317-11.283-7.946l-6.522,5.025C9.505,39.556,16.227,44,24,44z"}),(0,w.jsx)("path",{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.571c0.001-0.001,0.002-0.001,0.003-0.002l6.19,5.238C36.971,39.205,44,34,44,24C44,22.659,43.862,21.35,43.611,20.083z"})]})},z=function(){return(0,w.jsx)("svg",{fill:"#000000",width:"22px",height:"22px",viewBox:"-52.01 0 560.035 560.035",xmlns:"http://www.w3.org/2000/svg",children:(0,w.jsx)("path",{d:"M380.844 297.529c.787 84.752 74.349 112.955 75.164 113.314-.622 1.988-11.754 40.191-38.756 79.652-23.343 34.117-47.568 68.107-85.731 68.811-37.499.691-49.557-22.236-92.429-22.236-42.859 0-56.256 21.533-91.753 22.928-36.837 1.395-64.889-36.891-88.424-70.883-48.093-69.53-84.846-196.475-35.496-282.165 24.516-42.554 68.328-69.501 115.882-70.192 36.173-.69 70.315 24.336 92.429 24.336 22.1 0 63.59-30.096 107.208-25.676 18.26.76 69.517 7.376 102.429 55.552-2.652 1.644-61.159 35.704-60.523 106.559M310.369 89.418C329.926 65.745 343.089 32.79 339.498 0 311.308 1.133 277.22 18.785 257 42.445c-18.121 20.952-33.991 54.487-29.709 86.628 31.421 2.431 63.52-15.967 83.078-39.655"})})},A=function(e){var n=(0,r.useState)(!1),t=n[0],c=n[1],h=(0,m.Z)(),v=(0,o.Z)(h,2)[1],x=(0,r.useState)(!0),j=x[0],b=x[1],y=(0,r.useState)(null),k=y[0],C=y[1],N=(0,O.u)(),S=(0,o.Z)(N,1)[0],_=null===S||void 0===S?void 0:S.os.name,F=_&&"android"===_.toLowerCase(),A=function(n,t){null!==n&&void 0!==n&&n.isLogin&&"webguest"!==(null===n||void 0===n?void 0:n.userType)?(v(n),(0,f.t8)("pushUserId",n.userId)):alert("google"===t?"Login with Google failed. Please check your Chrome login status.":"Login Failed"),(0,d.VU)("signinSuccess",{type:null===n||void 0===n?void 0:n.userType,isLogin:null===n||void 0===n?void 0:n.isLogin}),e.onSuccess()},R=function(e,n,i,o){if(!t)return c(!0),(0,d.VU)("signin",{type:"google"}),(0,p._j)(e,n,i,o).then((function(e){A(e,"google")})).catch((function(e){console.warn(e),A(void 0,"google")})).finally((function(){return c(!1)}))},G=(0,r.useCallback)((function(){i.auth().signInWithPopup(new i.auth.GoogleAuthProvider).then((function(n){var t,i=n.credential,o=null===i||void 0===i?void 0:i.idToken,r=n.additionalUserInfo;R(o,"3600",null===r||void 0===r||null===(t=r.profile)||void 0===t?void 0:t.id,e.appid)})).catch((function(){alert("Login with Google failed. Please check your Chrome login status.")}))}),[]),H=(0,r.useCallback)((function(){var n=new i.auth.OAuthProvider("apple.com");n.addScope("email"),n.addScope("name"),i.auth().signInWithPopup(n).then((function(n){var i,o,r,a=n.credential,s=null===a||void 0===a?void 0:a.idToken,l=n.additionalUserInfo;!function(e,n,i,o){if(!t)c(!0),(0,d.VU)("signin",{type:"apple"}),(0,p.rO)(e,n,i,o).then((function(e){A(e,"apple")}
1)).catch((function(e){console.warn(e),A(void 0,"apple")})).finally((function(){return c(!1)}))}(s,"3600",null!==(i=null===l||void 0===l||null===(o=l.profile)||void 0===o?void 0:o.id)&&void 0!==i?i:null===(r=n.user)||void 0===r?void 0:r.uid,e.appid)})).catch((function(e){console.log(e),alert("Login with Apple failed. Please check your Chrome login status.")}))}),[]),L=(0,r.useCallback)((function(e){"unknown"!==(null===e||void 0===e?void 0:e.status)?function(e,n,i){if(!t)c(!0),(0,d.VU)("signin",{type:"facebook"}),(0,p.jG)(e,n,i).then((function(e){A(e)})).catch((function(e){console.warn(e),A(void 0)})).finally((function(){return c(!1)}))}(e.accessToken,e.expiresIn,e.id):a.Z.error("facebook sign in error")}),[]);return(0,r.useEffect)((function(){g()("https://accounts.google.com/gsi/client",(function(){var e=function(e){var n=e.credential,t=(0,l.Z)(n).sub;R(n,"3600",t)};window.google.accounts.id.initialize({client_id:"640964063331-kf44nklondsrrhd2jl7apgsduqv8uq5o.apps.googleusercontent.com",callback:e,context:"signin"}),(0,p.bG)().then((function(e){e.isLogin||window.google.accounts.id.prompt()}))}))}),[]),e.oneTapOnly?(0,w.jsx)(w.Fragment,{}):((0,r.useEffect)((function(){g()(["https://www.gstatic.com/firebasejs/8.7.1/firebase-app.js","https://www.gstatic.com/firebasejs/8.7.1/firebase-auth.js"],(function(){(i=window.firebase).apps.length?i.app():i.initializeApp(e.firebaseConfig||V),b(!1),i.auth().onAuthStateChanged((function(e){if(e){var n=e.displayName,t=e.photoURL,i=e.email,o=e.providerData,r="google.com";if(o&&o.length>0)r=o[0].providerId;C({name:n,avatar:t,email:i,providerId:r})}}))}))}),[]),(0,w.jsx)(w.Fragment,{children:(0,w.jsx)("div",{className:E().SsoBtns,children:j?(0,w.jsx)(s.Z,{width:28,height:28,color:"#242424"}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("div",{className:(0,Z.Z)("w-full"),children:[k&&"google.com"==k.providerId?(0,w.jsxs)("div",{className:(0,Z.Z)(E().google),onClick:G,children:[(0,w.jsx)("img",{className:"w-6 h-6 rounded-full mx-2",src:k.avatar,alt:"Google"}),(0,w.jsxs)("div",{className:"flex-grow text-xs",children:[(0,w.jsxs)("div",{className:"font-semibold",children:["Continue as ",k.name]}),(0,w.jsx)("div",{className:"text-gray-400",children:k.email})]}),(0,w.jsx)(P,{})]}):(0,w.jsxs)("div",{className:(0,Z.Z)(E().google),onClick:G,children:[(0,w.jsx)(P,{}),(0,w.jsx)("span",{children:"Continue with Google"})]}),!F&&(0,w.jsx)(w.Fragment,{children:k&&"apple.com"==k.providerId?(0,w.jsxs)("div",{className:(0,Z.Z)(E().google),onClick:H,children:[(0,w.jsx)(z,{}),(0,w.jsxs)("div",{className:"flex-grow text-xs",children:[(0,w.jsxs)("div",{className:"font-semibold",children:["Continue as ",k.name]}),(0,w.jsx)("div",{className:"text-gray-400",children:k.email})]})]}):(0,w.jsxs)("div",{className:(0,Z.Z)(E().google),onClick:H,children:[(0,w.jsx)(z,{}),(0,w.jsx)("span",{children:"Continue with Apple"})]})}),null==e.firebaseConfig&&!e.noFacebook&&(0,w.jsx)(u(),{appId:"153277661752118",autoLoad:!1,fields:"name,email,picture",callback:L,disableMobileRedirect:!0,render:function(e){return(0,w.jsxs)("div",{className:E().facebook,onClick:e.onClick,children:[(0,w.jsx)("svg",{width:"22",height:"22",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,w.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.9996 10.9995C21.9996 4.92408 17.0745 -0.000976562 10.9991 -0.000976562C4.92377 -0.000976562 -0.00128174 4.92408 -0.00128174 10.9995C-0.00128174 16.4901 4.02142 21.041 9.28033 21.8662V14.1793H6.48725V10.9995H9.28033V8.57592C9.28033 5.81894 10.9226 4.29607 13.4354 4.29607C14.6389 4.29607 15.8978 4.51092 15.8978 4.51092V7.21806H14.5106C13.1441 7.21806 12.718 8.06601 12.718 8.93595V10.9995H15.7689L15.2812 14.1793H12.718V21.8662C17.9769 21.041 21.9996 16.4901 21.9996 10.9995Z",fill:"#158BFF"})}),(0,w.jsx)("span",{children:"Continue with Facebook"})]})}})]}),!e.noEmail&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)("p",{className:"w-full flex flex-row items-center justify-between text-gray-300 text-base mb-1 mt-2",children:[(0,w.jsx)("span",{className:E().lineItem}),"or",(0,w.jsx)("span",{className:E().lineItem})]}),(0,w.jsx)(I,{onSuccess:A})]})]})})}))}},75817:function(e,n,t){"use strict";t.d(n,{_j:function(){return a},bG:function(){return c},ck:function(){return d},jG:function(){return s},kS:function(){return u},rO:function(){return l},z2:function(){return o},zB:function(){return r}});var i=t(87742),o=function(e,n,t){return(0,i.SQ)("/api/ajax/me/email-register",{body:{email:e,password:n,appid:t},withError:!0})},r=function(e,n,t){return(0,i.d8)("/api/ajax/me/email-login",{body:{email:e,password:n,appid:t},withError:!0})},a=function(e,n,t,o){return(0,i.d8)("/api/ajax/me/gl-login",{body:{accessToken:e,expires
1In:n,isV2:!0,sid:t,appid:o},withError:!0})},s=function(e,n,t){return(0,i.d8)("/api/ajax/me/fb-login",{body:{accessToken:e,expiresIn:n,isV2:!0,sid:t},withError:!0})},l=function(e,n,t,o){return(0,i.d8)("/api/ajax/me/apple-login",{body:{accessToken:e,expiresIn:n,isV2:!0,sid:t,appid:o},withError:!0})},c=function(){return(0,i.mR)("/api/ajax/me/get-info",{withError:!0})},u=function(){return(0,i.ZJ)("/api/ajax/me/logout",{withError:!0})},d=function(e){var n=(0,i.XP)({docid:e});return(0,i.mR)("/api/proxyV2/Website/interact/thumbs-up?".concat(n),{withError:!0})}},77658:function(e,n,t){"use strict";t.d(n,{i:function(){return i},m:function(){return o}});var i=/^[a-zA-Z\d]{8,16}$/,o=/^[a-zA-Z0-9.!#$%&\u2019*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/},80943:function(e){e.exports={button:"NButton_button__A4Gy5",outlined:"NButton_outlined__eAtDS",contained:"NButton_contained___1RmU"}},52404:function(e){e.exports={label:"NInput_label__nnaHg",title:"NInput_title__cOOF6",inputContainer:"NInput_inputContainer__UxsZ4",focus:"NInput_focus__fn3oG",error:"NInput_error__lI_Pe",input:"NInput_input__in8op"}},39086:function(e){e.exports={SsoBtns:"SsoSignin_SsoBtns__XRq9E",lineItem:"SsoSignin_lineItem__pbUe7",google:"SsoSignin_google__DZTEc",facebook:"SsoSignin_facebook__XreHq"}}}]);
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.