PageSourceSearch

https://astroid.club/_next/static/chunks/6584.343af1042ce3dd88.js

js astroid.club collected 2026-10-03 20:17:31 UTC 10,254 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6584],{16010:(e,n,t)=>{t.d(n,{A:()=>r});var o=t(1521);let r=o.forwardRef(function(e,n){let{title:t,titleId:r,...l}=e;return o.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":r},l),t?o.createElement("title",{id:r},t):null,o.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"}))})},56584:(e,n,t)=>{t.r(n),t.d(n,{MfaEnrollmentFlowScreen:()=>k,default:()=>k});var o=t(73365),r=t(20101),l=t(88133),s=t(1521);let a=s.forwardRef(function(e,n){let{title:t,titleId:o,...r}=e;return s.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:n,"aria-labelledby":o},r),t?s.createElement("title",{id:o},t):null,s.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"}))}),i=s.forwardRef(function(e,n){let{title:t,titleId:o,...r}=e;return s.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:n,"aria-labelledby":o},r),t?s.createElement("title",{id:o},t):null,s.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"}))});var c=t(66548),d=t(12670),u=t(3749),h=t(81194),m=t(69407),x=t(4373),f=t(72728),j=t(16010),y=t(42242),w=t(84893),p=t(82894),v=t(39837),g=t(34960);t(89153),t(81219),t(33775),t(14008),t(49043),t(92531);let b=({appName:e,onComplete:n,onReset:t,onClose:r})=>
1{let[l,a]=(0,s.useState)(""),[i,d]=(0,s.useState)(!1),[h,f]=(0,s.useState)(null),[b,k]=(0,s.useState)("enroll"),{initEnrollmentWithSms:C,submitEnrollmentWithSms:M}=(0,x.d)(),{data:S}=(0,m.a)(),E=(0,u.u)();function F(){S?.mfaEnrollmentFlow?.onSuccess(),n()}return h?(0,o.jsx)(g.ErrorScreenView,{allowlistConfig:E.allowlistConfig,error:h,onBack:()=>f(null),onRetry:()=>f(null)}):(0,o.jsxs)(o.Fragment,"enroll"===b?{children:[(0,o.jsx)(c.M,{backFn:t,onClose:r},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(y.A,{})}),(0,o.jsx)(v.T,{children:"Set up SMS verification"}),(0,o.jsxs)(v.S,{children:["We'll text a verification code to this mobile device whenever you use your ",e," ","wallet."]}),(0,o.jsxs)(v.C,{children:[(0,o.jsx)(p.C,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await C({phoneNumber:e}),a(e),k("verify")}catch(e){f(e)}},hideRecent:!0}),(0,o.jsxs)(v.a,{children:["By providing your mobile number, you agree to receive text messages from ",E?.name,". Some carrier charges may apply"]})]}),(0,o.jsx)(c.b,{})]}:i?{children:[(0,o.jsx)(c.M,{onClose:F},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(j.A,{})}),(0,o.jsx)(v.T,{children:"SMS verification added"}),(0,o.jsxs)(v.S,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",e," wallet."]}),(0,o.jsx)(v.B,{children:(0,o.jsx)(c.P,{onClick:F,children:"Done"})}),(0,o.jsx)(c.b,{})]}:{children:[(0,o.jsx)(c.M,{backFn:function(){"verify"===b?k("enroll"):t()},onClose:r},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(y.A,{})}),(0,o.jsx)(v.T,{children:"Enter enrollment code"}),(0,o.jsxs)(v.C,{children:[(0,o.jsx)(v.N,{onChange:async function(e){try{if(!e)return;await M({phoneNumber:l,mfaCode:e}),d(!0)}catch(e){if((0,x.f)(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if((0,x.g)(e))throw Error("The code you entered is not valid");if((0,x.h)(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw(0,x.i)(e)?Error("Verification canceled"):Error("Unknown error")}}}),(0,o.jsxs)(v.S,{children:["To continue, enter the 6-digit code sent to ",(0,o.jsx)("strong",{children:(0,w.Ds)(l)})]})]}),(0,o.jsx)(c.b,{})]})},k={component:()=>{let{user:e,enrollInMfa:n,ready:t}=(0,m.u)(),[j,y]=(0,s.useState)(null),{unenrollWithSms:w,unenrollWithTotp:p,unenrollWithPasskey:g,submitEnrollmentWithTotp:k,initEnrollmentWithPasskey:C,submitEnrollmentWithPasskey:M,initEnrollmentWithTotp:S}=(0,x.d)(),{data:E,onUserCloseViaDialogOrKeybindRef:F}=(0,m.a)(),R=(0,u.u)(),{closePrivyModal:A}=(0,h.u)(),{promptMfa:B}=(0,x.u)(),[P,T]=(0,s.useState)(!1),[I,W]=(0,s.useState)(null),[N,L]=(0,s.useState)(null),Z=()=>{A({shouldCallAuthOnSuccess:!0}),n(!1),setTimeout(()=>{y(null),W(null)},500)},[O,U]=(0,s.useState)(!1),[H,V]=(0,s.useState)();F.current=Z;let _=e?.mfaMethods.includes("sms"),D=!!e?.phone,Y=e?.mfaMethods.includes("totp"),$=e?.mfaMethods.includes("passkey"),q=_||Y||$,K=e?.linkedAccounts.filter(e=>"passkey"===e.type).map(e=>e.credentialId)??[];function z(){y(null),W(null)}async function G(e=K){U(!0);try{return await C(),await M({credentialIds:e},{removeForLogin:E?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),E?.mfaEnrollmentFlow?.onSuccess(),Z()}catch(e){V(e)}finally{U(!1)}}if((0,s.useEffect)(()=>{q&&T(!0)},[q]),!t||!e||!R)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{onClose:Z},"header"),(0,o.jsx)(v.A,{children:(0,o.jsx)(f.M,{})}),(0,o.jsx)(v.C,{children:(0,o.jsx)(d.L,{})}),(0,o.jsx)(c.b,{})]});if("sms"===j)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{backFn:z,onClose:Z},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(r.A,{})}),(0,o.jsx)(v.T,{children:"Remove SMS verification?"}),(0,o.jsxs)(v.S,{children:["MFA adds an extra layer of security to your ",R?.name," account. Make sure you have other methods to secure your account."]}),(0,o.jsx)(v.B,{children:(0,o.jsx)(c.P,{$warn:!0,onClick:async function(){y(null);try{await w()}catch(e){y(null)}},children:"Remove"})}),(0,o.jsx)(c.b,{})]});if("totp"===j)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{backFn:z,onClose:Z},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(r.A,{})}),(0,o.jsx)(v.T,{children:"Remove authenticator app verification?"}),(0,o.jsxs)(v.S,{children:["MFA adds an extra layer of security to your ",R?.name," account. Make sure you have other methods to secure your account."]}),(0,o.jsx)(v.B,{children:(0,o.jsx)(c.P,{$warn:!0,onClick:async function(){y(null);try{await p()}catch(e){y(null)}},children:"Remove"})}),(0,o.jsx)(c.b,{})]});if("passkey"===j){let e=E?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{backFn:z,onClose:Z},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(r.A,{})}),(0,o.jsx)(v.T,{children:"Are you sure you want to remove this passkey?"}),(0,o.jsx)(v.S,{children:e?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),(0,o.jsx)(v.B,{children:(0,o.jsx)(c.P,{$warn:!0,onClick:async function(){y(null);try{await g({removeForLogin:E?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){y(null)}},children:"Remove"})}),(0,o.jsx)(c.b,{})]})}if(0===E.mfaEnrollmentFlow.mfaMethods.length&&!q)return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{onClose:Z},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(l.A,{})}),(0,o.jsx)(v.T,{children:"Add more security"}),(0,o.jsxs)(v.S,{children:[R?.name," does not have any verification methods enabled."]}),(0,o.jsx)(v.B,{children:(0,o.jsx)(c.P,{onClick:Z,children:"Close"})}),(0,o.jsx)(c.b,{})]});let J=!q&&!P;return J?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(c.M,{onClose:Z},"header"),(0,o.jsx)(v.I,{style:{marginBottom:"1.5rem"},children:(0,o.jsx)(l.A,{})}),(0,o.jsx)(v.T,{children:"Transaction Protection"}),(0,o.jsx)(v.S,{children:"Set up transaction protection to add an extra layer of security to your account"}),(0,o.jsxs)(v.L,{children:[(0,o.jsxs)(v.b,{children:[(0,o.jsx)(v.c,{children:(0,o.jsx)(a,{})}),"Enable 2-Step verification for your ",R?.name," wallet."]}
1),(0,o.jsxs)(v.b,{children:[(0,o.jsx)(v.c,{children:(0,o.jsx)(i,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),(0,o.jsxs)(v.B,{children:[(0,o.jsx)(c.P,{onClick:()=>T(!0),children:"Continue"}),(0,o.jsx)(c.S,{onClick:Z,children:"Not now"})]}),(0,o.jsx)(c.b,{})]}):"sms"===I?(0,o.jsx)(b,{appName:R?.name||"Privy",onComplete:Z,onReset:z,onClose:Z}):"totp"===I&&N?(0,o.jsx)(f.E,{onClose:Z,onReset:z,submitEnrollmentWithTotp:({mfaCode:e})=>(async function(e){try{return V(void 0),await k({mfaCode:e}),E?.mfaEnrollmentFlow?.onSuccess(),Z()}catch(e){V(e)}finally{y(null)}})(e),totpInfo:{...N,appName:R?.name||"Privy"}}):"passkey"===I?(0,o.jsx)(f.a,{onReset:z,onClose:Z,submitEnrollmentWithPasskey:G}):(0,o.jsx)(f.b,{showIntro:J,userMfaMethods:e.mfaMethods,appMfaMethods:R.mfa.methods,userHasAuthSms:D,backFn:function(){T(!1)},handleSelectMethod:async function(e){try{await B()}catch(e){return void V(e)}return"totp"===e?(W(e),L(null),void S().then(e=>{L(e)}).catch(()=>{L(null),z()})):"passkey"===e&&1===K.length?await G():void W(e)},isTotpLoading:"totp"===I&&!N,isPasskeyLoading:O,error:H,onClose:Z,setRemovingMfaMethod:async e=>{try{await B()}catch(e){return void V(e)}y(e)}})}}}}]);

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.