1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[206],{25760:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>T});var i=n(86739),o=n(56455),a=n(38595),r=n(28505),l=n(39102),c=n(61811),s=n(38571),d=n(43954),u=n(91322),h=n(4372),p=n(53239);function m(){let t=(0,i._)(["\n query IavHostedStatus($linkToken: String!, $forceStatus: String) {\n iavHostedStatus(linkToken: $linkToken, forceStatus: $forceStatus) {\n status\n accounts {\n id\n type\n lastFour\n accountType\n balance\n name\n logo\n institutionName\n createdAt\n mask\n institutionId\n isDisallowedInternalRoutingNumber\n isDisallowedExternalRoutingNumber\n holderCategory\n }\n }\n }\n"]);return m=function(){return t},t}function f(){let t=(0,i._)(["\n query IavLinkTokenFromSession {\n iavLinkTokenFromSession {\n linkToken\n applicationId\n }\n }\n"]);return f=function(){return t},t}let g=new Set(["SUCCESS","FAILED","EXPIRED"]),v=(0,a.J1)(m()),w=()=>{window.localStorage.removeItem(h.v),window.localStorage.removeItem(d.y4),window.localStorage.removeItem(d.j5)},k=(0,a.J1)(f()),T=()=>{let[t,e]=(0,p.useState)(()=>window.localStorage.getItem(h.v)),[n,i]=(0,p.useState)(()=>window.localStorage.getItem(d.y4)),[a]=(0,p.useState)(()=>new URLSearchParams(window.location.search).get("forceIavHostedStatus")),[m,f]=(0,p.useState)(null),T=(0,p.useRef)(Date.now());(0,p.useEffect)(()=>{var e;l.L.addAction("plaid_iav_hosted_returned",{hasLinkToken:!!t,applicationId:n}),null==(e=window.heap)||e.track("Plaid IAV Hosted Returned",{hasLinkToken:!!t,applicationId:n})},[]);let{data:y}=(0,r.I)(k,{skip:!!t,fetchPolicy:"network-only"});(0,p.useEffect)(()=>{var t,n;if(!y)return;let o=null==(t=y.iavLinkTokenFromSession)?void 0:t.linkToken,a=null==(n=y.iavLinkTokenFromSession)?void 0:n.applicationId;o?(e(o),a&&i(a)):f("NO_TOKEN")},[y]),(0,p.useEffect)(()=>{if(m)return;let t=setTimeout(()=>{f("TIMEOUT")},3e4);return()=>clearTimeout(t)},[m]);let{data:S,stopPolling:_}=(0,r.I)(v,{variables:{linkToken:null!=t?t:"",forceStatus:a},pollInterval:2e3,skip:!t||!!m,fetchPolicy:"network-only"});return(0,p.useEffect)(()=>{var t,e,i,o,a;let r=null==S||null==(t=S.iavHostedStatus)?void 0:t.status;if(!r||m||!g.has(r))return;_();let c=Date.now()-T.current;if(l.L.addAction("plaid_iav_hosted_status_resolved",{status:r,elapsedMs:c,applicationId:n}),null==(e=window.heap)||e.track("Plaid IAV Hosted Status Resolved",{status:r,elapsedMs:c}),"SUCCESS"===r){l.L.addAction("plaid_iav_account_created",{flow:"hosted_iav",applicationId:n,elapsedMs:c}),null==(i=window.heap)||i.track("Plaid IAV Account Created",{flow:"hosted_iav",applicationId:n,elapsedMs:c});let t=null==S||null==(o=S.iavHostedStatus)?void 0:o.accounts;if(t&&t.length>0)try{window.localStorage.setItem(d.dh,JSON.stringify(t))}catch(t){}}else l.L.addAction("plaid_iav_account_creation_failed",{flow:"hosted_iav",reason:r.toLowerCase(),applicationId:n,elapsedMs:c}),null==(a=window.heap)||a.track("Plaid IAV Account Creation Failed",{flow:"hosted_iav",reason:r.toLowerCase(),applicationId:n,elapsedMs:c});w(),f(r)},[S,n,_]),(0,p.useEffect)(()=>{var t,e;if("TIMEOUT"!==m)return;_();let i=Date.now()-T.current;l.L.addAction("plaid_iav_hosted_status_resolved",{status:"TIMEOUT",elapsedMs:i,applicationId:n}),null==(t=window.heap)||t.track("Plaid IAV Hosted Status Resolved",{status:"TIMEOUT",elapsedMs:i}),l.L.addAction("plaid_iav_account_creation_failed",{flow:"hosted_iav",reason:"timeout",applicationId:n,elapsedMs:i}),null==(e=window.heap)||e.track("Plaid IAV Account Creation Failed",{flow:"hosted_iav",reason:"timeout",applicationId:n,elapsedMs:i}),w()},[m]),(0,p.useEffect)(()=>{if(!m)return;let t=n?"/application/".concat(n,"/fundAccount"):"/applications",e="SUCCESS"!==m&&n?"".concat(t,"?iavError=").concat(m):t;(0,u.d)({path:e,hard:!0})},[m,n]),(0,o.Y)(c.A,{icon:"transfer",heading:"Verifying your account link...",subheading:"This may take a moment.",children:(0,o.Y)(s.A,{steps:["Waiting for your bank","Checking account status","Finalizing"],stepTimer:2e3,isComplete:!!m})})}},38571:(t,e,n)=>{"use strict";n.d(e,{A:()=>N});
1var i=n(56455),o=n(12043),a=n(30605),r=n.n(a),l=n(53239),c=n(59001),s=n(85209),d=n(10514),u=n(86739),h=n(70091);function p(){let t=(0,u._)(["\n 0% {\n background-position: -200px 0;\n }\n 100% {\n background-position: calc(200px + 100%) 0;\n }\n"]);return p=function(){return t},t}let{colors:{grey3:m,grey5:f}}=d.Ay,g=(0,h.keyframes)(p()),v={container:{backgroundColor:m,backgroundImage:"linear-gradient(\n 90deg,\n ".concat(m,",\n ").concat(f,",\n ").concat(m,"\n )"),backgroundSize:"200px 100%",backgroundRepeat:"no-repeat",borderRadius:4,display:"inline-block",lineHeight:1,width:"100%",animation:"".concat(g," 1.2s ease-in-out infinite")}},w={circle:{borderRadius:"50%",width:32,height:32}},k=t=>{let{count:e=1,width:n,height:o,theme:a}=t;return(0,i.Y)(i.FK,{children:[...Array(e).keys()].map((t,e)=>{let r={};return null!==n&&(r.width=n),null!==o&&(r.height=o),(0,i.Y)("span",{css:[v.container,a&&w[a]],style:r,children:"â"},e)})})};var T=n(47111),y=n(43644);function S(){let t=(0,u._)(["\n to {transform: rotate(360deg)}\n"]);return S=function(){return t},t}let _=(0,h.keyframes)(S()),{rawSpeeds:{slow:E,default:A},easingFunctions:{easeOutQuint:I,easeOutBack:x}}=d.Ay.animations,C="transform ".concat(E,"ms ").concat(x),Y="opacity ".concat(E,"ms ").concat(I),F={container:{width:24,height:24},loadingIcon:{animation:"".concat(_," 0.7s 0s infinite linear"),transformOrigin:"12px 12.5px"},loadingTransition:{transition:Y},loadingTransitionExiting:{opacity:0},completedTransition:{transition:"".concat(Y,", ").concat(C),willChange:"transform"},completedTransitionExiting:{opacity:0,transform:"scale(0.1)"}},b=()=>(0,i.Y)("div",{css:F.loadingIcon,children:(0,i.Y)(y.A,{name:"spinner"})}),L=t=>{let{isLoading:e,index:n}=t;return(0,i.Y)(T.A,{children:(0,i.Y)(s.Ay,{timeout:{appear:E,enter:E,exit:A},appear:!0,onEnter:t=>t.offsetHeight,children:t=>(0,i.Y)("div",{css:[F.container,e?F.loadingTransition:F.completedTransition,("exited"===t||"exiting"===t)&&(e?F.loadingTransitionExiting:F.completedTransitionExiting)],children:e?(0,i.Y)(b,{}):(0,i.Y)(y.A,{name:"circle-check"})})},n)})},{rawSpeeds:{xSlow:P},easingFunctions:{easeOutQuint:O}}=d.Ay.animations,R={container:{position:"relative"},step:{height:24,display:"flex",marginBottom:21},stepTransition:{transition:"opacity ".concat(P,"ms ").concat(O),willChange:"opacity"},stepTransitionExiting:{opacity:0},icon:{width:24,height:24,marginRight:6,display:"flex",alignItems:"center",justifyContent:"center"},placeholderTransition:{transition:"opacity ".concat(P,"ms ").concat(O),opacity:1,willChange:"opacity, transform"},placeholderTransitionExiting:{transition:"opacity ".concat(P,"ms ").concat(O,", transform ").concat(P,"ms ").concat(O),position:"absolute",top:0,left:0,height:"100%",width:"100%",transform:"scaleY(0.5)",opacity:0},content:{flexGrow:1,position:"relative"},contentSkeleton:{width:"100%",position:"absolute"},hiddenContent:{visibility:"hidden"}},D=t=>{let{icon:e,children:n}=t;return(0,i.FD)("div",{css:[R.step],children:[(0,i.Y)("div",{css:[R.icon],children:e}),(0,i.Y)("div",{css:R.content,children:n})]})},H=t=>{let{isActive:e,isCurrent:n,timeout:a,waitForCompletion:r,index:c,children:d,isLoading:u}=t,[h,p]=(0,o.i)({prop:u,defaultProp:!1});(0,l.useEffect)(()=>{let t;return n&&(p(!0),t=setTimeout(()=>{p(!1)},Math.max(a-P,0))),()=>clearTimeout(t)},[n]);let m={timeout:P,mountOnEnter:!0,unmountOnExit:!0,appear:!0},f=h||!!(e&&r);return(0,i.FD)("div",{css:R.container,children:[(0,i.Y)(s.Ay,{...m,in:e,children:t=>(0,i.Y)("div",{css:[R.stepTransition,("exiting"===t||"exited"===t)&&R.stepTransitionExiting],children:(0,i.Y)(D,{icon:(0,i.Y)(L,{isLoading:f,index:c}),children:d})})}),(0,i.Y)(s.Ay,{...m,in:!e,children:t=>(0,i.Y)("div",{css:[R.placeholderTransition,("exiting"===t||"exited"===t)&&R.placeholderTransitionExiting],children:(0,i.FD)(D,{icon:(0,i.Y)(k,{width:15,height:15}),children:[(0,i.Y)("div",{css:R.contentSkeleton,children:(0,i.Y)(k,{})}),(0,i.Y)("div",{css:R.hiddenContent,children:d})]})})})]})},N=t=>{let{steps:e=[],stepTimer:n=2e3,isComplete:a=!1,onComplete:s,showFollowup:d,currentStep:u,currentStepIsLoading:h}=t,[p,m]=(0,o.i)({prop:u,defaultProp:0}),f=!r()(u)||!r()(h),g=(0,l.useMemo)(()=>!!f||a,[f,a]),v=(0,l.useMemo)(()=>e.map(()=>(t=>{let e=.6*t;return Math.random()*(1.4*t-e)+e})(n)),[e,n]);return(0,l.useEffect)(()=>{let t=p<e.length?setTimeout(()=>m(p+1),v[p]):null;return()=>{t&&clearTimeout(t)}}
1,[p]),(0,l.useEffect)(()=>{p>=e.length&&g&&(setTimeout(()=>{d&&d(!0)},500),setTimeout(()=>null==s?void 0:s(),d?5e3:500))},[p,g]),(0,i.Y)("div",{...(0,c.F)({isPrivate:!1}),children:e.map((t,n)=>{let o=n===p;return(0,i.Y)(H,{index:n,isActive:n<=p,isCurrent:o,timeout:v[n],waitForCompletion:n===e.length-1&&!g,isLoading:void 0===h?void 0:o&&h,children:t},n)})})}},43954:(t,e,n)=>{"use strict";n.d(e,{GV:()=>o,LU:()=>a,dh:()=>c,j5:()=>i,uR:()=>r,y4:()=>l});let i="plaidActiveFlow",o="iav",a="layer",r="hosted-iav",l="applicationId",c="plaidHostedCompleteAccounts"},56460:(t,e,n)=>{"use strict";n.d(e,{A:()=>l});var i=n(56455),o=n(88793),a=n(37767),r=n(53239);let l=()=>{let{config:{clientDetails:t}}=(0,a.UK)(),{triggerMessage:e}=(0,o.d)();return{triggerCustomerServiceError:(0,r.useMemo)(()=>((t,e)=>{let{customerServiceNumber:n}=t;return function(t){let{includePhoneMessage:o=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e((0,i.FD)(i.FK,{children:[t,o&&n?(0,i.FD)(i.FK,{children:[" ","Contact us at"," ",(0,i.Y)("a",{href:"tel:".concat(n),children:n})," ","if the problem persists."]}):null]}),{theme:"error"})}})(t,e),[t,e])}}},80877:(t,e,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/plaidhostedcomplete",function(){return n(25760)}])}},t=>{t.O(0,[349,372,593,636,792],()=>t(t.s=80877)),_N_E=t.O()}]);
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.