PageSourceSearch

https://member.ufabet888.foo/assets/1789559418326/DaRw2plu.js

js ufabet888.foo collected 2026-10-06 13:17:07 UTC 12,091 bytes, 1 lines download raw bytes

1import{v as Ue,f as V,a as y,d as J,l as K,R as X,S as Y,r as m,K as Q,G as Z,e as i,c as G,g as j,b as a,w as A,h as o,a9 as L,_ as ge,H as ee,t as E,ao as ne,ah as Le,u as $e,T as z,m as ke,n as Re,ap as Ee,aq as ce,o as Ae,ar as de,J as W,q as Ve,p as Ie,an as qe,as as Ne,B as me,at as Oe,P as pe}from"./zGN25SIG.js";import{_ as Te}from"./D2WAcC-S.js";import{u as Me}from"./Cb99P-qe.js";import{_ as Fe}from"./B4Q5fQQX.js";import{_ as De}from"./B_rfAPYF.js";import{_ as fe}from"./CzZ_3Hx8.js";import{_ as he}from"./Dzg3GZNq.js";import{_ as _e}from"./CivJAmq1.js";import{_ as ve}from"./DlvqEqMQ.js";import{_ as je}from"./BJ4Kb05H.js";import"./BmwrrxPv.js";const He={},ze={class:"horizontal-line"};function Ge(O,I){return y(),V("div",ze)}Ue(He,[["render",Ge]]);const Qe={class:"space-y-4 px-5 pt-4"},We={class:"ui-section-divider"},Je={key:1},Ke={class:"text-right"},Xe=J({__name:"LoginByUsernameForm",props:{loading:{type:Boolean},errMsg:{},initialUsername:{},initialPassword:{}},emits:["submit","update:username"],setup(O,{emit:I}){const{t:h}=K(),$=X(),{isEnableAltcha:_}=Y($),w=O,k=I,b=m(null),c=m(null),l=m(w.initialUsername??""),p=m(w.initialPassword??""),g=m("");Q(l,s=>k("update:username",s)),Q(()=>w.initialUsername,s=>{s&&(l.value=s)}),Q(()=>w.initialPassword,s=>{s&&(p.value=s)});const x=Z(()=>!(w.loading||!l.value||!p.value||_.value&&!g.value));function v(){x.value&&P()}function P(){k("submit",{username:l.value,password:p.value,altchaPayload:g.value})}return(s,d)=>{const r=De,T=fe,U=he,C=_e,q=ve,N=ge,M=ne;return y(),V("div",Qe,[i(U,{variant:"glass"},{default:A(()=>[a("div",We,[i(r,{ref_key:"usernameRef",ref:b,modelValue:o(l),"onUpdate:modelValue":d[0]||(d[0]=S=>L(l)?l.value=S:null),label:o(h)("usernamePlaceholder"),placeholder:o(h)("usernamePlaceholder"),inputmode:"text",autocomplete:"username",enterkeyhint:"next",maxlength:20,onEnter:d[1]||(d[1]=S=>o(c)?.focus())},null,8,["modelValue","label","placeholder"])]),i(T,{ref_key:"passwordRef",ref:c,modelValue:o(p),"onUpdate:modelValue":d[2]||(d[2]=S=>L(p)?p.value=S:null),label:o(h)("passwordPlaceholder"),autocomplete:"current-password",enterkeyhint:"go",onEnter:v},null,8,["modelValue","label"])]),_:1}),s.errMsg?(y(),G(C,{key:0,msg:s.errMsg,type:"error"},null,8,["msg"])):j("",!0),o(_)?(y(),V("div",Je,[i(U,{label:o(h)("changePassword.verification")},{default:A(()=>[i(q,{ref:"altchaRef",payload:o(g),"onUpdate:payload":d[3]||(d[3]=S=>L(g)?g.value=S:null),remark:"login"},null,8,["payload"])]),_:1},8,["label"])])):j("",!0),i(N,{variant:"primary",label:o(h)("btn.login"),disabled:!o(x),loading:s.loading,onClick:P},null,8,["label","disabled","loading"]),a("div",Ke,[i(M,{to:"/resetPassword",class:"text-[12px] text-[#E3BB72]/70 cursor-pointer"},{default:A(()=>[ee(E(o(h)("btn.forgotPassword"))+"?",1)]),_:1})])])}}}),Ye=Object.assign(Xe,{__name:"LoginByUsernameForm"}),Ze={class:"space-y-4 px-5 pt-4"},en={class:"ui-section-divider"},nn={key:1},tn={class:"text-right"},on=J({__name:"LoginByPhoneForm",props:{loading:{type:Boolean},errMsg:{},initialPhoneNumber:{},initialPhoneCountryCode:{}},emits:["submit","phone-choice-changed"],setup(O,{emit:I}){const{t:h}=K(),$=X(),{isEnableAltcha:_}=Y($),w=O,k=I,b=m(null),c=m(w.initialPhoneNumber??""),l=m(w.initialPhoneCountryCode??""),p=m(""),g=m(""),x=Z(()=>!(w.loading||!c.value||!p.value||_.value&&!g.value));function v(){x.value&&s()}function P(d){k("phone-choice-changed",d)}function s(){k("submit",{phoneNumber:c.value,phoneCountryCode:l.value,password:p.value,altchaPayload:g.value})}return(d,r)=>{const T=je,U=fe,C=he,q=_e,N=ve,M=ge,S=ne;return y(),V("div",Ze,[i(C,{variant:"glass"},{default:A(()=>[a("div",en,[i(T,{"phone-country-code":o(l),"onUpdate:phoneCountryCode":r[0]||(r[0]=B=>L(l)?l.value=B:null),"phone-number":o(c),"onUpdate:phoneNumber":r[1]||(r[1]=B=>
1L(c)?c.value=B:null),onPhoneChoiceChanged:P,onEnter:r[2]||(r[2]=B=>o(b)?.focus())},null,8,["phone-country-code","phone-number"])]),i(U,{ref_key:"passwordRef",ref:b,modelValue:o(p),"onUpdate:modelValue":r[3]||(r[3]=B=>L(p)?p.value=B:null),label:o(h)("passwordPlaceholder"),autocomplete:"current-password",enterkeyhint:"go",onEnter:v},null,8,["modelValue","label"])]),_:1}),d.errMsg?(y(),G(q,{key:0,msg:d.errMsg,type:"error"},null,8,["msg"])):j("",!0),o(_)?(y(),V("div",nn,[i(C,{label:o(h)("changePassword.verification")},{default:A(()=>[i(N,{ref:"altchaRef",payload:o(g),"onUpdate:payload":r[4]||(r[4]=B=>L(g)?g.value=B:null),remark:"login"},null,8,["payload"])]),_:1},8,["label"])])):j("",!0),i(M,{variant:"primary",label:o(h)("btn.login"),disabled:!o(x),loading:d.loading,onClick:s},null,8,["label","disabled","loading"]),a("div",tn,[i(S,{to:"/resetPassword",class:"text-[12px] text-[#E3BB72]/70 cursor-pointer"},{default:A(()=>[ee(E(o(h)("btn.forgotPassword"))+"?",1)]),_:1})])])}}}),an=Object.assign(on,{__name:"LoginByPhoneForm"}),sn={id:"login-main",class:"w-full mx-auto max-w-[438px] overflow-hidden relative"},rn={class:"flex justify-between items-center p-4",style:{position:"fixed",top:"0px",width:"100%","max-width":"438px"}},ln={class:"flex flex-row items-center"},un=["src"],cn={class:"h-[calc(100vh-72px)] overflow-auto pb-[100px]"},dn={class:"min-h-full flex flex-col"},mn={class:"my-auto w-full py-8"},pn={class:"relative w-full"},gn={class:"login-form-container"},fn={class:"login-form"},hn={class:"text-center text-[11px] text-[#E3BB72]/50 uppercase tracking-[0.15em] pt-1"},_n={class:"mt-3 mx-5 flex gap-x-1.5 bg-black/40 rounded-[10px] p-1 border border-white/[0.06]"},vn={key:0,class:"flex flex-row justify-center items-center mt-5 mx-4 pt-4 border-t border-[#E3BB72]/10"},bn={class:"text-white/40 text-[13px]"},Rn=J({__name:"index",setup(O){Me(m({path:"/member/login"}));const I=e=>new Promise(n=>setTimeout(n,e)),{setLocale:h,t:$}=K(),_=X(),{enableRegisterButton:w,isEnableRegisterButton:k}=Y(_),b=Le(),c=$e(),l=z("login:username",""),p=z("login:phoneCountry",""),g=z("login:phoneNumber",""),x=m(""),v=m(""),P=m(!1),s=z("login:loginOption",1),d=ke(),r=Re(),T=Z(()=>Ee(r.activeLanguage)?.icn||ce()?.icn),U=m(!1),C=m(!1),q=Oe(async e=>{try{const n={language:r.activeLanguage||void 0,userCountryCode:r.userCountryCode||void 0};let t=null;if(s.value===2)t=await W.loginByPhone(e.phoneNumber,e.phoneCountryCode,e.password,e.altchaPayload,n);else{if(!k.value&&!e.username){v.value=$("error.enterUsername");return}if(!k.value&&(e.username?.length??0)<4){v.value=$("error.usernameLength");return}t=await W.loginByUsername(e.username,e.password,e.altchaPayload,n)}if(t)if(t.succ){if(t.redirectUrl){window.location.href=t.redirectUrl;return}return await r.setAuthenticated(!0,t.token,t.user),t.user?.language&&F(t.user.language),await ye()}else v.value=t.msg||$("error.pleaseTryAgain");else v.value=$("error.pleaseTryAgain")}catch{}finally{C.value=!1}},1e3,{maxWait:5e3}),N=async(e=!0,n=0)=>{const t=await _.fetchSiteConfig(!0);if(t){if(t.succ){await _.fetchPhoneListChoices();return}if(e){if(t.msg&&t.msg.includes("Invalid request"))return await b.push("/403?reason=Invalid hostname");if(t.type&&t.type==="INVALID_HOSTNAME")return await b.push("/403?reason=Invalid hostname")}}n<3?(await I(n*1e3),await N(e,n+1)):await b.push("/error?reason=Cannot load config")};Ae(async()=>{if(d.setEmbedMode(!1,null,""),await r.setAuthenticated(!1),(c.query||{}).logout){const n=new URL(location.href);n.searchParams.delete("logout"),window.location.href=n.toString()}else{await N(!0),await M();const n=c.query.u,t=c.query.p;n&&(l.value=n,s.value=1),t&&(x.value=t);const f=window.location.hash,R=f.indexOf("?");let u=null,H=null;if(R!==-1){const D=new URLSearchParams(f.slice(R+1));u=D.get("u"),H=D.get("p"),u&&(l.value=u,s.value=1),H&&(x.value=H)}const oe=String(c.query.redirect||"");if(oe&&!u&&!H&&!n&&!t){const D=decodeURIComponent(oe),ae=D.indexOf("#");if(ae!==-1){const se=D.slice(ae),re=se.indexOf("?");if(re!==-1){const le=new URLSearchParams(se.slice(re+1)),ie=le.get("u"),ue=le.get("p");ie&&(l.value=ie,s.value=1),ue&&(x.value=ue)}}}}});async function M(){await S()}async function S(){const e=r.language,n=(c.query||{}).lang||e;if(de(n))F(n);else{const f=ce()?.localeValue;f&&F(f)}let t=(c.query||{}).s;if(t?_.setSiteLastRegisterSource(t):t=_.getSiteLastRegisterSource(),t){const f=await B(t);if(!f.valid)t="";else if(!e){_.setSiteLastRegisterSource(t);const u=f.res?.locale;u&&!n&&de(u)&&F(u)}}_.setSiteLastRegisterSource(t),await r.setBindRegisterSourceSlug(t),await r.refreshContactChannel()}const B=async e=>{try{const n=await W.getRegisterSourcesBySlug(e);return n&&n.succ?{valid:!0,res:n.data}:{valid:!1,res:null}}catch{return{valid:!1,res:null}}};async function be(e){v.value="",C.value=!0,await q({username:e.username,password:e.password,altchaPayload:e.altchaPayload})}async function we(e){v.value="",C.value=!0,await q({phoneNumber:e.phoneNumber,phoneCountryCode:e.phoneCountryCode,password:e.password,altchaPayload:e.altchaPayload})}async function ye(){const{redirect:e,liveId:n}=c.query;if(n)window.open(`${window.location.origin}/livestream?liveId=${n}`,"_self");else if(e&&!String(e).includes("#login")&&!String(e).includes("%23login")){const t=Array.isArray(e)?e[0]??"":String(e??""),f=t.indexOf("?");if(f!==-1){const R=t.slice(0,f),u=Object.fromEntries(new URLSearchParams(t.slice(f+1)));return b.push({path:R,query:u,replace:!0})}return b.push({path:t,replace:!0})}else await b.replace({name:pe.HOME})}function xe(){return b.push({path:`/${pe.REGISTER}`,query:{registerUsername:l.value,registerPhone:g.value}})}function Pe(){U.value=!1}function F(e){h(e),r.setLanguage(e)}function Ce({lang:e,code:n}){F(e),r.userCountryCode=n}function Se(){P.value=!P.value}function te(e){s.value=e,v.value="",l.value=""}const Be=e=>{};return(e,n)=>{const t=qe,f=Te,R=ne;return y(),V("div",sn,[a("div",{class:"login-bg",style:Ve({backgroundImage:`url(${o(Ie)("/images/login-backdrop.webp")})`})},null,4),i(t,{modelValue:o(U),"onUpdate:modelValue":n[0]||(n[0]=u=>L(U)?U.value=u:null),title:e.$t("info.wouldLikeToCreateAccountWithThisUsername"),"confirm-label":e.$t("btn.createAccount"),"cancel-label":e.$t("btn.tryAgain"),onConfirm:xe,onCancel:Pe},null,8,["modelValue","title","confirm-label","cancel-label"]),a("section",null,[n[6]||(n[6]=a("div",{style:{height:"72px"}},null,-1)),a("div",rn,[n[5]||(n[5]=a("div",null,null,-1)),a("div",ln,[i(f,{class:"mr-4"}
1),a("div",null,[a("img",{class:"mx-auto w-[40px] h-[40px] cursor-pointer",width:"40px",src:o(T),alt:"logo",onClick:Se},null,8,un)])])]),i(Ne,{open:o(P),"onUpdate:open":n[1]||(n[1]=u=>L(P)?P.value=u:null),dismissible:"","hide-confirm":"",onDone:Ce},null,8,["open"])]),a("div",cn,[a("div",dn,[a("div",mn,[i(Fe),a("div",pn,[a("div",gn,[a("div",fn,[a("div",hn,E(e.$t("info.loginVia")),1),a("div",null,[a("div",_n,[a("button",{type:"button",class:me(["flex-1 h-[34px] rounded-[8px] text-[13px] font-medium transition-all active:bg-white/5",o(s)===1?"bg-[#E3BB72]/10 text-[#E3BB72] border border-[#E3BB72]/30 shadow-sm":"text-white/35 border border-transparent"]),onClick:n[2]||(n[2]=u=>te(1))},E(e.$t("usernamePlaceholder")),3),a("button",{type:"button",class:me(["flex-1 h-[34px] rounded-[8px] text-[13px] font-medium transition-all active:bg-white/5",o(s)===2?"bg-[#E3BB72]/10 text-[#E3BB72] border border-[#E3BB72]/30 shadow-sm":"text-white/35 border border-transparent"]),onClick:n[3]||(n[3]=u=>te(2))},E(e.$t("user.phoneNumber")),3)]),o(s)===1?(y(),G(Ye,{key:0,loading:o(C),"err-msg":o(v),"initial-username":o(l),"initial-password":o(x),onSubmit:be,"onUpdate:username":n[4]||(n[4]=u=>l.value=u)},null,8,["loading","err-msg","initial-username","initial-password"])):(y(),G(an,{key:1,loading:o(C),"err-msg":o(v),"initial-phone-number":o(g),"initial-phone-country-code":o(p),onSubmit:we,onPhoneChoiceChanged:Be},null,8,["loading","err-msg","initial-phone-number","initial-phone-country-code"]))])]),o(w)?(y(),V("div",vn,[a("div",bn,E(e.$t("info.infoDontHaveAccount")),1),i(R,{to:"/register",class:"ml-3 text-[13px] font-medium text-[#E3BB72] border border-[#E3BB72]/40 rounded-lg px-3 py-1.5 active:bg-[#E3BB72]/10 transition-colors"},{default:A(()=>[ee(E(e.$t("btn.signUp")),1)]),_:1})])):j("",!0)])])])])])])}}});export{Rn as default};

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.