PageSourceSearch

https://online.ariefinance.com/online-banking/8990.2d5bf87be25f1d9e.js

js ariefinance.com collected 2026-10-08 01:30:56 UTC 7,201 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkhost=self.webpackChunkhost||[]).push([[8990],{58990:(t,e,n)=>{n.r(e),n.d(e,{MultiFactorAuthenticationProvider:()=>A,useMultiFactorAuthentication:()=>I});var o=n(77285);const i={multiFactorAuthenticationAuthStatus:null,setMultiFactorAuthenticationAuthStatus:void 0,isCancelled:!1,setIsCancelled:void 0,authenticationExpiresAt:null,setAuthenicationExpiresAt:void 0},r=(0,o.createContext)(i);var s=n(11871),l=n(73659),a=n(52322);const u=t=>(0,a.jsx)(l.Text,Object.assign({textStyle:"body-02-regular",color:"$text01"},t)),c=({isOpen:t,onClose:e,headingText:n,IconComponent:o,iconColor:i,mainContent:r,primaryButtonText:u,onPrimaryButtonClick:c})=>(0,a.jsxs)(l.Modal,{isOpen:t,onClose:e,size:"5xl",isCentered:!0,children:[(0,a.jsx)(s.ModalOverlay,{}),(0,a.jsxs)(l.ModalContent,{children:[(0,a.jsx)(l.ModalHeader,{children:(0,a.jsx)(l.ModalCloseButton,{})}),(0,a.jsxs)(l.ModalBody,{children:[(0,a.jsx)(o,{color:i,w:"48px",h:"48px",mb:"16px"}),(0,a.jsx)(l.Heading,{size:"h1",as:"h2",color:"$fg.primary",mb:"24px",children:n}),r]}),(0,a.jsx)(l.ModalFooter,{children:(0,a.jsx)(s.Flex,{flexDir:"row",children:(0,a.jsx)(l.Button,{onClick:c,ml:"auto",children:u})})})]})]}),d=t=>(0,a.jsx)(l.Text,Object.assign({color:"$bg.button.primary.base",textStyle:"body-02-regular"},t)),h=({isOpen:t,onClose:e,onPrimaryButtonClick:n,duration:o})=>(0,a.jsx)(c,{isOpen:t,onClose:e,IconComponent:l.SecurityIcon,iconColor:"denim.500",headingText:"Two-factor authentication",primaryButtonText:"Cancel",onPrimaryButtonClick:n,mainContent:(0,a.jsxs)(s.Box,{children:[(0,a.jsx)(u,{mb:"16px",children:"Use the Allica mobile app to approve your request."}),(0,a.jsx)(u,{mb:"16px",children:"If you're using a new device, you'll need to install and register the Allica app to continue."}),o.length>0&&(0,a.jsxs)(d,{mb:"16px",children:[(0,a.jsx)(l.StopClockIcon,{"data-testid":"stop-clock-icon",color:"$bg.button.primary.base",w:"24px",h:"24px",mb:"3px",mr:"8px"}),o]})]})});let p=function(t){return t.AUTH_REQUESTED="AUTH_REQUESTED",t.NO_DEVICES_REGISTERED="NO_DEVICES_REGISTERED",t.AUTH_DENIED="AUTH_DENIED",t.AUTH_EXPIRED="AUTH_EXPIRED",t.USER_ID_UNKNOWN_TO_SCA_SERVER="USER_ID_UNKNOWN_TO_SCA_SERVER",t}({});const x=({isOpen:t,onClose:e,onPrimaryButtonClick:n})=>(0,a.jsx)(c,{isOpen:t,onClose:e,IconComponent:l.NoDeviceIcon,iconColor:"$fg.system.error_default",headingText:"No registered device found",primaryButtonText:"Ok",onPrimaryButtonClick:n,mainContent:(0,a.jsxs)(s.Box,{children:[(0,a.jsx)(u,{mb:"16px",children:"Before proceeding with this operation, you must download the Allica App and activate your account on your mobile device."}),(0,a.jsx)(u,{mb:"16px",children:"Find the app by searching for 'Allica Bank' on your device's App Store."})]})}),E=({isOpen:t,onClose:e,onPrimaryButtonClick:n})=>(0,a.jsx)(c,{isOpen:t,onClose:e,IconComponent:l.SecurityErrorIcon,iconColor:"$fg.system.error_default",headingText:"Authorisation declined",primaryButtonText:"Ok",onPrimaryButtonClick:n,mainContent:(0,a.jsxs)(s.Box,{children:[(0,a.jsx)(u,{mb:"16px",children:"Your request for authorisation has been declined."}),(0,a.jsx)(u,{mb:"16px",children:"If you wish to proceed, please start the authorisation process again. If this is an error try again or contact our support team for assistance."})]})}),m=({isOpen:t,onClose:e,onPrimaryButtonClick:n})=>(0,a.jsx)(c,{isOpen:t,onClose:e,IconComponent:l.TimeoutIcon,iconColor:"$fg.system.error_default",headingText:"Authorisation timeout",primaryButtonText:"Ok",onPrimaryButtonClick:n,mainContent:(0,a.jsxs)(s.Box,{children:[(0,a.jsx)(u,{mb:"16px",children:"Your Two-Factor Authentication session has timed out. For your security, authentication actions are time restricted."}),(0,a.jsx)(u,{mb:"16px",children:"Please try again. If you continue to experience issues, check your network connection or contact our support team."})]})});var C=n(65774);const A=({children:t})=>{const[e,n]=(0,o.useState)(null),[i,s]=(0,o.useState)(!1),[l,u]=(0,o.useState)(null),c=(0,o.useRef)(null),[d,A]=(0,o.useState)(null),T=(0,o.useRef)(null),y=()=>{c.current&&clearTimeout(c.current),T.current&&clearTimeout(T.current)};(0,o.useEffect)((()=>{e!==p.AUTH_REQUESTED&&(y(),u(null),A(null))}),[e,c.current,T.current]);const _=()=>{s(!0),A(null),y()},I=()=>{n(null),u(null),A(null),y()};(0,o.useEffect)((()=>
1{if(l&&!i){new Date(l)<new Date?(n(p.AUTH_EXPIRED),y()):(T.current=setTimeout((()=>{const t=(0,C.intervalToDuration)({start:new Date,end:l});0===t.minutes&&0===t.seconds&&n(p.AUTH_EXPIRED),A(t)}),1e3),0===(null==d?void 0:d.minutes)&&0===(null==d?void 0:d.seconds)&&clearTimeout(T.current))}}),[l,d,i]);return(0,a.jsxs)(r.Provider,{value:{multiFactorAuthenticationAuthStatus:e,setMultiFactorAuthenticationAuthStatus:n,handleMultiFactorAuthenticatedMutation:(t,e)=>{c.current=setTimeout((async()=>{t(e,{onSuccess:()=>{n(null)},onError:t=>{var e;401!==(null==t||null==(e=t.response)?void 0:e.status)&&n(null)}})}),1e3)},isCancelled:i,setIsCancelled:s,authenticationExpiresAt:l,setAuthenicationExpiresAt:u},children:[(0,a.jsx)(h,{isOpen:e===p.AUTH_REQUESTED&&!i,onClose:_,onPrimaryButtonClick:_,duration:(()=>{if(0===(null==d?void 0:d.minutes))return`${null==d?void 0:d.seconds} seconds left`;if(void 0!==(null==d?void 0:d.minutes)&&void 0!==(null==d?void 0:d.seconds)&&(null==d?void 0:d.minutes)>0){const t=(null==d?void 0:d.seconds)<10?`0${null==d?void 0:d.seconds}`:null==d?void 0:d.seconds;return`${d.minutes}:${t} mins left`}return""})()}),(0,a.jsx)(x,{isOpen:(e===p.NO_DEVICES_REGISTERED||e===p.USER_ID_UNKNOWN_TO_SCA_SERVER)&&!i,onClose:I,onPrimaryButtonClick:I}),(0,a.jsx)(E,{isOpen:e===p.AUTH_DENIED&&!i,onClose:I,onPrimaryButtonClick:I}),(0,a.jsx)(m,{isOpen:e===p.AUTH_EXPIRED&&!i,onClose:I,onPrimaryButtonClick:I}),t]})},T=(t,e)=>{if(t&&e){const n=Object.keys(t).find((t=>t.toLowerCase()===e.toLowerCase()));return n?t[n]:void 0}};var y=n(13849),_=n(76543);const I=t=>{const{error:e,mutate:n,variables:i,reset:s}=t,{isFeatureOn:l}=(0,y.useFeatureFlags)(),a=l(_.FeaturedFlags.olbv2_2FA_countdown),{multiFactorAuthenticationAuthStatus:u,setMultiFactorAuthenticationAuthStatus:c,handleMultiFactorAuthenticatedMutation:d,isCancelled:h,setIsCancelled:x,setAuthenicationExpiresAt:E,authenticationExpiresAt:m}=(()=>{const t=(0,o.useContext)(r);if(void 0===t)throw new Error("useMultiFactorAuthentication must be within MultiFactorAuthenticationContext Provider");return t})();(0,o.useEffect)((()=>{var t,o;if(e)if(h)s(),null==c||c(null),null==x||x(!1),null==E||E(null);else if(401===(null==(t=e.response)?void 0:t.status)&&null!=(o=e.response)&&o.data.code){const t=T(e.response.headers,"Authorization-Expires-At");var r,l;if(t&&!m&&a&&(null==E||E(new Date(t))),u!==p.AUTH_EXPIRED)if(null==c||c(e.response.data.code),(null==(r=e.response)?void 0:r.data.code)===p.AUTH_REQUESTED)null==d||d(n,{data:i.data,headers:{"Authorization-Id":T(null==(l=e.response)?void 0:l.headers,"Authorization-Id"),"Idempotency-Id":T(i.headers,"Idempotency-Id")}})}else null==c||c(null)}),[e,h]);const C=[p.AUTH_REQUESTED,p.AUTH_DENIED,p.NO_DEVICES_REGISTERED,p.AUTH_EXPIRED,p.USER_ID_UNKNOWN_TO_SCA_SERVER].includes(u);return Object.assign({},t,{isHandlingMultiFactorAuthentication:C})}}}]);

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.