PageSourceSearch

https://assets.recargajogo.com.br/gop/mshop/www/live/assets/LoginIdAuthForm-a21f198c.js

js recargajogo.com.br collected 2026-10-04 18:33:52 UTC 7,376 bytes, 1 lines download raw bytes

1import{j as t,bX as N,Q as T,ak as z,c as U,d as V,h as G,x as W,a as J,o as u,p as y,bB as K,am as D,an as Q,bY as X,z as $,P as Z,D as ee}from"./index-878ce38c.js";import{r as s}from"./react-0e2a0c96.js";import{cS as re,aG as te,al as ae,am as se,bp as ne}from"./images-0c2231a1.js";function ie(e,i,o,l){const d=s.useRef(i);s.useEffect(()=>{d.current=i},[i]),s.useEffect(()=>{var c;const n=(c=o==null?void 0:o.current)!=null?c:window;if(!(n&&n.addEventListener))return;const _=p=>d.current(p);return n.addEventListener(e,_,l),()=>{n.removeEventListener(e,_,l)}},[e,o,l])}const le=({onVerify:e})=>{const i=s.useRef(null),[o,l]=s.useState(!1),d=s.useRef(e);return s.useEffect(()=>{d.current=e},[e]),s.useEffect(()=>{if(typeof window.grecaptcha<"u"){l(!0);return}const n=document.createElement("script");return n.src="https://www.google.com/recaptcha/api.js?render=explicit",n.onload=()=>{window.grecaptcha.ready(()=>l(!0))},document.body.appendChild(n),()=>{document.body.removeChild(n)}},[]),s.useEffect(()=>{if(!i.current||!o)return;const n=window.grecaptcha.render(i.current,{sitekey:"6LcW7R4dAAAAAH1VxYPJRq38L2vzKaegSLV05ilc",callback(_){d.current({recaptcha_token:_})}});return()=>{window.grecaptcha.reset(n)}},[o]),t("div",{ref:n=>{i.current=n}})},oe=({provider:e,onVerify:i})=>{switch(e){case N.RECAPTCHA:return t(le,{onVerify:i});case N.NONE:default:return null}},ce=()=>{const[e,i]=s.useState();ie("captcha-blocked",l=>i(l.detail));const o=l=>{window.dispatchEvent(new CustomEvent("captcha-verified",{detail:{data:l}})),i(void 0)};return t(T,{isOpen:e?e.provider!==N.NONE:!1,onClose:()=>{},children:t("div",{className:"p-2",children:e&&t(oe,{...e,onVerify:o})})})},de=e=>{switch(e){case"invalid_id":return"error__invalid_player_id";case"service_not_available":return"error__player_id_service_not_available";case"empty_recaptcha":case"error_require_recaptcha_token":case"error_require_datadome_recaptcha_token":return"error__please_tick_recaptcha";case"error_recaptcha_token":return"error__recaptcha_please_retry";case"mtcaptcha":return"error__please_finish_mtcaptcha";case"error_mtcaptcha_token":return"error__mtcaptcha_please_retry";case"error_require_mtcaptcha_token":return"error__mtcaptcha_verifying";
1case"empty_player_id":case"server":case"user_banned":case"recaptcha_failed":return"error__".concat(e);default:return e?typeof e=="string"?e.startsWith("error_")?e.replace("error_","error__"):e:"error__server":""}},me=({app:e,className:i,layout:o="h",onLogin:l,source:d="main"})=>{var R;const{trackClick:n,trackOverlappingLogin:_}=z(),{t:c}=U(),{oauth:p,loginIdAuth:F}=V(),f=G(),[b,O]=W("historyPlayer",[]),h=s.useMemo(()=>{const r=[];for(const a of b)if(a.app_id===(e==null?void 0:e.app_id)&&r.push(a),r.length===3)return r;return r},[b,e]),x=s.useId(),[E,j]=s.useState(""),[g,w]=s.useState(""),[v,A]=s.useState(!1),[H]=J(),C=H.get("app_server_id"),q=async r=>{r.preventDefault();const m=r.currentTarget.elements.namedItem(x);P(m.value)},P=async r=>{if(v)return;w(""),A(!0);const a=e.app_id,m={app_id:a,app_id_overlapping:a,id_login_secondary:!1,id_login_secondary_primary_platform:0,id_login_secondary_successful:!1,id_login_secondary_successful_primary_platform:0,game_login_secondary:!1,game_login_secondary_primary_platform:0};p?(n({action:"id_login_secondary",app_id:a,platform_id_primary:p.platform,event_source:d}),_({...m,id_login_secondary:!0,id_login_secondary_primary_platform:p.platform})):n({action:"id_login",app_id:a,event_source:d}),window.gtag("event","msp.select-login-playerid",{appId:a,eventSource:d});try{if(r.length===0)throw new Error("empty_player_id");if(!(Z[e.app_id]||ee).test(r))throw new Error("invalid_id");await F({app_id:a,login_id:r,app_server_id:C?Number(C):void 0}),p&&_({...m,id_login_secondary_successful:!0,id_login_secondary_successful_primary_platform:p.platform}),l==null||l()}catch(L){let k;L instanceof Error?k=de(L.message):k="error__server",w(k)}finally{A(!1)}},B=r=>{O(b.filter(a=>!(a.app_id===r.app_id&&a.login_id===r.login_id)))},[M,I]=s.useState(!1),Y=c("plh__enter_player_id"),S=s.useRef("");return u("form",{className:i,onSubmit:q,children:[u("label",{className:"mb-2 flex items-center gap-1 text-[15px]/4 font-medium text-text-title",htmlFor:x,children:[c("lbl__player_id"),t("button",{type:"button",className:"rounded-full text-sm outline-none transition-opacity hover:opacity-70",onClick:()=>{var r;I(!0),n({action:"player_id_help",app_id:e.app_id,open_id:(r=f.role)==null?void 0:r.open_id}),window.gtag("event","msp.click-playerid-help",{appId:e.app_id})},children:t(re,{})}),t(T,{isOpen:M,onClose:()=>I(!1),children:t("div",{className:"p-2",children:t("div",{className:"w-full max-w-xs md:max-w-lg",children:t("img",{className:"pointer-events-none",src:(R=e.id_login)==null?void 0:R.img_url})})})})]}),u("div",{className:y("flex",{"flex-col gap-4":o==="v"}),children:[u("div",{className:"relative grow",children:[t("input",{id:x,className:y("form-input w-full bg-bg-unselected px-4",{"form-input-invalid":g,"ltr:pr-[46px] rtl:pl-[46px]":h.length>0,"ltr:rounded-r-none ltr:border-r-0 rtl:rounded-l-none rtl:border-l-0":o==="h"}),type:"text",autoComplete:"off",dir:E?"ltr":void 0,disabled:f.isLoading||v,placeholder:Y,onFocus:r=>S.current=r.target.value,onBlur:r=>{r.target.value&&r.target.value!==S.current&&window.gtag("event","msp.type-login-playerid",{appId:e.app_id})},value:E,onChange:r=>{const a=r.currentTarget;j(e.app_id===K?a.value.toUpperCase():a.value),g&&w("")}}),u(D,{as:s.Fragment,children:[h.length>0&&t(D.Button,{className:({open:r})=>y("absolute end-4 top-1/2 block -translate-y-1/2 text-lg transition-all hover:opacity-70",{"rotate-180":r}),type:"button",disabled:f.isLoading||v,children:t(te,{})}),t(Q,{pcPopoverClassName:"inset-x-0 top-full mt-1 z-10 origin-top-right border border-line",title:c("title__select_player_id"),children:({close:r})=>t("ul",{className:"md:rounded-[5px] md:p-1",children:h.map(a=>u("li",{className:"flex cursor-pointer items-center py-3 transition-colors max-md:mx-4 max-md:border-b max-md:border-b-line/50 md:rounded-sm md:px-4 md:hover:bg-[#FAFAFA] dark:md:hover:bg-[#3C3C47]",onClick:()=>{P(a.login_id),r()},children:[t("div",{className:"me-3 h-10 w-10 shrink-0 overflow-hidden rounded-full",children:t(X,{className:"block h-full w-full object-contain",src:a.img_url,fallback:u($,{children:[t(ae,{className:"h-full w-full dark:hidden"}),t(se,{className:"hidden h-full w-full dark:block"})]})})}),u("div",{className:"flex-1",children:[a.nickname&&t("div",{className:"mb-2 text-base/none font-medium",children:c("lbl__username",{username:a.nickname})}),u("div",{className:"text-xs/none text-text-secondary",children:[c("lbl__player_id"),": ",a.login_id]})]}),t("button",{className:"ms-4 text-2xl text-[#A0A0A0] hover:opacity-80 active:opacity-60",type:"button",onClick:m=>{m.stopPropagation(),B(a),h.length===1&&r()},children:t(ne,{})})]},a.login_id))})})]})]}),t("button",{className:y("shrink-0 rounded-md bg-primary-red px-5 py-[15px] text-sm/none font-bold text-white transition-colors hover:bg-primary-red-hover focus-visible:outline focus-visible:outline-2 focus-visible:-outline-offset-2 disabled:grayscale",{"rounded-s-none":o==="h"}),type:"submit",disabled:f.isLoading||v,children:c("btn__player_id_login")})]}),g&&t("div",{className:"mt-2 text-xs/none text-text-content2 md:text-sm/none",children:c(g)}),t(ce,{})]})};export{me as L,de as g,ie as u};

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.