PageSourceSearch

https://pro.sport.fun/static/assets/MfaEnrollmentFlowScreen-DVIYYrnE-Crsst7Cv.js

js sport.fun collected 2026-09-29 14:38:30 UTC 10,333 bytes, 1 lines download raw bytes

1import{B as n,gt as re,fh as K,go as X,gn as z,gp as se,fw as ae,j as e,hX as le,kk as ie,kl as ce,km as me,kn as de}from"./index-BSx329UM.js";import{T as d,g as u,F as O,m as v,$ as ue}from"./ModalHeader-DffkxvO4-4hAT2A9_.js";import{F as D}from"./ShieldCheckIcon-z2DOt0CW.js";import{t as he,f as fe,l as xe,i as je}from"./EnrollTotp-50wriSZ1-DASeWGxA.js";import{F as pe}from"./CheckCircleIcon-B3jnpgnE.js";import{F as Y}from"./PhoneIcon-OUspqz8t.js";import{w as ye,p as we}from"./ConnectPhoneForm-DtsOvq6k-CNoqHFgm.js";import{a as ve,d as H,w as x,l as j,p,m as g,s as ge,x as q,c as G,C as ke,T as Ce}from"./PinInput-B8vD-umi-RUmbYfFT.js";import{ErrorScreenView as Fe}from"./ErrorScreen-CBWkrb3m-DWPhPBdp.js";import"./FingerPrintIcon-xpirCS6H.js";import"./Chip-D2-wZOHJ-Bb76jdxA.js";import"./LoadingSkeleton-U6-3yFwI-BIZ0dd5D.js";import"./LinkPasskeyScreen-C-MqivSL-CegMy8r7.js";import"./TodoList-CgrU7uwu-BPLRFI_B.js";import"./x-DJH24y2V.js";import"./createLucideIcon-DVQ5gbwD.js";import"./check-HNrCic8x.js";import"./ScreenLayout-Caq5mGD8-C8e_i3Eq.js";import"./Screen-D8KNyGVj-aZIJz9Of.js";import"./index-Dq_xe9dz-txSzgltx.js";import"./circle-check-big-BBmS3Rm6.js";import"./fingerprint-pattern-DMXeGVu0.js";import"./CopyToClipboard-DSTf_eKU-DSKh12Om.js";import"./Layouts-BlFm53ED-C4rR6VvK.js";import"./LabelXs-oqZNqbm_-CVmuQ0dM.js";import"./Subtitle-CV-2yKE4-CYQRfVWv.js";import"./Title-BnzYV3Is-5TbbvIo3.js";import"./shared-FM0rljBt-DxmF9DKX.js";import"./QrCode-CvO4k-hN-DLxsKRyf.js";import"./reservoir-DKpzKPcU-HWQ330Gm.js";import"./triangle-alert-DmmkFkSA.js";import"./lock-S1jVKwYy.js";function Ee({title:o,titleId:m,...h},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":m},h),o?n.createElement("title",{id:m},o):null,n.createElement("path",{fillRule:"evenodd",d:"M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z",clipRule:"evenodd"}))}const Se=n.forwardRef(Ee);function be({title:o,titleId:m,...h},a){return n.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:a,"aria-labelledby":m},h),o?n.createElement("title",{id:m},o):null,n.createElement("path",{fillRule:"evenodd",d:"M4.5 3.75a3 3 0 0 0-3 3v10.5a3 3 0 0 0 3 3h15a3 3 0 0 0 3-3V6.75a3 3 0 0 0-3-3h-15Zm4.125 3a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Zm-3.873 8.703a4.126 4.126 0 0 1 7.746 0 .75.75 0 0 1-.351.92 7.47 7.47 0 0 1-3.522.877 7.47 7.47 0 0 1-3.522-.877.75.75 0 0 1-.351-.92ZM15 8.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15ZM14.25 12a.75.75 0 0 1 .75-.75h3.75a.75.75 0 0 1 0 1.5H15a.75.75 0 0 1-.75-.75Zm.75 2.25a.75.75 0 0 0 0 1.5h3.75a.75.75 0 0 0 0-1.5H15Z",clipRule:"evenodd"}))}const Me=n.forwardRef(be),Re=({appName:o,onComplete:m,onReset:h,onClose:a})=>{let[s,B]=n.useState(""),[T,W]=n.useState(!1),[E,k]=n.useState(null),[S,b]=n.useState("enroll"),{initEnrollmentWithSms:f,submitEnrollmentWithSms:A}=K(),{data:l}=X(),M=z();function C(){l?.mfaEnrollmentFlow?.onSuccess(),m()}return E?e.jsx(Fe,{allowlistConfig:M.allowlistConfig,error:E,onBack:()=>k(null),onRetry:()=>k(null)}):e.jsxs(e.Fragment,S==="enroll"?{children:[e.jsx(d,{backFn:h,onClose:a},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(Y,{})}),e.jsx(j,{children:"Set up SMS verification"}),e.jsxs(p,{children:["We'll text a verification code to this mobile device whenever you use your ",o," ","wallet."]}
1),e.jsxs(H,{children:[e.jsx(ye,{onSubmit:async function({qualifiedPhoneNumber:y}){try{await f({phoneNumber:y}),B(y),b("verify")}catch(i){k(i)}},hideRecent:!0}),e.jsxs(ke,{children:["By providing your mobile number, you agree to receive text messages from ",M?.name,". Some carrier charges may apply"]})]}),e.jsx(u,{})]}:T?{children:[e.jsx(d,{onClose:C},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(pe,{})}),e.jsx(j,{children:"SMS verification added"}),e.jsxs(p,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",o," wallet."]}),e.jsx(g,{children:e.jsx(v,{onClick:C,children:"Done"})}),e.jsx(u,{})]}:{children:[e.jsx(d,{backFn:function(){S==="verify"?b("enroll"):h()},onClose:a},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(Y,{})}),e.jsx(j,{children:"Enter enrollment code"}),e.jsxs(H,{children:[e.jsx(Ce,{onChange:async function(y){try{if(!y)return;await A({phoneNumber:s,mfaCode:y}),W(!0)}catch(i){throw ie(i)?Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds."):ce(i)?Error("The code you entered is not valid"):me(i)?Error("You have exceeded the time limit for code entry. Please try again in 30 seconds."):de(i)?Error("Verification canceled"):Error("Unknown error")}}}),e.jsxs(p,{children:["To continue, enter the 6-digit code sent to ",e.jsx("strong",{children:we(s)})]})]}),e.jsx(u,{})]})},cn={component:()=>{let{user:o,enrollInMfa:m,ready:h}=re(),[a,s]=n.useState(null),{unenrollWithSms:B,unenrollWithTotp:T,unenrollWithPasskey:W,submitEnrollmentWithTotp:E,initEnrollmentWithPasskey:k,submitEnrollmentWithPasskey:S,initEnrollmentWithTotp:b}=K(),{data:f,onUserCloseViaDialogOrKeybindRef:A}=X(),l=z(),{closePrivyModal:M}=se(),{promptMfa:C}=ae(),[y,i]=n.useState(!1),[R,$]=n.useState(null),[U,Z]=n.useState(null),r=()=>{M({shouldCallAuthOnSuccess:!0}),m(!1),setTimeout((()=>{s(null),$(null)}),500)},[J,I]=n.useState(!1),[Q,F]=n.useState();A.current=r;let _=o?.mfaMethods.includes("sms"),ee=!!o?.phone,ne=o?.mfaMethods.includes("totp"),te=o?.mfaMethods.includes("passkey"),P=_||ne||te,N=o?.linkedAccounts.filter((t=>t.type==="passkey")).map((t=>t.credentialId))??[];function w(){s(null),$(null)}async function L(t=N){I(!0);try{return await k(),await S({credentialIds:t},{removeForLogin:f?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),f?.mfaEnrollmentFlow?.onSuccess(),r()}catch(c){F(c)}finally{I(!1)}}if(n.useEffect((()=>{P&&i(!0)}),[P]),!h||!o||!l)return e.jsxs(e.Fragment,{children:[e.jsx(d,{onClose:r},"header"),e.jsx(ve,{children:e.jsx(he,{})}),e.jsx(H,{children:e.jsx(le,{})}),e.jsx(u,{})]});if(a==="sms")return e.jsxs(e.Fragment,{children:[e.jsx(d,{backFn:w,onClose:r},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(O,{})}),e.jsx(j,{children:"Remove SMS verification?"}),e.jsxs(p,{children:["MFA adds an extra layer of security to your ",l?.name," account. Make sure you have other methods to secure your account."]}),e.jsx(g,{children:e.jsx(v,{$warn:!0,onClick:async function(){s(null);try{await B()}catch{s(null)}},children:"Remove"})}),e.jsx(u,{})]});if(a==="totp")return e.jsxs(e.Fragment,{children:[e.jsx(d,{backFn:w,onClose:r},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(O,{})}),e.jsx(j,{children:"Remove authenticator app verification?"}),e.jsxs(p,{children:["MFA adds an extra layer of security to your ",l?.name," account. Make sure you have other methods to secure your account."]}),e.jsx(g,{children:e.jsx(v,{$warn:!0,onClick:async function(){s(null);try{await T()}catch{s(null)}},children:"Remove"})}),e.jsx(u,{})]});if(a==="passkey"){let t=f?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;return e.jsxs(e.Fragment,{children:[e.jsx(d,{backFn:w,onClose:r},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(O,{})}),e.jsx(j,{children:"Are you sure you want to remove this passkey?"}),e.jsx(p,{children:t?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),e.jsx(g,{children:e.jsx(v,{$warn:!0,onClick:async function(){s(null);try{await W({removeForLogin:f?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch{s(null)}},children:"Remove"})}),e.jsx(u,{})]})}if(f.mfaEnrollmentFlow.mfaMethods.length===0&&!P)return e.jsxs(e.Fragment,{children:[e.jsx(d,{onClose:r},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(D,{})}),e.jsx(j,{children:"Add more security"}),e.jsxs(p,{children:[l?.name," does not have any verification methods enabled."]}),e.jsx(g,{children:e.jsx(v,{onClick:r,children:"Close"})}),e.jsx(u,{})]});let V=!P&&!y;return V?e.jsxs(e.Fragment,{children:[e.jsx(d,{onClose:r},"header"),e.jsx(x,{style:{marginBottom:"1.5rem"},children:e.jsx(D,{})}),e.jsx(j,{children:"Transaction Protection"}),e.jsx(p,{children:"Set up transaction protection to add an extra layer of security to your account"}),e.jsxs(ge,{children:[e.jsxs(q,{children:[e.jsx(G,{children:e.jsx(Se,{})}),"Enable 2-Step verification for your ",l?.name," wallet."]}
1),e.jsxs(q,{children:[e.jsx(G,{children:e.jsx(Me,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),e.jsxs(g,{children:[e.jsx(v,{onClick:()=>i(!0),children:"Continue"}),e.jsx(ue,{onClick:r,children:"Not now"})]}),e.jsx(u,{})]}):R==="sms"?e.jsx(Re,{appName:l?.name||"Privy",onComplete:r,onReset:w,onClose:r}):R==="totp"&&U?e.jsx(fe,{onClose:r,onReset:w,submitEnrollmentWithTotp:({mfaCode:t})=>(async function(c){try{return F(void 0),await E({mfaCode:c}),f?.mfaEnrollmentFlow?.onSuccess(),r()}catch(oe){F(oe)}finally{s(null)}})(t),totpInfo:{...U,appName:l?.name||"Privy"}}):R==="passkey"?e.jsx(xe,{onReset:w,onClose:r,submitEnrollmentWithPasskey:L}):e.jsx(je,{showIntro:V,userMfaMethods:o.mfaMethods,appMfaMethods:l.mfa.methods,userHasAuthSms:ee,backFn:function(){i(!1)},handleSelectMethod:async function(t){try{await C()}catch(c){return void F(c)}return t==="totp"?($(t),Z(null),void b().then((c=>{Z(c)})).catch((()=>{Z(null),w()}))):t==="passkey"&&N.length===1?await L():void $(t)},isTotpLoading:R==="totp"&&!U,isPasskeyLoading:J,error:Q,onClose:r,setRemovingMfaMethod:async t=>{try{await C()}catch(c){return void F(c)}s(t)}})}};export{cn as MfaEnrollmentFlowScreen,cn 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.