1import{d as w,l as k,ai as I,p as C,o as S,c as u,aj as T,f as t,e as i,t as x,g as l,i as j,r as y,aa as B,z as D,b as f,ak as P}from"#entry";import{_ as V}from"./BqMifCvd.js";const q={class:"flex w-full min-h-screen flex-col bg-sand"},z={class:"flex flex-col lg:flex-row justify-between items-start w-full px-2 lg:px-2 gap-4"},R={class:"w-full lg:w-2/3 bg-white mx-0 min-h-[80vh] lg:min-h-[94vh] border-0 lg:border-[0.5px] border-border-default rounded-xl p-5"},L={class:"flex flex-col items-center justify-center h-[60vh] lg:h-[80vh] gap-8"},N={key:0,class:"flex flex-col gap-4 items-center"},A={class:"flex items-center gap-3"},U={class:"font-libre text-center text-2xl font-bold leading-10 text-text-secondary"},E={key:1,class:"flex flex-col gap-8 items-center"},M={class:"flex flex-col gap-4 items-center max-w-lg"},O={class:"flex items-center gap-3"},$={class:"bg-surface-success-hover flex items-center p-0.5 rounded-full"},Q={class:"bg-surface-success-pressed flex items-center justify-center p-1 rounded-full"},Y={class:"text-center font-display text-lg leading-6 text-text-tertiary"},G={class:"flex items-center gap-2 text-text-tertiary"},W={key:2,class:"flex flex-col gap-8 items-center"},F={class:"flex flex-col gap-4 items-center max-w-lg"},H={class:"flex items-center gap-3"},J={class:"bg-surface-critical-hover flex items-center p-0.5 rounded-full"},K={class:"bg-surface-critical-pressed flex items-center justify-center p-1 rounded-full"},X={class:"text-center font-display text-lg leading-6 text-text-secondary"},Z={class:"flex items-center gap-2 text-text-tertiary"},ee={class:"hidden h-[94vh] lg:flex lg:w-1/3 flex-col items-center justify-center px-3 py-12"},te={class:"text-center max-w-sm"},se={class:"text-sm text-charcoal-light mb-8"},ce=w({__name:"index",setup(oe){const{$api:v}=k(),p=I(),c=y("loading"),m=y(""),b={"google-drive":"Google Drive",onedrive:"OneDrive",box:"Box",slack:"Slack",teams:"Microsoft Teams",quickbooks:"QuickBooks",qbo:"QuickBooks",plaid:"your bank",double:"Double",doublehq:"Double"},n=s=>typeof s=="string"?s:Array.isArray(s)&&typeof s[0]=="string"?s[0]:"",a=C(()=>b[n(p.query.provider)]||"your account"),g=s=>{const e=n(s);if(!e)return null;try{const o=new URL(e,window.location.origin);return o.origin!==window.location.origin?null:o.pathname+o.search+o.hash}catch{return null}},_=s=>new Promise(e=>setTimeout(e,s)),r=(s,e)=>{setTimeout(()=>{B(s)},e)};return S(async()=>{const s={...p.query};window.history?.replaceState&&window.history.replaceState(window.history.state,"",p.path);const e=g(s.return_url)||"/firm";if(n(s.error)){await _(1e3),m.value=n(s.error_description)||"",c.value="error",r(e,2500);return}const o=n(s.app_uuid),h=n(s.state);if(!o||!h){c.value="error",r(e,2500);return}try{const[d]=await Promise.all([v.post(`/connections/${encodeURIComponent(o)}/callback/complete`,{State:h,CallbackPath:n(s.callback),Code:n(s.code),RealmId:n(s.realmId),PublicToken:n(s.public_token),InstitutionId:n(s.institution_id)}),_(1500)]);c.value="success",r(g(d?.return_url)||e,1500)}catch(d){m.value=typeof d?.error=="string"?d.error:"",c.value="error",r(e,2500)}}),(s,e)=>{const o=D("VIcon");return f(),u("div",q,[e[7]||(e[7]=T('<div class="items-start px-6 py-4"><div class="mx-auto w-full"><div class="flex items-center justify-between"><div class="flex items-center space-x-3"><div class="flex clickable items-end transition-all duration-300"><img src="'+P+'" alt="Instead" class="mr-1 h-5"></div></div></div></div></div>',1)),t("div",z,[t("div",R,[t("div",L,[i(c)==="loading"?(f(),u("div",N,[t("div",A,[t("h1",U," Connecting to "+x(i(a)),1),l(o,{icon:"loader-2",size:24,lucide:"",class:"text-text-secondary animate-spin"})]),e[0]||(e[0]=t("p",{class:"text-center font-display text-lg leading-6 text-text-tertiary max-w-md"}," Please wait while we securely connect your account... ",-1))])):i(c)==="success"?(f(),u("div",E,[t("div",M,[t("div",O,[e[1]||(e[1]=t("h1",{class:"font-libre text-center text-2xl font-bold leading-10 text-text-secondary"}," Connected successfully! ",-1)),t("div",$,[t("div",Q,[l(o,{icon:"check",size:16,class:"text-white",lucide:""})])])]),t("p",Y," Your "+x(i(a))+" account has been connected successfully. ",1),t("div",G,[l(o,{icon:"loader-2",size:16,lucide:"",class:"animate-spin"}),e[2]||(e[2]=t("span",{class:"font-display text-sm"},"Taking you back...",-1))])])])):i(c)==="error"?(f(),u("div",W,[t("div",F,[t("div",H,[e[3]||(e[3]=t("h1",{class:"font-libre text-center text-2xl font-bold leading-10 text-text-primary"}," Connection unsuccessful ",-1)),t("div",J,[t("div",K,[l(o,{icon:"x",size:16,class:"text-white",lucide:""})])])]),t("p",X,x(i(m)||`We couldn't connect your ${i(a)} account at this time.`),1),t("div",Z,[l(o,{icon:"loader-2",size:16,lucide:"",class:"animate-spin"}),e[4]||(e[4]=t("span",{class:"font-display text-sm"},"Taking you back...",-1))])])])):j("",!0)])]),t("div",ee,[t("div",te,[e[5]||
1(e[5]=t("div",{class:"mb-4"},[t("img",{src:V,alt:"Secure connection",class:"w-32 h-32 mx-auto opacity-80"})],-1)),e[6]||(e[6]=t("h3",{class:"text-xl font-libre font-bold text-charcoal mb-2"}," Secure connection ",-1)),t("p",se," Your "+x(i(a))+" account is connected securely with industry-standard encryption. ",1)])])])])}}});export{ce 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.