1"use strict";(self.webpackChunkhost=self.webpackChunkhost||[]).push([[4839],{84839:(e,t,n)=>{n.r(t),n.d(t,{AccountType:()=>d,AppLayout:()=>G,ROUTER_BASENAME:()=>y,useAppLayoutContext:()=>N});var a=n(11871),s=n(76386),o=n(99296);const r={minHeight:"100vh",display:"flex",flexDirection:"column"},i={flex:1,position:"relative"};var u=n(31838),c=n(13569),l=n(77285);let d=function(e){return e.LOAN_ACCOUNT="LOAN_ACCOUNT",e.SAVINGS_ACCOUNT="SAVINGS_ACCOUNT",e.REWARDS_ACCOUNT="REWARDS_ACCOUNT",e}({});const A=(0,l.createContext)(void 0),N=()=>{const e=(0,l.useContext)(A);if(void 0===e)throw new Error("useAppLayoutContext must be within AppLayoutContext Provider");return e};var E=n(83e3),T=n(52322);const C=({accountId:e,children:t})=>{const n=(0,s.useNavigate)(),{isLoading:a,data:r,isError:i}=(0,E.useSavingsAccountQuery)(e),{isLoading:u,isError:d}=(0,c.useUserProfileQuery)(),A=a||u,N=i||d,C=null==r?void 0:r.productName,I=null==r?void 0:r.name;return(0,T.jsx)(o.SecondaryHeader,{loading:A||N,onBackButtonClick:()=>{n("/accounts")},productName:C,businessName:I,children:t?(0,l.cloneElement)(t,{isLoading:A}):null})};var I=n(48970),_=n(76543),O=n(13849);const p=({accountName:e,children:t})=>{const{data:n,isLoading:a,isError:r}=(0,I.useGetAccount)(),i=(0,s.useNavigate)(),{isFeatureOn:u}=(0,O.useFeatureFlags)(),c=u(_.FeaturedFlags.olbv2_onboarding)?null==n?void 0:n.displayName:"Business Rewards Account";return(0,T.jsx)(o.SecondaryHeader,{loading:a||r,onBackButtonClick:()=>{i("/accounts")},productName:c,businessName:e,children:(0,l.isValidElement)(t)&&(0,l.cloneElement)(t,{isLoading:a})})};var h=n(80264);const g=({accountId:e})=>{const t=(0,s.useNavigate)(),{isLoading:n,data:a,isError:r}=(0,h.useLoanAccountQuery)(e),{isLoading:i,isError:u}=(0,c.useUserProfileQuery)(),l=n||i,d=r||u,A=null==a?void 0:a.productName,N=null==a?void 0:a.name;return(0,T.jsx)(o.SecondaryHeader,{loading:l||d,onBackButtonClick:()=>{t("/accounts")},productName:A,businessName:N})},S=/(deposits\/.+\/withdrawals\/?)(\/*.*)/,x=/^\/bca\/[0-9a-fA-F-]{36}\/[0-9a-fA-F-]{36}\/cards(?:\/.*)?$/gi,L=/^\/bca\/[0-9a-fA-F-]{36}\/[0-9a-fA-F-]{36}\/transactions(?:\/[0-9a-fA-F-]{36})?$/gi,v=/^\/bca\/[0-9a-fA-F-]{36}\/[0-9a-fA-F-]{36}\/savings(?:\/.*)?$/gi,R=e=>(0,l.useMemo)((()=>{let t=0;const[,n=""]=e.split("/");return"bca"===n?((e="")=>{let t=0;return e.match(x)&&(t=2),e.match(v)&&(t=4),e.match(L)&&(t=-1),t})(e):(t=S.test(e)?1:0,t)}),[e]),m=({isLoading:e})=>{const{pathname:t}=(0,s.useLocation)(),n=(0,s.useParams)(),r=(0,s.useNavigate)(),{mobileSubNavLinks:i}=(0,o.useHeaderContext)(),u=R(t);return e?null:(0,T.jsx)(a.Tabs,{index:u,variant:"unstyled",onChange:e=>{const t=i[e];null!=t&&t.isExternal?window.location.href=t.path:r((0,s.generatePath)(t.path,n))},children:(0,T.jsx)(a.TabList,{children:i.map((e=>(0,T.jsx)(a.Tab,{color:"$fg.secondary",_selected:{backgroundColor:"arieroyalblue.100",borderRadius:"4px",padding:"4px 12px"},children:e.text},e.text)))})})};var b=n(18578);const D=({accountId:e,accountType:t,productType:n,accountName:s})=>{const o=(0,a.useBreakpointValue)({base:!1,md:!0},{ssr:!1}),r=n&&[b.BZ.DEPOSIT_NOTICE,b.BZ.DEPOSIT_INSTANT_ACCESS,b.BZ.DEPOSIT_SAFEGUARDING].includes(n);return t===d.SAVINGS_ACCOUNT?(0,T.jsx)(C,{accountId:e,children:o&&r?(0,T.jsx)(m,{}):null}):t===d.REWARDS_ACCOUNT?(0,T.jsx)(p,{accountName:null!=s?s:"",children:o?(0,T.jsx)(m,{}):null}):(0,T.jsx)(g,{accountId:e})},y="/online-banking";var P=n(91516);const f=/\/deposits\/*.*/,U=e=>{const{rewardsBaseUrl:t}=(0,P.useConfigurationContext)(),n=(0,s.useLocation)(),{walletId:o=""}=(0,s.useParams)(),r=(0,a.useBreakpointValue)({base:!0,md:!1},{ssr:!1}),{isFeatureOn:i}=(0,O.useFeatureFlags)(),u=(e,n,a,o)=>{const r=n?y:"";if(f.test(e)&&a)return[{text:"Transactions",path:(0,s.generatePath)(r+"/deposits/:accountId",{accountId:a}),hasSubRoutes:!0},{text:"Withdrawals",path:(0,s.generatePath)(r+"/deposits/:accountId/withdrawals",{accountId:a}),hasSubRoutes:!0}];const i=((e,n)=>a=>`${t}/${e}/${n}/${a}`)(a||"",o||"");return[{text:"Dashboard",path:(0,s.generatePath)(r+"/bca/dashboard/:accountId/:walletId",{accountId:a,walletId:o})},{text:"Payments",path:i("payments"),isExternal:!0},{text:"Manage account",path:i("manage-account"),isExternal:!0}]};return{subNavLinks:(0,l.useMemo)((()=>u(n.pathname,r,e,o)),[e,n.pathname,r,o,i])}},j=()=>{const e=(0,s.useNavigate)(),{data:t,isLoading:n}=(0,c.useUserProfileQuery)(),{data:a}=(0,c.useGetBusinessesInfiniteQuery)({pageSize:0}),{logout:r}=(0,u.useAuthContext)(),i=(()=>{const e="http://online.ariefinance.com";return e})(),{accountId:l,accountType:d,productType:A,accountName:E}=N(),{subNavLinks:C}=U(l),I=Boolean(a&&a.pages[0].records.totalRecords>0);return(0,T.jsx)(o.HeaderProvider,{isLoading:n,customerEmail:null==t?void 0:t.email,customerId:null==t?void 0:t.username,hasBusinesses:I,rootUrl:i,mobileSubNavLinks:C,logout:r,onAccountsLinkClick:()=>{e("/accounts")},onHelpLinkClick:()=>{e("/help")},onSettingsLinkClick:()=>{e("/settings")},onTodosLinkClick:()=>{e("/todo")},onProductsLinkClick:()=>{e("/onboarding/multi-business/multi-account")},children:(0,T.jsx)(o.Header,{productType:A,accountType:d,children:l&&d&&(0,T.jsx)(D,{accountId:l,accountType:d,productType:A,accountName:E})})})};var w=n(73659),k=n(17498),F=n(61295);var B=n(22755);const G=()=>{const{isLoggingOut:e}=(0,u.useAuthContext)(),{isFeatureOn:t}=(0,O.useFeatureFlags)(),n=t(_.FeaturedFlags.olbv2_cookiebot),d=t(_.FeaturedFlags.olbv2_customer_survey_rating_drawer),{data:N,error:E,isError:C,isLoading:I,refetch:p}=(0,c.useUserProfileQuery)(),{data:h}=(0,c.useUserMessagesQuery)(d),g=null==h?void 0:h.find((e=>e.type===b.Cs.SURVEY_INVITE_MODAL)),[S,x]=(0,l.useState)(""),[L,v]=(0,l.useState)(void 0),[R,m]=(0,l.useState)(),D=!!N,[y,P]=(0,l.useState)("");(0,l.useEffect)((()=>{var e,t;if(D){var a;if((0,u.setUserDataCookies)(N),null!=(e=window)&&e.heap&&(null==(t=window)||null==(t=t.heap)?void 0:t.identity)!==(null==N?void 0:N.id))window.heap&&(null==(a=window.heap)||a.identify(null==N?void 0:N.id));n&&(()=>{var e;if(null!=(e=window)&&e.Cookiebot)return;const t=document.createElement("script");t.type="text/javascript",t.src="https://consent.cookiebot.com/uc.js",t.setAttribute("async","true"),t.setAttribute("data-cbid","02693e01-b4dd-48b1-9670-5c804a386b7b"),document.head.appendChild(t)})()}}),[D]),(0,l.useEffect)((()=>{const e=()=>{var e;D&&(null==(e=window)||null==(e=e.heap)||e.identify(null==N?void 0:N.id))};return window.addEventListener("heapload",e),()=>{window.removeEventListener("heapload",e)}}),[D,null==N?void 0:N.id]);const f=(0,l.useRef)(null);return(0,T.jsx)(A.Provider,{value:{accountType:L,setAccountType:v,accountName:y,setAccountName:P,accountId:S,setAccountId:x,productType:R,setProductType:m,portalRef:f},children:(0,T.jsxs)("div",{children:[(0,T.jsxs)(a.Box,Object.assign({},r,{children:[(0,T.jsx)(j,{}),(0,T.jsx)(a.Box,Object.assign({ref:f},i,{children:(0,T.jsx)(o.ErrorBoundary,{fallback:(0,T.jsx)(o.PageError,{}
1),children:(0,T.jsxs)(F.WithViewOnlyPermissionModalContext,{renderModal:e=>(0,T.jsx)(k.ViewOnlyPermissionModal,Object.assign({},e)),children:[I?(0,T.jsx)(o.PageLoading,{}):C?400===(null==E||null==(U=E.response)?void 0:U.status)&&"NOT_A_CUSTOMER"===(null==E||null==(w=E.response)||null==(w=w.data)?void 0:w.code)?((0,u.redirectToOnboarding)(),null):"PLATFORM_UNAVAILABLE"===(null==E||null==(G=E.response)||null==(G=G.data)?void 0:G.code)?(0,T.jsx)(o.PageError,{children:(0,T.jsx)(M,{})}):(0,T.jsx)(o.PageError,{children:(0,T.jsx)(o.GenericError,{onRetry:p})}):e?(0,T.jsx)(o.PageLoading,{spinnerText:"Logging out..."}):(0,T.jsx)(s.Outlet,{}),(null==g?void 0:g.id)&&(0,T.jsx)(B.CustomerSurveyRatingDrawer,{surveyId:g.id})]})})}))]})),(0,T.jsx)(o.Footer,{})]})});var U,w,G},M=()=>(0,T.jsxs)(o.ErrorContentMessage,{title:"We'll be back shortly",children:[(0,T.jsx)(w.ContentMessageDescription,{children:"We're currently undertaking a short period of systems maintenance and will be back online soon."}),(0,T.jsxs)(w.ContentMessageDescription,{children:["If you have an urgent query, please"," ",(0,T.jsx)(w.Link,{isExternal:!0,target:"_blank",href:"https://www.allica.bank/contact",children:"contact us."})]})]})},18578:(e,t,n)=>{n.d(t,{Cs:()=>s,BZ:()=>a});let a=function(e){return e.DEPOSIT_FIXED_TERM="DEPOSIT_FIXED_TERM",e.DEPOSIT_NOTICE="DEPOSIT_NOTICE",e.DEPOSIT_INSTANT_ACCESS="DEPOSIT_INSTANT_ACCESS",e.DEPOSIT_SAFEGUARDING="DEPOSIT_SAFEGUARDING",e.REWARDS_ACCOUNT="REWARDS_ACCOUNT",e.PENSION_ACCOUNT="PENSION_ACCOUNT",e.DEPOSIT_HOLDING_ACCOUNT="DEPOSIT_HOLDING_ACCOUNT",e.COMMERCIAL_MORTGAGE="COMMERCIAL_MORTGAGE",e.CLIENT_MONEY_ACCOUNT="CLIENT_MONEY_ACCOUNT",e}({}),s=function(e){return e.BCA_APPLICATION_INVITE="BCA_APPLICATION_INVITE",e.DEPOSIT_APPLICATION_STARTED="DEPOSIT_APPLICATION_STARTED",e.SURVEY_INVITE_MODAL="SURVEY_INVITE_MODAL",e.SURVEY_INVITE_BANNER="SURVEY_INVITE_BANNER",e.ERROR_LOADING_DEPOSIT_ACCOUNTS="ERROR_LOADING_DEPOSIT_ACCOUNTS",e.ERROR_LOADING_LENDING_ACCOUNTS="ERROR_LOADING_LENDING_ACCOUNTS",e.ACCOUNT_DETAILS_CHANGED="ACCOUNT_DETAILS_CHANGED",e.HOLDING_ACCOUNT="HOLDING_ACCOUNT",e.BRA_ADVERTISING_BANNER="BRA_ADVERTISING_BANNER",e.OVERDRAFT_WAITLIST="OVERDRAFT_WAITLIST",e}({})}}]);
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.