PageSourceSearch

https://portal.commoninterest.com/assets/instant-payment-CGP8Ln1C.js

js commoninterest.com collected 2026-09-24 13:28:03 UTC 2,595 bytes, 1 lines download raw bytes

1import{u as N,r as I,j as e,S,T as x,B as w}from"./elements-DVh2jUIM.js";import{A as E}from"./authorization-CE7gncHO.js";import{u as L}from"./usePaymentProviders-un4zwaLi.js";import{A as T,x as C,j as B}from"./index-DeQvL4I7.js";import"./useAuthorization-D7B2eQha.js";import"./grids-DXrfAsUA.js";import"./startOfDay-AazlW55I.js";const y="none",F={title:"Instant Payment",showPropertySelector:!1};function H(){const{t:s}=N(),[o]=T(),u=C(),a=V(o),i=B(d=>d.accounts),c=typeof a.subLedgerId=="number"&&typeof a.accountNumber=="string"&&typeof a.associationId=="number",n=c?i==null?void 0:i.find(d=>d.accountNumber===a.accountNumber&&d.subLedgerId===a.subLedgerId):void 0,{paymentProviders:t,paymentsEnabled:l,isLoading:m,isVantacaPayProvider:v,navigateToInternalPaymentProvider:h,navigateToExternalPaymentProvider:b}=L(n),r=!m&&c?t.find(d=>d.associationId===a.associationId):void 0,f=(r==null?void 0:r.name)??"External Provider",p=v(r)&&y!=="external-provider",P=m||!r||p,j=()=>{r&&b(r).catch(console.error)};return I.useEffect(()=>{if(!m){if(!c||!l){u("/dashboard");return}r&&p&&y!=="internal-provider"&&(o.set("instantPay","true"),h(o))}},[m]),e.jsx(E,{controller:"Homeowner_v2",action:"Billing",children:e.jsxs("div",{children:[P&&e.jsxs(g,{children:[e.jsx("label",{className:"text-lg text-center",children:s("billing.instantPayment.loadingPaymentInfo")}),e.jsx(S,{})]}),!P&&e.jsxs(g,{children:[e.jsx("label",{className:"text-lg text-center",children:e.jsx(x,{i18nKey:"billing.instantPayment.continueToPaymentProviderMessage",components:{AccountName:e.jsx("b",{children:n==null?void 0:n.accountWithSubCode}),ProviderName:e.jsx("b",{children:f})}})}),e.jsx(w,{"data-qa":"openProviderModalButton","data-qa-value":JSON.stringify({account:n==null?void 0:n.accountWithSubCode}),disabled:m,className:"w-full h-10 rounded-md text-sm",onClick:()=>j(),children:e.jsx(x,{i18nKey:"billing.instantPayment.continueToPaymentProvider",values:{providerName:f}})})]})]})})}function g({children:s}){return e.jsx("div",{className:"flex items-center justify-center w-full h-80",children:e.jsx("div",{className:"flex flex-col items-center justify-center space-y-10 px-10",children:s})})}function V(s){var i,c;const o={},u=["userId","ownerId","homeownerId","subLedgerId","associationId"],a=["accountNumber"];for(const n of u){const t=((i=s.get(n))==null?void 0:i.trim())??void 0;if(typeof t=="string"&&t.length>0){const l=parseInt(t);Number.isNaN(l)||(o[n]=l)}}for(const n of a){const t=((c=s.get(n))==null?void 0:c.trim())??void 0;typeof t=="string"&&t.length>0&&(o[n]=t)}return o}export{H as Component,F as handle};

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.