1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[412],{2643:(e,r,i)=>{i.d(r,{S:()=>C});var t=i(95155),n=i(12115),a=i(20647),o=i(18831),s=i(28453),l=i(89762);let c=a.I4.div.withConfig({displayName:"ScreenRoot",componentId:"sc-2e815abe-0"})(["--screen-space:16px;--screen-space-lg:calc(var(--screen-space) * 1.5);position:relative;overflow:hidden;margin:0 calc(-1 * var(--screen-space));height:100%;border-radius:var(--privy-border-radius-lg);"]),d=a.I4.div.withConfig({displayName:"ScreenRootInner",componentId:"sc-2e815abe-1"})(["display:flex;flex-direction:column;gap:calc(var(--screen-space) * 1.5);width:100%;background:var(--privy-color-background);padding:0 var(--screen-space-lg) var(--screen-space);height:100%;border-radius:var(--privy-border-radius-lg);"]),p=a.I4.div.withConfig({displayName:"HeaderContainer",componentId:"sc-2e815abe-2"})(["position:relative;display:flex;flex-direction:column;"]),u=(0,a.I4)(s.M).withConfig({displayName:"StyledModalHeader",componentId:"sc-2e815abe-3"})(["margin:0 -8px;"]),h=a.I4.div.withConfig({displayName:"BodyContainer",componentId:"sc-2e815abe-4"})(["flex:1 1 auto;display:flex;flex-direction:column;overflow-y:auto;padding:3px;margin:-3px;&::-webkit-scrollbar{display:none;}scrollbar-gutter:stable both-edges;scrollbar-width:none;-ms-overflow-style:none;"," background-repeat:no-repeat;background-size:100% 32px,100% 16px;background-attachment:local,scroll;"],({$colorScheme:e})=>"light"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0),g=a.I4.div.withConfig({displayName:"FooterContainer",componentId:"sc-2e815abe-5"})(["display:flex;flex-direction:column;gap:var(--screen-space-lg);"]),m=a.I4.div.withConfig({displayName:"CenteredHeader",componentId:"sc-2e815abe-6"})(["text-align:center;display:flex;flex-direction:column;align-items:center;gap:var(--screen-space);"]),v=a.I4.div.withConfig({displayName:"TitleContainer",componentId:"sc-2e815abe-7"})(["display:flex;flex-direction:column;gap:4px;"]),f=a.I4.h3.withConfig({displayName:"HeaderTitle",componentId:"sc-2e815abe-8"})(["&&{font-size:20px;line-height:32px;font-weight:500;color:var(--privy-color-foreground);margin:0;}"]),y=a.I4.p.withConfig({displayName:"HeaderSubtitle",componentId:"sc-2e815abe-9"})(["&&{margin:0;font-size:16px;font-weight:300;line-height:24px;color:var(--privy-color-foreground);}"]),x=a.I4.div.withConfig({displayName:"IconContainer",componentId:"sc-2e815abe-10"})(["background:",";border-radius:50%;width:64px;height:64px;display:flex;align-items:center;justify-content:center;"],({$variant:e})=>{switch(e){case"success":return"var(--privy-color-success-bg, #EAFCEF)";case"warning":return"var(--privy-color-warn, #FEF3C7)";case"error":return"var(--privy-color-error-bg, #FEE2E2)";case"loading":case"logo":return"transparent";default:return"var(--privy-color-background-2)"}}),b=a.I4.div.withConfig({displayName:"LogoContainer",componentId:"sc-2e815abe-11"})(["display:flex;align-items:center;justify-content:center;margin-bottom:var(--screen-space);img,svg{max-height:90px;max-width:180px;}"]),w=a.I4.div.withConfig({displayName:"LoadingWithIconContainer",componentId:"sc-2e815abe-12"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;height:82px;> div{position:relative;}> div > :first-child{position:relative;}> div > :last-child{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);}"]),C=({children:e,...r})=>(0,t.jsx)(c,{children:(0,t.jsx)(d,{...r,children:e})}),I=a.I4.div.withConfig({displayName:"ProgressBarContainer",componentId:"sc-2e815abe-13"})(["position:absolute;top:0;left:calc(-1 * var(--screen-space-lg));width:calc(100% + calc(var(--screen-space-lg) * 2));height:4px;background:var(--privy-color-background-2);border-top-left-radius:inherit;border-top-right-radius:inherit;overflow:hidden;"]),j=(0,a.I4)(s.B).withConfig({displayName:"StyledBlobbyFooter",componentId:"sc-2e815abe-14"})(["padding:0;&& a{padding:0;color:var(--privy-color-foreground-3);}"]),S=a.I4.div.withConfig({displayName:"ProgressBarFill",componentId:"sc-2e815abe-15"}
1)(["height:100%;width:","%;background:var(--privy-color-foreground-3);border-radius:2px;transition:width 300ms ease-in-out;"],({pct:e})=>e),k=({step:e})=>e?(0,t.jsx)(I,{children:(0,t.jsx)(S,{pct:Math.min(100,e.current/e.total*100)})}):null;C.Header=({title:e,subtitle:r,icon:i,iconVariant:n,iconLoadingStatus:a,showBack:o,onBack:s,showInfo:l,onInfo:c,showClose:d,onClose:h,step:g,...x})=>(0,t.jsxs)(p,{...x,children:[(0,t.jsx)(u,{backFn:o?s:void 0,infoFn:l?c:void 0,onClose:d?h:void 0,closeable:d}),(i||n||e||r)&&(0,t.jsxs)(m,{children:[i||n?(0,t.jsx)(C.Icon,{icon:i,variant:n,loadingStatus:a}):null,(0,t.jsxs)(v,{children:[e&&(0,t.jsx)(f,{children:e}),r&&(0,t.jsx)(y,{children:r})]})]}),g&&(0,t.jsx)(k,{step:g})]}),(C.Body=n.forwardRef(({children:e,...r},i)=>(0,t.jsx)(h,{ref:i,...r,children:e}))).displayName="Screen.Body",C.Footer=({children:e,...r})=>(0,t.jsx)(g,{id:"privy-content-footer-container",...r,children:e}),C.Actions=({children:e,...r})=>(0,t.jsx)(N,{...r,children:e}),C.HelpText=({children:e,...r})=>(0,t.jsx)(A,{...r,children:e}),C.Watermark=()=>(0,t.jsx)(j,{}),C.Icon=({icon:e,variant:r="subtle",loadingStatus:i})=>"logo"===r&&e?(0,t.jsx)(b,"string"==typeof e?{children:(0,t.jsx)("img",{src:e,alt:""})}:n.isValidElement(e)?{children:e}:{children:n.createElement(e)}):"loading"===r?e?(0,t.jsx)(w,{children:(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,t.jsx)(o.a4,{success:i?.success,fail:i?.fail}),"string"==typeof e?(0,t.jsx)("span",{style:{background:`url('${e}') 0 0 / contain`,height:"38px",width:"38px",borderRadius:"6px",margin:"auto",backgroundSize:"contain"}}):n.isValidElement(e)?n.cloneElement(e,{style:{width:"38px",height:"38px"}}):n.createElement(e,{style:{width:"38px",height:"38px"}})]})}):(0,t.jsx)(x,{$variant:r,children:(0,t.jsx)(l.N,{size:"64px"})}):(0,t.jsx)(x,{$variant:r,children:e&&("string"==typeof e?(0,t.jsx)("img",{src:e,alt:"",style:{width:"32px",height:"32px",borderRadius:"6px"}}):n.isValidElement(e)?e:n.createElement(e,{width:32,height:32,stroke:(()=>{switch(r){case"success":return"var(--privy-color-icon-success)";case"warning":return"var(--privy-color-icon-warning)";case"error":return"var(--privy-color-icon-error)";default:return"var(--privy-color-icon-muted)"}})(),strokeWidth:2}))});let N=a.I4.div.withConfig({displayName:"ActionsContainer",componentId:"sc-2e815abe-16"})(["width:100%;display:flex;flex-direction:column;gap:calc(var(--screen-space) / 2);"]),A=a.I4.p.withConfig({displayName:"HelpTextContainer",componentId:"sc-2e815abe-17"})(["&&{margin:0;width:100%;text-align:center;color:var(--privy-color-foreground-3);font-size:14px;line-height:22px;& a{color:var(--privy-color-accent);}}"])},20412:(e,r,i)=>{i.r(r),i.d(r,{CrossAppAuthScreen:()=>h,CrossAppAuthScreenView:()=>u,default:()=>h});var t=i(95155),n=i(12115),a=i(92092),o=i(89054),s=i(71043),l=i(42033),c=i(18831),d=i(84957),p=i(58441);i(50205),i(68463),i(92253),i(72378),i(46495);let u=({providerApp:e,success:r,error:i,onClose:a})=>{let{title:o,subtitle:s}=(0,n.useMemo)(()=>r?{title:`Successfully connected with ${e.name}`,subtitle:"You're good to go!"}:i?{title:"Authentication failed",subtitle:i.message}:{title:`Connecting to ${e.name}`,subtitle:`Please check the pop-up from ${e.name} to continue`},[r,i,e.name]);return(0,t.jsx)(p.S,{title:o,subtitle:s,icon:e.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:a,watermark:!0})},h={component:()=>{let e=(0,a.u)(),{data:r,navigate:i,setModalData:p,onUserCloseViaDialogOrKeybindRef:h}=(0,l.a)(),{crossAppAuthFlow:g,updateWallets:m,closePrivyModal:v,createAnalyticsEvent:f}=(0,s.u)(),{logout:y}=(0,c.z)(),[x,b]=(0,n.useState)({}),w=r?.crossAppAuth,C={id:w.appId,name:w.name,logoUrl:w.logoUrl},I=new s.a(`There was an issue connecting your ${C.name} account. Please try again.`),j=new o.R(async e=>{if(w.popup)try{let r=await g({appId:e,popup:w.popup,action:w.action});b({data:r})}catch(e){if(e instanceof s.a)b({error:e});else if(e instanceof s.e){if(e.privyErrorCode===s.b.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return p({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${C.id}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void i("LinkConflictScreen");w.popup&&w.popup.close(),b({error:I})}else b({error:I})}else b({error:I})}),S=()=>{x.data&&(m(),w.onSuccess(x.data),v({shouldCallAuthOnSuccess:!0,isSuccess:!0})),w.onError(x.error??new s.a("User canceled flow")),v({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return h.current=S,(0,n.useEffect)(()=>{C.id.length&&j.execute(C.id)},[C.id]),(0,n.useEffect)(()=>
1{if(!x.data)return;let r=x.data;if(e.legal.requireUsersAcceptTerms&&!r.hasAcceptedTerms){let e=setTimeout(()=>{i("AffirmativeConsentScreen")},a.q);return()=>clearTimeout(e)}if((0,d.s)(r,e.embeddedWallets)){let e=setTimeout(()=>{p({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),f({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${C.id}`,screen:"CrossAppAuthScreen"}}),y()},callAuthOnSuccessOnClose:!0}}),i("EmbeddedWalletOnAccountCreateScreen")},a.q);return()=>clearTimeout(e)}let t=setTimeout(S,a.q);return()=>clearTimeout(t)},[x.data]),(0,t.jsx)(u,{providerApp:C,success:!!x.data,error:x.error,onClose:S})},isShownBeforeReady:!0}},58441:(e,r,i)=>{i.d(r,{S:()=>o});var t=i(95155),n=i(8222),a=i(2643);let o=({primaryCta:e,secondaryCta:r,helpText:i,watermark:o=!0,children:s,...l})=>{let c=e||r?(0,t.jsxs)(t.Fragment,{children:[e&&(()=>{let{label:r,...i}=e,a=i.variant||"primary";return(0,t.jsx)(n.B,{...i,variant:a,style:{width:"100%",...i.style},children:r})})(),r&&(()=>{let{label:e,...i}=r,a=i.variant||"secondary";return(0,t.jsx)(n.B,{...i,variant:a,style:{width:"100%",...i.style},children:e})})()]}):null;return(0,t.jsxs)(a.S,{id:l.id,className:l.className,children:[(0,t.jsx)(a.S.Header,{...l}),s?(0,t.jsx)(a.S.Body,{children:s}):null,i||c||o?(0,t.jsxs)(a.S.Footer,{children:[i?(0,t.jsx)(a.S.HelpText,{children:i}):null,c?(0,t.jsx)(a.S.Actions,{children:c}):null,o?(0,t.jsx)(a.S.Watermark,{}):null]}):null]})}},84957:(e,r,i)=>{i.d(r,{s:()=>n});var t=i(89054);let n=(e,r)=>(0,t.s)(e,r.ethereum.createOnLogin)||(0,t.k)(e,r.solana.createOnLogin)},89762:(e,r,i)=>{i.d(r,{N:()=>a});var t=i(95155),n=i(20647);let a=({size:e,centerIcon:r})=>(0,t.jsx)(o,{$size:e,children:(0,t.jsxs)(s,{children:[(0,t.jsx)(c,{}),(0,t.jsx)(d,{}),r?(0,t.jsx)(l,{children:r}):null]})}),o=n.I4.div.withConfig({displayName:"LoadingContainer",componentId:"sc-ebc93df8-0"})(["--spinner-size:",";display:inline-flex;justify-content:center;align-items:center;@media all and (display-mode:standalone){margin-bottom:30px;}"],e=>e.$size?e.$size:"96px"),s=n.I4.div.withConfig({displayName:"SpinnerContainer",componentId:"sc-ebc93df8-1"})(["position:relative;height:var(--spinner-size);width:var(--spinner-size);opacity:1;animation:fadein 200ms ease;"]),l=n.I4.div.withConfig({displayName:"CenterIconContainer",componentId:"sc-ebc93df8-2"})(["position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;svg,img{width:calc(var(--spinner-size) * 0.4);height:calc(var(--spinner-size) * 0.4);border-radius:var(--privy-border-radius-full);}"]),c=n.I4.div.withConfig({displayName:"CircleFixed",componentId:"sc-ebc93df8-3"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);&&{border:4px solid var(--privy-color-border-default);border-radius:50%;}"]),d=n.I4.div.withConfig({displayName:"CircleRotate",componentId:"sc-ebc93df8-4"})(["position:absolute;top:0;right:0;bottom:0;left:0;width:var(--spinner-size);height:var(--spinner-size);animation:spin 1200ms linear infinite;&&{border:4px solid;border-color:var(--privy-color-icon-subtle) transparent transparent transparent;border-radius:50%;}@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}"])}}]);
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.