1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_assets/faq-C_d1PWeH.js","_assets/vendor-DVSFozc8.js","_assets/SeoHead-C3_8Tv5B.js","_assets/index-YjVZI2qc.js","_assets/index-Dnv0wUfv.js","_assets/useScrollReveal-DyWO-Zzx.js","_assets/faq-Ak7OWUTf.css","_assets/admin-D5uT17xr.js","_assets/generateApplicationPdf-CDOGoXJQ.js","_assets/vfs_fonts-V_QCOObd.js","_assets/Tabs-D9jGSVnn.js","_assets/index-BZrkAl7-.js","_assets/Tabs-CQb9rFoB.css","_assets/generateCreApplicationPdf-CjRX8uuz.js","_assets/Badge-B8WdHG3V.js","_assets/Badge-PP4HUp-_.css","_assets/admin-B_ycI00u.css","_assets/apply-DBvUdUa3.js","_assets/Progress-CXP0dYZV.js","_assets/Progress-BL5cwHjL.css","_assets/Select-Bw8dK1EM.js","_assets/Combination-hltWrAgF.js","_assets/Select-uO_Kpggg.css","_assets/Checkbox-BJUtRiMW.js","_assets/Checkbox-DJQoG4g2.css","_assets/applicationQueries-C-exntq5.js","_assets/applicationQueries-DEUM8Qk3.css","_assets/RadioGroup-DmCELvrv.js","_assets/RadioGroup-DPCArcUs.css","_assets/FileDropzone-D6v7lQlu.js","_assets/FileDropzone-CtOFrsJ1.css","_assets/useReferralAttribution-DLg0XjRo.js","_assets/apply-DiiKc5on.css","_assets/login-CjMuJN_x.js","_assets/PasswordLoginForm-CSOTbXtX.js","_assets/PasswordLoginForm-CcFaVSD9.css","_assets/login-BP-LwuGs.css","_assets/_index-DttR8M2I.js","_assets/_index-Cd03Z-nP.css","_assets/portal-DGrp9h4C.js","_assets/useMyApplications-Cx9LYKqG.js","_assets/Dialog-C0GyjXfv.js","_assets/Dialog-B46wCecA.css","_assets/portal-hsMXKNlT.css","_assets/contact-DI0zemwH.js","_assets/Textarea-BNWezzQL.js","_assets/Textarea-D-u4ArFM.css","_assets/contact-CzeofV3R.css","_assets/partner-C5idTYxB.js","_assets/getShareableBaseUrl-D0qVBr-m.js","_assets/partner-CScmfT1t.css","_assets/admin.chat-DKF1NDMz.js","_assets/realtimeChannels-B6riDwn4.js","_assets/admin-D64tdRLt.css","_assets/admin.email-CXdZDmFZ.js","_assets/admin-BuHtF4uT.css","_assets/admin.staff-D1WXQr6N.js","_assets/admin-Cb6TPmz-.css","_assets/why-redifund-BpQqlji_.js","_assets/why-redifund-D6nu1cb6.css","_assets/partner-login-07fGEPH4.js","_assets/partner-login-CUgcvoev.css","_assets/partner.leads-BgDOfmad.js","_assets/toConsumableArray-DVULJJDA.js","_assets/list_GET.schema-Dl3m06SM.js","_assets/partner-BqcQVfJY.css","_assets/admin.partners-Csx0g29j.js","_assets/admin-BFeowno9.css","_assets/p._partnerSlug-DKMdvq1o.js","_assets/p-DElafukP.css","_assets/privacy-policy-B5EOcQef.js","_assets/privacy-policy-uhHYQlev.css","_assets/admin.marketing-BcZUlmDu.js","_assets/Collapsible-D6KUCMGG.js","_assets/Collapsible-BnDbTvjj.css","_assets/admin-CFVqVwwy.css","_assets/forgot-password-BM8_lmws.js","_assets/forgot-password-CyaYQGkw.css","_assets/partner.training-B5s1t3iR.js","_assets/creCourseContent-4mtauJYX.js","_assets/partner-C1FzzlkG.css","_assets/terms-of-service-DhIrOgNX.js","_assets/business-financing-CjDhlJ1l.js","_assets/business-financing-BVVWrvxz.css","_assets/reset-password._token-yR2llbSm.js","_assets/reset-password-DDWL5vTF.css","_assets/commercial-real-estate-B_W8n3Na.js","_assets/commercial-real-estate-z1pKu1mL.css","_assets/partner.broker-resources-rGRNK7YS.js","_assets/partner-E6NU3Anl.css","_assets/apply.commercial-real-estate-C-g-m_4l.js","_assets/apply-Cac4651y.css","_assets/business-financing.sba-loans-Do5y91tD.js","_assets/FinancingProductTemplate-DgA_2fRl.js","_assets/FinancingProductTemplate-BMdSDoEy.css","_assets/business-financing-D9gtA0zz.css","_assets/partner.training._moduleSlug-Jl9a1z4H.js","_assets/partner.training-CjOcJn_N.css","_assets/commercial-real-estate.dscr-loans-BuJan3DX.js","_assets/commercial-real-estate-B4Nv8xbP.css","_assets/commercial-real-estate.properties-Bvq1zE91.js","_assets/commercial-real-estate-Bk-z9F8Y.css","_assets/business-financing.invoice-factoring-BZoWY9_G.js","_assets/business-financing.equipment-financing-DnoGdCqt.js","_assets/business-financing.working-capital-loans-CuAxBD11.js","_assets/business-financing.merchant-cash-advances-KeIab5jq.js","_assets/business-financing.business-line-of-credit-DeMuWfkL.js","_assets/commercial-real-estate.commercial-bridge-loans-DTaJh8sN.js","_assets/commercial-real-estate-BtC1zkpr.css","_assets/commercial-real-estate.small-balance-commercial-loans-DNNXJbeH.js","_assets/commercial-real-estate-D7pmMPhF.css","_assets/index-YACNi6Jt.js","_assets/index-BwcfkH7w.js","_assets/index-yVVF-3vQ.js"])))=>i.map(i=>d[i]); 2var Qe=Object.defineProperty;var Ge=(s,t,n)=>t in s?Qe(s,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):s[t]=n;var $=(s,t,n)=>Ge(s,typeof t!="symbol"?t+"":t,n);
vendor: 1,201 bytes, line 2
2import{R as S,Q as je,H as Ke,S as P,r as g,j as e,P as Ye,C as Le,a as Ze,b as Je,T as Xe,c as et,u as te,o as B,d as Z,e as K,f as tt,g as nt,h as Pe,i as Ae,s as A,n as Re,M as st,B as at,X as Se,k as rt,l as ot,m as Ie,L as h,p as it,q as ae,t as ue,v as ct,w as lt,N as dt,x as ut,U as mt,Z as pt,y as ht,z as ft,A as gt,D as we,E as _t,F as yt,G as xt,I as bt,J as me,K as vt,O as jt,V as wt,W as Nt}from"./vendor-DVSFozc8.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const o of a)if(o.type==="childList")for(const l of o.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const o={};return a.integrity&&(o.integrity=a.integrity),a.referrerPolicy&&(o.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?o.credentials="include":a.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(a){if(a.ep)return;a.ep=!0;const o=n(a);fetch(a.href,o)}})();const Ct="modulepreload",kt=function(s){return"/"+s},Ne={}
2,w=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){let l=function(c){return Promise.all(c.map(_=>Promise.resolve(_).then(x=>({status:"fulfilled",value:x}),x=>({status:"rejected",reason:x}))))};document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),m=i?.nonce||i?.getAttribute("nonce");a=l(n.map(c=>{if(c=kt(c),c in Ne)return;Ne[c]=!0;const _=c.endsWith(".css"),x=_?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${x}`))return;const p=document.createElement("link");if(p.rel=_?"stylesheet":Ct,_||(p.as="script"),p.crossOrigin="",p.href=c,m&&p.setAttribute("nonce",m),document.head.appendChild(p),_)return new Promise((y,b)=>{p.addEventListener("load",y),p.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${c}`)))})}))}function o(l){const i=new Event("vite:preloadError",{cancelable:!0});if(i.payload=l,window.dispatchEvent(i),!i.defaultPrevented)throw l}return a.then(l=>{for(const i of l||[])i.status==="rejected"&&o(i.reason);return t().catch(o)})};function Tt(){return typeof window<"u"&&window.__REACT_QUERY_STATE__?P.deserialize(window.__REACT_QUERY_STATE__):null}function Et({client:s,children:t}){const n=Tt();return n?S.createElement(je,{client:s},S.createElement(Ke,{state:n},t)):S.createElement(je,{client:s},t)}const pe=new Set;function fe(){const s=Oe();pe.forEach(t=>t(s))}function Lt(s){return pe.add(s),()=>{pe.delete(s)}}function Ce(s){s?document.body.classList.add("dark"):document.body.classList.remove("dark")}let V=null;function Pt(){V&&(V.onchange=null,V=null),document.body.classList.add("dark"),fe()}function At(){V&&(V.onchange=null,V=null),document.body.classList.remove("dark"),fe()}function Rt(){V&&(V.onchange=null);const s=window.matchMedia("(prefers-color-scheme: dark)");s.onchange=t=>{Ce(t.matches)},V=s,Ce(s.matches),fe()}function Oe(){return V?"auto":document.body.classList.contains("dark")?"dark":"light"}const St=g.createContext(null);function It({children:s}){const[t,n]=g.useState(()=>Oe());g.useEffect(()=>Lt(o=>{n(o)}),[]);const r=g.useMemo(()=>({mode:t,switchToDarkMode:Pt,switchToLightMode:At,switchToAutoMode:Rt}),[t]);return e.jsx(St.Provider,{value:r,children:s})}const Ot="_content_1hxhe_2",$t={content:Ot},Bt=Ze,Pi=Je,Ai=Xe,Dt=g.forwardRef(({className:s,sideOffset:t=4,...n},r)=>e.jsx(Ye,{children:e.jsx(Le,{ref:r,sideOffset:t,className:`${$t.content} ${s||""}`,...n})}));Dt.displayName=Le.displayName;const Ft="_toaster_uhdob_2",Mt="_toast_uhdob_2",qt="_content_uhdob_35",Vt="_title_uhdob_43",Ut="_description_uhdob_50",zt="_icon_uhdob_56",Wt="_actionButton_uhdob_66",Ht="_cancelButton_uhdob_93",Qt="_closeButton_uhdob_119",U={toaster:Ft,toast:Mt,content:qt,title:Vt,description:Ut,icon:zt,actionButton:Wt,cancelButton:Ht,closeButton:Qt},Gt=({className:s,...t})=>e.jsx(et,{className:`${U.toaster} ${s??""}`,toastOptions:{unstyled:!0,classNames:{toast:U.toast,content:U.content,title:U.title,actionButton:U.actionButton,cancelButton:U.cancelButton,closeButton:U.closeButton,description:U.description,icon:U.icon}},...t}),Kt=()=>{let s=te(),t=g.useMemo(()=>{let n=s.hash;const r=a=>a.slice(1);return n?document.getElementById(r(n)):null},[s]);return g.useEffect(()=>{t&&t.scrollIntoView({behavior:"smooth",inline:"nearest"})},[t]),null};B({});const Yt=async(s={},t)=>{const n=await fetch("/_api/auth/session",{method:"GET",...t,headers:{"Content-Type":"application/json"}});return P.parse(await n.text())};B({});const Zt=async(s={},t)=>{const n=await fetch("/_api/auth/logout",{method:"POST",body:P.stringify(s),...t,headers:{"Content-Type":"application/json"}});return P.parse(await n.text())},ce=["auth","session"],$e=g.createContext(void 0),Jt=({children:s})=>{const t=Z(),{data:n,error:r,status:a,refetch:o}=K({queryKey:ce,queryFn:async()=>{const c=await Yt();if("error"in c)throw new Error(c.error);return c.user},retry:1,enabled:!0,staleTime:1/0}),l=a==="pending"?{type:"loading"}:a==="error"?{type:"unauthenticated",errorMessage:r instanceof Error?r.message:"Session check failed"}:n?{type:"authenticated",user:n}:{type:"unauthenticated"},i=g.useCallback(async()=>{t.setQueryData(ce,null),await Zt(),t.resetQueries()},[t]),m=g.useCallback(c=>{t.setQueryData(ce,c)},[t]);return e.jsx($e.Provider,{value:{authState:l,logout:i,onLogin:m},children:s})},ge=()=>{const s=g.useContext($e);if(s===void 0)throw new Error("useAuth must be used within a AuthProvider");return s},Xt=new tt({defaultOptions:{queries:{staleTime:60*1e3}}}),en=({children:s})=>e.jsxs(e.Fragment,{children:[e.jsxs(nt,{children:[e.jsx("meta",{name:"facebook-domain-verification",content:"va4fbuecyoyt7esiws7oy4psstr78x"}),e.jsx("script",{children:"
vendor: 390 bytes, line 2
2!function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window, document,'script','https://connect.facebook.net/en_US/fbevents.js');fbq('init', '
21315849857284146
vendor: 28 bytes, line 2
2');fbq('track', 'PageView');
2"}),e.jsx("noscript",{children:'<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1315849857284146&ev=PageView&noscript=1" />'})]}),e.jsx(Et,{client:Xt,children:e.jsx(Jt,{children:e.jsxs(It,{children:[e.jsx(Kt,{}),e.jsxs(Bt,{children:[s,e.jsx(Gt,{})]})]})})})]}),tn="_button_iv06j_2",nn="_sm_iv06j_32",sn="_md_iv06j_38",an="_lg_iv06j_44",rn="_icon_iv06j_52",on="_primary_iv06j_97",cn="_secondary_iv06j_114",ln="_destructive_iv06j_132",dn="_outline_iv06j_156",un="_ghost_iv06j_176",mn="_link_iv06j_193",pn="_disabled_iv06j_225",hn="_dark_iv06j_232",re={button:tn,sm:nn,md:sn,lg:an,icon:rn,"icon-md":"_icon-md_iv06j_53","icon-sm":"_icon-sm_iv06j_59","icon-lg":"_icon-lg_iv06j_65",primary:on,secondary:cn,destructive:ln,outline:dn,ghost:un,link:mn,disabled:pn,dark:hn},G=S.forwardRef(({children:s,variant:t="primary",size:n="md",asChild:r=!1,className:a,disabled:o,type:l="button",...i},m)=>{const c=r?Pe:"button";return e.jsx(c,{ref:m,type:l,className:` 3 ${re.button} 4 ${re[t]} 5 ${re[n]} 6 ${o?re.disabled:""} 7 ${a||""} 8 `,disabled:o,...i,children:s})});G.displayName="Button";const fn="_spinner_10u53_2",gn="_spinnerInner_10u53_11",_n="_spin_10u53_2",yn="_sm_10u53_21",xn="_md_10u53_30",bn="_lg_10u53_39",le={spinner:fn,spinnerInner:gn,spin:_n,sm:yn,md:xn,lg:bn},Be=({size:s="md",className:t,...n})=>e.jsx("div",{className:`${le.spinner} ${le[s]} ${t||""}`,...n,role:"status",children:e.jsx("div",{className:le.spinnerInner})});B({});const vn=async(s,t,n)=>{const r=new URLSearchParams({conversationId:String(s.conversationId)});s.sinceId&&r.set("sinceId",String(s.sinceId));const a=await fetch(`/_api/widget/chat/history?${r}`,{method:"GET",headers:{Authorization:`Bearer ${t}`},...n});if(!a.ok)throw new Error(P.parse(await a.text()).error);return P.parse(await a.text())};B({text:A().min(1).max(4e3),conversationId:Re().int().positive().optional(),attachments:Ae(B({storageFilename:A().min(1).max(300),contentType:A().min(1).max(100)})).max(3).optional()});const jn=async(s,t,n)=>{const r=await fetch("/_api/widget/chat/send",{method:"POST",body:P.stringify(s),headers:{"Content-Type":"application/json",Authorization:`Bearer ${t}`},...n});if(!r.ok)throw new Error(P.parse(await r.text()).error);return P.parse(await r.text())};function wn(s){const t=Z(),[n,r]=g.useState(""),[a,o]=g.useState(void 0),[l,i]=g.useState(!1),[m,c]=g.useState(null);g.useEffect(()=>{if(typeof window>"u")return;let b=localStorage.getItem("redifund_chat_token");b||(b=crypto.randomUUID(),localStorage.setItem("redifund_chat_token",b)),r(b);const C=localStorage.getItem("redifund_chat_conversation");C&&o(Number(C))},[]);const{data:_,refetch:x}=K({queryKey:["widgetSession",n],queryFn:async()=>{if(!n)return null;const b=await fetch("/_api/widget/session",{method:"POST",headers:{"Content-Type":"application/json"},body:P.stringify({kind:"anonymous",token:n})});if(!b.ok)throw new Error("Failed to mint session");return P.parse(await b.text()).sessionToken},enabled:!!n,staleTime:1500*1e3,refetchInterval:1500*1e3}),{data:p}=K({queryKey:["widgetChat",a],queryFn:async()=>{if(!a||!_)return null;const b=t.getQueryData(["widgetChat",a]),C=b?.messages?.reduce((u,v)=>v.id>0?Math.max(u,v.id):u,0)||0;try{const u=await vn({conversationId:a,sinceId:C},_),v=u.messages.filter(I=>I.sender==="user");let L=b?.messages||[];v.length>0&&(L=L.filter(I=>I.id>0));const O=[...L,...u.messages],k=Array.from(new Map(O.map(I=>[I.id,I])).values()).sort((I,He)=>new Date(I.createdAt).getTime()-new Date(He.createdAt).getTime());return{...u,messages:k}}catch(u){throw(u.message?.includes("Unauthorized")||u.message?.includes("401"))&&x(),u}},enabled:s&&!!a&&!!_,refetchInterval:s?3e3:!1}),y=g.useCallback(async b=>{if(!_||!b.trim())return;c(null),i(!0);const C=-Date.now(),u={id:C,sender:"user",senderName:null,text:b,attachments:[],createdAt:new Date};t.setQueryData(["widgetChat",a],v=>v?{...v,messages:[...v.messages,u]}:{status:"idle",handoffStatus:"ai",messages:[u]});try{const v=await jn({text:b,conversationId:a},_);v.conversationId&&v.conversationId!==a&&(t.setQueryData(["widgetChat",v.conversationId],L=>({status:"idle",handoffStatus:"ai",...L||{},messages:[...L?.messages||[],u]})),o(v.conversationId),localStorage.setItem("redifund_chat_conversation",String(v.conversationId)))}catch(v){t.setQueryData(["widgetChat",a],O=>O&&{...O,messages:O.messages.filter(k=>k.id!==C)});const L=v.message||String(v);L.includes("429")||L.toLowerCase().includes("rate limit")?c("One moment please, you're sending messages too fast."):L.includes("OUT_OF_CREDITS")?console.error("AI service is currently unavailable. Failing silently."):c("Failed to send message. Please try again.")}finally{i(!1)}},[_,a,t]);return{messages:p?.messages||[],status:p?.status||"idle",handoffStatus:p?.handoffStatus||"ai",isSending:l,sendMessage:y,error:m,hasStarted:!!a}}const Nn="_launcher_1im2j_2",Cn="_launcherIcon_1im2j_26",kn="_launcherBadge_1im2j_30",Tn="_panel_1im2j_37",En="_header_1im2j_67",Ln="_headerInfo_1im2j_77",Pn="_headerIcon_1im2j_83",An="_headerText_1im2j_87",Rn="_headerTitle_1im2j_92",Sn="_headerSubtitle_1im2j_98",In="_closeBtn_1im2j_103",On="_messageArea_1im2j_122",$n="_messageWrapper_1im2j_132",Bn="_wrapperUser_1im2j_138",Dn="_wrapperAssistant_1im2j_143",Fn="_bubble_1im2j_148",Mn="_bubbleUser_1im2j_157",qn="_bubbleAssistant_1im2j_163",Vn="_humanLabel_1im2j_171",Un="_typingIndicator_1im2j_179",zn="_dot_1im2j_193",Wn="_handoffBanner_1im2j_214",Hn="_errorBanner_1im2j_225",Qn="_emptyState_1im2j_235",Gn="_chipsContainer_1im2j_241",Kn="_chip_1im2j_241",Yn="_composerArea_1im2j_266",Zn="_inputRow_1im2j_275",Jn="_textarea_1im2j_281",Xn="_sendButton_1im2j_307",es="_closedMessage_1im2j_313",ts="_footerText_1im2j_323",j={launcher:Nn,launcherIcon:Cn,launcherBadge:kn,panel:Tn,header:En,headerInfo:Ln,headerIcon:Pn,headerText:An,headerTitle:Rn,headerSubtitle:Sn,closeBtn:In,messageArea:On,messageWrapper:$n,wrapperUser:Bn,wrapperAssistant:Dn,bubble:Fn,bubbleUser:Mn,bubbleAssistant:qn,humanLabel:Vn,typingIndicator:Un,dot:zn,handoffBanner:Wn,errorBanner:Hn,emptyState:Qn,chipsContainer:Gn,chip:Kn,composerArea:Yn,inputRow:Zn,textarea:Jn,sendButton:Xn,closedMessage:es,footerText:ts},ns=["What loan programs do you offer?","What are your commercial loan terms?","Do you have a no-doc option?","I'd like someone to contact me"];function ss(){const[s,t]=g.useState(!1),n=te(),r=g.useRef(null),a=g.useRef(null),[o,l]=g.useState(""),{messages:i,status:m,handoffStatus:c,isSending:_,sendMessage:x,error:p}=wn(s);if(g.useEffect(()=>{r.current?.scrollIntoView({behavior:"smooth"})},[i.length,m,c,s]),n.pathname.startsWith("/apply")||n.pathname.startsWith("/admin"))return null;const y=u=>{l(u.target.value),u.target.style.height="auto",u.target.style.height=`${Math.min(u.target.scrollHeight,120)}px`},b=()=>{!o.trim()||_||c==="closed"||(x(o.trim()),l(""),a.current&&(a.current.style.height="auto"))},C=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),b())};return s?e.jsxs("div",{className:j.panel,children:[e.jsxs("div",{className:j.header,children:[e.jsxs("div",{className:j.headerInfo,children:[e.jsx(at,{size:20,className:j.headerIcon}),e.jsxs("div",{className:j.headerText,children:[e.jsx("span",{className:j.headerTitle,children:"Redi"}),e.jsx("span",{className:j.headerSubtitle,children:"Redifund Assistant"})]})]}),e.jsx("button",{className:j.closeBtn,onClick:()=>t(!1),"aria-label":"Close chat",children:e.jsx(Se,{size:20})})]}),e.jsxs("div",{className:j.messageArea,children:[c==="human"&&e.jsx("div",{className:j.handoffBanner,children:"A Redifund team member has joined the chat."}),i.length===0&&e.jsxs("div",{className:j.emptyState,children:[e.jsx("div",{className:`${j.messageWrapper} ${j.wrapperAssistant}`,children:e.jsx("div",{className:`${j.bubble} ${j.bubbleAssistant}`,children:"Hi! I'm Redi, the Redifund assistant. How can I help you today?"})}),e.jsx("div",{className:j.chipsContainer,children:ns.map(u=>e.jsx("button",{className:j.chip,onClick:()=>x(u),children:u},u))})]}),i.map(u=>{const v=u.sender==="user",L=u.sender==="human_agent";return e.jsxs("div",{className:`${j.messageWrapper} ${v?j.wrapperUser:j.wrapperAssistant}`,children:[L&&e.jsxs("div",{className:j.humanLabel,children:["Redifund Team - ",u.senderName||"Staff"]}),e.jsx("div",{className:`${j.bubble} ${v?j.bubbleUser:j.bubbleAssistant}`,children:u.text})]},u.id)}),m==="processing"&&e.jsx("div",{className:`${j.messageWrapper} ${j.wrapperAssistant}`,children:e.jsxs("div",{className:j.typingIndicator,children:[e.jsx("div",{className:j.dot}),e.jsx("div",{className:j.dot}),e.jsx("div",{className:j.dot})]})}),e.jsx("div",{ref:r})]}),e.jsxs("div",{className:j.composerArea,children:[p&&e.jsx("div",{className:j.errorBanner,children:p}),c==="closed"?e.jsx("div",{className:j.closedMessage,children:"This chat is closed."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:j.inputRow,children:[e.jsx("textarea",{ref:a,value:o,onChange:y,onKeyDown:C,placeholder:"Type your message...",className:j.textarea,rows:1,disabled:_}),e.jsx(G,{variant:"primary",size:"icon-md",onClick:b,disabled:!o.trim()||_,className:j.sendButton,"aria-label":"Send message",children:_?e.jsx(Be,{size:"sm"}):e.jsx(rt,{size:16})})]}),e.jsx("div",{className:j.footerText,children:"Redi is an AI assistant. Redifund is not a lender."})]})]})]}):e.jsxs("button",{className:j.launcher,onClick:()=>t(!0),"aria-label":"Open chat",children:[e.jsx(st,{size:24,className:j.launcherIcon}),e.jsx("span",{className:j.launcherBadge,children:"Chat with us"})]})}B({slug:A().min(1)});const as=async(s,t)=>{const n=await fetch(`/_api/partner/referral/validate?slug=${encodeURIComponent(s)}`,{method:"GET",...t});if(!n.ok){const r=P.parse(await n.text());throw new Error(r.error)}return P.parse(await n.text())},rs=B({slug:A().min(1),firstName:A().min(1,"First name is required"),lastName:A().optional(),companyName:A().optional(),email:A().email("Invalid email address"),phone:A().optional(),requestedAmount:Re().positive().optional(),financingType:ot(["business","cre"]),notes:A().optional()}),os=async(s,t)=>{const n=rs.parse(s),r=await fetch("/_api/partner/referral/lead",{method:"POST",body:P.stringify(n),...t,headers:{"Content-Type":"application/json"}});if(!r.ok){const a=P.parse(await r.text());throw new Error(a.error)}return P.parse(await r.text())};B({});const is=async s=>{const t=await fetch("/_api/partner/referral/my-link",{method:"GET",...s,headers:{"Content-Type":"application/json"}});if(!t.ok){const n=P.parse(await t.text());throw new Error(n.error)}return P.parse(await t.text())},cs=s=>["partner","referral","validate",s],ls=["partner","referral","my-link"];function ds(s){return K({queryKey:cs(s||""),queryFn:async()=>s?as(s):{valid:!1,contactPhone:null,contactEmail:null},enabled:!!s,retry:!1})}function Ri(){return Ie({mutationFn:s=>os(s)})}function Si(){return K({queryKey:ls,queryFn:async()=>is()})}function us(s){const t=s.replace(/\D/g,"");return t.length===10?`(${t.slice(0,3)}) ${t.slice(3,6)}-${t.slice(6)}`:s}const ms="_container_no5ak_2",ps="_header_no5ak_8",hs="_headerContent_no5ak_19",fs="_logo_no5ak_29",gs="_logoImage_no5ak_36",_s="_nav_no5ak_42",ys="_dropdownContainer_no5ak_51",xs="_navLink_no5ak_58",bs="_chevron_no5ak_71",vs="_dropdownMenu_no5ak_79",js="_dropdownLink_no5ak_116",ws="_authNav_no5ak_135",Ns="_logoutBtn_no5ak_141",Cs="_actions_no5ak_151",ks="_accentBtn_no5ak_159",Ts="_hamburgerBtn_no5ak_170",Es="_mobileNav_no5ak_181",Ls="_chevronOpen_no5ak_185",Ps="_mobileAccordionContent_no5ak_189",As="_mobileAccordionOpen_no5ak_197",Rs="_main_no5ak_201",Ss="_footer_no5ak_207",Is="_footerContent_no5ak_213",Os="_footerBrand_no5ak_222",$s="_footerLogoImage_no5ak_227",Bs="_footerLinks_no5ak_234",Ds="_footerContact_no5ak_234",Fs="_disclaimer_no5ak_268",Ms="_legalLinks_no5ak_282",qs="_separator_no5ak_299",Vs="_mobileNavGroup_no5ak_355",Us="_mobileNavLink_no5ak_362",zs="_mobileAccordionBtn_no5ak_362",Ws="_mobileSubLink_no5ak_386",Hs="_mobileDivider_no5ak_401",Qs="_mobileAp
8plyBtn_no5ak_407",Gs="_mobileLogoutBtn_no5ak_412",Ks="_logoutText_no5ak_419",d={container:ms,header:ps,headerContent:hs,logo:fs,logoImage:gs,nav:_s,dropdownContainer:ys,navLink:xs,chevron:bs,dropdownMenu:vs,dropdownLink:js,authNav:ws,logoutBtn:Ns,actions:Cs,accentBtn:ks,hamburgerBtn:Ts,mobileNav:Es,chevronOpen:Ls,mobileAccordionContent:Ps,mobileAccordionOpen:As,main:Rs,footer:Ss,footerContent:Is,footerBrand:Os,footerLogoImage:$s,footerLinks:Bs,footerContact:Ds,disclaimer:Fs,legalLinks:Ms,separator:qs,mobileNavGroup:Vs,mobileNavLink:Us,mobileAccordionBtn:zs,mobileSubLink:Ws,mobileDivider:Hs,mobileApplyBtn:Qs,mobileLogoutBtn:Gs,logoutText:Ks};function T({children:s}){const t=te(),n=t.pathname==="/apply",{authState:r,logout:a}=ge(),l=t.pathname.startsWith("/p/")?t.pathname.split("/")[2]:null,{data:i}=ds(l||null),m=i?.valid&&i.contactPhone?i.contactPhone:"888-299-1789",c=i?.valid&&i.contactEmail?i.contactEmail:"[email protected]",_=us(m),[x,p]=g.useState(!1),[y,b]=g.useState(!1),[C,u]=g.useState(!1);return g.useEffect(()=>{p(!1)},[t]),g.useEffect(()=>(x?document.body.style.overflow="hidden":document.body.style.overflow="",()=>{document.body.style.overflow=""}),[x]),e.jsxs("div",{className:d.container,children:[e.jsxs("header",{className:d.header,children:[e.jsxs("div",{className:d.headerContent,children:[e.jsx(h,{to:"/",className:d.logo,children:e.jsx("img",{src:"/_cdn/static/redifund-logo-2026-dark.png",alt:"RediFund - Community Financing for All",className:d.logoImage})}),e.jsx("button",{className:d.hamburgerBtn,onClick:()=>p(!x),"aria-label":"Toggle mobile menu",children:x?e.jsx(Se,{size:24}):e.jsx(it,{size:24})}),!n&&e.jsxs("nav",{className:d.nav,children:[e.jsxs("div",{className:d.dropdownContainer,children:[e.jsxs(h,{to:"/business-financing",className:d.navLink,children:["Business Financing ",e.jsx(ae,{size:14,className:d.chevron})]}),e.jsxs("div",{className:d.dropdownMenu,children:[e.jsx(h,{to:"/business-financing/working-capital-loans",className:d.dropdownLink,children:"Working Capital Loans"}),e.jsx(h,{to:"/business-financing/merchant-cash-advances",className:d.dropdownLink,children:"Merchant Cash Advances"}),e.jsx(h,{to:"/business-financing/business-line-of-credit",className:d.dropdownLink,children:"Business Line of Credit"}),e.jsx(h,{to:"/business-financing/equipment-financing",className:d.dropdownLink,children:"Equipment Financing"}),e.jsx(h,{to:"/business-financing/sba-loans",className:d.dropdownLink,children:"SBA Loans"}),e.jsx(h,{to:"/business-financing/invoice-factoring",className:d.dropdownLink,children:"Invoice Factoring"})]})]}),e.jsxs("div",{className:d.dropdownContainer,children:[e.jsxs(h,{to:"/commercial-real-estate",className:d.navLink,children:["Commercial Real Estate ",e.jsx(ae,{size:14,className:d.chevron})]}),e.jsxs("div",{className:d.dropdownMenu,children:[e.jsx(h,{to:"/commercial-real-estate/small-balance-commercial-loans",className:d.dropdownLink,children:"Small-Balance Commercial Loans"}),e.jsx(h,{to:"/commercial-real-estate/commercial-bridge-loans",className:d.dropdownLink,children:"Commercial Bridge Loans"}),e.jsx(h,{to:"/commercial-real-estate/dscr-loans",className:d.dropdownLink,children:"DSCR Loans"}),e.jsx(h,{to:"/commercial-real-estate/properties",className:d.dropdownLink,children:"Commercial Properties"})]})]}),e.jsx(h,{to:"/why-redifund",className:d.navLink,children:"Why Redifund"})]}),e.jsxs("div",{className:d.actions,children:[e.jsx("div",{className:d.authNav,children:r.type==="authenticated"?e.jsxs(e.Fragment,{children:[r.user.role==="admin"&&e.jsx(h,{to:"/admin",className:d.navLink,children:"Admin"}),r.user.role==="partner"?e.jsx(h,{to:"/partner",className:d.navLink,children:"Partner Portal"}):e.jsx(h,{to:"/portal",className:d.navLink,children:"My Portal"}),e.jsxs(G,{variant:"ghost",size:"sm",onClick:()=>a(),className:d.logoutBtn,children:[e.jsx(ue,{size:16}),e.jsx("span",{className:d.logoutText,children:"Log Out"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(h,{to:"/login",className:d.navLink,children:"Client Login"}),e.jsx(h,{to:"/partner-login",className:d.navLink,children:"Partner Login"})]})}),!n&&e.jsx(G,{asChild:!0,className:d.accentBtn,children:e.jsx(h,{to:"/apply",children:"Apply Now"})})]})]}),x&&e.jsx("div",{className:d.mobileNav,children:e.jsxs("div",{className:d.mobileNavGroup,children:[!n&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{className:d.mobileAccordionBtn,onClick:()=>b(!y),children:["Business Financing",e.jsx(ae,{size:16,className:`${d.chevron} ${y?d.chevronOpen:""}`})]}),e.jsxs("div",{className:`${d.mobileAccordionContent} ${y?d.mobileAccordionOpen:""}`,children:[e.jsx(h,{to:"/business-financing/working-capital-loans",className:d.mobileSubLink,children:"Working Capital Loans"}),e.jsx(h,{to:"/business-financing/merchant-cash-advances",className:d.mobileSubLink,children:"Merchant Cash Advances"}),e.jsx(h,{to:"/business-financing/business-line-of-credit",className:d.mobileSubLink,children:"Business Line of Credit"}),e.jsx(h,{to:"/business-financing/equipment-financing",className:d.mobileSubLink,children:"Equipment Financing"}),e.jsx(h,{to:"/business-financing/sba-loans",className:d.mobileSubLink,children:"SBA Loans"}),e.jsx(h,{to:"/business-financing/invoice-factoring",className:d.mobileSubLink,children:"Invoice Factoring"})]}),e.jsxs("button",{className:d.mobileAccordionBtn,onClick:()=>u(!C),children:["Commercial Real Estate",e.jsx(ae,{size:16,className:`${d.chevron} ${C?d.chevronOpen:""}`})]}),e.jsxs("div",{className:`${d.mobileAccordionContent} ${C?d.mobileAccordionOpen:""}`,children:[e.jsx(h,{to:"/commercial-real-estate/small-balance-commercial-loans",className:d.mobileSubLink,children:"Small-Balance Commercial Loans"}
8),e.jsx(h,{to:"/commercial-real-estate/commercial-bridge-loans",className:d.mobileSubLink,children:"Commercial Bridge Loans"}),e.jsx(h,{to:"/commercial-real-estate/dscr-loans",className:d.mobileSubLink,children:"DSCR Loans"}),e.jsx(h,{to:"/commercial-real-estate/properties",className:d.mobileSubLink,children:"Commercial Properties"})]}),e.jsx(h,{to:"/why-redifund",className:d.mobileNavLink,children:"Why Redifund"})]}),e.jsx("div",{className:d.mobileDivider}),r.type==="authenticated"?e.jsxs(e.Fragment,{children:[r.user.role==="admin"&&e.jsx(h,{to:"/admin",className:d.mobileNavLink,children:"Admin"}),r.user.role==="partner"?e.jsx(h,{to:"/partner",className:d.mobileNavLink,children:"Partner Portal"}):e.jsx(h,{to:"/portal",className:d.mobileNavLink,children:"My Portal"}),e.jsxs("button",{onClick:()=>{a(),p(!1)},className:`${d.mobileNavLink} ${d.mobileLogoutBtn}`,children:[e.jsx(ue,{size:16}),e.jsx("span",{children:"Log Out"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(h,{to:"/login",className:d.mobileNavLink,children:"Client Login"}),e.jsx(h,{to:"/partner-login",className:d.mobileNavLink,children:"Partner Login"})]}),!n&&e.jsx(G,{asChild:!0,className:`${d.accentBtn} ${d.mobileApplyBtn}`,children:e.jsx(h,{to:"/apply",children:"Apply Now"})})]})})]}),e.jsx("main",{className:d.main,children:s}),e.jsxs("footer",{className:d.footer,children:[e.jsxs("div",{className:d.footerContent,children:[e.jsx("div",{className:d.footerBrand,children:e.jsx(h,{to:"/",children:e.jsx("img",{src:"/_cdn/static/redifund-logo-2026-light.png",alt:"RediFund - Community Financing for All",className:d.footerLogoImage})})}),e.jsxs("div",{className:d.footerLinks,children:[e.jsx("h4",{children:"Business Financing"}),e.jsx(h,{to:"/business-financing/working-capital-loans",children:"Working Capital Loans"}),e.jsx(h,{to:"/business-financing/merchant-cash-advances",children:"Merchant Cash Advances"}),e.jsx(h,{to:"/business-financing/business-line-of-credit",children:"Business Line of Credit"}),e.jsx(h,{to:"/business-financing/equipment-financing",children:"Equipment Financing"}),e.jsx(h,{to:"/business-financing/sba-loans",children:"SBA Loans"}),e.jsx(h,{to:"/business-financing/invoice-factoring",children:"Invoice Factoring"})]}),e.jsxs("div",{className:d.footerLinks,children:[e.jsx("h4",{children:"Commercial Real Estate"}),e.jsx(h,{to:"/commercial-real-estate/small-balance-commercial-loans",children:"Small-Balance Commercial Loans"}),e.jsx(h,{to:"/commercial-real-estate/commercial-bridge-loans",children:"Commercial Bridge Loans"}),e.jsx(h,{to:"/commercial-real-estate/dscr-loans",children:"DSCR Loans"}),e.jsx(h,{to:"/commercial-real-estate/properties",children:"Commercial Properties"})]}),e.jsxs("div",{className:d.footerLinks,children:[e.jsx("h4",{children:"Company"}),e.jsx(h,{to:"/why-redifund",children:"Why Redifund"}),e.jsx(h,{to:"/contact",children:"Contact Us"}),e.jsx(h,{to:"/faq",children:"FAQ"}),e.jsx(h,{to:"/apply",children:"Apply Now"}),e.jsx(h,{to:"/portal",children:"Client Portal"}),e.jsx(h,{to:"/partner",children:"Partner Portal"}),e.jsx(h,{to:"/privacy-policy",children:"Privacy Policy"}),e.jsx(h,{to:"/terms-of-service",children:"Terms of Service"})]}),e.jsxs("div",{className:d.footerContact,children:[e.jsx("h4",{children:"Contact Us"}),e.jsx("p",{children:e.jsx("a",{href:`tel:${m}`,children:_})}),e.jsx("p",{children:e.jsx("a",{href:`mailto:${c}`,children:c})})]})]}),e.jsxs("div",{className:d.disclaimer,children:[e.jsx("div",{className:d.disclaimerText,children:"© 2025 Redifund. All rights reserved. *Redifund is not a financial lender. We are a software company."}),e.jsxs("div",{className:d.legalLinks,children:[e.jsx(h,{to:"/privacy-policy",children:"Privacy Policy"}),e.jsx("span",{className:d.separator,children:"|"}),e.jsx(h,{to:"/terms-of-service",children:"Terms of Service"})]})]})]}),e.jsx(ss,{})]})}const Ys=[T],Zs="_container_1be78_1",Js="_card_1be78_11",Xs="_iconContainer_1be78_24",ea="_icon_1be78_24",ta="_title_1be78_33",na="_message_1be78_41",J={container:Zs,card:Js,iconContainer:Xs,icon:ea,title:ta,message:na},sa=({title:s="Authentication Error",message:t,icon:n,className:r})=>e.jsx("div",{className:`${J.container} ${r||""}`,children:e.jsxs("div",{className:J.card,children:[e.jsx("div",{className:J.iconContainer,children:n||e.jsx(ct,{className:J.icon,size:64})}),e.jsx("h1",{className:J.title,children:s}),e.jsx("p",{className:J.message,children:t})]})}),aa="_skeleton_3rn52_2",ra={skeleton:aa};function D({className:s,...t}){return e.jsx("div",{className:`${ra.skeleton} ${s??""}`,...t})}const oa="_container_bfcih_1",ia="_content_bfcih_13",ca="_lockIcon_bfcih_22",la="_skeletonGrid_bfcih_31",da="_skeletonRow_bfcih_37",ua="_titleRow_bfcih_43",ma="_leftSkeletons_bfcih_50",pa="_rightSkeletons_bfcih_50",ha="_title_bfcih_43",fa="_skeletonBar_bfcih_74",R={container:oa,content:ia,lockIcon:ca,skeletonGrid:la,skeletonRow:da,titleRow:ua,leftSkeletons:ma,rightSkeletons:pa,title:ha,skeletonBar:fa}
8,ga=({title:s="Authenticating...",className:t})=>e.jsx("div",{className:`${R.container} ${t||""}`,children:e.jsx("div",{className:R.content,children:e.jsxs("div",{className:R.skeletonGrid,children:[e.jsxs("div",{className:R.skeletonRow,children:[e.jsx(D,{className:R.skeletonBar,style:{width:"90%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"75%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"85%"}})]}),e.jsxs("div",{className:R.titleRow,children:[e.jsxs("div",{className:R.leftSkeletons,children:[e.jsx(D,{className:R.skeletonBar,style:{width:"100%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"80%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"90%"}})]}),e.jsxs("h3",{className:R.title,children:[e.jsx(lt,{className:R.lockIcon}),e.jsx("span",{children:s})]}),e.jsxs("div",{className:R.rightSkeletons,children:[e.jsx(D,{className:R.skeletonBar,style:{width:"90%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"100%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"75%"}})]})]}),e.jsxs("div",{className:R.skeletonRow,children:[e.jsx(D,{className:R.skeletonBar,style:{width:"80%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"95%"}}),e.jsx(D,{className:R.skeletonBar,style:{width:"70%"}})]})]})})}),_a="_accessDeniedIcon_1k3wn_1",ya={accessDeniedIcon:_a},_e=s=>({children:t})=>{const{authState:n}=ge();return n.type==="loading"?e.jsx(ga,{title:"Authenticating"}):n.type==="unauthenticated"?e.jsx(dt,{to:"/login",replace:!0}):s.includes(n.user.role)?e.jsx(e.Fragment,{children:t}):e.jsx(sa,{title:"Access Denied",message:`Access denied. Your role (${n.user.role}) lacks required permissions.`,icon:e.jsx(ut,{className:ya.accessDeniedIcon,size:64})})},X=_e(["admin"]),xa=_e(["user","admin","partner"]),ne=_e(["partner","admin"]),ba="_container_10ep1_2",va="_topHeader_10ep1_9",ja="_topHeaderContent_10ep1_17",wa="_brand_10ep1_26",Na="_logo_10ep1_32",Ca="_logoImage_10ep1_37",ka="_separator_10ep1_45",Ta="_portalText_10ep1_51",Ea="_userActions_10ep1_58",La="_userInfo_10ep1_64",Pa="_logoutBtn_10ep1_73",Aa="_subNav_10ep1_83",Ra="_subNavContent_10ep1_92",Sa="_navLink_10ep1_100",Ia="_active_10ep1_114",Oa="_main_10ep1_119",$a="_userName_10ep1_126",Ba="_logoutText_10ep1_126",E={container:ba,topHeader:va,topHeaderContent:ja,brand:wa,logo:Na,logoImage:Ca,separator:ka,portalText:Ta,userActions:Ea,userInfo:La,logoutBtn:Pa,subNav:Aa,subNavContent:Ra,navLink:Sa,active:Ia,main:Oa,userName:$a,logoutText:Ba};function ee({children:s}){const t=te(),{authState:n,logout:r}=ge(),a=n.type==="authenticated"?n.user:null;return e.jsxs("div",{className:E.container,children:[e.jsx("header",{className:E.topHeader,children:e.jsxs("div",{className:E.topHeaderContent,children:[e.jsxs("div",{className:E.brand,children:[e.jsx(h,{to:"/admin",className:E.logo,children:e.jsx("img",{src:"/_cdn/static/redifund-logo-2026-light.png",alt:"Redifund Logo",className:E.logoImage})}),e.jsx("div",{className:E.separator}),e.jsx("span",{className:E.portalText,children:"Admin Portal"})]}),e.jsxs("div",{className:E.userActions,children:[a&&e.jsxs("div",{className:E.userInfo,children:[e.jsx(mt,{size:16}),e.jsx("span",{className:E.userName,children:a.displayName})]}),e.jsxs(G,{variant:"ghost",size:"sm",onClick:()=>r(),className:E.logoutBtn,children:[e.jsx(ue,{size:16}),e.jsx("span",{className:E.logoutText,children:"Log Out"})]})]})]})}),e.jsx("nav",{className:E.subNav,children:e.jsxs("div",{className:E.subNavContent,children:[e.jsx(h,{to:"/admin",className:`${E.navLink} ${t.pathname==="/admin"?E.active:""}`,children:"Dashboard"}),e.jsx(h,{to:"/admin/staff",className:`${E.navLink} ${t.pathname==="/admin/staff"?E.active:""}`,children:"Staff Management"}),e.jsx(h,{to:"/admin/partners",className:`${E.navLink} ${t.pathname==="/admin/partners"?E.active:""}`,children:"Partner Management"}),e.jsx(h,{to:"/partner/leads",className:`${E.navLink} ${t.pathname.startsWith("/partner/leads")?E.active:""}`,children:"Lead Management"}),e.jsx(h,{to:"/admin/marketing",className:`${E.navLink} ${t.pathname.startsWith("/admin/marketing")?E.active:""}`,children:"Marketing"}),e.jsx(h,{to:"/admin/chat",className:`${E.navLink} ${t.pathname.startsWith("/admin/chat")?E.active:""}`,children:"Chat Support"}),e.jsx(h,{to:"/admin/email",className:`${E.navLink} ${t.pathname.startsWith("/admin/email")?E.active:""}`,children:"Email"})]})}),e.jsx("main",{className:E.main,children:s})]})}const Da=[X,ee],Fa=[T],Ma=[T],qa=[T],Va=[xa,T],Ua=[T];B({});const za=async s=>{const t=await fetch("/_api/partner/agreement/status",{method:"GET",...s,headers:{"Content-Type":"application/json"}});if(!t.ok){const n=P.parse(await t.text());throw new Error(n.message||"Failed to fetch agreement status")}return P.parse(await t.text())},De=B({repFullName:A().min(1,"Full Name is required"),repCompanyName:A().optional(),repAddress:A().min(1,"Address is required"),repCity:A().min(1,"City is required"),repState:A().min(1,"State is required"),repZip:A().min(1,"Zip is required"),repEmail:A().email("Valid email is required"),repPhone:A().min(1,"Phone is required"),signature:A().min(1,"Signature is required")}),Wa=async(s,t)=>{const n=De.parse(s),r=await fetch("/_api/partner/agreement/sign",{method:"POST",body:P.stringify(n),...t,headers:{"Content-Type":"application/json"}});if(!r.ok){const a=P.parse(await r.text());throw new Error(a.message||"Failed to sign agreement")}return P.parse(await r.text())},ye=["partner","agreement","status"];function Ha(s=!0){return K({queryKey:ye,queryFn:()=>za(),enabled:s})}function Qa(){const s=Z();return Ie({mutationFn:t=>Wa(t),onSuccess:()=>{s.invalidateQueries({queryKey:ye})}})}const Ga="_formItem_1b1z3_2",Ka="_formLabel_1b1z3_9",Ya="_error_1b1z3_18",Za="_formControl_1b1z3_22",Ja="_formDescription_1b1z3_27",Xa="_formMessage_1b1z3_35",Y={formItem:Ga,formLabel:Ka,error:Ya,formControl:Za,formDescription:Ja,formMessage:Xa};function er({defaultValues:s={},schema:t}){const[n,r]=S.useState(s),[a,o]=S.useState({}),l=S.useCallback((p,y)=>{o(b=>de(b,p,y))},[]),i=p=>
8p.code===ft.unrecognized_keys,m=S.useCallback(()=>{if(!t)return!0;try{return ar(t).parse(n),o({}),!0}catch(p){if(p instanceof pt){const y=p.errors.filter(i),b=p.errors.filter(u=>!i(u));if(y.length>0)throw new Error("Extra properties detected in form values:"+y.map(u=>u.message).join(", ")+". Either update the schema or remove these values");const C={};if(b.forEach(u=>{const v=u.path.join("."),L=typeof u.message=="string"?u.message:String(u.message);Object.assign(C,{});const O=de(C,v,L);Object.assign(C,O)}),o(C),b.length===0&&y.length>0)throw new Error(`Form contains extra properties: ${y.map(u=>u.message).join(", ")}`)}return console.error("Form validation failed",p),!1}},[t,n]),c=S.useCallback((p,y)=>{if(!t)return;const b=t.safeParse(n);o(C=>{let u={...C};return y?.shallow?qe(u,p)!==void 0&&(u=ke(u,p,{shallow:!0})):u=ke(u,p),b.success||b.error.errors.forEach(v=>{const L=v.path.join(".");if(y?.shallow?L===p:L===p||L.startsWith(p+".")){const k=typeof v.message=="string"?v.message:String(v.message);u=de(u,L,k)}}),u})},[t,n]),_=S.useCallback(p=>y=>{y.preventDefault(),m()&&p(n)},[m,n]),x=g.useRef(n);return g.useEffect(()=>{const p=[];for(const y of Object.keys(n))n[y]!==x.current[y]&&Array.isArray(n[y])&&Array.isArray(x.current[y])&&n[y].length!==x.current[y].length&&p.push(y);x.current=n;for(const y of p)c(y,{shallow:!0})},[n,c]),{values:n,errors:a,setValues:r,validateField:c,validateForm:m,setFieldError:l,handleSubmit:_,defaultValues:s}}function tr(s){const{children:t,values:n,errors:r,setValues:a,validateField:o,validateForm:l,setFieldError:i}=s;return e.jsx(Fe.Provider,{value:{values:n,errors:r,setValues:a,validateField:o,validateForm:l,setFieldError:i},children:t})}const F=S.forwardRef(({name:s,className:t,...n},r)=>{const a=S.useId();return e.jsx(Me.Provider,{value:{id:a,name:s},children:e.jsx("div",{ref:r,className:`${Y.formItem} ${t||""}`,...n})})});F.displayName="FormItem";const W=S.forwardRef(({className:s,...t},n)=>{const{formItemId:r,error:a}=ie();return e.jsx("label",{ref:n,className:`${Y.formLabel} ${a?Y.error:""} ${s||""}`,htmlFor:r,...t})});W.displayName="FormLabel";const M=S.forwardRef(({className:s,...t},n)=>{const{formItemId:r,error:a,formMessageId:o,onBlur:l}=ie();return e.jsx(Pe,{ref:n,id:r,className:`${Y.formControl} ${a?Y.error:""} ${s||""}`,"aria-invalid":!!a,"aria-describedby":a?o:void 0,onBlur:l,...t})});M.displayName="FormControl";const nr=S.forwardRef(({className:s,...t},n)=>{const{formDescriptionId:r}=ie();return e.jsx("p",{ref:n,id:r,className:`${Y.formDescription} ${s||""}`,...t})});nr.displayName="FormDescription";const q=S.forwardRef(({className:s,children:t,...n},r)=>{const{formMessageId:a,error:o}=ie(),l=o?o.message:t;return l?e.jsx("p",{ref:r,id:a,className:`${Y.formMessage} ${s||""}`,...n,children:l}):null});q.displayName="FormMessage";const Fe=S.createContext(void 0);function sr(){const s=S.useContext(Fe);if(!s)throw new Error("useFormContext must be inside <Form>");return s}const Me=S.createContext(null);function ie(){const s=sr(),t=S.useContext(Me);if(!t)throw new Error("<FormLabel> and <FormControl> must live inside <FormItem>");const{id:n,name:r}=t,a=qe(s.errors,r),o=typeof a=="string"?a:void 0;return{id:n,name:r,error:o?{message:o}:void 0,formItemId:`${n}-form-item`,formDescriptionId:`${n}-form-item-description`,formMessageId:`${n}-form-item-message`,onBlur:()=>s.validateField(r),validateShallow:()=>s.validateField(r,{shallow:!0})}}function qe(s,t){const n=t.split(".");let r=s;for(const a of n){if(r==null)return;/^\d+$/.test(a)&&Array.isArray(r)?r=r[+a]:r=r[a]}return r}function de(s,t,n){const r=t.split("."),a=r.pop(),o={...s};let l=o;for(let i=0;i<r.length;i++){const m=r[i],c=r[i+1];l[m]==null?l[m]=/^\d+$/.test(c)?[]:{}:Array.isArray(l[m])?l[m]=[...l[m]]:typeof l[m]=="object"&&(l[m]={...l[m]}),l=l[m]}return/^\d+$/.test(a)&&Array.isArray(l)?l[+a]=n:l[a]=n,o}function ke(s,t,n){const r=t.split("."),a=r.pop();let o=s;const l=[];for(const i of r){if(o[i]==null)return s;l.push({parent:o,key:i}),o=o[i]}if(o&&typeof o=="object"&&a in o&&(n?.shallow?typeof o[a]=="string"?delete o[a]:typeof o[a]=="object"&&!Array.isArray(o[a])&&"message"in o[a]&&delete o[a].message:delete o[a]),!n?.shallow)for(let i=l.length-1;i>=0;i--){const{parent:m,key:c}=l[i],_=m[c],x=_&&!Array.isArray(_)&&Object.keys(_).length===0,p=Array.isArray(_)&&_.length===0;(x||p)&&delete m[c]}return s}function ar(s){return s instanceof ht?s.strict():s}const rr="_input_1pney_2",or={input:rr},H=g.forwardRef(({className:s,...t},n)=>e.jsx("input",{ref:n,className:`${or.input} ${s||""}`,...t}));H.displayName="Input";function ir(s){const t=g.useRef(s);return g.useLayoutEffect(()=>{t.current=s}),g.useCallback(((...n)=>t.current?.(...n)),[])}const cr="_container_lgdc2_2",lr="_header_lgdc2_9",dr="_label_lgdc2_16",ur="_required_lgdc2_23",mr="_padWrapper_lgdc2_29",pr="_error_lgdc2_44",hr="_canvas_lgdc2_49",fr="_placeholder_lgdc2_56",Q={container:cr,header:lr,label:dr,required:ur,padWrapper:mr,error:pr,canvas:hr,placeholder:fr},gr=({label:s,value:t,onChange:n,required:r,hasError:a,className:o})=>{const l=g.useRef(null),i=g.useRef(null),[m,c]=g.useState(!t),_=ir(n||(()=>{}));g.useEffect(()=>{if(!l.current)return;const p=l.current,y=new gt(p,{penColor:"#1B2A4A",backgroundColor:"#FFFFFF"});i.current=y,y.addEventListener("endStroke",()=>{_(y.toDataURL()),c(y.isEmpty())});const b=()=>{const C=Math.max(window.devicePixelRatio||1,1),u=y.toData();p.width=p.offsetWidth*C,p.height=p.offsetHeight*C;const v=p.getContext("2d");v&&v.scale(C,C),y.clear(),u&&u.length>0?y.fromData(u):t&&y.fromDataURL(t)};return window.addEventListener("resize",b),setTimeout(b,0),()=>{window.removeEventListener("resize",b),y.off()}},[_,t]),g.useEffect(()=>{i.current&&(t?i.current.toDataURL()!==t&&(i.current.fromDataURL(t),c(i.current.isEmpty())):(i.current.clear(),c(!0)))},[t]);const x=()=>{i.current&&(i.current.clear(),c(!0),n?.(null))};return e.jsxs("div",{className:`${Q.container} ${o||""}`,children:[e.jsxs("div",{className:Q.header,children:[s&&e.jsx("label",{className:`${Q.label} ${r?Q.required:""}`,children:s}),e.jsx(G,{variant:"ghost",size:"sm",onClick:x,disabled:m,children:"Clear"})]}),e.jsxs("div",{className:`${Q.padWrapper} ${a?Q.error:""}`,children:[m&&e.jsx("div",{className:Q.placeholder,children:"Sign here"}),e.jsx("canvas",{ref:l,className:Q.canvas,style:{touchAction:"none"}})]})]})}
8,_r="_container_1pasa_2",yr="_header_1pasa_14",xr="_title_1pasa_21",br="_subtitle_1pasa_29",vr="_content_1pasa_37",jr="_documentWrapper_1pasa_45",wr="_document_1pasa_45",Nr="_intro_1pasa_62",Cr="_paragraph_1pasa_66",kr="_sectionTitle_1pasa_70",Tr="_formSection_1pasa_79",Er="_formSectionTitle_1pasa_85",Lr="_grid2_1pasa_95",Pr="_grid3_1pasa_107",Ar="_acknowledgment_1pasa_120",Rr="_ackText_1pasa_128",Sr="_dateText_1pasa_136",Ir="_signaturePad_1pasa_143",Or="_submitButton_1pasa_148",$r="_submitButtonOverride_1pasa_148",f={container:_r,header:yr,title:xr,subtitle:br,content:vr,documentWrapper:jr,document:wr,intro:Nr,paragraph:Cr,sectionTitle:kr,formSection:Tr,formSectionTitle:Er,grid2:Lr,grid3:Pr,acknowledgment:Ar,ackText:Rr,dateText:Sr,signaturePad:Ir,submitButton:Or,submitButtonOverride:$r},Br=({onComplete:s,className:t=""})=>{const n=er({defaultValues:{repFullName:"",repCompanyName:"",repAddress:"",repCity:"",repState:"",repZip:"",repEmail:"",repPhone:"",signature:""},schema:De}),{mutate:r,isPending:a}=Qa(),o=i=>{r(i,{onSuccess:()=>{we.success("Agreement signed successfully"),s()},onError:m=>{we.error(m instanceof Error?m.message:"Failed to sign agreement")}})},l=g.useMemo(()=>new Intl.DateTimeFormat("en-US",{dateStyle:"long"}).format(new Date),[]);return e.jsxs("div",{className:`${f.container} ${t}`,children:[e.jsxs("div",{className:f.header,children:[e.jsx("h1",{className:f.title,children:"INDEPENDENT AFFILIATE AGREEMENT"}),e.jsx("p",{className:f.subtitle,children:"with Non-Circumvention and Non-Disclosure Provisions"})]}),e.jsxs("div",{className:f.content,children:[e.jsx("div",{className:f.documentWrapper,children:e.jsxs("div",{className:f.document,children:[e.jsx("p",{className:f.intro,children:'This Independent Affiliate Agreement ("Agreement") is entered into as of the date signed below ("Effective Date"), by and between:'}),e.jsxs("p",{className:f.paragraph,children:[e.jsx("strong",{children:"Company:"}),' Redifund, a software and financial technology company ("Company")']}),e.jsxs("p",{className:f.paragraph,children:[e.jsx("strong",{children:"Representative:"}),' The individual or entity identified and signing below ("Representative" or "Rep")']}),e.jsx("p",{className:f.paragraph,children:'Collectively referred to as the "Parties."'}),e.jsx("h3",{className:f.sectionTitle,children:"1. APPOINTMENT AND SCOPE"}),e.jsx("p",{className:f.paragraph,children:"The Company hereby appoints the Representative as an independent affiliate to refer prospective clients and borrowers to the Company's financing programs. The Representative shall introduce potential clients to the Company's products and services, including but not limited to small-balance commercial loans, business financing, merchant cash advances, equipment financing, SBA loans, invoice factoring, and related financial products."}),e.jsx("h3",{className:f.sectionTitle,children:"2. COMPENSATION"}),e.jsx("p",{className:f.paragraph,children:"2.1 The Company shall pay the Representative a commission equal to forty percent (40%) of the net revenue received by the Company from each successfully funded transaction directly resulting from a referral by the Representative."}),e.jsx("p",{className:f.paragraph,children:"2.2 Commissions shall be paid within thirty (30) days of the Company receiving payment from the funding source."}),e.jsx("p",{className:f.paragraph,children:"2.3 The Representative is solely responsible for all taxes, fees, and obligations related to the compensation received."}),e.jsx("p",{className:f.paragraph,children:"2.4 No commission shall be due if a referred client's transaction does not close or fund, or if the client was previously known to the Company."}),e.jsx("h3",{className:f.sectionTitle,children:"3. INDEPENDENT CONTRACTOR STATUS"}),e.jsx("p",{className:f.paragraph,children:"3.1 The Representative is an independent contractor and not an employee, agent, or partner of the Company."}),e.jsx("p",{className:f.paragraph,children:"3.2 The Representative shall not have the authority to bind the Company in any manner or make any representations, warranties, or commitments on behalf of the Company."}),e.jsx("p",{className:f.paragraph,children:"3.3 The Representative is responsible for their own business expenses, insurance, and compliance with applicable laws and regulations."}),e.jsx("h3",{className:f.sectionTitle,children:"4. NON-CIRCUMVENTION"}),e.jsx("p",{className:f.paragraph,children:"4.1 The Representative agrees not to circumvent, avoid, bypass, or attempt to circumvent the Company in any transaction involving clients, contacts, or business opportunities introduced by either Party during the term of this Agreement."}),e.jsx("p",{className:f.paragraph,children:"4.2 The Representative shall not directly or indirectly contact, deal with, or otherwise become involved with any funding sources, lenders, investors, or financial institutions introduced by the C
8ompany, for the purpose of conducting business that would otherwise be conducted through the Company."}),e.jsx("p",{className:f.paragraph,children:"4.3 This non-circumvention obligation shall survive the termination of this Agreement for a period of twenty-four (24) months."}),e.jsx("p",{className:f.paragraph,children:"4.4 Any violation of this provision shall entitle the Company to seek injunctive relief and monetary damages, including but not limited to the full commission that would have been earned on the circumvented transaction."}),e.jsx("h3",{className:f.sectionTitle,children:"5. NON-DISCLOSURE AND CONFIDENTIALITY"}),e.jsx("p",{className:f.paragraph,children:'5.1 "Confidential Information" means all non-public information disclosed by either Party, including but not limited to: client lists, borrower information, funding sources, lender relationships, commission structures, business strategies, proprietary processes, technology, financial data, and any other information marked as confidential or that a reasonable person would understand to be confidential.'}),e.jsx("p",{className:f.paragraph,children:"5.2 The Representative agrees to hold all Confidential Information in strict confidence and not to disclose, publish, or otherwise disseminate such information to any third party without prior written consent of the Company."}),e.jsx("p",{className:f.paragraph,children:"5.3 The Representative shall use Confidential Information solely for the purpose of performing obligations under this Agreement."}),e.jsx("p",{className:f.paragraph,children:"5.4 This confidentiality obligation shall survive the termination of this Agreement indefinitely."}),e.jsx("p",{className:f.paragraph,children:"5.5 The obligations under this section do not apply to information that: (a) is or becomes publicly available through no fault of the receiving Party; (b) was known to the receiving Party prior to disclosure; (c) is independently developed without use of Confidential Information; or (d) is required to be disclosed by law or court order, provided reasonable notice is given."}),e.jsx("h3",{className:f.sectionTitle,children:"6. TERM AND TERMINATION"}),e.jsx("p",{className:f.paragraph,children:"6.1 This Agreement shall commence on the Effective Date and remain in effect for twelve (12) months, automatically renewing for successive twelve-month periods unless terminated by either Party with thirty (30) days written notice."}),e.jsx("p",{className:f.paragraph,children:"6.2 Either Party may terminate this Agreement immediately upon written notice if the other Party materially breaches any provision and fails to cure such breach within fifteen (15) days of receiving notice."}),e.jsx("p",{className:f.paragraph,children:"6.3 Upon termination, the Representative shall immediately cease representing themselves as affiliated with the Company and return or destroy all Confidential Information."}),e.jsx("p",{className:f.paragraph,children:"6.4 Commissions earned prior to termination on funded transactions shall remain payable per Section 2."}),e.jsx("h3",{className:f.sectionTitle,children:"7. REPRESENTATIONS AND WARRANTIES"}),e.jsx("p",{className:f.paragraph,children:"7.1 Each Party represents that they have the full right, power, and authority to enter into this Agreement."}),e.jsx("p",{className:f.paragraph,children:"7.2 The Representative represents that they will comply with all applicable federal, state, and local laws and regulations in the performance of their obligations."}),e.jsx("p",{className:f.paragraph,children:"7.3 The Representative acknowledges that the Company is not a financial lender but a software and technology platform company."}),e.jsx("h3",{className:f.sectionTitle,children:"8. INDEMNIFICATION"}),e.jsx("p",{className:f.paragraph,children:"The Representative shall indemnify, defend, and hold harmless the Company and its officers, directors, employees, and agents from any and all claims, damages, losses, costs, and expenses (including reasonable attorneys' fees) arising from the Representative's breach of this Agreement, negligence, or willful misconduct."}),e.jsx("h3",{className:f.sectionTitle,children:"9. LIMITATION OF LIABILITY"}),e.jsx("p",{className:f.paragraph,children:"In no event shall the Company be liable for any indirect, incidental, special, consequential, or punitive damages arising out of or relating to this Agreement, regardless of the theory of liability."}),e.jsx("h3",{className:f.sectionTitle,children:"10. GOVERNING LAW AND DISPUTE RESOLUTION"}),e.jsx("p",{className:f.paragraph,children:"10.1 This Agreement shall be governed by and construed in accordance with the laws of the State of Arizona, without regard to conflict of law principles."}),e.jsx("p",{className:f.paragraph,children:"10.2 Any disputes arising under this Agreement shall first be submitted to good-faith mediation. If mediation fails, disputes shall be resolved by binding arbitration in Phoenix, Arizona."}),e.jsx("h3",{className:f.sectionTitle,children:"11. MISCELLANEOUS"}),e.jsx("p",{className:f.paragraph,children:"11.1 This Agreement constitutes the entire agreement between the Parties and supersedes all prior discussions, agreements, and understandings."}),e.jsx("p",{className:f.paragraph,children:"11.2 This Agreement may not be amended except in writing signed by both Parties."}),e.jsx("p",{className:f.paragraph,children:"11.3 If any provision is found to be invalid or unenforceable, the remaining provisions shall continue in full force and effect."}),e.jsx("p",{className:f.paragraph,children:"11.4 The failure of either Party to enforce any provision shall not be construed as a waiver of such provision."})]})}),e.jsxs("div",{className:f.formSection,children:[e.jsx("h2",{className:f.formSectionTitle,children:"Representative Information"}),e.jsx(tr,{...n,children:e.jsxs("form",{onSubmit:n.handleSubmit(o),children:[e.jsxs("div",{className:f.grid2,children:[e.jsxs(F,{name:"repFullName",children:[e.jsx(W,{children:"Full Legal Name"}),e.jsx(M,{children:e.jsx(H,{value:n.values.repFullName,onChange:i=>n.setValues(m=>({...m,repFullName:i.target.value})),onBlur:()=>n.validateField("repFullName"),placeholder:"Enter your full legal name",disabled:a})}),e.jsx(q,{})]}),e.jsxs(F,{name:"repCompanyName",children:[e.jsx(W,{children:"Company/Business N
8ame (Optional)"}),e.jsx(M,{children:e.jsx(H,{value:n.values.repCompanyName,onChange:i=>n.setValues(m=>({...m,repCompanyName:i.target.value})),onBlur:()=>n.validateField("repCompanyName"),placeholder:"Enter company name",disabled:a})}),e.jsx(q,{})]})]}),e.jsxs(F,{name:"repAddress",children:[e.jsx(W,{children:"Street Address"}),e.jsx(M,{children:e.jsx(H,{value:n.values.repAddress,onChange:i=>n.setValues(m=>({...m,repAddress:i.target.value})),onBlur:()=>n.validateField("repAddress"),placeholder:"Enter street address",disabled:a})}),e.jsx(q,{})]}),e.jsxs("div",{className:f.grid3,children:[e.jsxs(F,{name:"repCity",children:[e.jsx(W,{children:"City"}),e.jsx(M,{children:e.jsx(H,{value:n.values.repCity,onChange:i=>n.setValues(m=>({...m,repCity:i.target.value})),onBlur:()=>n.validateField("repCity"),placeholder:"City",disabled:a})}),e.jsx(q,{})]}),e.jsxs(F,{name:"repState",children:[e.jsx(W,{children:"State"}),e.jsx(M,{children:e.jsx(H,{value:n.values.repState,onChange:i=>n.setValues(m=>({...m,repState:i.target.value})),onBlur:()=>n.validateField("repState"),placeholder:"State",disabled:a})}),e.jsx(q,{})]}),e.jsxs(F,{name:"repZip",children:[e.jsx(W,{children:"ZIP Code"}),e.jsx(M,{children:e.jsx(H,{value:n.values.repZip,onChange:i=>n.setValues(m=>({...m,repZip:i.target.value})),onBlur:()=>n.validateField("repZip"),placeholder:"ZIP Code",disabled:a})}),e.jsx(q,{})]})]}),e.jsxs("div",{className:f.grid2,children:[e.jsxs(F,{name:"repEmail",children:[e.jsx(W,{children:"Email Address"}),e.jsx(M,{children:e.jsx(H,{type:"email",value:n.values.repEmail,onChange:i=>n.setValues(m=>({...m,repEmail:i.target.value})),onBlur:()=>n.validateField("repEmail"),placeholder:"Email address",disabled:a})}),e.jsx(q,{})]}),e.jsxs(F,{name:"repPhone",children:[e.jsx(W,{children:"Phone Number"}),e.jsx(M,{children:e.jsx(H,{type:"tel",value:n.values.repPhone,onChange:i=>n.setValues(m=>({...m,repPhone:i.target.value})),onBlur:()=>n.validateField("repPhone"),placeholder:"Phone number",disabled:a})}),e.jsx(q,{})]})]}),e.jsxs("div",{className:f.acknowledgment,children:[e.jsx("p",{className:f.ackText,children:e.jsx("strong",{children:"By signing below, I acknowledge that I have read, understood, and agree to all terms and conditions of this Independent Affiliate Agreement, including the Non-Circumvention and Non-Disclosure provisions."})}),e.jsxs("p",{className:f.dateText,children:[e.jsx("strong",{children:"Date:"})," ",l]})]}),e.jsxs(F,{name:"signature",children:[e.jsx(M,{children:e.jsx(gr,{label:"Signature",value:n.values.signature,onChange:i=>{n.setValues(m=>({...m,signature:i||""})),setTimeout(()=>n.validateField("signature"),0)},required:!0,hasError:!!n.errors.signature,className:f.signaturePad})}),e.jsx(q,{})]}),e.jsx(G,{type:"submit",size:"lg",disabled:a,className:`${f.submitButton} ${f.submitButtonOverride}`,children:a?"Submitting...":"Sign & Accept Agreement"})]})})]})]})]})},Dr="_loadingContainer_pd6zt_2",Fr="_loadingText_pd6zt_11",Mr="_errorContainer_pd6zt_17",qr="_errorText_pd6zt_25",Vr="_gateContainer_pd6zt_34",Ur="_gateContent_pd6zt_42",zr="_noticeBox_pd6zt_50",Wr="_noticeTitle_pd6zt_58",Hr="_noticeText_pd6zt_65",z={loadingContainer:Dr,loadingText:Fr,errorContainer:Mr,errorText:qr,gateContainer:Vr,gateContent:Ur,noticeBox:zr,noticeTitle:Wr,noticeText:Hr},se=({children:s})=>{const{data:t,isPending:n,error:r}=Ha(),a=Z(),o=()=>{a.invalidateQueries({queryKey:ye})};return n?e.jsxs("div",{className:z.loadingContainer,children:[e.jsx(Be,{size:"lg"}),e.jsx("p",{className:z.loadingText,children:"Loading agreement status..."})]}):r?e.jsx("div",{className:z.errorContainer,children:e.jsx("p",{className:z.errorText,children:"Failed to load agreement status. Please refresh the page to try again."})}):t&&!t.signed?e.jsx("div",{className:z.gateContainer,children:e.jsxs("div",{className:z.gateContent,children:[e.jsxs("div",{className:z.noticeBox,children:[e.jsx("h2",{className:z.noticeTitle,children:"Action Required"}),e.jsx("p",{className:z.noticeText,children:"Please review and sign the Independent Affiliate Agreement below to access the Partner Portal."})]}),e.jsx(Br,{onComplete:o})]})}):e.jsx(e.Fragment,{children:s})},Qr=[ne,T,se],Gr=B({}),Kr=async(s={},t)=>{const n=Gr.parse(s),r=await fetch("/_api/_realtime/token",{method:"POST",body:P.stringify(n),...t,headers:{"Content-Type":"application/json"}});return P.parse(await r.text())},Yr=B({channel:A(),data:_t()}),Zr=async(s,t)=>{const n=Yr.parse(s),r=await fetch("/_api/_realtime/send",{method:"POST",body:P.stringify(n),...t,headers:{"Content-Type":"application/json"}});return P.parse(await r.text())},Jr=B({channel:A(),userIds:Ae(A())}),Xr=async(s,t)=>{const n=Jr.parse(s),r=await fetch("/_api/_realtime/lastseen",{method:"POST",body:P.stringify(n),...t,headers:{"Content-Type":"application/json"}});return P.parse(await r.text())};class eo{constructor(){$(this,"ws",null);$(this,"channels",new Map);$(this,"presenceChannels",new Map);$(this,"status","disconnected");$(this,"statusListeners",new Set);$(this,"reconnectListeners",new Set);$(this,"delay",500);$(this,"maxDelay",15e3);$(this,"idlePingAfterMs",480*1e3);$(this,"idleCheckMs",60*1e3);$(this,"lastActivity",Date.now());$(this,"closedByUser",!1);$(this,"hasConnectedOnce",!1);$(this,"heartbeatTimer",null);$(this,"reconnectTimer",null);$(this,"onVisibility",()=>{this.closedByUser||typeof document<"u"&&document.visibilityState!=="visible"||this.status!=="connecting"&&(this.ws&&this.ws.readyState===WebSocket.OPEN||(this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.delay=500,this.open()))})}async fetchToken(){const t=await Kr();if("error"in t)throw new Error(t.error);return{token:t.token,wssEndpoint:t.wssEndpoint}}async connect(){this.closedByUser=!1,typeof document<"u"&&document.addEventListener("visibilitychange",this.onVisibility),await this.open()}setStatus(t){this.status!==t&&(this.status=t,this.statusListeners.forEac
8h(n=>{try{n(t)}catch{}}))}async open(){if(this.closedByUser)return;if(this.ws){try{this.ws.onopen=null,this.ws.onmessage=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.close()}catch{}this.ws=null}this.setStatus("connecting");let t;try{t=await this.fetchToken()}catch{this.setStatus("disconnected"),this.scheduleReconnect();return}const n=t.wssEndpoint.indexOf("?")===-1?"?":"&",r=new WebSocket(t.wssEndpoint+n+"token="+encodeURIComponent(t.token));this.ws=r,r.onopen=()=>{this.delay=500,this.lastActivity=Date.now(),this.setStatus("connected");for(const a of this.activeChannels())this.sendRaw({action:"subscribe",channel:a});this.startHeartbeat(),this.hasConnectedOnce&&this.reconnectListeners.forEach(a=>{try{a()}catch{}}),this.hasConnectedOnce=!0},r.onmessage=a=>{this.lastActivity=Date.now();let o;try{o=JSON.parse(typeof a.data=="string"?a.data:"")}catch{return}if(!o||typeof o!="object")return;if(o.presence){const i=this.presenceChannels.get(o.channel);i&&i.forEach(m=>{try{m(o.presence)}catch{}});return}const l=this.channels.get(o.channel);l&&l.forEach(i=>{try{i(o.data)}catch{}})},r.onclose=()=>{this.stopHeartbeat(),this.closedByUser||(this.setStatus("disconnected"),this.scheduleReconnect())},r.onerror=()=>{try{r.close()}catch{}}}scheduleReconnect(){if(this.closedByUser)return;const t=Math.floor(this.delay*.3*Math.random()),n=Math.min(this.maxDelay,this.delay)+t;this.delay=Math.min(this.maxDelay,this.delay*2),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},n)}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{Date.now()-this.lastActivity>=this.idlePingAfterMs&&this.sendRaw({action:"ping"})},this.idleCheckMs)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}sendRaw(t){if(this.ws&&this.ws.readyState===WebSocket.OPEN)try{this.ws.send(JSON.stringify(t)),this.lastActivity=Date.now()}catch{}}isChannelActive(t){return this.channels.has(t)||this.presenceChannels.has(t)}activeChannels(){const t=new Set;for(const n of this.channels.keys())t.add(n);for(const n of this.presenceChannels.keys())t.add(n);return t}subscribeOn(t,n,r){const a=this.isChannelActive(n);let o=t.get(n);return o||(o=new Set,t.set(n,o)),o.add(r),a||this.sendRaw({action:"subscribe",channel:n}),()=>{const l=t.get(n);l&&(l.delete(r),l.size===0&&t.delete(n)),this.isChannelActive(n)||this.sendRaw({action:"unsubscribe",channel:n})}}subscribe(t,n){return this.subscribeOn(this.channels,t,n)}subscribePresence(t,n){return this.subscribeOn(this.presenceChannels,t,n)}async send(t,n){await Zr({channel:t,data:n})}async lastSeen(t,n){const r=await Xr({channel:t,userIds:n});return"lastSeen"in r?r.lastSeen:{}}onStatus(t){return this.statusListeners.add(t),()=>this.statusListeners.delete(t)}onReconnect(t){return this.reconnectListeners.add(t),()=>this.reconnectListeners.delete(t)}getStatus(){return this.status}close(){if(this.closedByUser=!0,this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),typeof document<"u"&&document.removeEventListener("visibilitychange",this.onVisibility),this.stopHeartbeat(),this.ws)try{this.ws.close()}catch{}}}const Ve=g.createContext(null),xe=({children:s})=>{const t=g.useRef(null);return t.current===null&&(t.current=new eo),g.useEffect(()=>{const n=t.current;return n.connect(),()=>n.close()},[]),e.jsx(Ve.Provider,{value:t.current,children:s})};function Ue(){const s=g.useContext(Ve);if(!s)throw new Error("useRealtimeClient must be used within <FlootRealtimeProvider>");return s}function ze(s,t){const n=Ue(),r=g.useRef(t);r.current=t,g.useEffect(()=>s?n.subscribe(s,o=>r.current(o)):void 0,[n,s])}function to(s){const t=Ue(),n=g.useRef(s);n.current=s,g.useEffect(()=>t.onReconnect(()=>n.current()),[t])}function Ii(s,t,n=250){const r=Z(),a=g.useRef(null);ze(s,()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(()=>{r.invalidateQueries({queryKey:t})},n)})}function no(s,t={}){const{minIntervalMs:n=1e4,jitterMs:r=3e3}=t,a=Z(),o=g.useRef(s);o.current=s;const l=g.useRef(0),i=g.useRef(null);to(()=>{const m=Date.now();m-l.current<n||(l.current=m,i.current&&clearTimeout(i.current),i.current=setTimeout(()=>{i.current=null;for(const c of o.current)a.invalidateQueries({queryKey:c})},Math.floor(Math.random()*r)))}),g.useEffect(()=>()=>{i.current&&clearTimeout(i.current)},[])}function Oi(s){const{queryKey:t,queryFn:n,channel:r,apply:a,reconcileOn:o,...l}=s,i=Z(),m=K({queryKey:t,queryFn:n,staleTime:1/0,refetchOnMount:"always",...l}),c=g.useRef(a);c.current=a;const _=g.useRef(o);_.current=o;const x=g.useRef(t);x.current=t;const p=g.useRef(null),y=()=>{p.current&&clearTimeout(p.current),p.current=setTimeout(()=>i.invalidateQueries({queryKey:x.current}),250)};return ze(r,b=>{if(c.current){const u=i.getQueryData(x.current);u===void 0?y():i.setQueryData(x.current,c.current(u,b))}(_.current?_.current(b):!c.current)&&y()}),g.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),no([t]),m}const so=[X,ee,xe],ao=[X,ee,xe],ro=[X,ee],oo=[T],io=[T],co=[ne,T,se],lo=[X,ee],uo=[T],mo=[T],po=[X,ee,xe],ho=[T],fo=[ne,T,se],go=[T],_o=[T],yo=[T],xo=[T],bo=[ne,T,se],vo=[T],jo=[T],wo=[ne,T,se],No=[T],C
8o=[T],ko=[T],To=[T],Eo=[T],Lo=[T],Po=[T],Ao=[T],Ro=[T],So=N(()=>w(()=>import("./faq-C_d1PWeH.js"),__vite__mapDeps([0,1,2,3,4,5,6]))),Io=N(()=>w(()=>import("./admin-D5uT17xr.js"),__vite__mapDeps([7,1,8,9,10,11,3,12,13,14,15,2,16]))),Oo=N(()=>w(()=>import("./apply-DBvUdUa3.js"),__vite__mapDeps([17,1,2,18,19,20,3,21,22,23,24,25,26,27,11,28,29,30,8,9,31,32]))),$o=N(()=>w(()=>import("./login-CjMuJN_x.js"),__vite__mapDeps([33,1,10,11,3,12,34,35,2,36]))),Bo=N(()=>w(()=>import("./_index-DttR8M2I.js"),__vite__mapDeps([37,1,2,5,38]))),Do=N(()=>w(()=>import("./portal-DGrp9h4C.js"),__vite__mapDeps([39,1,40,14,15,29,30,20,3,21,22,41,42,2,43]))),Fo=N(()=>w(()=>import("./contact-DI0zemwH.js"),__vite__mapDeps([44,1,2,45,46,5,47]))),Mo=N(()=>w(()=>import("./partner-C5idTYxB.js"),__vite__mapDeps([48,1,2,49,50]))),qo=N(()=>w(()=>import("./admin.chat-DKF1NDMz.js"),__vite__mapDeps([51,1,2,14,15,45,46,52,53]))),Vo=N(()=>w(()=>import("./admin.email-CXdZDmFZ.js"),__vite__mapDeps([54,1,2,52,14,15,10,11,3,12,45,46,41,21,42,55]))),Uo=N(()=>w(()=>import("./admin.staff-D1WXQr6N.js"),__vite__mapDeps([56,1,14,15,41,21,42,2,57]))),zo=N(()=>w(()=>import("./why-redifund-BpQqlji_.js"),__vite__mapDeps([58,1,2,5,59]))),Wo=N(()=>w(()=>import("./partner-login-07fGEPH4.js"),__vite__mapDeps([60,1,34,35,10,11,3,12,2,61]))),Ho=N(()=>w(()=>import("./partner.leads-BgDOfmad.js"),__vite__mapDeps([62,1,2,23,24,63,64,41,21,42,20,3,22,29,30,45,46,65]))),Qo=N(()=>w(()=>import("./admin.partners-Csx0g29j.js"),__vite__mapDeps([66,1,64,14,15,41,21,42,2,49,67]))),Go=N(()=>w(()=>import("./p._partnerSlug-DKMdvq1o.js"),__vite__mapDeps([68,1,2,31,45,46,20,3,21,22,5,69]))),Ko=N(()=>w(()=>import("./privacy-policy-B5EOcQef.js"),__vite__mapDeps([70,1,2,71]))),Yo=N(()=>w(()=>import("./admin.marketing-BcZUlmDu.js"),__vite__mapDeps([72,1,2,10,11,3,12,41,21,42,20,22,45,46,23,24,52,14,15,73,4,74,63,75]))),Zo=N(()=>w(()=>import("./forgot-password-BM8_lmws.js"),__vite__mapDeps([76,1,2,77]))),Jo=N(()=>w(()=>import("./partner.training-B5s1t3iR.js"),__vite__mapDeps([78,1,14,15,18,19,2,79,9,80]))),Xo=N(()=>w(()=>import("./terms-of-service-DhIrOgNX.js"),__vite__mapDeps([81,1,2,71]))),ei=N(()=>w(()=>import("./business-financing-CjDhlJ1l.js"),__vite__mapDeps([82,1,2,5,83]))),ti=N(()=>w(()=>import("./reset-password._token-yR2llbSm.js"),__vite__mapDeps([84,1,2,85]))),ni=N(()=>w(()=>import("./commercial-real-estate-B_W8n3Na.js"),__vite__mapDeps([86,1,2,5,87]))),si=N(()=>w(()=>import("./partner.broker-resources-rGRNK7YS.js"),__vite__mapDeps([88,1,9,2,89]))),ai=N(()=>w(()=>import("./apply.commercial-real-estate-C-g-m_4l.js"),__vite__mapDeps([90,1,2,18,19,20,3,21,22,27,11,28,23,24,45,46,25,26,29,30,73,4,74,40,13,9,31,91]))),ri=N(()=>w(()=>import("./business-financing.sba-loans-Do5y91tD.js"),__vite__mapDeps([92,1,93,2,5,94,95]))),oi=N(()=>w(()=>import("./partner.training._moduleSlug-Jl9a1z4H.js"),__vite__mapDeps([96,1,14,15,2,79,18,19,27,11,3,28,97]))),ii=N(()=>w(()=>import("./commercial-real-estate.dscr-loans-BuJan3DX.js"),__vite__mapDeps([98,1,2,5,99]))),ci=N(()=>w(()=>import("./commercial-real-estate.properties-Bvq1zE91.js"),__vite__mapDeps([100,1,2,101]))),li=N(()=>w(()=>import("./business-financing.invoice-factoring-BZoWY9_G.js"),__vite__mapDeps([102,1,93,2,5,94,95]))),di=N(()=>w(()=>import("./business-financing.equipment-financing-DnoGdCqt.js"),__vite__mapDeps([103,1,93,2,5,94,95]))),ui=N(()=>w(()=>import("./business-financing.working-capital-loans-CuAxBD11.js"),__vite__mapDeps([104,1,93,2,5,94,95]))),mi=N(()=>w(()=>import("./business-financing.merchant-cash-advances-KeIab5jq.js"),__vite__mapDeps([105,1,93,2,5,94,95]))),pi=N(()=>w(()=>import("./business-financing.business-line-of-credit-DeMuWfkL.js"),__vite__mapDeps([106,1,93,2,5,94,95]))),hi=N(()=>w(()=>import("./commercial-real-estate.commercial-bridge-loans-DTaJh8sN.js"),__vite__mapDeps([107,1,2,5,108]))),fi=N(()=>w(()=>import("./commercial-real-estate.small-balance-commercial-loans-DNNXJbeH.js"),__vite__mapDeps([109,1,2,5,110])));window.requestIdleCallback||(window.requestIdleCallback=s=>{setTimeout(s,1)});const be=new Map([["./pages/faq.tsx","/faq"],["./pages/admin.tsx","/admin"],["./pages/apply.tsx","/apply"],["./pages/login.tsx","/login"],["./pages/_index.tsx","/"],["./pages/portal.tsx","/portal"],["./pages/contact.tsx","/contact"],["./pages/partner.tsx","/partner"],["./pages/admin.chat.tsx","/admin/chat"],["./pages/admin.email.t
8sx","/admin/email"],["./pages/admin.staff.tsx","/admin/staff"],["./pages/why-redifund.tsx","/why-redifund"],["./pages/partner-login.tsx","/partner-login"],["./pages/partner.leads.tsx","/partner/leads"],["./pages/admin.partners.tsx","/admin/partners"],["./pages/p.$partnerSlug.tsx","/p/:partnerSlug"],["./pages/privacy-policy.tsx","/privacy-policy"],["./pages/admin.marketing.tsx","/admin/marketing"],["./pages/forgot-password.tsx","/forgot-password"],["./pages/partner.training.tsx","/partner/training"],["./pages/terms-of-service.tsx","/terms-of-service"],["./pages/business-financing.tsx","/business-financing"],["./pages/reset-password.$token.tsx","/reset-password/:token"],["./pages/commercial-real-estate.tsx","/commercial-real-estate"],["./pages/partner.broker-resources.tsx","/partner/broker-resources"],["./pages/apply.commercial-real-estate.tsx","/apply/commercial-real-estate"],["./pages/business-financing.sba-loans.tsx","/business-financing/sba-loans"],["./pages/partner.training.$moduleSlug.tsx","/partner/training/:moduleSlug"],["./pages/commercial-real-estate.dscr-loans.tsx","/commercial-real-estate/dscr-loans"],["./pages/commercial-real-estate.properties.tsx","/commercial-real-estate/properties"],["./pages/business-financing.invoice-factoring.tsx","/business-financing/invoice-factoring"],["./pages/business-financing.equipment-financing.tsx","/business-financing/equipment-financing"],["./pages/business-financing.working-capital-loans.tsx","/business-financing/working-capital-loans"],["./pages/business-financing.merchant-cash-advances.tsx","/business-financing/merchant-cash-advances"],["./pages/business-financing.business-line-of-credit.tsx","/business-financing/business-line-of-credit"],["./pages/commercial-real-estate.commercial-bridge-loans.tsx","/commercial-real-estate/commercial-bridge-loans"],["./pages/commercial-real-estate.small-balance-commercial-loans.tsx","/commercial-real-estate/small-balance-commercial-loans"]]),ve=new Map([["./pages/faq.tsx",So],["./pages/admin.tsx",Io],["./pages/apply.tsx",Oo],["./pages/login.tsx",$o],["./pages/_index.tsx",Bo],["./pages/portal.tsx",Do],["./pages/contact.tsx",Fo],["./pages/partner.tsx",Mo],["./pages/admin.chat.tsx",qo],["./pages/admin.email.tsx",Vo],["./pages/admin.staff.tsx",Uo],["./pages/why-redifund.tsx",zo],["./pages/partner-login.tsx",Wo],["./pages/partner.leads.tsx",Ho],["./pages/admin.partners.tsx",Qo],["./pages/p.$partnerSlug.tsx",Go],["./pages/privacy-policy.tsx",Ko],["./pages/admin.marketing.tsx",Yo],["./pages/forgot-password.tsx",Zo],["./pages/partner.training.tsx",Jo],["./pages/terms-of-service.tsx",Xo],["./pages/business-financing.tsx",ei],["./pages/reset-password.$token.tsx",ti],["./pages/commercial-real-estate.tsx",ni],["./pages/partner.broker-resources.tsx",si],["./pages/apply.commercial-real-estate.tsx",ai],["./pages/business-financing.sba-loans.tsx",ri],["./pages/partner.training.$moduleSlug.tsx",oi],["./pages/commercial-real-estate.dscr-loans.tsx",ii],["./pages/commercial-real-estate.properties.tsx",ci],["./pages/business-financing.invoice-factoring.tsx",li],["./pages/business-financing.equipment-financing.tsx",di],["./pages/business-financing.working-capital-loans.tsx",ui],["./pages/business-financing.merchant-cash-advances.tsx",mi],["./pages/business-financing.business-line-of-credit.tsx",pi],["./pages/commercial-real-estate.commercial-bridge-loans.tsx",hi],["./pages/commercial-real-estate.small-balance-commercial-loans.tsx",fi]]);function N(s){let t=null;const n=S.lazy(s);function r(a){return t?e.jsx(t,{...a}):e.jsx(n,{...a})}return r.preload=()=>s().then(a=>{t=a.default}).catch(()=>{}),r}const gi=Array.from(be,([s,t])=>({path:t,filename:s}));function he(s){const t=yt(gi,s),n=t?.[t.length-1]?.route?.filename,r=n!==void 0?ve.get(n):void 0;return r?.preload?r.preload():Promise.resolve()}function _i(){for(const s of ve.values())s.preload?.()}const yi=15,xi=50,oe=new Set;let Te=0;function bi(){const s=navigator.connection;if(!s)return!0;if(s.saveData)return!1;const t=s.effectiveType;return!(typeof t=="string"&&t.includes("2g"))}function Ee(s){const t=s.getAttribute("href");if(!t)return null;let n;try{n=new URL(t,window.location.href)}catch{return null}return n.origin!==window.location.origin?null:n.pathname}function vi(){return g.useEffect(()=>{const s=t=>{const n=t.target,r=n&&n.closest?n.closest("a[href]"):null;if(!r)return;const a=Ee(r);a&&!oe.has(a)&&(oe.add(a),he(a))};return document.addEventListener("mouseover",s,{passive:!0}),document.addEventListener("touchstart",s,{passive:!0}),()=>{document.removeEventListener("mouseover",s),document.removeEventListener("touchstart",s)}},[]),g.useEffect(()=>{if(!bi())return;if(be.size<=yi){window.requestIdleCallback(()=>_i());return}const s=new IntersectionObserver(o=>{for(const l of o){if(!l.isIntersecting||(s.unobserve(l.target),Te>=xi))continue;const i=Ee(l.target);!i||oe.has(i)||(oe.add(i),Te++,window.requestIdleCallback(()=>void he(i)))}}),t=new WeakSet,n=()=>{document.querySelectorAll("a[href]").forEach(o=>
8{t.has(o)||(t.add(o),s.observe(o))})};n();let r=null;const a=new MutationObserver(()=>{r===null&&(r=window.setTimeout(()=>{r=null,n()},500))});return a.observe(document.body,{childList:!0,subtree:!0}),()=>{s.disconnect(),a.disconnect(),r!==null&&clearTimeout(r)}},[]),null}function ji(s){const t=ve.get(s);return e.jsx(g.Suspense,{fallback:null,children:e.jsx(t,{})})}function We({trie:s,fileNameToRoute:t,makePageRoute:n}){return[...s.topLevel.map(r=>e.jsx(me,{path:t.get(r),element:n(r)},t.get(r))),...Array.from(s.trie.entries()).map(([r,a],o)=>e.jsx(me,{element:e.jsx(r,{children:e.jsx(jt,{})}),children:We({trie:a,fileNameToRoute:t,makePageRoute:n})},o))]}function wi(s){const t={topLevel:[],trie:new Map};return Object.entries(s).forEach(([n,r])=>{let a=t;for(const o of r)a.trie.has(o)||a.trie.set(o,{topLevel:[],trie:new Map}),a=a.trie.get(o);a.topLevel.push(n)}),t}function Ni(){return e.jsxs("div",{children:[e.jsx("h1",{children:"Not Found"}),e.jsx("p",{children:"The page you are looking for does not exist."}),e.jsxs("p",{children:["Go back to the ",e.jsx("a",{href:"/",style:{color:"blue"},children:"home page"}),"."]})]})}function Ci(){const{pathname:s,search:t,hash:n}=te(),r=vt();return g.useEffect(()=>{r!=="POP"&&(n||window.scrollTo({top:0,left:0,behavior:"instant"}))},[s,t,n,r]),null}function ki(){return e.jsxs(xt,{future:{v7_startTransition:!1,v7_relativeSplatPath:!1},children:[e.jsx(Ci,{}),e.jsx(vi,{}),e.jsx(en,{children:e.jsx(g.Suspense,{fallback:null,children:e.jsxs(bt,{children:[We({trie:wi({"./pages/faq.tsx":Ys,"./pages/admin.tsx":Da,"./pages/apply.tsx":Fa,"./pages/login.tsx":Ma,"./pages/_index.tsx":qa,"./pages/portal.tsx":Va,"./pages/contact.tsx":Ua,"./pages/partner.tsx":Qr,"./pages/admin.chat.tsx":so,"./pages/admin.email.tsx":ao,"./pages/admin.staff.tsx":ro,"./pages/why-redifund.tsx":oo,"./pages/partner-login.tsx":io,"./pages/partner.leads.tsx":co,"./pages/admin.partners.tsx":lo,"./pages/p.$partnerSlug.tsx":uo,"./pages/privacy-policy.tsx":mo,"./pages/admin.marketing.tsx":po,"./pages/forgot-password.tsx":ho,"./pages/partner.training.tsx":fo,"./pages/terms-of-service.tsx":go,"./pages/business-financing.tsx":_o,"./pages/reset-password.$token.tsx":yo,"./pages/commercial-real-estate.tsx":xo,"./pages/partner.broker-resources.tsx":bo,"./pages/apply.commercial-real-estate.tsx":vo,"./pages/business-financing.sba-loans.tsx":jo,"./pages/partner.training.$moduleSlug.tsx":wo,"./pages/commercial-real-estate.dscr-loans.tsx":No,"./pages/commercial-real-estate.properties.tsx":Co,"./pages/business-financing.invoice-factoring.tsx":ko,"./pages/business-financing.equipment-financing.tsx":To,"./pages/business-financing.working-capital-loans.tsx":Eo,"./pages/business-financing.merchant-cash-advances.tsx":Lo,"./pages/business-financing.business-line-of-credit.tsx":Po,"./pages/commercial-real-estate.commercial-bridge-loans.tsx":Ao,"./pages/commercial-real-estate.small-balance-commercial-loans.tsx":Ro}),fileNameToRoute:be,makePageRoute:ji}),e.jsx(me,{path:"*",element:e.jsx(Ni,{})})]})})})]})}if(window.location.protocol==="capacitor:"||window.location.hostname==="localhost"){let s=function(c){return typeof c=="string"&&c.startsWith("/_cdn/")?"https://redifund.floot.app"+c:c},t=function(c){return typeof c!="string"||!c.includes("/_cdn/")?c:c.split(",").map(function(_){const x=_.trim();if(!x)return _;const p=x.split(/\s+/);return p[0]=s(p[0]),p.join(" ")}).join(", ")},n=function(c){if(!c||c.nodeType!==1)return;for(const x of["src","href","poster"]){const p=c.getAttribute&&c.getAttribute(x);p&&p.startsWith("/_cdn/")&&c.setAttribute(x,s(p))}const _=c.getAttribute&&c.getAttribute("srcset");if(_&&_.includes("/_cdn/")){const x=t(_);x!==_&&c.setAttribute("srcset",x)}},r=function(c){!c||!c.querySelectorAll||(n(c),c.querySelectorAll(o).forEach(n))};const a=window.fetch;window.fetch=async function(c,_){if(typeof c=="string"&&c.startsWith("/_cdn/"))return a("https://redifund.floot.app"+c,_);if(typeof c=="string"&&c.includes("/_api/")){let x;if(c.startsWith("/"))x="https://redifund.floot.app"+c;else try{const k=new URL(c);k.hostname==="localhost"&&(k.protocol==="http:"||k.protocol==="https:")?x="https://redifund.floot.app"+k.pathname+k.search+k.hash:x=c}catch{x=c}const{CapacitorHttp:p}=await w(async()=>{const{CapacitorHttp:k}=await import("./index-YACNi6Jt.js");return{CapacitorHttp:k}},__vite__mapDeps([111,1])),y=_??{},b=(y.method||"GET").toUpperCase(),C={};
8y.headers&&new Headers(y.headers).forEach(function(k,I){C[I]=k});let u;if(b!=="GET"&&b!=="HEAD"&&y.body!=null){const k=y.body;if(typeof k=="string")u=k;else if(k instanceof URLSearchParams)u=k.toString(),C["content-type"]=C["content-type"]??"application/x-www-form-urlencoded;charset=UTF-8";else if(k instanceof FormData||k instanceof Blob)u=k;else if(k instanceof ArrayBuffer)u=k;else if(ArrayBuffer.isView(k))u=k.buffer;else return a(c,_)}const v=await p.request({url:x,method:b,headers:C,data:u,responseType:"text"}),L=new Headers;if(v.headers&&typeof v.headers=="object")for(const[k,I]of Object.entries(v.headers))I!=null&&L.set(k,Array.isArray(I)?I.join(","):String(I));const O=v.data==null?"":typeof v.data=="string"?v.data:JSON.stringify(v.data);return new Response(O,{status:v.status,headers:L})}return a(c,_)};const o='[src^="/_cdn/"], [href^="/_cdn/"], [poster^="/_cdn/"], [srcset]';new MutationObserver(function(c){for(const _ of c)_.type==="attributes"?n(_.target):_.addedNodes.forEach(function(x){r(x)})}).observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["src","href","poster","srcset"]}),r(document);const i=window.HTMLImageElement&&window.HTMLImageElement.prototype;if(i)for(const c of["src","srcset"]){const _=Object.getOwnPropertyDescriptor(i,c);_&&_.set&&_.configurable&&Object.defineProperty(i,c,{..._,set:function(x){_.set.call(this,c==="srcset"?t(x):s(x))}})}let m=null;window.open=async function(c,_,x){const{Browser:p}=await w(async()=>{const{Browser:C}=await import("./index-BwcfkH7w.js");return{Browser:C}},__vite__mapDeps([112,111,1]));if(!m){let C=function(L){const O="=".repeat((4-L.length%4)%4),k=(L+O).replace(/-/g,"+").replace(/_/g,"/");return decodeURIComponent(escape(atob(k)))};const{App:u}=await w(async()=>{const{App:L}=await import("./index-yVVF-3vQ.js");return{App:L}},__vite__mapDeps([113,111,1]));m=await u.getInfo();const v=m.id+":";u.addListener("appUrlOpen",({url:L})=>{const O=new URL(L);if(O.protocol!==v||O.hostname!=="bridge")return;const k=O.searchParams.get("payload");if(!k)return;const I=JSON.parse(C(k));window.dispatchEvent(new MessageEvent("message",{data:I,origin:window.location.origin}))})}typeof c=="string"&&c.startsWith("/_api/")&&(c="https://redifund.floot.app"+c),p.open({url:c});let y=!1;return p.addListener("browserFinished",()=>{y=!0}),{get closed(){return y},async close(){y||(y=!0,await p.close())}}}}window.requestIdleCallback||(window.requestIdleCallback=s=>{setTimeout(s,1)});window.cancelIdleCallback||(window.cancelIdleCallback=s=>{clearTimeout(s)});(function(){const t=window.__FLOOT_CSS_ORDER__;if(!t||t.length===0)return;const n=new Map(t.map((o,l)=>[o,l])),r=o=>{const l=o.getAttribute("href");if(l)try{return n.get(new URL(l,window.location.href).pathname)}catch{return}},a=()=>{const o=[];for(const l of document.head.querySelectorAll('link[rel="stylesheet"]')){const i=r(l);i!==void 0&&o.push({el:l,idx:i})}o.sort((l,i)=>l.idx-i.idx);for(let l=1;l<o.length;l++){const i=o[l-1].el,m=o[l].el;i.compareDocumentPosition(m)&Node.DOCUMENT_POSITION_PRECEDING&&i.after(m)}};a(),new MutationObserver(o=>{for(const l of o)for(const i of l.addedNodes)if(i instanceof HTMLLinkElement&&i.rel==="stylesheet"){a();return}}).observe(document.head,{childList:!0})})();window.addEventListener("vite:preloadError",s=>{const t="__floot_chunk_reload_at",n=Number(sessionStorage.getItem(t)||0);Date.now()-n<3e4||(sessionStorage.setItem(t,String(Date.now())),s.preventDefault(),window.location.reload())});const Ti=document.getElementById("root");he(window.location.pathname).then(()=>{wt.createRoot(Ti).render(e.jsx(Nt,{children:e.jsx(ki,{})}))});export{G as B,tr as F,H as I,Be as S,Pi as T,w as _,D as a,F as b,W as c,M as d,q as e,nr as f,gr as g,ge as h,Si as i,Ii as j,Oi as k,Ai as l,Dt as m,us as n,Ri as o,ds as p,ir as q,rs as s,er as u};
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.