1"use strict";(globalThis.webpackChunkfrontend_b2c||=[]).push([[83,5854],{79514(e,t,i){i(9950);var n=i(74804),o=i(31033),a=i(58980),s=i(29798),r=i(79360),l=i(41001),d=i(58118),c=i(88442),u=i(17391),m=i(20659),p=(i(73478),i(57915)),h=i(26185),_=i(44414);function x(e,t,i){return()=>{(0,m.TE)(e,{epoch:new Date,transaction_id:t}),i(c.$hu)}}const v=(0,l.Ng)(function(e){const{rootReducer:{userFlowReducer:{screens:t,currentScreen:i,timeline:n}}}=e;return{screens:t,currentScreen:i,timeline:n}},{changeScreen:u.Xh})(function(e){const{mobile_code:t,mobile_number:i}=e,l=(0,d.Zp)(),{transaction_id:c}=(0,d.g)();return(0,_.jsxs)(o.A,{className:"ack-screen interview",children:[(0,_.jsx)(o.A.Row,{children:(0,_.jsx)(o.A.Column,{className:"header-col",children:(0,_.jsx)("div",{className:"header-normal center-align martop20",children:"Payment Failed!"})})}),(0,_.jsx)(o.A.Row,{children:(0,_.jsx)(o.A.Column,{children:(0,_.jsxs)(r.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,_.jsx)(s.A,{color:"blue",percent:100,attached:"top",active:!0,className:"hidebtn"}),(0,_.jsx)(o.A,{columns:"equal",className:"inner-grid details fold-3-personal-details right-to-left-anime form-grid filed-payment-screen",container:!0,centered:!0,children:(0,_.jsx)(o.A.Row,{className:"payee-details-inputs",children:(0,_.jsx)(o.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,_.jsxs)(o.A,{centered:!0,children:[(0,_.jsx)(o.A.Row,{children:(0,_.jsx)(o.A.Column,{computer:14,tablet:15,mobile:16,className:"text-center",children:(0,_.jsxs)("div",{className:"tile-row",children:[(0,_.jsx)(a.default,{src:h.Kcx,className:"main-icon image-margin faild-payment-img"}),(0,_.jsx)("div",{className:"sorry-text",children:"Sorry, Your Payment Failed!\nWe are unable to process the payment through the method selected by you."})]})})}),(0,_.jsx)(n.A,{}),(0,_.jsxs)(o.A.Row,{children:[(0,_.jsx)(o.A.Column,{computer:16,tablet:15,mobile:16,className:"text-center",children:(0,_.jsx)("div",{className:"blue-font-head text-center header-normal",children:"Get in touch!"})}),i&&(0,_.jsx)(o.A.Column,{computer:7,tablet:8,mobile:16,className:"text-center faild-payment-number",children:(0,_.jsxs)("div",{className:"tile-column",children:[(0,_.jsx)(a.default,{src:h.y3d,className:"icon"}),(0,_.jsx)("span",{className:"contact-info number",children:i&&`+${t} ${i}`||""})]})}),(0,_.jsx)(o.A.Column,{computer:7,tablet:8,mobile:16,className:"text-center faild-payment-email",children:(0,_.jsxs)("div",{className:"tile-column",children:[(0,_.jsx)(a.default,{src:h.abi,className:"icon"}),(0,_.jsx)("span",{className:"contact-info email",children:"[email protected]"})]})}),(0,_.jsx)(o.A.Column,{computer:14,tablet:15,mobile:16,className:"text-center",children:(0,_.jsx)("p",{children:"In case you need any clarification, please get in touch with us through any of the above channels."})})]})]})})})}),(0,_.jsx)("div",{className:"text-center",children:(0,_.jsx)(p.mU,{text:"Take me to Dashboard",id:"btn-cancel",className:"save-continue-button-new mt-50",onClick:x("transaction-failed",c,l),style:{float:"none"}})})]})})})]})});i.d(t,["A",0,v])},31511(e,t,i){var n=i(9950),o=i(74804),a=i(31033),s=i(58980),r=i(29798),l=i(79360),d=i(58118),c=i(33899),u=i(16014),m=i(88442),p=i(20659),h=(i(73478),i(57915)),_=i(26185),x=i(44414);const v=function(e){const{mobile_code:t,mobile_number:i,date:v,slot:f,country_code:y,account_type:b}=e;let g=b===m.sOf;const{cmsData:j,setCmsData:A}=(0,n.useState)({}),N=async()=>{var e,t,i,n;this.props.activateLoader();const o=await(0,c.fA)("page4OnBoardingAcknowledgeInformation","MOBILE_ONBOARDING_ACKNOWLEDGE_INFORMATION");this.props.disableLoader();const a=null===o||void 0===o||null===(e=o.heading)||void 0===e||null===(t=e.target)||void 0===t?void 0:t.fields;A({profileInReviewHeading:(null===a||void 0===a||null===(i=a.subHeading)||void 0===i?void 0:i.value)||u.yt.PROFILE_IN_REVIEW,profileInReviewDescription:(null===a||void 0===a||null===(n=a.sub2heading)||void 0===n?void 0:n.value)||u.yt.NOTIFY})};return(0,n.useEffect)(()=>{y===m.US&&N()},[y]),(0,x.jsx)(a.A,{className:"ack-screen interview",children:(0,x.jsx)(a.A.Row,{children:(0,x.jsx)(a.A.Column,{children:(0,x.jsxs)(l.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,x.jsx)(r.A,{color:"blue",percent:100,attached:"top",active:!0,className:"hidebtn"}
1),(0,x.jsxs)(a.A,{columns:"equal",className:"inner-grid details fold-3-personal-details right-to-left-anime form-grid",container:!0,centered:!0,children:[(0,x.jsx)(a.A.Row,{className:"payee-details-inputs no-padding1",children:(0,x.jsx)(a.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,x.jsxs)(a.A,{centered:!0,children:[(0,x.jsx)(a.A.Row,{children:(0,x.jsx)(a.A.Column,{className:"header-col",children:(0,x.jsx)("div",{className:"header-normal center-align martop20",id:v?"appointment":"awaiting",children:v?"Appointment confirmed":"Thank you for registering with us"})})}),(0,x.jsx)(a.A.Row,{children:(0,x.jsx)(a.A.Column,{computer:14,tablet:15,mobile:16,className:"text-center",children:(0,x.jsxs)("div",{className:"tile-row",children:[(0,x.jsx)("div",{className:"full-span",children:(0,x.jsx)(s.default,{src:_.jpt,className:"main-icon"})}),y===m.US&&(0,x.jsx)("div",{children:(null===j||void 0===j?void 0:j.profileInReviewHeading)||m.wC3.interviewAwaiting_US_Text_Header}),(0,x.jsx)("pre",{children:(()=>{let e="";e="AU"!==y||g?"US"===y&&g?(null===j||void 0===j?void 0:j.profileInReviewDescription)||m.wC3.interviewAwaiting_US_Text:m.wC3.interviewAwaiting_OTHERS_Text:m.wC3.interviewAwaiting_AU_Text;let t="Your appointment with us is confirmed.";return v&&f&&(t=`Your appointment with us on ${v} at ${f} is confirmed.`,e=`${t}\nPlease ensure that you carry the original copies of the documents that you have shared with us.`),e})()})]})})}),(0,x.jsx)(o.A,{}),(0,x.jsxs)(a.A.Row,{children:[(0,x.jsx)(a.A.Column,{computer:16,tablet:15,mobile:16,className:"text-center",children:(0,x.jsx)("div",{className:"blue-font-head text-center header-normal",children:"Get in touch!"})}),(w=i&&`+${t} ${i}`||"",w?(0,x.jsx)(a.A.Column,{computer:7,tablet:8,mobile:16,className:"text-center",children:(0,x.jsxs)("div",{className:"tile-column",children:[(0,x.jsx)(s.default,{src:_.y3d,className:"icon"}),(0,x.jsx)("span",{className:"contact-info number",children:w})]})}):null),(0,x.jsx)(a.A.Column,{computer:7,tablet:8,mobile:16,className:"text-center",children:(0,x.jsx)("div",{className:"tile-column",children:(e=>e?(0,x.jsxs)(x.Fragment,{children:["If you need assistance, visit\xa0",(0,x.jsx)(d.N_,{to:m.WXl,className:"visitHelpCenter",children:"Help Centre"})]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(s.default,{src:_.abi,className:"icon mailicon"}),(0,x.jsx)("span",{className:"contact-info email",children:"[email protected]"})]}))(g)})}),(0,x.jsx)(a.A.Column,{computer:14,tablet:15,mobile:16,className:"text-center",children:(0,x.jsx)("p",{children:"In case you need any clarification, please get in touch with us through any of the above channels."})})]})]})})}),(0,x.jsx)(d.N_,{to:m.$hu,children:(0,x.jsx)(h.mU,{text:"Continue",id:"submit",width:240,height:42,className:"save-continue-button-new mt-50",onClick:()=>{(0,p.TE)("acknowledgment-"+(v?"interview":"awaiting"),{acknowledged:new Date})}})})]})]})})})});var w};i.d(t,["A",0,v])},80083(e,t,i){i.r(t),i.d(t,{default:()=>M});var n=i(9950),o=i(1780),a=i(76653),s=i(58118),r=i(21631),l=i(41001),d=i(14048),c=i(70132),u=i(19533);const m=c.Ay.div` 2 width: 100%; 3 height: 100%; 4 padding: 32px 0; 5 display: flex; 6 flex-direction: column; 7 8 .add-edit-beneficiary__back-btn-container { 9 display: flex; 10 align-items: center; 11 justify-content: space-evenly; 12 padding: 0 15rem; 13 .back-btn-container__icon { 14 cursor: pointer; 15 } 16 .content-container__header { 17 width: 100%; 18 text-align: center; 19 font-size: 28px; 20 font-weight: 700; 21 font-family: ${u.F2.hellix.bold}; 22 display: block; 23 color: ${u.lm.black}; 24 line-height: 38px; 25 letter-spacing: 0; 26 } 27 28 .back-btn-container__close-icon { 29 cursor: pointer; 30 } 31 } 32 33 .child-component-container { 34 display: flex; 35 justify-content: center; 36 align-items: center; 37 38 padding: 0 16px; 39 40 .child-component-container__content-container { 41 margin-top: 48px; 42 max-width: 450px; 43 width: 100%; 44 display: flex; 45 flex-direction: column; 46 gap: 48px; 47 48 .content-container__fields { 49 display: flex; 50 width: 100%; 51 flex-direction: column; 52 gap: 24px; 53 //flag image css 54 .avatar { 55 width: 24px; 56 height: 24px; 57 margin-bottom: 2px !important; 58 margin-top: 0 !important; 59 } 60 } 61 } 62 } 63 64 @media ${u.W.tablet} { 65 .add-edit-beneficiary__back-btn-container { 66 padding: 0 100px; 67 } 68 } 69 70 @media ${u.W.tab} { 71 .add-edit-beneficiary__back-btn-container { 72 padding: 0 6rem; 73 } 74 } 75 76 @media ${u.W.mobileXL} { 77 .add-edit-beneficiary__back-btn-container { 78 padding: 0 16px; 79 } 80 } 81`,p=c.Ay.div` 82 display: flex; 83 justify-content: center; 84 margin-bottom: 32px; 85`;var h=i(12916),_=i(26185),x=i(57915);const v=c.Ay.div` 86 width: 367px; 87 border-radius: 10px; 88 background-color: ${u.lm.white}; 89 display: flex; 90 .modal-container__content { 91 padding: 32px 16px; 92 width: 100%; 93 display: flex; 94 flex-direction: column; 95 align-items: center; 96 97 .content__icon { 98 width: 64px; 99 height: 64px; 100 } 101 102 .content__heading { 103 width: 100%; 104 text-align: center; 105 font-size: 18px; 106 font-weight: 700; 107 font-family: ${u.F2.hellix.bold};
108 line-height: 26px; 109 color: ${u.lm.black}; 110 } 111 112 .content__description { 113 width: 297px; 114 text-align: center; 115 font-size: 16px; 116 font-weight: 700; 117 line-height: 22px; 118 margin-top: 16px; 119 color: ${u.lm.textGrey}; 120 } 121 } 122`;var f=i(44414);const y=e=>{let{heading:t,description:i,icon:n,primaryButtonText:o,secondaryButtonText:a,onPrimaryButtonClick:s,onSecondaryButtonClick:r}=e;return(0,f.jsx)(v,{children:(0,f.jsxs)("div",{className:"modal-container__content",children:[(0,f.jsx)("img",{src:n,alt:"Exit Icon",className:"content__icon"}),(0,f.jsx)("h2",{className:"content__heading",children:t}),(0,f.jsx)("p",{className:"content__description",children:i}),(0,f.jsx)(x.mU,{text:o,onClick:s,margin:"32px 0 0 0",height:50}),(0,f.jsx)(x.mU,{text:a,onClick:r,type:"link",margin:"24px 0 0 0"})]})})};var b=i(98164),g=i(79899),j=i(6320),A=i(41397),N=i(95274),w=i(19705),S=i(30962),C=i(88442),D=i(24115),T=i(23105),E=i(78272),I=i(64037),R=i(20945);const{heading:k,description:O,primaryCtaText:L,secondaryCtaText:F}=r.lD,M=e=>{var t,i,c,u,v;const M=(0,s.Zp)(),[P,$]=n.useState({additionalFields:null,debit_card_details:null,current_bank_fields:null,bank_validations:null,debit_validations:null,beneWalletDetails:null,beneCashPayoutDetails:null}),[U,V]=(0,n.useState)(!1),[B,Y]=(0,n.useState)(!1),[H,z]=(0,n.useState)([]),G=(0,l.wA)(),q=(0,l.d4)(e=>(0,o.A)(r.OM)(e)),K=(0,l.d4)(h.yP).currentScreen,Q=(0,l.d4)(e=>(0,o.A)(C.b4Q)(e)),{details_selected:W}=(null===(t=(0,l.d4)(h.yP))||void 0===t?void 0:t.formValues)||{},{redirectedFromSendMoney:X,isEditFlow:Z,currentBene:J,isBeneSchemaEnabled:ee}=(0,l.d4)(h.yP),{timeline:te,screens:ie}=(0,l.d4)(h.yi),{account_type:ne=C.sOf,nationality:oe}=(0,l.d4)(h.gV),ae=null===(i=(0,l.d4)(h.Gd))||void 0===i?void 0:i.beneListData,se=Array.isArray(ae)&&ae.length>0,re=(0,n.useCallback)(async()=>{var e;const{currency_code:t,bank_account_country:i,account_type:n}=q,{routing_config_type:o}=J||{};G((0,d.LI)());const s=await G((0,g.Ms)(i,t,n)),l=null===s||void 0===s||null===(e=s.data)||void 0===e?void 0:e.data;if(!(0,A.isEmpty)(l)){(0,w.FR)(l,$,null),z(l),G((0,b.TF)(l)),G((0,b.Hr)(l));const e=B&&o?l.find(e=>e.routing_config_type===o):1===l.length?l[0]:null;if(1===(null===l||void 0===l?void 0:l.length)||B&&(null===l||void 0===l?void 0:l.length)>0){var c;let t=null===e||void 0===e||null===(c=e.routing_config_type)||void 0===c?void 0:c.toLowerCase();"visa_debit_card"===t&&(t="card"),G((0,a.Zg)(r.OM,"payout_method",t)),G((0,b.G5)(null===e||void 0===e?void 0:e.routing_config_type))}}G((0,d.MV)())},[null===q||void 0===q?void 0:q.currency_code]),{is_partially_editable:le,is_completely_editable:de}=(null===(c=window.history.state)||void 0===c?void 0:c.usr)||{},ce=B&&le&&!1===de&ⅇ(0,n.useEffect)(()=>{if(!q)return;const{currency_code:e,bank_account_country:t,account_type:i}=q;if(!e||!t||!i)return;const n=(0,N.R0)(ne,(null===q||void 0===q?void 0:q.bank_account_country)||"",(null===q||void 0===q?void 0:q.currency_code)||"");if(G((0,b.FU)(n)),n){var o;G((0,b.Hr)(null));const{is_partially_editable:e,is_completely_editable:t}=(null===(o=window.history.state)||void 0===o?void 0:o.usr)||{};B&&e&&!1===t&&(()=>{G((0,d.LI)());const e=(null===J||void 0===J?void 0:J.routing_config_type)||(null===J||void 0===J?void 0:J.payout_method)||"";G((0,b.Uu)({account_type:(null===J||void 0===J?void 0:J.account_type)||(null===J||void 0===J?void 0:J.beneficiary_account_type)||"",bank_account_country:(null===J||void 0===J?void 0:J.bank_account_country)||(null===J||void 0===J?void 0:J.destination_country)||"",currency_code:(null===J||void 0===J?void 0:J.currency_code)||(null===J||void 0===J?void 0:J.destination_currency)||"",payout_method:e,details_selected:e})),G((0,b.os)({type:"PUSH_NAVIGATION_HISTORY",screen:r.Tg.personal_details.name}))})(),(async()=>{G((0,d.LI)());const{currency_code:e,bank_account_country:t,account_type:i,payout_method:n}=q;try{if(e&&t&&i){var o;const s=await G((0,g.ug)(t,e,i)),l=null===s||void 0===s||null===(o=s.data)||void 0===o?void 0:o.data;z(l),G((0,b.TF)(l));const d=B&&n?l.find(e=>e.payout_method===n):1===l.length?l[0]:null;if(1===l.length||B&&(null===l||void 0===l?void 0:l.length)>0){const e=await G((0,j.su)(q,d.payout_method,d.routing_config_type));G((0,b.gO)(e)),G((0,a.Zg)(r.OM,"payout_method",null===d||void 0===d?void 0:d.payout_method)),G((0,b.G5)(null===d||void 0===d?void 0:d.label))}}}finally{G((0,d.MV)())}})()}else G((0,b.TF)(null)),G((0,b.gO)(null)),re()},[null===q||void 0===q?void 0:q.currency_code]);const ue=e=>{G((0,d.eG)()),(0,w.C5)(G,K,U,ie,te,M,e,ne,se)},me=(0,n.useCallback)(async()=>{await G((0,b.KE)())},[G]);(0,n.useEffect)(()=>(V(X),G((0,b.ik)(!1)),Y(Z),G((0,b.JP)(!1)),G((0,d.MV)()),()=>{G((0,b.Rc)()),G((0,S.pZ)(null)),G((0,S.Xf)(null))}),[G]),(0,n.useEffect)(()=>{B&&me()},[B,me]);const pe=r.TC[K];return(0,f.jsxs)(m,{children:["PK"===oe&&(!ae||0===ae.length||ae.every(e=>e.is_dha_beneficiary))&&(0,f.jsx)(p,{children:(0,f.jsx)(T.A,{noMarginRight:!0,showDHABanner:(0,E.f0)()&&K===r.Tg.receiving_method.name,onSendNowClick:()=>{const t={type:I.zY.BUTTON,ctaName:I.XQ.SEND_NOW,pageName:I.Ys.AddBeneficiary,flowType:I.UQ.BENEFICIARY,productType:I.Vo.DHA_PAYMENTS};(0,R.zU)(I.V6.CTA_CLICKED,t);window.location.pathname===C.nwo?e.changeScreen(D.clv,C.ZV9,e.screens,e.timeline,null,!0):M(C.nwo,{state:{jumpToDHA:!0}})}})}),(0,f.jsxs)("div",{className:"add-edit-beneficiary__back-btn-container",children:[null!==(u=r.Tg[K])&&void 0!==u&&u.isBackButtonVisible?(0,f.jsx)("img",{src:_.E71,alt:U?"Back to Send Money":"Back to Payee List",className:"back-btn-container__icon",onClick:()=>
122{if(G((0,d.eG)()),K===r.Tg.recipient_address.name&&G((0,b.ol)(Q||{})),ce&&K===r.Tg.personal_details.name)return G((0,b.Rc)()),void M(C.WL2);(0,w.dt)(G,U,ie,te,K,M,ne,se)}}):null,(0,f.jsx)("span",{className:"content-container__header",children:(0,w.qX)(K,W,B)}),null!==(v=r.Tg[K])&&void 0!==v&&v.isCloseButtonVisible?(0,f.jsx)("img",{alt:"close",src:_.I4S,className:"back-btn-container__close-icon",onClick:async()=>{if(K!==r.Tg.recipient_added.name)return await x.wh.builder(e=>(0,f.jsx)(y,{heading:k,description:O,icon:_.Kj,primaryButtonText:L,secondaryButtonText:F,onClose:e,onPrimaryButtonClick:()=>e(!0),onSecondaryButtonClick:()=>ue(e)}),"insta-modal center-modal",!0);ue(null)}}):null]}),(0,f.jsx)("div",{className:"child-component-container",children:pe?(0,f.jsx)(pe,{...e,parentState:{isEditFlow:B,isRedirectedFromSendMoney:U,payoutMethods:H,beneState:P}}):null})]})}},78272(e,t,i){var n=i(97042),o=i(160),a=i(1472),s=i(12916),r=i(93031),l=i(88442),d=i(53160);i.d(t,["Ih",0,e=>e&&e.length<l.z$y?l.cGR.challanForm.validationError:void 0,"co",0,(e,t)=>async i=>{try{var a;const i=await(0,n.nv)({method:"post",url:`${r.H$}/remitter/beneficiary`,data:{challan_number:e,is_challan_number_consent_given:t},withCredentials:!0});if(null!==i&&void 0!==i&&null!==(a=i.data)&&void 0!==a&&a.success)return i.data.data}catch(s){return i((0,o.H)(s)),!1}},"f0",0,()=>{var e,t,i;if(!(0,a.E)(l.Czt))return!1;const n=null!==(e=(0,a.I)(l.Czt))&&void 0!==e?e:[];if(null===n||void 0===n||!n.length)return!0;const o=null!==(t=null===(i=(0,s.U6)(d.M.getState()))||void 0===i?void 0:i.email)&&void 0!==t?t:"";return n.includes(o)},"wP",0,e=>async t=>{try{var i;const t=await(0,n.nv)({method:"post",url:`${r.H$}/dha-challan/validation`,data:{challan_number:e},withCredentials:!0});if(null!==t&&void 0!==t&&null!==(i=t.data)&&void 0!==i&&i.success)return t.data.data}catch(s){var a;const e=null===s||void 0===s||null===(a=s.response)||void 0===a?void 0:a.status;return 409===e||461===e||400===e?{errorCode:e}:(t((0,o.H)(s)),!1)}}])},61211(e,t,i){i.d(t,{A:()=>N});var n=i(9950),o=i(44414);const a=e=>{let{config:t}=e;return t&&t.length>0&&(0,o.jsx)("div",{className:"row recipient-list-heading",children:t.map((e,t)=>(0,o.jsx)("span",{className:e.className,children:e.content},t))})};var s=i(63177),r=i(57915),l=i(92180);const d=e=>{let{reason:t}=e;return(0,o.jsx)("div",{className:"bank-details",children:(0,o.jsx)(n.Fragment,{children:(0,o.jsxs)("span",{className:"bank-details-title",children:["Reason: ",(0,o.jsx)("span",{className:"bank-details-value",children:t})]})})})};var c=i(26185);const u=e=>{let{notes:t,onEditTransactionData:i,item:a,index:s,additionalInfo:r}=e;return(0,o.jsx)("div",{className:"bank-details",children:(0,o.jsx)(n.Fragment,{children:(0,o.jsxs)("div",{className:"notes-details-wrapper",children:[(0,o.jsxs)("span",{className:"bank-details-title",children:["Note: ",(0,o.jsx)("span",{className:"bank-details-value",children:t})]}),void 0!==t&&""!==t&&(0,o.jsx)("div",{className:"edit-cancel-btn-wrapper notes-edit",children:(0,o.jsx)("button",{id:"edit-btn",className:"edit-cancel-btn",children:(0,o.jsx)("img",{src:c.Ku4,alt:"edit icon",onClick:()=>i(a,s,!0,r)})})})]})})})};var m=i(70132),p=i(41001);const h=m.Ay.div` 123 display: flex !important; 124 flex-direction: row !important; 125 padding: 0 20px 0px 30px; 126`,_=(0,p.Ng)(e=>{let{rootReducer:t}=e;const{userStatusReducer:{country_code:i}}=t;return{country_code:i}})(e=>{let{bankDetails:t,cardDetails:i}=e,a=i&&i.card_no?"Last 4 Digits of Card Number":"A/C",s=i&&i.card_no?"Expiry Date":"Bank",r=i&&i.card_no?i.card_no:t.account_no,l=i&&i.card_no?i.card_expiry:t.bank;return(0,o.jsx)(h,{className:"bank-details",children:(0,o.jsxs)(n.Fragment,{children:[(0,o.jsxs)("span",{className:"bank-details-title",children:[a,":",(0,o.jsx)("span",{className:"bank-details-value",children:r})]}),l&&(0,o.jsxs)("span",{className:"bank-details-title",children:[s,":",(0,o.jsx)("span",{className:"bank-details-value",children:l})]})]})})});class x extends n.Component{constructor(e){super(e),this.state={showBankDetails:!1,showNotes:!1,showReasonForTransfer:!1}}
126render(){let{showBankDetails:e,showNotes:t,showReasonForTransfer:i}=this.state,{bankDetails:n,notes:a,reason:s,onEditTransactionData:r,item:l,index:m,additionalInfo:p,cardDetails:h,handleEdit:x}=this.props,v=h&&h.card_no?"Card details":"Bank details";return(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:"details-section-container bank-details",children:[(0,o.jsxs)("div",{className:"bank-details-header",onClick:()=>this.setState({showBankDetails:!e,showReasonForTransfer:!1,showNotes:!1}),children:[v,(0,o.jsx)("img",{src:c.aEL,alt:"right arrow",className:"right-arrow "+(e?"rotated":"")})]}),(0,o.jsxs)("div",{className:"bank-details-header",onClick:()=>this.setState({showReasonForTransfer:!i,showBankDetails:!1,showNotes:!1}),children:["Reason for transfer",(0,o.jsx)("img",{src:c.aEL,alt:"right arrow",className:"right-arrow "+(i?"rotated":"")})]}),(0,o.jsxs)("div",{className:"bank-details-header",onClick:()=>this.setState({showNotes:!t,showReasonForTransfer:!1,showBankDetails:!1}),children:["Notes",(0,o.jsx)("img",{src:c.aEL,alt:"right arrow",className:"right-arrow "+(t?"rotated":"")}
126)]})]}),e&&(0,o.jsx)(_,{bankDetails:n,cardDetails:h,item:l,index:m,additionalInfo:p,handleEdit:x}),i&&(0,o.jsx)(d,{reason:s}),t&&(0,o.jsx)(u,{additionalInfo:p,notes:a,item:l,index:m,onEditTransactionData:r})]})}}const v=x;var f=i(1780),y=i(88442),b=i(30962);class g extends n.Component{constructor(e){var t;super(e),t=this,this.handleEdit=function(e,i,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const{onEditTransactionData:a,goodsServiceFromVal:s}=t.props;a(e,i,!1,n,o),t.props.storeFormForEdit({goodsServiceFromVal:s,formName:`${e.beneficiary_id}-${i}`})},this.state={showBankDetails:[],showReasonForTransfer:[],showNotes:[],notes:e.notes}}render(){let e=[];const{config:t,viewFor:i,onEditTransactionData:a,deleteTransaction:d,recipientList:u}=this.props;let m="transaction"===i;return t&&t.length>0&&(0,o.jsx)(n.Fragment,{children:t.map((t,i)=>{e.push(!1);let{beneficiary_id:p,temp_transaction_id:h,additionalDataForRL:{reason_for_transfer_text_trade_code:_=""}={},beneficiaryDataToBeShown:{name:x,source_currency:f,send_amt:b,destination_currency:g,receive_amt:j,reason:A,bank_details:N,bank_details:{account_no:w,bank:S},card_details:C,you_pay:D,notes:T,transaction_number:E},payload:{source_amount:I,destination_amount:R,instarem_fx_rate:k,payment_method_fee_amount:O=0,net_source_amount:L,gross_source_amount:F,coupon_code:M}}=t,P={source_currency:f,source_amount:I,destination_currency:g,destination_amount:R,instarem_fx_rate:k,transaction_fee_amount:t.payload.transaction_config&&t.payload.transaction_config.total_fee_amount.toString()||t.payload.total_fee_amount,payment_method_fee_amount:O,net_source_amount:L,gross_source_amount:F},$=(0,l.wO)("multi-recipient-list",P),U={formFieldsId:t.additionalDataForRL&&`${t.beneficiary_id}-${i}`,currency_code:t.additionalDataForRL&&t.additionalDataForRL.currency_code,reason_for_transfer_text_trade_code:t.additionalDataForRL&&t.additionalDataForRL.reason_for_transfer_text_trade_code,bene_account_type:t.additionalDataForRL&&t.additionalDataForRL.bene_account_type};return(0,o.jsxs)(n.Fragment,{children:[(0,o.jsxs)("div",{style:{paddingBottom:"10px"},children:[(0,o.jsxs)("div",{className:"row",id:`${p}-${i} `,children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("span",{className:"recipient-name",children:x}),!m&&E&&(0,o.jsx)("span",{className:"transaction-no",children:`Transaction ${E}`})]}
126),(0,o.jsxs)("div",{className:"you-send",children:[(0,o.jsx)("img",{src:`${y.t8D}${f.toLowerCase()}.png`,alt:`${f} currency`,className:"flag"}),(0,o.jsx)("span",{children:b})]}),(0,o.jsxs)("div",{className:"recipient-receives",children:[(0,o.jsx)("img",{src:`${y.t8D}${g.toLowerCase()}.png`,alt:`${g} currency`,className:"flag"}),(0,o.jsx)("span",{children:j})]}),m&&(0,o.jsx)("div",{className:"cancel-edit-recipient",children:(0,o.jsxs)("div",{className:"edit-cancel-btn-wrapper",children:[(0,o.jsx)("button",{id:"edit-btn",className:"edit-cancel-btn",onClick:()=>{this.handleEdit(t,i,U)},children:(0,o.jsx)("img",{src:c.Ku4,alt:"edit icon"})}),(0,o.jsx)("button",{id:"cancel-btn",className:"edit-cancel-btn",onClick:()=>d(h,x,i),children:(0,o.jsx)("img",{src:c.Ndl,alt:"cancel icon",height:"15px"})})]})}),!m&&N&&(0,o.jsxs)("div",{className:"ack-bank-details",children:[(0,o.jsx)("span",{children:w}),(0,o.jsx)("span",{className:"bank-name",children:S})]}),(0,o.jsxs)("div",{className:"you-pay",children:[(0,o.jsxs)("div",{className:"you-pay-amt-block",children:[(0,o.jsx)("span",{className:"you-pay-amt",children:D}),(0,o.jsx)(s.A,{trigger:(0,o.jsx)("img",{src:c.PCH,alt:"info icon",className:"info-icon",height:"15px",width:"15px"}),content:(0,o.jsx)(r.g1,{config:$}),className:"currency-convertor-popup recipient-list-popup",hideOnScroll:!1,size:"huge",position:"left center"})]}),M&&(0,o.jsxs)("div",{className:"coupon_success transaction_list_coupon",children:[M," Applied"]})]})]},i*p),m&&(0,o.jsx)(v,{additionalInfo:U,onEditTransactionData:a,item:t,index:i,config:u,bankDetails:N,reason:A,notes:T,cardDetails:C,handleEdit:this.handleEdit})]}),t&&t.additionalDataForRL&&"CNY"===t.additionalDataForRL.currency_code&&(0,o.jsx)(r.pw,{formFieldsId:`${p}-${i}`,viewFor:"transaction",reason_for_transfer_text_trade_code:_,currency_code:"CNY",bene_account_type:"CORPORATE",headerConfig:[{reason:A,resaonType:"e.g Service",message:"As per the partnered bank regulation, you need to provide service details."}],...this.props})]},`${p}-${i}`)})})}}const j=(0,p.Ng)(e=>({goodsServiceFromVal:(0,f.A)(y.P6z)(e)||{}}),{storeFormForEdit:b.PK})(g),A=e=>{let t,{config:i,fixedSourceCurrency:a,totalYouPayAmount:d}=e,u=0,m=0,p=0,h=0;i&&i.length>0&&i.forEach(e=>{let{payload:{gross_source_amount:i,net_tax_amount:n}}=e;const o=e.payload.transaction_config&&e.payload.transaction_config.total_fee_amount.toString()||e.payload.total_fee_amount;u+=i-o,m+=parseFloat(o),t=u,p+=parseFloat(i||0),h+=n});const{destination_amount:_,instarem_fx_rate:x,payment_method_fee_amount:v=0,net_source_amount:f,gross_source_amount:y,net_tax_amount:b,net_of_fee_amount:g,source_currency:j}=i[0].payload;let A={destination_amount:_,instarem_fx_rate:x,transaction_fee_amount:i[0].payload.transaction_config&&i[0].payload.transaction_config.total_fee_amount,payment_method_fee_amount:v,net_source_amount:f,gross_source_amount:y,net_tax_amount:b,net_of_fee_amount:g,source_currency:j,totalYouPayAmount:d,totalConversionAmt:t,totalTransactionFeeAmount:m,totalTaxAmt:h,totalYouSendAmt:p},N=(0,l.wO)("multi-total-amount",A),w=i.length;return(0,o.jsx)("div",{className:"row recipient-footer",children:(0,o.jsxs)(n.Fragment,{children:[(0,o.jsxs)("div",{className:"recipient-count",children:[(0,o.jsx)("span",{className:"recipient-count-wrapper",children:w}),(0,o.jsxs)("span",{className:"recipient-count-text",children:[""+(w>1?"Recipients":"Recipient")," added"]})]}),(0,o.jsx)("span",{className:"total-amt-title",children:"Total payable amount"}),(0,o.jsx)("div",{children:(0,o.jsxs)("div",{className:"total-amt",children:[(0,o.jsx)("span",{className:"total-amt-digit",children:`${d.toFixed(2)} ${a}`}),(0,o.jsx)(s.A,{trigger:(0,o.jsx)("img",{src:c.PCH,alt:"info icon",className:"info-icon",height:"15px"}),content:(0,o.jsx)(r.g1,{config:N}),className:"currency-convertor-popup",hideOnScroll:!1,size:"huge",position:"left center"})]})})]})})};i(62230);const N=e=>{let{recipientList:t,fixedSourceCurrency:i,totalYouPayAmount:s,headingConfig:r,viewFor:l,onEditTransactionData:d,deleteTransaction:c}=e,u=t&&t.length>0;return(0,o.jsxs)("div",{className:"recipient-list-wrapper",children:[(0,o.jsx)(a,{config:r}),u?(0,o.jsxs)(n.Fragment,{children:[(0,o.jsx)(j,{onEditTransactionData:d,viewFor:l,config:t,deleteTransaction:c}),(0,o.jsx)(A,{config:t,fixedSourceCurrency:i,totalYouPayAmount:s})]}):(0,o.jsx)("div",{className:"disabled-para",children:(0,o.jsx)("p",{children:"No transactions added yet to proceed"})})]})}},98874(e,t,i){i.d(t,{A:()=>g});var n=i(9950),o=i(41001),a=i(20067),s=i(83664),r=i(76946),l=i(44414);
126class d extends n.Component{constructor(){super(),this.onfido=null}async componentDidMount(){const{accessToken:e,docs:t,id:i,mobileNum:n,countryCode:o,onSuccess:s}=this.props;this.props.disableLoader(),e&&(this.onfido=a.S.init({token:e,containerId:"onfido-mount",onComplete:()=>{s(i)},userDetails:{smsNumber:n},steps:[{type:"document",options:{forceCrossDevice:!0,documentTypes:{passport:!1,driving_license:!1,national_identity_card:!1,...t}}},{type:"face",options:{requestedVariant:"standard"}}],smsNumberCountryCode:o}))}componentWillUnmount(){this.props.clearOnfidoToken(),this.onfido&&this.onfido.tearDown()}render(){return(0,l.jsxs)("div",{className:"onfido-container",children:[(0,l.jsx)(s.A,{...this.props,className:"onfido-BackButton",isModal:!0,onCloseFn:this.props.onBackClick}),(0,l.jsx)("div",{id:"onfido-mount"})]})}}const c=(0,o.Ng)(null,{disableLoader:r.MV})(d);var u=i(47131),m=i(7258),p=i(33899),h=i(24115),_=i(13139),x=i(41711),v=i(28767),f=i(20945),y=i(64037);class b extends n.PureComponent{async componentDid
126Mount(){const{accessToken:e,initalizeOnfido:t,onfidoResponse:i,isNewOnboardingEnabledUser:n,dispatchOnfidoData:o}=this.props;!e&&n?o(i):(!e&&await t(),(0,f.$s)(_.SM,_.sk),(0,f.$s)(_.wc,_.sk,{kycType:"onfido"},y.s6.CLEVER_TAP))}componentDidUpdate(e){if(e.onfidoError!==this.props.onfidoError&&this.props.onfidoError){const{currentScreen:e,screens:t,timeline:i,changeScreen:n,onClose:o,isNewOnboardingEnabledUser:a,changeOnBoardingScreen:s}=this.props;a?s(v.TQ.ekycServiceDown):(o(!0),n(h.vtj,e,t,i))}}render(){const{accessToken:e,docs:t,id:i,countryCode:n,mobile:o,mobileCode:a,onSuccess:s,onBackClick:r,clearOnfidoToken:d}=this.props;return e&&(0,l.jsx)(c,{clearOnfidoToken:d,onBackClick:r,onSuccess:s,id:i,docs:t,accessToken:e,countryCode:n,mobileNum:`+${a}${o}`,updateDocsUploadedOrEverifiedSuccess:p.ak})}}const g=(0,o.Ng)(e=>{let{rootReducer:{userFlowReducer:{screens:t,currentScreen:i,timeline:n},userDataReducer:{userStateInfo:{remitterDetails:o={}}={},onfidoAccessToken:a,onfidoDocsToRender:s,onfidoApplicantId:r,onfidoError:l},newUserFlowReducer:{new_onboarding_enabled_users:d}}}=e;const{mobile_country_code:c="",mobile_number:u="",nationality_extended_code:m=""}=o;return{mobileCode:c,mobile:u,countryCode:m,accessToken:a,docs:s,id:r,screens:t,currentScreen:i,timeline:n,onfidoError:l,isNewOnboardingEnabledUser:d}},{initalizeOnfido:u.rz,clearOnfidoToken:u.oD,updateDocsUploadedOrEverifiedSuccess:p.ak,changeScreen:m.Xh,changeOnBoardingScreen:x.e0,dispatchOnfidoData:u.GB})(b)},50779(e,t,i){i.r(t),i.d(t,{default:()=>wn});var n=i(9950),o=i(41001),a=i(41711),s=i(76946),r=i(3164),l=i(59051),d=i.n(l),c=i(76653),u=i(96553),m=i(93631),p=i(1780),h=i(13217),_=i(52753),x=i(16762),v=i(88442),f=i(16152),y=i(16014),b=i(69510),g=i(93031),j=i(16384);var A=i(20659);const N={firstName:"",middleName:"",lastName:"",dob:"",nationality:"",personalInfoConsent:!1};var w=i(84706),S=i(44444),C=i(45892),D=i(13139),T=i(41397),E=i(28767),I=i(43880),R=i(61338),k=i(20945),O=i(64037),L=i(26185),F=i(57915),M=i(99674),P=i(44414);const $=(0,m.A)({form:v.Ehz,onSubmitFail:s.Nc})(e=>{var t,i,o,s,l,m,p,f,w,$;const{handleSubmit:U,getAllformVal:V,dispatch:B,activateLoader:Y,disableLoader:H,postPersonalInformation:z,remitterPersonalInfo:G,initialize:q,attemptCountFlag:K,countryCode:Q,addressInfo:W,fullName:X,remitterDetails:Z,errorModalState:J,formErrors:ee,isMiddleNameTouched:te}=e,[ie,ne]=(0,n.useState)(!0),oe=(0,S.Bp)(Q),ae=(0,S.I1)(S.jC.OnBoardingPersonalInfo,oe),se=null===ae||void 0===ae?void 0:ae.stepperData,[re,le]=(0,n.use
126State)(),[de,ce]=(0,n.useState)({});(0,n.useEffect)(()=>{(async()=>{Y(),await(async()=>{const e=await(0,S.Xl)(S.jC.OnBoardingPersonalInfo,oe),t=null===e||void 0===e?void 0:e.inputFields,i=(0,T.omit)(e,"inputFields");le(i),ce({firstName:(0,S.X$)(t,"FIRST_NAME_FIELD")||E.Aw.FIRST_NAME_FIELD,middleName:(0,S.X$)(t,"MIDDLE_NAME_FIELD")||E.Aw.MIDDLE_NAME_FIELD,lastName:(0,S.X$)(t,"LAST_NAME_FIELD")||E.Aw.LAST_NAME_FIELD,dateOfbirth:(0,S.X$)(t,"DOB_FIELD")||E.Aw.DOB_FIELD,nationality:(0,S.X$)(t,"NATIONALITY_FIELD")||E.Aw.NATIONALITY_FIELD})})(),H();const{remitter_individual_first_name:t,remitter_individual_last_name:i,remitter_individual_middle_name:n,date_of_birth:o,nationality:a}=e,s={firstName:t,middleName:n,lastName:i,dob:o,nationality:a,personalInfoConsent:null!==X};q((0,A.PJ)(N,s)),t&&!n&&B((0,c.Zg)(v.Ehz,"hasMiddleName",!0)),ne(!!K)})(),null!==J&&void 0!==J&&J.showModal&&ue()},[]);const ue=async()=>{await F.wh.builder(e=>(0,P.jsx)(M.A,{onClose:e,errorModalState:J}),"error-modal",!0)},me=(e,t)=>{B((0,c.Zg)(v.Ehz,e,!t)),"hasMiddleName"!==e||t||B((0,c.Zg)(v.Ehz,"middleName",null))},pe="Instarem";return(0,P.jsx)(r.vo,{children:(0,P.jsxs)(r.q,{padding:[30,0],children:[ie&&(0,P.jsx)("div",{className:"navigation-container",children:(0,P.jsx)("img",{onClick:()=>{B((0,a.e0)(y.D2))},className:"back-button",src:L.E71,alt:"back"})}),(0,P.jsx)(_.A,{heading:(null===re||void 0===re?void 0:re.heading)||"",headerLogo:L.sfn,stepNumber:null===se||void 0===se?void 0:se.stepNumber,totalSteps:null===se||void 0===se?void 0:se.totalSteps,extraWording:null===se||void 0===se?void 0:se.extraWording,subHeading:(null===re||void 0===re?void 0:re.description)||""}),(0,P.jsx)(r.MG,{marginTop:45,middleNameCheckboxMarginTop:null!==ee&&void 0!==ee&&ee.middleName&&te?40:12,children:(0,P.jsxs)("form",{onSubmit:U(async()=>{var e,t,i;(W&&!(0,T.isEqual)(W,{})||null!==Z&&void 0!==Z&&Z.formatted_address)&&B((0,a.Ei)(!0));const n={...V,dob:null===V||void 0===V||null===(e=V.dob)||void 0===e||null===(t=e.split("/"))||void 0===t||null===(i=t.reverse())||void 0===i?void 0:i.join("-"),middleName:null!==V&&void 0!==V&&V.middleName?V.middleName:""};Y();const o=await z(n);if(G(),o){var s,r,l,d;B((0,a.e0)(null===o||void 0===o||null===(s=o.data.data)||void 0===s||null===(r=s.data)||void 0===r||null===(l=r.nextOnboardProcess)||void 0===l||null===(d=l.transitions[0])||void 0===d?void 0:d.to));const e={pageName:"PersonalInformation"};(0,k.$s)("personalDetailsFilled",D.sk,e,O.s6.CLEVER_TAP)}H()}),children:[(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===V||void 0===V?void 0:V.firstName,parentClassName:"form-text-field",type:"text",name:"firstName",label:null===de||void 0===de||null===(t=de.firstName)||void 0===t?void 0:t.label,component:I.A,disableUnderlineStyling:!0,normalize:(0,j.$y)([(0,j.YR)(50)]),validate:[x.mw,x.vF],shrink:!0,placeholder:null===de||void 0===de||null===(i=de.firstName)||void 0===i?void 0:i.placeHolder})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsxs)(r.fv,{width:450,children:[(0,P.jsx)(u.A,{bindToThisObject:null===V||void 0===V?void 0:V.middleName,parentClassName:"form-text-field",type:"text",id:"middle-name",name:"middleName",label:null===de||void 0===de||null===(o=de.middleName)||void 0===o?void 0:o.label,component:I.A,disableUnderlineStyling:!0,validate:null!==V&&void 0!==V&&V.hasMiddleName?[x.OY]:[x.mw,x.OY],normalize:(0,j.YR)(50),disabled:null===V||void 0===V?void 0:V.hasMiddleName,shrink:!0,placeholder:null===de||void 0===de||null===(s=de.middleName)||void 0===s?void 0:s.placeHolder}),(0,P.jsx)("div",{className:"form-container__middle-name-check-container",children:(0,P.jsx)(u.A,{name:"hasMiddleName",checked:null===V||void 0===V?void 0:V.hasMiddleName,bindToThisObject:null===V||void 0===V?void 0:V.hasMiddleName,component:C.A,checkboxTextFontSize:"14",checkboxTextLineHeight:"22",broderBorder:!0,customImage:L.rl1,width:24,height:24,handleChange:()=>me("hasMiddleName",null===V||void 0===V?void 0:V.hasMiddleName),checkboxContent:(0,P.jsx)(P.Fragment,{children:"I don\u2019t have a middle name"})})})]})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===V||void 0===V?void 0:V.lastName,parentClassName:"form-text-field",type:"text",name:"lastName",component:I.A,validate:[x.mw,x.vF],normalize:(0,j.YR)(50),disableUnderlineStyling:!0,shrink:!0,placeholder:null===de||void 0===de||null===(l=de.lastName)||void 0===l?void 0:l.placeHolder,label:null===de||void 0===de||null===(m=de.lastName)||void 0===m?void 0:m.label})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===V||void 0===V?void 0:V.dob,type:"text",name:"dob",placeholder:null===de||void 0===de||null===(p=de.dateOfbirth)||void 0===p?void 0:p.label,component:h.A,maxDate:d()().subtract(18,"years"),validate:[x.mw],disableUnderlineStyling:!0,InputLabelProps:{shrink:!0},shrink:!0,customPlaceholder:null===de||void 0===de||null===(f=de.dateOfbirth)||void 0===f?void 0:f.placeHolder})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===V||void 0===V?void 0:V.nationality,parentClassName:"form-text-field",showLabel:!0,labelText:null===de||void 0===de||null===(w=de.nationality)||void 0===w?void 0:w.label,type:"text",name:"nationality",placeholder:null===de||void 0===de||null===($=de.nationality)||void 0===$?void 0:$.placeHolder,validate:[x.mw],component:b.A,disableUnderlineStyling:!0,width:"100%",url:`${g.H$}/countries/dropdown?is_nationality_activated=true&display_text=nationality`})})}),(0,P.jsx)(r.fI,{padding:[35,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:"MY"===oe||"EU"===oe||"GB"===oe?(0,P.jsx)(u.A,{name:"personalInfoConsent",checked:null===V||void 0===V?void 0:V.personalInfoConsent,bindToThisObject:null===V||void 0===V?void 0:V.personalInfoConsent,component:C.A,customImage:L.rl1,handleChange:()=>me("personalInfoConsent",null===V||void 0===V?void 0:V.personalInfoConsent),validate:[x.mw],disableUnderlineStyling:!0,showDisclaimer:!0,checkboxContent:(0,P.jsx)("span",{className:"disclaimer-text",children:(0,A.Ym)(null===re||void 0===re?void 0:re.onboardingConsent,{BRAND:pe})})}):(0,P.jsx)("p",{className:"consent-text",children:(0,A.Ym)(null===re||void 0===re?void 0:re.footerText,{BRAND:pe})})})}),(0,P.jsx)(r.fI,{padding:[24,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{text:null===re||void 0===re?void 0:re.primaryBtnText,width:450,height:46})})})]})})]})})}),U=(0,o.Ng)(function(e){var t,i,n,o;const{rootReducer:{newUserFlowReducer:{userInfo:a,attemptCountFlag:s,addressInfo:r,errorMod
126alState:l},userStatusReducer:{remitter_individual_first_name:d,remitter_individual_last_name:c,remitter_individual_middle_name:u,remitter_individual_full_name:m,date_of_birth:h,nationality:_,country_code:x},userDataReducer:{userStateInfo:{remitterDetails:f}}},form:y}=e,b=(0,p.A)(v.Ehz)(e);let g=null;var j;return null!==y&&void 0!==y&&null!==(t=y.personalInformation)&&void 0!==t&&t.syncErrors&&(g=null===y||void 0===y||null===(j=y.personalInformation)||void 0===j?void 0:j.syncErrors),{getAllformVal:b,formErrors:g,userInfo:a,remitter_individual_first_name:d,remitter_individual_last_name:c,remitter_individual_middle_name:u,date_of_birth:h,countryCode:x,attemptCountFlag:s,nationality:_,fullName:m,addressInfo:r,remitterDetails:f,errorModalState:l,isMiddleNameTouched:null===y||void 0===y||null===(i=y.personalInformation)||void 0===i||null===(n=i.fields)||void 0===n||null===(o=n.middleName)||void 0===o?void 0:o.touched}},{activateLoader:s.LI,disableLoader:s.MV,showMessage:f.rG,postPersonalInformation:a.rW,remitterPersonalInfo:w.rL,changeOnBoardingScreen:a.e0})($);var V=i(74742),B=i(91117),Y=i(62740),H=i(47131),z=i(98874),G=i(8670);const q=[{content:"Simply scan your document",dividerType:"OR",iconType:"ocrUpload",label:"Extract details",requiredDocumentList:[{header:"Original passport",iconType:"bulb",subHeader:"Faster approval"},{header:"Australian driver license"}],topBanner:"Recommended",value:"manual",isSelected:!0},{content:"Photo of document may be required later",dividerType:"plus",iconType:"manualUpload",label:"Enter manually",requiredDocumentList:[{header:"Personal details",subHeader:"Full name, DOB, nationality"},{header:"ID document details",subHeader:"Passport or Driver license"}],value:"extraction",isSelected:!1}],K="4a021d74-6de2-480a-87e1-67d492d59140";var Q=i(19533),W=i(70132);const X=W.Ay.div` 127 margin-top: 48px; 128 width: 100%; 129 max-width: 450px; 130 display: flex; 131 flex-direction: column; 132 border-radius: 8px; 133 gap: 12px; 134 padding: 16px; 135 border: 1px solid ${Q.lm.lightGrey}; 136`,Z=W.Ay.div` 137 height: 0; 138 width: 100%; 139 border: 0.5px solid ${Q.lm.lightGrey}; 140`,J=W.Ay.span` 141 font-family: ${Q.F2.hellix.bold}; 142 letter-spacing: 0; 143 line-height: 24px; 144 font-size: 16px; 145`,ee=W.Ay.span` 146 font-size: 14px; 147 line-height: 22px; 148 color: ${Q.lm.textGrey}; 149`,te=W.Ay.div` 150 width: 100%; 151 display: flex; 152 justify-content: space-between; 153`,ie=W.Ay.div` 154 width: 100%; 155 display: flex; 156 flex-direction: column; 157`,ne=W.Ay.div` 158 width: 100%; 159 display: flex; 160 gap: 11px; 161 align-items: center; 162 justify-content: center; 163`,oe=e=>{let{ekycData:{newFormat:t},countryCode:i,nationality:n}=e;const{sameNationalityDocRequired:o,title:a,description:s,otherNationalityDocRequired:r}=t||E.c9.ekycService.filter(e=>e.countryCode.includes(i))[0].ekycData.newFormat,l=i===n?o:r;return(0,P.jsxs)(X,{children:[(0,P.jsxs)(te,{children:[(0,P.jsxs)(ie,{children:[(0,P.jsx)(J,{children:a}),(0,P.jsx)(ee,{children:s})]}),(0,P.jsx)("img",{src:L.HwT,alt:"id card"})]}),(0,P.jsx)(Z,{}),null===l||void 0===l?void 0:l.map(e=>(0,P.jsxs)(ne,{children:[(0,P.jsx)("img",{src:`${v.hEb}${e.iconWeb}.svg`,alt:e.iconWeb}),(0,P.jsxs)(ie,{children:[(0,P.jsx)(J,{children:e.title}),(0,P.jsx)(ee,{children:e.description})]})]},e.title))]})},ae={bulb:L.EgC,plus:L.cZU,OR:L.aRw,ocrUpload:L.HwT,manualUpload:L.nXU},se=(0,o.Ng)(e=>{const{rootReducer:{userSessionReducer:{user_session:{remitter_id:t}},userStatusReducer:{country_code:i,account_type:n,nationality:o},userDataReducer:{userStateInfo:{remitterDetails:a}},newUserFlowReducer:{reKycDetails:s}}}=e;return{remitter_id:t,countryCode:i,nationality:o,account_type:n,remitterDetails:a,reKycDetails:s}},{getOCRAttemptCount:a.D1,changeOnBoardingScreen:a.e0,activateLoader:s.LI,disableLoader:s.MV,getUserInfo:a.ug,isJumioServiceAvailable:H.RO,isOnfidoServiceAvailable:H.UO,revampedOnfidoSuccessCall:H.pp,getNewUserFlow:G.e,fetchKycReviewD
163ata:a.Os})(e=>{var t,i;let{remitter_id:a,getOCRAttemptCount:s,changeOnBoardingScreen:l,activateLoader:d,disableLoader:c,getUserInfo:u,countryCode:m,nationality:p,isJumioServiceAvailable:h,isOnfidoServiceAvailable:x,revampedOnfidoSuccessCall:f,account_type:b,remitterDetails:g,getNewUserFlow:j,fetchKycReviewData:N,reKycDetails:w}=e;const C=(0,o.wA)(),[I,F]=(0,n.useState)(!0),[$,U]=(0,n.useState)([]),[H,G]=(0,n.useState)([]),Q={pageName:D.ED},W=(0,S.Bp)(m),[X,Z]=(0,n.useState)({extractDetails:!0,enterManually:!1}),[J,ee]=(0,n.useState)([]),te=async e=>{"AU"===e?(async()=>{var e,t,i,n;(0,k.$s)("expectationSettingScanned",D.sk,Q,O.s6.CLEVER_TAP);const o=document.getElementsByName("submitBtn")[0];d();const a=await s();null!==a&&void 0!==a&&null!==(e=a.data)&&void 0!==e&&e.success&&(null===a||void 0===a||null===(t=a.data)||void 0===t||null===(i=t.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.remainingAttemptCount)>0?o.click():ce(),c()})():"MY"===e?ne():"EU"!==W&&"GB"!==W||await ie(),c()},ie=async()=>{d();(0,k.$s)("eKYCStarted",D.sk,{pageName:"IdentityCheck"},O.s6.CLEVER_TAP);const e=await x();null!==e&&void 0!==e&&e.rateLimitError?(async e=>{const t={showModal:!0,message:e};await Y.wh.builder(e=>(0,P.jsx)(M.A,{onClose:e,errorModalState:t}),"error-modal",!0)})(e.errorMsg):null!==e&&void 0!==e&&e.noChangeScreenChange||(null===e||void 0===e||!e.isOnidoServiceActive||null!==g&&void 0!==g&&g.onfido_check_created?l(E.TQ.ekycServiceDown):await(async e=>{try{const t=e=>async t=>{try{var i,n,o;d();const a=await f(t),s=null===a||void 0===a||null===(i=a.data)||void 0===i||null===(n=i.data)||void 0===n||null===(o=n.data)||void 0===o?void 0:o.isAddressVerified;if(e(!0),c(),!1===s)return j(),l(E.TQ.manualDocumentUpload);"LT"===p&&v.y_c.includes(m)?(j(),l(E.TQ.identityVerificationInput)):l(a?E.TQ.holdingVerifyScreen:E.TQ.ekycServiceDown)}catch(a){e(!0),c(),l(E.TQ.ekycServiceDown)}},i=e=>()=>{e(!0),l(E.TQ.onfidoInitiate)};await Y.wh.builder(n=>(0,P.jsx)(z.A,{onClose:n,onSuccess:t(n),onBackClick:i(n),onfidoResponse:e}))}catch(t){console.error("err modal",t)}})(e))},ne=async()=>{const e=b===v.sOf;(0,k.$s)("eKYCStarted",D.sk,{pageName:"IdentityCheck"},O.s6.CLEVER_TAP),d();e&&await h(m)&&e&&(null===g||void 0===g||!g.jumio_check_created||w)?l(E.TQ.jumioVerification):l(E.TQ.ekycServiceDown)},se=()=>{(0,k.$s)(D.cV,D.sk,Q,O.s6.CLEVER_TAP),l(E.TQ.personalInformation)},re=(0,S.I1)(S.jC.IdentityCheck,W||""),le=null===re||void 0===re?void 0:re.stepperData;(0,n.useEffect)(()=>{ue(),N();(async()=>{d(),await(async()=>{const e=await(0,S.Xl)(S.jC.IdentityCheck,W||""),t=(0,T.omit)(e,"inputFields");U(t)})(),await(async()=>{const e=await(0,S.ML)(W,C);G(e),"AU"===m&&(e.sectionData.forEach((e,t)=>{e.isSelected=0===t}),ee((null===e||void 0===e?void 0:e.sectionData)||q))})(),c()})()},[]);const de=()=>{const e=(0,V.h)({host:"https://api.veriff.me",apiKey:K,parentId:"ocr-verification",onSession:async function(e,t){e?await ce():(0,B.Y)({url:t.verification.url,onEvent:async function(e){e===B.n.FINISHED&&await(async()=>{d();const e=await u();c(),null!==e&&void 0!==e&&e.ocr_failure&&ce()})()}})}});e.setParams({person:{givenName:" ",lastName:" "},vendorData:`${JSON.stringify({remitterId:a})}`}),e.mount({submitBtnText:"Scan ID document"})},ce=async()=>await Y.wh.builder(e=>(0,P.jsx)(r.Bs,{containerMarginTop:32,buttonTopMargin:16,buttonWidth:418,height:362,width:450,children:(0,P.jsxs)("div",{className:"modal-body-container",children:[(0,P.jsxs)("div",{className:"header-container",children:[(0,P.jsx)("div",{className:"image-container",children:(0,P.jsx)("img",{src:L.Kj,alt:"logo"})}),(0,P.jsx)("span",{className:"__unable-to-retrieve-info",children:y.ld.UNABLE_TO_RETRIEVE_INFO}),(0,P.jsx)("span",{className:"__enter-details-manually",children:y.ld.PROVIDE_DETAILS_MANUALLY})]}),(0,P.jsx)("button",{onClick:()=>(async e=>{await e(!0),se()})(e),className:"submit-button",children:y.ld.ENTER_DETAILS_MANUALLY})]})}),"send-money-bene-modal insta-modal center-modal",!0),ue=async()=>{if(d(),"AU"===m){var e,t,i,n;const o=await s();null!==o&&void 0!==o&&null!==(e=o.data)&&void 0!==e&&e.success&&(null===o||void 0===o||null===(t=o.data)||void 0===t||null===(i=t.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.remainingAttemptCount)>0?de():ce()}F(!1),c()};return(0,P.jsxs)(P.Fragment,{children:[!I&&(0,P.jsxs)(r.q,{padding:[-2,0],headingDescWidth:"AU"===m?450:"",marginTop:"AU"===m?48:-35,children:[("MY"===W||"EU"===W||"GB"===W)&&(0,P.jsx)("div",{className:"navigation-container",children:(0,P.jsx)("img",{className:"back-button",onClick:()=>{let e;"MY"===W?e=E.TQ.employmentInformation:"EU"!==W&&"GB"!==W||(e=E.TQ.accountUsageInput),l(e)},src:L.E71,alt:"back"})}),(0,P.jsx)(_.A,{heading:(null===$||void 0===$?void 0:$.heading)||"",headerLogo:L.C0E,stepNumber:null===le||void 0===le?void 0:le.stepNumber,totalSteps:null===le||void 0===le?void 0:le.totalSteps,subHeading:(null===$||void 0===$?void 0:$.description)||""}),(e=>{var t,i,n,o;if("AU"!==e)return"MY"===e?null!==H&&void 0!==H&&H.newFormat?(0,P.jsx)(oe,{ekycData:H,countryCode:e,nationality:p}):null:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsxs)("div",{className:"information-panel-container",children:[(0,P.jsxs)("div",{className:"header-container",children:[(0,P.jsx)("img",{alt:"document-id",src:L.kFD}),(0,P.jsx)("span",{children:null===H||void 0===H||null===(t=H.checkPoint)||void 0===t?void 0:t.t
163itle})]}),(0,P.jsxs)("div",{className:"process-list-container",children:[(0,P.jsxs)("ul",{className:"list",children:[(0,P.jsx)("li",{className:"list-item",children:(0,A.ts)(H,e,p)}),(0,P.jsx)("li",{className:"list-item",children:null===H||void 0===H||null===(i=H.checkPoint)||void 0===i?void 0:i.note2})]}),(null===H||void 0===H||null===(n=H.checkPoint)||void 0===n?void 0:n.poaNote)&&(0,P.jsx)("div",{className:"poa-note",children:null===H||void 0===H||null===(o=H.checkPoint)||void 0===o?void 0:o.poaNote})]})]})})})(m),"AU"===m&&(0,P.jsx)(r.J3,{children:J&&(null===J||void 0===J?void 0:J.map((e,t)=>(0,P.jsx)(r.KA,{isSelected:e.isSelected,children:(0,P.jsxs)(r.LI,{className:"recommended-div",children:[(null===e||void 0===e?void 0:e.topBanner)&&(0,P.jsx)("span",{className:"recommended-tag",children:null===e||void 0===e?void 0:e.topBanner}),(0,P.jsx)("div",{className:"radioButtonContainer",children:(0,P.jsxs)("div",{className:"radioButtonWrapper",children:[(0,P.jsx)("input",{type:"radio",id:`select-${t}`,name:"radioField",value:null===e||void 0===e?void 0:e.value,checked:null===e||void 0===e?void 0:e.isSelected,onClick:e=>{(e=>{const t=e.target.value,i=J.map(e=>({...e,isSelected:e.value===t}));"manual"===t?Z({extractDetails:!0,enterManually:!1}):"extraction"===t&&Z({extractDetails:!1,enterManually:!0}),ee(i)})(e)}}),(0,P.jsxs)("div",{className:"radioButtonLabel",children:[(0,P.jsx)(r.wB,{className:"extraMargin",children:null===e||void 0===e?void 0:e.label}),(0,P.jsx)(r.nn,{children:null===e||void 0===e?void 0:e.content})]})]},t)}),(null===e||void 0===e?void 0:e.isSelected)&&(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{className:"lightBorder"}),(0,P.jsxs)("div",{className:"radioContainer",children:[(0,P.jsx)("div",{className:"info",children:null===e||void 0===e?void 0:e.requiredDocumentList.map((t,i)=>(0,P.jsxs)("div",{className:"info",children:[(0,P.jsx)(r.PP,{children:null===t||void 0===t?void 0:t.header}),(0,P.jsxs)("p",{children:[(0,P.jsx)("span",{className:"inlineContent",children:(0,P.jsx)(r.nn,{children:null===t||void 0===t?void 0:t.subHeader})}),(null===t||void 0===t?void 0:t.iconType)&&(0,P.jsx)("span",{className:"inlineContent",children:(0,P.jsx)("img",{src:ae[null===t||void 0===t?void 0:t.iconType],alt:"lightBulb"})})]}),i<(null===e||void 0===e?void 0:e.requiredDocumentList.length)-1&&(0,P.jsx)("div",{className:"orContainer",children:(0,P.jsx)("img",{className:"orText",src:ae[null===e||void 0===e?void 0:e.dividerType],alt:"dividerType"})})]},i))}),(0,P.jsx)("div",{className:"phoneImage",children:(0,P.jsx)("img",{width:"100%",height:"100px",src:ae[null===e||void 0===e?void 0:e.iconType],alt:"lightBulb"})})]})]})]})},t)))}),"AU"!==m&&(0,P.jsx)(r.fk,{padding:[48,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{text:null!==(t=null===$||void 0===$?void 0:$.primaryBtnText)&&void 0!==t?t:"",width:450,height:46,onClick:()=>te(m)})})}),"AU"===m&&(0,P.jsx)(r.fk,{padding:[48,0,0,0],children:(0,P.jsxs)(r.fv,{width:450,children:[X.extractDetails&&(0,P.jsx)(R.A,{text:null!==(i=null===$||void 0===$?void 0:$.primaryBtnText)&&void 0!==i?i:"",width:450,height:46,onClick:()=>te(m)}),X.enterManually&&(0,P.jsx)(R.A,{text:null===$||void 0===$?void 0:$.secondaryBtnText,width:450,height:46,onClick:se})]})})]}),"AU"===m&&(0,P.jsx)(r.yc,{children:(0,P.jsx)("div",{className:"veriff-root",id:"ocr-verification"})})]})}),re=e=>{const t={document:[]};if(null!==e&&void 0!==e&&e.passportSelected){var i;const n={identityNumber:null===e||void 0===e?void 0:e.passport_identityNumber,identityType:"PASSPORT",expiryDate:null===e||void 0===e||null===(i=e.passport_expiryDate)||void 0===i?void 0:i.split("/").reverse().join("-"),issuedBy:null===e||void 0===e?void 0:e.passport_issuedBy,issuingCountry:null===e||void 0===e?void 0:e.passport_issuingCountry,placeOfIssue:null===e||void 0===e?void 0:e.passport_placeOfIssue};t.document.push(n)}if(null!==e&&void 0!==e&&e.drivingLicenseSelected){var n;const i={identityNumber:null===e||void 0===e?void 0:e.drivingLicense_identityNumber,identityType:"DRIVING_LICENSE",expiryDate:null===e||void 0===e||null===(n=e.drivingLicense_expiryDate)||void 0===n?void 0:n.split("/").reverse().join("-"),issuedBy:null===e||void 0===e?void 0:e.drivingLicense_issuedBy,issuingCountry:null===e||void 0===e?void 0:e.drivingLicense_issuingCountry,documentNumber:null===e||void 0===e?void 0:e.drivingLicense_documentNumber};t.document.push(i)}return t};const le=(0,m.A)({form:v.HlZ,onSubmitFail:s.Nc})(e=>{const{DOCUMENT_INFORMATION_HEADING:t,DOCUMENT_INFORMATION_SUB_HEADING:i,AUTO_APPROVED:n,NEXT:o,PASSPORT_DETAILS:s,HIGH_AUTO_APPROVAL_RATE:l,MODERATE_APPROVAL_RATE:m,DRIVING_LICENSE:p,SELECT_ONE_DOCUMENT:f,GOT_IT:A,CARD_NUMBER_TOOLTIP:N,LICENSE_NUMBER_TOOLTIP:w}=y.eD,{getAllformVal:D,dispatch:T,handleSubmit:E,activateLoader:R,disableLoader:k,saveDocuments:O,countryCode:F}=e,M=(0,S.I1)(S.jC.DocumentInformation,F),$=null===M||void 0===M?void 0:M.stepperData,U=(e,t)=>{T((0,c.Zg)(v.HlZ,t,e))};return(0,P.jsxs)(r.q,{padding:[50,0],children:[(0,P.jsx)("div",{className:"navigation-container",children:(0,P.jsx)("img",{onClick:()=>{T((0,a.e0)(y.Eh))},className:"back-button",src:L.E71,alt:"back"})}),(0,P.jsx)(_.A,{heading:t,headerLogo:L.xj0,stepNumber:null===$||void 0===$?void 0:$.stepNumber,totalSteps:null===$||void 0===$?void 0:$.totalSteps,extraWording:null===$||void 0===$?void 0:$.extraWording,subHeading:i}),(0,P.jsx)("div",{className:"information-panel-container",children:(0,P.jsxs)("div",{className:"header-container",children:[(0,P.jsx)("img",{alt:"document-id",src:L.Skg}),(0,P.jsx)("span",{children:(0,P.jsx)("p",{className:"auto-approved-text",children:n})})]})}),(0,P.jsx)(r.MG,{marginTop:18,children:(0,P.jsx)("form",{onSubmit:E(async()=>
163{if(null!==D&&void 0!==D&&D.passportSelected||null!==D&&void 0!==D&&D.drivingLicenseSelected){const o=re(D);R();const s=await O(o);var e,t,i,n;if(s)k(),T((0,a.e0)(null===s||void 0===s||null===(e=s.data.data)||void 0===e||null===(t=e.data)||void 0===t||null===(i=t.nextOnboardProcess)||void 0===i||null===(n=i.transitions[0])||void 0===n?void 0:n.to));k()}else Y.wh.builder(e=>(0,P.jsx)(r.J0,{children:(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{children:(0,P.jsx)(r.P1,{children:f})}),(0,P.jsx)("div",{children:(0,P.jsx)(r.b7,{onClick:()=>e(!1),margin:[48,0,0,0],children:A})})]})}),"documents-show-warning",!0)}),children:(0,P.jsxs)("div",{className:"document-info-container",children:[(0,P.jsx)(u.A,{name:"passportSelected",checked:null===D||void 0===D?void 0:D.passportSelected,bindToThisObject:null===D||void 0===D?void 0:D.passportSelected,component:C.A,customImage:L.rl1,handleChange:e=>U(e,"passportSelected"),checkboxContent:(0,P.jsxs)("div",{children:[(0,P.jsx)("p",{className:"documentTypeHeading",children:s}),(0,P.jsx)("p",{className:"documentTypeSubHeading",children:l})]})}),(null===D||void 0===D?void 0:D.passportSelected)&&(0,P.jsxs)("div",{children:[(0,P.jsx)(r.fI,{padding:[23,0,13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.passport_identityNumber,parentClassName:"form-text-field",type:"text",name:"passport_identityNumber",component:I.A,disableUnderlineStyling:!0,shrink:!0,normalize:(0,j.YR)(9),validate:null!==D&&void 0!==D&&D.passportSelected?[x.mw,x.id,x.$U]:[],placeholder:"Passport number",label:"Passport number"})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.passport_expiryDate,type:"text",name:"passport_expiryDate",placeholder:"Expiry date",minDate:d()(),component:h.A,validate:null!==D&&void 0!==D&&D.passportSelected?[x.mw]:[],disableUnderlineStyling:!0,InputLabelProps:{shrink:!0},customPlaceholder:"DD/MM/YYYY"})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.passport_issuingCountry,parentClassName:"form-text-field",type:"text",name:"passport_issuingCountry",showLabel:!0,labelText:"Issuing country",placeholder:"Select",component:b.A,width:"100%",validate:null!==D&&void 0!==D&&D.passportSelected?[x.mw]:[],disableUnderlineStyling:!0,url:`${g.H$}/countries/dropdown?extended_code=true&is_nationality_activated=true`})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.passport_identityNumber,parentClassName:"form-text-field",type:"text",name:"passport_placeOfIssue",component:I.A,disableUnderlineStyling:!0,shrink:!0,normalize:(0,j.YR)(255),validate:null!==D&&void 0!==D&&D.passportSelected?[x.mw,x.i_]:[],placeholder:"Place of Issue/Issuing authority",label:"Place of Issue/Issuing authority"})})})]}),(0,P.jsx)(u.A,{name:"drivingLicenseSelected",checked:null===D||void 0===D?void 0:D.drivingLicenseSelected,bindToThisObject:null===D||void 0===D?void 0:D.drivingLicenseSelected,component:C.A,customImage:L.rl1,handleChange:e=>U(e,"drivingLicenseSelected"),checkboxContent:(0,P.jsxs)("div",{children:[(0,P.jsx)("p",{className:"documentTypeHeading",children:p}),(0,P.jsx)("p",{className:"documentTypeSubHeading",children:m})]})}),(null===D||void 0===D?void 0:D.drivingLicenseSelected)&&(0,P.jsxs)("div",{children:[(0,P.jsx)(r.fI,{padding:[23,0,13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.drivingLicense_identityNumber,parentClassName:"form-text-field",type:"text",name:"drivingLicense_identityNumber",label:"Driver\u2019s license number",shrink:!0,placeholder:"License number",component:I.A,validate:null!==D&&void 0!==D&&D.drivingLicenseSelected?[x.mw,x.G7,x.$U]:[],disableUnderlineStyling:!0,normalize:(0,j.YR)(10),tooltipTitle:"License number",tooltip:w,tollTipSize:{height:"24px",width:"24px"}})})}),(0,P.jsx)(r.fI,{padding:[23,0,13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.drivingLicense_documentNumber,parentClassName:"form-text-field",type:"text",name:"drivingLicense_documentNumber",label:"Card number",shrink:!0,placeholder:"Card number",component:I.A,tooltipTitle:"Card number",tooltip:N,tollTipSize:{height:"24px",width:"24px"},validate:null!==D&&void 0!==D&&D.drivingLicenseSelected?[x.mw,x.G7]:[],disableUnderlineStyling:!0})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.drivingLicense_expiryDate,type:"text",name:"drivingLicense_expiryDate",placeholder:"Expiry date",component:h.A,minDate:d()(),validate:null!==D&&void 0!==D&&D.drivingLicenseSelected?[x.mw]:[],disableUnderlineStyling:!0,InputLabelProps:{shrink:!0},customPlaceholder:"DD/MM/YYYY"})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===D||void 0===D?void 0:D.drivingLicense_issuedBy,parentClassName:"form-text-field",type:"text",name:"drivingLicense_issuedBy",placeholder:"Select",labelText:"Issued by",showLabel:!0,width:"100%",component:b.A,validate:null!==D&&void 0!==D&&D.drivingLicenseSelected?[x.mw]:[],disableUnderlineStyling:!0,url:`${g.H$}/issuing-authority/dropdown?type=DRIVING_LICENSE_ISSUING_AUTHORITY&country_id=AU`})})})]}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(r.b7,{margin:[48,0,0,0],type:"submit",children:o})})})]})})})]})}),de=(0,o.Ng)(function(e){var t;const i=(0,p.A)(v.HlZ)(e),{rootReducer:{userStatusReducer:{country_code:n}},form:o}=e;let a=null;var s;return null!==o&&void 0!==o&&null!==(t=o.personalInformation)&&void 0!==t&&t.syncErrors&&(a=null===o||void 0===o||null===(s=o.personalInformation)||void 0===s?void 0:s.syncErrors),{getAllformVal:i,formErrors:a,countryCode:n}},{activateLoader:s.LI,disableLoader:s.MV,showMessage:f.rG,changeOnBoardingScreen:a.e0,saveDocuments:a.OF})(le);var ce=i(81920);const ue={country:"",issuedBy:"",number:"",type:"",validFrom:"",validUntil:"",dateOfBirth:"",firstName:"",middleName:"",lastName:"",nationality:"",documentNumber:"",hasMiddleName:!1,placeOfIssue:""},me=e=>{var t,i,n,o,a,s;return{firstName:null===e||void 0===e?void 0:e.firstName,middleName:null!==e&&void 0!==e&&e.middleName?null===e||void 0===e?void 0:e.middleName:"",lastName:null===e||void 0===e?void 0:e.lastName,dob:null===e||void 0===e||null===(t=e.dateOfBirth)||void 0===t||null===(i=t.split("/"))||void 0===i||null===(n=i.reverse())||void 0===n?void 0:n.join("-"),nationality:null===e||void 0===e?void 0:e.nationality,document:[{identityNumber:null===e||void 0===e?void 0:e.number,identityType:null===e||void 0===e?void 0:e.type,expiryDate:null===e||void 0===e||null===(o=e.validUntil)||void 0===o||null===(a=o.split("/"))||void 0===a||null===(s=a.reverse())||void 0===s?void 0:s.join("-"),issuedBy:null===e||void 0===e?void 0:e.issuedBy,country:null===e||void 0===e?void 0:e.country,documentNumber:null===e||void 0===e?void 0:e.documentNumber,placeOfIssue:null===e||void 0===e?void 0:e.placeOfIssue}]}};const pe=(0,m.A)({form:v.Ehz,onSubmitFail:s.Nc})(e=>{const{handleSubmit:t,updatePersonalInformation:i,changeOnBoardingScreen:o,getAllformVal:a,activateLoader:s,disableLoader:l,dispatch:m,getUserInfo:p,countryCode:f,editedRetrievedName:N,formErrors:w,isMiddleNameTouched:C}=e,{PERSONAL_INFORMATION_EDIT_SUBHEADING:D,CONSENT:T,NEXT:E}=y.id,{PASSPORT_DETAILS:R,DRIVERS_LICENSE:k,DRIVERS_LICENSE_NUMBER:O,PASSPORT_NUMBER:M,CARD_NUMBER_TOOLTIP:$,LICENSE_NUMBER_TOOLTIP:U,PLACE_OF_ISSUE:V}=y.H8,B=(0,S.I1)(S.jC.EditYourInformation,f),Y=null===B||void 0===B?void 0:B.stepperData,H=e=>{var t,i;return null===e||void 0===e||null===(t=e.split("-"))||void 0===t||null===(i=t.reverse())||void 0===i?void 0:i.join("/")};return(0,n.useEffect)(()=>{(async()=>{s(),await p(!0),l()})()},[]),(0,n.useEffect)(()=>{var t,i,n,o,a,r,d,c,u,m,p;s();const h={...null===e||void 0===e||null===(t=e.thisFormData)||void 0===t?void 0:t.documentDetails,...null===e||void 0===e||null===(i=e.thisFormData)||void 0===i?void 0:i.userDetails,editedRetrievedName:N,hasMiddleName:!(null!==(n=null===e||void 0===e||null===(o=e.thisFormData)||void 0===o||null===(a=o.userDetails)||void 0===a?void 0:a.middleName)&&void 0!==n?n:null===N||void 0===N?void 0:N.middleName),dateOfBirth:H(null===e||void 0===e||null===(r=e.thisFormData)||void 0===r||null===(d=r.userDetails)||void 0===d?void 0:d.dateOfBirth),validUntil:H(null===e||void 0===e||null===(c=e.thisFormData)||void 0===c||null===(u=c.documentDetails)||void 0===u?void 0:u.validUntil),placeOfIssue:(null===e||void 0===e||null===(m=e.thisFormData)||void 0===m||null===(p=m.documentDetails)||void 0===p?void 0:p.placeOfIssue)||(null===N||void 0===N?void 0:N.placeOfIssue)};e.initialize((0,A.PJ)(ue,h)),l()},[]),(0,P.jsxs)(r.q,{padding:[50,0],children:[(0,P.jsx)(_.A,{heading:"Edit Information",headerLogo:L.xj0,stepNumber:null===Y||void 0===Y?void 0:Y.stepNumber,totalSteps:null===Y||void 0===Y?void 0:Y.totalSteps,subHeading:D}),(0,P.jsx)(r.MG,{marginTop:45,middleNameCheckboxMarginTop:null!==w&&void 0!==w&&w.middleName&&C?40:12,children:(0,P.jsxs)("form",{onSubmit:t(async()=>{const e=me(a);s();const t=await i(e);var n,r,d,c;t&&(l(),m(o(null===t||void 0===t||null===(n=t.data.data)||void 0===n||null===(r=n.data)||void 0===r||null===(d=r.nextOnboardProcess)||void 0===d||null===(c=d.transitions[0])||void 0===c?void 0:c.to)));l()}),children:[(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.firstName,parentClassName:"form-text-field",type:"text",name:"firstName",label:"First name",component:I.A,disableUnderlineStyling:!0,normalize:(0,j.$y)([(0,j.YR)(50)]),validate:[x.mw,x.vF],shrink:!0,placeholder:"As in your ID document"})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsxs)(r.fv,{width:450,children:[(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.middleName,parentClassName:"form-text-field",type:"text",id:"middle-name",name:"middleName",label:"Middle name",shrink:!0,placeholder:"As in your ID document",component:I.A,disableUnderlineStyling:!0,normalize:(0,j.YR)(50),disabled:null===a||void 0===a?void 0:a.hasMiddleName,validate:null!==a&&void 0!==a&&a.hasMiddleName?[x.OY]:[x.mw,x.OY]}),(0,P.jsx)("div",{className:"form-container__middle-name-check-container",children:(0,P.jsx)(u.A,{name:"hasMiddleName",checked:null===a||void 0===a?void 0:a.hasMiddleName,bindToThisObject:null===a||void 0===a?void 0:a.hasMiddleName,component:F.Yh,checkboxTextFontSize:"14",checkboxTextLineHeight:"22",broderBorder:!0,customImage:L.rl1,width:24,height:24,handleChange:()=>{return e="hasMiddleName",t=null===a||void 0===a?void 0:a.hasMiddleName,m((0,c.Zg)(v.Ehz,e,!t)),void("hasMiddleName"!==e||t||m((0,c.Zg)(v.Ehz,"middleName",null)));var e,t},checkboxContent:(0,P.jsx)(P.Fragment,{children:"I don\u2019t have a middle name"})})})]})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.lastName,parentClassName:"form-text-field",type:"text",name:"lastName",label:"Last name",shrink:!0,placeholder:"As in your ID document",component:I.A,validate:[x.mw,x.vF],normalize:(0,j.YR)(50),disableUnderlineStyling:!0})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.dateOfBirth,type:"text",name:"dateOfBirth",placeholder:"Date of birth",component:h.A,formatString:"dd/MM/yyyy",maxDate:d()().subtract(18,"years"),validate:[x.mw],disableUnderlineStyling:!0,InputLabelProps:{shrink:!0},customPlaceholder:"DD/MM/YYYY"})})}),(0,P.jsx)(r.fI,{padding:[13,0,24,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.nationality,parentClassName:"form-text-field",type:"text",name:"nationality",labelText:"Nationality",showLabel:!0,placeholder:"Select",validate:[x.mw],component:b.A,width:"100%",disableUnderlineStyling:!0,url:`${g.H$}/countries/dropdown?is_nationality_activated=true&display_text=nationality`})})}),"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)?k:R,(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.number,parentClassName:"form-text-field",type:"text",name:"number",label:"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)?O:M,shrink:!0,placeholder:"Number",component:I.A,disableUnderlineStyling:!0,normalize:"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)?(0,j.YR)(10):(0,j.YR)(9),validate:"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)?[x.mw,x.G7,x.$U]:[x.mw,x.id,x.$U],tooltipTitle:"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)?"License number":"",tooltip:"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)?U:"",tollTipSize:{height:"24px",width:"24px"}})})}),"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)&&(0,P.jsx)(r.fI,{padding:[23,0,13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.documentNumber,parentClassName:"form-text-field",type:"text",name:"documentNumber",label:"Card number",shrink:!0,placeholder:"Card number",component:I.A,tooltip:$,tooltipTitle:"Card number",tollTipSize:{height:"24px",width:"24px"},validate:[x.mw,x.G7],disableUnderlineStyling:!0})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.validUntil,type:"text",name:"validUntil",placeholder:"Expiry date",component:h.A,minDate:d()(),validate:[x.mw],disableUnderlineStyling:!0,InputLabelProps:{shrink:!0},customPlaceholder:"DD/MM/YYYY"})})}),"DRIVING_LICENSE"===(null===a||void 0===a?void 0:a.type)&&(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.issuedBy,parentClassName:"form-text-field",type:"text",name:"issuedBy",placeholder:"Issued by",component:b.A,width:"100%",disableUnderlineStyling:!0,validate:[x.mw],url:`${g.H$}/issuing-authority/dropdown?type=DRIVING_LICENSE_ISSUING_AUTHORITY&country_id=AU`})})}),"PASSPORT"===(null===a||void 0===a?void 0:a.type)&&(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.country,parentClassName:"form-text-field",type:"text",name:"country",placeholder:"Issuing country",component:b.A,width:"100%",validate:[x.mw],disableUnderlineStyling:!0,url:`${g.H$}/countries/dropdown?extended_code=true&is_nationality_activated=true`})})}),"PASSPORT"===(null===a||void 0===a?void 0:a.type)&&(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===a||void 0===a?void 0:a.placeOfIssue,parentClassName:"form-text-field",type:"text",name:"placeOfIssue",label:V,shrink:!0,placeholder:"As in your passport",component:I.A,disableUnderlineStyling:!0,normalize:(0,j.YR)(50),validate:[x.mw,x.i_]})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)("p",{className:"user-consent",children:T})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(r.b7,{margin:[48,0,0,0],type:"submit",children:E})})})]})})]})}),he=(0,o.Ng)(function(e){var t,i,n,o;const a=(0,p.A)(v.Ehz)(e),{rootReducer:{newUserFlowReducer:{userInfo:s,editedRetrievedName:r},userStatusReducer:{country_code:l}},form:d}=e;let c=null;var u;return null!==d&&void 0!==d&&null!==(t=d.personalInformation)&&void 0!==t&&t.syncErrors&&(c=null===d||void 0===d||null===(u=d.personalInformation)||void 0===u?void 0:u.syncErrors),{getAllformVal:a,thisFormData:s,formErrors:c,countryCode:l,editedRetrievedName:r,isMiddleNameTouched:null===d||void 0===d||null===(i=d.personalInformation)||void 0===i||null===(n=i.fields)||void 0===n||null===(o=n.middleName)||void 0===o?void 0:o.touched}},{activateLoader:s.LI,disableLoader:s.MV,showMessage:f.rG,getUserInfo:a.ug,changeOnBoardingScreen:a.e0,updatePersonalInformation:a.k6}
163)(pe),_e={country:"",issuedBy:"",number:"",type:"",validFrom:"",validUntil:"",dateOfBirth:"",firstName:"",lastName:"",middleName:"",nationality:"",placeOfIssue:""};var xe=i(99141);const ve=e=>{const{CONFIRM:t}=y.d9,{showNationality:i,setShowNationality:o,header:a}=e,[s,l]=(0,n.useState)(200);return(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(xe.A,{open:i,children:(0,P.jsx)(r.$m,{containerMarginTop:32,buttonTopMargin:16,buttonWidth:418,height:s,width:450,children:(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{className:"closeBtn",children:(0,P.jsx)("img",{onClick:()=>{o(!1)},className:"app_promote_close",src:L.I4S,alt:"close"})}),(0,P.jsx)(r.IX,{children:a}),(0,P.jsx)("div",{className:"invalidFileNamesContainer",children:(0,P.jsx)("div",{className:"colorWhite",children:(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)("div",{className:"element-container",children:(0,P.jsx)(u.A,{bindToThisObject:null===e||void 0===e?void 0:e.nationality,parentClassName:"form-text-field",type:"text",name:null===e||void 0===e?void 0:e.name,placeholder:null!==e&&void 0!==e&&e.placeholderL
163abel?null===e||void 0===e?void 0:e.placeholderLabel:"",component:b.A,width:"100%",disableUnderlineStyling:!0,onDropdownChange:t=>{e.handleFieldChange(t,null===e||void 0===e?void 0:e.name),l(200)},url:null===e||void 0===e?void 0:e.apiUrl,onOpen:()=>{l(510)}})})})})}),(0,P.jsx)(r.fI,{padding:200===s?[25,0,0,0]:[320,0,0,0],children:(0,P.jsx)(r.b7,{onClick:()=>{o(!1)},margin:[0,0,0,0],children:t})})]})})})})},fe=W.Ay.div` 164 width: 100%; 165 max-width: 450px; 166 background: ${Q.lm.white}; 167 border-radius: 4px; 168 padding: 16px 16px 32px; 169 display: flex; 170 justify-content: flex-start; 171 flex-direction: column; 172 align-items: center; 173 .confirmation-modal__close-icon-container { 174 width: 100%; 175 .close-icon-container__icon { 176 float: right; 177 cursor: pointer; 178 height: 24px; 179 width: 24px; 180 } 181 } 182 .confirmation-modal__content-container { 183 width: 100%; 184 display: flex; 185 justify-content: flex-start; 186 align-items: flex-start; 187 flex-direction: column; 188 gap: 24px; 189 190 .content-container__heading { 191 font-size: 18px; 192 line-height: 26px; 193 width: 100%; 194 text-align: center; 195 letter-spacing: 0; 196 font-weight: 700; 197 font-family: ${Q.F2.hellix.bold}; 198 } 199 .content-container__description { 200 font-size: 16px; 201 line-height: 22px; 202 width: 100%; 203 text-align: center; 204 letter-spacing: 0; 205 } 206 207 .content-container__form-container { 208 width: 100%; 209 display: flex; 210 justify-content: flex-start; 211 align-items: flex-start; 212 flex-direction: column; 213 gap: 24px; 214 > * { 215 width: 100% !important; 216 } 217 .form-container__middle-name-check-container { 218 width: 100%; 219 margin-top: ${e=>e.middleNameCheckboxMarginTop?`${e.middleNameCheckboxMarginTop}px`:"12px"}; 220 } 221 .form-container__text-field { 222 width: 100% !important; 223 } 224 .MuiFormControl-root { 225 max-width: 100% !important; 226 margin: inherit !important; 227 } 228 .form-container__btn { 229 width: 100%; 230 height: 50px; 231 min-height: 50px; 232 } 233 } 234 } 235`;var ye=i(74168),be=i(89390);const ge={PASSPORT:"Passport",DRIVING_LICENSE:"Driving license"},je="retrievedInfoConfirmationForm",Ae=(0,m.A)({form:je})(e=>{var t;let{handleSubmit:i,onClose:a,getAllFormsData:s,initialize:r,docType:l}=e;const d=(0,o.wA)(),m=(0,o.d4)(e=>(0,p.A)(je)(e)),h=(0,o.d4)(e=>(0,ye.A)(je)(e)),_=(0,o.d4)(e=>(0,be.A)(je)(e)),f=null===_||void 0===_||null===(t=_.retrievedMiddleName)||void 0===t?void 0:t.touched;return(0,n.useEffect)(()=>{r({retrievedFirstName:(null===s||void 0===s?void 0:s.firstName)||"",retrievedLastName:(null===s||void 0===s?void 0:s.lastName)||"",retrievedMiddleName:(null===s||void 0===s?void 0:s.middleName)||""})},[]),(0,P.jsxs)(fe,{middleNameCheckboxMarginTop:null!==h&&void 0!==h&&h.retrievedMiddleName&&f?40:12,children:[(0,P.jsx)("div",{className:"confirmation-modal__close-icon-container",children:(0,P.jsx)("img",{src:L.I4S,alt:"close",className:"close-icon-container__icon",onClick:()=>a(!0)})}),(0,P.jsxs)("div",{className:"confirmation-modal__content-container",children:[(0,P.jsx)("span",{className:"content-container__heading",children:"Confirm your name"}),(0,P.jsxs)("span",{className:"content-container__description",children:["Review your name that we retrieved from your"," ",ge[l]," to make sure it's accurate."]}),(0,P.jsxs)("form",{className:"content-container__form-container",onSubmit:i(e=>{d((0,c.Zg)(v.cTy,"firstName",e.retrievedFirstName)),d((0,c.Zg)(v.cTy,"middleName",e.retrievedMiddleName)),d((0,c.Zg)(v.cTy,"lastName",e.retrievedLastName)),a(!0)}),children:[(0,P.jsx)(u.A,{component:F.JS,name:"retrievedFirstName",placeholder:"First name",bindToThisObject:null===m||void 0===m?void 0:m.retrievedFirstName,normalize:(0,x.YR)(50),validate:[x.vF],width:"100%",type:"text",shrink:!0}),(0,P.jsxs)("div",{children:[(0,P.jsx)(u.A,{component:F.JS,name:"retrievedMiddleName",placeholder:"Middle name",bindToThisObject:null===m||void 0===m?void 0:m.retrievedMiddleName,disabled:null===m||void 0===m?void 0:m.hasMiddleName,normalize:(0,x.YR)(50),validate:null!==m&&void 0!==m&&m.hasMiddleName?[]:[x.mw,x.OY],width:"100%",type:"text",shrink:!0}),(0,P.jsx)("div",{className:"form-container__middle-name-check-container",children:(0,P.jsx)(u.A,{name:"hasMiddleName",checked:null===m||void 0===m?void 0:m.hasMiddleName,bindToThisObject:null===m||void 0===m?void 0:m.hasMiddleName,component:F.Yh,checkboxTextFontSize:"14",checkboxTextLineHeight:"22",broderBorder:!0,customImage:L.rl1,width:24,height:24,handleChange:()=>{m.hasMiddleName||d((0,c.Zg)(je,"retrievedMiddleName",null)),d((0,c.Zg)(je,"hasMiddleName",!(null!==m&&void 0!==m&&m.hasMiddleName)))},checkboxContent:(0,P.jsx)(P.Fragment,{children:"I don\u2019t have a middle name"})})})]}),(0,P.jsx)(u.A,{component:F.JS,name:"retrievedLastName",placeholder:"Last name",bindToThisObject:null===m||void 0===m?void 0:m.retrievedLastName,normalize:(0,x.YR)(50),validate:[x.vF],width:"100%",type:"text",shrink:!0}),(0,P.jsx)(F.mU,{text:"Confirm",className:"form-container__btn"})]})]})]})}),Ne=W.Ay.div` 236 width: 100%; 237 height: 100%; 238 display: flex; 239 justify-content: center; 240 align-items: center; 241`,we=W.Ay.div` 242 width: 100%; 243 gap: 32px; 244 border-radius: 4px; 245 max-width: 450px; 246 background-color: ${Q.lm.white}; 247 padding: 16px 16px 32px; 248 display: flex; 249 flex-direction: column; 250`,Se=W.Ay.div` 251 width: 100%; 252 display: flex; 253 align-items: flex-end; 254 justify-content: flex-end; 255 img { 256 cursor: pointer; 257 width: 24px; 258 width: 24px; 259 } 260`,Ce=W.Ay.div` 261 width: 100%; 262 display: flex; 263 flex-direction: column; 264 .content-container__heading { 265 margin-bottom: 8px; 266 font-family: ${Q.F2.hellix.bold}; 267 font-size: 18px;
268 line-height: 26px; 269 text-align: center; 270 } 271 .content-container__description { 272 font-size: 16px; 273 color: ${Q.lm.textGrey}; 274 line-height: 22px; 275 text-align: center; 276 margin-bottom: 24px; 277 } 278 .MuiFormControl-root { 279 width: 100% !important; 280 margin: 0 !important; 281 max-width: 100% !important; 282 } 283 [class^='makeStyles-formControl-'], 284 [class*=' makeStyles-formControl-'] { 285 max-width: 100% !important; 286 } 287`,{PLACE_OF_ISSUE_MODAL_TITLE:De,PLACE_OF_ISSUE_MODAL_DESC:Te,PLACE_OF_ISSUE_MODAL_LABEL:Ee,PLACE_OF_ISSUE_MODAL_PLACEHOLDER:Ie,PLACE_OF_ISSUE_MODAL_SUBMIT:Re}=y.d9,ke=e=>{let{show:t,onClose:i,onSubmit:o}=e;const[a,s]=(0,n.useState)(""),[l,d]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),m=a.trim(),p=(0,x.i_)(m),h=l?m?null!==p&&void 0!==p?p:"":"Required":"",_=()=>{u(!1),s(""),d(!1),i()};return(0,P.jsx)(xe.A,{open:t,onClose:i,children:(0,P.jsx)(Ne,{children:(0,P.jsxs)(we,{children:[(0,P.jsx)(Se,{children:(0,P.jsx)("img",{onClick:_,className:"app_promote_close",src:L.I4S,alt:"close"})}),(0,P.jsxs)(Ce,{children:[(0,P.jsx)("span",{className:"content-container__heading",children:De}),(0,P.jsx)("span",{className:"content-container__description",children:Te}),(0,P.jsx)(F.JS,{type:"text",label:Ee,placeholder:Ie,shrink:c||!!a,input:{name:"placeOfIssue",value:a,onChange:e=>s(e.target.value),onBlur:()=>{u(!1),d(!0)},onFocus:()=>u(!0)},meta:{error:h,touched:l,active:!1}}),(0,P.jsx)(r.fI,{padding:[16,0,0,0],children:(0,P.jsx)(F.mU,{onClick:()=>{d(!0),m&&!p&&(o(m),_())},margin:"32px 0 0",text:Re,width:418})})]})]})})})};const Oe=(0,m.A)({form:v.cTy,onSubmitFail:s.Nc})(e=>{var t,i,o;const{handleSubmit:s,getAllformVal:l,dispatch:d,activateLoader:u,disableLoader:m,updatePersonalInformation:p,changeOnBoardingScreen:h,getUserInfo:x,initialize:f,countryCode:b,setEditedRetrievedNameAction:j}=e,{HEADING:N,SUB_HEADING:w,PERSONAL_DETAILS_SECTION:C,FIRST_NAME:T,LAST_NAME:I,MIDDLE_NAME:R,DATE_OF_BIRTH:F,NATIONALITY:M,NUMBER:$,EXP_DATE:U,ISSUING_COUNTRY:V,ISSUED_BY:B,USER_CONSENT:H,PASSPORT:z,DRIVERS_LICENSE:G,CONFIRM_DETAILS:q,DRIVING_LICENSE_ISSUER:K,SELECT_NATIONALITY:Q,EDIT_DETAILS:W,SELECT:X,COMPLETE_DETAILS:Z,GOT_IT:J,DRIVING_LICENSE_DOCUMENT:ee,PLACE_OF_ISSUE:te,ADD:ie}=y.d9,[ne,oe]=(0,n.useState)(!1),[ae,se]=(0,n.useState)(!1),[re,le]=(0,n.use
287State)(!1),[de,ce]=(0,n.useState)(!1),[ue,pe]=(0,n.useState)([]),[he,xe]=(0,n.useState)([]),fe={pageName:D.Cb},ye=(0,S.I1)(S.jC.RetrievedInformation,b),be=null===ye||void 0===ye?void 0:ye.stepperData,ge=e=>{"nationality"===e?oe(!0):"country"===e?se(!0):"issuedBy"===e&&le(!0)},je=async()=>{var e,t,i,n,o;u();const a=await x(),s=null===a||void 0===a||null===(e=a.data)||void 0===e||null===(t=e.data)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.data,r=null===s||void 0===s?void 0:s.userDetails,l=null===s||void 0===s?void 0:s.documentDetails;if(null!==a&&void 0!==a&&null!==(n=a.data)&&void 0!==n&&null!==(o=n.data)&&void 0!==o&&o.success&&r){const e={...l,...r};f((0,A.PJ)(_e,e));const t=(null===l||void 0===l?void 0:l.type)||"";r.firstName.split(" ").length+r.lastName.split(" ").length>=3&&!r.middleName&&await(async(e,t)=>await Y.wh.builder(i=>(0,P.jsx)(Ae,{onClose:i,getAllFormsData:e,docType:t}),"insta-modal center-modal",!0))(r,t)}m()},Ne=(e,t)=>{d((0,c.Zg)(v.cTy,t,e))};(0,n.useEffect)(()=>{je(),(0,a.jo)().then(e=>{pe(e)}).catch(()=>{pe([])}),(0,a.xq)().then(e=>{xe(e)}).catch(()=>{xe([])})},[]);return(0,P.jsxs)(r.q,{padding:[-2,0],children:[(0,P.jsx)(_.A,{heading:N,headerLogo:L.xj0,stepNumber:null===be||void 0===be?void 0:be.stepNumber,totalSteps:null===be||void 0===be?void 0:be.totalSteps,subHeading:w}),ne&&(0,P.jsx)(ve,{nationality:null===e||void 0===e||null===(t=e.getAllformVal)||void 0===t?void 0:t.nationality,setShowNationality:oe,showNationality:ne,handleFieldChange:Ne,name:"nationality",header:Q,apiUrl:`${g.H$}/countries/dropdown?is_nationality_activated=true&display_text=nationality`,placeholderL
287abel:"Nationality"}),ae&&(0,P.jsx)(ve,{nationality:null===e||void 0===e||null===(i=e.getAllformVal)||void 0===i?void 0:i.country,setShowNationality:se,showNationality:ae,handleFieldChange:Ne,name:"country",header:Q,placeholderLabel:"Nationality",apiUrl:`${g.H$}/countries/dropdown?extended_code=true&is_nationality_activated=true`}),re&&(0,P.jsx)(ve,{nationality:null===e||void 0===e||null===(o=e.getAllformVal)||void 0===o?void 0:o.issuedBy,setShowNationality:le,showNationality:re,handleFieldChange:Ne,name:"issuedBy",header:K,placeholderLabel:"Issued by",apiUrl:`${g.H$}/issuing-authority/dropdown?type=DRIVING_LICENSE_ISSUING_AUTHORITY&country_id=AU`}),(0,P.jsx)(ke,{show:de,onClose:()=>ce(!1),onSubmit:e=>Ne(e,"placeOfIssue")}),(0,P.jsx)(r.MG,{marginTop:45,children:(0,P.jsx)("form",{onSubmit:s(async()=>{if(("PASSPORT"===(null===l||void 0===l?void 0:l.type)?(null===l||void 0===l?void 0:l.country)&&(null===l||void 0===l?void 0:l.placeOfIssue):null===l||void 0===l?void 0:l.issuedBy)&&null!==l&&void 0!==l&&l.nationality){const o=me(l);u();const a=await p(o);var e,t,i,n;if(m(),a)(0,k.$s)("confirmDetailsClickedWeb",D.sk,fe,O.s6.CLEVER_TAP),d(h(null===a||void 0===a||null===(e=a.data.data)||void 0===e||null===(t=e.data)||void 0===t||null===(i=t.nextOnboardProcess)||void 0===i||null===(n=i.transitions[0])||void 0===n?void 0:n.to))}else Y.wh.builder(e=>(0,P.jsx)(r.$m,{children:(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{children:(0,P.jsx)(r.P1,{children:Z})}),(0,P.jsx)("div",{children:(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:385,children:(0,P.jsx)(r.b7,{onClick:()=>e(!1),margin:[48,0,0,0],children:J})})})})]})}),"show-warning",!0)}),children:(0,P.jsxs)("div",{className:"retrieved-info-container",children:[(0,P.jsx)(r.op,{children:C}),(0,P.jsx)(r.He,{}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[T," "]}),(0,P.jsxs)(r.nh,{children:[null===l||void 0===l?void 0:l.firstName," "]})]}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[R," "]}),(0,P.jsxs)(r.nh,{children:[(null===l||void 0===l?void 0:l.middleName)||"-"," "]})]}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[I," "]}),(0,P.jsxs)(r.nh,{children:[null===l||void 0===l?void 0:l.lastName," "]})]}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[F," "]}),(0,P.jsx)(r.nh,{children:null===l||void 0===l?void 0:l.dateOfBirth})]}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[M," "]}),null!==l&&void 0!==l&&l.nationality?(0,P.jsx)(r.nh,{children:(e=>{var t;let i=[];return i=ue.filter(t=>(null===t||void 0===t?void 0:t.key)===e),null===(t=i[0])||void 0===t?void 0:t.text})(null===l||void 0===l?void 0:l.nationality)}):(0,P.jsx)(r.DA,{onClick:()=>{ge("nationality")},children:(0,P.jsxs)("span",{children:[X,(0,P.jsx)(r.X3,{src:L.R1o,alt:"required"})]})})]}),(0,P.jsx)(r.op,{children:(null===l||void 0===l?void 0:l.type)===ee?G:z}),(0,P.jsx)(r.He,{}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[$," "]}),(0,P.jsx)(r.nh,{children:null===l||void 0===l?void 0:l.number})]}),(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[U," "]}),(0,P.jsx)(r.nh,{children:null===l||void 0===l?void 0:l.validUntil})]}),(null===l||void 0===l?void 0:l.type)===ee&&(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[B," "]}),null!==l&&void 0!==l&&l.issuedBy?(0,P.jsx)(r.nh,{children:null===l||void 0===l?void 0:l.issuedBy}):(0,P.jsx)(r.DA,{onClick:()=>{ge("issuedBy")},children:(0,P.jsxs)("span",{children:[X,(0,P.jsx)(r.X3,{src:L.R1o,alt:"required"})]})})]}),"PASSPORT"===(null===l||void 0===l?void 0:l.type)&&(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[V," "]}),null!==l&&void 0!==l&&l.country?(0,P.jsx)(r.nh,{children:(e=>{var t;let i=[];return i=he.filter(t=>(null===t||void 0===t?void 0:t.value)===e),null===(t=i[0])||void 0===t?void 0:t.text})(null===l||void 0===l?void 0:l.country)}):(0,P.jsx)(r.DA,{onClick:()=>{ge("country")},children:(0,P.jsxs)("span",{children:[X,(0,P.jsx)(r.X3,{src:L.R1o,alt:"required"})]})})]}),"PASSPORT"===(null===l||void 0===l?void 0:l.type)&&(0,P.jsxs)(r.im,{children:[(0,P.jsxs)(r.l4,{children:[te," "]}),null!==l&&void 0!==l&&l.placeOfIssue?(0,P.jsx)(r.nh,{children:null===l||void 0===l?void 0:l.placeOfIssue}):(0,P.jsx)(r.DA,{onClick:()=>ce(!0),children:(0,P.jsxs)("span",{children:[ie,(0,P.jsx)(r.X3,{src:L.R1o,alt:"required"})]})})]}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)("p",{children:H})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(r.b7,{margin:[48,0,0,0],type:"submit",children:q})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(r.DA,{onClick:()=>{(0,k.$s)("editDetailsWeb",D.sk,fe,O.s6.CLEVER_TAP);const e={firstName:l.firstName,middleName:l.middleName,lastName:l.lastName,placeOfIssue:l.placeOfIssue};
287j(e),h(E.TQ.ocrRetrivedInformationEdit)},className:"centre",children:W})})})]})})})]})}),Le=(0,o.Ng)(function(e){var t;const i=(0,p.A)(v.cTy)(e),{rootReducer:{newUserFlowReducer:{userInfo:n},userStatusReducer:{country_code:o}},form:a}=e;let s=null;var r;return null!==a&&void 0!==a&&null!==(t=a.personalInformation)&&void 0!==t&&t.syncErrors&&(s=null===a||void 0===a||null===(r=a.personalInformation)||void 0===r?void 0:r.syncErrors),{getAllformVal:i,thisFormData:n,formErrors:s,countryCode:o}},{activateLoader:s.LI,disableLoader:s.MV,showMessage:f.rG,getUserInfo:a.ug,updatePersonalInformation:a.k6,changeOnBoardingScreen:a.e0,setEditedRetrievedNameAction:a.FP})(Oe);var Fe=i(13432);var Me=i(93357),Pe=i(59355),$e=i(23225);const Ue=W.Ay.div` 288 width: 335px; 289 position: relative; 290 ${e=>e.isMobile&&"text-align: center;"} 291 .header { 292 font-size: 28px; 293 font-family: ${Pe.F.hellix.bold}; 294 line-height: 38px; 295 color: ${Me.A.black}; 296 } 297 .profileInReview { 298 font-size: 16px; 299 color: ${Me.A.textGrey}; 300 line-height: 26px; 301 font-family: ${Pe.F.hellix.bold}; 302 } 303 .sub-content { 304 font-family: ${Pe.F.hellix.regular}; 305 font-size: 16px; 306 line-height: 22px; 307 margin-top: 8px; 308 color: ${Me.A.black}; 309 } 310 .lotte { 311 right: 140px; 312 bottom: 190px; 313 position: absolute !important; 314 top: -90px !important; 315 margin-left: -153px; 316 } 317 318 .lotteMobile { 319 position: absolute !important; 320 top: -100px !important; 321 margin-left: 0 !important; 322 } 323`,Ve=W.Ay.div` 324 width: 331px; 325 margin: 6% 0% 0% 5%; 326 ${e=>e.isMobile&&"padding-top: 25px;"} 327 > div { 328 align-items: center; 329 padding-left: 16px; 330 box-sizing: border-box; 331 border-radius: 4px; 332 font-size: 14px; 333 column-gap: 25px; 334 .insta-number { 335 display: inline; 336 font-size: 18px; 337 line-height: 38px; 338 font-family: ${Pe.F.hellix.bold}; 339 color: ${Me.A.black}; 340 } 341 .number { 342 display: inline; 343 font-family: ${Pe.F.hellix.bold}; 344 font-style: normal; 345 font-weight: 700; 346 font-size: 24px; 347 line-height: 36px; 348 color: ${Me.A.black}; 349 } 350 .instaPoints { 351 font-family: ${Pe.F.hellix.regular}; 352 font-style: normal; 353 flex: none; 354 order: 1; 355 flex-grow: 0; 356 font-weight: 400; 357 } 358 359 .instaPointsText { 360 width: 303px; 361 height: 54px; 362 font-size: 14px !important; 363 line-height: 18px; 364 color: ${Me.A.textGrey}; 365 margin-bottom: 4%; 366 } 367 368 .instaremTerms { 369 width: 321px; 370 font-size: 12px !important; 371 line-height: 16px; 372 color: ${Me.A.textLightGrey}; 373 margin-top: 2% !important; 374 } 375 } 376`,Be=W.Ay.div` 377 justify-content: space-evenly; 378 align-items: center; 379 justify-content: center; 380 display: flex; 381 color: ${Me.A.black}; 382 min-height: 60vh; 383 384 ${e=>e.isMobile&&"flex-direction: column;\n align-items: center;\n width: 100% !important;\n "} 385 386 @media (max-width: 790px) { 387 min-height: 80vh; 388 } 389 @media (max-width: 375px) { 390 min-height: 100vh; 391 } 392 @media only screen and (max-width: ${$e.A.mobileXS}) { 393 padding: 0% 5% 0% 5%; 394 } 395`,Ye=(W.Ay.div` 396 height: 81px; 397 left: 0px; 398 top: 0px; 399 400 background: ${Me.A.white}; 401 box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.07); 402 align-items: center; 403 display: flex; 404 width: 100% !important; 405 406 .brand-logo-wrapper { 407 display: flex; 408 align-self: center; 409 margin-left: 120px; 410 a { 411 display: inline-block; 412 } 413 .brand-logo { 414 width: 160px; 415 height: 40px; 416 } 417 } 418`,W.Ay.div` 419 font-size: 16px; 420 line-height: 26px; 421 color: ${Me.A.darkBlue}; 422 margin-top: 20px; 423 font-family: ${Pe.F.hellix.bold}; 424 cursor: pointer; 425 ${e=>e.isMobile&&"display: flex; justify-content: center;"} 426 .external_link { 427 float: inherit; 428 } 429`),He=W.Ay.div` 430 @media only screen and (min-width: 551px) and (max-width: 790px) { 431 text-align: center; 432 } 433`;var ze=i(47577),Ge=i(9372),qe=i(81622);const Ke=()=>{(0,k.$s)("goToHomeFromOnb",D.sk,{pageName:"acknowledgementPage"},O.s6.CLEVER_TAP)},Qe=()=>{(0,k.$s)("sendMoneyInitiated",D.sk,{pageName:"acknowledgementPage"},O.s6.CLEVER_TAP)};var We=i(33899);const Xe=(0,o.Ng)(function(e){const{rootReducer:{userDataReducer:{instaPointsLogicData:t},userSessionReducer:{instapoint_balance:i},userStatusReducer:{source_currency:n,status:o,country_code:a},uiTriggerState:{device:s}}}=e;return{instaPointsLogicData:t,device:s,instapoint_balance:i,source_currency:n,status:o,country_code:a}},{getInstaPoints:qe.B,activateLoader:s.LI,disableLoader:s.MV})(e=>{const{ALL_SET:t,START_SENDING:i,GO_TO_HOME:o,GO_TO_HOME_SCREEN:a,YOU_EARNED:s,INSTA_POINTS_EXPIRY_DATES:l,INSTA_POINTS:d,SUBMITED_SUCCESSFULLY:c,PROFILE_IN_REVIEW:u,NOTIFY:m,SEND_MONEY:p}=y.yt,{activateLoader:h,disableLoader:_}
433=e,[x,f]=(0,n.useState)(),[b,g]=(0,n.useState)(!1),{status:j,country_code:A}=e,N=j===v.K3p,w=null===e||void 0===e?void 0:e.animated,S="DEVICE_MOBILE"===(null===e||void 0===e?void 0:e.device),{min_source_amount_limit:C,redemption_value:T,total_instapoints:E}=(null===e||void 0===e?void 0:e.instapoint_balance)||"",I=e=>{window.location.href=e},F=()=>{Ke(),I(v.$hu)},M=()=>{Qe(),I(v.nwo)};let $=100*T;$%1!==0&&($=+$.toFixed(2));const U=()=>{A&&g(v.y_c.includes(A))},V=async()=>{h(),U(),await(null===e||void 0===e?void 0:e.getInstaPoints()),await(async()=>{var e,n,a,r,l,h;const _=await(0,We.fA)("page4OnBoardingAcknowledgeInformation","MOBILE_ONBOARDING_ACKNOWLEDGE_INFORMATION"),x=null===_||void 0===_||null===(e=_.labels)||void 0===e?void 0:e.value,v=null===_||void 0===_||null===(n=_.heading)||void 0===n||null===(a=n.target)||void 0===a?void 0:a.fields,y={submittedSuccessfully:(null===v||void 0===v||null===(r=v.heading)||void 0===r?void 0:r.value)||c,allSet:(null===x||void 0===x?void 0:x.allSet)||t,profileInReview:(null===v||void 0===v||null===(l=v.subHeading)||void 0===l?void 0:l.value)||u,startSending:(null===x||void 0===x?void 0:x.startSendingMoneyNew)||i,notify:(null===v||void 0===v||null===(h=v.sub2heading)||void 0===h?void 0:h.value)||m,goToHome:(null===x||void 0===x?void 0:x.homeButtonNew)||o,sendMoney:(null===x||void 0===x?void 0:x.sendMoney)||p,youEarned:(null===x||void 0===x?void 0:x.youEarned)||s,instaPoints:(null===x||void 0===x?void 0:x.instaPoints)||d};f(y)})(),(()=>{const e={pageName:D.J5};(0,k.$s)("registrationCompleted",D.sk,e,O.s6.CLEVER_TAP)})(),U(),_()};return(0,n.useEffect)(()=>{V()},[]),(0,P.jsxs)(Be,{isMobile:S,children:[(0,P.jsxs)(Ue,{isMobile:S,children:[w&&(0,P.jsx)(ze.A,{loop:!1,play:!0,animationData:Ge,className:S?"lotteMobile":"lotte"}),(0,P.jsx)("div",{children:(0,P.jsx)("img",{className:S?"hillImageMobile":"hillImage",src:L.j1i,alt:"hill"})}),(0,P.jsx)("div",{children:(0,P.jsx)("div",{className:"header",children:(0,P.jsx)("div",{children:w?null===x||void 0===x?void 0:x.allSet:null===x||void 0===x?void 0:x.submittedSuccessfully})})}),!w&&(0,P.jsx)("div",{children:(0,P.jsx)("p",{className:"profileInReview",children:null===x||void 0===x?void 0:x.profileInReview})}),(0,P.jsx)("div",{children:(0,P.jsx)("p",{className:"sub-content",children:w?null===x||void 0===x?void 0:x.startSending:null===x||void 0===x?void 0:x.notify})}),!S&&(0,P.jsx)(r.fI,{padding:[48,0,0,0],children:b&&N?(0,P.jsx)(R.A,{width:243,onClick:M,text:null===x||void 0===x?void 0:x.sendMoney}):(0,P.jsx)(R.A,{width:243,text:null===x||void 0===x?void 0:x.goToHome,onClick:F})}),b&&N&&!S&&(0,P.jsx)("div",{children:(0,P.jsx)(Ye,{onClick:F,className:"link",id:"instapoint-read-about-text",isMobile:S,children:a})})]}),(0,P.jsxs)(Ve,{children:[(0,P.jsxs)("div",{className:"wrap",children:[(0,P.jsxs)("div",{className:"parent",children:[(0,P.jsx)("div",{className:"childLeft",children:(0,P.jsxs)("div",{children:[(0,P.jsx)("div",{className:"insta-text",children:(0,P.jsx)("p",{className:"youEarned",children:null===x||void 0===x?void 0:x.instaPoints})}),(0,P.jsxs)("div",{className:"inlineDisplay",children:[(0,P.jsx)("p",{className:"number",children:E})," ",(0,P.jsxs)("p",{className:"insta-number",children:[" ",null===x||void 0===x?void 0:x.instaPoints,"*"]})]})]})}),(0,P.jsx)("div",{className:"childRight",children:(0,P.jsx)("img",{className:"corner",src:L.nCy,alt:"hill"})})]}),(0,P.jsx)("div",{children:(0,P.jsx)("p",{className:"instaPoints instaPointsText",children:`100 InstaPoints give you a ${$} ${null===e||void 0===e?void 0:e.source_currency}\n discount when you transfer over \n ${C} ${null===e||void 0===e?void 0:e.source_currency}. Refer friends to earn more!`})})]}),(0,P.jsx)("div",{children:(0,P.jsxs)("p",{className:"instaPoints instaremTerms",children:["*",l]})})]}),S&&(0,P.jsx)(P.Fragment,{children:(0,P.jsx)(He,{children:w?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)("div",{children:(0,P.jsx)(r.fI,{padding:[48,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{onClick:M,text:null===x||void 0===x?void 0:x.sendMoney})})})}),(0,P.jsx)("div",{children:(0,P.jsx)(Ye,{onClick:F,className:"link",id:"instapoint-read-about-text",isMobile:S,children:a})})]}):(0,P.jsx)("div",{children:(0,P.jsx)(r.fI,{padding:[48,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{onClick:F,text:null===x||void 0===x?void 0:x.goToHome})})})})})})]})}),Ze=W.Ay.div` 434 min-height: 60vh; 435 display: flex; 436 flex-direction: column; 437 align-items: center; 438 justify-content: center; 439 width: 450px; 440 441 img { 442 width: 57px; 443 height: 57px; 444 } 445 446 .heading-text { 447 margin-top: 35px; 448 font-size: 28px; 449 line-height: 38px; 450 font-weight: 700; 451 font-family: ${Pe.F.hellix.bold}; 452 color: ${Me.A.black}; 453 } 454 455 .heading-description { 456 text-align: center; 457 margin-top: 8px; 458 font-size: 16px; 459 line-height: 22px; 460 font-weight: 400; 461 font-family: ${Pe.F.hellix.regular}; 462 color: ${Me.A.textGrey}; 463 } 464 465 .retry-ekyc-btn-container { 466 text-align: center; 467 margin-top: 24px; 468 469 .retry-btn { 470 font-size: 16px; 471 line-height: 24px; 472 font-weight: 700; 473 font-family: ${Pe.F.hellix.bold}; 474 color: ${Me.A.darkBlue}; 475 cursor: pointer; 476 } 477 } 478 479 @media ${$e.A.mobileXL} { 480 width: 95%; 481 } 482`;const Je=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{country_code:t,account_type:i},userDataReducer:{userStateInfo:{remitterDetails:n}}}}=e;return{countryCode:t,remitterDetails:n,account_type:i}},e=>({dispatch:e}))(e=>{var t,i;const{countryCode:o,dispatch:l}=e,d=Number(localStorage.getItem("eKYCRetryCount")),[c,u]=(0,n.use
482State)(d),[m,p]=(0,n.useState)(),h=(0,S.Bp)(o);(0,n.useEffect)(()=>{(async()=>{l((0,s.LI)()),await _(),l((0,s.MV)())})()},[]);const _=async()=>{const e=await(0,S.ML)(h,l);p(e)},x=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t={pageName:D.Q3};(0,k.$s)(e?"eKYCReAttempt":"iDDocUploadInitiated",D.sk,t,O.s6.CLEVER_TAP)};return(0,P.jsx)(r.q,{padding:[-2,0],children:(0,P.jsxs)(Ze,{children:[(0,P.jsx)("div",{children:(0,P.jsx)("img",{src:L.Kj,alt:"logo"})}),(0,P.jsx)("h1",{className:"heading-text",children:null===m||void 0===m?void 0:m.ekycServiceDownHeading}),(0,P.jsx)("div",{className:"heading-description",children:null===m||void 0===m?void 0:m.ekycServiceDownDescription}),v.y_c.includes(o)?null:(0,P.jsx)(r.fk,{padding:[48,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{text:null!==(t=null===m||void 0===m?void 0:m.proceedWithManualUpload)&&void 0!==t?t:"",onClick:()=>{x(),l((0,a.e0)(E.TQ.individualDocumentsUpload))},width:450,height:46})})}),(v.y_c.includes(o)||"MY"===o)&&c>0&&(0,P.jsx)("div",{className:"retry-ekyc-btn-container",children:(0,P.jsx)(R.A,{type:"link",text:null!==(i=null===m||void 0===m?void 0:m.retryEkyc)&&void 0!==i?i:"",onClick:()=>{localStorage.setItem("eKYCRetryCount",(c-1).toString()),u(c-1),x(!0),l((0,a.e0)(E.TQ.jumioInitiate))}})})]})})}),et={employment_status:"",occupation:"",employment_status_meta:"",nature_of_self_employment:"",intended_use_of_account:""},tt=(0,m.A)({form:v.IMJ,onSubmitFail:s.Nc});const it=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{country_code:t},userDataReducer:{userStateInfo:{remitterDetails:i}}}}=e;return{getAllformVal:(0,p.A)(v.IMJ)(e),countryCode:t,remitterDetails:i}},{activateLoader:s.LI,disableLoader:s.MV,submitEmploymentInfo:a.Ly,getNewUserFlow:G.e})(tt(e=>{var t;const{handleSubmit:i,getAllformVal:o,dispatch:s,countryCode:l,initialize:d,submitEmploymentInfo:m,getNewUserFlow:p,remitterDetails:h,activateLoader:f,disableLoader:y}=e,[b,N]=(0,n.useState)(),[w,C]=(0,n.useState)(),[I,R]=(0,n.useState)([]),M=(0,S.I1)(S.jC.EmploymentInformation,l),$=null===M||void 0===M?void 0:M.stepperData;(0,n.useEffect)(()=>{(async()=>{var e;f(),(async()=>{var e,t,i,n,o,a,s,r,d,c,u,m,p,h;const _=await(0,S.Xl)(S.jC.EmploymentInformation,l);N(_);const x=null===_||void 0===_?void 0:_.inputFields;C({employmentStatus:(null===(e=(0,S.X$)(x,"EMPLOYMENT_STATUS_FIELD"))||void 0===e?void 0:e.placeHolder)||(null===(t=E.YB.EMPLOYMENT_STATUS_FIELD)||void 0===t?void 0:t.placeHolder),occupation:(null===(i=(0,S.X$)(x,"OCCUPATION_FIELD"))||void 0===i?void 0:i.placeHolder)||(null===(n=E.YB.OCCUPATION_FIELD)||void 0===n?void 0:n.placeHolder),employerName:(null===(o=(0,S.X$)(x,"EMPLOYER_NAME_FIELD"))||void 0===o?void 0:o.placeHolder)||(null===(a=E.YB.EMPLOYER_NAME_FIELD)||void 0===a?void 0:a.placeHolder),purposeOfAccount:(null===(s=(0,S.X$)(x,"PURPOSE_OF_ACCOUNT_FIELD"))||void 0===s?void 0:s.placeHolder)||(null===(r=E.YB.PURPOSE_OF_ACCOUNT_FIELD)||void 0===r?void 0:r.placeHolder),reasonOfUnEmployment:(null===(d=(0,S.X$)(x,"REASON_OF_UNEMPLOYMENT_FIELD"))||void 0===d?void 0:d.placeHolder)||(null===(c=E.YB.REASON_OF_UNEMPLOYMENT_FIELD)||void 0===c?void 0:c.placeHolder),natureOfSelfEmployment:(null===(u=(0,S.X$)(x,"NATURE_OF_SELF_EMPLOYMENT_FIELD"))||void 0===u?void 0:u.placeHolder)||(null===(m=E.YB.NATURE_OF_SELF_EMPLOYMENT_FIELD)||void 0===m?void 0:m.placeHolder),universityName:(null===(p=(0,S.X$)(x,"UNIVERSITY_NAME_FIELD"))||void 0===p?void 0:p.placeHolder)||(null===(h=E.YB.UNIVERSITY_NAME_FIELD)||void 0===h?void 0:h.placeHolder)})})();const t=await(0,We.nv)({url:`${g.H$}/instarem-objects/dropdown?type=${v.sE_}`,withCredentials:!0});null!==t&&void 0!==t&&null!==(e=t.data)&&void 0!==e&&e.success&&t.data.data&&R(t.data.data),(()=>{const e={employment_status:(null===h||void 0===h?void 0:h.employment_status)||"",occupation:(null===h||void 0===h?void 0:h.occupation)||"",employment_status_meta:(null===h||void 0===h?void 0:h.employment_status_meta)||"",nature_of_self_employment:(null===h||void 0===h?void 0:h.nature_of_self_employment)||"",intended_use_of_account:(null===h||void 0===h?void 0:h.intended_use_of_account)||""};d((0,A.PJ)(et,e))})(),y()})()},[]);const U=()=>(null===o||void 0===o?void 0:o.employment_status)&&(0,T.get)((0,T.find)(I,{key:null===o||void 0===o?void 0:o.employment_status}),"code","");return(0,P.jsxs)(r.q,{padding:[-2,0],children:[(0,P.jsx)("div",{className:"navigation-container",children:(0,P.jsx)("img",{onClick:()=>{s((0,a.eG)(!0)),s((0,a.e0)(E.TQ.addressInput))},className:"back-button",src:L.E71,alt:"back"})}),(0,P.jsx)(_.A,{heading:(null===b||void 0===b?void 0:b.heading)||"",headerLogo:L.Tqy,stepNumber:null===$||void 0===$?void 0:$.stepNumber,totalSteps:null===$||void 0===$?void 0:$.totalSteps,subHeading:(null===b||void 0===b?void 0:b.description)||""}),(0,P.jsx)(r.MG,{marginTop:45,children:(0,P.jsxs)("form",{onSubmit:i(async()=>{var e;f();const t={employmentStatusId:(null===o||void 0===o?void 0:o.employment_status)||"",occupationId:(null===o||void 0===o?void 0:o.occupation)||"",employmentStatusMeta:(null===o||void 0===o?void 0:o.employment_status_meta)||"",natureOfSelfEmploymentId:(null===o||void 0===o?void 0:o.nature_of_self_employment)||"",intendedUseOfAccountId:(null===o||void 0===o?void 0:o.intended_use_of_account)||""},i=await m(t);if(null!==i&&void 0!==i&&null!==(e=i.data)&&void 0!==e&&e.success){var n,r,d,c,u,h,_,x,v,b;p(),(()=>{const e={pageName:D.Ae};(0,k.$s)(D.rk,D.sk,e,O.s6.CLEVER_TAP)})();const e=null===i||void 0===i||null===(n=i.data)||void 0===n||null===(r=n.data)||void 0===r||null===(d=r.nextOnboardProcess)||void 0===d||null===(c=d.transitions[0])||void 0===c?void 0:c.to;if("AU"===l)return void s((0,a.e0)(e));const t=!1===(null===i||void 0===i||null===(u=i.data)||void 0===u||null===(h=u.data)||void 0===h||null===(_=h.data)||void 0===_?void 0:_.identity),o=!1===(null===i||void 0===i||null===(x=i.data)||void 0===x||null===(v=x.data)||void 0===v||null===(b=v.data)||void 0===b?void 0:b.address);s(t&&o||t?(0,a.e0)(E.TQ.manualDocumentUploadId):o?(0,a.e0)(E.TQ.manualDocumentUpload):(0,a.e0)(e))}y()}),children:[(0,P.jsx)(r.fI,{padding:[10,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.employment_status,type:"text",name:"employment_status",placeholder:null===w||void 0===w?void 0:w.employmentStatus,validate:[x.mw],component:F.Z$,width:"100%",onDropdownChange:()=>{s((0,c.Zg)(v.IMJ,"employment_status_meta",null)),s((0,c.Zg)(v.IMJ,"nature_of_self_employment",null))},staticValues:I})})}),(null===o||void 0===o?void 0:o.employment_status)&&(0,P.jsx)(r.fI,{padding:[10,0],shouldHide:!!["UNEMPLOYED","STUDENT","RETIRED",""].includes(U()),children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.occupation,type:"text",name:"occupation",placeholder:null===w||void 0===w?void 0:w.occupation,component:F.Z$,width:"100%",validate:[x.mw],dependedOnObject:null===o||void 0===o?void 0:o.employment_status,preselect_and_disable_if_one_item:!0,url:`${g.H$}/occupation/dropdown?country_code=${l}&account_type=INDIVIDUAL${null!==o&&void 0!==o&&o.employment_status?"&employment_status_id="+(null===o||void 0===o?void 0:o.employment_status):""}`})})}),U()===v.KbZ&&(0,P.jsx)(r.fI,{padding:[15,0,10,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.employment_status_meta,parentClassName:"form-text-field",type:"text",name:"employment_status_meta",component:F.JS,maxWidth:"450px",validate:[x.mw,x.gJ,x.tV],normalize:(0,j.YR)(50),disableUnderlineStyling:!0,showLabel:!0,placeholder:null===w||void 0===w?void 0:w.employerName})})}),U()===v.nob&&(0,P.jsx)(r.fI,{padding:[10,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.nature_of_self_employment,type:"text",name:"nature_of_self_employment",placeholder:null===w||void 0===w?void 0:w.natureOfSelfEmployment,validate:[x.mw],component:F.Z$,width:"100%",url:g.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})})}),U()===v.xgU&&(0,P.jsx)(r.fI,{padding:[15,0,10,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.employment_status_meta,parentClassName:"form-text-field",type:"text",name:"employment_status_meta",component:F.JS,maxWidth:"450px",validate:[x.mw,x.gJ,x.tV],normalize:(0,j.YR)(50),disableUnderlineStyling:!0,showLabel:!0,placeholder:null===w||void 0===w?void 0:w.reasonOfUnEmployment})})}),U()===v.O89&&(0,P.jsx)(r.fI,{padding:[15,0,10,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.employment_status_meta,parentClassName:"form-text-field",type:"text",name:"employment_status_meta",component:F.JS,maxWidth:"450px",validate:[x.mw,x.gJ,x.tV],normalize:(0,j.YR)(50),disableUnderlineStyling:!0,showLabel:!0,placeholder:null===w||void 0===w?void 0:w.universityName})})}),"AU"!==l&&(0,P.jsx)(r.fI,{padding:[10,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===o||void 0===o?void 0:o.intended_use_of_account,name:"intended_use_of_account",type:"text",component:F.Z$,width:"100%",validate:[x.mw],placeholder:null===w||void 0===w?void 0:w.purposeOfAccount,className:"theme-dropdown",url:g.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=INDIVIDUAL"})})}),(0,P.jsx)(r.fI,{padding:[38,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(F.mU,{text:null!==(t=null===b||void 0===b?void 0:b.primaryBtnText)&&void 0!==t?t:"",width:450,height:46})})})]})})]})})),nt=W.Ay.div` 483 border: 1px solid rgba(72, 250, 255, 0.4); 484 background-color: rgba(72, 250, 255, 0.1); 485 display: flex; 486 padding: 12px 16px; 487 font-family: ${Pe.F.hellix.regular}; 488 font-size: 14px; 489 line-height: 18px; 490 color: ${Me.A.textGrey}; 491 margin-top: 36px; 492`,ot=W.Ay.div` 493 display: flex; 494 justify-content: center; 495 margin-top: 70px; 496`,at=W.Ay.div` 497 margin-right: 12px; 498`,st=W.Ay.div` 499 font-family: ${Pe.F.hellix.regular}; 500 font-size: 16px; 501 line-height: 22px; 502 color: ${e=>{let{manualdataText:t}=e;return t?`${Me.A.black}`:`${Me.A.textGrey}`}}; 503 margin-top: 8px; 504 text-align: center; 505`,rt=W.Ay.div` 506 font-family: ${Pe.F.hellix.bold}; 507 font-size: 16px; 508 line-height: 22px; 509 color: ${Me.A.textGrey}; 510 margin-top: 8px; 511`,lt=W.Ay.div` 512 display: flex; 513 flex-direction: column; 514 max-width: 450px; 515 align-items: center; 516 .link { 517 width: 100%; 518 text-align: center; 519 } 520 521 @media ${$e.A.mobileXL} { 522 margin: 14px; 523 } 524`,dt=W.Ay.div` 525 font-family: ${Pe.F.hellix.bold}; 526 font-size: 28px; 527 line-height: 38px; 528 text-align: center; 529 color: ${Me.A.black}; 530`,ct=W.Ay.button` 531 width: 100%; 532 background-color: ${Me.A.brandPrimary}; 533 height: 46px; 534 color: ${Me.A.white}; 535 font-size: 16px; 536 line-height: 24px; 537 font-weight: 700; 538 border: none; 539 outline: none; 540 border-radius: 4px; 541 cursor: pointer; 542 margin-top: 36px; 543`,ut=W.Ay.button` 544 color: ${Me.A.darkBlue}; 545 text-decoration: none; 546 font-family: ${Pe.F.hellix.bold}; 547 font-size: 16px;
548 line-height: 26px; 549 cursor: pointer; 550 margin-top: 24px; 551 background: none; 552 border: none; 553`,mt=W.Ay.div` 554 margin-top: -110px; 555 margin-bottom: 28px; 556 @media${$e.A.mobileXL} { 557 margin-bottom: 35px; 558 } 559`;var pt=i(58118);const ht=e=>(0,P.jsxs)(lt,{children:[(0,P.jsx)(ze.A,{loop:!1,play:!0,animationData:Ge,className:"lotte"}),(0,P.jsx)(mt,{children:(0,P.jsx)("img",{src:L.j1i,alt:"successIcon"})}),(0,P.jsx)(dt,{children:null===e||void 0===e?void 0:e.title}),null===e||void 0===e?void 0:e.description,(0,P.jsx)(ct,{onClick:()=>{var t;t=null===e||void 0===e?void 0:e.onPrimaryButtonClickredirectUrl,window.location.href=t,e.isApproved&&Qe()},children:null===e||void 0===e?void 0:e.primaryButtontext}),(null===e||void 0===e?void 0:e.secondaryButtonText)&&(0,P.jsx)(pt.N_,{to:(0,A.FI)(null===e||void 0===e?void 0:e.onSecondaryButtonClickredirectUrl),className:"link",onClick:Ke,children:(0,P.jsx)(ut,{children:null===e||void 0===e?void 0:e.secondaryButtonText})})]});const _t=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{source_currency:t,nationality:i,status:n},userDataReducer:{instaPointsLogicData:o}}}=e;return{nationality:i,source_currency:t,instaPointsLogicData:o,status:n}},{activateLoader:s.LI,disableLoader:s.MV})(e=>{var t,i,o,a,s,r;const[l,d]=(0,n.useState)({}
559),[c,u]=(0,n.useState)({}),{status:m}=e,p=m===v.K3p;(0,n.useEffect)(()=>{(async()=>{null===e||void 0===e||e.activateLoader(),await(async()=>{var e,t,i;const n=await(0,We.fA)("page4OnBoardingAcknowledgeInformation","MOBILE_ONBOARDING_ACKNOWLEDGE_INFORMATION");d(null===n||void 0===n||null===(e=n.labels)||void 0===e?void 0:e.value),u(null===n||void 0===n||null===(t=n.heading)||void 0===t||null===(i=t.target)||void 0===i?void 0:i.fields)})(),null===e||void 0===e||e.disableLoader()})()},[]),(0,n.useEffect)(()=>{(()=>{const e={pageName:D.Tw};(0,k.$s)(p?"eVerificationSuccess":"eKYCAttempted",D.sk,e,O.s6.CLEVER_TAP)})()},[m]);const h=Object.keys(null===e||void 0===e||null===(t=e.instaPointsLogicData)||void 0===t||null===(i=t.additional_info)||void 0===i?void 0:i.LEVEL_1_KYC_COMPLETED)[0],_=`${null===e||void 0===e||null===(o=e.instaPointsLogicData)||void 0===o||null===(a=o.additional_info)||void 0===a||null===(s=a.LEVEL_1_KYC_COMPLETED[h])||void 0===s?void 0:s.transaction_limit} ${h}`;return(0,P.jsx)(ot,{children:(0,P.jsx)(ht,{isApproved:p,title:p?(null===l||void 0===l?void 0:l.allSet)||`${E.EL.allSet}`:(null===c||void 0===c||null===(r=c.heading)||void 0===r?void 0:r.value)||`${null===E.Tn||void 0===E.Tn?void 0:E.Tn.heading}`,description:(()=>{var t,i;return p?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(st,{children:(null===l||void 0===l?void 0:l.startSendingMoneyNew)||`${E.EL.startSendingMoneyNew}`}),"MY"!==(null===e||void 0===e?void 0:e.nationality)&&(0,P.jsxs)(nt,{children:[(0,P.jsx)(at,{children:(0,P.jsx)("img",{src:L.Vlf,alt:"transfer-icon"})}),(0,A.Ym)((null===l||void 0===l?void 0:l.myTransferNote)||`${E.EL.myTransferNote}`,{limit_currency:_})]})]}):(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(rt,{children:(null===c||void 0===c||null===(t=c.subHeading)||void 0===t?void 0:t.value)||`${null===E.Tn||void 0===E.Tn?void 0:E.Tn.subHeading}`}),(0,P.jsx)(st,{manualdataText:!0,children:(null===c||void 0===c||null===(i=c.sub2heading)||void 0===i?void 0:i.value)||`${null===E.Tn||void 0===E.Tn?void 0:E.Tn.sub2heading}`})]})})(),primaryButtontext:p?(null===l||void 0===l?void 0:l.sendMoney)||`${E.EL.sendMoney}`:(null===l||void 0===l?void 0:l.homeButtonNew)||`${E.EL.homeButtonNew}`,onPrimaryButtonClickredirectUrl:p?v.nwo:v.$hu,secondaryButtonText:p?(null===l||void 0===l?void 0:l.successGoToHomeScreen)||`${E.EL.successGoToHomeScreen}`:"",onSecondaryButtonClickredirectUrl:p?v.$hu:""})})});var xt=i(54039);const vt=W.Ay.div` 560 min-height: 80vh; 561 display: flex; 562 flex-direction: column; 563 align-items: center; 564 justify-content: center; 565 width: 450px; 566 567 .header { 568 font-family: ${Pe.F.hellix.bold}; 569 font-size: 18px; 570 line-height: 26px; 571 font-weight: 700; 572 color: ${Me.A.textGrey}; 573 margin-top: 26px; 574 } 575 576 .subHeader { 577 font-family: ${Pe.F.hellix.regular}; 578 font-size: 16px; 579 line-height: 22px; 580 font-weight: 400; 581 color: ${Me.A.textGrey}; 582 margin-top: 4px; 583 } 584 585 img { 586 animation: bounce 1s infinite; 587 } 588 589 @keyframes bounce { 590 0%, 591 100% { 592 transform: translateY(0); 593 } 594 50% { 595 transform: translateY(-50px); /* Adjust the bounce height as needed */ 596 } 597 } 598`,ft=(0,o.Ng)(e=>{const{rootReducer:{userStatusReducer:{country_code:t}}}=e;return{countryCode:t}},e=>({dispatch:e}))(e=>{const{dispatch:t,countryCode:i}=e,[o,s]=(0,n.useState)();return(0,n.useEffect)(()=>{const e=()=>{(async()=>{if("MY"===i)await t((0,a.LS)());else{var e,n;const i=await t((0,w.rL)());(null===i||void 0===i||null===(e=i.data)||void 0===e||null===(n=e.data)||void 0===n?void 0:n.status)===v.K3p?t((0,a.e0)(E.TQ.ekycSuccess)):t((0,a.e0)(E.TQ.ekycAck))}})()};let n;return(async()=>{const t=await(async()=>{const e=await(0,S.hL)();return s(e),e})();n=setTimeout(e,Number(null===t||void 0===t?void 0:t.holdingVerifyScreenTimerInMiliSeconds))})(),()=>{clearTimeout(n)}},[]),(0,P.jsx)(r.q,{padding:[-2,0],children:(0,P.jsxs)(vt,{children:[(0,P.jsx)("div",{children:(0,P.jsx)("img",{src:L.TU8,alt:"Verification loading Icon"})}),(0,P.jsx)("div",{className:"header",children:null===o||void 0===o?void 0:o.verificationText}),(0,P.jsx)("div",{className:"subHeader",children:null===o||void 0===o?void 0:o.fewMomentsText})]})})});var yt=i(34801),bt=i(6155);const gt=W.Ay.div` 599 width: 450px; 600 display: flex; 601 flex-direction: column; 602 603 .goToHomeLink {
604 align-self: center; 605 } 606 .schedule-header { 607 color: ${Me.A.black}; 608 } 609 @media ${$e.A.mobileXL} { 610 width: 100%; 611 padding: 0 14px 0; 612 } 613`,jt=W.Ay.div` 614 display: flex; 615 flex-direction: column; 616 margin: 48px 0 24px 0; 617`,At=W.Ay.div` 618 .locationIcon { 619 width: 24px; 620 height: 24px; 621 } 622`,Nt=W.Ay.div` 623 margin-bottom: 24px; 624`,wt=W.Ay.button` 625 color: ${Me.A.darkBlue}; 626 text-decoration: none; 627 font-family: ${Pe.F.hellix.bold}; 628 font-size: 16px; 629 line-height: 26px; 630 cursor: pointer; 631 background: none; 632 border: none; 633`,St=W.Ay.div` 634 font-size: 16px; 635 line-height: 22px; 636 font-family: ${Pe.F.hellix.regular}; 637 color: ${Me.A.textGrey}; 638`;const Ct=(0,m.A)({form:v._Ju,onSubmitFail:s.Nc})(e=>{var t,i,o,a,s,l,c,m;const{getAllformVal:p,handleSubmit:_,scheduledInterviewDetails:v,activateLoader:f,submitScheduleInterview:y,updateScheduleInterview:g,countryCode:j,getUserAddress:N,disableLoader:w,changeOnBoardingScreen:C}=e,[T,I]=(0,n.useState)(""),[R,L]=(0,n.useState)({});return(0,n.useEffect)(()=>{(async()=>{f(),await(async()=>{const e=await(0,S.P7)(j);L(e)})(),await(async()=>{var e;const t=await N({appointment_address_type:"INSTAREM_ADDRESS"});var i,n;null!==t&&void 0!==t&&null!==(e=t.data)&&void 0!==e&&e.success?I(null===t||void 0===t||null===(i=t.data)||void 0===i||null===(n=i.data)||void 0===n?void 0:n.appointment_address):I("")})(),w()})()},[]),(0,P.jsxs)(r.q,{padding:[0,0],children:[(0,P.jsxs)(gt,{children:[(0,P.jsx)(yt.Y9,{className:"schedule-header",children:null===R||void 0===R||null===(t=R.scheduleVerificationData)||void 0===t?void 0:t.heading}),(0,P.jsx)(yt.iK,{children:null===R||void 0===R||null===(i=R.scheduleVerificationData)||void 0===i?void 0:i.description}),(0,P.jsxs)(yt.$P,{children:[(0,P.jsx)(yt.EY,{children:null===R||void 0===R||null===(o=R.scheduleVerificationData)||void 0===o?void 0:o.addressHeader}),(0,P.jsx)(yt.ME,{children:T})]})]}),(0,P.jsx)(r.MG,{marginTop:12,children:(0,P.jsxs)("form",{onSubmit:_(async()=>{const e={...p,is_remitter_to_be_contacted:!0,appointment_address_type:"INSTAREM_ADDRESS",appointment_address:T};try{var t,i;let n=null;await f(),(0,A.TE)(p),n=null!==v&&void 0!==v&&v.appointment_request_id?await g(v.appointment_request_id):await y(e),null!==(t=n)&&void 0!==t&&null!==(i=t.data)&&void 0!==i&&i.success&&((0,k.$s)("iDDocUploadCompleted",D.sk,{pageName:"appointmentConfirmation"},O.s6.CLEVER_TAP),C(E.TQ.appointmentConfirmation))}catch(n){console.error(n)}finally{w()}}),children:[(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===p||void 0===p?void 0:p.scheduled_date,type:"text",name:"scheduled_date",placeholder:null===R||void 0===R||null===(a=R.scheduleVerificationData)||void 0===a?void 0:a.dateLabel,component:h.A,disableUnderlineStyling:!0,InputLabelProps:{shrink:!0},shrink:!0,customPlaceholder:null===R||void 0===R||null===(s=R.scheduleVerificationData)||void 0===s?void 0:s.datePlaceHolder,minDate:d()().add(1,"day"),validate:[x.mw],showCalendarIcon:!0,disableWeekends:!0})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===p||void 0===p?void 0:p.scheduled_slot,type:"text",name:"scheduled_slot",validate:[x.mw],labelText:null===R||void 0===R||null===(l=R.scheduleVerificationData)||void 0===l?void 0:l.timeLabel,shrink:!0,placeholder:null===R||void 0===R||null===(c=R.scheduleVerificationData)||void 0===c?void 0:c.timeLabel,component:b.A,width:"100%",disableUnderlineStyling:!0,staticValues:E.Q0})})}),(0,P.jsx)(r.fI,{padding:[0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(r.b7,{margin:[36,0,0,0],type:"submit",disabled:!(null!==p&&void 0!==p&&p.scheduled_date&&null!==p&&void 0!==p&&p.scheduled_slot),children:null===R||void 0===R||null===(m=R.scheduleVerificationData)||void 0===m?void 0:m.submitBtn})})})]})})]})}),Dt=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{country_code:t},scheduleInterviewReducer:{scheduledInterviewDetails:i}}}=e;return{getAllformVal:(0,p.A)(v._Ju)(e),scheduledInterviewDetails:i,countryCode:t}},{activateLoader:s.LI,disableLoader:s.MV,getUserAddress:bt.GA,submitScheduleInterview:bt.rE,updateScheduleInterview:bt.ot,changeOnBoardingScreen:a.e0})(Ct);const Tt=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{country_code:t},scheduleInterviewReducer:{scheduledInterviewDetails:i,interviewAddr:n}}}=e;return{scheduledInterviewDetails:i,countryCode:t,interviewAddr:n}},{activateLoader:s.LI,disableLoader:s.MV})(e=>{var t,i,o,a,s;const{countryCode:l,scheduledInterviewDetails:c,interviewAddr:u}
638=e,[m,p]=(0,n.useState)({});(0,n.useEffect)(()=>{(async()=>{null===e||void 0===e||e.activateLoader(),await(async()=>{const e=await(0,S.P7)(l||"");p(e)})(),null===e||void 0===e||e.disableLoader()})()},[]);const h=d()(null===c||void 0===c?void 0:c.scheduled_date,"DD/MM/YYYY").format("MMMM DD YYYY"),_=E.Q0.filter(e=>e.value===(null===c||void 0===c?void 0:c.scheduled_slot));return(0,P.jsx)(r.q,{padding:[0,0],children:(0,P.jsxs)(gt,{children:[(0,P.jsx)(yt.Y9,{className:"schedule-header",children:null===m||void 0===m||null===(t=m.appointmentConfirmationData)||void 0===t?void 0:t.heading}),(0,P.jsx)(yt.iK,{children:null===m||void 0===m||null===(i=m.appointmentConfirmationData)||void 0===i?void 0:i.description}),(0,P.jsxs)(jt,{children:[(0,P.jsx)(At,{children:(0,P.jsx)("img",{src:L.wL5,alt:"calendar-icon"})}),(0,P.jsxs)(Nt,{children:[(0,P.jsx)(yt.EY,{children:null===m||void 0===m||null===(o=m.appointmentConfirmationData)||void 0===o?void 0:o.dateLabel}),(0,P.jsx)(St,{children:`${h}, between ${_[0].text}`})]}),(0,P.jsx)(At,{children:(0,P.jsx)("img",{src:L.jYg,className:"locationIcon",alt:"locationIcon"})}),(0,P.jsxs)(Nt,{children:[(0,P.jsx)(yt.EY,{children:null===m||void 0===m||null===(a=m.appointmentConfirmationData)||void 0===a?void 0:a.location}),(0,P.jsx)(St,{children:null===u||void 0===u?void 0:u.appointment_address})]})]}),(0,P.jsx)(pt.N_,{to:v.$hu,className:"goToHomeLink",onClick:()=>{(0,k.$s)(D.aI,D.sk,{pageName:"appointmentConfirmation"},O.s6.CLEVER_TAP)},children:(0,P.jsx)(wt,{children:null===m||void 0===m||null===(s=m.appointmentConfirmationData)||void 0===s?void 0:s.goToHomeScreen})})]})})}),Et=W.Ay.div` 639 margin-bottom: 12px; 640`,It=W.Ay.div` 641 width: 450px; 642 margin-top: 36px; 643 644 @media${$e.A.mobileXL} { 645 width: 100%; 646 padding: 0 20px; 647 } 648`,Rt=W.Ay.div` 649 display: flex; 650 justify-content: space-between; 651 652 .show { 653 margin: 0px !important; 654 } 655`,kt=W.Ay.div` 656 margin: 48px 0 32px; 657 @media${$e.A.mobileXL} { 658 width: 100%; 659 padding: 0 20px; 660 } 661`,Ot=W.Ay.div` 662 color: ${Me.A.black}; 663 font-size: 16px; 664 line-height: 24px; 665 font-family: ${Pe.F.hellix.bold}; 666`,Lt=W.Ay.div` 667 display: flex; 668 flex-wrap: wrap; 669 width: ${e=>{let{isSearchPage:t}=e;return t?"412px":""}}; 670 margin-bottom: 8px; 671 @media${$e.A.mobileXL} { 672 width: 100%; 673 } 674`,Ft=W.Ay.div` 675 margin-top: -20px; 676 677 .requiredError { 678 color: ${Me.A.newerror}; 679 } 680`,Mt=W.Ay.div` 681 display: flex; 682 align-items: center; 683 margin-top: 12px; 684`,Pt=(W.Ay.div` 685 font-size: 14px; 686 line-height: 22px; 687 padding: 6px 25px 6px 12px; 688 position: relative; 689 cursor: pointer; 690 border-radius: 2px; 691 border: 1px solid ${Me.A.dividerBlue}; 692 background: rgba(72, 250, 255, 0.2); 693 margin-right: 12px; 694 margin-bottom: 24px; 695 align-self: flex-start; 696`,W.Ay.div` 697 color: ${Me.A.textGrey}; 698 font-size: 14px; 699 line-height: 22px; 700 padding: ${e=>{let{isSelected:t}=e;return t?"6px 28px 6px 4px;":"6px 8px 6px 8px;"}}; 701 position: relative; 702 cursor: pointer; 703 border-radius: 2px; 704 border: 1px solid 705 ${e=>{let{isSelected:t}=e;return t?` ${Me.A.dividerBlue}`:`${Me.A.lightGrey}`}}; 706 background: ${e=>{let{isSelected:t}=e;return t?"rgba(72, 250, 255, 0.20)":`${Me.A.lightShadedGrey}`}}; 707 margin-right: ${e=>{let{isSelected:t}=e;return t?"":"12px"}}; ; 708`),$t=W.Ay.div` 709 width: 16px; 710 height: 16px; 711 display: initial; 712 float: right; 713 cursor: pointer; 714 position: relative; 715 right: 26px; 716 display: ${e=>{let{isSelected:t}=e;return t?"block":"none"}}; 717`,Ut=W.Ay.div` 718 display: flex; 719 flex-direction: column; 720 width: 450px; 721 height: 600px; 722 align-items: center; 723 border-radius: 10px; 724 background-color: ${Me.A.white}; 725 padding: 16px; 726 .closeIcon { 727 align-self: end; 728 float: right; 729 width: 24px; 730 height: 24px; 731 cursor: pointer; 732 } 733`,Vt=W.Ay.div` 734 font-size: 18px; 735 line-height: 26px; 736 margin: 24px 0; 737 font-family: ${Pe.F.hellix.bold}; 738 color: ${Me.A.black}; 739`,Bt=(W.Ay.div` 740 width: 200px; 741`,W.Ay.div` 742 font-size: 12px; 743 line-height: 18px; 744 font-family: ${Pe.F.hellix.regular}; 745 color: ${Me.A.red}; 746`),Yt=W.Ay.img` 747 width: 16px; 748 margin: 3px 4px 3px 0; 749`,Ht=W.Ay.div` 750 min-width: 100%; 751 border-radius: 3px; 752 border: solid 1px ${Me.A.textLightGrey}; 753 background-color: ${Me.A.white}; 754 display: flex; 755 align-items: center; 756 position: relative; 757 margin-bottom: 16px; 758 padding: 0 12px; 759 /* Change border color on hover or focus-within */ 760 &:hover, 761 &:focus-within { 762 border: solid 1px ${Me.A.black}; /* Change the border color */ 763 } 764 > input { 765 color: ${Me.A.black}; 766 width: 100%; 767 border: 0; 768 height: 1.1875em; 769 margin: 0; 770 display: block; 771 padding: 6px 0 7px; 772 min-width: 0; 773 background: none; 774 box-sizing: content-box; 775 align-self: center; 776 margin-left: 10px; 777 font-size: 1rem; 778 box-sizing: border-box; 779 align-items: center; 780 font-family: ${Pe.F.hellix.regular}; 781 min-height: 50px; 782 ::placeholder { 783 font-family: ${Pe.F.hellix.regular}; 784 font-size: 16px; 785 letter-spacing: normal; 786 text-transform: none; 787 color: ${Me.A.textLightGrey} !important; 788 } 789 } 790 .search-icon { 791 margin-bottom: 2px; 792 } 793`,zt=W.Ay.div` 794 cursor: pointer; 795 :hover { 796 background: rgba(72, 250, 255, 0.4); 797 } 798 .fLagIcon { 799 height: 24px; 800 width: 24px; 801 } 802 .multiSelect-search { 803 display: flex; 804 align-items: center; 805 } 806`,Gt=W.Ay.div` 807 border: 1px solid ${Me.A.lightGrey}; 808`,qt=W.Ay.div` 809 line-height: 22px; 810 font-size: 16px; 811 font-family: ${Pe.F.hellix.regular}; 812 align-self: flex-start; 813 padding: 16px 0; 814 color: ${Me.A.textGrey}; 815`,Kt=W.Ay.div` 816 min-width: 418px; 817 justify-content: flex-start;
818 overflow-y: scroll; 819 ::-webkit-scrollbar-track { 820 display: none; 821 } 822 ::-webkit-scrollbar { 823 width: 4px; 824 color: ${Me.A.lightGrey}; 825 } 826 @media ${$e.A.mobileXL} { 827 min-width: unset; 828 width: 100%; 829 } 830`,Qt=W.Ay.div` 831 font-size: 14px; 832 line-height: 22px; 833 font-family: ${Pe.F.hellix.regular}; 834 color: ${Me.A.textLightGrey}; 835 min-width: 412px; 836 @media${$e.A.mobileXL} { 837 min-width: unset; 838 width: 100%; 839 } 840`,Wt=W.Ay.span` 841 border-left: 1px solid ${Me.A.borderGrey}; 842 height: 24px; 843 margin: 0 12px; 844`,Xt=W.Ay.div` 845 font-size: 14px; 846 line-height: 22px; 847 padding: 6px 30px 6px 8px; 848 border-radius: 2px; 849 border: 1px solid rgba(72, 250, 255, 0.6); 850 background: rgba(72, 250, 255, 0.2); 851 align-self: flex-start; 852 margin-right: 12px; 853 color: ${Me.A.textGrey}; 854`,Zt=W.Ay.div` 855 width: 16px; 856 height: 16px; 857 display: initial; 858 float: right; 859 cursor: pointer; 860 position: relative; 861 right: 20px; 862 bottom: 25px; 863`,Jt=(W.Ay.div` 864 width: 16px; 865 height: 16px; 866 align-self: flex-start; 867`,W.Ay.div` 868 font-size: 14px; 869 font-style: normal; 870 font-family: ${Pe.F.hellix.regular}; 871 line-height: normal; 872 text-decoration-line: underline; 873 color: ${Me.A.brandPrimary}; 874 cursor: pointer; 875`),ei=W.Ay.div` 876 & > button { 877 min-width: 418px; 878 } 879 margin-top: auto; 880 @media ${$e.A.mobileL} { 881 & > button { 882 min-width: 336px; 883 } 884 } 885 @media ${$e.A.mobileM} { 886 & > button { 887 min-width: 303px; 888 } 889 } 890 @media ${$e.A.mobileS} { 891 & > button { 892 min-width: 274px; 893 } 894 } 895`,ti=W.Ay.div` 896 width: 450px; 897 margin-top: 36px; 898 899 .titleWrapper { 900 display: flex; 901 align-items: center; 902 } 903 904 @media${$e.A.mobileXL} { 905 width: 100%; 906 padding: 0 20px; 907 } 908`,ii=W.Ay.img` 909 float: none; 910 margin-left: 8px; 911`,ni=W.Ay.div` 912 .radioButtonContainer { 913 display: flex; 914 flex-wrap: wrap; 915 gap: 24px; 916 margin-top: 8px; 917 } 918 919 .radioButtonWrapper { 920 display: flex; 921 align-items: center; 922 } 923 924 input[type='radio'] { 925 width: 24px; 926 height: 24px; 927 -webkit-appearance: none; 928 -moz-appearance: none; 929 appearance: none; 930 border-radius: 50%; 931 border: 2px solid ${Me.A.textLightGrey}; 932 outline: none; 933 cursor: pointer; 934 position: relative; 935 } 936 937 /* Unchecked radio button */ 938 input[type='radio']:not(:checked) { 939 border-color: ${Me.A.textLightGrey}; 940 } 941 942 /* Checked radio button */ 943 input[type='radio']:checked { 944 border-color: ${Me.A.brandPrimary}; 945 } 946 947 /* Checked radio button dot */ 948 input[type='radio']:checked::before { 949 content: ''; 950 position: absolute; 951 top: 3.3px; 952 left: 3.3px; 953 width: 14px; 954 height: 14px; 955 border-radius: 50%; 956 background-color: ${Me.A.brandPrimary}; 957 } 958`;var oi=i(14806);const ai=(e,t)=>e.map(e=>{const i=t.find(t=>{var i,n;return(null===t||void 0===t||null===(i=t.value)||void 0===i?void 0:i.text)===(null===e||void 0===e||null===(n=e.value)||void 0===n?void 0:n.text)});return i?{...e,isSelected:i.isSelected}:{...e,isSelected:!1}}),si=e=>{const{list:t,onClose:i,setOptionArray:o,isMultiSelect:a,initialState:s,placeHolder:r,optionArray:l,setSelectedValue:d,setSelectedReasonCode:c,showFlag:u=a,maxSelections:m=5}=e,[p,h]=(0,n.useState)(t),[_,x]=(0,n.useState)("");let v=null===l||void 0===l?void 0:l.filter(e=>e.isSelected);v=v||[];const[f,y]=(0,n.useState)(a?v:[]);return(0,P.jsxs)(P.Fragment,{children:[(0,P.jsxs)(Ht,{children:[(0,P.jsx)("img",{className:"search-icon",src:L.VTc,alt:"small-search",width:"24px"}),(0,P.jsx)("input",{type:"search",className:"search",placeholder:r,value:_,onChange:e=>{var i;x(null===e||void 0===e||null===(i=e.target)||void 0===i?void 0:i.value),h(ai(t,f).filter(t=>{var i,n,o,a;return null===t||void 0===t||null===(i=t.value)||void 0===i||null===(n=i.text)||void 0===n?void 0:n.toLowerCase().includes(null===e||void 0===e||null===(o=e.target)||void 0===o||null===(a=o.value)||void 0===a?void 0:a.toLowerCase())}))}}),""!==_&&(0,P.jsx)(Jt,{onClick:()=>{x(""),h(ai(t,f))},children:"Clear"})]}),(0,P.jsx)(Lt,{isSearchPage:!0,children:f.map((e,t)=>{var i,n;return(0,P.jsxs)("div",{children:[(0,P.jsxs)(Xt,{children:[u&&(0,P.jsx)(Yt,{src:(0,oi.s)(null===e||void 0===e||null===(i=e.value)||void 0===i?void 0:i.value),alt:""}),null===e||void 0===e||null===(n=e.value)||void 0===n?void 0:n.text]}),(0,P.jsx)(Zt,{children:(0,P.jsx)("img",{src:L.I6N,alt:"close",onClick:()=>(e=>{const t=f.filter(t=>{var i,n;return(null===t||void 0===t||null===(i=t.value)||void 0===i?void 0:i.text)!==(null===e||void 0===e||null===(n=e.value)||void 0===n?void 0:n.text)});h(ai(p,t)),y(t),d(t)})(e)})})]},`selected_option_${t}`)})}),(null===f||void 0===f?void 0:f.length)>=m&&(0,P.jsxs)(Qt,{children:["You have selected a maximum of ",m," countries"]}),(null===f||void 0===f?void 0:f.length)<m&&(0,P.jsx)(Kt,{children:p.map((e,n)=>{var s,r;return(0,P.jsx)("div",{children:!(null!==e&&void 0!==e&&e.isSelected)&&(0,P.jsxs)(zt,{onClick:()=>((e,n)=>{if([...p][e].isSelected=!0,a){const e=[...f];(null===f||void 0===f?void 0:f.length)<m&&(p.find(t=>{var i,o;return(null===t||void 0===t?void 0:t.isSelected)&&(null===t||void 0===t||null===(i=t.value)||void 0===i?void 0:i.text)===(null===n||void 0===n||null===(o=n.value)||void 0===o?void 0:o.text)&&e.push(t)}),y(e))}else{var s;const e=null===t||void 0===t?void 0:t.find(e=>{var t,i;return(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.text)===(null===n||void 0===n||null===(i=n.value)||void 0===i?void 0:i.text)});e.isSelected=!0,o([e]),d([e]),null===c||void 0===c||c(null===e||void 0===e||null===(s=e.value)||void 0===s?void 0:s.code),i()}})(n,e),children:[(0,P.jsx)(Gt,{}),(0,P.jsxs)("div",{className:"multiSelect-search",children:[u&&(0,P.jsxs)("span",{children:[(0,P.jsx)("img",{className:"fLagIcon",src:(0,oi.s)(null===e||void 0===e||null===(s=e.value)||void 0===s?void 0:s.value),alt:""}),(0,P.jsx)(Wt,{})]}),(0,P.jsxs)(qt,{children:[null===e||void 0===e||null===(r=e.value)||void 0===r?void 0:r.text," "]})]},`option_${n}`)]})},`dropdown_option_${n}`)})}),(0,P.jsx)(ei,{children:a&&(0,P.jsx)(F.mU,{onClick:()=>{(null===f||void 0===f?void 0:f.length)>=1?(o(f),d(f)):o(null===s||void 0===s?void 0:s.map((e,t)=>({value:e,key:t,isSelected:!1}))),i(!1)},text:"Apply "+((null===f||void 0===f?void 0:f.length)>=1?`(${null===f||void 0===f?void 0:f.length})`:""),disabled:!(null!==f&&void 0!==f&&f.length)})})]})};var ri=i(706);const li=e=>{const{list:t,title:i,buttonTitle:n,initialState:o,isMultiSelect:a=!1,setSelectedValue:s,error:r,selectedValue:l,buttonTitle2:d,optionArray:c,setOptionArray:m,modalTitle:p,placeHolder:h,selectedReasonCode:_,setSelectedReasonCode:v,isPrimaryReasonForTransfer:f,initialize:y,intendedUseOfAccountMeta:b,primaryReasonForTransferPlaceHolder:g,otherReasonCodeError:j,maxSelections:A=5}=e,N=async()=>{await F.wh.builder(e=>(0,P.jsxs)(Ut,{children:[(0,P.jsx)("img",{width:24,height:24,src:L.I6N,alt:"close",className:"closeIcon",onClick:()=>{e(!1)}}),(0,P.jsx)(Vt,{children:p}),(0,P.jsx)(si,{list:ai(t.map((e,t)=>({value:e,key:t,isSelected:!1})),c),isMultiSelect:a,onClose:()=>e(!1),setOptionArray:m,optionArray:c,initialState:o,placeHolder:h||"",setSelectedValue:s,setSelectedReasonCode:v,showFlag:!f,maxSelections:A})]}),"insta-modal center-modal",!0)};return(0,P.jsxs)(It,{children:[(0,P.jsxs)(Rt,{children:[(0,P.jsx)(Ot,{children:i}),n&&(0,P.jsx)(P.Fragment,{children:a?(null===l||void 0===l?void 0:l.length)<1?(0,P.jsx)(F.mU,{type:"link",text:n,fontSize:14,lineHeight:22,onClick:N}):(null===l||void 0===l?void 0:l.length)<A&&(null===l||void 0===l?void 0:l.length)<(null===t||void 0===t?void 0:t.length)?(0,P.jsx)(F.mU,{type:"link",text:null!==d&&void 0!==d?d:"",fontSize:14,lineHeight:22,onClick:N}):null:(null===c||void 0===c?void 0:c.length)>1?(0,P.jsx)(F.mU,{type:"link",text:n||"",onClick:N,fontSize:14,lineHeight:22}):""})]}),r&&!(null!==l&&void 0!==l&&l.length)&&(0,P.jsx)(Bt,{children:"Required"}),(0,P.jsx)(Lt,{children:null===c||void 0===c?void 0:c.map((e,t)=>{var i,n,r;return(0,P.jsxs)(Mt,{children:[(0,P.jsxs)(Pt,{isSelected:null===e||void 0===e?void 0:e.isSelected,onClick:()=>(e=>{if(null===l||void 0===l||!l.length){const t=c.find(t=>{var i,n;return(null===t||void 0===t||null===(i=t.value)||void 0===i?void 0:i.text)===(null===e||void 0===e||null===(n=e.value)||void 0===n?void 0:n.text)});t.isSelected=!0,m([t]),s([t])}f&&(null===v||void 0===v||v(e.code))})(e),children:[a&&!f&&(0,P.jsx)(Yt,{src:(0,oi.s)(null===e||void 0===e||null===(i=e.value)||void 0===i?void 0:i.value),alt:null===e||void 0===e||null===(n=e.value)||void 0===n?void 0:n.value}),null===e||void 0===e||null===(r=e.value)||void 0===r?void 0:r.text]}),(0,P.jsx)($t,{isSelected:null===e||void 0===e?void 0:e.isSelected,children:(0,P.jsx)("img",{src:L.I6N,alt:"close",onClick:()=>((e,t)=>{if(f){var i;const e="OTHER"===(null===t||void 0===t||null===(i=t.value)||void 0===i?void 0:i.code)||"OTHER"===(null===t||void 0===t?void 0:t.code);a&&!e||(null===v||void 0===v||v(""),y({intendedUseOfAccountMeta:""}))}const n=[...c];if(n[e].isSelected=!1,a){const e=n.filter(e=>!1!==(null===e||void 0===e?void 0:e.isSelected));s(e),null!==e&&void 0!==e&&e.length?m(e):m(null===o||void 0===o?void 0:o.map((e,t)=>({value:e,key:t,isSelected:!1})))}else m(null===o||void 0===o?void 0:o.map((e,t)=>({value:e,key:t,isSelected:!1}))),s(null===c||void 0===c?void 0:c.filter(e=>!1!==(null===e||void 0===e?void 0:e.isSelected)))})(t,e)})})]},t)})}),"OTHER"===_&&(0,P.jsxs)(Ft,{children:[(0,P.jsx)(u.A,{name:"intendedUseOfAccountMeta",id:"text-area-primary-reason-for-transfer",type:"text",component:ri.A,parentClass:"text-area",validate:[x.Ax,x.xk,x.w9],multiLine:!0,placeholder:g}),j&&!(null!==b&&void 0!==b&&b.trim())&&(0,P.jsx)("div",{className:"requiredError",children:"Required"})]})]})};var di=i(27435);const ci=e=>{const{selectedValue:t,setSelectedValue:i,title:n,information:o,options:a}=e,s=e=>{var t;i(null===e||void 0===e||null===(t=e.target)||void 0===t?void 0:t.value)};return(0,P.jsxs)(ti,{children:[(0,P.jsx)("div",{className:"titleWrapper",children:(0,P.jsxs)(Ot,{children:[n,o&&(0,P.jsx)(di.default,{trigger:(0,P.jsx)(ii,{alt:"more-info",width:"16px",src:L.fGD}),size:"tiny",position:"top center",content:o})]})}),(0,P.jsx)(ni,{children:(0,P.jsx)("div",{className:"radioButtonContainer",children:null===a||void 0===a?void 0:a.map((e,i)=>(0,P.jsxs)("div",{className:"radioButtonWrapper",children:[(0,P.jsx)("input",{type:"radio",id:`select-${i}`,name:"radioField",value:e,checked:t===e,onChange:s}),(0,P.jsx)("label",{htmlFor:`values-${i}`,children:e})]},i))})})]})};const ui=(0,m.A)({form:E.TI,onSubmitFail:s.Nc}),mi=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{status:t,country_code:i},userDataReducer:{userStateInfo:{remitterDetails:n}}}}=e,o=(0,p.A)(E.TI)(e);return{status:t,countryCode:i,remitterDetails:n,intendedUseOfAccountMeta:null===o||void 0===o?void 0:o.intendedUseOfAccountMeta}},e=>({loadReasonForTransfer:We.XK,submitAccountUsage:a.ji,getNewUserFlow:G.e,dispatch:e,activateLoader:s.LI,disableLoader:s.MV}))(ui(e=>{const{dispatch:t,loadReasonForTransfer:i,countryCode:o,submitAccountUsage:s,remitterDetails:l,activateLoader:d,disableLoader:c,intendedUseOfAccountMeta:u,initialize:m}
958=e,[p,h]=(0,n.useState)([]),[x,f]=(0,n.useState)([]),[y,b]=(0,n.useState)([]),[g,j]=(0,n.useState)(!1),[A,N]=(0,n.useState)([]),[w,C]=(0,n.useState)([]),[T,I]=(0,n.useState)("No"),[R,M]=(0,n.useState)({reasonOfTransferError:!1,destinationOfFundError:!1,estimatedIncomeError:!1}),[$,U]=(0,n.useState)([]),[V,B]=(0,n.useState)([]),[Y,H]=(0,n.useState)([]),[z,q]=(0,n.useState)(),[K,Q]=(0,n.useState)({topReasonForTransfer:[],destinationCountries:[],estimatedIncome:[]}),W=(0,S.Bp)(o||""),X=(0,S.I1)(S.jC.AccountUsage,W||""),Z=null===X||void 0===X?void 0:X.stepperData,J=(e,t)=>null===e||void 0===e?void 0:e.filter(e=>{var i;return(null===e||void 0===e||null===(i=e.value)||void 0===i?void 0:i.value)===t}).map(e=>({...e,isSelected:!0}));(0,n.useEffect)(()=>{(async()=>{t(d()),await(async()=>{const e=await(0,S.Xl)(S.jC.AccountUsage,W||"");q(e)})(),await(async()=>{"EU"===W&&(null===l||void 0===l?void 0:l.is_pep)&&I(null!==l&&void 0!==l&&l.is_pep?"Yes":"No"),(await i({account_type:v.sOf,type:"INTENDED_USE_OF_ACCOUNT",country_code:o}))().then(e=>{var t;h(e);const i=null===e||void 0===e?void 0:e.map((e,t)=>({value:e,key:t,isSelected:!1})),n=null!==(t=null===l||void 0===l?void 0:l.intended_use_of_accounts)&&void 0!==t?t:[];if(null!==n&&void 0!==n&&n.length){var o;const e=n.map(e=>{var t;return null!==(t=e.intended_use_of_account_code)&&void 0!==t?t:""}),t=(null===i||void 0===i?void 0:i.filter(t=>{var i,n;return e.includes(null!==(i=null===t||void 0===t||null===(n=t.value)||void 0===n?void 0:n.code)&&void 0!==i?i:"")}).map(e=>({...e,isSelected:!0})))||[];U(t),b(t);const a=null===(o=n.find(e=>"OTHER"===e.intended_use_of_account_code))||void 0===o?void 0:o.intended_use_of_account_meta;a&&m({intendedUseOfAccountMeta:a})}else{const e=J(i,null===l||void 0===l?void 0:l.intended_use_of_account);null!==e&&void 0!==e&&e.length?(U(e),b(e)):U(null===i||void 0===i?void 0:i.filter(e=>{var t;return E.I3.includes(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.code)}))}Q(t=>({...t,topReasonForTransfer:null===e||void 0===e?void 0:e.filter(e=>E.I3.includes(null===e||void 0===e?void 0:e.code))}))}).catch(()=>{h([])}),await(0,a.jo)({is_payout_activated:!0}).then(e=>{const t=null===e||void 0===e?void 0:e.map((e,t)=>({value:e,key:t,isSelected:!1})).filter(e=>{var t;return null===E.ZS||void 0===E.ZS?void 0:E.ZS.includes(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.value)}),i=null===e||void 0===e?void 0:e.map((e,t)=>({value:e,key:t,isSelected:!1})).filter(e=>{var t,i;return null===l||void 0===l||null===(t=l.destination_of_fund)||void 0===t?void 0:t.includes(null===e||void 0===e||null===(i=e.value)||void 0===i?void 0:i.value)});null!==i&&void 0!==i&&i.length?(B(i.map(e=>({...e,isSelected:!0}))),N(i)):B(t),Q(t=>({...t,destinationCountries:null===e||void 0===e?void 0:e.filter(e=>null===E.ZS||void 0===E.ZS?void 0:E.ZS.includes(null===e||void 0===e?void 0:e.value))})),f(e)}).catch(()=>{f([])}),await(0,a.B9)(o||"").then(e=>{const t=null===e||void 0===e?void 0:e.map((e,t)=>({value:e,key:t,isSelected:!1})),i=J(t,null===l||void 0===l?void 0:l.expected_monthly_volume);null!==i&&void 0!==i&&i.length?(H(i),C(i)):H(t),Q(t=>({...t,estimatedIncome:e}))})})(),t(c())})()},[]);const ee=y.some(e=>{var t;return"OTHER"===(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.code)})?"OTHER":"";return(0,P.jsxs)(r.q,{padding:[0,0],children:[(0,P.jsx)("div",{className:"navigation-container",children:(0,P.jsx)("img",{onClick:()=>{t((0,a.eG)(!0)),t((0,a.e0)(E.TQ.addressInput))},className:"back-button",src:L.E71,alt:"back"})}),(0,P.jsx)(Et,{children:(0,P.jsx)(_.A,{heading:(null===z||void 0===z?void 0:z.heading)||"",headerLogo:L.Qdj,stepNumber:null===Z||void 0===Z?void 0:Z.stepNumber,totalSteps:null===Z||void 0===Z?void 0:Z.totalSteps,subHeading:(null===z||void 0===z?void 0:z.description)||""})}),(0,P.jsxs)("form",{id:E.TI,children:[(0,P.jsx)(li,{optionArray:$,setOptionArray:U,list:p,title:(null===z||void 0===z?void 0:z.primaryReasonForTransfer)||"",initialState:null===K||void 0===K?void 0:K.topReasonForTransfer,buttonTitle:(null===z||void 0===z?void 0:z.showAll)||"",buttonTitle2:(null===z||void 0===z?void 0:z.addMore)||"",isMultiSelect:!0,modalTitle:null===z||void 0===z?void 0:z.primaryReasonForTransfer,placeHolder:(null===z||void 0===z?void 0:z.reason)||"",error:null===R||void 0===R?void 0:R.reasonOfTransferError,setSelectedValue:b,selectedValue:y,selectedReasonCode:ee,isPrimaryReasonForTransfer:!0,initialize:m,intendedUseOfAccountMeta:u,otherReasonCodeError:g,primaryReasonForTransferPlaceHolder:(null===z||void 0===z?void 0:z.primaryReasonForTransferPlaceHolder)||"",maxSelections:20}),(0,P.jsx)(li,{list:x,title:(null===z||void 0===z?void 0:z.sendCountries)||"",optionArray:V,setOptionArray:B,initialState:null===K||void 0===K?void 0:K.destinationCountries,buttonTitle:(null===z||void 0===z?void 0:z.showAll)||"",buttonTitle2:(null===z||void 0===z?void 0:z.addMore)||"",isMultiSelect:!0,setSelectedValue:N,selectedValue:A,modalTitle:null===z||void 0===z?void 0:z.sendCountries,error:null===R||void 0===R?void 0:R.destinationOfFundError,placeHolder:(null===z||void 0===z?void 0:z.country)||"",isPrimaryReasonForTransfer:!1,initialize:m}),(0,P.jsx)(li,{title:(null===z||void 0===z?void 0:z.estimatedMonthlyVolume)||"",optionArray:Y,setOptionArray:H,initialState:null===K||void 0===K?void 0:K.estimatedIncome,setSelectedValue:C,selectedValue:w,error:null===R||void 0===R?void 0:R.estimatedIncomeError,isPrimaryReasonForTransfer:!1,initialize:m})]}),"EU"===W&&(0,P.jsx)(ci,{selectedValue:T,setSelectedValue:I,title:(null===z||void 0===z?void 0:z.pep)||"",information:null===z||void 0===z?void 0:z.pepToolTip,options:["No","Yes"]}),(0,P.jsx)(kt,{children:(0,P.jsx)(F.mU,{text:(null===z||void 0===z?void 0:z.primaryBtnText)||"",width:450,height:46,onClick:async()=>
958{if(y.some(e=>{var t;return"OTHER"===(null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.code)})&&(null===u||void 0===u||!u.trim()))return void j(!0);const e=[];let i;const n=y.map(e=>{var t,i;return{intendedUseOfAccountId:null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.value,intendedUseOfAccountMeta:"OTHER"===(null===e||void 0===e||null===(i=e.value)||void 0===i?void 0:i.code)&&null!==u&&void 0!==u?u:null}});null===w||void 0===w||w.forEach(e=>{var t;i=null===e||void 0===e||null===(t=e.value)||void 0===t?void 0:t.value}),null===A||void 0===A||A.forEach(t=>{var i;e.push(null===t||void 0===t||null===(i=t.value)||void 0===i?void 0:i.value)}),M({destinationOfFundError:null===A||void 0===A||!A.length,estimatedIncomeError:null===w||void 0===w||!w.length,reasonOfTransferError:null===y||void 0===y||!y.length});const o={intendedUseOfAccounts:n,destinationOfFund:e,expectedMonthlyVolumeId:i,..."EU"===W&&{isPep:"Yes"===T}};if(d(),A.length&&y.length&&w.length){var r,l;const e=await s(o);if(null!==e&&void 0!==e&&null!==(r=e.data)&&void 0!==r&&null!==(l=r.data)&&void 0!==l&&l.success){var m,p,h,_,x;t((0,G.e)()),t((0,a.e0)(null===e||void 0===e||null===(m=e.data)||void 0===m||null===(p=m.data)||void 0===p||null===(h=p.data)||void 0===h||null===(_=h.nextOnboardProcess)||void 0===_||null===(x=_.transitions[0])||void 0===x?void 0:x.to));const i={pageName:"AccountUsage"};(0,k.$s)(D.A0,D.sk,i,O.s6.CLEVER_TAP)}}c()}})})]})})),pi=W.Ay.p` 959 color: ${Me.A.black}; 960 font-size: 28px; 961 font-family: ${Pe.F.hellix.bold}; 962 font-style: normal; 963 font-weight: 700; 964 line-height: 38px; 965`,hi=W.Ay.p` 966 font-size: 16px; 967 color: ${Me.A.textGrey}; 968 font-style: normal; 969 font-weight: 400; 970 line-height: 22px; 971`,_i=W.Ay.div` 972 width: 450px; 973 display: flex; 974 flex-direction: column; 975 margin-top: -35px; 976 color: ${Me.A.black}; 977 978 @media (max-width: 900px) { 979 margin-top: 15px; 980 } 981 982 @media ${$e.A.mobileXL} { 983 width: 100%; 984 margin-top: 35px; 985 } 986 987 @media ${$e.A.mobileS} { 988 width: 250px !important; 989 } 990`,xi=(W.Ay.p` 991 color: 1px solid ${Me.A.black}; 992 font-size: 14px; 993 font-family: ${Pe.F.hellix.bold}; 994 font-style: normal; 995 font-weight: 700; 996 line-height: 22px; 997`,W.Ay.div` 998 display: flex; 999 width: 100%; 1000 margin-bottom: 5%; 1001`),vi=W.Ay.div` 1002 width: 40%; 1003 .image { 1004 display: flex; 1005 justify-content: center; 1006 width: 100%; 1007 } 1008 .user-with-card { 1009 width: 64px; 1010 height: 64px; 1011 } 1012 .captureButton { 1013 display: flex; 1014 justify-content: center; 1015 width: 100%; 1016 } 1017`,fi=W.Ay.div` 1018 width: 60%; 1019 height: 120px; 1020 margin-top: 1%; 1021 font-size: 14px; 1022 font-family: ${Pe.F.hellix.regular}; 1023 font-style: normal; 1024 font-weight: 400; 1025 line-height: 22px; 1026 color: ${Me.A.textLightGrey}; 1027 1028 @media ${$e.A.mobileXL} { 1029 margin-left: 10%; 1030 } 1031`,yi=W.Ay.p` 1032 margin-top: 6px; 1033 color: ${Me.A.darkBlue}; 1034 font-weight: 700; 1035 font-size: 14px; 1036 line-height: 22px; 1037 cursor: pointer; 1038 float: right; 1039 margin-right: 10%; 1040`,bi=W.Ay.img` 1041 width: 90%; 1042 height: 90%; 1043`,gi=W.Ay.p` 1044 color: ${Me.A.black}; 1045 font-family: ${Pe.F.hellix.bold}; 1046 font-size: 14px; 1047 font-weight: 700; 1048 margin-bottom: 2%; 1049`;var ji=i(19906),Ai=i(53924),Ni=i(78154);const wi="selfieUpload";const Si=(0,m.A)({form:wi,onSubmitFail:s.Nc})(e=>{var t,i;const{handleSubmit:o,activateLoader:s,disableLoader:l,dispatch:d,uploadDocDetailsNew:c,countryCode:u}=e,[m,p]=(0,n.useState)({}
1049),[h,_]=(0,n.useState)(),[x,v]=(0,n.useState)(!1),[f,b]=(0,n.useState)(),{HEADING:g,SUB_HEADING:j,SUBMIT_BUTTON:A,CAPTURE_SELFIE:N,UPLOAD_SELFIE:w,REPLACE:C,ERR_MSG:D}=y.pH,T=e=>{var t;b({data:e,name:"Additional Info doc file",extension:null===e||void 0===e?void 0:e.extension});const i=((e,t,i)=>{const n=atob(e),o=new Uint8Array(n.length);for(let s=0;s<n.length;s++)o[s]=n.charCodeAt(s);const a=new Blob([o],{type:i});return new File([a],t,{type:i})})(null===e||void 0===e||null===(t=e.dataURL)||void 0===t?void 0:t.split(",")[1],"example.png","image/png");_(i),v(!1)};return(0,n.useEffect)(()=>{(async()=>{var e,t,i;s();const n=(0,S.Bp)(u),o=await(0,We.fA)("pageJsonDataView","MANUAL_DOCUMENT_UPLOAD"),a=(0,ji._q)(o,n),r=null===a||void 0===a?void 0:a.data;p({heading:(null===r||void 0===r||null===(e=r.selfieData)||void 0===e?void 0:e.selfieHeader)||g,subHeading:(null===r||void 0===r||null===(t=r.selfieData)||void 0===t?void 0:t.selfieSubHeader)||j,captureSelfie:(null===r||void 0===r||null===(i=r.selfieData)||void 0===i?void 0:i.selfieInstruction)||N,submitCta:(null===r||void 0===r?void 0:r.submitCTA)||A,uploadSelfie:(null===r||void 0===r?void 0:r.selfieHeading)||w,replace:(null===r||void 0===r?void 0:r.replace)||C,errorMessage:(null===r||void 0===r?void 0:r.errorMessage)||D}),l()})()},[]),(0,P.jsx)(r.q,{padding:[-2,0],children:(0,P.jsxs)(r.MG,{marginTop:13,children:[(0,P.jsxs)(_i,{children:[(0,P.jsx)(pi,{children:m.heading}),(0,P.jsx)(hi,{children:m.subHeading})]}),(0,P.jsxs)("form",{onSubmit:o(async()=>{var e;if(!h&&(v(!0),1))return;s();const t={};t.INDIVIDUAL_PERSONAL_IMAGE={individual_personal_image_individual_personal_image_doc_file:h||null,skip_vision_check:!1};const i={INDIVIDUAL_PERSONAL_IMAGE:{...t}},{documents:n,files:o}=(0,Ai.W0)(i,[],{}),r=await c(o,n,{formID:wi,payload:i,doc_count:1},!1,!0,!1);l(),null!==r&&void 0!==r&&null!==(e=r.data)&&void 0!==e&&e.success&&d((0,a.e0)(E.TQ.ekycAck))}),children:[(0,P.jsx)(r.fI,{padding:[48,0],children:(0,P.jsxs)(r.fv,{width:450,children:[(0,P.jsx)(gi,{children:null===m||void 0===m?void 0:m.uploadSelfie}),(0,P.jsxs)(xi,{children:[(0,P.jsxs)(vi,{children:[null!==f&&void 0!==f&&null!==(t=f.data)&&void 0!==t&&t.dataURL?(0,P.jsxs)("div",{children:[(0,P.jsx)(bi,{src:null===f||void 0===f||null===(i=f.data)||void 0===i?void 0:i.dataURL,alt:"imgae"}),(0,P.jsx)(yi,{onClick:()=>{_(null),b(null)},children:null===m||void 0===m?void 0:m.replace})]}):(0,P.jsx)(Ni.A,{onRef:e=>e,fileUploadName:"additional_docs",isTakeAPicture:!0,isIndependent:!0,onChangeFile:e=>{(null===e||void 0===e?void 0:e.dataURL)&&T(e)},toggleFeature:!0,newRevampedtoggleFeature:!0}),x&&(0,P.jsx)("span",{className:"error-msg",children:m.errorMessage})]}),(0,P.jsx)(fi,{children:m.captureSelfie})]})]})}),(0,P.jsx)(r.fI,{padding:[0,0,24,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{text:m.submitCta,width:450})})})]})]})})}),Ci=(0,o.Ng)(function(e){const{rootReducer:{userStatusReducer:{country_code:t}}}=e;return{countryCode:t}},{activateLoader:s.LI,disableLoader:s.MV,uploadDocDetailsNew:H.Iu})(Si);var Di=i(49171),Ti=i(78325),Ei=i(5700);const Ii=W.Ay.div` 1050 display: flex; 1051 justify-content: center; 1052 align-items: center; 1053 width: 100%; 1054`,Ri=W.Ay.div` 1055 max-width: 450px; 1056 width: 100%; 1057 display: flex; 1058 align-items: center; 1059 justify-content: flex-start; 1060 flex-direction: column; 1061 gap: 32px; 1062 @media ${Q.W.mobileXL} { 1063 padding: 48px 16px; 1064 } 1065 @media ${Q.W.mobileM} { 1066 max-width: 335px; 1067 padding: 48px 0; 1068 } 1069`,ki=W.Ay.span` 1070 text-align: center; 1071 font-size: 28px; 1072 font-family: ${Q.F2.hellix.bold}; 1073 line-height: 38px; 1074 color: ${Q.lm.black}; 1075`,Oi=W.Ay.img` 1076 width: 64px; 1077 height: 64px; 1078`,Li=W.Ay.span` 1079 text-align: center; 1080 color: ${Q.lm.textGrey}; 1081 font-size: 16px; 1082 line-height: 22px; 1083`,Fi=W.Ay.div` 1084 width: 100%; 1085 align-items: center; 1086 justify-content: center; 1087 display: flex; 1088 flex-direction: column; 1089 .__text { 1090 color: ${Q.lm.textLightGrey}; 1091 font-size: 16px; 1092 line-height: 22px; 1093 } 1094 .__link { 1095 font-family: ${Q.F2.hellix.bold}; 1096 color: ${Q.lm.darkBlue}; 1097 font-size: 16px; 1098 line-height: 22px; 1099 text-decoration: none; 1100 } 1101`,Mi=W.Ay.div` 1102 display: flex; 1103 gap: 16px; 1104 flex-direction: column; 1105 width: 100%; 1106 align-items: center; 1107`,Pi=W.Ay.div` 1108 width: 100%; 1109 padding: 12px 16px; 1110 display: flex; 1111 gap: 12px; 1112 flex-direction: column; 1113 background-color: ${Q.lm.lightShadedGrey}; 1114 border-radius: 8px; 1115 border: 1px solid 1116 ${e=>
1116{let{isUserEnteredDetails:t}=e;return t?Q.lm.lightGrey:Q.lm.lightGreen}}; 1117`,$i=W.Ay.img` 1118 width: 24px; 1119 height: 24px; 1120 justify-self: end; 1121`,Ui=W.Ay.span` 1122 font-family: ${Q.F2.hellix.bold}; 1123 font-size: 16px; 1124 line-height: 24px; 1125 color: ${Q.lm.textGrey}; 1126`,Vi=W.Ay.div` 1127 width: 100%; 1128 height: 0; 1129 border: 1px solid ${Q.lm.lightGrey}; 1130`,Bi=W.Ay.div` 1131 display: grid; 1132 grid-template-columns: 1fr 1fr; 1133 width: 100%; 1134`,Yi=W.Ay.span` 1135 font-size: 14px; 1136 line-height: 22px; 1137 color: ${Q.lm.textGrey}; 1138 text-align: left; 1139`,Hi=(0,W.Ay)(Ui)` 1140 text-align: right; 1141`;var zi=i(96420);const Gi={dob:"Date of birth",nationality:"Nationality",fullName:"Full name"},qi=e=>{let{fields:t,values:i,nationalityObject:n}=e;const o=e=>{const t=i[e];switch(e){case"dob":return(0,zi.A)(new Date(t),"dd LLLL yyyy");case"nationality":var o;return(null===(o=n.find(e=>e.key===t))||void 0===o?void 0:o.text)||t;case"fullName":return[i.firstName,i.middleLastName].filter(Boolean).join(" ");default:return t}};return(()=>{const e=new Set;return(null===t||void 0===t?void 0:t.map(e=>"firstName"===e||"middleLastName"===e?"fullName":e).filter(t=>!e.has(t)&&(e.add(t),!0)))||[]})().map(e=>{var t;return(0,P.jsxs)(Bi,{children:[(0,P.jsx)(Yi,{children:Gi[e]}),(0,P.jsx)(Hi,{children:null!==(t=o(e))&&void 0!==t?t:"\u2014"})]},e)})},Ki=e=>{let{heading:t,iconAlt:i,iconSrc:n,values:o,fields:a,nationalityObject:s,isUserEnteredDetail
1141s:r}=e;return(0,P.jsxs)(Pi,{isUserEnteredDetails:r,children:[(0,P.jsxs)(Bi,{children:[(0,P.jsx)(Ui,{children:t}),(0,P.jsx)($i,{alt:i,src:n})]}),(0,P.jsx)(Vi,{}),(0,P.jsx)(qi,{nationalityObject:s,fields:a,values:o})]})},Qi={landing:{heading:"We found a mismatch",description:"The details on your document differ from what you entered in personal information. Review\n and confirm the correct information.\n "},detailsMismatch:{enteredDetails:{heading:"Details you entered"},documentDetails:{heading:"Details from your document"}}};var Wi=i(14048),Xi=i(12916);const Zi=e=>{var t;let{mismatchedFields:i,jumioExtractedData:s,previousValues:r}=e;const l=(0,o.wA)(),{detailsMismatch:{enteredDetails:d,documentDetails:c}}=Qi,[u,m]=(0,n.useState)([]),{eKycCMSData:p}=(0,o.d4)(Xi.e),{yourDetailsTitle:h,documentDetailsTitle:_}=(null===p||void 0===p||null===(t=p.kycDataReview)||void 0===t?void 0:t.detailsMismatch)||{};return(0,n.useEffect)(()=>{(async()=>{l((0,Wi.LI)());const e=await(0,a.Gm)();m(e.data),l((0,Wi.MV)())})()},[]),(0,P.jsxs)(Mi,{children:[(0,P.jsx)(Ki,{heading:h||d.heading,iconSrc:L.tFI,iconAlt:"entered details",fields:i,values:r,isUserEnteredDetail
1141s:!0,nationalityObject:u}),(0,P.jsx)(Ki,{heading:_||c.heading,iconSrc:L.e9O,iconAlt:"document details",fields:i,values:s,nationalityObject:u})]})};var Ji=i(75358);const en=W.Ay.div` 1142 width: 100%; 1143 display: flex; 1144 justify-content: center; 1145 align-items: flex-start; 1146`,tn=W.Ay.div` 1147 width: 100%; 1148 max-width: 450px; 1149 display: flex; 1150 flex-direction: column; 1151 gap: 48px; 1152`,nn=W.Ay.div` 1153 width: 100%; 1154 background: ${Q.lm.lightShadedGrey}; 1155 border-radius: 8px; 1156 padding: 16px 74px; 1157 display: flex; 1158 flex-direction: column; 1159 gap: 12px; 1160 border: 1px solid ${Q.lm.borderGrey}; 1161 justify-content: center; 1162 align-items: center; 1163 @media ${Q.W.mobileXL} { 1164 padding: 16px; 1165 } 1166`,on=W.Ay.div` 1167 display: flex; 1168 gap: 12px; 1169`,an=W.Ay.div` 1170 width: 100%; 1171 gap: 15px; 1172 display: flex; 1173 justify-content: space-evenly; 1174 align-items: center; 1175 flex-direction: column; 1176`,sn=W.Ay.img` 1177 ${e=>{let{$isLocal:t}=e;return t?"width: 32px; height: 32px;":"width: 100%; height: 100%; object-fit: contain;"}} 1178`,rn=W.Ay.div` 1179 width: ${e=>{let{$isSingleImage:t}=e;return t?"160":"130"}}px; 1180 height: ${e=>{let{$isSingleImage:t}=e;return t?"98":"80"}}px; 1181 border: ${e=>{let{$hasBorder:t,$borderType:i="solid"}=e;return t?`1.5px ${i} ${Q.lm.black}`:"none"}}; 1182 border-radius: ${e=>{let{$hasBorder:t}=e;return t?"4px":"0"}}; 1183 display: flex; 1184 justify-content: center; 1185 align-items: center; 1186`,ln=W.Ay.div` 1187 display: flex; 1188 justify-content: center; 1189 align-items: center; 1190 gap: 8px; 1191 img { 1192 width: 10px; 1193 height: 10px; 1194 } 1195 .image-caption { 1196 text-align: center; 1197 line-height: 16px; 1198 font-size: 12px; 1199 color: ${Q.lm.textGrey}; 1200 } 1201`,dn=W.Ay.span` 1202 font-size: 14px; 1203 letter-spacing: 0; 1204 line-height: 22px; 1205 text-align: center; 1206 color: ${Q.lm.textGrey}; 1207`,cn=e=>{let{documentError:t,errorType:i}=e;const n=t.errors[i],o="MISSING_PAGE"===i||"NOT_A_DOCUMENT"===i,a="MISSING_PAGE"===i?"dashed":"solid",s=!n.cdnSecondaryImageName;return(0,P.jsxs)(nn,{children:[(0,P.jsxs)(on,{children:[n.cdnSecondaryImageName?(0,P.jsxs)(an,{children:[(0,P.jsx)(rn,{$hasBorder:!0,$borderType:"solid",$isSingleImage:!1,children:(0,P.jsx)(sn,{alt:n.caption,src:`${v.hEb}${n.cdnSecondaryImageName}-light.svg`})}),(0,P.jsxs)(ln,{children:[(0,P.jsx)("img",{alt:"error",src:L.IOb}),(0,P.jsx)("span",{className:"image-caption",children:n.secondaryCaption})]})]}):null,(0,P.jsxs)(an,{children:[(0,P.jsx)(rn,{$hasBorder:o,$borderType:a,$isSingleImage:s,children:(0,P.jsx)(sn,{$isLocal:o,alt:n.caption,src:o?L.ptF:`${v.hEb}${n.cdnImageName}-light.svg`})}),(0,P.jsxs)(ln,{children:[(0,P.jsx)("img",{alt:"error",src:L.Icj}),(0,P.jsx)("span",{className:"image-caption",children:n.caption})]})]})]}),(0,P.jsx)(dn,{children:n.description})]})},un=e=>{let{documentError:t,errorType:i}=e;return(0,P.jsx)(en,{children:(0,P.jsx)(tn,{children:(0,P.jsx)(cn,{documentError:t,errorType:i})})})},mn=()=>{const e=(0,o.wA)(),{reKycDetails:t,eKycCMSData:i}=(0,o.d4)(Xi.e),{kycDataReview:a}=i||{},{country_code:s}=(0,o.d4)(Xi.gV),{detailsMismatch:r,documentError:l}=a||{},d=null===t||void 0===t?void 0:t.idScanFailureReason,c=!E.hl[d],{title:u,description:m,primaryBtn:p,secondaryBtn:h}=(c?r:l)||{};(0,n.useEffect)(()=>{e((0,Ji.Os)()),(async()=>{await(0,S.ML)(s,e)})()},[e]);return i&&t?(0,P.jsx)(Ii,{children:(0,P.jsxs)(Ri,{children:[(0,P.jsx)(Oi,{src:L.Kj,alt:c?"mismatch found":"document error"}),(0,P.jsx)(ki,{children:u}),(0,P.jsx)(Li,{children:m}),c?(0,P.jsx)(Zi,{mismatchedFields:t.mismatchedFields,jumioExtractedData:t.jumioExtractedData,previousValues:t.previousValues}):(0,P.jsx)(un,{documentError:l,errorType:t.idScanFailureReason||"GLARE"}),(0,P.jsx)(F.mU,{text:p,width:450,onClick:()=>e(c?(0,Ji._q)(!0):(0,Ji.e0)(E.TQ.jumioInitiate))}),h?(0,P.jsx)(F.mU,{text:h,type:"link",onClick:()=>{e((0,Ji.e0)(E.TQ.personalInformation))}}):null,c?null:(0,P.jsxs)(Fi,{children:[(0,P.jsx)("span",{className:"__text",children:"Need help?"}),(0,P.jsxs)("div",{children:[(0,P.jsx)("span",{className:"__text",children:"Find answers fast with"})," ",(0,P.jsx)(pt.N_,{className:"__link",to:v.WXl,children:"Help Center"})]})]})]})}):null},pn=W.Ay.div` 1208 width: 100%; 1209 height: 100%; 1210 display: flex; 1211 justify-content: center; 1212 align-items: flex-start; 1213`,hn=W.Ay.div` 1214 max-width: 450px; 1215 width: 100%; 1216 display: flex; 1217 flex-direction: column; 1218 gap: 32px; 1219 align-items: center; 1220 .veriff-container__warning-icon { 1221 height: 64px; 1222 width: 64px; 1223 margin: auto; 1224 } 1225`,_n=W.Ay.span` 1226 text-align: center; 1227 font-size: 28px; 1228 line-height: 38px; 1229 font-family: ${Q.F2.hellix.bold}; 1230`,xn=W.Ay.span` 1231 font-size: 16px; 1232 line-height: 22px; 1233 text-align: center; 1234 color: ${Q.lm.textGrey}; 1235`,vn=W.Ay.div` 1236 width: 100%; 1237 border: 1px solid ${Q.lm.borderGrey}; 1238 padding: 16px; 1239 border-radius: 8px; 1240 display: grid; 1241 grid-template-columns: 9fr 1fr; 1242 gap: 12px; 1243`,fn=W.Ay.div` 1244 width: 100%; 1245 display: flex; 1246 flex-direction: column; 1247 gap: 12px; 1248 .text-container { 1249 width: 100%; 1250 display: flex; 1251 flex-direction: column; 1252 .__heading { 1253 font-size: 16px; 1254 line-height: 24px; 1255 font-family: ${Q.F2.hellix.bold}; 1256 } 1257 .__description { 1258 font-size: 14px; 1259 line-height: 22px; 1260 color: ${Q.lm.textGrey}; 1261 } 1262 } 1263 .__document-type-text { 1264 color: ${Q.lm.textGrey}; 1265 font-size: 14px; 1266 line-height: 22px; 1267 font-family: ${Q.F2.hellix.bold}; 1268 } 1269`,yn=Object.freeze({PASSPORT:"Passport",DRIVING_LICENSE:"Australian Driver Licence"}),bn=()=>
1269{const e=(0,o.wA)(),[t,i]=(0,n.useState)(!0),{eKycCMSData:a,reKycDetails:s}=(0,o.d4)(Xi.e),{kycDataReview:r}=a||{},{detailsMismatch:l}=r||{},{retryDocumentType:d,firstKycDocumentType:c}=s||{},{title:u,description:m,contentDescription:p,contentHeading:h,primaryBtn:_,secondaryBtn:x}=l||{},{user_session:{remitter_id:v}}=(0,o.d4)(Xi.so),f=(0,o.d4)(Xi.gI),y=async t=>{const i={person:{firstName:" ",lastName:" "},vendorData:JSON.stringify({remitterId:v}),timestamp:(new Date).toISOString()};t&&("DRIVING_LICENSE"===t&&(t="DRIVERS_LICENSE"),i.document={type:t});try{const t=await fetch("https://api.veriff.me/v1/sessions",{method:"POST",headers:{"Content-Type":"application/json","x-auth-client":K},body:JSON.stringify({verification:i})});if(!t.ok)throw new Error("session creation failed");const n=await t.json();(0,B.Y)({url:n.verification.url,onEvent:async function(t){switch(t){case B.n.FINISHED:e((0,Ji.e0)(E.TQ.ocrRetrivedInformation));break;case B.n.CANCELED:await e((0,Ji._q)(!0));break;default:return}}})}catch(n){await e((0,Ji._q)(!0))}};return(0,n.useEffect)(()=>{(async()=>{await e((0,Ji.Os)()),await(0,S.ML)(f,e),i(!1)})()},[]),t?(0,P.jsx)(F.Mf,{}):(0,P.jsx)(pn,{children:(0,P.jsxs)(hn,{children:[(0,P.jsx)("img",{alt:"blue warning",src:L.Kj,className:"veriff-container__warning-icon"}),(0,P.jsx)(_n,{children:(0,A.Ym)(u,{document:yn[c]})}),(0,P.jsx)(xn,{children:(0,A.Ym)(m,{document:yn[d]})}),(0,P.jsxs)(vn,{children:[(0,P.jsxs)(fn,{children:[(0,P.jsxs)("div",{className:"text-container",children:[(0,P.jsx)("span",{className:"__heading",children:h}),(0,P.jsx)("span",{className:"__description",children:p})]}),(0,P.jsx)(Z,{}),(0,P.jsx)("span",{className:"__document-type-text",children:yn[d]})]}),(0,P.jsx)("img",{src:L.HwT,alt:"extract-image"})]}),(0,P.jsx)(F.mU,{text:(0,A.Ym)(_,{document:yn[d]}),width:450,onClick:()=>y(d)}),"DRIVING_LICENSE"===d?(0,P.jsx)(F.mU,{text:x,type:"link",onClick:async()=>{e((0,Ji._q)(!0))}}):null]})})},gn="taxInformationForm",jn=(0,m.A)({form:gn,onSubmitFail:s.Nc})(e=>{var t,i,l,d;let{handleSubmit:m}=e;const h=(0,o.wA)(),v=(0,o.d4)(Xi.gI),f=(0,o.d4)(e=>e.rootReducer.newUserFlowReducer.taxInfo),y=(0,o.d4)(e=>e.rootReducer.userDataReducer.userStateInfo.remitterDetails),A=(0,o.d4)(e=>(0,p.A)(gn)(e)),N=(0,n.useMemo)(()=>{var e,t;return f&&(f.taxNumber||f.taxCountry)?f:{taxNumber:(null===y||void 0===y||null===(e=y.tax_information)||void 0===e?void 0:e.tax_number)||"",taxCountry:(null===y||void 0===y||null===(t=y.tax_information)||void 0===t?void 0:t.tax_country)||""}},[f,y]),w=(0,S.Bp)(v),C=(0,S.I1)(S.jC.TaxInformation,w),D=null===C||void 0===C?void 0:C.stepperData,[k,O]=(0,n.useState)(),[F,M]=(0,n.useState)({});(0,n.useEffect)(()=>{(async()=>{const e=await(0,S.Xl)(S.jC.TaxInformation,w),t=null===e||void 0===e?void 0:e.inputFields,i=(0,T.omit)(e,"inputFields");O(i);const n=(0,S.X$)(t,"TAX_COUNTRY_FIELD"),o=(0,S.X$)(t,"TAX_NUMBER_FIELD");M({taxCountry:{label:(null===n||void 0===n?void 0:n.label)||E.xV.TAX_COUNTRY_FIELD.label,placeHolder:(null===n||void 0===n?void 0:n.placeHolder)||E.xV.TAX_COUNTRY_FIELD.placeHolder},taxNumber:{label:(null===o||void 0===o?void 0:o.label)||E.xV.TAX_NUMBER_FIELD.label,placeHolder:(null===o||void 0===o?void 0:o.placeHolder)||E.xV.TAX_NUMBER_FIELD.placeHolder}})})()},[w]),(0,n.useEffect)(()=>{(null!==N&&void 0!==N&&N.taxNumber||null!==N&&void 0!==N&&N.taxCountry)&&h((0,c.n_)(gn,N))},[h,N]);return(0,P.jsx)(r.vo,{children:(0,P.jsxs)(r.q,{padding:[30,0],children:[(0,P.jsx)("div",{className:"navigation-container",children:(0,P.jsx)("img",{onClick:()=>{h((0,a.C0)(A)),h((0,a.e0)(E.TQ.personalInformation))},className:"back-button",src:L.E71,alt:"back"})}),(0,P.jsx)(_.A,{heading:null===k||void 0===k?void 0:k.heading,headerLogo:L.sfn,stepNumber:null===D||void 0===D?void 0:D.stepNumber,totalSteps:null===D||void 0===D?void 0:D.totalSteps,subHeading:null===k||void 0===k?void 0:k.description}),(0,P.jsx)(r.MG,{marginTop:45,children:(0,P.jsxs)("form",{onSubmit:m(async()=>{const e={taxNumber:(null===A||void 0===A?void 0:A.taxNumber)||"",taxCountry:(null===A||void 0===A?void 0:A.taxCountry)||""};h((0,s.LI)());const t=await h((0,a.E6)(e));var i,n,o,r,l;t&&(h((0,a.C0)(A)),h((0,a.e0)(null===t||void 0===t||null===(i=t.data)||void 0===i||null===(n=i.data)||void 0===n||null===(o=n.data)||void 0===o||null===(r=o.nextOnboardProcess)||void 0===r||null===(l=r.transitions[0])||void 0===l?void 0:l.to)));h((0,s.MV)())}),children:[(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===A||void 0===A?void 0:A.taxCountry,parentClassName:"form-text-field",showLabel:!0,labelText:null===F||void 0===F||null===(t=F.taxCountry)||void 0===t?void 0:t.label,type:"text",name:"taxCountry",placeholder:null===F||void 0===F||null===(i=F.taxCountry)||void 0===i?void 0:i.placeHolder,component:b.A,disableUnderlineStyling:!0,width:"100%",url:`${g.H$}/countries/dropdown?is_nationality_activated=true`})})}),(0,P.jsx)(r.fI,{padding:[13,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(u.A,{bindToThisObject:null===A||void 0===A?void 0:A.taxNumber,parentClassName:"form-text-field",type:"text",name:"taxNumber",label:null===F||void 0===F||null===(l=F.taxNumber)||void 0===l?void 0:l.label,component:I.A,disableUnderlineStyling:!0,normalize:(0,j.YR)(20),val
1269idate:[x.G7,x.rS],shrink:!0,placeholder:null===F||void 0===F||null===(d=F.taxNumber)||void 0===d?void 0:d.placeHolder})})}),(0,P.jsx)(r.fI,{padding:[24,0,0,0],children:(0,P.jsx)(r.fv,{width:450,children:(0,P.jsx)(R.A,{text:null===k||void 0===k?void 0:k.primaryBtnText,width:450,height:46})})})]})})]})})}),An=n.lazy(()=>Promise.resolve().then(()=>i(62727))),Nn={ocr_verification:{name:E.TQ.ocrVerification,component:(0,P.jsx)(se,{})},jumio_initiate:{name:E.TQ.jumioInitiate,component:(0,P.jsx)(se,{})},onfido_initiate:{name:E.TQ.onfidoInitiate,component:(0,P.jsx)(se,{})},jumio_verification:{name:E.TQ.jumioVerification,component:(0,P.jsx)(An,{})},personal_information_input:{name:E.TQ.personalInformation,component:(0,P.jsx)(U,{})},mobile_number_verification:{name:E.TQ.mobileNumberVerification,component:(0,P.jsx)(U,{})},mobile_number_input:{name:E.TQ.mobileNumberInput,component:(0,P.jsx)(ce.A,{})},document_information_passport_dl:{name:E.TQ.documentInformationPassportDl,component:(0,P.jsx)(de,{})},personal_employment_information_input:{name:E.TQ.employmentInformation,component:(0,P.jsx)(it,{})},ocr_retrieved_information_edit:{name:E.TQ.ocrRetrivedInformationEdit,component:(0,P.jsx)(he,{})},ocr_retrieved_information:{name:E.TQ.ocrRetrivedInformation,component:(0,P.jsx)(Le,{})},referral_code:{name:E.TQ.referralCode,component:(0,P.jsx)(ce.A,{})},address_input:{name:E.TQ.addressInput,component:(0,P.jsx)(Fe.A,{})},manual_document_upload:{name:E.TQ.manualDocumentUpload,component:(0,P.jsx)(Di.A,{})},individual_poa_upload:{name:E.TQ.individualPoaUpload,component:(0,P.jsx)(Di.A,{})},manual_document_upload_id:{name:E.TQ.manualDocumentUploadId,component:(0,P.jsx)(Ei.A,{})},individual_documents_upload:{name:E.TQ.individualDocumentsUpload,component:(0,P.jsx)(xt.A,{})},identity_verification_input:{name:E.TQ.identityVerificationInput,component:(0,P.jsx)(xt.A,{})},holding_verify_screen:{name:E.TQ.holdingVerifyScreen,component:(0,P.jsx)(ft,{})},ekyc_acknowledgement:{name:E.TQ.ekycAck,component:(0,P.jsx)(Xe,{animated:!1})},ekyc_successful:{name:E.TQ.ekycSuccess,component:(0,P.jsx)(Xe,{animated:!0})},ekyc_service_down:{name:E.TQ.ekycServiceDown,component:(0,P.jsx)(Je,{})},individual_photo_upload:{name:E.TQ.selfieUpload,component:(0,P.jsx)(Ci,{})},onboarding_successful:{name:E.TQ.onboardingSuccess,component:(0,P.jsx)(_t,{})},schedule_interview:{name:E.TQ.scheduleInterview,component:(0,P.jsx)(Dt,{})},appointment_confirmation:{name:E.TQ.appointmentConfirmation,component:(0,P.jsx)(Tt,{})},account_usage_information_input:{name:E.TQ.accountUsageInput,component:(0,P.jsx)(mi,{})},onboarding_verification:{name:E.TQ.onboardingVerification,component:(0,P.jsx)(Ti.A,{})},kyc_data_review:{name:E.TQ.kycDataReview,component:(0,P.jsx)(mn,{})},ocr_reinitialization:{name:E.TQ.ocrReinitialization,component:(0,P.jsx)(bn,{})},tax_information_input:{name:E.TQ.taxInformation,component:(0,P.jsx)(jn,{})}};const wn=(0,o.Ng)(function(e){const{rootReducer:{newUserFlowReducer:{currentScreen:t},userStatusReducer:{country_code:i,document_status:n},documentDataReducer:{uploadDocConfig:o}}}=e;return{currentScreen:t,country_code:i,uploadDocConfig:o,document_status:n}},{getNextOnboardingScreen:a.LS,changeOnBoardingScreen:a.e0,activateLoader:s.LI,disableLoader:s.MV,scrollToTop:s.eG})(e=>{let{currentScreen:t,getNextOnboardingScreen:i,scrollToTop:o,country_code:a,dispatch:l,changeOnBoardingScreen:d,uploadDocConfig:c,document_status:u}=e;const[m,p]=(0,n.useState)(!0);(0,n.useEffect)(()=>{"US"!==a?h():p(!1)},[]),(0,n.useEffect)(()=>{o()},[t]);const h=async()=>{(0,s.LI)(),await i(),p(!1),(0,s.MV)()};return(0,n.useEffect)(()=>{if("US"===a){let e=null,t=null;u&&u.forEach(i=>{"INDIVIDUAL_POI"===i.type?e=i.status:"INDIVIDUAL_POA"===i.type&&(t=i.status)}),c&&(!1===e&&!1===t||!1===e?d(E.TQ.identityVerificationInput):!1===t&&d(E.TQ.manualDocumentUpload))}},[c]),m?(0,P.jsx)(r.z$,{children:(0,P.jsx)("img",{alt:"loader",src:L._fE,className:"loader-image"})}):(0,P.jsx)("div",{children:null===(_=Nn[t])||void 0===_?void 0:_.component});var _})},5700(e,t,i){var n=i(9950),o=i(41001),a=i(32988),s=i(41711),r=i(3164),l=i(26185),d=i(16014),c=i(14048),u=i(28767),m=i(88733),p=i(44414);const h=e=>{let{isOddVerificationFlow:t,onSelectDocument:i}=e;const h=(0,o.wA)(),[_,x]=n.useState([]),v=d.DY;n.useEffect(()=>{(async()=>{h((0,c.LI)());const e=await h((0,s.tf)()),t=null===e||void 0===e?void 0:e.filter(e=>e.type.includes("POI"));x(t),h((0,c.MV)())})()},[]);return(0,p.jsxs)(r.q,{padding:[-2,0],children:[!t&&(0,p.jsxs)(a.A,{className:"header-text-container",children:[(0,p.jsx)("h1",{className:"heading-text",children:null===v||void 0===v?void 0:v.ID_VERIFICATION_HEADING}),(0,p.jsx)("span",{className:"heading-description",children:null===v||void 0===v?void 0:v.ID_VERIFICATION_DESC})]}),(0,p.jsx)(r.N,{children:_&&(null===_||void 0===_?void 0:_.map((e,n)=>{var o;return(0,p.jsxs)(r.VF,{onClick:()=>(e=>{t?null===i||void 0===i||i(e):(h((0,s.BG)(e)),h((0,s.e0)(u.TQ.onboardingVerification)))})(e),children:[(0,p.jsx)("div",{className:"image-container",children:(0,p.jsx)("img",{src:null===(o=m.G[e.document_code])||void 0===o?void 0:o.image,alt:(e.label||"verification-method").toLowerCase()})}),(0,p.jsxs)("div",{className:"mid-section-container",children:[(0,p.jsx)("span",{className:"main-text",children:e.label}),(0,p.jsx)("span",{className:"sub-text",children:e.document_description})]}),(0,p.jsx)("div",{className:"verification-method-right-icon",children:(0,p.jsx)("img",{src:l.$wN,alt:"chevron-right"})})]},n)}))})]})};i.d(t,["A",0,h])},78325(e,t,i){var n=i(9950),o=i(41001),a=i(32988),s=i(3164),r=i(12916),l=i(88442),d=i(75358),c=i(28767),u=i(14048),m=i(47131),p=i(93631),h=i(26185),_=i(10993),x=i(53924),v=i(10482),f=i(20659),y=i(93357),b=i(15366),g=i(24115),j=i(44414);const A="verification_document_upload",N=(0,p.A)({form:A})(e=>{var t,i,p,N,w;let{handleSubmit:S,initialize:C,isSgOnboardingflow:D,changeScreen:T,screens:E,timeline:I}=e;const R=(0,o.wA)(),k=(0,o.d4)(r.gI),O=(0,o.d4)(r.nI),L=(0,o.d4)(r.e),F=null===L||void 0===L?void 0:L.isAddressVerifiedTrulioo,M=null===(t=(0,o.d4)(r.Gd))||void 0===t||null===(i=t.userStateInfo)||void 0===i||null===(p=i.remitterDetails)||void 0===p?void 0:p.onfido_check_created,P=L.selectedDocument,$=P.type.includes("POI"),U=null===(N=(0,o.d4)(r.gV))||void 0===N?void 0:N.document_status,V=null===U||void 0===U?void 0:U.some(e=>"INDIVIDUAL_PERSONAL_IMAGE"===e.type&&!1===e.status),B=null===U||void 0===U?void 0:U.some(e=>"INDIVIDUAL_POI"===e.type&&!1===e.status),Y=null===U||void 0===U?void 0:U.some(e=>"INDIVIDUAL_POA"===e.type&&!1===e.status),H=null===L||void 0===L?void 0:L.userInfo,z=null===L||void 0===L?void 0:L.manualDocInfo,G=n.useRef(null),q=n.useRef(null),[K,Q]=n.useState(""),[W,X]=n.useState(),[Z,J]=n.useState(),[ee,te]=n.useState(""),[ie,ne]=n.useState(""),[oe,ae]=n.useState({frontError:"",backError:""}),[se,re]=n.useState(),[le,de]=n.useState(),ce=function(e){var t;let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=null===e||void 0===e||null===(t=e.dataURL)||void 0===t?void 0:t.split(",")[1],o=(i?"front":"back")+"_doc.png",a=(0,f.Y_)(n,o,"image/png"),s=new DataTransfer;s.items.add(a),i&&(X(s.files),re({data:{dataURL:e.dataURL}}),ae(e=>({...e,frontError:""}))),i||(de({data:{dataURL:e.dataURL}}),J(s.files),ae(e=>({...e,backError:""})))};return n.useEffect(()=>{(()=>{if(null!==H&&void 0!==H&&H.documentDetails){var e;const{documentDetails:t}=H;if(null!==(e=t.type)&&void 0!==e&&e.toLowerCase().includes("license")&&"DRIVING_LICENSE"===P.document_code){const{validUntil:e,number:i,issuedBy:n}=t,o=null===e||void 0===e?void 0:e.split("-").reverse().join("/");Q(n),null===C||void 0===C||C({date_of_expiry:o,identity_number:i,issuing_authority:n})}else if("PASSPORT"===t.type&&"PASSPORT"===P.document_code){const{validUntil:e,number:i,country:n,placeOfIssue:o}=t,a=null===e||void 0===e?void 0:e.split("-").reverse().join("/");Q(n),null===C||void 0===C||C({date_of_expiry:a,identity_number:i,country_of_issue:n,place_of_issue:o})}}if(null!==z&&void 0!==z&&z.driving_license&&"DRIVING_LICENSE"===P.document_code){const{identityNumber:e,expiryDate:t,issuedBy:i}=z.driving_license;Q(i),null===C||void 0===C||C({identity_number:e,date_of_expiry:null===t||void 0===t?void 0:t.split("-").reverse().join("/"),issuing_authority:i})}else if(null!==z&&void 0!==z&&z.passport&&"PASSPORT"===P.document_code){const{identityNumber:e,expiryDate:t,issuingCountry:i,placeOfIssue:n}=z.passport;Q(i),null===C||void 0===C||C({identity_number:e,date_of_expiry:null===t||void 0===t?void 0:t.split("-").reverse().join("/"),country_of_issue:i,place_of_issue:n})}})()},[]),(0,j.jsxs)(s.q,{padding:[-2,0],headerAlignment:k===l.US?"start":"center",children:[(0,j.jsxs)("div",{className:"navigation-container",children:[(0,j.jsx)("img",{onClick:()=>{D?null===T||void 0===T||T(g.clv,"poa_render_page",E,I):R((0,d.e0)($?c.TQ.manualDocumentUploadId:c.TQ.manualDocumentUpload))},className:"back-button",src:h.E71,alt:"back"}),(0,j.jsx)(a.A,{className:"header-text-container",children:(0,j.jsx)("h1",{className:"heading-text-docs",children:P.label})})]}),(0,j.jsx)(s.MG,{marginTop:48,children:(0,j.jsxs)("form",{onSubmit:null===S||void 0===S?void 0:S(async e=>{var t;if(((null===W||void 0===W?void 0:W.length)<1||!W)&&((null===Z||void 0===Z?void 0:Z.length)<1||!Z))return void ae({frontError:"Required",backError:"Required"});if((null===W||void 0===W?void 0:W.length)<1||!W)return void ae(e=>({...e,frontError:"Required"}));if(P.is_back_mandatory&&((null===Z||void 0===Z?void 0:Z.length)<1||!Z))return void ae(e=>({...e,backError:"Required"}));R((0,u.LI)());const i=`${P.type.toLowerCase()}_${P.document_code.toLowerCase()}_doc_file`,n={[P.type]:{[P.document_code]:{...e,[i]:W[0],...P.is_back_mandatory?{[`${i}_back`]:Z[0]}:{}}
1269}},{documents:o,files:a}=(0,x.W0)(n,[],{}),s=await R((0,m.Iu)(a,o,{formID:A,payload:n,doc_count:null===W||void 0===W?void 0:W.length},!1,!0));if(null!==s&&void 0!==s&&null!==(t=s.data)&&void 0!==t&&t.success){if(D)return void(null===T||void 0===T||T(g.clv,"acknowledgement",E,I));if($&&Y)return void R((0,d.e0)(c.TQ.manualDocumentUpload));if(l.y_c.includes(k))return void R(!1===F||M?"LT"===O&&B?(0,d.e0)(c.TQ.identityVerificationInput):(0,d.e0)(c.TQ.ekycAck):V?(0,d.e0)(c.TQ.selfieUpload):(0,d.e0)(c.TQ.ekycAck));R((0,d.e0)(c.TQ.ekycAck))}R((0,u.MV)())}),children:[null===(w=P.fields_json)||void 0===w?void 0:w.map(e=>(0,j.jsx)(s.fI,{padding:[17,0],children:(0,j.jsx)(s.fv,{width:450,children:(0,v.s)(e,K,Q,k)})},e.name)),(0,j.jsx)(_.h,{isBackRequired:P.is_back_mandatory,fileBackUploadInputRef:G,fileFrontUploadInputRef:q,label:P.label,frontFiles:W,backFiles:Z,isCaptureButtonRequired:P.show_capture_button,fileErrors:oe,setFilesError:ae,setBackFiles:J,setFrontFiles:X,backFilesBase:ie,frontFilesBase:ee,setBackFilesBase:ne,setFrontFilesBase:te,onFrontImgCaptureChange:e=>ce(e,!0),onBackImgCaptureChange:e=>ce(e,!1),frontImgFile:se,backImgFile:le,setBackImgFile:de,setFrontImgFile:re,countryCode:k,isPOAFlow:!0}),"PASSPORT"===P.document_code?(0,j.jsx)(s.fI,{padding:[19,0],children:(0,j.jsx)(s.fv,{width:450,children:(0,j.jsxs)(s.DK,{cursor:!0,headerMarginTop:8,textColor:y.A.darkBlue,fontWeight:700,children:[(0,j.jsx)("span",{className:"__description",children:"Open personal details section and capture both pages clearly."}),(0,j.jsx)("span",{className:"__heading",onClick:()=>(0,b.c)(),children:"View sample"})]})})}):null,(0,j.jsx)(s.fI,{padding:[29,0,0,0],children:(0,j.jsx)(s.fv,{width:450,children:(0,j.jsx)(s.b7,{margin:[0,0],children:"Submit"})})})]})})]})}),w=N;i.d(t,["A",0,w])},49171(e,t,i){var n=i(9950),o=i(41001),a=i(32988),s=i(41711),r=i(3164),l=i(26185),d=i(88442),c=i(16014),u=i(12916),m=i(88733),p=i(14048),h=i(28767),_=i(24115),x=i(44414);const v=e=>{let{isSgOnboardingflow:t=!1,screens:i=[],timeline:v,changeScreen:f,isOddVerificationFlow:y,onSelectDocument:b}=e;const g=(0,o.wA)(),j=(0,o.d4)(u.gI),[A,N]=(0,n.useState)([]),w=d.y_c.includes(j)?c.j3:j===d.US?c.nH:c.DY;n.useEffect(()=>{(async()=>{g((0,p.LI)());const e=(await g((0,s.tf)())).filter(e=>e.type.includes("POA"));N(e),g((0,p.MV)())})()},[]);return(0,x.jsxs)(r.q,{padding:[-2,0],isSgOnboardingflow:t,children:[t&&(0,x.jsxs)("div",{className:"navigation-container",children:[(0,x.jsx)("img",{onClick:()=>{t&&(null===f||void 0===f||f(_.clv,"personal_details",i,v))},className:"back-button",src:l.E71,alt:"back"}),(0,x.jsx)(a.A,{className:"header-text-container",children:(0,x.jsx)("h1",{className:"heading-text-docs",children:null===w||void 0===w?void 0:w.ADDRESS_VERIFICATION_HEADING})})]}),!y&&(0,x.jsxs)(a.A,{className:"header-text-container",children:[(0,x.jsx)("h1",{className:"heading-"+(t?"subtext":"text"),children:null===w||void 0===w?void 0:w.ADDRESS_VERIFICATION_HEADING}),(0,x.jsx)("span",{className:"heading-description",children:t?"Please upload one of the following documents so we can proceed.":null===w||void 0===w?void 0:w.ADDRESS_VERIFICATION_DESC})]}),(0,x.jsx)(r.N,{children:A&&(null===A||void 0===A?void 0:A.map((e,n)=>{var o;return(0,x.jsxs)(r.VF,{onClick:()=>(e=>{y?null===b||void 0===b||b(e):(g((0,s.BG)(e)),t?null===f||void 0===f||f(_.clv,"poa_upload_page",i,v):g((0,s.e0)(h.TQ.onboardingVerification)))})(e),children:[(0,x.jsx)("div",{className:"image-container",children:(0,x.jsx)("img",{src:null===(o=m.G[e.document_code])||void 0===o?void 0:o.image,alt:e.label.toLowerCase()})}),(0,x.jsxs)("div",{className:"mid-section-container",children:[(0,x.jsx)("span",{className:"main-text",children:e.label}),(0,x.jsx)("span",{className:"sub-text",children:e.document_description})]}),(0,x.jsx)("div",{className:"verification-method-right-icon",children:(0,x.jsx)("img",{src:l.$wN,alt:"chevron-right"})})]},n)}))})]})};i.d(t,["A",0,v])},88733(e,t,i){var n=i(26185);const o={UTILITY_BILL:{image:n.HYA},DRIVING_LICENSE:{image:n.En5},BANK_STATEMENT:{image:n.qNC},PASSPORT:{image:n.Vyv},GOVERNMENT_LETTER:{image:n.C0E}};i.d(t,["G",0,o])},10482(e,t,i){i(9950);var n=i(96553),o=i(16762),a=i(88442),s=i(93031),r=i(28767),l=i(13217),d=i(43880),c=i(69510),u=i(59051),m=i.n(u),p=i(44414);const h=e=>{const{validations:{range:t}}=e;let i,n;return Number(null===t||void 0===t?void 0:t.max_offset)>=0&&(i=m()().add(null===t||void 0===t?void 0:t.max_offset,null===t||void 0===t?void 0:t.max_identifier)),null!==t&&void 0!==t&&t.min_offset&&Number(null===t||void 0===t?void 0:t.min_offset)>0?n=m()().subtract(null===t||void 0===t?void 0:t.min_offset,null===t||void 0===t?void 0:t.min_identifier):null!==t&&void 0!==t&&t.min_offset&&Number(null===t||void 0===t?void 0:t.min_offset)<=0&&(n=m()().add(null===t||void 0===t?void 0:t.min_offset,null===t||void 0===t?void 0:t.min_identifier)),{maxDate:i,minDate:n}};i.d(t,["s",0,(e,t,i,u,m)=>{var _;const x={url:void 0,customPlaceholder:void 0,InputLabelProps:void 0,parentClassName:void 0,maxDate:void 0,minDate:void 0},v=[o.mw];switch(e.validations.type){case"alphanumeric":v.push(o.G7);break;case"alphanumericWithSpaceDotAndHyphen":v.push(o.gJ)}"text"===e.type&&"place_of_issue"===e.name&&v.push(o.i_);let f=null;switch(e.category){case r.YO.textField:f=d.A;break;case r.YO.datePicker:f=l.A,x.maxDate=h(e).maxDate,x.minDate=h(e).minDate,x.customPlaceholder=u===a.US?"MM/DD/YYYY":"DD/MM/YYYY",x.InputLabelProps={shrink:!0};break;case r.YO.dropdown:f=c.A,x.url=s.H$+e.url,x.InputLabelProps={shrink:!0},x.parentClassName="dropdown",x.bindToThisObject=t,x.onDropdownChange=e=>i(e.value);break;default:f=null}return(0,p.jsx)(n.A,{component:f,validate:v,normalize:(0,o.YR)(null===(_=e.validations.length)||void 0===_?void 0:_.max),name:e.name,type:e.type,shrink:!0,labelText:e.label,showLabel:!0,placeholder:e.label,width:"100%",disableUnderlineStyling:!0,tooltip:m,...x})}])},46289(e,t,i){i.d(t,{A:()=>b});var n=i(9950),o=i(45892),a=i(61338),s=i(70132),r=i(59355),l=i(93357);const d=s.Ay.div` 1270 position: relative; 1271 display: flex; 1272 flex-direction: column; 1273 justify-content: center; 1274 align-items: center; 1275 width: 450px; 1276 gap: 24px; 1277 padding: 32px 20px; 1278 background: ${l.A.white}; 1279 border-radius: 10px; 1280 1281 .close-icon { 1282 position: absolute; 1283 top: 16px; 1284 right: 16px; 1285 cursor: pointer; 1286 width: 24px; 1287 height: 24px; 1288 } 1289`,c=s.Ay.div` 1290 text-align: center; 1291 margin-top: 12px; 1292 font-family: ${r.F.hellix.bold};
1293 line-height: 26px; 1294 font-size: 18px; 1295 color: ${l.A.black}; 1296`,u=s.Ay.div` 1297 text-align: center; 1298 margin-top: 8px; 1299 font-family: ${r.F.hellix.regular}; 1300 font-weight: 400; 1301 line-height: 22px; 1302 font-size: 16px; 1303 color: ${l.A.textGrey}; 1304`,m=s.Ay.div` 1305 .bannerImg { 1306 width: 60px; 1307 height: 63px; 1308 } 1309`,p=s.Ay.div` 1310 margin-top: 32px; 1311`,h=s.Ay.span` 1312 font-family: ${r.F.hellix.regular}; 1313 font-weight: 400; 1314 line-height: 18px; 1315 font-size: 12px; 1316 color: ${l.A.textGrey}; 1317`,_=s.Ay.div` 1318 margin-top: 24px; 1319`;var x=i(41001),v=i(76946),f=i(26185),y=i(44414);const b=e=>{var t,i,s,r;let{onClose:l,cmsData:b}=e;const g=(0,x.wA)(),[j,A]=(0,n.useState)(!1);return(0,y.jsxs)(d,{children:[(0,y.jsx)("img",{className:"close-icon",src:f.I6N,alt:"close",onClick:()=>l(!1)}),(0,y.jsx)(m,{children:(0,y.jsx)("img",{src:f.Kj,alt:"Warning Icon",className:"bannerImg"})}),(0,y.jsx)(c,{children:null===b||void 0===b||null===(t=b.labels)||void 0===t?void 0:t.header}),(0,y.jsx)(u,{children:null===b||void 0===b||null===(i=b.labels)||void 0===i?void 0:i.description}),(0,y.jsx)(p,{children:(0,y.jsx)(o.A,{input:{name:"checkboxChecked",value:j},checked:j,checkboxTextFontSize:12,checkboxTextLineHeight:16,broderBorder:!0,customImage:f.rl1,width:24,height:24,handleChange:()=>{A(!j)},checkboxContent:(0,y.jsx)(h,{children:null===b||void 0===b||null===(s=b.labels)||void 0===s?void 0:s.consentAcknowledgement})})}),(0,y.jsx)(_,{children:(0,y.jsx)(a.A,{text:(null===b||void 0===b||null===(r=b.labels)||void 0===r?void 0:r.primaryButton)||"",disabled:!j,onClick:()=>{g((0,v.LI)()),l(!0)}})})]})}},99113(e,t,i){const n={GB:{header:"Stay protected from the scam",description:"Before proceeding, ensure you're sending money to someone you know and trust. \n Transfers can be irreversible, so double-checking now can prevent issues later.",consentAcknowledgement:"I confirm I have read the warning above and am happy to proceed with this transaction",primaryButton:"I understand and accept"}};i.d(t,["A",0,n,"g",0,["GB"]])},46519(e,t,i){i.d(t,{m:()=>d,n:()=>l});i(9950);var n=i(57915);const o=e=>{var t;return null!==e&&void 0!==e&&e.isAccountVerificationError?"BENE_API_ERROR":null!==e&&void 0!==e&&e.isBankVerificationUnavailable?"BENE_API_BENE_VERIFICATION_UNAVAILABLE":null!==e&&void 0!==e&&null!==(t=e.data)&&void 0!==t&&t.displayBeneName?"BENE_API_BANK_NAME_MINOR_ERROR":"BENE_API_BANK_NAME_ERROR"};var a=i(14048),s=i(30962),r=i(44414);const l=async(e,t,i,a,l,d)=>await n.wh.builder(c=>{var u,m;return(0,r.jsx)(n.fY,{contentType:"componentMessageCentreItem",contentId:o(t),primaryCtaOnClick:()=>(e=>{var n;e();const o={vop_beneficiary_verification_details:{...(null===t||void 0===t?void 0:t.isNameVerificationError)&&{bypass_name_verification:!0},...(null===t||void 0===t?void 0:t.isAccountVerificationError)&&{bypass_account_verification:!0},description:null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.description}};d?i(e=>null===a||void 0===a?void 0:a(e,o))():i(o)})(c),shouldShowShareCTAs:!(null!==t&&void 0!==t&&t.isBankVerificationUnavailable),secondaryCtaOnClick:()=>(i=>{var n;e((0,s.pZ)(null)),e((0,s.Xf)(null)),l(null===t||void 0===t?void 0:t.isNameVerificationError,null===t||void 0===t||null===(n=t.data)||void 0===n?void 0:n.displayBeneName),i()})(c),bankNameInvalid:null===t||void 0===t?void 0:t.isNameVerificationError,beneficiaryBankName:null===t||void 0===t||null===(u=t.data)||void 0===u?void 0:u.beneficiaryBankName,displayBeneName:null===t||void 0===t||null===(m=t.data)||void 0===m?void 0:m.displayBeneName,isBankVerificationUnavailable:null===t||void 0===t?void 0:t.isBankVerificationUnavailable,showConsent:!0,isTransactionFlow:!0,showCloseIcon:!0,onClose:c})},"insta-modal bene-info-error",!0),d=async(e,t,i,n)=>{e((0,a.LI)());const o=await e((0,s.tw)(null===t||void 0===t?void 0:t.beneficiary_id));if(o&&!o.success&&(o.isAccountVerificationError||o.isNameVerificationError||o.isBankVerificationUnavailable))l(e,o,i,null,n);else{let e;var r,d;if(null!==o&&void 0!==o&&o.success)e={vop_beneficiary_verification_details:{description:null===o||void 0===o||null===(r=o.data)||void 0===r||null===(d=r.data)||void 0===d?void 0:d.description}};i(e)}}},86682(e,t,i){const n={source_of_funds:"",temp_transaction_id:"",country_code:"",source_currency:"",destination_currency:"",gross_source_amount:"",net_of_fee_amount:"",net_source_amount:"",payment_method_fee_amount:"",payment_method_fee_percent:"",instarem_bank_account_id:"",destination_amount:"",instarem_fx_rate:"",fx_rate:"",margin_currency:"",margin_percent:"",margin_amount:"",transaction_fee_percent:"",transaction_fee_amount:"",redeemed_instapoints:"",redeemed_instapoints_amount:"",tax_amount_1:"",tax_amount_2:"",tax_amount_3:"",tax_type_1:"",tax_type_2:"",tax_type_3:"",net_tax_amount:"",coupon_id:"",coupon_code:"",coupon_amount:"",fx_rate_last_updated:"",additional_info:{}},o={...n};
1319i.d(t,["g",0,n,"p",0,o])},81732(e,t,i){i.d(t,{default:()=>No});var n=i(88442),o=i(9950),a=i(44414);const s=(0,o.lazy)(()=>Promise.all([i.e(9048),i.e(8477),i.e(3653)]).then(()=>i(60348)));const r=function(e){return(0,a.jsx)(s,{})};var l=i(34133),d=i(31033),c=i(41001),u=i(93631),m=i(1780),p=i(57915),h=i(7258),_=i(47131),x=i(24115),v=i(33899),f=i(93031),y=i(20659),b=i(53924),g=i(16152),j=i(76946);var A=i(26185);const N=o.lazy(()=>Promise.resolve().then(()=>i(50779)));class w extends o.Component{constructor(e){super(e),this.componentDidMount=async()=>{let{documentDetails:e,country_code:t}=this.props,i=await this.getUploadDocConfigByScreenName(),n=(0,b.TI)(e,this.requiredDocTypes),{processesdConfig:o}=(0,b.cL)(i,e);this.setState({processesdConfig:o,title:"US"===t?"Take a picture":"Upload your photograph"}),this.props.initialize(n),this.props.disableLoader()},this.getUploadDocConfigByScreenName=async()=>{try{if(!this.props.uploadDocConfig||0!==this.props.uploadDocConfig.length)return this.props.uploadDocConfig;{let e=await this.props.getUploadDocConfig({screen_name:this.props.currentScreen});if(e&&e.data&&e.data.success)return e.data.data}}catch(e){this.props.disableLoader()}},this.renderConfirmationModal=()=>{let{country_code:e}=this.props;return"SG"!==e||p.wh.builder(e=>(0,a.jsxs)("div",{className:"logo-modal",children:[(0,a.jsx)("img",{src:A.Qg9,alt:"instarem",className:"logo"}),(0,a.jsx)("img",{src:A.FmT,alt:"close",className:"close",onClick:()=>e(!1)}),(0,a.jsx)("div",{className:"title",children:"Dear Customer, have you ensured that in the Photo"}),(0,a.jsxs)("div",{className:"important",children:[(0,a.jsx)("div",{className:"ensure",children:"Your face is visible clearly"}),(0,a.jsx)("div",{className:"ensure",children:"Your NRIC/FIN is readable"})]}),(0,a.jsx)("button",{id:"submit",className:"blue-round-submit",onClick:()=>e(!0),children:"Confirm"})]}),"sg-seflie-confirm insta-modal",!0)},this.submitDocDetailsNew=async e=>{try{if(!await this.renderConfirmationModal())return;let{documentDetails:t,uploadPersonalPicNew:i,currentScreen:o,screens:a,timeline:s,changeScreen:r,activateLoader:l,disableLoader:d}=this.props,c=!1,u=null;l(),(0,y.TE)(this.formID,e);let m=t.find(e=>e.type===n.PlZ);m&&m.document_code&&(u=m.document_code);let{documents:p,files:h}=(0,b.W0)(e,t,{vision_doc_code:u});this.visionCheckCount>=Number(f.Gh)&&(c=!0),this.visionCheckCount++;let _=await i(h,p,c);_&&_.data&&!0===_.data.success?(r(x.vtj,o,a,s),d()):d()}catch(t){this.props.disableLoader(),console.log(t)}},this.skipScreen=()=>this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline),this.renderUpload=()=>{const{country_code:e,account_type:t,documentDetails:i,isNewOnboardingEnabledUser:o,handleSubmit:s}=this.props;return(0,y.V2)(e)&&o?(0,a.jsx)(N,{}):this.state.processesdConfig&&Object.keys(this.state.processesdConfig).length>0?(0,a.jsxs)("form",{id:this.formID,onSubmit:s(this.submitDocDetailsNew),encType:"multipart/form-data",className:"common-form-upload-form",onKeyUp:y.jN,onKeyPress:y.jN,children:[(0,a.jsx)(d.A,{children:(0,a.jsx)(d.A.Row,{className:"no-padding1 ",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align",children:[(0,a.jsx)(p.oq,{}),this.state.title]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:this.state.subtitle})]})})}),(0,a.jsx)(p.eN,{processesdConfig:this.state.processesdConfig,disableForm:!1,getAllformVal:this.props.getAllformVal,currentScreen:this.props.currentScreen,country_code:e,account_type:t,documentDetails:i,skipScreen:this.skipScreen,formName:n.PiL,validate:n.U3r})]}):null},this.state={title:"Upload your photograph",processesdConfig:{}},this.formID="form-upload-individual-flow-documents",this.ADD_DOC=null,this.visionCheckCount=0,this.requiredDocTypes=[n.nfZ]}render(){return(0,a.jsx)(a.Fragment,{children:this.renderUpload()})}}const S=(0,u.A)({form:n.PiL,onSubmitFail:j.Nc})(w);const C=(0,c.Ng)(function(e){let t=(0,m.A)(n.PiL)(e);const{rootReducer:{userStatusReducer:{country_code:i,status:o,account_type:a},documentDataReducer:{documentDetails:s,uploadDocConfig:r},userFlowReducer:{screens:l,currentScreen:d,timeline:c},newUserFlowReducer:{new_onboarding_enabled_users:u}}}=e;return{country_code:i,account_type:a,screens:l,currentScreen:d,timeline:c,documentDetails:s,getAllformVal:t,uploadDocConfig:r,disableForm:"ACKNOWLEDGED"===o||s&&s.length>0,isNewOnboardingEnabledUser:u}},{changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV,updateDocsUploadedOrEverifiedSuccess:v.ak,showMessage:g.rG,uploadPersonalPicNew:_.Aw})(S);var D=i(76653),T=i(50779),E=i(8670),I=i(75357),R=i.n(I),k=i(75915),O=i.n(k),L=i(16762),F=i(87946),M=i.n(F),P=i(13386),$=i.n(P),U=i(54415),V=i.n(U),B=(i(42206),i(497));class Y extends o.Component{constructor(e){super(e),this.componentDidMount=async()=>{let{documentDetails:e,defaultInitObjFunc:t}=this.props,i=await this.getUploadDocConfigByScreenName();if(i){let n={},o={};t?o=t(i):n=(0,b.TI)(e,this.requiredDocTypes);let{processesdConfig:a}=(0,b.Jq)((0,b.cL)(i,e),this.props.country_code);this.setState({prevProccessedConfig:a}),this.setState({processesdConfig:a,screenConfig:i}),n&&Object.keys(n).length>0?this.props.initialize(n):o&&Object.keys(o).length>0&&this.props.initialize(o),this.setState({isInitialized:!0}),this.props.disableLoader()}},this.getUploadDocConfigByScreenName=async()=>{try{const{getUploadDocConfig:e,documentDetailsToBeShown:t,ssnDetails:i,currentScreen:o,country_code:a}=this.props;let s=await e({screen_name:o});if(s&&s.data&&s.data.success)return"US"===a&&(t&&t.length>0||i&&i.length>0)?this.setState({subtitle:"We take the security of your account very seriously. As an additional measure, kindly help us with the below document(s)"}):this.props.formName===n.UlI&&this.setState({title:"FATCA Declaration",subtitle:"Do you satisfy any of the criteria mentioned below?"}),s.data.data}catch(e){return this.props.disableLoader(),!1}},this.renderAddressConfirmModal=e=>{let t,{country_code:i,featureState:{toggleFeature:n}}=this.props;return"SG"!==i||(!e||!e[this.ADD_DOC_TYPE]||(!!n||(Object.keys(e[this.ADD_DOC_TYPE]).forEac
1319h(e=>{t=e.toLowerCase().replace(/_/g," ")}),p.wh.builder(e=>(0,a.jsxs)("div",{className:"sg-address-doc-modal",children:[(0,a.jsx)("img",{src:A.Qg9,alt:"instarem",className:"logo"}),(0,a.jsx)("img",{src:A.FmT,alt:"close",className:"close",onClick:()=>e(!1)}),(0,a.jsxs)("div",{className:"title",children:["Dear Customer, have you ensured that the ",(0,a.jsx)("span",{className:"capitalize",children:t})]}),(0,a.jsxs)("div",{className:"important",children:[(0,a.jsx)("div",{className:"ensure",children:"Shows your present address clearly"}),(0,a.jsx)("div",{className:"ensure",children:"Is not older than 90 days"}),(0,a.jsx)("div",{className:"ensure",children:"Is a full page scan/picture(not partial)"})]}),(0,a.jsx)("button",{className:"blue-round-submit",id:"submit",onClick:()=>e(!0),children:"Confirm"})]}),"sg-address-confirm",!0))))},this.showPoASelfAttestedModal=async e=>{let{country_code:t,featureState:{toggleFeature:i}}=this.props;return"IN"!==t||(!e||!e[this.ADD_DOC_TYPE]||(!i||(!(!e||!e.currentDocScreen||"POA"===e.currentDocScreen.key)||await p.wh.builder(e=>(0,a.jsx)("div",{className:"attest-modal",children:(0,a.jsx)("div",{className:"contentWrapper",children:(0,a.jsxs)("div",{className:"content",children:[(0,a.jsx)("div",{className:"close",onClick:()=>e(!1),children:(0,a.jsx)("img",{src:A.Ndl,alt:"close",width:"13px",height:"13px"})}),(0,a.jsx)("p",{className:"text1",children:"Is this doument self-attested?"}),(0,a.jsx)("div",{children:(0,a.jsx)("img",{src:A.Syh,alt:"attest",width:"70px",height:"70px"})}),(0,a.jsx)("div",{className:"text2",children:"Please confirm that the uploaded address proof is self-attested and clearly readable."}),(0,a.jsxs)("div",{className:"buttons",children:[(0,a.jsx)("button",{className:"check-again",onClick:()=>e(!0),children:(0,a.jsx)("p",{children:"Yes, I confirm"})}),(0,a.jsx)("p",{className:"confirm",onClick:()=>{e(!1)},children:"No, check again"})]})]})})}),"self-attest-modal",!0))))},this.submitDocDetailsNew=async e=>{var t,i;const{country_code:o}=this.props,a="SG"===o&&!(null!==(t=this.props.remitterDetails)&&void 0!==t&&t.is_permanent_sg_resident)&&(null===(i=this.props.remitterDetails)||void 0===i?void 0:i.jumio_check_created);try{if(!await this.renderAddressConfirmModal(e))return;if(!await this.showPoASelfAttestedModal(e))return;this.props.activateLoader();let t=!1,i=null,o={},{documentDetails:s,featureState:{toggleFeature:r}}=this.props;if(r){const t=R()(e,["currentDocScreen","currentDocTimeLine","document_code","last_doc_screen","call_doc_upload_api"]);if(Object.keys(e).forEach(i=>{if(i.includes(e.currentDocScreen.key))return t[i]=e[i],!1}),"PERSONAL_IMAGE"===(e=t).currentDocScreen.key){let e=s.find(e=>e.type===n.PlZ);e&&e.document_code&&(i=e.document_code),o.vision_doc_code=i}}let{documents:l,files:d}=(0,b.W0)(e,s,o);r&&"PERSONAL_IMAGE"===e.currentDocScreen.key&&(this.visionCheckCount>=Number(f.Gh)&&(t=!0),this.visionCheckCount++);let c=await this.props.uploadDocDetailsNew(d,l,{formID:this.formID,props:e,doc_count:l.length},r,t);if(this.setState({nextScreen:null}),c&&c.data&&c.data.success)if("MY"===this.props.country_code){let e=await this.props.getNewUserFlow(this.props.account_type);if(e&&e.data&&e.data.success){const{kyc_type:t}=this.props.remitterDetails;this.props.changeScreenTimelineForJumio({...e.data.data,country_code:this.props.country_code,oldTimeLine:this.props.timeline},"EKYC"===t)}}else{if(a)return void this.props.changeScreen(x.clv,"acknowledgement",this.props.screens,this.props.timeline);if(r){this.props.documentDetails&&this.props.documentDetails.length>0&&await this.setState({hideUploadDocScreen:!0});let e=!0;await this.props.getUserDocuments();const t=this.props.documentDetails.length>0?V()(this.props.documentDetails.map(e=>!["TRULIOO"].includes(e.document_code)&&e.type)):[];$()(Object.keys(this.state.processesdConfig),e=>"FATCA_DECLARATION"!==e).forEach(i=>{if(!t.includes(i))return e=!1,!1}),e&&!c.data.next_screen?this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline):(this.state.hideUploadDocScreen&&!a&&await this.setState({hideUploadDocScreen:!1}),this.setState({nextScreen:c.data.next_screen}),this.props.disableLoader())}else this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline)}else this.props.disableLoader()}catch(s){this.props.disableLoader()}},this.skipScreen=()=>this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline),this.state={t
1319itle:"Upload your documents",subtitle:"Upload your documents for process",processesdConfig:{},screenConfig:{},isInitialized:!1},this.formID="form-upload-individual-flow-documents",this.ADD_DOC_TYPE="INDIVIDUAL_POA",this.visionCheckCount=0,this.requiredDocTypes=e.requiredDocTypes?e.requiredDocTypes:[n.PlZ,n.Px7]}render(){const{handleSubmit:e,country_code:t,account_type:i,documentDetails:o,isNewOnboardingEnabledUser:s,user_status:{status:r},navigate:l}=this.props;return s&&(0,y.V2)(t)||"US"===t?(0,a.jsx)(T.default,{}):(0,a.jsxs)("form",{id:this.formID,onSubmit:e(this.submitDocDetailsNew),encType:"multipart/form-data",className:"common-form-upload-form",onKeyUp:y.jN,onKeyPress:y.jN,children:[this.props.featureState.toggleFeature?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(d.A,{children:(0,a.jsx)(d.A.Row,{className:"zero-top-padding",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align",children:["US"===t&&r===n.WTq?(0,a.jsx)("img",{src:A.WMX,alt:"back",onClick:()=>{l(n.$hu)},height:"30",width:"30"}):(0,a.jsx)(p.oq,{}),this.state.title]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:this.state.subtitle})]})})}),this.state.processesdConfig&&this.state.isInitialized&&Object.keys(this.state.processesdConfig).length>0&&(this.props.featureState.toggleFeature?(0,a.jsx)(p.aO,{processesdConfig:this.state.processesdConfig,screenConfig:this.state.screenConfig,documentDetails:o,disableForm:"IN"===this.props.country_code&&this.props.disableForm,getAllformVal:this.props.getAllformVal,currentScreen:this.props.currentScreen,country_code:t,account_type:i,skipScreen:this.skipScreen,formName:n.weV,validate:n.eYW,handleProccessConfig:this.handleProccessConfig,reRenderOnUpdate:o,nextScreen:this.state.nextScreen,hideUploadDocScreen:this.state.hideUploadDocScreen||!1,renderPOA:"SG"===t&&"INITIATED"===r&&!(null!==(c=this.props.remitterDetails)&&void 0!==c&&c.is_permanent_sg_resident)&&(null===(u=this.props.remitterDetails)||void 0===u?void 0:u.jumio_check_created)}):(0,a.jsx)(p.eN,{processesdConfig:this.state.processesdConfig,screenConfig:this.state.screenConfig,documentDetails:o,disableForm:"IN"===this.props.country_code&&this.props.disableForm,getAllformVal:this.props.getAllformVal,currentScreen:this.props.currentScreen,country_code:t,account_type:i,skipScreen:this.skipScreen,formName:n.weV,validate:n.eYW,handleProccessConfig:this.handleProccessConfig,reRenderOnUpdate:this.state.processesdConfig}))]});var c,u}}const H=(0,u.A)({form:n.weV,onSubmitFail:j.Nc,asyncValidate:(e,t)=>new Promise((i,o)=>{const a=[],s=[],r=e.everification_meta,l=e.currentDocScreen,d=e.country_code,c=e.panEVerified;if(r&&"IN"===d&&l&&"POI"===l.key&&!c){const t=r.everification_request_constant_data;Object.keys(r.everification_request_field_data).forEach(i=>{const n=r.everification_request_field_data[i];s.push({field_name:n,label:t.code}),t[i]=M()(e,n,void 0)}),a.push((0,L.s1)(t,r.everification_url,r.everification_method))}Promise.all(a).then(e=>{const a={};e.forEach((i,o)=>{try{const{data:{data:e}}=i;t({type:x.Fhx,data:e})}catch(l){console.log("redux value not set for async response",l)}if(e[o]&&e[o].data&&e[o].data.success){if("PAN"===s[o].label){if(t((0,D.Zg)(n.weV,"asyncValidateMsg",{[s[o].field_name]:"Your PAN is now verified!"})),t((0,D.Zg)(n.weV,"panEVerified",!0)),r){const i=r.everification_request_field_data;
1319i&&Object.keys(i).forEach(a=>{let r=i[a].split(".");if(n.bIi.includes(s[o].label)&&e[o].data.data.documents){const s=e[o].data.data.is_name_matched;t((0,D.Zg)(n.weV,"name_matched",s)),t((0,D.Zg)(n.weV,i[a],e[o].data.data.documents[r[2]]))}})}let i=[];i.push(e[o].data.data.documents),t((0,v.L3)(i))}}else a[s[o].field_name]=e[o].data.message}),0===Object.keys(a).length?i(void 0):o(a)}).catch(e=>{e.response&&e.response.data&&e.response.data.data&&e.response.data.data.message?t((0,g.rG)({text:e.response.data.data.message,type:"info"})):t((0,g.rG)({text:["Something went wrong"],type:"info"})),o(e)})}),asyncBlurFields:["INDIVIDUAL_POI.PAN.identity_number"]})(Y);const z=(0,B.A)((0,c.Ng)(function(e){let t=(0,m.A)(n.weV)(e);const{rootReducer:{userStatusReducer:{country_code:i,status:o,account_type:a},documentDataReducer:{documentDetails:s,uploadDocConfig:r},userFlowReducer:{screens:l,currentScreen:d,timeline:c},userDataReducer:{userStateInfo:{remitterDetails:u}},newUserFlowReducer:{new_onboarding_enabled_users:p}}}=e;let h="ACKNOWLEDGED"===o||s&&s.length>0;if(s&&s.length>0&&"IN"===i){const e=O()(s,{type:"INDIVIDUAL_POI"}),t=O()(s,{type:"INDIVIDUAL_POA"});h=!(!e||!t)}return{country_code:i,screens:l,currentScreen:d,timeline:c,documentDetails:s,getAllformVal:t,uploadDocConfig:r,disableForm:h,account_type:a,remitterDetails:u,isNewOnboardingEnabledUser:p}},{changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV,updateDocsUploadedOrEverifiedSuccess:v.ak,showMessage:g.rG,uploadDocDetailsNew:_.Iu,getNewUserFlow:E.e,changeScreenTimelineForJumio:h.ng,getUserDocuments:E.Yw})(H));var G=i(63177),q=i(29798),K=i(79360),Q=i(59051),W=i.n(Q);var X=i(38547),Z=i(83413),J=i(24564),ee=i(55594),te=i(96553),ie=i(19324),ne=i(74168),oe=i(89883),ae=i(52842),se=i(83664),re=i(16384);const le={title:"",first_name:"",middle_name:"",last_name:"",date_of_birth:"",nationality:"",mobile_country_code:"",mobile_number:"",postcode:"",street_number:"",street_type:"",unit_number:"",street_name:"",floor_number:"",suburb:"",building_name:"",block_number:"",city:"",building_number:"",district:"",address1:"",address2:"",state:"",email:"",country_of_residence:"",is_pep:!1,SHAREHOLDER:!1,DIRECTOR:!1,OTHER:!1,UBO:!1,BENEFICIAL_OWNER:!1,AUTHORISED_SIGNATORY:!1,COMMISSIONER:!1,APPLICANT:!0,SHAREHOLDER_HOLDING_MORE_THAN_25PERCENT_SHARES:!1,SHAREHOLDER_HOLDING_MORE_THAN_10PERCENT_SHARES:!1,ENTITY_HOLDING_MORE_THAN_10PERCENT_SHARES:!1,PEP:!1,PEP_HOLDING_MORE_THAN_10PERCENT_SHARES:!1,ENTITY_HOLDING_MORE_THAN_25PERCENT_SHARES:!1,PARTNER:!1,COMPLIANCE_OFFICER:!1,AUTHORISED_PERSON:!1,is_promotion_subscription:!1,is_aml_check_consent:!0,street:"",province:"",job_title:"",percentage_owned:"",identity_number:""};var de=i(3238),ce=i(15758);class ue extends o.Component{constructor(e){super(e),this.processCheckBoxData=e=>{let t=[],i=[],n=[];return e.forEach(e=>{t.push(e.checkbox),i=[...i,...e.document],n.push(e.checkbox.field_name)}),{checkboxArr:t,docArr:i,representativeTypes:n}},this.constructDocArr=e=>{let t=[];return e.forEach(e=>{let{condition:i,docType:n,defaultDoc:o,satisfyAll:a}=e;if(!!n.some(e=>-1===t.indexOf(e)))if(o)t=[...t,...n];else if(i){let e=-1;
1319Object.keys(i).forEach(t=>{a?i[t]!==this.props[t]&&(e=0):e=i[t]!==this.props[t]?1===e?1:0:1}),e&&(t=[...t,...n])}}),t},this.afterComponentMount=()=>{let{uploadDocConfig:e,renderDocFunc:t,checkIfRepresentative:i,dispatch:n,change:o,formName:a,is_representative:s}=this.props;if(e){let{docArr:e}=this.state;t(this.constructDocArr(e))}i&&i(s),this.state.setObj&&((0,y.w2)(n,o,a,this.state.setObj),this.setState({setObj:null}))},this.componentDidMount=async()=>{let{applicantDetails:e,getCompanyRepresentativeTypes:t,is_applicant:i,dispatch:o,change:a,formName:s}=this.props,r={};try{let l=await t(i);if(l&&l.data&&l.data.success){let{checkboxArr:t,docArr:i,representativeTypes:d}=this.processCheckBoxData(l.data.data);if(e){let t=Object.keys(e).filter(e=>!d.includes(e)&&n.AqJ.includes(e)&&"APPLICANT"!==e);t&&(t.forEach(e=>{r[e]=!1}),(0,y.w2)(o,a,s,r))}this.setState({checkboxArr:t,docArr:i,setObj:r})}}catch(l){console.log(l)}},this.componentDidUpdate=()=>{this.afterComponentMount()},this.onCheckBoxChange=(e,t)=>{let{true_if:i}=t;if(!e)return;let{dispatch:n,change:o,formName:a}=this.props;i&&(0,y.w2)(n,o,a,i)},this.state={checkboxArr:[],docArr:[]}}render(){const{checkboxArr:e}=this.state;let{disableFields:t}=this.props;return e.map((e,i)=>(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(J.A,{disabled:e.disabled||t,id:!0,label:e.label,className:"dark section",name:e.field_name,checked:this.props[e.field_name],onChange:t=>{this.onCheckBoxChange(t.target.checked,e,i)}})},i))}}const me=(0,c.Ng)(function(e,t){const i=(0,ie.A)(t.formName);let{SHAREHOLDER:n,DIRECTOR:o,OTHER:a,UBO:s,BENEFICIAL_OWNER:r,AUTHORISED_SIGNATORY:l,COMMISSIONER:d,APPLICANT:c,SHAREHOLDER_HOLDING_MORE_THAN_25PERCENT_SHARES:u,SHAREHOLDER_HOLDING_MORE_THAN_10PERCENT_SHARES:m,PEP:p,PEP_HOLDING_MORE_THAN_10PERCENT_SHARES:h,ENTITY_HOLDING_MORE_THAN_25PERCENT_SHARES:_,ENTITY_HOLDING_MORE_THAN_10PERCENT_SHARES:x,PARTNER:v,COMPLIANCE_OFFICER:f,AUTHORISED_PERSON:y}=i(e,"SHAREHOLDER","DIRECTOR","OTHER","UBO","BENEFICIAL_OWNER","AUTHORISED_SIGNATORY","COMMISSIONER","APPLICANT","SHAREHOLDER_HOLDING_MORE_THAN_25PERCENT_SHARES","SHAREHOLDER_HOLDING_MORE_THAN_10PERCENT_SHARES","PEP","PEP_HOLDING_MORE_THAN_10PERCENT_SHARES","ENTITY_HOLDING_MORE_THAN_25PERCENT_SHARES","ENTITY_HOLDING_MORE_THAN_10PERCENT_SHARES","PARTNER","COMPLIANCE_OFFICER","AUTHORISED_PERSON");return{SHAREHOLDER:n,DIRECTOR:o,OTHER:a,UBO:s,BENEFICIAL_OWNER:r,AUTHORISED_SIGNATORY:l,COMMISSIONER:d,APPLICANT:c,SHAREHOLDER_HOLDING_MORE_THAN_25PERCENT_SHARES:u,SHAREHOLDER_HOLDING_MORE_THAN_10PERCENT_SHARES:m,PEP:p,PEP_HOLDING_MORE_THAN_10PERCENT_SHARES:h,ENTITY_HOLDING_MORE_THAN_25PERCENT_SHARES:_,ENTITY_HOLDING_MORE_THAN_10PERCENT_SHARES:x,PARTNER:v,COMPLIANCE_OFFICER:f,AUTHORISED_PERSON:y,is_representative:n||o||a||s||r||l||d||c||u||m||p||h||_||x||v||f||y}},{getCompanyRepresentativeTypes:ce.g7})(ue);var pe=i(87161);class he extends o.Component{constructor(e){super(e),this.componentDidMount=async()=>{let{documentDetails:e,getDocInitObj:t,filterOut:i,representativeId:n}=this.props,o=(0,b.TI)(this.checkFilter({documentDetails:e,filterOut:i,representativeId:n}),this.props.requiredDocTypes);t&&t(o)},this.skipScreen=()=>this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline),this.state={processesdConfig:{}}}checkFilter(e){let{representativeId:t,filterOut:i,documentDetails:n}=e,o=[];return n&&(o=[...n]),i&&i.length>0&&(o=n.filter(e=>!i.includes(e.type))),t&&(o=n.filter(e=>e.remitter_corporate_representative_id===t)),o}render(){let{country_code:e,account_type:t,documentDetails:i,propDocConfig:o,formName:s,representativeId:r,filterOut:l}=this.props,d=this.checkFilter({documentDetails:i,filterOut:l,representativeId:r}),{processesdConfig:c}=(0,b.cL)(o,d);return c&&Object.keys(c).length>0&&(0,a.jsx)(pe.A,{processesdConfig:c,disableDocs:this.props.disableDocs,hideImages:!0,getAllformVal:this.props.getAllformVal,currentScreen:this.props.currentScreen,documentDetails:d,country_code:e,account_type:t,skipScreen:this.skipScreen,formName:s,isEmbeddedSection:!0,removePadding:!0,reRenderOnUpdate:c,validate:n.eYW})}}const _e=(0,c.Ng)(function(e){const{rootReducer:{userStatusReducer:{country_code:t,account_type:i},documentDataReducer:{documentDetails:n},userFlowReducer:{screens:o,currentScreen:a,timeline:s}}}=e;return{country_code:t,screens:o,currentScreen:a,timeline:s,documentDetails:n,account_type:i}},{changeScreen:h.Xh})(he);function xe(e){let t={...e,...(0,y.KE)(e.country_of_residence,e.street_name,e.street_type)};return t.is_promotion_subscription=e.is_promotion_subscription||!1,t}class ve extends o.Component{constructor(e){super(e),this.onCountryOfResidenceChange=async e=>{e&&(await this.setState({MobArray:e.phone_code.map(e=>({key:e,value:e,text:e}))}),1===this.state.MobArray.length?(await this.setState({isCountryCodeHasUnitLength:!0}),this.props.dispatch((0,D.Zg)(n.aUY,"mobile_country_code",this.state.MobArray[0].value))):(await this.setState({isCountryCodeHasUnitLength:!1}),this.props.dispatch((0,D.Zg)(n.aUY,"mobile_country_code",this.state.MobArray[0].value))))},this.componentDidMount=async()=>{await this.props.disableLoader();let{applicantDetails:e={},userStatusReducer:{applicant_mobile_number:t},applicant_email:i}=this.props;e={...e,mobile_number:t,email:i};let{remitter_corporate_representative_id:n,nationality:o}=e;this.props.initialize(this.initFields={...(0,y.PJ)(le,xe(e)),...this.initDocFields,...this.props.allFormFileFields},!!n),o&&await this.onNationalityChange({key:o})},this.submitApplicantDetails=async e=>{var t,i,n;const o=!(null!==(t=this.props.getAllFormVal)&&void 0!==t&&t.DIRECTOR||null!==(i=this.props.getAllFormVal)&&void 0!==i&&i.AUTHORISED_SIGNATORY||null!==(n=this.props.getAllFormVal)&&void 0!==n&&n.SHAREHOLDER_HOLDING_MORE_THAN_25PERCENT_SHARES);if("US"===this.props.user_session.country_code&&o)return this.props.showMessage({text:["Please select the position held in the company."],type:"info"});if("SG"===this.props.country_of_residence){let{block_number:t,street_number:i}=e;if(!t&&!i)return this.props.showMessage({text:["Please enter either block or street number"],type:"info"})}const{currentScreen:a,applicantDetailsSubmitRequest:s,changeScreen:r,screens:l,timeline:d,applicantId:c}=this.props;this.props.activateLoader(),(0,y.TE)(this.formID,e);let u=(0,b.W0)(e,void 0,void 0,this.applicantDocTypes),m=u.formData;if("US"===this.props.user_session.country_code){let e=W()(m.date_of_birth).format("DD/MM/YYYY");"Invalid date"!==e&&(m.date_of_birth=e),m.percentage_owned=Number(m.percentage_owned)}let p=await s(m,{applicant_id:c,...u});p&&p.data&&p.data.success?r(x.vtj,a,l,d):this.props.disableLoader()},this.onNationalityChange=async e=>{if(e&&e.key){const{currentScreen:t,getUploadDocConfig:i}=this.props;await i({screen_name:t,nationality:e.key})}},this.renderDocFunc=e=>{if(!this.props.nationality||!e)return;let{uploadDocConfig:t,currentScreen:i}=this.props,n=[];
1319e.forEach(e=>{let o=t[i]?t[i].filter(t=>t.type===e):[];n=n.concat(o)}),this.setState({docConfig:n})},this.getDocInitObj=e=>{(0,y.w2)(this.props.dispatch,D.Zg,n.aUY,e)},this.state={MobArray:[],isCountryCodeHasUnitLength:!1,is_representative:!1,docConfig:[]},this.formID=n.aUY,this.titleArray=[{key:"Mr.",value:"Mr.",text:"Mr."},{key:"Mrs.",value:"Mrs.",text:"Mrs."},{key:"Ms.",value:"Ms.",text:"Ms."}],this.formSections=null,this.initDocFields={},this.initFields={},this.firstNameValidation=(0,L.wG)("first"),this.lastNameValidation=(0,L.wG)("last","ID"!==e.country_code),this.applicantDocTypes=[n.apw,n._f8,n.AJG,n.DjF]}render(){var e,t,i,o;const{handleSubmit:s,uploadDocConfig:r,country_code:l,dispatch:c,country_of_residence:u,applicantDetails:m,getAllFormVal:p,disablePoa:h,disablePoi:_}=this.props;let x=this.props.user_session.country_code;return(0,a.jsx)("div",{children:(0,a.jsx)("form",{onSubmit:s(this.submitApplicantDetails),className:"common-form application-details",encType:"multipart/form-data",id:this.formID,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Applicant details"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Help us with your personal details to build your profile"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container main-applicant-detail nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,id:"progress-bar-applicant-details",className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime inner-grid details",centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,a.jsxs)(d.A,{children:[(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Personal"})})}),(0,a.jsx)(d.A.Column,{className:"fit-col-title",children:(0,a.jsx)(te.A,{bindToThisObject:this.props.title,name:"title",type:"text",component:Z.A,placeholder:"Title",isSearchable:!1,className:" theme-dropdown fit",staticValues:this.titleArray,disabled:_,optional:!0})}),(0,a.jsx)(d.A.Column,{className:"small-col-name",children:(0,a.jsx)(te.A,{name:"first_name",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:this.firstNameValidation,disabled:_,placeholder:"First name"})}),(0,a.jsx)(d.A.Column,{computer:5,tablet:5,mobile:16,children:(0,a.jsx)(te.A,{name:"middle_name",type:"text",className:"input form-flow less-width",component:X.A,normalize:(0,re.YR)(50),placeholder:"Middle name",disabled:_,validate:[L.OY]})}),(0,a.jsx)(d.A.Column,{computer:5,tablet:5,mobile:16,children:(0,a.jsx)(te.A,{name:"last_name",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:this.lastNameValidation,disabled:_,placeholder:"Last name"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:u,name:"country_of_residence",type:"text",component:Z.A,placeholder:"Country of residence",validate:[L.mw],onDropdownClose:this.onCountryOfResidenceChange,className:"theme-dropdown",disabled:!!m.country_of_residence,url:f.H$+"/public/remitter/countries/dropdown"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:this.props.nationality,name:"nationality",type:"text",component:Z.A,onDropdownClose:e=>{this.onNationalityChange(e)},placeholder:"Nationality",validate:[L.mw],className:"theme-dropdown",url:f.H$+"/countries/dropdown?is_nationality_activated=true&display_text=nationality",disabled:_})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"date_of_birth",type:"text",className:"input form-flow",component:ee.A,maxDate:W()().subtract(18,"years"),validate:[L.mw],placeholder:"US"===x?"DOB (MM/DD/YYYY)":"DOB (DD/MM/YYYY)",parse:"US"===x?e=>e&&W()(e).format("MM/DD/YYYY"):e=>e&&W()(e).format("DD/MM/YYYY"),disabled:_})}),"US"===x&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(e=this.props)||void 0===e||null===(t=e.applicantDetails)||void 0===t?void 0:t.identity_number,name:"identity_number",className:"input form-flow",component:X.A,validate:"US"===x?[L.mw,L.q6]:[L.q6],placeholder:"Last 4 digits of SSN",disabled:_,type:"number"})}),"US"!==x&&(0,a.jsx)(d.A.Column,{width:16,computer:7,tablet:8,mobile:16,children:(0,a.jsxs)("div",{className:"radio-group",children:[(0,a.jsxs)("div",{id:"pep-check",children:[(0,a.jsx)("span",{children:"Are you a Politically Exposed Person (PEP ?)"}),(0,a.jsx)(G.A,{trigger:(0,a.jsx)("img",{src:A.PCH,alt:"info icon",className:"info-icon"}),content:n.eXk,size:"tiny"}),(0,a.jsx)(te.A,{name:"is_pep",component:oe.A})]}),(0,a.jsxs)("label",{id:"is-pep-yes-label",className:"label-text",children:[(0,a.jsx)(te.A,{validate:[L.TQ],name:"is_pep",id:"is-pep-yes",component:"input",type:"radio",disabled:_,className:"radio",onChange:e=>e.target.checked=!0,parse:e=>"true"===e,value:!0}),(0,a.jsx)("span",{id:"pep-check-yes",className:"inline-block-span",children:"Yes"})]}),(0,a.jsxs)("label",{id:"is-pep-no-label",className:"label-text",children:[(0,a.jsx)(te.A,{validate:[L.TQ],name:"is_pep",id:"is-pep-no",component:"input",disabled:_,className:"radio",onChange:e=>e.target.checked=!0,parse:e=>"true"===e,type:"radio",value:!1}),(0,a.jsx)("span",{id:"pep-check-no",className:"inline-block-span",children:"No"})]})]})})]}),u&&(0,a.jsx)(ae.A,{...this.props,formName:n.aUY,countryCode:u}),u&&(0,a.jsx)(de.A,{formName:this.formID,countryCode:u,disableFields:h,getAllformVal:this.props.getAllFormVal,...this.props}),(0,a.jsxs)(d.A.Row,{className:"from-flow",children:[(0,a.jsxs)(d.A.Column,{width:16,children:[(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Position held in the company"})}),(0,a.jsxs)("div",{className:"default-text ",children:["Kindly select all the that you hold in the company"," -"]})]}),(0,a.jsx)(me,{dispatch:c,formName:n.aUY,change:D.Zg,renderDocFunc:this.renderDocFunc,uploadDocConfig:r,is_a
1319pplicant:!0,disableFields:_,applicantDetails:m})]}),"US"===x&&(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(i=this.props)||void 0===i||null===(o=i.applicantDetails)||void 0===o?void 0:o.job_title,name:"job_title",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw],disabled:_,placeholder:"Job title"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"percentage_owned",className:"input form-flow",component:X.A,validate:[L.mw,L.z6],placeholder:"% owned",disabled:_,type:"number"})})]}),(0,a.jsx)(_e,{propDocConfig:this.state.docConfig,formName:n.aUY,getAllformVal:p,requiredDocTypes:this.applicantDocTypes,getDocInitObj:this.getDocInitObj}),n.y_c.includes(l)&&(0,a.jsx)(d.A.Row,{children:(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)(J.A,{label:"I allow Instarem to email and message me relevant offers and promotions based on my Instarem account activity.",className:"dark",name:"is_promotion_subscription",disabled:_,checked:this.props.is_promotion_subscription})})})]})})}),(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Save and continue"})]})]})})})]})})})}}let fe=(0,u.A)({form:n.aUY,onSubmitFail:j.Nc});const ye=(0,ie.A)(n.aUY);const be=fe(ve),ge=(0,c.Ng)(function(e){let t=(0,ne.A)(n.aUY)(e),i=(0,m.A)(n.aUY)(e);const{rootReducer:{userDataReducer:{userStateInfo:{applicantDetails:o}},documentDataReducer:{documentDetails:a,uploadDocConfig:s},userSessionReducer:{user_session:{email:r,country_code:l},user_session:d}
1319,userFlowReducer:{screens:c,currentScreen:u,timeline:p},userStatusReducer:h,mobileValidationReducer:_}}=e;let x,v,f,y=!1,b=!1;v=h.applicant_mobile_number,o&&(x=o.remitter_corporate_representative_id,f=o.referred_by_referral_code);let g=a.filter(e=>[n.apw,n.DjF].includes(e.type));a&&g&&g.length>0&&(y=!0),g=a.filter(e=>[n._f8].includes(e.type)),a&&g&&g.length>0&&(b=!0);let{country_of_residence:j,mobile_country_code:A,title:N,state:w,nationality:S,upload_doc_later_check:C,mobile_number:D,is_promotion_subscription:T,is_aml_check_consent:E}=ye(e,"country_of_residence","mobile_country_code","title","state","nationality","upload_doc_later_check","mobile_number","is_promotion_subscription","is_aml_check_consent");return D=v||D,{formSyncErrors:t,country_of_residence:j,mobile_country_code:A,title:N,state:w,nationality:S,upload_doc_later_check:C,applicant_email:r,applicantId:x,documents:a,mobile_number:D,country_code:l,screens:c,currentScreen:u,timeline:p,user_session:d,applicantDetails:o,uploadDocConfig:s,userStatusReducer:h,referred_by_referral_code:f,getAllFormVal:i,is_promotion_subscription:T,is_aml_check_consent:E,mobileValidationReducer:_,disablePoa:b,disablePoi:y}},{applicantDetailsSubmitRequest:ce.WB,changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV,showMessage:g.rG})(be);const je={registered_business_name:"",industry_type:"",business_registration_type:"",business_registration_number:"",trade_name:"",company_entity:"",source_of_funds:"",place_of_incorporation:"",date_of_incorporation:"",website_url:"",other_countries_of_business:"",phone_country_code:"",phone_number:"",mobile_country_code:"",mobile_number:"",annual_turnover:"",initial_source_of_wealth:"",ongoing_source_of_wealth:"",expected_monthly_volume:"",is_trading_on_behalf:"",intended_use_of_account:"",intended_use_of_account_meta:"",additional_info:{product_type:"",regulatory_licence_number:"",business_description:""}};const Ae=function(e){let{showOtherField:t,onIntentionChange:i,industry_type:n,expected_monthly_volume:o,annual_turnover:s,business_registration_type:r,other_countries_of_business:l,intended_use_of_account:c,country_of_business:u}=e;return(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:"Other details"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"industry_type",type:"text",className:"input form-flow",bindToThisObject:n,component:Z.A,validate:[L.mw],placeholder:"Industry Sector",url:f.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"expected_monthly_volume",type:"text",className:"input form-flow",bindToThisObject:o,component:Z.A,validate:[L.mw],placeholder:"Expected monthly volume?",url:`${f.H$}/instarem-objects/dropdown?type=EXPECTED_MONTHLY_VOLUME&account_type=CORPORATE&country_code=${u}`})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"annual_turnover",type:"text",className:"input form-flow",bindToThisObject:s,component:Z.A,validate:[L.mw],placeholder:"Annual Net Revenue",url:f.H$+"/instarem-objects/dropdown?type=ANNUAL_TURNOVER&account_type=CORPORATE&country_code="+u})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"business_registration_type",type:"text",className:"input form-flow",bindToThisObject:r,component:Z.A,validate:[L.mw],placeholder:"Business Registration number type",url:f.H$+"/instarem-objects/dropdown?account_type=CORPORATE&type=BUSINESS_REGISTRATION_NUMBER_TYPE&country_code="+u})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"other_countries_of_business",type:"text",className:"multiselect-drop-down ",bindToThisObject:l,component:Z.A,placeholder:"Other Countries of Business",multiple:!0,fluid:!0,url:f.H$+"/countries/dropdown"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account",type:"text",className:"input form-flow",bindToThisObject:c,component:Z.A,placeholder:"Intended use of account",isSearchable:!1,onDropdownClose:i,url:f.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=CORPORATE"})}),t&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account_meta",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(50),placeholder:"Enter intended use of account"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsxs)("div",{className:"radio-group",children:[(0,a.jsxs)("span",{className:"company-detail
1319s-bullet",children:["Trading on behalf of other individual or entity?",(0,a.jsx)(te.A,{name:"is_trading_on_behalf",className:"company-details-bullet-error",component:oe.A})]}),(0,a.jsxs)("label",{className:"label-text",id:"is-trading-on-behalf-label",children:[(0,a.jsx)(te.A,{id:"is-trading-on-behalf",validate:[L.TQ],name:"is_trading_on_behalf",component:"input",type:"radio",className:"radio",onChange:e=>e.target.checked=!0,parse:e=>"true"===e,value:!0}),(0,a.jsx)("span",{className:"inline-block-span",children:"Yes"})]}),(0,a.jsxs)("label",{className:"label-text",id:"is-trading-on-behalf-label",children:[(0,a.jsx)(te.A,{validate:[L.TQ],id:"is-trading-on-behalf",name:"is_trading_on_behalf",component:"input",className:"radio",onChange:e=>e.target.checked=!0,parse:e=>"true"===e,type:"radio",value:!1}),(0,a.jsx)("span",{className:"inline-block-span",children:"No"})]})]})})]})};const Ne=function(e){let{showOtherField:t,onIntentionChange:i,industry_type:n,intended_use_of_account:o,other_countries_of_business:s,annual_turnover:r,country_of_business:l,expected_monthly_volume:c}=e;return(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:"Other details"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"industry_type",type:"text",className:"input form-flow",bindToThisObject:n,component:Z.A,validate:[L.mw],placeholder:"Industry Sector",url:f.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"annual_turnover",type:"text",className:"input form-flow",bindToThisObject:r,component:Z.A,validate:[L.mw],placeholder:"Annual Net Revenue",url:f.H$+"/instarem-objects/dropdown?type=ANNUAL_TURNOVER&account_type=CORPORATE&country_code="+l})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"expected_monthly_volume",type:"text",className:"input form-flow",bindToThisObject:c,component:Z.A,validate:[L.mw],placeholder:"Expected monthly volume?",url:`${f.H$}/instarem-objects/dropdown?type=EXPECTED_MONTHLY_VOLUME&account_type=CORPORATE&country_code=${l}`})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"date_of_incorporation",type:"text",className:"input form-flow",component:ee.A,parse:e=>e&&W()(e).format("DD/MM/YYYY"),maxDate:W()(),validate:[L.mw],placeholder:"Date of incorporation (DD/MM/YYYY)"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"other_countries_of_business",type:"text",className:"input form-flow multiselect-drop-down",bindToThisObject:s,component:Z.A,placeholder:"Other Countries of Business",multiple:!0,url:f.H$+"/countries/dropdown"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account",type:"text",className:"input form-flow",bindToThisObject:o,component:Z.A,onDropdownClose:i,placeholder:"Intended use of account",isSearchable:!1,url:f.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=CORPORATE"})}),t&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account_meta",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(50),placeholder:"Enter intended use of account"})})]})};const we=function(e){let{showOtherField:t,onIntentionChange:i,industry_type:n,intended_use_of_account:o,annual_turnover:s,expected_monthly_volume:r,country_of_business:l}=e;return(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:"Other details"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"industry_type",type:"text",className:"input form-flow",bindToThisObject:n,component:Z.A,validate:[L.mw],placeholder:"Industry Sector",url:f.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"initial_source_of_wealth",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw],placeholder:"Initial Source of wealth"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"ongoing_source_of_wealth",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw],placeholder:"Ongoing Source of wealth"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"annual_turnover",type:"text",className:"input form-flow",bindToThisObject:s,component:Z.A,validate:[L.mw],placeholder:"Annual turnover",url:f.H$+"/instarem-objects/dropdown?type=ANNUAL_TURNOVER&account_type=CORPORATE&country_code="+l})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"expected_monthly_volume",type:"text",className:"input form-flow",bindToThisObject:r,component:Z.A,validate:[L.mw],placeholder:"Expected monthly volume?",url:`${f.H$}/instarem-objects/dropdown?type=EXPECTED_MONTHLY_VOLUME&account_type=CORPORATE&country_code=${l}`})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"date_of_incorporation",type:"text",className:"input form-flow",component:ee.A,parse:e=>e&&W()(e).format("DD/MM/YYYY"),maxDate:W()(),validate:[L.mw],placeholder:"Date of incorporation (DD/MM/YYYY)"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account",type:"text",className:"input form-flow",bindToThisObject:o,component:Z.A,placeholder:"Intended use of account",isSearchable:!1,onDropdownClose:i,url:f.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=CORPORATE"})}),t&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account_meta",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(50),placeholder:"Enter intended use of account"})})]})};var Se=i(38036);const Ce=function(e){let{showOtherField:t,onIntentionChange:i,industry_type:n,intended_use_of_account:o,annual_turnover:s,country_of_business:r}=e;return(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:"Other details"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"industry_type",type:"text",className:"input form-flow",bindToThisObject:n,component:Z.A,validate:[L.mw],placeholder:"Nature of Business",url:f.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(Se.A,{name:"additional_info",children:(0,a.jsx)(te.A,{name:"product_type",type:"text",className:"input form-flow",component:X.A,validate:[L.fP],normalize:(0,re.YR)(50),placeholder:"Product/Service Type"})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"annual_turnover",type:"text",className:"input form-flow",bindToThisObject:s,component:Z.A,validate:[L.mw],placeholder:"Annual Net Revenue",url:f.H$+"/instarem-objects/dropdown?type=ANNUAL_TURNOVER&account_type=CORPORATE&country_code="+r})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"date_of_incorporation",type:"text",className:"input form-flow",component:ee.A,parse:e=>e&&W()(e).format("DD/MM/YYYY"),maxDate:W()(),validate:[L.mw],placeholder:"Date of incorporation (DD/MM/YYYY)"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(Se.A,{name:"additional_info",children:(0,a.jsx)(te.A,{name:"regulatory_licence_number",type:"text",className:"input form-flow",component:X.A,validate:[L.fP],normalize:(0,re.YR)(50),placeholder:"Enter Regulatory License Number"})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account",type:"text",className:"input form-flow",bindToThisObject:o,component:Z.A,onDropdownClose:i,placeholder:"Intended use of account",isSearchable:!1,url:f.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=CORPORATE"})}),t&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account_meta",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(50),placeholder:"Enter intended use of account"})})]})};const De=function(e){let{showOtherField:t,onIntentionChange:i,intended_use_of_account:n,annual_turnover:o,expected_monthly_volume:s,country_of_business:r,industry_type:l}=e;return(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:"Other details"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"annual_turnover",type:"text",className:"input form-flow",bindToThisObject:o,component:Z.A,validate:[L.mw],placeholder:"Annual turnover",url:f.H$+"/instarem-objects/dropdown?type=ANNUAL_TURNOVER&account_type=CORPORATE&country_code="+r})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"industry_type",type:"text",className:"input form-flow",bindToThisObject:l,component:Z.A,validate:[L.mw],placeholder:"Industry sector",url:f.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"expected_monthly_volume",type:"text",className:"input form-flow",bindToThisObject:s,component:Z.A,validate:[L.mw],placeholder:"Expected monthly volume?",url:`${f.H$}/instarem-objects/dropdown?type=EXPECTED_MONTHLY_VOLUME&account_type=CORPORATE&country_code=${r}`})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"date_of_incorporation",type:"text",className:"input form-flow",component:ee.A,parse:e=>e&&W()(e).format("DD/MM/YYYY"),maxDate:W()(),validate:[L.mw],placeholder:"Date of incorporation (DD/MM/YYYY)"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account",type:"text",className:"input form-flow",bindToThisObject:n,component:Z.A,placeholder:"Intended use of account",isSearchable:!1,onDropdownClose:i,url:f.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=CORPORATE"})}),t&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account_meta",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(50),placeholder:"Enter intended use of account"})})]})};const Te=function(e){let{showOtherField:t,onIntentionChange:i,industry_type:n,intended_use_of_account:o}=e;return(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:"Other details"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(Se.A,{name:"additional_info",children:(0,a.jsx)(te.A,{name:"business_description",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(150),placeholder:"Description of business"})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"industry_type",type:"text",className:"input form-flow",bindToThisObject:n,component:Z.A,validate:[L.mw],placeholder:"Industry sector",url:f.H$+"/instarem-objects/dropdown?type=INDUSTRY_TYPE"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account",type:"text",className:"input form-flow",bindToThisObject:o,component:Z.A,onDropdownClose:i,placeholder:"Intended use of account",validate:[L.mw],isSearchable:!1,url:f.H$+"/instarem-objects/dropdown?type=INTENDED_USE_OF_ACCOUNT&account_type=CORPORATE"})}),t&&(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"intended_use_of_account_meta",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.w9],normalize:(0,re.YR)(50),placeholder:"Enter intended use of account"})})]})};class Ee extends o.Component{constructor(e){super(e),this.intendedUseAccountDropdownChange=e=>{e&&this.setState({showOtherField:"Other"===e.text})},this.state={showOtherField:32===e.intended_use_of_account}}componentDidUpdate(e){if(e.intended_use_of_account!==this.props.intended_use_of_account){let{intended_use_of_account:e}=this.props;32===e&&this.setState({showOtherField:!0})}}render(){const{country_of_business:e}=this.props;if(n.y_c.includes(e))return(0,a.jsx)(De,{...this.props,showOtherField:this.state.showOtherField,onIntentionChange:this.intendedUseAccountDropdownChange});switch(e){case"AU":return(0,a.jsx)(Ae,{...this.props,showOtherField:this.state.showOtherField,onIntentionChange:this.intendedUseAccountDropdownChange});case"SG":return(0,a.jsx)(Ne,{...this.props,showOtherField:this.state.showOtherField,onIntentionChange:this.intendedUseAccountDropdownChange});case"HK":return(0,a.jsx)(we,{...this.props,showOtherField:this.state.showOtherField,onIntentionChange:this.intendedUseAccountDropdownChange});case"MY":return(0,a.jsx)(Ce,{...this.props,showOtherField:this.state.showOtherField,onIntentionChange:this.intendedUseAccountDropdownChange});case"US":return(0,a.jsx)(Te,{...this.props,showOtherField:this.state.showOtherField,onIntentionChange:this.intendedUseAccountDropdownChange});default:return null}}}const Ie=Ee;var Re=i(69095);class ke extends o.Component{constructor(e){super(e),this.UNSAFE_componentWillMount=async()=>{const{user_session:{country_code:e}}=this.props;let t=await this.props.getMobileCodeByCountry(e);if(t&&t.data&&t.data.success){let e=[];t.data.data.forEach(t=>{e.push({...t,code:t.value})}),this.setState({mob_array:e,mob_code:"+"+e[0].code})}},this.onCompanyEntityChange=async e=>{if(e&&e.key){const{currentScreen:t,getUploadDocConfig:i,getAllformVal:o}=this.props;o&&o[n.MV2]&&(delete o[n.MV2],(0,y.w2)(this.props.dispatch,D.Zg,n.Ttl,o));let a=await i({screen_name:t,company_entity_type_id:e.key});
1319a&&a.data&&a.data.success&&(a.data.data.forEach(e=>{e.key=e.document_code,e.value=e.document_code,e.text=e.label,e.code=e.label}),this.setState({docConfig:a.data.data}))}},this.submitCompanyDetails=async e=>{const{currentScreen:t,companyDetailsSubmitRequest:i,changeScreen:o,screens:a,timeline:s}=this.props;delete e.upload_doc;try{(0,y.TE)(this.formID,e);let r=(0,b.W0)(e),l={...e};delete l[n.MV2],await this.props.activateLoader();let d=await i(l,r);d&&d.data&&d.data.success?o(x.vtj,t,a,s):this.props.disableLoader()}catch(r){this.wasFormSubmitted=!1,this.props.disableLoader(),console.error(r)}},this.resetFormFields=e=>{this.props.dispatch((0,D.Zg)(n.Ttl,e,"")),this.props.dispatch((0,D.Bk)(n.Ttl,e))},this.onMobileCountryCodeChange=e=>{this.setState({mob_code:"+"+e.code})},this.getDocInitObj=e=>{(0,y.w2)(this.props.dispatch,D.Zg,n.Ttl,e)},this.onDropdownChange=e=>{this.setState({docConfig_US:[e]})},this.state={show_radio:!1,mob_code:"code",docConfig:[],docConfig_US:[]},this.docCode=null,this.formID="form-company-details",this.renderObj={},this.renderDocaArr=null,this.radioDocArr=null,this.showDocumentTitle=!1,this.mobileValidation={validation:null,normalization:null}}componentDidMount(){let{mobileValidationReducer:e,thisFormData:t}=this.props,i=[L.ai],n=(0,re.lj)(15);if(e){let{required:t,length:o}=e;if(t&&i.push(L.mw),o){let{exact:e,min:t,max:a}=o;n=(0,re.lj)(e||a),t&&i.push((0,L.Bp)(t))}}this.mobileValidation={validation:i,normalization:n},t&&t.company_entity&&this.onCompanyEntityChange({key:t.company_entity}),this.props.initialize((0,y.PJ)(je,t))}render(){const{handleSubmit:e,getAllformVal:t,country_of_business:i,source_of_funds:o}=this.props;return(0,a.jsx)("form",{className:"common-form company-details",onSubmit:e(this.submitCompanyDetails),id:this.formID,onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Enter your company details"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Help us with your company details to build your profile"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:50,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime inner-grid details",centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,a.jsxs)(d.A,{children:[(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Registration details"})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"registered_business_name",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw,L.tV],placeholder:"Registered business name"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"trade_name",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw,L.tV],placeholder:"Trade name"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"business_registration_number",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw],placeholder:"US"!==i?"Business registration number":"EIN/SSN"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"company_entity",dependedOnObject:this.props.country_of_business||!1,type:"text",className:"input form-flow",bindToThisObject:this.props.company_entity,onDropdownClose:e=>{this.onCompanyEntityChange(e)},component:Z.A,validate:[L.mw],placeholder:"Company entity type",url:f.H$+"/instarem-objects/dropdown?account_type=CORPORATE&type=COMPANY_ENTITY_TYPE&country_code="+this.props.country_of_business})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:o,name:"source_of_funds",type:"text",component:Z.A,placeholder:"Source of funds",isSearchable:!1,validate:[L.mw],className:"theme-dropdown",url:`${f.H$}/instarem-objects/dropdown?type=SOURCE_OF_FUNDS&account_type=CORPORATE`})})]}),(0,a.jsx)(Ie,{...this.props}),(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Contact details"})})}),(0,a.jsxs)(d.A.Column,{computer:7,tablet:8,mobile:16,children:[(0,a.jsx)(te.A,{name:"website_url",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:"US"===i?[L.mw,L.tV,L.MH]:[L.tV,L.MH,L.OZ],placeholder:"Website"}),"US"===i&&(0,a.jsx)("p",{className:"website_input",children:"If no website, please provide link to e-commerce marketplace or provide a short description of how you advertise your services."})]}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,className:"mobile-number-wrapper",children:(0,a.jsx)(d.A,{children:(0,a.jsxs)(d.A.Row,{children:[(0,a.jsx)(d.A.Column,{computer:4,tablet:4,mobile:4,children:(0,a.jsx)(te.A,{name:"phone_country_code",type:"text",className:"input form-flow country-code",bindToThisObject:this.props.phone_country_code,component:Z.A,validate:[L.mw],placeholder:"Code",staticValues:this.state.mob_array,preselect_and_disable_if_one_item:!0,selectedLabel:this.state.mob_code,onDropDownClose:this.onMobileCountryCodeChange})}),(0,a.jsx)(d.A.Column,{computer:12,tablet:12,mobile:12,children:(0,a.jsx)(te.A,{name:"phone_number",type:"text",className:"input form-flow",component:X.A,normalize:this.mobileValidation.normalization,validate:this.mobileValidation.validation,placeholder:"Phone number"})})]})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,className:"mobile-number-wrapper",children:(0,a.jsx)(d.A,{style:{marginTop:"-10px"},children:(0,a.jsxs)(d.A.Row,{children:[""!==this.props.company_entity&&(0,a.jsx)(d.A.Column,{computer:4,tablet:4,mobile:4,children:(0,a.jsx)(te.A,{name:"mobile_country_code",type:"text",className:"input form-flow country-code",bindToThisObject:this.props.phone_country_code,component:Z.A,validate:[L.mw],placeholder:"Code",staticValues:this.state.mob_array,preselect_and_disable_if_one_item:!0,selectedLabel:this.state.mob_code,onDropDownClose:e=>{this.onMobileCountryCodeChange(e)}})}),(0,a.jsx)(d.A.Column,{computer:12,tablet:12,mobile:12,children:(0,a.jsx)(te.A,{name:"mobile_number",type:"text",className:"input form-flow",component:X.A,normalize:this.mobileValidation.normalization,validate:(()=>{let e=[L.mw],{validation:t}=this.mobileValidation;return t&&(e=e.concat(t)),e})(),placeholder:"Mobile number"})})]})})})]}),(0,a.jsxs)(d.A.Row,{children:["US"===i&&this.state.docConfig.length>0&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Business Formation documents (Certificate of Incorporation/ Articles of Incorporation)"})})}),(0,a.jsx)(d.A.Column,{computer:12,tablet:12,mobile:12,className:"uploadDocFieldWrapperCompanyDetails",children:(0,a.jsx)(te.A,{bindToThisObject:t?t.upload_doc:"",name:"upload_doc",selectedLabel:null===t||void 0===t?void 0:t.upload_doc,type:"text",component:Z.A,placeholder:"Please upload/take a picture of the Certificate of Incorporation/ Articles of Incorporation",isSearchable:!1,validate:[L.mw],className:"theme-dropdown",staticValues:this.state.docConfig,onDropdownChange:this.onDropdownChange})})]}),(0,a.jsx)(d.A.Column,{width:16,children:"US"!==i&&(0,a.jsx)(_e,{propDocConfig:this.state.docConfig,formName:n.Ttl,disableDocs:!1,getAllformVal:t,requiredDocTypes:[n.MV2],getDocInitObj:this.getDocInitObj})}),(0,a.jsx)(d.A.Column,{width:16,children:"US"===i&&(0,a.jsx)(_e,{propDocConfig:this.state.docConfig_US,formName:n.Ttl,disableDocs:!1,getAllformVal:t,requiredDocTypes:[n.MV2],getDocInitObj:this.getDocInitObj})})]})]})})}),(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Save and continue"})]})]})})})]})})}}let Oe=(0,u.A)({form:n.Ttl,validate:e=>{let t={},i={country_of_business:e.country_of_business},n={mobile_number:e.mobile_number,phone_number:e.phone_number};return t=(0,Re.p)(i,n),t},onSubmitFail:j.Nc});const Le=(0,ie.A)(n.Ttl);let Fe=Oe(ke);const Me=(0,c.Ng)(function(e){const{rootReducer:{userDataReducer:{userStateInfo:{remitterDetails:t}},documentDataReducer:{uploadDocConfig:i,documentDetails:o},userFlowReducer:{screens:a,currentScreen:s,timeline:r},userSessionReducer:{user_session:l},mobileValidationReducer:d}}=e;let c,u;u=l.country_code,c=t?t.remitter_corporate_id:null;let p=(0,m.A)(n.Ttl)(e);const{company_entity:h,mobile_country_code:_,phone_country_code:x,business_registration_type:v,industry_type:f,annual_turnover:y,intended_use_of_account:b,other_
1319countries_of_business:g,expected_monthly_volume:j,source_of_funds:A,doc_options:N}=Le(e,"company_entity","mobile_country_code","phone_country_code","business_registration_type","industry_type","annual_turnover","intended_use_of_account","other_countries_of_business","expected_monthly_volume","doc_options","source_of_funds");return{formValues:Le,country_of_business:u,company_entity:h,mobile_country_code:_,phone_country_code:x,business_registration_type:v,industry_type:f,annual_turnover:y,intended_use_of_account:b,other_countries_of_business:g||[],expected_monthly_volume:j,applicantId:c,documents:o,thisFormData:t,screens:a,currentScreen:s,timeline:r,user_session:l,uploadDocConfig:i,doc_options:N,mobileValidationReducer:d,getAllformVal:p,source_of_funds:A}},{companyDetailsSubmitRequest:ce.RJ,changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV,getMobileCodeByCountry:v.zB})(Fe),Pe={postcode:"",street_number:"",street_type:"",state:"",unit_number:"",street_name:"",floor_number:"",suburb:"",building_name:"",block_number:"",city:"",building_number:"",district:"",address1:"",address2:"",is_business_address_same_as_incorporation_address:!0,street:"",province:"",incorporation:{postcode:"",street_number:"",street_type:"",state:"",unit_number:"",street_name:"",floor_number:"",suburb:"",building_name:"",block_number:"",city:"",building_number:"",district:"",address1:"",address2:"",street:"",province:"",main_countries_of_operations:[]},business:{province:"",postcode:"",street_number:"",street_type:"",state:"",street:"",unit_number:"",street_name:"",floor_number:"",suburb:"",building_name:"",block_number:"",city:"",building_number:"",district:"",address1:"",address2:""},main_countries_of_operations:[]};class $e extends o.Component{constructor(e){super(e),this.proof_of_addressChange=e=>{this.props.handleOnChangeInTimeLine("country_of_residence",e.value),this.setState({country_of_residence:e.value})},this.onChangeFile=e=>{const t=e;if(t){const e=new FileReader;!t.type.match("image.*")||t.size/1024/1024>5?this.setState({imageError:"Not a valid image",filePath:""}):(e.onloadend=()=>{this.setState({filePath:e.result,imageError:"",fileName:t.name})},e.readAsDataURL(t))}else this.setState({filePath:"",imageError:"",fileName:""})},this.resetFields=()=>{this.props.dispatch((0,D.Zg)(n.v2Y,"company_address_file","")),this.props.dispatch((0,D.Bk)(n.v2Y,"company_address_file"))},this.handleGetKeysOnly=e=>{let t=[];return e.forEach(e=>t.push(e.key)),t},this.submitCompanyAddress=async e=>{var t;const{business:{block_number:i,street_number:n,state:o},business:a,is_business_address_same_as_incorporation_address:s,incorporation:r}=e,l=Object.values(a),d=Object.values(r),c=l.length>0&&(0,y.s6)(l),u=d.length>0&&(0,y.s6)(d),m=s&&(c||u);if(this.props.userAddressError&&c||s&&(c||m))return this.props.showMessage({text:["Please provide all the address"],type:"info"});if("MY"===this.props.country_of_business&&!this.functionStates.find(e=>new RegExp(`(^|\\s*)(${(0,y.gj)(e)})(\\s*)`,"gi").test(o)))return this.props.showMessage({text:["State not supported yet"]},"error");if(Object.keys(a)&&c)return this.props.showMessage({text:["Please provide all the address"],type:"info"});if("SG"===this.props.country_of_business){if(!i&&!n)return this.props.showMessage({text:["Please enter either block or street number"],type:"info"});if(s&&r){let{block_number:e,street_number:t}=r;if(!e&&!t)return this.props.showMessage({text:["Please enter either block or street number"],type:"info"})}}if("US"===(null===(t=this.props)||void 0===t?void 0:t.country_of_business)){var p;if(0===(null===e||void 0===e||null===(p=e.countries_operating)||void 0===p?void 0:p.length))return this.props.showMessage({text:["Please select the country of operations"],type:"info"});e.incorporation_countries_of_operations=await this.handleGetKeysOnly(e.countries_operating),delete e.countries_operating}else e.incorporation_countries_of_operations=[];delete e.countries_of_operations;try{await this.props.activateLoader(),(0,y.TE)(this.formID,e);const{business:t,...i}=e;let n=await this.props.companyAddressSubmitRequest({...i,...t},this.props.documents);n&&n.data&&n.data.success?this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline):this.props.disableLoader()}catch(h){this.props.disableLoader(),console.error(h)}},this.componentDidMount=async()=>{var e,t;await this.props.disableLoader();const{thisFormData:i,country_of_business:n}=this.props;if(this.props.initialize((0,y.PJ)(Pe,function(e,t){let i={...e,business:{...e,...(0,y.KE)(t,e.street_name,e.street_type)}},n=Object.keys(e).filter(e=>/incorporation_/g.test(e));return i.incorporation=n.reduce((t,i)=>(t[i.replace(/(incorporation_)/g,"")]=e[i],t),{}),i={...i,incorporation:{...i.incorporation,...(0,y.KE)(t,e.incorporation_street_name,e.incorporation_street_type)}},i.is_business_address_same_as_incorporation_address="US"!==t&&!i.is_business_address_same_as_incorporation_address,i}(i,n))),null!==(e=this.props)&&void 0!==e&&null!==(t=e.thisFormData)&&void 0!==t&&t.main_countries_of_operations&&this.setState({countries_operating:this.props.thisFormData.main_countries_of_operations}),"MY"===n)try{let e=await(0,v.nv)({url:`${f.H$}/states/dropdown?country_code=MY&type=REMITTER`,withCredentials:!0});if(!e)return;e.data&&e.data.success&&e.data.data&&(this.functionStates=e.data.data.map(e=>{let{value:t}=e;return t.toLowerCase()}))}catch(o){console.error(o)}},this.handleChange=(e,t)=>
1319{this.setState({countries_operating:e})},this.state={proof_of_address:"",countries_operating:[]},this.formID=n.v2Y,this.functionStates=[]}render(){const{handleSubmit:e,country_of_business:t}=this.props;return(0,a.jsx)("form",{onSubmit:e(this.submitCompanyAddress),className:"common-form company-details",id:this.formID,onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Enter your company address"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Help us with your company address to build your profile"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime inner-grid details payee-details-inputs",centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsxs)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:[(0,a.jsx)(d.A,{children:(0,a.jsx)(Se.A,{name:"business",children:(0,a.jsx)(de.A,{...this.props,getAllformVal:this.props.allformValues,countryCode:this.props.country_of_business,sectionHead:"Address of business",formName:this.formID,formSectionName:"business"})})}),(0,a.jsx)(J.A,{label:"US"===t?"Different from the Registration Address (if not same as the Registration Address, please provide address below) ":"Please tick if the address of incorporation is different than address of business",className:"dark",name:"is_business_address_same_as_incorporation_address",checked:this.props.is_business_address_same_as_incorporation_address}),this.props.is_business_address_same_as_incorporation_address&&(0,a.jsx)(d.A,{children:(0,a.jsx)(Se.A,{name:"incorporation",children:(0,a.jsx)(de.A,{...this.props,getAllformVal:this.props.allformValues,formName:this.formID,countryCode:this.props.country_of_business,sectionHead:"Address of incorporation",formSectionName:"incorporation"})})}),"US"===t&&(0,a.jsx)(d.A,{children:(0,a.jsxs)(d.A.Row,{children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Country of Operations"})})}),(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)(te.A,{bindToThisObject:this.state.countries_operating,name:"countries_operating",type:"text",multiple:!0,component:Z.A,placeholder:"Main Country of Operations",isSearchable:!0,validate:[L.mw],className:"theme-dropdown",onDropdownChange:this.handleChange,url:`${f.H$}/countries/dropdown`})})]})})]})}),(0,a.jsx)("button",{className:"longSubmitButton blue_percentage_48 saveandcontinue",id:"submit",children:"Save and continue"})]})]})})})]})})}}const Ue=(0,ie.A)(n.v2Y);const Ve=(0,u.A)({form:n.v2Y,onSubmitFail:j.Nc})($e),Be=(0,c.Ng)(function(e){const{rootReducer:{userDataReducer:{userStateInfo:{remitterDetails:t},userAddressError:i},documentDataReducer:{documentDetails:o},userFlowReducer:{screens:a,currentScreen:s,timeline:r},userSessionReducer:{user_session:l}}}=e;let d;d=l.country_code;let c=(0,m.A)(n.v2Y)(e);const{company_proof_of_address:u,postcode:p,state:h,suburb:_,is_business_address_same_as_incorporation_address:x,incorporation:v,business:f}=Ue(e,"company_proof_of_address","postcode","state","suburb","is_business_address_same_as_incorporation_address","incorporation","business");return{company_proof_of_address:u,country_of_business:d,thisFormData:t,documents:o,postcode:p,state:h,suburb:_,screens:a,currentScreen:s,timeline:r,is_business_address_same_as_incorporation_address:x,allformValues:c,incorporation:v,business:f,userAddressError:i}},{companyAddressSubmitRequest:ce.v3,changeScreen:h.Xh,activateLoader:j.LI,disableLoader:j.MV,showMessage:g.rG})(Ve);var Ye=i(67972);class He extends o.Component{constructor(e){super(e),this.componentDidMount=async()=>{this.props.disableLoader();const{currentScreen:e,getUploadDocConfig:t}=this.props;let i=await t({screen_name:e});i&&i.data&&i.data.data&&this.setState({docConfig:i.data.data})},this.submitCompanyDocs=async e=>{this.props.activateLoader();const{currentScreen:t,changeScreen:i,screens:n,timeline:o,getAllformVal:a,companyDocsSubmitRequest:s}=this.props;if(a){this.props.activateLoader();let a=(0,b.W0)(e),r=await s(a);r&&r.data&&r.data.success?i(x.vtj,t,n,o):(this.wasFormSubmitted=!1,this.props.disableLoader())}else i(x.vtj,t,n,o)},this.state={docConfig:[]}}render(){const{handleSubmit:e,getAllformVal:t}=this.props;return(0,a.jsx)("form",{onSubmit:e(this.submitCompanyDocs),className:"common-form company-detail
1319s",encType:"multipart/form-data",id:"form-company-documents",onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Company Documents"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Help us with your company documents"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime inner-grid",centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,a.jsx)(d.A,{children:(0,a.jsx)(d.A.Row,{className:"form-row",children:(0,a.jsx)(_e,{propDocConfig:this.state.docConfig,formName:n.XTI,getAllformVal:t,requiredDocTypes:[n.HfG],getDocInitObj:this.getDocInitObj})})})})}),this.props.getAllformVal?(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Save and continue"}):(0,a.jsx)("button",{id:"skip",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Skip"})]})]})})})]})})}}const ze=(0,u.A)({form:n.XTI,onSubmitFail:j.Nc})(He),Ge=(0,c.Ng)(function(e){let t=(0,m.A)(n.XTI)(e);const{rootReducer:{documentDataReducer:{uploadDocConfig:i,documentDetails:o},userFlowReducer:{screens:a,currentScreen:s,timeline:r}}}=e;return{documents:o,getAllformVal:t,screens:a,currentScreen:s,timeline:r,uploadDocConfig:i}},{companyDocsSubmitRequest:ce._4,formValues:Ye.A,changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV})(ze);var qe=i(6155);class Ke extends o.Component{constructor(e){super(e),this.submitInformationScreen=async e=>{const{is_remitter_to_be_contacted:t,scheduledInterviewDetails:i,updateScheduleInterview:o,submitScheduleInterview:a,navigate:s}=this.props;try{let r={...e};if(await this.props.activateLoader(),(0,y.TE)(this.formID,r),"is_remitter_to_be_contacted"in r){let e=i&&i.appointment_request_id?await o(r,i.appointment_request_id):await a(r);if(e&&e.data&&e.data.success){if(t)return s(`${n.C1b}/acknowledgement/none/appointment`);this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline)}else this.props.disableLoader()}else this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline)}catch(r){this.props.disableLoader(),console.error(r)}},this.componentDidMount=()=>{this.props.disableLoader();const{scheduledInterviewDetails:e}=this.props;e&&Object.keys(e).length>0?e.appointment_request_id&&e.scheduled_date&&e.scheduled_slot?this.props.initialize({is_remitter_to_be_contacted:!0,...e}):this.props.initialize(e):this.props.initialize({is_remitter_to_be_contacted:!1})},this.onRemitterContactedChange=()=>{const{scheduledInterviewDetails:e}=this.props;if(e&&0===Object.keys(e).length){let e={scheduled_date:"",scheduled_slot:""};(0,y.l6)("authorisedSignatory",e,this.props.dispatch,D.Zg,D.Bk)}},this.slots=[{key:1,value:"9",text:"9am to 12pm"},{key:2,value:"12",text:"12pm to 3pm"},{key:3,value:"3",text:"3pm to 6pm"}],this.formID="form-authorised-signatory"}render(){const{handleSubmit:e,is_remitter_to_be_contacted:t}=this.props;return(0,a.jsx)("form",{className:"common-form information-screen",onSubmit:e(this.submitInformationScreen),id:this.formID,onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Add Company Authorities"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Read the below information to move to the next step"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime",children:[(0,a.jsx)(d.A.Row,{children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(d.A,{className:"inner
1319-grid details",container:!0,centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:15,children:(0,a.jsxs)("div",{className:"disclosure default-text",children:[(0,a.jsx)("p",{className:"para qus",children:"In the next section, we will collect the identity and address information of some people associated with your business. We will also ask you to upload the documents for each person which support the information provided. Below we describe the roles for whom we are mandated to capture the information and documents"}),(0,a.jsx)("div",{className:"para ans",children:(0,a.jsxs)("ol",{className:"auth-roles-list",id:"list-1-authorised-signatory",children:[(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"Authorised Signatory"})," - Authorised signatory is an Officer or representative vested (explicitly, implicitly, or through conduct) with the powers to commit the authorising organization to a binding agreement."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"Director"})," - A director is a person who is a elected member of the board of directors of the company bestowed with the responsibility of determining and implementing company\u2019s policies."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"Shareholder holding more than 25% shares"})," - A natural person owning more than or equal to 25% shares of an organisation."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"PEP holding more than 10% shares"})," - A politically exposed person owning more than 10% shares in the company."]}),(0,a.jsxs)("li",{children:[(0,a.jsx)("span",{children:"Beneficial owners"})," - Beneficial owner is someone who is entitled to receive the benefits of ownership in the company and directly or indirectly has the power to vote or influence decisions of the company."]})]})}),(0,a.jsx)("p",{className:"para qus",children:"If you wish to skip the next section and want our sales representative to contact you for all the information and documents, please click the checkbox below. Else, click save and continue to proceed"})]})})}),(0,a.jsx)(d.A.Row,{className:"payee-details-inputs no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"payee-details-column",width:15,children:[(0,a.jsx)(J.A,{label:"Yes, I wish to be contacted by sales representative from Instarem",name:"is_remitter_to_be_contacted",checked:t,className:"no-margin",onChange:this.onRemitterContactedChange}),t&&(0,a.jsx)(d.A,{className:"schedule_details",children:(0,a.jsxs)(d.A.Row,{children:[(0,a.jsx)(d.A.Column,{computer:8,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"scheduled_date",type:"text",className:"input form-flow",component:ee.A,minDate:W()().add(1,"day"),validate:[L.mw],placeholder:"Preferred date",onlyWeekDays:!0,parse:e=>e&&W()(e).format("DD/MM/YYYY")})}),(0,a.jsx)(d.A.Column,{computer:8,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:this.props.scheduled_slot,name:"scheduled_slot",type:"text",component:Z.A,placeholder:"Select Slot",validate:[L.mw],className:"theme-dropdown",staticValues:this.slots})})]})})]})})]})})}),(0,a.jsx)("button",{className:"longSubmitButton blue_percentage_48 saveandcontinue",id:"submit",children:"Save and continue"})]})]})})})]})})}}const Qe=(0,ie.A)("authorisedSignatory");const We=(0,u.A)({form:"authorisedSignatory",onSubmitFail:j.Nc})(Ke),Xe=(0,B.A)((0,c.Ng)(function(e){const{rootReducer:{userFlowReducer:{screens:t,currentScreen:i,timeline:n},scheduleInterviewReducer:{scheduledInterviewDetails:o}}}=e,{is_remitter_to_be_contacted:a,scheduled_slot:s}=Qe(e,"is_remitter_to_be_contacted","scheduled_slot");return{is_remitter_to_be_contacted:a,screens:t,currentScreen:i,timeline:n,scheduled_slot:s,scheduledInterviewDetails:o}},{changeScreen:h.Xh,updateScheduleInterview:qe.ot,submitScheduleInterview:qe.rE,activateLoader:j.LI,disableLoader:j.MV})(We));var Ze=i(13508),Je=i(28345);i(19375);class et extends o.Component{constructor(e){super(e),this.submitInformationScreen=async e=>{try{await this.props.activateLoader(),(0,y.TE)(this.formID,e);let t=await this.props.authoritiesSubmitRequest();t&&t.data&&t.data.success?this.props.changeScreen(x.vtj,this.props.currentScreen,this.props.screens,this.props.timeline):this.props.disableLoader()}catch(t){this.props.disableLoader(),console.error(t)}},this.paginate=()=>{let{representatives:e}=this.props;if(e=[...e],e&&e.length>0){let t=e.length;t<this.defaultPageSize?this.defaultPageSize=t:this.defaultPageSize=this.initialPageSize;let i=Math.ceil(t/this.defaultPageSize);t===this.defaultPageSize&&(i=0),i<1&&this.setState({pageNumber:0}),this.setState({totalPages:i})}},this.componentDidMount=()=>{this.paginate()},this.addKYCInfo=()=>{let{getAllformVal:e,switchFormAndList:t}=this.props,i={};n.AqJ.forEach(t=>{!0===e[t]&&(i[t]=!0)}),t(!0,i)},this.onEdit=e=>{this.props.onEditParent(e.original)},this.show=e=>this.setState({openConfirm:!0,deleteData:e}),this.handleConfirm=()=>{this.setState({openConfirm:!1}),this.state.deleteData&&(this.props.onDeleteParent(this.state.deleteData.original),this.paginate())},this.handleCancel=()=>this.setState({openConfirm:!1,deleteData:null}),this.state={showTable:!0,deleteData:null,openConfirm:!1,pageNumber:0,totalPages:1},this.formID="form-authorities-list",this.defaultPageSize=3,this.initialPageSize=3,this.country_of_business=this.props.user_session.country_code}render(){const{timeline:e,handleSubmit:t,screens:i,changeScreen:o,dispatch:s,getAllformVal:r}=this.props;let l=r&&n.AqJ.find(e=>!0===r[e])?1:-1;return(0,a.jsxs)("div",{children:[(0,a.jsx)(Ze.A,{id:"delete-representative-confirm",open:this.state.openConfirm,header:"Delete Representative",content:"Are you sure, you want to delete this Representative?",onCancel:this.handleCancel,onConfirm:this.handleConfirm}),(0,a.jsx)("form",{className:"common-form authorities",onSubmit:t(this.submitInformationScreen),id:this.formID,onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Add authorities"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Read the below information to move to the next step"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime",children:[(0,a.jsx)(d.A.Row,{children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(d.A,{className:"inner
1319-grid details",container:!0,centered:!0,children:[(0,a.jsxs)(d.A.Row,{className:"payee-details-inputs form-row",children:[(0,a.jsxs)(d.A.Column,{className:"payee-details-column",width:16,children:[(0,a.jsx)("div",{className:"form-flow-header",children:"Add an authority"}),"US"===this.country_of_business?(0,a.jsx)("p",{className:"para form-flow-subheader",children:"Please indicate all owners (holding more than 25%) and control persons of your organisation to get your account approved faster. If the authority has more than one role, please select all that apply"}):(0,a.jsx)("p",{className:"para form-flow-subheader",children:"If the authority has more than one role, please select all that apply"})]}),(0,a.jsx)(me,{formName:n.tZV,dispatch:s,change:D.Zg}),(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("button",{type:"button",onClick:this.addKYCInfo,className:"add-checks-btn "+(-1===l?"btn-disabled":""),disabled:-1===l,id:"btn-add-representative",children:"Add"})})]}),this.props.representatives&&this.props.representatives.length>0&&(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsxs)(d.A.Column,{className:"payee-details-column",width:16,children:[(0,a.jsx)("div",{className:"form-flow-header",children:"Previously added authorities"}),(0,a.jsx)(Je.A,{id:"table-authorities-info",data:this.props.representatives.map(e=>({first_name:e.first_name,authorities:e.authorityList,representative_id:e.remitter_corporate_representative_id,mobile_number:e.mobile_number,mobile_country_code:e.mobile_country_code,email:e.email,is_applicant:e.APPLICANT})),columns:[{Header:"First name",accessor:"first_name"},{Header:"Email",accessor:"email"},{Header:"Mobile number",Cell:e=>{let{original:{mobile_country_code:t,mobile_number:i}}=e;return(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-span",children:t?"+"+t:""}),(0,a.jsx)("span",{className:"text-span",children:i})]})}},{Header:"Authority type",accessor:"authorities"},{Header:"Action",Cell:t=>[(0,a.jsx)("button",{type:"button",onClick:t.original.is_applicant?()=>o(x.clv,"applicant_details",i,e):this.onEdit.bind(this,t),className:"link-button",id:"btn-edit-"+t.original.representative_id,children:"Edit"},"edit"),!t.original.is_applicant&&(0,a.jsx)("button",{type:"button",className:"link-button",onClick:this.show.bind(this,t),id:"btn-delete-"+t.original.representative_id,children:"Delete"},"delete")]}],defaultPageSize:this.defaultPageSize,showPageSizeOptions:!1,page:this.state.pageNumber,className:"table-parent grey-border blue-tr",PaginationComponent:()=>(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"-previous caret",onClick:()=>{let e=this.state.pageNumber;this.state.pageNumber>0&&e--,this.setState({pageNumber:e})},children:(0,a.jsx)("button",{id:"btn-transaction-load-next",type:"button",className:"-btn",children:(0,a.jsx)("img",{src:A.uV8,alt:"back"})})}),(0,a.jsx)("div",{className:"pages",children:this.state.pageNumber+1+" of "+(this.state.totalPages+1)}),(0,a.jsx)("div",{className:"-next caret",onClick:()=>{let e=this.state.pageNumber;this.state.pageNumber+1<this.state.totalPages&&e++,this.setState({pageNumber:e})},children:(0,a.jsx)("button",{id:"btn-transaction-load-next",type:"button",className:"-btn",children:(0,a.jsx)("img",{src:A.vVX,alt:"next"})})})]})})]})})]})})}),(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue "+(this.props.representatives&&this.props.representatives.length>0?"":"btn-disabled"),disabled:!(this.props.representatives&&this.props.representatives.length>0),children:"Save and continue"})]})]})})})]})})]})}}const tt=(0,u.A)({form:n.tZV,onSubmitFail:j.Nc})(et),it=(0,c.Ng)(function(e){const{rootReducer:{userDataReducer:{userStateInfo:{representatives:t,applicantDetails:i}}}}=e;return{getAllformVal:(0,m.A)(n.tZV)(e),representatives:t,applicantDetails:i}},{authoritiesSubmitRequest:ce.l1,authoritiesDeleteRequest:ce.m9,changeScreen:h.Xh,scrollToTop:j.eG,activateLoader:j.LI,disableLoader:j.MV})(tt),nt={title:"",first_name:"",middle_name:"",last_name:"",date_of_birth:"",nationality:"",mobile_country_code:"",mobile_number:"",postcode:"",street_number:"",street_type:"",unit_number:"",street_name:"",floor_number:"",suburb:"",building_name:"",block_number:"",city:"",building_number:"",district:"",address1:"",address2:"",state:"",email:"",country_of_residence:"",SHAREHOLDER:!1,DIRECTOR:!1,OTHER:!1,U
1319BO:!1,BENEFICIAL_OWNER:!1,AUTHORISED_SIGNATORY:!1,COMMISSIONER:!1,APPLICANT:!1,SHAREHOLDER_HOLDING_MORE_THAN_25PERCENT_SHARES:!1,SHAREHOLDER_HOLDING_MORE_THAN_10PERCENT_SHARES:!1,ENTITY_HOLDING_MORE_THAN_10PERCENT_SHARES:!1,PEP:!1,PEP_HOLDING_MORE_THAN_10PERCENT_SHARES:!1,ENTITY_HOLDING_MORE_THAN_25PERCENT_SHARES:!1,PARTNER:!1,COMPLIANCE_OFFICER:!1,AUTHORISED_PERSON:!1,street:"",province:"",identity_number:"",job_title:"",percentage_owned:""};var ot=i(67010);class at extends o.Component{constructor(e){super(e),this.UNSAFE_componentWillReceiveProps=async e=>{if(e.country_of_residence&&e.country_of_residence!==this.props.country_of_residence){let t=await this.props.getMobileCodeByCountry(e.country_of_residence);if(t&&t.data&&t.data.success){let e=[];t.data.data.forEach(t=>{e.push({...t,code:t.value})}),this.setState({mob_array:e,mob_code:"+"+e[0].code})}}},this.submitInformationScreen=async e=>{const{peopleKYCSubmitRequest:t,peopleKYCprefilledData:i,submittedDataToTable:n,showMessage:o,activateLoader:a,disableLoader:s}=this.props;if("SG"===this.props.country_of_residence){let{block_number:t,street_number:i}=e;if(!t&&!i)return o({text:["Please enter either block or street number"],type:"info"})}try{await a();let o=i?i.remitter_corporate_representative_id:null,r=(0,b.W0)(e,void 0,void 0,this.representativeDocTypes),l=r.formData;if("US"===this.props.user_session.country_code){let e=W()(l.date_of_birth).format("DD/MM/YYYY");l.date_of_birth=e,l.percentage_owned=Number(l.percentage_owned)}let d=await t(l,{representative_id:o,...r});d&&200===d.status?n(e):s()}catch(r){s(),console.error(r)}},this.componentDidMount=async()=>{const{peopleKYCprefilledData:e,initialize:t,checkboxInfo:i}=this.props,n=e?e.remitter_corporate_representative_id:null;if(e)return t(this.initFields={...(0,y.PJ)(nt,{...e,...(0,y.KE)(e.country_of_residence,e.street_name,e.street_type)}),...this.props.allFormFileFields},!0),void(e.nationality&&this.onNationalityChange({key:e.nationality},n));t(i,!0)},this.goBack=()=>{this.props.switchFormAndList(!1,this.props.getAllFormVal.authorities)},this.onMobileCountryCodeChange=async e=>{e&&this.setState({mob_code:"+"+e.code})},this.onNationalityChange=async e=>{if(e&&e.key){const{currentScreen:t,getUploadDocConfig:i}=this.props;let n=await i({screen_name:t,nationality:e.key});n&&n.data&&n.data.success&&this.setState({docConfig:n.data.data})}},this.renderDocFunc=e=>{if(!this.props.nationality||!e)return;let{uploadDocConfig:t,currentScreen:i}=this.props,n=[];e.forEach(e=>{let o=t[i]?t[i].filter(t=>t.type===e):[];n=n.concat(o)}),this.setState({docConfig:n})},this.onCountryOfResidenceChange=async e=>{await this.props.getPhoneValidationsByCountry(e.value)},this.getDocInitObj=e=>{(0,y.w2)(this.props.dispatch,D.Zg,n.D7,e)},this.titleArray=[{key:"Mr.",value:"Mr.",text:"Mr."},{key:"Mrs.",value:"Mrs.",text:"Mrs."},{key:"Ms.",value:"Ms.",text:"Ms."}],this.state={mob_code:"code",mob_array:null,docConfig:[]},this.formID=n.D7,this.initFields={},this.isRepresentativePOIFileRendered=!1,this.representativeDocTypes=[n.Nby,n.$iV,n.Jds],this.country_of_business=this.props.user_session.country_code}render(){let{handleSubmit:e,uploadDocConfig:t,country_of_residence:i,dispatch:o,getAllFormVal:s,peopleKYCprefilledData:r,disablePoa:l,disablePoi:c}=this.props,u=r?r.remitter_corporate_representative_id:null;return u||(l=!1,c=!1),(0,a.jsx)("form",{className:"common-form people-kyc",onSubmit:e(this.submitInformationScreen),id:this.formID,onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"People Information and KYC"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Help us with your Authority information to build your profile"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid inner-grid details peo
1319ple-kyc-anime",centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,a.jsxs)(d.A,{children:[(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsxs)(d.A.Column,{width:16,children:[(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Add an authority"})}),(this.country_of_business,(0,a.jsx)("p",{className:"para form-flow-subheader",children:"If the authority has more than one role, please select all that apply"}))]}),(0,a.jsx)(me,{formName:n.D7,dispatch:o,change:D.Zg,uploadDocConfig:t,renderDocFunc:this.renderDocFunc})]}),(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Personal"})})}),(0,a.jsx)(d.A.Column,{className:"fit-col-title",children:(0,a.jsx)(te.A,{bindToThisObject:this.props.title,name:"title",type:"text",component:Z.A,placeholder:"Title",isSearchable:!1,className:" theme-dropdown fit",staticValues:this.titleArray,disabled:c})}),(0,a.jsx)(d.A.Column,{className:"small-col-name",children:(0,a.jsx)(te.A,{name:"first_name",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw,L.KU,L.tV],placeholder:"First Name",disabled:c})}),(0,a.jsx)(d.A.Column,{computer:5,tablet:5,mobile:16,children:(0,a.jsx)(te.A,{name:"middle_name",type:"text",className:"input form-flow less-width",component:X.A,normalize:(0,re.YR)(50),validate:[L.OY],placeholder:"Middle Name",disabled:c})}),(0,a.jsx)(d.A.Column,{computer:5,tablet:5,mobile:16,children:(0,a.jsx)(te.A,{name:"last_name",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw,L.KU,L.tV],placeholder:"Last Name",disabled:c})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:i,name:"country_of_residence",type:"text",component:Z.A,placeholder:"Country of Residence",validate:[L.mw],className:" theme-dropdown",url:f.H$+"/countries/dropdown",disabled:c,onDropdownClose:this.onCountryOfResidenceChange})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:this.props.nationality,name:"nationality",type:"text",component:Z.A,onDropdownClose:e=>{this.onNationalityChange(e)},placeholder:"Nationality",validate:[L.mw],className:" theme-dropdown",url:f.H$+"/countries/dropdown?is_nationality_activated=true&display_text=nationality",disabled:c})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"date_of_birth",type:"text",className:"input form-flow extra-padding-datepicker",component:ee.A,validate:"US"===this.country_of_business?[L.mw,L.XV]:[L.mw,L.tI],disabled:c,placeholder:"US"===this.country_of_business?"DOB (MM/DD/YYYY)":"DOB (DD/MM/YYYY)",parse:e=>"US"===this.country_of_business?e&&W()(e).format("MM/DD/YYYY"):e&&W()(e).format("DD/MM/YYYY"),maxDate:W()().subtract(18,"years")})}),"US"===this.country_of_business&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"identity_number",className:"input form-flow",component:X.A,validate:[L.mw,L.q6],placeholder:"Last 4 digits of SSN",disabled:c,type:"number"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"job_title",type:"text",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),disabled:c,placeholder:"Job title"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"percentage_owned",className:"input form-flow",component:X.A,validate:[L.mw,L.z6],placeholder:"% owned",disabled:c,type:"number"})})]})]}),(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Contact"})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(d.A,{children:(0,a.jsxs)(d.A.Row,{children:[(0,a.jsx)(d.A.Column,{computer:4,tablet:4,mobile:4,className:"mobile-number-wrapper",children:(0,a.jsx)(te.A,{bindToThisObject:this.props.mobile_country_code,name:"mobile_country_code",type:"text",validate:[L.mw],component:Z.A,placeholder:"Code",className:" theme-dropdown fit",staticValues:this.state.mob_array,formName:n.D7,preselect_and_disable_if_one_item:!0,onDropdownClose:e=>this.onMobileCountryCodeChange(e),selectedLabel:this.state.mob_code})}),(0,a.jsx)(d.A.Column,{computer:12,tablet:12,mobile:12,children:(0,a.jsx)(te.A,{name:"mobile_number",type:"text",className:"input form-flow mobile-number",component:X.A,validate:[L.nI],normalize:(()=>{let e=[],{mobileValidationReducer:t}=this.props;if(t&&("number"===t.type&&e.push(re.aV),t.length)){let{max:i,exact:n}=t.length;e.push((0,re.YR)(n||i||50))}return(0,re.$y)(e)})(),placeholder:"Mobile number"})})]})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"email",type:"email",className:"input form-flow",component:X.A,normalize:(0,re.YR)(50),validate:[L.mw,L.Rp],placeholder:"Email"})})]}),i&&(0,a.jsx)(de.A,{formName:this.formID,countryCode:i,disabled:l,getAllformVal:s,...this.props}),(0,a.jsx)(_e,{propDocConfig:this.state.docConfig,formName:n.D7,getAllformVal:s,requiredDocTypes:this.representativeDocTypes,getDocInitObj:this.getDocInitObj,representativeId:u,filterOut:u?[]:this.representativeDocTypes})]})})}),(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Save and Add"})]})]})})})]})})}}let st=(0,u.A)({form:n.D7,onSubmitFail:j.Nc});const rt=(0,ie.A)(n.D7);const lt=st(at),dt=(0,c.Ng)(function(e){const{rootReducer:{userSessionReducer:{user_session:t,user_session:{country_code:i}},documentDataReducer:{uploadDocConfig:o},documentDataReducer:{documentDetails:a},mobileValidationReducer:s}}=e;let r,l=(0,m.A)(n.D7)(e),d=!1,c=!1;r=a.filter(e=>[n.$iV].includes(e.type)),a&&r&&r.length>0&&(d=!0),r=a.filter(e=>[n.Nby].includes(e.type)),a&&r&&r.length>0&&(c=!0);const{country_of_residence:u,nationality:p,source_of_income:h,mobile_country_code:_,employment_status:x,postcode:v,title:f,state:y,suburb:b}=rt(e,"country_of_residence","nationality","source_of_income","mobile_country_code","employment_status","title","postcode","state","suburb");return{country_of_residence:u,nationality:p,source_of_income:h,mobile_country_code:_,employment_status:x,title:f,postcode:v,state:y,suburb:b,getAllFormVal:l,documents:a,uploadDocConfig:o,country_code:i,user_session:t,mobileValidationReducer:s,disablePoa:d,disablePoi:c}},{peopleKYCSubmitRequest:ce.Wg,changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV,getMobileCodeByCountry:v.zB,showMessage:g.rG,getPhoneValidationsByCountry:ot.sN})(lt);class ct extends o.Component{constructor(e){super(e),this.switchFormAndList=(e,t)=>
1319{this.setState({isFormFunctioning:e,checkboxInfo:t,peopleKYCprefilledData:null,isEditable:!0})},this.submittedDataToTable=()=>{this.setState({isFormFunctioning:!1})},this.prefilledData=e=>{this.props.representatives&&this.props.representatives.forEach(t=>{e.representative_id===t.remitter_corporate_representative_id&&this.setState({peopleKYCprefilledData:t,isFormFunctioning:!0,isEditable:!1})})},this.authoritiesDeleteRequest=e=>{let{representatives:t}=this.props;this.props.authoritiesDeleteRequest(e.representative_id);let i=t.findIndex(t=>t.remitter_corporate_representative_id===e.representative_id);-1!==i&&t.splice(i,1)},this.state={showTable:!1,isFormFunctioning:!1,isEditable:!1,checkboxInfo:{},infoForTable:{}}}async UNSAFE_componentWillReceiveProps(){this.props.disableLoader()}async componentDidMount(){this.props.disableLoader()}render(){return(0,a.jsx)("div",{children:this.state.isFormFunctioning?(0,a.jsx)(dt,{isEditable:this.state.isEditable,checkboxInfo:this.state.checkboxInfo,values:this.state.checkboxInfo,switchFormAndList:this.switchFormAndList,submittedDataToTable:this.submittedDataToTable,peopleKYCprefilledData:this.state.peopleKYCprefilledData,timeline:this.props.timeline,screens:this.props.screens,currentScreen:this.props.currentScreen,user_session:this.props.user_session}):(0,a.jsx)(it,{checkboxInfo:this.state.checkboxInfo,switchFormAndList:this.switchFormAndList,infoForTable:this.state.infoForTable,onEditParent:this.prefilledData,onDeleteParent:this.authoritiesDeleteRequest,timeline:this.props.timeline,screens:this.props.screens,currentScreen:this.props.currentScreen,user_session:this.props.user_session})})}}const ut=(0,u.A)({form:"authorityInfo",onSubmitFail:j.Nc})(ct),mt=(0,c.Ng)(function(e){const{rootReducer:{userFlowReducer:{screens:t,currentScreen:i,timeline:n},userDataReducer:{userStateInfo:{representatives:o}}}}=e;return{representatives:o,screens:t,currentScreen:i,timeline:n}},{authoritiesDeleteRequest:ce.m9,disableLoader:j.MV})(ut),pt=e=>{let{fields:t,formValues:i,device:o}=e;return(0,a.jsxs)("div",{children:[o===n.uek&&(0,a.jsx)(p.oq,{newOnboardingScreen:!0}),(0,a.jsx)("section",{className:"new-facta-container",children:(0,a.jsxs)("section",{className:"new-facta-container_card",children:[(0,a.jsx)("h1",{className:"new-facta-container_card_heading",children:"Just a step away"}),(0,a.jsxs)("section",{className:"new-facta-container_card_inner",children:[(0,a.jsxs)("div",{id:"fatca-declaration",className:"new-facta-container_card_inner_facta",children:[(0,a.jsx)("span",{id:"fatca-declaration-text",children:"FATCA declaration"}),(0,a.jsx)(p._g,{trigger:(0,a.jsx)("img",{id:"fatca-declaration-popup-img",src:A.rDG,alt:"info"}),id:"fatca-disclaimer",header:"Fatca Declaration",content:"FATCA stands for Foreign Account Tax Compliance Act."})]}),t.map((e,t)=>(0,a.jsx)(p.yc,{field:e,formValues:i,position:t},t)),(0,a.jsx)("button",{id:"submit",className:"new-facta-container_card_inner_btn",children:"Proceed"})]})]})})]})};class ht extends o.Component{constructor(e){super(e),this.componentDidMount=async()=>{this.props.activateLoader();const e=await(0,v.nv)({method:"get",url:`${f.H$}/country/document?screen_name=fatca`,withCredentials:!0});if(e.data&&e.data.success){const t=e.data.data[0].fields_json;let i={};for(const e in t)t[e].name="q"+(+e+1),i="Yes"===t[e].values[0].label&&!0===t[e].values[0].checked?{...i,["q"+(+e+1)]:!0}:{...i,["q"+(+e+1)]:!1};this.setState({fields:t}),this.props.initialize(i),this.props.disableLoader()}else this.props.disableLoader()},this.submit=async e=>
1319{let{activateLoader:t,fatcaSubmitRequest:i,currentScreen:n,screens:o,timeline:a,changeScreen:s}=this.props;t();let r=await i({additional_info:e});r&&r.data&&r.data.success&&s(x.vtj,n,o,a)},this.state={title:"FATCA Declaration",subtitle:"Do you satisfy any of the criteria mentioned below?",fields:[]},this.initObj={q1:!0,q2:!1,q3:!1}}constructInitObj(e){let t=e.find(e=>e.type===n.veh),i={};return i[t.type]={},i[t.type][t.document_code]={},t.fields_json.forEach(e=>{i[t.type][t.document_code][e.name]=!!e.values.find(e=>e.value&&e.checked)}),i}render(){const{handleSubmit:e,featureState:{toggleFeature:t},getAllformVal:i,device:n}=this.props;return(0,a.jsx)("form",{id:this.formID,onSubmit:e(this.submit),encType:"multipart/form-data",className:"common-form-upload-form",onKeyUp:y.jN,onKeyPress:y.jN,children:t?(0,a.jsx)(pt,{fields:this.state.fields,formValues:i,device:n}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(d.A,{children:(0,a.jsx)(d.A.Row,{className:"zero-top-padding",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align",children:[(0,a.jsx)(p.oq,{}),this.state.title]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:this.state.subtitle})]})})}),(0,a.jsx)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:(0,a.jsx)(d.A,{container:!0,className:"upload-documents-fold-1-page form-grid right-to-left-anime ",centered:!0,children:(0,a.jsxs)(d.A.Row,{className:"upload-doc-row row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:this.state.title},"section-head")}),(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsxs)(d.A,{className:"grid-relative upload-doc-section-grid",children:[(0,a.jsx)(d.A.Row,{className:"row-3 space-between",children:this.state.fields.map((e,t)=>(0,a.jsx)(d.A.Column,{width:7,computer:7,mobile:16,tablet:16,className:"fields-col",children:(0,a.jsxs)("div",{className:"radio-fatca-wrapper",children:[(0,a.jsx)("label",{className:"radio-label",children:(0,a.jsx)(te.A,{name:e.name,component:p.s8})}),(0,a.jsxs)("label",{id:`radio-${e.label}`,className:"label-text",children:[e.label,(0,a.jsx)("div",{className:"radio-fields",children:e.values&&e.values.map((t,i)=>{let n=`${e.name}-${t.value}`;return[(0,a.jsx)(te.A,{validate:e.validations.required?[L.TQ]:null,name:e.name,component:"input",type:e.type,className:e.type,parse:e=>"true"===e,disabled:e.disabled,value:t.value,id:n},e.name),(0,a.jsx)("label",{id:t.label,className:"inline-block-span",htmlFor:n,children:t.label},i)]})})]},e.name)]})},t))}),(0,a.jsx)(d.A.Row,{children:(0,a.jsx)(d.A.Column,{children:(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_80 saveandcontinue uploadbtn",children:"Save and continue"})})})]})})]})})})]})})}}const _t=(0,u.A)({form:n.UlI,onSubmitFail:j.Nc})(ht);const xt=(0,c.Ng)(function(e){let t=(0,m.A)(n.UlI)(e),{rootReducer:{userFlowReducer:{screens:i,currentScreen:o,timeline:a},uiTriggerState:{device:s}}}=e;return{screens:i,currentScreen:o,timeline:a,getAllformVal:t,device:s}},{disableLoader:j.MV,activateLoader:j.LI,fatcaSubmitRequest:_.Lh,changeScreen:h.Xh})(_t);var vt=i(58118),ft=i(706);const yt=[{key:1,value:"9",text:"9am to 12pm"},{key:2,value:"12",text:"12pm to 3pm"},{key:3,value:"3",text:"3pm to 6pm"}],bt="schedule-interview";const gt=(0,u.A)({form:"scheduleInterview",onSubmitFail:j.Nc})(function(e){const[t,i]=(0,o.useState)(!1),s=(0,vt.Zp)();(0,o.useEffect)(()=>{!async function(){e.disableLoader();const{scheduledInterviewDetails:t}=e;if(t&&Object.keys(t).length>0)e.initialize(t);else{e.dispatch((0,D.Zg)("scheduleInterview","appointment_address_type","PERSONAL_ADDRESS")),i(!0);const t=await e.getUserAddress({appointment_address_type:"PERSONAL_ADDRESS"});e.disableLoader(),t&&t.data&&t.data.success&&l(t.data.data.appointment_address)}}()},[]);const r=async t=>{const n=t.target.value;if("PERSONAL_ADDRESS"===n||"INSTAREM_ADDRESS"===n){let t=await e.getUserAddress({appointment_address_type:n});t&&t.data&&t.data.success&&l(t.data.data.appointment_address),i(!0)}else i(!1),l("")},l=t=>{e.dispatch((0,D.Zg)("scheduleInterview","appointment_address",t.replace(/,/g,", ")))},{handleSubmit:c,user_session:u,scheduled_slot:m}=e;return(0,a.jsx)("form",{id:bt,onSubmit:c(async t=>{let i={...t,is_remitter_to_be_contacted:!0};try{let o=null;await e.activateLoader(),(0,y.TE)(bt,t),o=e.scheduledInterviewDetails&&e.scheduledInterviewDetails.appointment_request_id?await e.updateScheduleInterview(t,e.scheduledInterviewDetails.appointment_request_id):await e.submitScheduleInterview(i),o&&o.data&&o.data.success?s(`${n.C1b}/acknowledgement/none/appointment`):e.disableLoader()}catch(o){console.error(o)}}),className:"common-form schedule-interview",onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{width:16,className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Schedule An Interview"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"We would like to say hi! in person"})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,id:"progress-bar-schedule-interview",className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,centered:!0,className:"form-grid right-to-left-anime inner-grid",children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,a.jsx)(d.A,{centered:!0,children:(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:15,className:"form-head-section",children:(0,a.jsx)("div",{className:"form-flow-header",children:"Choose address"})}),(0,a.jsx)(d.A.Column,{computer:15,mobile:16,tablet:16,children:(0,a.jsxs)("div",{className:"radio-group",children:[(0,a.jsx)("p",{children:"Kindly specify preferred location for interview"}),(0,a.jsxs)("div",{className:"options",children:[(0,a.jsxs)("label",{id:"address-type-perosnal-your-addr-label",className:"label-text left",children:[(0,a.jsx)(te.A,{id:"address-type-perosnal-your-addr",name:"appointment_address_type",component:"input",type:"radio",value:"PERSONAL_ADDRESS",validate:[L.TQ],onChange:r}),"Your address"]}),"INDIVIDUAL"===u.account_type&&(0,a.jsxs)("label",{id:"address-type-perosnal-instarem-addr-label",className:"label-text right",children:[(0,a.jsx)(te.A,{id:"address-type-perosnal-instarem-addr",name:"appointment_address_type",component:"input",type:"radio",value:"INSTAREM_ADDRESS",validate:[L.TQ],onChange:r}),"Instarem office"]}),"INDIVIDUAL"===u.account_type&&(0,a.jsxs)("label",{id:"address-type-perosnal-other-addr-label",className:"label-text right",children:[(0,a.jsx)(te.A,{id:"address-type-perosnal-other-addr",name:"appointment_address_type",component:"input",type:"radio",value:"OTHER_ADDRESS",validate:[L.TQ],onChange:r}),"Other"]})]})]})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{component:ft.A,rows:"3",labelText:"Address in Detail",name:"appointment_address",validate:[L.mw],disabled:t})}),(0,a.jsx)(d.A.Column,{width:15,className:"form-head-section",children:(0,a.jsx)("div",{className:"form-flow-header",children:"Choose a Date and Time"})}),(0,a.jsx)(d.A.Column,{className:"payee-details-column",width:15,children:(0,a.jsx)("p",{className:"slot-text",children:"Kindly specify preferred time for interview"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{name:"scheduled_date",type:"text",className:"input form-flow",component:ee.A,parse:e=>e&&W()(e).format("DD/MM/YYYY"),minDate:W()().add(1,"day"),validate:[L.mw],placeholder:"Preferred Date",onlyWee
1319kDays:!0,excludeDates:y.wn})}),(0,a.jsx)(d.A.Column,{computer:1,tablet:16,mobile:16}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:m,name:"scheduled_slot",type:"text",component:Z.A,placeholder:"Select Slot",validate:[L.mw],className:"theme-dropdown",staticValues:yt})}),(0,a.jsx)(d.A.Column,{computer:1,tablet:16,mobile:16})]})})})}),(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Save and continue"})]})]})})})]})})}),jt=(0,c.Ng)(function(e){const t=(0,ie.A)("scheduleInterview"),{rootReducer:{userFlowReducer:{screens:i,currentScreen:n,timeline:o},scheduleInterviewReducer:{interviewAddr:a,scheduledInterviewDetails:s},userSessionReducer:{user_session:r}}}=e;return{screens:i,currentScreen:n,timeline:o,slots:void 0,interviewAddr:a,scheduledInterviewDetails:s,scheduled_slot:t(e,"scheduled_slot"),user_session:r}},{changeScreen:h.Xh,getUserAddress:qe.GA,submitScheduleInterview:qe.rE,updateScheduleInterview:qe.ot,activateLoader:j.LI,disableLoader:j.MV})(gt);var At=i(79514),Nt=i(31511);const wt=(0,o.lazy)(()=>i.e(3479).then(()=>i(63479))),St=(0,o.lazy)(()=>i.e(2548).then(()=>i(62548))),Ct=(0,o.lazy)(()=>Promise.resolve().then(()=>i(50779)));class Dt extends o.Component{render(){const{country_code:e,isNewOnboardingEnabledUser:t,featureState:{toggleFeature:i},userStateInfo:n}=this.props,o=(0,y.V2)(e)&&t;return(0,a.jsx)("div",{children:i&&null!==n&&void 0!==n&&n.remitterDetails?(0,a.jsx)(St,{}):!i&&o?(0,a.jsx)(Ct,{}):null!==n&&void 0!==n&&n.remitterDetails?(0,a.jsx)(wt,{}):null})}}const Tt=(0,c.Ng)(function(e){const{rootReducer:{userSessionReducer:{user_session:{country_code:t}},newUserFlowReducer:{new_onboarding_enabled_users:i},userDataReducer:{userStateInfo:n}}}=e;return{country_code:t,isNewOnboardingEnabledUser:i,userStateInfo:n}},{})(Dt);var Et=i(52996),It=i(16382),Rt=i(61211),kt=i(30962);const Ot=e=>{let{beneName:t,accountNumber:i,bankName:n,remitterCountryCode:o}=e;return(0,a.jsxs)("div",{className:"edit-txn-modal-info-container",children:[(0,a.jsxs)("div",{className:"edit-txn-modal-info-details",children:[(0,a.jsx)("div",{className:"bank-details-title detail-title",children:"To recepient"}),(0,a.jsx)("div",{className:"bank-details-title detail-value",children:t})]}),(0,a.jsxs)("div",{className:"edit-txn-modal-info-details",children:[(0,a.jsx)("div",{className:"bank-details-title detail-title",children:"SG"===o?"Account number/card number":"Account number"}),(0,a.jsx)("div",{className:"bank-details-title detail-value",children:i})]}),(0,a.jsxs)("div",{className:"edit-txn-modal-info-details",children:[(0,a.jsx)("div",{className:"bank-details-title detail-title",children:"Bank name"}),(0,a.jsx)("div",{className:"bank-details-title detail-value",children:n})]})]})};i(62230);var Lt=i(228);class Ft extends o.Component{constructor(e){super(e),this.onReasonForTransferChange=async e=>{let{text:t,trade_type_code:i,reason_for_transfer:o}=e;await this.setState({reason_for_transfer_text:t,reason_for_transfer_text_trade_code:i,reason_for_transfer:o,invoice_number:null,invoice_date:null}),this.props.setTransferTextTradeCode(this.state.reason_for_transfer_text_trade_code);(0,Lt.A)(this.props.reasonForTransfersVals,this.props.reason_for_transfer,this.props.selected_destination_currency)||(this.props.dispatch((0,D.Zg)(n.VN8,"invoice_number","")),this.props.dispatch((0,D.Zg)(n.VN8,"invoice_date","")))},this.onDefaultTransactionLoad=e=>{this.props.sourceAmtToEdit&&(e.default_source_amount=this.props.sourceAmtToEdit),this.props.selected_destination_currency&&(e.default_destination_currency=this.props.selected_destination_currency),this.props.coupon_code&&(e.coupon_code=this.props.coupon_code),this.props.destinationAmountToEdit&&(e.default_destination_amount=this.props.destinationAmountToEdit);let{coupon_code:t}=e,{dispatch:i}=this.props;return t&&(this.promoCouponCode=t,(0,y.w2)(i,D.Zg,n.VN8,{coupon_code:t})),e},this.componentDidMount=()=>{const{beneficiaryDetails:{beneficiaryDataToBeShown:{reason:e,notes:t},payload:{coupon_code:i,coupon_amount:o}}
1319,reasonForTransferToEdit:a,reason_for_transfer_text_trade_code:s,reason_for_transfer:r,invoiceNumberToEdit:l,invoiceDateToEdit:d}=this.props;let c=i&&null!==o&&o>=0;this.props.dispatch((0,D.Zg)(n.VN8,"reason_for_transfer",a)),this.props.dispatch((0,D.Zg)(n.VN8,"coupon_code",i)),this.props.dispatch((0,D.Zg)(n.VN8,"coupon_amount",o)),this.props.dispatch((0,D.Zg)(n.VN8,"invoice_number",l)),this.props.dispatch((0,D.Zg)(n.VN8,"invoice_date",d)),this.setState({noteValue:t,whichPromotionApplied:c?n.rxA:null,promotionApplied:c,invoice_number:l,invoice_date:d}),this.onReasonForTransferChange({text:e,trade_type_code:s,reason_for_transfer:r})},this.onEditSubmit=async e=>{if(this.state.currencyConverterError||this.state.noteError||this.state.shouldSubmitDisabled)return;let t=e,i=this.state.reason_for_transfer_text;await this.props.setSubmitEditData({editSubmitData:{...t,instarem_bank_account_id:this.props.beneficiaryDetails.payload.instarem_bank_account_id},edited_reason_for_transfer_text:i,notes:this.state.noteValue,invoice_number:this.state.invoice_number,invoice_date:this.state.invoice_date}),this.props.onClose(!0)},this.onSubmitUpdate=()=>{this.props.onClose(!0)},this.setTransactionError=e=>this.setState({currencyConverterError:e}),this.mergeErrors=(e,t)=>{let i={...e||{}};return t&&t.gross_source_amount&&(i.gross_source_amount=t.gross_source_amount),t&&t.destination_amount&&(i.destination_amount=t.destination_amount),i},this.onNoteChange=e=>{const{value:t}=e.target;let i=(0,L.tV)(t)||(0,L.xN)(t);this.setState({noteValue:t,noteError:i})},this.cancelEditTxn=e=>{const{goodsServiceFromVal:t,formName:i,onClose:o,dispatch:a}=this.props;e.preventDefault(),o(!1);const s=t[i]&&Object.keys(t[i]),r=["amount","trade_order_id","trade_time","trade_currency","trade_amount","trade_name","goods_carrier","trade_count","service_time","service_detail"];s&&s.forEach(e=>{r.forEach(o=>{o===e?a((0,D.Zg)(n.P6z,`${i}.${o}`,t[i][o])):(a((0,D.Zg)(n.P6z,`${i}.${o}`,"")),a((0,D.Bk)(n.P6z,`${i}.${o}`)))})}),!s&&r.map(e=>(a((0,D.Zg)(n.P6z,`${i}.${e}`,"")),a((0,D.Bk)(n.P6z,`${i}.${e}`)),e))},this.validateCoupon=(e,t,i)=>e&&i.coupon_code&&null===i.coupon_amount?"Please apply the coupon code":null,this.toggleCouponCode=async e=>{if(!this.props.coupon_code)return;let{coupon_code:t,dispatch:i,recipientList:o,getAllformVal:a,index:s}=this.props,{promotionApplied:r}=this.state,l={coupon_code:r?null:t,coupon_amount:null};if(!e){const e=o.map((e,t)=>t===s?{...e.payload,...a}:e.payload);let t=await this.props.validateCouponCode({transactions:e});t.data&&!t.data.success&&(l.coupon_code=null)}if(r=!!l.coupon_code,await new Promise(t=>this.setState({promotionApplied:r,whichPromotionApplied:e?null:n.rxA},t)),this.promoCouponCode&&!r&&(this.promoCouponCode=null),await(0,y.w2)(i,D.Zg,n.VN8,l),this.refresh){await new Promise(this.refresh)||(await new Promise(e=>this.setState({promotionApplied:!1},e)),(0,y.w2)(i,D.Zg,n.VN8,{coupon_code:null,coupon_device:""}))}},this.state={currencyConverterError:null,promotionApplied:e.promotionApplied||!1,instapoints_balance:null,disable_save_and_continue:!1,reason_for_transfer_text:"",noteValue:"",shouldSubmitDisabled:!1,whichPromotionApplied:e.whichPromotionApplied||null,reason_for_transfer_text_trade_code:null,invoice_number:null,invoice_date:null}}componentWillUnmount(){this.props.clearMultiTxnCurrentBene()}render(){let{beneficiaryDetails:{beneficiaryDataToBeShown:{name:e,bank_details:{account_no:t,bank:i},card_details:{card_no:o}}},gross_source_amount:s,source_currency:r,destination_amount:l,destination_currency:d,dispatch:c,coupon_code:u,coupon_amount:m,redeemed_instapoints:h,redeemed_instapoints_amount:_,instarem_bank_account_id:x,formSyncErrors:v,user_session:f,transaction_fee_percent:y,transaction_fee_amount:b,instarem_fx_rate:g,disable_save_and_continue:j,reason_for_transfer:A=this.props.reasonForTransferToEdit,reasonForTransfersVals:N,handleSubmit:w,isNoteEdit:S,isAddCardCase:C,current_reason_for_transfer:D=this.props.reason_for_transfer}=this.props,{shouldSubmitDisabled:T,currencyConverterError:E,noteValue:I,noteError:R}=this.state,k=u&&null!==m&&m>=0;const O=(0,Lt.A)(N,D,d);return(0,a.jsx)("form",{id:n.VN8,onSubmit:w(this.onEditSubmit),children:(0,a.jsxs)("div",{className:"edit-transaction-wrapper "+(C?"transform-content":""),children:[(0,a.jsxs)("div",{className:"recipient-data",children:["SG"!==this.props.user_status.country_code&&(0,a.jsx)("span",{className:"edit-transaction-header-title",children:"Edit transaction"}),(0,a.jsx)(Ot,{beneName:e,accountNumber:o||t,bankName:i,remitterCountryCode:this.props.user_status.country_code})]}),(0,a.jsx)("span",{className:"horizontal-line"}),(0,a.jsxs)("div",{className:"edit-txn-currency-converter-container",children:[(0,a.jsx)(p.Sb,{refreshCallback:e=>this.refresh=e,reduxFormName:n.VN8,onErrorChange:this.setTransactionError,dispatch:c,source_currency:r,gross_source_amount:s,destination_currency:d,destination_amount:l,coupon_code:u,coupon_amount:m,redeemed_instapoints:h,redeemed_instapoints_amount:_,instarem_bank_account_id:x,whichPromotionApplied:this.state.whichPromotionApplied,applyPromotion:this.state.promotionApplied,onDefaultTransactionLoad:this.onDefaultTransactionLoad,children:e=>(e.shouldSubmitDisabled!==T&&this.setState({shouldSubmitDisabled:e.shouldSubmitDisabled}),(0,a.jsx)(p.pO,{...e,user_session:f,disable_save_and_continue:j,source_currency:r,placeholder:!0,showDefaultPlaceholder:!0,destination_currency:d,transaction_fee_percent:y,transaction_fee_amount:b,instarem_fx_rate:g,errors:this.mergeErrors(v,E),showDisabledSourceDropdown:!0,showDisabledDestinationDropdown:!0,viewFor:"editTransaction"}))}),(0,a.jsx)("div",{className:"edit_transaction_coupon_field reason-for-transfer dropdown-input col-blue",style:{width:"283px"},children:(0,a.jsx)(te.A,{bindToThisObject:A,name:"reason_for_transfer",type:"text",component:p.jF,onDropdownChange:this.onReasonForTransferChange,placeholder:"Reason for transfer",validate:[L.mw],className:"input form-flow coupon_block",staticValues:N,isUpward:!0})})]}),(0,a.jsxs)("div",{className:"edit_transaction_coupon_field",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"reason-for-transfer dropdown-input input-text multiple_transaction_coupon coupon_edit",children:[(0,a.jsx)(te.A,{name:"coupon_code",type:"text",isCorporateCoupon:!0,component:p.A_,validate:[this.validateCoupon],placeholder:"Enter coupon",className:"input form-flow coupon_block",disabled:k}),(0,a.jsx)("button",{className:"coupon_icon "+(k?"coupon_applied":""),type:"button",id:"btn-redeem",onClick:()=>this.toggleCouponCode(k),children:k?"X":">"})]}
1319),k&&(0,a.jsx)("div",{className:"coupon_success",children:`Congratulations! $${m} off`})]}),(0,a.jsxs)("div",{className:"transaction-note col-blue note_edit",children:[(0,a.jsx)("input",{placeholder:"Add a note",className:"add-note-input add-note-modal-edit",type:"text",name:"notes",onChange:this.onNoteChange,value:I,autoFocus:S}),(0,a.jsx)("span",{className:"add-note-error",children:R})]})]}),O&&(0,a.jsxs)("div",{className:"edit_transaction_coupon_field",children:[(0,a.jsx)("div",{className:"invoice-number-wrapper",children:(0,a.jsx)("div",{className:"input-text invoice-number",children:(0,a.jsx)(te.A,{bindToThisObject:this.state.invoice_number,name:"invoice_number",type:"text",component:p.A_,placeholder:"Invoice number",validate:[L.mw,L.kk,L.NB,L.G7],className:"input form-flow coupon_block"})})}),(0,a.jsx)("div",{className:"invoice-date-wrapper",children:(0,a.jsx)("div",{className:"input-text invoice-date",children:(0,a.jsx)(te.A,{bindToThisObject:this.state.invoice_date,name:"invoice_date",type:"text",className:"input form-flow",component:p.VC,validate:[L.mw],parse:e=>e&&W()(e).format("DD/MM/YYYY"),maxDate:W()(),placeholder:"Invoice Date (DD/MM/YYYY)",disabled:this.state.disableAllFields})})})]}),(0,a.jsxs)("div",{className:"buttons-wrapper",children:[(0,a.jsx)("button",{id:"cancel-btn",className:"cancel-btn",onClick:this.cancelEditTxn,children:"Cancel"}),(0,a.jsx)(p.mU,{type:"submit",text:"Update",disabled:T,id:"update-btn",width:140,height:40})]})]})})}}const Mt=(0,u.A)({form:n.VN8})(Ft),Pt=(0,c.Ng)(function(e){let t=(0,ne.A)(n.VN8)(e),{rootReducer:{transactionReducer:{currencyCovertor:{is_destination_amount_last_changed:i},goodsServicesFormValForEdit:{goodsServiceFromVal:o,formName:a},multipleTransactions:{recipientList:s,totalYouPayAmount:r}},userFlowReducer:{screens:l,currentScreen:d,timeline:c},userStatusReducer:u,userSessionReducer:{user_session:p},userStatusReducer:{account_type:h},uiTriggerState:{device:_}}}=e;const x=(0,ie.A)(n.VN8),v=(0,m.A)(n.VN8)(e);let{set_transaction_later:f,destination_currency:y,gross_source_amount:b,instarem_bank_account_id:g,instarem_fx_rate:j,transaction_fee_amount:A,coupon_amount:N,redeemed_instapoints:w,redeemed_instapoints_amount:S,net_source_amount:C,destination_amount:D,net_tax_amount:T,coupon_code:E,source_of_funds:I,transaction_fee_percent:R,reason_for_transfer:k,invoice_number:O,invoice_date:L,whichPromotionApplied:F,promotionApplied:M}=x(e,"set_transaction_later","source_currency","destination_currency","gross_source_amount","instarem_bank_account_id","instarem_fx_rate","transaction_fee_amount","coupon_amount","redeemed_instapoints","redeemed_instapoints_amount","net_source_amount","destination_amount","net_tax_amount","coupon_code","source_of_funds","transaction_fee_percent","reason_for_transfer","whichPromotionApplied","promotionApplied","invoice_number","invoice_date");return{set_transaction_later:f,destination_currency:y,gross_source_amount:b,instarem_bank_account_id:g,instarem_fx_rate:j,transaction_fee_amount:A,coupon_amount:N,redeemed_instapoints:w,redeemed_instapoints_amount:S,net_source_amount:C,destination_amount:D,currentScreen:d,net_tax_amount:T,coupon_code:E,source_of_funds:I,is_destination_amount_last_changed:i,screens:l,timeline:c,user_status:u,user_session:p,formSyncErrors:t,reason_for_transfer:k,account_type:h,device:_,transaction_fee_percent:R,totalYouPayAmount:r,getAllformVal:v,recipientList:s,goodsServiceFromVal:o,formName:a,whichPromotionApplied:F,promotionApplied:M,invoice_number:O,invoice_date:L}},{loadBeneficiaryByCurrency:v.a0,loadReasonForTransfer:v.XK,editTransaction:kt.Xk,validateCouponCode:kt.mE})(Mt);var $t=i(92180),Ut=i(91483),Vt=i(10395);var Bt=i(99113),Yt=i(46289);class Ht extends o.Component{constructor(e){var t;super(e),t=this,this.initPlaidAccounts=async()=>{var e;let{getPlaidAccounts:t}=this.props;let i=await t("?redirect_to=MANAGE_PAYMENT");if(null!==i&&void 0!==i&&null!==(e=i.data)&&void 0!==e&&e.data){let{accountData:e,publicKey:t,environment:n,linkToken:o}=i.data.data;e||(e=[]);const a=e.map(e=>e);return this.setState({...this.state,data:a,plaid_publicKey:t,plaid_environment:n,plaid_accounts:a,linkToken:o}),{accountData:e,publicKey:t,environment:n}}return null},this.existingPlaidAccSelect=function(e){let i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!e||0===Object.keys(e).length){t.setState({plaid_acc_number:""});const e={remitter_bank_account_number:null,remitter_bank_info:null,remitter_bank_account_id:null};return i&&(0,y.w2)(t.props.dispatch,D.Zg,n.fEo,t.selectedPlaidAccount),e}t.setState({selectPaymentMethod:e}),t.props.dispatch((0,D.Zg)(n.fEo,"remitter_bank_account_id",null===e||void 0===e?void 0:e.accountId)),t.props.dispatch((0,D.Zg)(n.fEo,"remitter_bank_info",e)),t.props.dispatch((0,D.Zg)(n.fEo,"remitter_bank_account_number",null===e||void 0===e?void 0:e.accountNumber))},this.getFraudConsentCMSData=async e=>{var t,i,o;const a=await(0,v.fA)("componentMessageCentreItem","FRAUD_TRANSACTION_CONSENT"),s=n.EU.includes(e)?"EU":e,r=(null===a||void 0===a||null===(t=a.labels)||void 0===t||null===(i=t.value)||void 0===i?void 0:i[s])||Bt.A[s],l=(null===a||void 0===a||null===(o=a.countryList)||void 0===o?void 0:o.value)||Bt.g;this.setState({fraudConsentCMSData:{countryList:l,labels:r}})},this.processPaymentMethods=(e,t,i)=>(e&&e.data&&e.data.success?e.data.data:[]).map(e=>{let{limit_config:n}=e;if(n){let{inward:{min:n,max:o,validation_error:a}}=e.limit_config[t.toLowerCase()],s=i<n||i>=o,r={...e,disabled:s};return s&&(r.validation_error=a),r}return{...e,disabled:!1}}),this.renderPlaidAccounts=()=>{let{plaid_environment:e,plaid_accounts:t}=this.state,{remitter_bank_account_id:i}=this.props;return(0,a.jsxs)("div",{className:"section plaid-accounts",children:[(0,a.jsx)("div",{className:"section-title",children:"Existing Accounts"}),t&&t.map(t=>{let{id:n,nameVerified:o,instituteName:s,accountId:r,accountNumber:l}=t;return"sandbox"===e||o?(0,a.jsxs)("div",{onClick:()=>{this.existingPlaidAccSelect(t)},className:(0,y.t4)("plaid-account",r===i&&"active"),children:[(0,a.jsx)("img",{src:(0,Vt.U)(s),alt:s}),(0,a.jsx)("div",{className:"value",children:s}),(0,a.jsx)("div",{className:"value",children:l})]},n):null}),(0,a.jsxs)("div",{className:"plaid-account add",onClick:()=>{this.callPlaidAuth(this.props)},children:[(0,a.jsx)("img",{src:A.LIY,alt:"add plaid account",className:"add-icon"}),(0,a.jsx)("div",{className:"value",children:"Add account"})]},"add-account")]},"plaid-sec")},this.renderIndiaRemitterAccount=()=>(0,a.jsxs)("div",{className:"section remitter-bank",children:[(0,a.jsx)(te.A,{name:"routing_code_value_1",type:"text",className:"input form-flow",component:p.A_,normalize:(0,re.YR)(50),validate:[L.mw],placeholder:"IFSC"}),(0,a.jsx)(te.A,{name:"remitter_bank_account_number",type:"text",className:"input form-flow",component:p.A_,normalize:(0,re.YR)(50),validate:[L.mw],placeholder:"Bank account number"}),(0,a.jsx)("div",{className:"note",children:"Note - Please note that we only accept payments from the bank account of the registered user. In case of third party payment, the funds will be refunded back to the source account."})]},"india-sec"),this.commonNoteOnMethods=()=>(0,a.jsx)("div",{className:"section common-note",children:(0,a.jsxs)("p",{className:"note",children:["Please note that originating bank account to fund this transfer must be in your name."," ",(0,a.jsxs)("b",{className:"bold-text",children:[" ","If you initiate the transfer from third party accounts, including your relatives or family members, it will result in cancellation of the transaction."]})]})}),this.commonNoteOnPayNow=()=>(0,a.jsx)("div",{className:"section common-note",children:(0,a.jsx)("p",{className:"note",children:"Before proceeding, please ensure that your bank is enabled for PayNow. It's faster than Bank transfer."})}),this.commonNoteOnDebit=()=>(0,a.jsx)("div",{className:"section common-note",children:(0,a.jsx)("p",{className:"note",children:"Please note that originating Debit card to fund this transfer must be in your name. If you initiate the transfer from a third party Debit card, including your relatives or family members, it will result in cancellation of the transaction. Furthermore, we do not accept transfers from Credit cards and Prepaid cards."})}),this.commonNoteOnPayID=()=>(0,a.jsx)("div",{className:"section common-note",children:(0,a.jsx)("p",{className:"note",children:"Instant 24*7 funding with PayID. We will share your unique PayID email with you, once you authorise this transfer. Login to your bank account, go to PayID module and make a payment to the given email id."})}),this.selectPaymentMethod=e=>()=>{var t,i;if(null===e||e.disabled)return;let{dispatch:o,user_session:{country_code:a},isKRWAsDestination:s}=this.props,r=[];if("PAYID_AUD_AU"===e.code?r.push(this.commonNoteOnPayID):"PayNow"===e.bank_name&&(null===(t=e.display_name)||void 0===t?void 0:t.toUpperCase())!==n.ULQ||!n.y_c.includes(a)&&"UK"!==a||(null===(i=e.display_name)||void 0===i?void 0:i.toUpperCase())!==n.ULQ?r.push(this.commonNoteOnMethods):r.push(this.commonNoteOnDebit),r.push(this.renderSourceOfFunds),(0,y.w2)(o,D.Zg,n.fEo,{remitter_bank_id:null,remitter_bank_info:null,remitter_bank_account_id:null,remitter_bank_account_number:null}),e.is_virtual_account)r.push(this.renderBankTransferSection);else switch(a){case"US":r.push(this.renderPlaidAccounts);break;case"IN":r.push(this.renderIndiaRemitterAccount);break;default:r.push(this.renderBankTransferSection)}s&&r.push(this.renderKRWRemitterAccount),this.setState({selectedMethod:e.instarem_bank_account_id,paymentMethod_code:e.code,section:r}),this.onValueChange("transfer_type",e.display_name)},this.onValueChange=(e,t)=>
1319this.data[e]=t,this.renderKRWRemitterAccount=()=>(0,a.jsx)("div",{className:"section remitter-bank",children:(0,a.jsx)(te.A,{name:"remitter_bank_account_number",type:"text",className:"input form-flow modal-field",component:p.A_,normalize:(0,re.YR)(50),validate:[L.mw],placeholder:"Bank account number"})},"krw-section"),this.renderSourceOfFunds=()=>{let{source_of_funds:e,account_type:t}=this.props;return(0,a.jsx)("div",{className:"section remitter-bank",children:(0,a.jsx)(te.A,{bindToThisObject:e,name:"source_of_funds",type:"text",component:p.jF,placeholder:"Source of funds",validate:[L.mw],className:"dropdown choose-bank",url:`${f.H$}/instarem-objects/dropdown?type=SOURCE_OF_FUNDS&account_type=${t}`})},"source-of-funds-sec")},this.renderBankTransferSection=e=>{let{user_session:{country_code:t},remitter_bank_id:i}=this.props,{instarem_accounts:n,selectedMethod:o}=this.state,s=!1;return n.find(function(e){return e.instarem_bank_account_id===o&&!1===e.is_bank_dropdown_required})&&(s=!0),!s&&(0,a.jsxs)("div",{className:"section bank-transfer",children:[(0,a.jsx)(te.A,{bindToThisObject:i,name:"remitter_bank_id",type:"text",component:p.jF,placeholder:"Choose your bank",isUpward:!0,validate:[L.mw],className:"dropdown choose-bank",url:(0,y.Gm)(`${f.H$}/banks/dropdown`,{country_code:t})}),(0,a.jsx)("div",{className:"note",children:"Note - Please provide your transaction reference number while making an internet banking transfer to us. Your transaction reference number will be available on the acknowledgement screen if your profile has been approved."})]},e)},this.showWarning=(e,t)=>(0,a.jsxs)("div",{className:"logo-modal",children:[(0,a.jsx)("img",{src:A.Qg9,alt:"instarem",className:"logo"}),(0,a.jsx)("img",{src:A.FmT,alt:"close",className:"close",onClick:()=>t(!1)}),(0,a.jsx)("div",{className:"message",children:e}),(0,a.jsx)("button",{id:"submit",className:"blue-round-submit button-background",onClick:()=>t(!0),children:"Ok"})]}),this.submitPaymentMethod=async function(e){var i,n,o,s;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],{multipleTxnPaymentMethodSubmit:l,batch_number:d,disableLoader:c,user_session:{country_code:u}}=t.props,m=r;if(!r&&null!==(i=t.state.fraudConsentCMSData)&&void 0!==i&&null!==(n=i.countryList)&&void 0!==n&&n.includes(u)&&(m=await p.wh.builder(e=>(0,a.jsx)(Yt.A,{onClose:e,cmsData:t.state.fraudConsentCMSData}),"insta-modal center-modal",!0),!m))return;e={...e,fraud_check_consent:m},t.props.activateLoader();let h,{selectedMethod:_}=t.state;if("CFSB_USD_US"===(null===(o=t.state)||void 0===o?void 0:o.paymentMethod_code)&&null===(null===(s=e)||void 0===s?void 0:s.remitter_bank_info)){c();(await p.wh.builder(e=>t.showWarning("Please select a valid payment method.",e),"plaid-item-login-required-modal insta-modal",!0))()}else{var x,v,f,y,b,g;if(h=await l(e,d,_),null!==(x=h)&&void 0!==x&&null!==(v=x.data)&&void 0!==v&&null!==(f=v.data)&&void 0!==f&&f.error&&400===(null===(y=h)||void 0===y||null===(b=y.data)||void 0===b||null===(g=b.data)||void 0===g?void 0:g.status_code)){c();return void(await p.wh.builder(e=>t.showWarning(h.data.data.error_message,e),"plaid-item-re-login-required-modal insta-modal",!0)?t.callPlaidAuth(t.props):t.props.onClose(!1))}}if(c(),h&&h.data&&h.data.success){let{data:i}=h.data;if(i&&Array.isArray(i)&&i.find(e=>e.is_payment_method_updated)){return c(),await p.wh.builder(e=>(0,a.jsx)(Ut.A,{paymentMethodChangeData:i,isPGChange:!0,onClose:e}),"fx-rate-modal")?(t.props.onClose(!0),void await t.submitPaymentMethod(e,!0)):void 0}t.props.onClose(!0)}else c(),t.props.onClose(!1)},this.callPlaidAuth=(e,t)=>{const{plaid_environment:i,plaid_publicKey:o,linkToken:a}=this.state,{disableLoader:s}=this.props;let r={apiVersion:n.f36,clientName:n.eU2,env:i,product:[n.R3N],key:o,token:a};t&&(r.token=t);try{localStorage.setItem(n.n8y,JSON.stringify({plaid_environment:i,plaid_publicKey:o,linkToken:a}));const e=window.Plaid.create({...r,onExit:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,kt.Ns)({request:r,response:{err:e,metadata:t}}),localStorage.removeItem(n.n8y),s()},onSuccess:async(e,i)=>{try{t||await this.authenticatePlaidAcc(e,i,{type:"auth"}),t&&(await this.authenticatePlaidAcc(e,i,{type:"re_auth"}),localStorage.removeItem(n.n8y))}catch(o){(0,g.H4)(o),s(),localStorage.removeItem(n.n8y)}}});e.open()}catch(l){s(),(0,g.H4)(l)}},this.state={invoiceArray:[],invoiceRequired:!1,plaid_accounts:null,plaid_acc_number:null,enable_existing_section:!1,beneObj:null,beneList:[],bank_id:null,recipients:[],selectedRecipient:null,instarem_accounts:[],section:[],selectedMethod:null,filterOptions:!1,fraudConsentCMSData:{}},this.formID="form-transfer-route-selection",this.data={}}
1319async componentDidMount(){try{let e,{transactionDetails:t,recipientList:i,user_session:{country_code:o,account_type:a},paymentMethodPrevApi:s,fixedSourceCurrency:r}=this.props;await this.initPlaidAccounts(),await this.getFraudConsentCMSData(o),t&&t.instarem_bank_account_id?e=t.instarem_bank_account_id:i&&i.length>0&&(e=i[0].payload.instarem_bank_account_id);let l=this.processPaymentMethods(await s(r),a,t.net_source_amount),d=l.reduce((t,i)=>{let{instarem_bank_account_id:n,disabled:o}=i;return o||(t||(t=i),e&&e===n&&(t=i)),t},null);this.setState({instarem_accounts:l}),"US"!==o||Array.from(document.scripts||[]).find(e=>e==n.$$Q)||(0,y.PQ)(n.$$Q),this.selectPaymentMethod(d)(),this.props.disableLoader()}catch(e){console.error(e)}}async authenticatePlaidAcc(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{account_type:o,authenticatePlaid:s,handleError:r,dispatch:l,activateLoader:d,disableLoader:c}=this.props;try{var u;d();const r=await s({public_token:e,meta_data:t,type:i});if(null!==r&&void 0!==r&&null!==(u=r.data)&&void 0!==u&&u.data){c();const{nameVerified:e,error:t,token:i,error_message:s}=r.data.data;if(t){await p.wh.builder(e=>(0,a.jsxs)("div",{className:"logo-modal",children:[(0,a.jsx)("img",{src:A.Qg9,alt:"instarem",className:"logo"}),(0,a.jsx)("img",{src:A.FmT,alt:"close",className:"close",onClick:()=>e(!1)}),(0,a.jsx)("div",{className:"message",children:s}),(0,a.jsx)("button",{id:"submit",className:"blue-round-submit button-background",onClick:()=>e(!0),children:"Connect bank account"})]}),"plaid-item-login-required-modal insta-modal",!0)&&this.callPlaidAuth(i.public_token)}e||t||(o===n.a6V?await l((0,g.rG)({text:["We are unable to match your first and last name with your bank account record. Kindly add a different bank account."],type:"warning"})):l((0,g.rG)({text:["We are unable to match your Instarem account name with your bank account record. Kindly add a different bank or contact us at [email protected]."],type:"warning"}))),await this.initPlaidAccounts()}}catch(m){console.log(m),r(m)}c()}render(){let{instarem_accounts:e=[]}=this.state,{handleSubmit:t}=this.props,{section:i}=this.state;return(0,a.jsxs)("div",{className:"payment-method-modal-wrapper",children:[(0,a.jsxs)("form",{onSubmit:t(e=>this.submitPaymentMethod(e,!1)),className:"payment-method-modal-select",id:this.formID,onKeyUp:y.jN,onKeyPress:y.jN,children:[(0,a.jsx)("h3",{className:"payment-method-modal-title",children:"Please select the payment method before you proceed further"}),(0,a.jsx)("div",{className:"payment-methods",children:e.map(e=>{let{instarem_bank_account_id:t,icon_url:i,display_name:n,notes:o="Payment Method",validation_error:s,disabled:r}=e,{selectedMethod:l}=this.state;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{onClick:this.selectPaymentMethod(e),className:(0,y.t4)("payment-method",l===t&&"active",r&&"disabled"),children:[(0,a.jsxs)("div",{className:"payment-mehtod-head",children:[(0,a.jsx)("img",{src:(0,Vt.J)(i,l===t),alt:n,className:"method-icon"}),(0,a.jsx)("span",{className:"head",children:n})]}),(0,a.jsx)("div",{className:"note",children:s||o})]},t)})})}),i&&i.map(e=>e()),(0,a.jsx)("button",{type:"submit",className:"continue-btn",id:"continue-btn",children:"Continue"})]}),(0,a.jsxs)("div",{className:"close-icon",onClick:()=>this.props.onClose(!1),children:[(0,a.jsx)("span",{}),(0,a.jsx)("span",{})]})]})}}let zt=(0,u.A)({form:n.fEo,asyncValidate:async(e,t)=>{if("IN"!==e.country_code)return;let i={},n={routing_code_type_1:"IFSC",routing_code_value_1:e.routing_code_value_1,country_code:e.country_code},o=await t((0,v.CE)(n));return o&&o.institution_name?void 0:(i.routing_code_value_1="Invalid IFSC code",i)},asyncBlurFields:["routing_code_value_1"]});const Gt=(0,ie.A)(n.fEo);const qt=(0,c.Ng)(function(e){const{rootReducer:{userSessionReducer:{user_session:t},uiTriggerState:{device:i},transactionReducer:{transactionDetails:n,multipleTransactions:{recipientList:o}},userFlowReducer:{screens:a,currentScreen:s,timeline:r},userStatusReducer:{status:l,remitter_individual_first_name:d,remitter_individual_last_name:c,remitter_individual_middle_name:u,account_type:m}}}
1319=e,{beneficiary_id:p,remitter_bank_id:h,remitter_bank_account_number:_,routing_code_value_1:x,remitter_bank_account_id:v,is_resident_indian_account:f,source_of_funds:y}=Gt(e,"beneficiary_id","remitter_bank_id","remitter_bank_account_number","routing_code_value_1","remitter_bank_account_id","is_resident_indian_account","source_of_funds");return{beneficiary_id:p,user_session:t,screens:a,currentScreen:s,timeline:r,transactionDetails:n,remitter_bank_id:h,remitter_bank_account_number:_,routing_code_value_1:x,user_status:l,device:i,remitter_individual_first_name:d,remitter_individual_last_name:c,remitter_individual_middle_name:u,remitter_bank_account_id:v,account_type:m,is_resident_indian_account:f,recipientList:o,source_of_funds:y}},{paymentMethodPrevApi:_.Pu,multipleTxnPaymentMethodSubmit:_.bV,activateLoader:j.LI,disableLoader:j.MV,authenticatePlaid:kt.kK,getPlaidAccounts:kt.bs,showMessage:g.rG})(zt(Ht));var Kt=i(25342),Qt=i(70132);i(197);const Wt={...i(86682).g};var Xt=i(93357),Zt=i(21857);const Jt=(0,Qt.Ay)(Kt.default)` 1320 .active.selected.item { 1321 background: #3e4679 !important; 1322 } 1323 &.ui.active.modal { 1324 max-height: 695.4px; 1325 max-width: 642.8px; 1326 border-radius: 23.5px !important; 1327 border: solid 0.6px #979797; 1328 background-color: ${Xt.A.white}; 1329 1330 @media screen and (max-width: 400px) { 1331 width: 90%; 1332 min-height: 500px; 1333 overflow-y: scroll; 1334 } 1335 } 1336`;class ei extends o.Component{constructor(e){var t;super(e),t=this,this.componentDidMount=async()=>{let{loadBeneficiaryByCurrency:e,recipientList:t,dispatch:i}=this.props,o=await e(),a=!1;if(await this.props.getCorpConfig(),t&&t.length>0){a=!0;let e=t[0].payload.instarem_bank_account_id;e&&i((0,D.Zg)(n.ijd,"instarem_bank_account_id",e))}await this.setState({recipients:o,showDisabledSourceDropdown:a}),this.loadBene()},this.loadBene=async()=>{let{loadBeneficiaryByCurrency:e,source_currency:t,dispatch:i}=this.props;const o=await e(void 0,t);i((0,D.Zg)(n.ijd,"beneficiary_id",null)),this.setState({recipients:o})},this.toggleTransactionsModal=e=>{this.setState({showModal:!e})},this.mergeErrors=(e,t,i)=>{i&&(t={...t,...i});let n={...e||{}};return t&&t.gross_source_amount&&(n.gross_source_amount=t.gross_source_amount),t&&t.destination_amount&&(n.destination_amount=t.destination_amount),n},this.onDefaultTransactionLoad=e=>{let{coupon_code:t}=e,{dispatch:i}=this.props;return t&&(this.promoCouponCode=t,(0,y.w2)(i,D.Zg,n.ijd,{coupon_code:t})),e},this.onCurrencyConverterMount=async e=>{let{transactionDetails:t}=this.props;t&&0!==Object.keys(t).length&&t&&t.temp_transaction_id&&await this.restoreTransaction(t,e)},this.restoreTransaction=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1?arguments[1]:void 0;if(!e)return!1;let{source_amount:n,gross_source_amount:o,source_currency:a,destination_currency:s,instarem_bank_account_id:r}=e,l={source_amount:n,source_currency:a,destination_currency:s};return l.source_amount||(l.source_amount=o),!(!a||!s)&&(await i(l),await t.props.initialize((0,y.PJ)(Wt,{...e,instarem_bank_account_id:r})),!0)},this.onBeneficiaryChange=e=>{let{recipients:t}=this.state,i=t.filter(t=>t.key===e.key);if(i&&(i=i[0]),i&&(this.props.dispatch((0,D.Zg)("multipleTransactions","bank_account_country",i.bank_account_country)),this.props.dispatch((0,D.Zg)("multipleTransactions","country_code",i.country_code)),this.props.dispatch((0,D.Zg)("multipleTransactions","currency_code",i.currency_code)),this.props.dispatch((0,D.Zg)("multipleTransactions","account_type",i.account_type)),this.props.dispatch((0,D.Zg)("FORMNAME_MULTIPLE_TRANSACTION_CARD_DETAILS","currency_code",i.currency_code)),this.props.dispatch((0,D.Zg)("FORMNAME_MULTIPLE_TRANSACTION_CARD_DETAILS","account_type",i.account_type)),this.props.dispatch((0,D.Zg)("FORMNAME_MULTIPLE_TRANSACTION_CARD_DETAILS","country_code",i.country_code))),this.props.dispatch((0,D.Zg)("multipleTransactions","reason_for_transfer","")),this.props.dispatch((0,D.Zg)("multipleTransactions","invoice_number","")),this.props.dispatch((0,D.Zg)("multipleTransactions","invoice_date","")),t&&this.initialReasonForTransfers){(0,y.w2)(this.props.dispatch,D.Zg,n.ijd,{destination_currency:e.currency_code});let i=t.find(t=>t.key===e.key);this.setState({showDisabledDestinationDropdown:!0,selectedBeneDetails:i},async()=>{let{user_session:{account_type:e},loadReasonForTransfer:t}=this.props;const n=await t({account_type:e,beneficiary_id:i.value});this.setState({reasonForTransfers:n})})}},this.renderRecipients=e=>{const t=Qt.Ay.p` 1337 color: ${Xt.A.black}; 1338 ${e=>e.style}; 1339 `,i=Qt.Ay.span` 1340 color: ${Xt.A.textLightGrey}; 1341 font-size: 12px; 1342 ${e=>e.style}; 1343 `,n=(0,Qt.Ay)(i)` 1344 color: ${Xt.A.black}; 1345 margin-left: 5px; 1346 ${e=>e.style}; 1347 `,s=Qt.Ay.div` 1348 display: flex; 1349 flex-direction: row; 1350 justify-content: flex-start; 1351 align-items: center; 1352 ${e=>e.style}; 1353 `;return e||(e=[]),e.map(e=>
1353{let{beneficiary_name:r,key:l,value:d,currency_code:c,routing_config_type:u,bank_account_number:m,card_number:p,card_expiry_date:h}=e;return{key:l,value:d,text:r,currency_code:c,content:(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(t,{className:"title",children:r}),(0,a.jsx)("p",{children:(0,a.jsxs)(s,{children:[(0,a.jsxs)(s,{children:[(0,a.jsx)(i,{children:"BANK"===u?"Bank Acnt No.:":"Last 4 Digits of Card Number:"}),(0,a.jsx)(n,{children:"BANK"===u?m:p})]}),"DEBIT_CARD"===u&&(0,a.jsxs)(s,{style:{marginLeft:5},children:[(0,a.jsx)(i,{children:"Expiry Date"}),(0,a.jsx)(n,{children:h})]})]})})]})}})},this.setTransactionError=e=>this.setState({currencyConverterError:e}),this.disable_save_and_continue=async e=>{await this.setState({disable_save_and_continue:e})},this.onReasonForTransferChange=async e=>{const t={reason_for_transfer_text:e.text,reason_for_transfer_text_trade_code:e.trade_type_code,reason_for_transfer_code:(null===e||void 0===e?void 0:e.code)||""};e.trade_type_code&&(t.trade_type=e.trade_type_code),await this.setState(t)},this.setTransferTextTradeCode=async e=>{await this.setState({reason_for_transfer_text_trade_code:e})},this.validateCoupon=(e,t,i)=>e&&i.coupon_code&&null===i.coupon_amount?"Please apply the coupon code":null,this.onAddToPaySubmit=async e=>{if(this.state.currencyConverterError||this.state.shouldSubmitDisabled)return;let{selectedBeneDetails:{account_type:t,currency_code:i},selectedBeneDetails:o,reason_for_transfer_text:a,reason_for_transfer_text_trade_code:s,showDisabledSourceDropdown:r,promotionApplied:l}=this.state,{gross_source_amount:d,source_currency:c,destination_amount:u,destination_currency:m,net_source_amount:p,coupon_code:h,coupon_amount:_}=e,{totalYouPayAmount:x,dispatch:v,multiTxnRecipientList:f,recipientList:y,is_destination_amount_last_changed:b,getAllformVal:j,corporateConfig:A}=this.props;if(A&&A.batch_transaction_max_limit&&y&&y.length===A.batch_transaction_max_limit)return void v((0,g.rG)({text:[`Maximum ${A.batch_transaction_max_limit} payments can be added`],type:"info"}));if(this.fixedSourceCurrency){if(this.fixedSourceCurrency!==c)return void v((0,g.rG)({text:["Source Currency should be same for one batch of multiple transaction"],type:"info"}))}else this.fixedSourceCurrency=c;x?x+=p:x=p;const N={...j};let w=(0,$t.bv)({...N,is_source_oriented:!b},{...o,gross_source_amount:d,source_currency:c,destination_amount:u,destination_currency:m,net_source_amount:p,reason_for_transfer_text:a,reason_for_transfer_text_trade_code:s});y=(s===n.lCm||s===n.YVr)&&"CNY"===i&&t===n.a6V?[...y,{...w,confirm:!1}]:[...y,{...w,confirm:void 0}],v(f({recipientList:y,totalYouPayAmount:x}));const S=h&&null!==_&&_>=0;this.toggleCouponCode(S),r||this.setState({showDisabledSourceDropdown:!0}),l&&this.setState({promotionApplied:!1});const{recipientList:C}=this.props;C.forEach(e=>{const{reason_for_transfer_text_trade_code:t,currency_code:i,bene_account_type:o}=e.additionalDataForRL,a=(t===n.lCm||t===n.YVr)&&"CNY"===i&&o===n.a6V;a&&e.confirm?this.setState({toProceed:!0,isProceedButtonDisabled:!1}
1353):a&&!e.confirm?this.setState({toProceed:!1}):this.setState({toProceed:!0,isProceedButtonDisabled:!1})}),y&&A&&A.batch_transaction_min_limit&&y.length>=A.batch_transaction_min_limit&&this.setState({isProceedButtonDisabled:!1})},this.setSubmitEditData=async e=>{let{editSubmitData:t,edited_reason_for_transfer_text:i,notes:n}=e;await this.setState({editSubmitData:t,edited_reason_for_transfer_text:i,notes:n})},this.resetFormVal=()=>{const{goodsServiceFromVal:e,formName:t,dispatch:i}=this.props;(e&&Object.keys(e[t])).forEach(o=>{i((0,D.Zg)(n.P6z,`${t}.${o}`,e[t][o]))})},this.clearMultiTxnCurrentBene=()=>{this.props.multiTxnCurrentBene(null)},this.onEditTransactionData=async function(e,i){let n,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=arguments.length>5?arguments[5]:void 0,l=arguments.length>6?arguments[6]:void 0;if(t.props.multiTxnCurrentBene({beneficiary_id:e.beneficiary_id,instarem_bank_account_id:e.payload&&e.payload.instarem_bank_account_id}),n=await p.wh.builder(n=>(0,a.jsx)(Pt,{destinationAmountToEdit:M()(e,"payload.destination_amount",""),invoice_number:M()(r,"payload.invoice_number",""),invoice_date:M()(l,"payload.invoice_date",""),setTransferTextTradeCode:t.setTransferTextTradeCode,additionalInfo:s,isNoteEdit:o,beneficiaryDetails:e,disable_save_and_continue:t.disable_save_and_continue,reasonForTransfersVals:t.state.reasonForTransfers,onClose:n,selected_destination_currency:e.payload&&e.payload.destination_currency,sourceAmtToEdit:e.payload&&e.payload.gross_source_amount,reasonForTransferToEdit:e.payload&&e.payload.reason_for_transfer,invoiceNumberToEdit:e.payload&&e.payload.invoice_number,invoiceDateToEdit:e.payload&&e.payload.invoice_date,setSubmitEditData:t.setSubmitEditData,index:i,clearMultiTxnCurrentBene:t.clearMultiTxnCurrentBene,source_currency:M()(e,"payload.source_currency","")}),"edit-recipient",!0,{disAbleCloseAnimation:!0}),n){const{editSubmitData:n,edited_reason_for_transfer_text:o,notes:s}=t.state;if(!await p.wh.builder(e=>(0,a.jsxs)("div",{className:"edit-recipient-modal-warapper",children:[(0,a.jsx)("p",{children:"Do you want to overwrite the saved transaction with recent one?"}),(0,a.jsxs)("div",{className:"buttons-wrapper",children:[(0,a.jsx)("button",{className:"cancel-btn",id:"cancel-modal",onClick:()=>{e(!1),t.resetFormVal()},children:"No"}),(0,a.jsx)("button",{className:"remove-btn",id:"remove-modal",onClick:()=>e(!0),children:"Yes"})]})]}),"edit-confirm-modal",!0,{disAbleCloseAnimation:!0}))return;t.submitEdit({editSubmitData:n,beneficiaryDetails:e,edited_reason_for_transfer_text:o,index:i,notes:s,isConfirmed:!0}),t.setState({reRenderList:!0})}},this.submitEdit=async e=>{let{editSubmitData:t,beneficiaryDetails:i,edited_reason_for_transfer_text:n,index:o,notes:a,isConfirmed:s}=e;this.props.activateLoader();let{editTransaction:r,is_destination_amount_last_changed:l,recipientList:d}=this.props,{beneficiaryDataToBeShown:c,temp_transaction_id:u,beneficiary_id:m}=i,{gross_source_amount:p,source_currency:h,destination_amount:_,destination_currency:x,net_source_amount:v}=t;const{selectedBeneDetails:f}=this.state,{reason_for_transfer_text_trade_code:y}=this.props.recipientList[o].additionalDataForRL,b={...i.payload,...t,beneficiary_id:m,is_source_oriented:!l,notes:a};let g={...c,gross_source_amount:p,source_currency:h,destination_amount:_,destination_currency:x,net_source_amount:v,reason_for_transfer_text:n},j=await this.uniqueMerge(g,f);s&&(g={...g,...j,reason_for_transfer_text_trade_code:y});const A=(0,$t.bv)(b,g);await r(A,d,u,o),this.setState({reRenderList:!0}),this.props.disableLoader()},this.uniqueMerge=async(e,t)=>{let i={};return Object.keys(e).forEach(n=>{t.hasOwnProperty(n)||(i[n]=e[n])}),i},this.deleteTransaction=async(e,t,i)=>{if(await p.wh.builder(e=>(0,a.jsxs)("div",{className:"delete-recipient-modal-warapper",children:[(0,a.jsxs)("p",{children:["Are you sure of removing",(0,a.jsx)("span",{className:"delete-bene-name",children:t}),"from transaction panel?"]}),(0,a.jsxs)("div",{className:"buttons-wrapper",children:[(0,a.jsx)("button",{className:"cancel-btn",id:"cancel-modal",onClick:()=>e(!1),children:"Cancel"}),(0,a.jsx)(p.mU,{text:"Remove",width:138,height:40,onClick:()=>e(!0)})]})]}),"delete-recipient-txn-modal",!0,{disAbleCloseAnimation:!0})){let t=await this.props.deleteTransactionWithTempId(e,i);t&&0===t.length&&this.state.showDisabledSourceDropdown&&(this.fixedSourceCurrency="",this.setState({showDisabledSourceDropdown:!1,isProceedButtonDisabled:!0}))}},this.initiateTransaction=async e=>{try{let{initiateBatchTransaction:t}=this.props,i=await t(e);i&&i.data&&i.data.success&&i.data.data?await(0,It.h)(i,this,this.initiateTransaction):this.props.disableLoader()}catch(t){return this.props.disableLoader(),(0,g.H4)(t),null}},this.callPaymentMethodModal=async(e,t,i)=>{this.props.activateLoader();let n=i.map(e=>e.beneficiaryDataToBeShown).map(e=>e.destination_currency).includes("KRW");
1353if(await p.wh.builder(t=>(0,a.jsx)(qt,{batch_number:e,isKRWAsDestination:n,fixedSourceCurrency:this.fixedSourceCurrency,onClose:t}),"payment-method-modal",!0,{disAbleCloseAnimation:!0})){const{updateScreenConfig:i}=this.props;if(t)return await i("mobile_verification_transaction",{is_required:!0}),void await p.wh.builder(e=>(0,a.jsx)(d.A,{centered:!0,className:"mobile-verification-modal form-grid",children:(0,a.jsx)(d.A.Row,{children:(0,a.jsx)(d.A.Column,{computer:8,tablet:8,mobile:16,className:"modal-col",children:(0,a.jsx)(l.Ay,{isTransactionOriented:!0,independentScreen:!0,onClose:e})})})}),"payment-method-modal",!0,{disAbleCloseAnimation:!0});this.initiateTransaction(e)}},this.onClickProceed=async()=>{let{submitMultiTxn:e,recipientList:t,activateLoader:i,disableLoader:n,corporateConfig:o,dispatch:a}=this.props,s=0,r=t.length;const{recipientList:l}=this.props;if(0===l.filter(e=>!1===e.confirm).length){if(o&&o.batch_transaction_min_limit&&r>=o.batch_transaction_min_limit){i(),s=(0,$t.Km)(t);let o=[...t],a=(0,$t.lZ)([...t],s);if(0===a.length)this.callPaymentMethodModal(s,this.is_otp_required,t);else try{const i=a.reduce((e,t)=>{const{bank_account_country:i,currency_code:n,account_type:o,...a}=t;return[...e,{...a}]},[]);i.forEach(e=>{e.invoice_date&&(e.invoice_date=e.invoice_date.split("/").reverse().join("-"))});let n=await e(o,i,s);if(n&&n.data&&n.data.data&&n.data.data.length>0){let e=n.data.data,i=e[0].batch_number;this.is_otp_required=e[0].is_otp_required,this.callPaymentMethodModal(i,this.is_otp_required,t)}}catch(d){n(),console.error(d)}}}else a((0,g.rG)({text:["Please fill all the required fields"],type:"info"}))},this.toggleCouponCode=async e=>{let{coupon_code:t,dispatch:i,getAllformVal:o,recipientList:a}=this.props,{promotionApplied:s}=this.state,r={coupon_code:s?null:t,coupon_amount:null};if(this.props.coupon_code){if(!e){const e=a.map(e=>e.payload);let t=await this.props.validateCouponCode({transactions:[...e,o]});t.data&&!t.data.success&&(r.coupon_code=null)}if(s=!!r.coupon_code,await new Promise(t=>this.setState({promotionApplied:s,whichPromotionApplied:e?null:n.rxA},t)),this.promoCouponCode&&!s&&(this.promoCouponCode=null),await(0,y.w2)(i,D.Zg,n.ijd,r),this.refresh){await new Promise(this.refresh)||(await new Promise(e=>this.setState({promotionApplied:!1},e)),(0,y.w2)(i,D.Zg,n.ijd,{coupon_code:null,coupon_device:""}))}}},this.handleAddRecipient=()=>{this.props.toggleRedirectedFromSendMoneyAction(!0)},this.state={toProceed:!1,reasonForTransfers:[],currencyConverterError:null,promotionApplied:!1,instapoints_balance:null,disable_save_and_continue:!1,selectedBeneDetails:[],showDisabledSourceDropdown:!1,showDisabledDestinationDropdown:!1,shouldSubmitDisabled:!1,trade_type:null,bankAccountOptions:[],showBankDetailsBlock:!1,current_bank_fields:"",additionalFields:"",config_id:"",debit_config_id:"",debit_card_details:"",whichPromotionApplied:null,showModal:!1,customError:null,isProceedButtonDisabled:!0},this.headingConfig=[{content:"Recipients added",className:"recipient-heading"},{content:"You send",className:"recipient-heading"},{content:"Recipient receives",className:"recipient-heading"},{content:"",className:"recipient-heading"},{content:"You pay",className:"recipient-heading"}],this.initialReasonForTransfers=[],this.fixedSourceCurrency="",this.is_otp_required=!1,this.destinationCurrencyInfoConfig=[]}componentWillUnmount(){this.props.dispatch((0,D.zr)("goodsServiceFields"))}async componentDidUpdate(e){if(this.props.getAllformVal){const{getAllformVal:{source_currency:e,destination_currency:t,destination_amount:i,instarem_fx_rate:n,net_source_amount:o}}=this.props;let a={source_currency:e,source_amount:o,destination_currency:t,destination_amount:i,instarem_fx_rate:n,transaction_fee_amount:this.props.transactionDetails&&this.props.transactionDetails.total_fee_amount||this.props.transactionDetails&&this.props.transactionDetails.transaction_config&&this.props.transactionDetails.transaction_config.total_fee_amount,net_source_amount:o};this.sourceCurrencyInfoConfig=(0,$t.wO)("source",a),this.destinationCurrencyInfoConfig=(0,$t.wO)("destination",a)}try{const{source_currency:t}=this.props;t&&t!==e.source_currency&&await this.loadBene()}catch(t){console.error(t)}}render(){var e,t,i,s;let{dispatch:r,formSyncErrors:l,device:d,handleSubmit:c,source_currency:u="",gross_source_amount:m=0,destination_currency:h="",destination_amount:_=0,instarem_bank_account_id:x,coupon_code:v,coupon_amount:f=0,redeemed_instapoints:y,redeemed_instapoints_amount:b=0,beneficiary_id:g,recipientList:j,reason_for_transfer:A,totalYouPayAmount:N,corporateConfig:w,invoice_number:S,invoice_date:C}=this.props,{reasonForTransfers:D,recipients:T,shouldSubmitDisabled:E,showDisabledSourceDropdown:I,showDisabledDestinationDropdown:R,promotionApplied:k}=this.state,O=!!(j&&j.length>0),F=v&&null!==f&&f>=0,M="CORPORATE"===this.props.account_type&&"CAD"===this.props.destination_currency;const P=(()=>{const{selectedBeneDetails:e,reason_for_transfer_code:t,editSubmitData:i}=this.state,{destination_amount:o,account_type:a,reason_for_transfer:s,destination_currency:r}=this.props,l=r===n.GQW&&a===n.a6V,d=n.XK$.includes(t)&&"Hdfc Bank"===(null===e||void 0===e?void 0:e.bank_name),c=((null===i||void 0===i?void 0:i.destination_amount)>15e5||o>15e5)&&s;return["USD","PHP",...l&&(c||d)?["INR"]:[]]})(),$={USD:n.osW,PHP:"For receiving amount above 150000 PHP, the transaction may be subject to additional charges and may impact the final beneficiary amount.",INR:n.xI8},U=(0,Lt.A)(this.state.reasonForTransfers,null===(e=this.props)||void 0===e||null===(t=e.getAllformVal)||void 0===t?void 0:t.reason_for_transfer,null===(i=this.props)||void 0===i||null===(s=i.getAllformVal)||void 0===s?void 0:s.destination_currency);return(0,a.jsxs)("div",{className:"page-wrapper",children:[(0,a.jsxs)("div",{className:"page multi-trans-container cf",children:[(0,a.jsxs)("div",{className:"multi-trans-heading",children:[(0,a.jsx)("h2",{children:"Transaction set up"}),(0,a.jsx)("span",{}),(0,a.jsx)(vt.N_,{className:"add-recipient-link",id:"add-recipient-link",to:n.Tvk,state:{activeForm:"payeeDetails",lastLocation:n.QVZ},onClick:this.handleAddRecipient,children:"+ Add recipient"},0)]}),(0,a.jsx)("form",{id:n.ijd,onSubmit:c(this.onAddToPaySubmit),children:(0,a.jsxs)("div",{className:"multi-trans-wrapper multi-trans",children:[(0,a.jsxs)("div",{className:"instruct-wrapper",children:[(0,a.jsx)("h3",{children:"Add transactions"}),w&&w.batch_transaction_max_limit?(0,a.jsx)("span",{className:"multi-txn-instruct",children:`You can add upto ${w.batch_transaction_max_limit} transactions`}):null]}),(0,a.jsx)("div",{className:"recipient-list dropdown-input",children:(0,a.jsx)("label",{children:(0,a.jsx)(te.A,{bindToThisObject:g,name:"beneficiary_id",id:"benef
1353iciary-id-dropdown",type:"text",component:p.jF,formName:n.ijd,placeholder:"Select recipient",validate:[L.mw],onDropdownChange:this.onBeneficiaryChange,className:"dropdown recipient-dropdown img-caret",staticValues:this.renderRecipients(T)})})}),(0,a.jsx)("div",{className:"currency-wrapper-col",children:(0,a.jsx)(p.Sb,{refreshCallback:e=>this.refresh=e,reduxFormName:n.ijd,onErrorChange:this.setTransactionError,dispatch:r,source_currency:u,gross_source_amount:m,destination_currency:h,destination_amount:_,coupon_code:v,coupon_amount:f,redeemed_instapoints:y,redeemed_instapoints_amount:b,instarem_bank_account_id:x,refreshInstaremBankAcc:O,beneficiary_id:g,updateOnBeneficiaryChange:!0,onCurrencyConverterMount:this.onCurrencyConverterMount,whichPromotionApplied:this.state.whichPromotionApplied,applyPromotion:k,children:e=>(e.shouldSubmitDisabled!==this.state.shouldSubmitDisabled&&this.setState({shouldSubmitDisabled:e.shouldSubmitDisabled,bankAccountOptions:e.bankAccountOptions}),(0,a.jsxs)(o.Fragment,{children:[(0,a.jsx)(p.pO,{...e,notes:this.props.notes,user_session:this.props.user_session,disable_save_and_continue:this.disable_save_and_continue,source_currency:this.props.source_currency,placeholder:!0,dispatch:r,showDefaultPlaceholder:!0,destination_currency:this.props.destination_currency,transaction_fee_percent:this.props.transaction_fee_percent,transaction_fee_amount:this.props.transaction_fee_amount,instarem_fx_rate:this.props.instarem_fx_rate,errors:this.mergeErrors(l,this.state.currencyConverterError,this.state.customError),showDisabledSourceDropdown:I,showDisabledDestinationDropdown:R,transactionDetails:this.props.transactionDetails}),(0,a.jsx)(Jt,{size:"small",style:{marginTop:"initial"},open:this.state.showModal,onOpen:()=>this.setState({showModal:!0}),onClose:()=>this.setState({showModal:!1}),children:(0,a.jsx)(p.G0,{...this.props,...e,showPaymentMethodOption:!0,isModal:!0,is_corporate_case:!0,onModalClose:()=>this.setState({showModal:!1}),toggleTransactionsModal:()=>this.toggleTransactionsModal(this.state.showModal),destinationCurrencyInfoConfig:this.destinationCurrencyInfoConfig,sourceCurrencyInfoConfig:this.sourceCurrencyInfoConfig})})]}))})}),(0,a.jsx)("div",{className:"reason-for-transfer dropdown-input col-blue",children:(0,a.jsx)(te.A,{bindToThisObject:A,name:"reason_for_transfer",type:"text",component:p.jF,placeholder:"Reason for transfer",validate:[L.mw],onDropdownChange:this.onReasonForTransferChange,className:"dropdown reason-dropdown img-caret",staticValues:D})}),U&&(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"input-text multiple_transaction_coupon",children:(0,a.jsx)(te.A,{bindToThisObject:S,name:"invoice_number",type:"text",isCorporateCoupon:!0,component:p.A_,placeholder:"Invoice number",validate:[L.mw,L.kk,L.NB,L.G7],className:"input form-flow coupon_block"})}),(0,a.jsx)("div",{className:"input-text",children:(0,a.jsx)(te.A,{bindToThisObject:C,name:"invoice_date",type:"text",className:"input form-flow",component:p.lr,validate:[L.mw],parse:e=>e&&W()(e).format("DD/MM/YYYY"),maxDate:W()(),placeholder:"Invoice Date (DD/MM/YYYY)",disabled:this.state.disableAllFields})})]}),(0,a.jsxs)("div",{className:"reason-for-transfer dropdown-input input-text multiple_transaction_coupon",children:[(0,a.jsx)(te.A,{name:"coupon_code",type:"text",isCorporateCoupon:!0,component:p.A_,placeholder:"Enter coupon",validate:[this.validateCoupon],className:"input form-flow coupon_block",disabled:F}),(0,a.jsx)("button",{className:"coupon_icon "+(F?"coupon_applied":""),type:"button",id:"btn-redeem",onClick:()=>this.toggleCouponCode(F),children:F?"X":">"})]}),F&&(0,a.jsx)("div",{className:"coupon_success",children:`Congratulations! $${f} off`}),(0,a.jsx)("div",{className:"reason-for-transfer dropdown-input input-text",children:(0,a.jsx)(te.A,{name:"notes",type:"text",className:"input form-flow",component:p.A_,placeholder:"Add a note (optional)",validate:[L.tV,L.xN]})}),(0,a.jsxs)("p",{className:"trade-details-note",children:[(0,a.jsx)("span",{children:"According to partnered bank regulations,"}),(0,a.jsx)("span",{children:"you need to provide details of goods click 'Add to pay',"}),(0,a.jsx)("span",{children:"enter 'Trade details' and proceed"})]}),(0,a.jsxs)("div",{className:"add_to_pay_block",children:[(0,a.jsxs)("div",{className:"add-to-pay-wrapper see_details_block",children:[(0,a.jsx)("span",{className:"you_pay",children:"You pay only"}),(0,a.jsxs)("div",{className:"you_pay_amt",children:[F?m-f:m," ",u]}),(0,a.jsx)("div",{className:"see_details_link",onClick:()=>this.toggleTransactionsModal(),children:"See details"})]}),(0,a.jsxs)("div",{className:"add-to-pay-wrapper pay_button",children:[(0,a.jsx)(p.mU,{text:"Add to pay",disabled:E,width:110,height:50}),d===n.mnO&&(0,a.jsx)("span",{className:"count-recipient-added-mob",children:`(${j.length} Recipients Added)`})]})]})]})}
1353),(0,a.jsxs)("div",{className:"transactions-details-wrapper",children:[(0,a.jsx)(Rt.A,{...this.props,recipientList:j,headingConfig:this.headingConfig,fixedSourceCurrency:this.fixedSourceCurrency,totalYouPayAmount:N,onEditTransactionData:this.onEditTransactionData,deleteTransaction:this.deleteTransaction,viewFor:"transaction"}),(0,a.jsx)("div",{className:"proceed-btn-wrapper",children:(0,a.jsx)(p.mU,{text:"Proceed",disabled:this.state.isProceedButtonDisabled,onClick:()=>this.onClickProceed(),width:130,height:40})}),(0,a.jsx)("div",{})]})]}),(0,a.jsx)("div",{className:"us-php-notes",children:M?"Please note that additional SWIFT fees (typically, between CAD 15 and 30) could be charged for CAD transfers, and the amount thus received may be less than what is shown on the website":P.includes(this.props.destination_currency)&&$[this.props.destination_currency]})]})}}const ti=(0,u.A)({form:n.ijd})(ei),ii=(0,B.A)((0,c.Ng)(function(e){let t=(0,ne.A)(n.ijd)(e),{rootReducer:{transactionReducer:{goodsServicesFormValForEdit:{goodsServiceFromVal:i,formName:o},transactionDetails:a,currencyCovertor:{is_destination_amount_last_changed:s,sourceErr:r,DestinationErr:l},multipleTransactions:{recipientList:d,totalYouPayAmount:c},corporateConfig:u},userFlowReducer:{screens:p,currentScreen:h,timeline:_},userStatusReducer:x,userSessionReducer:{user_session:v},userStatusReducer:{account_type:f},uiTriggerState:{device:y}}}=e;const b=(0,ie.A)(n.ijd),g=(0,m.A)(n.ijd)(e);let{set_transaction_later:j,source_currency:A,destination_currency:N,gross_source_amount:w,instarem_bank_account_id:S,instarem_fx_rate:C,transaction_fee_amount:D,coupon_amount:T,redeemed_instapoints:E,redeemed_instapoints_amount:I,net_source_amount:R,destination_amount:k,net_tax_amount:O,coupon_code:L,source_of_funds:F,transaction_fee_percent:M,beneficiary_id:P,reason_for_transfer:$,notes:U,beneficiary_routing_config_id_bank:V,beneficiary_routing_config_id_debit:B,invoice_number:Y,invoice_date:H}=b(e,"set_transaction_later","source_currency","destination_currency","gross_source_amount","instarem_bank_account_id","instarem_fx_rate","transaction_fee_amount","coupon_amount","redeemed_instapoints","redeemed_instapoints_amount","net_source_amount","destination_amount","net_tax_amount","coupon_code","source_of_funds","transaction_fee_percent","beneficiary_id","reason_for_transfer","notes","beneficiary_routing_config_id_bank","beneficiary_routing_config_id_debit","invoice_number","invoice_date");return{set_transaction_later:j,source_currency:A,destination_currency:N,gross_source_amount:w,instarem_bank_account_id:S,instarem_fx_rate:C,transaction_fee_amount:D,coupon_amount:T,redeemed_instapoints:E,redeemed_instapoints_amount:I,net_source_amount:R,destination_amount:k,currentScreen:h,net_tax_amount:O,coupon_code:L,source_of_funds:F,beneficiary_id:P,is_destination_amount_last_changed:s,screens:p,timeline:_,user_status:x,user_session:v,formSyncErrors:t,reason_for_transfer:$,account_type:f,device:y,transaction_fee_percent:M,totalYouPayAmount:c,getAllformVal:g,recipientList:d,transaction:a,sourceErr:r,DestinationErr:l,notes:U,corporateConfig:u,goodsServiceFromVal:i,formName:o,beneficiary_routing_config_id_bank:V,beneficiary_routing_config_id_debit:B,invoice_number:Y,invoice_date:H}},e=>(0,Et.zH)({dispatch:e,changeScreen:h.Xh,updateScreenConfig:h.yt,loadBeneficiaryByCurrency:v.a0,loadReasonForTransfer:v.XK,multiTxnRecipientList:kt.v4,submitMultiTxn:kt.uY,deleteTransactionWithTempId:kt.v$,initiateBatchTransaction:kt.wO,activateLoader:j.LI,disableLoader:j.MV,clearMultipleRecipients:kt.Ag,editTransaction:kt.Xk,getCorpConfig:kt.nX,getBeneficiaryConfig:_.Ms,validateCouponCode:kt.mE,multiTxnCurrentBene:kt.NG,newTransactionComputation:kt.yV,toggleRedirectedFromSendMoneyAction:Zt.ik},e))(ti));var ni=i(84209);const oi=o.lazy(()=>Promise.all([i.e(5631),i.e(8477),i.e(6782)]).then(()=>i(96782))),ai=e=>(0,a.jsx)(o.Suspense,{fallback:(0,a.jsx)(ni.A,{}),children:(0,a.jsx)(oi,{...e})});var si=i(59355),ri=i(23225);const li=Qt.Ay.div` 1354 background: ${Xt.A.white}; 1355 width: ${e=>{let{width:t}=e;return t}}px; 1356 border-radius: 4px; 1357 min-height: ${e=>{let{height:t}=e;return t}}px; 1358 gap: 32px; 1359 .modalBodyContainer { 1360 width: 100%; 1361 display: flex; 1362 flex-direction: column; 1363 justify-content: flex-start;
1364 align-items: start; 1365 margin-top: ${e=>e.containerMarginTop}px; 1366 .headerContainer { 1367 display: flex; 1368 flex-direction: column; 1369 text-align: start; 1370 margin-top: 0; 1371 align-items: start; 1372 margin: 0px 16px 32px 16px; 1373 .boldText { 1374 color: ${Xt.A.textGrey}; 1375 font-family: ${si.F.hellix.bold}; 1376 text-align: start; 1377 font-size: 18px; 1378 font-style: normal; 1379 line-height: 26px; 1380 margin: 8px 0; 1381 } 1382 .greyText { 1383 font-family: ${si.F.hellix.regular}; 1384 font-style: normal; 1385 font-weight: 400; 1386 font-size: 16px; 1387 line-height: 22px; 1388 text-align: start; 1389 color: ${Xt.A.textGrey}; 1390 } 1391 .deatilsWrapper { 1392 margin: 32px 0px; 1393 } 1394 .changeMyDetails { 1395 color: ${Xt.A.darkBlue}; 1396 text-align: center; 1397 justify-content: center; 1398 align-self: center; 1399 font-family: ${si.F.hellix.bold}; 1400 font-size: 16px; 1401 font-style: normal; 1402 font-weight: 700; 1403 line-height: 24px; 1404 margin-top: 24px; 1405 cursor: pointer; 1406 } 1407 .nameValuePair { 1408 display: flex; 1409 gap: 12px; 1410 .value { 1411 margin: 10px 0px 8px 0px; 1412 } 1413 } 1414 } 1415 } 1416 1417 @media ${ri.A.mobileXL} { 1418 .submitButton, 1419 .submit-button-disabled { 1420 width: 100% !important; 1421 } 1422 } 1423`,di=e=>{const{handleGotIt:t,handleChange:i,name:o,dob:s}=e;return(0,a.jsx)(li,{containerMarginTop:32,buttonTopMargin:16,buttonWidth:418,height:362,width:450,children:(0,a.jsx)("div",{className:"modalBodyContainer",children:(0,a.jsxs)("div",{className:"headerContainer",children:[(0,a.jsx)("p",{className:"boldText",children:null===n.Qqp||void 0===n.Qqp?void 0:n.Qqp.heading}),(0,a.jsx)("p",{className:"greyText",children:null===n.Qqp||void 0===n.Qqp?void 0:n.Qqp.subHeading}),(0,a.jsxs)("div",{className:"deatilsWrapper",children:[(0,a.jsxs)("div",{className:"nameValuePair",children:[(0,a.jsx)("p",{className:"boldText",children:null===n.Qqp||void 0===n.Qqp?void 0:n.Qqp.fullName}),(0,a.jsx)("p",{className:"greyText value",children:o})]}),(0,a.jsxs)("div",{className:"nameValuePair",children:[(0,a.jsx)("p",{className:"boldText",children:null===n.Qqp||void 0===n.Qqp?void 0:n.Qqp.dob}),(0,a.jsx)("p",{className:"greyText value",children:(r=s,W()(r,"DD/MM/YYYY").format("DD MMMM YYYY"))})]})]}),(0,a.jsx)(p.mU,{onClick:t,text:null===n.Qqp||void 0===n.Qqp?void 0:n.Qqp.submitButton,width:418}),(0,a.jsx)("p",{className:"changeMyDetails",children:(0,a.jsx)(p.mU,{type:"link",onClick:i,text:null===n.Qqp||void 0===n.Qqp?void 0:n.Qqp.chagngeMyDetails,width:418})})]})})});var r};var ci=i(13139),ui=i(20945),mi=i(64037);const pi=Qt.Ay.div` 1424 display: flex; 1425 flex-direction: column; 1426 justify-content: center; 1427 align-items: center; 1428 margin-top: 60px; 1429`,hi=Qt.Ay.div` 1430 width: 100%; 1431`,_i=Qt.Ay.div` 1432 width: 100%; 1433 display: flex; 1434`,xi=Qt.Ay.div` 1435 img { 1436 margin-left: 15px; 1437 } 1438`,vi=Qt.Ay.div` 1439 border: 1px solid #f3c4c4; 1440 border-radius: 8px; 1441 width: 335px; 1442 display: flex; 1443 padding: 12px 16px; 1444 margin-bottom: 19px; 1445 @media screen and (max-width: 750px) { 1446 width: 350px; 1447 } 1448`,fi=Qt.Ay.p` 1449 flex: 1; 1450 display: flex; 1451 justify-content: center; 1452 margin-left: ${e=>{let{error_message:t}=e;return t&&2===t.ssn_verification_attempts?"0px":"-32px"}}; 1453 color: ${Xt.A.black}; 1454 font-family: ${si.F.hellix.regular}; 1455 font-style: normal; 1456 font-size: ${e=>{let{small:t}=e;return t?"16px":"22px"}}; 1457 line-height: 12px; 1458 text-align: center; 1459 line-height: 22px; 1460`,yi=Qt.Ay.div` 1461 display: flex; 1462 justify-content: center; 1463 flex-direction: column; 1464 align-item: center; 1465`,bi=Qt.Ay.div` 1466 font-family: ${si.F.hellix.regular}; 1467 font-size: 18px; 1468 line-height: 24px; 1469 color: ${Xt.A.black}; 1470 max-width: 335px; 1471 text-align: center; 1472 word-wrap: break-word; 1473 white-space: normal; 1474 margin: 0 auto; 1475`,gi=Qt.Ay.div` 1476 margin: 12px 0; 1477 font-family: ${si.F.hellix.regular}; 1478 font-size: 12px; 1479 line-height: 18px; 1480 color: ${Xt.A.textLightGrey}; 1481`,ji=Qt.Ay.div` 1482 font-family: ${si.F.hellix.regular}; 1483 font-style: normal; 1484 font-size: 12px; 1485 line-height: 16px; 1486 text-align: center; 1487 color: ${Xt.A.textLightGrey}; 1488 text-align: center; 1489`,Ai=Qt.Ay.div` 1490 font-family: ${si.F.hellix.regular}; 1491 font-style: normal; 1492 font-size: 14px; 1493 line-height: 22px; 1494 text-align: center; 1495 color: ${Xt.A.red}; 1496 width: 271px; 1497`,Ni=Qt.Ay.div` 1498 margin-top: 32px; 1499 display: flex; 1500 flex-direction: column; 1501 align-items: center; 1502 justify-content: center; 1503 width: 100%; 1504 #middle-header-text { 1505 text-align: center; 1506 font-size: 14px; 1507 width: 90%; 1508 color: ${Xt.A.textGrey}; 1509 } 1510 #mid-Subtext { 1511 width: 335px; 1512 color: ${Xt.A.textLightGrey}; 1513 margin-top: 32px; 1514 @media screen and (max-width: 750px) { 1515 width: 84%; 1516 } 1517 } 1518 #disable { 1519 background: ${Xt.A.textDarkGray}; 1520 color: ${Xt.A.borderGrey}; 1521 } 1522 #active { 1523 background: ${Xt.A.brandPrimary}; 1524 } 1525 .secondary-error { 1526 font-size: 12px; 1527 line-height: 18px; 1528 } 1529`,wi=Qt.Ay.div` 1530 margin: 32px 0px; 1531`,Si=Qt.Ay.div` 1532 display: flex; 1533 align-items: center; 1534 justify-content: center; 1535 gap: 4px; 1536 margin-bottom: ${e=>{let{error_message:t}=e;return t?"12px":"0"}}; 1537 .input-txt:last-child { 1538 margin-right: 0px; 1539 } 1540 .pin-input { 1541 display: flex; 1542 gap: 4px !important; 1543 .fragment { 1544 font-family: ${si.F.hellix.bold}; 1545 width: 30px; 1546 height: 40px; 1547 border-radius: 3px; 1548 border: solid 1px 1549 ${e=>{let{error_message:t}=e;return t?`${Xt.A.red}`:`${Xt.A.borderBlue}`}}; 1550 font-size: 16px; 1551 line-height: 22px; 1552 text-align: center; 1553 letter-spacing: 0.17px; 1554 color: ${Xt.A.textGrey}; 1555 caret-color: ${Xt.A.brandPrimary}; 1556 } 1557 .fragment:focus { 1558 border: solid 1px ${Xt.A.black}; 1559 } 1560 } 1561 @media screen and (max-width: 750px) { 1562 padding-top: 30px; 1563 } 1564`,Ci=Qt.Ay.div` 1565 display: flex; 1566 flex-direction: column; 1567 max-width: 525px; 1568 margin-bottom: 40px; 1569 background: #effbff; 1570 border: 1px solid #46aeee; 1571 border-radius: 7px; 1572 color: #344085; 1573 text-align: center; 1574 .close {
1575 align-self: flex-end; 1576 color: #00c1ff; 1577 margin-right: 5px; 1578 cursor: pointer; 1579 } 1580 .text { 1581 padding: 5px 15px 15px 15px; 1582 font-size: 12px; 1583 line-height: 20px; 1584 letter-spacing: 0.5px; 1585 color: ${Xt.A.black}; 1586 } 1587 @media screen and (max-width: 750px) { 1588 width: 90%; 1589 } 1590`,Di=Qt.Ay.div` 1591 width: 450px; 1592 margin-bottom: 119px; 1593 margin-top: 34px; 1594 text-align: center; 1595 @media screen and (max-width: 750px) { 1596 width: 90%; 1597 } 1598 .text { 1599 font-family: ${si.F.hellix.regular}; 1600 font-style: normal; 1601 font-size: 12px; 1602 line-height: 18px; 1603 text-align: center; 1604 color: ${Xt.A.textLightGrey}; 1605 text-align: center; 1606 } 1607 .link { 1608 text-align: center; 1609 color: ${Xt.A.darkBlue}; 1610 font-family: ${si.F.hellix.regular}; 1611 font-size: 14px; 1612 font-style: normal; 1613 line-height: 18px; 1614 cursor: pointer; 1615 } 1616`,Ti=Qt.Ay.div` 1617 display: flex; 1618 flex-direction: column; 1619 place-items: center; 1620 width: 239px; 1621 margin: 3% auto 20%; 1622 text-align: center; 1623 color: ${Xt.A.textLightGrey}; 1624 p { 1625 color: ${Xt.A.black}; 1626 text-align: center; 1627 font-size: 18px; 1628 font-style: normal; 1629 line-height: 26px; 1630 font-family: ${si.F.hellix.bold}; 1631 } 1632 img { 1633 margin: 35px 0px 25px 0px; 1634 } 1635 1636 @media screen and (max-width: 750px) { 1637 width: 340px; 1638 } 1639`,Ei=Qt.Ay.div` 1640 color: ${Xt.A.textLightGrey}; 1641 font-family: ${si.F.hellix.regular}; 1642 font-size: 24px; 1643 line-height: 38px; 1644 margin-right: 4px; 1645`,Ii=Qt.Ay.div` 1646 margin-right: 8px; 1647`,Ri=Qt.Ay.div` 1648 border: 1px solid ${Xt.A.textDarkGray}; 1649 width: 6px; 1650 text-align: center; 1651`;const ki=(0,c.Ng)(function(e){let{rootReducer:{userFlowReducer:{screens:t,currentScreen:i,timeline:n},userStatusReducer:{additional_info:o,sub_status:a}}}=e;return{screens:t,currentScreen:i,timeline:n,additional_info:o,sub_status:a}},e=>({eVerification:v.H4,updateScreenConfig:h.yt,changeScreen:h.Xh,disableLoader:j.MV,activateLoader:j.LI,dispatch:e}))(e=>{const[t,i]=(0,o.useState)(""),[s,r]=(0,o.useState)({}),[l,d]=(0,o.useState)(!1),[c,u]=(0,o.useState)(!0),{additional_info:m,status:_}=e.userStatusReducer,[v,f]=(0,o.useState)(!1),[b,g]=(0,o.useState)(!1),[N,w]=(0,o.useState)(""),[S,C]=(0,o.useState)(""),[D,T]=(0,o.useState)(!0),[E,I]=(0,o.useState)(!1),[R,k]=(0,o.useState)(!1),O=b?!(3===(null===N||void 0===N?void 0:N.length)&&2===(null===S||void 0===S?void 0:S.length)&&4===t.length):4!==t.length;(0,o.useEffect)(()=>{3===N.length&&(T(!1),I(!0),k(!1))},[N]),(0,o.useEffect)(()=>{2===S.length&&(T(!1),I(!1),k(!0))},[S]);let{VERIFY:L,AUTHENTICATE:F,AUTHENTICATION_DETAILS:M,IDENTITY:P,GOVERNMENT:$,GOVERNMENT_DETAILED_INFO:U,READ_MORE:V,READ_LESS:B,ERROR_ATTEMPT1:Y,LAST_4_DIGITS:H,ENTER_9_DIGITS_SSN:z,SSN_ATTEMPT_COUNT_ERROR:G,UPLOAD_SOCIAL_SECURITY_CARD:q}=n.NHQ;const{is_valid:K}=s,Q=()=>(0,a.jsxs)(Ti,{id:"error-box",children:[(0,a.jsx)("img",{src:A.Fp3,alt:"error"}),(0,a.jsx)("p",{children:G})]}),W=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t={pageName:ci.ND};(0,ui.$s)(e?ci.Pf:ci.Mm,ci.sk,t,mi.s6.CLEVER_TAP)},X=async()=>{var t;const{remitter_individual_full_name:i,date_of_birth:n}=e.user_status||"";return await(null===(t=p.wh.builder)||void 0===t?void 0:t.call(p.wh,e=>(0,a.jsx)(di,{name:i,dob:n,handleGotIt:()=>{W(),e(!0)},handleChange:()=>{W(!0),e(!1)}}),"ssn-confirm-details insta-modal center-modal",!0))};return(0,o.useEffect)(()=>{const{dispatch:t}=e;(null===m||void 0===m?void 0:m.ssn_verification_attempts)>=2&&t((0,h.yt)(n.jRy,{is_required:!1}))},[]),(0,a.jsxs)(pi,{children:[_===n.WTq&&"REKYC"===e.sub_status&&c&&(0,a.jsxs)(Ci,{children:[(0,a.jsx)("p",{className:"close",onClick:()=>u(!1),children:"x"}),(0,a.jsx)("p",{className:"text",children:$})]}),s&&s.ssn_verification_attempts>1||l?Q():(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(hi,{children:(0,a.jsxs)(_i,{className:"check",children:[s&&2!==s.ssn_verification_attempts&&(0,a.jsx)(xi,{children:(0,a.jsx)(p.oq,{className:"verification"})}),(0,a.jsx)(fi,{id:"header-text",error_message:s,children:L})]})}),(0,a.jsxs)(o.Fragment,{children:[(0,a.jsxs)(Ni,{children:[!b&&s&&!K&&(m&&m.ssn_verification_attempts||s.ssn_verification_attempts)>0&&(0,a.jsxs)(vi,{children:[(0,a.jsx)(Ii,{children:(0,a.jsx)("img",{src:A.DbR,alt:"cross"})}),(0,a.jsx)(Ai,{id:"error-popup-text",children:s&&(s.PRIMARY||Y.PRIMARY)})]}),(0,a.jsxs)(yi,{id:"middle-header-text",children:[(0,a.jsx)(bi,{children:b?M:F}),(0,a.jsx)(gi,{children:b?z:H})]}),b?(0,a.jsxs)(Si,{error_message:s&&s.SECONDARY,children:[(0,a.jsx)(p.cb,{length:3,inputProps:{className:"fragment"},value:N,onChange:e=>w(e),focusGroup:D}),(0,a.jsx)(Ri,{}),(0,a.jsx)(p.cb,{length:2,inputProps:{className:"fragment"},value:S,onChange:e=>C(e),onBackspace:()=>{0===S.length&&(T(!0),I(!1),k(!1))},focusGroup:E}),(0,a.jsx)(Ri,{}),(0,a.jsx)(p.cb,{length:4,inputProps:{className:"fragment"},value:t,onChange:e=>i(e),onBackspace:()=>{0===t.length&&(T(!1),I(!0),k(!1))},focusGroup:R})]}):(0,a.jsxs)(Si,{error_message:s&&s.SECONDARY,children:[(0,a.jsx)(Ei,{children:"XXX - XX - "}),(0,a.jsx)(p.cb,{length:4,inputProps:{className:"fragment"},autoFocus:!0,onChange:e=>(e=>{i(e),s&&s.SECONDARY&&delete s.SECONDARY})(e)})]}),!K&&!O&&(0,a.jsx)(Ai,{id:"error-text",className:"secondary-error",children:s&&s.SECONDARY}),(0,a.jsx)(ji,{id:"mid-Subtext",children:P}),(0,a.jsx)(wi,{children:(0,a.jsx)(p.mU,{disabled:O,onClick:async()=>{const i=b?`${N}${S}${t}`:t,o={pageName:ci.th};(0,ui.$s)(ci.i4,ci.sk,o,mi.s6.CLEVER_TAP);if(!!b||await X()){const{eVerification:t,changeScreen:o,screens:a,timeline:s,currentScreen:l,updateScreenConfig:c,dispatch:u}=e;let m={POIVerified:null,POAVerified:null},p=n.UQm.ONBOARDING;if(!O){let h=await u(t([{code:"SSN",document_detail_id:!1,values:{identity_number:i}}]));if(465===(null===h||void 0===h?void 0:h.status))g(!0),d(!0),setTimeout(()=>{d(!1)},3e3);else if(h&&h.data&&!0===h.data.success&&h.data.data&&h.data.data.document_data.length>0){let{document_data:e,document_upload_required:t=!0}=h.data.data;m={POIVerified:!1,POAVerified:!1,flow_type:p}
1651,e.forEach(e=>{e.is_everification_successful&&(e.type===n.PlZ?m.POIVerified=!0:e.type===n.Px7&&(m.POAVerified=!0))}),t?d(!0):await u(c(n.jRy,{is_required:!1})),(0,y.TE)("is-SSN-Verified",m),setTimeout(async()=>{await u(o(x.vtj,l,a,s))},3e3)}else{let{is_valid:e,ssn_verification_attempts:t}=h.data.data;r({is_valid:e,ssn_verification_attempts:t,...Y}),t>1&&(Q(),setTimeout(()=>{u(o(x.vtj,l,a,s))},3e3)),(0,y.TE)("is-SSN-Verified",{POIVerified:!1,POAVerified:!1,flow_type:p})}e.disableLoader()}}else{const{currentScreen:t,screens:i,timeline:n,dispatch:o}=e;o((0,j.LI)()),o((0,h.Xh)(x.b7A,t,i,n))}},text:"Start Verification",width:335})}),b&&(0,a.jsx)(p.mU,{type:"link",text:q,onClick:async()=>{const{currentScreen:t,screens:i,timeline:n,dispatch:o}=e;o((0,h.Xh)(x.vtj,t,i,n))}})]}),(0,a.jsxs)(Di,{children:[(0,a.jsx)("span",{id:"ssn-footer-text",className:"text",children:v?U:$}),(0,a.jsx)("span",{className:"link",onClick:()=>{f(!v)},children:v?B:V})]})]})]})]})}),Oi={send_countries:"",receive_currencies:"",previous_year_annual_revenue:1,number_of_employees:1,authorized_check:!1,name_of_applicant:"",job_title_of_applicant:"",date_of_application:null},Li=[{key:"Don't wish to receive",name:"Don't wish to receive",text:"Don't wish to receive",label:"Don't wish to receive",value:"Don't wish to receive"},{key:"USD",name:"USD",text:"USD",label:"USD",value:"USD"},{key:"GBP",name:"GBP",text:"GBP",label:"GBP",value:"GBP"},{key:"EUR",name:"EUR",text:"EUR",label:"EUR",value:"EUR"},{key:"AUD",name:"AUD",text:"AUD",label:"AUD",value:"AUD"},{key:"HKD",name:"HKD",text:"HKD",label:"HKD",value:"HKD"},{key:"SGD",name:"SGD",label:"SGD",text:"SGD",value:"SGD"}];class Fi extends o.Component{constructor(e){super(e),this.componentDidMount=async()=>{let{thisFormData:e}=this.props;this.props.initialize((0,y.PJ)(Oi,e)),this.props.disableLoader(),null===(null===e||void 0===e?void 0:e.date_of_application)&&this.props.dispatch((0,D.Zg)(n.Plk,"date_of_application",W()().format("YYYY-MM-DD")))},this.handleGetKeysOnly=e=>{let t=[];return e.forEach(e=>t.push(e.key)),t},this.submitBusinessProfile=async e=>{if(!e.authorized_check)return this.props.showMessage({text:["Authorized account representative confirmation needed."],type:"info"});const t={send_countries:this.handleGetKeysOnly(e.send_countries),receive_currencies:e.receive_currencies.length>1?e.receive_currencies:this.handleGetKeysOnly(e.receive_currencies),previous_year_annual_revenue:e.previous_year_annual_revenue,number_of_employees:e.number_of_employees,authorized_check:e.authorized_check,job_title_of_applicant:e.job_title_of_applicant,name_of_applicant:e.name_of_applicant,date_of_application:e.date_of_application};t.receive_currencies.includes("Don't wish to receive")&&(delete t.receive_currencies,t.receive_currencies=null);const{currentScreen:i,businessProfileSubmitRequest:n,changeScreen:o,screens:a,timeline:s}=this.props;this.props.activateLoader(),(0,y.TE)(this.formID,e);let r=await n(t);r&&r.data&&r.data.success?o(x.vtj,i,a,s):this.props.disableLoader()},this.handleChangeCurrencyYouWantToRecieve=e=>{if(e)if(1===e.length&&"Don't wish to receive"===e[0].key)this.currency_options=[],this.currency_options=[...Li],this.currency_options=[this.currency_options.shift()];else if(e.length>1&&e.includes("Don't wish to receive")){this.currency_options=[...Li];let e=[this.currency_options.shift()];this.currency_options=e,this.props.dispatch((0,D.Zg)(n.Plk,"receive_currencies",e))}else this.props.dispatch((0,D.Zg)(n.Plk,"receive_currencies",e)),this.currency_options=[...Li];else this.props.dispatch((0,D.Zg)(n.Plk,"receive_currencies",[])),this.currency_options=[...Li]},this.state={},this.currency_options=[...Li]}render(){var e,t,i,n,o,s,r,l;const{handleSubmit:c}=this.props;return(0,a.jsx)("form",{onSubmit:c(this.submitBusinessProfile),className:"common-form company-details",encType:"multipart/form-data",id:"form-company-documents",onKeyUp:y.jN,onKeyPress:y.jN,children:(0,a.jsxs)(d.A,{children:[(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsxs)(d.A.Column,{className:"header-col bor-bottom1",children:[(0,a.jsxs)("div",{className:"header-normal center-align back-btn-title",children:[(0,a.jsx)(se.A,{}),(0,a.jsx)("h2",{className:"form-title",children:"Business profile"})]}),(0,a.jsx)("div",{className:"form-sub-head center-align",children:"Read the below information to move to the next step "})]})}),(0,a.jsx)(d.A.Row,{className:"no-padding1",children:(0,a.jsx)(d.A.Column,{children:(0,a.jsxs)(K.A,{raised:!0,className:"form-card-container nobor noshadow",children:[(0,a.jsx)(q.A,{color:"blue",percent:48,attached:"top",active:!0,className:"hidebtn"}),(0,a.jsxs)(d.A,{container:!0,className:"form-grid right-to-left-anime inner-grid",centered:!0,children:[(0,a.jsx)(d.A.Row,{className:"payee-details-inputs",children:(0,a.jsx)(d.A.Column,{className:"payee-details-column",computer:15,mobile:16,tablet:16,children:(0,a.jsx)(d.A,{children:(0,a.jsxs)(d.A.Row,{className:"form-row",children:[(0,a.jsx)(d.A.Column,{width:16,children:(0,a.jsx)("div",{className:"form-flow-header",children:(0,a.jsx)("h2",{children:"Business profile details"})})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(e=this.props.getAllformVal)||void 0===e?void 0:e.send_countries,name:"send_countries",type:"text",multiple:!0,component:Z.A,placeholder:"Countries you will send money to",isSearchable:!0,validate:[L.mw],className:"theme-dropdown",url:`${f.H$}/countries/dropdown`})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(t=this.props.getAllformVal)||void 0===t?void 0:t.receive_currencies,name:"receive_currencies",type:"text",multiple:!0,isSearchable:!1,component:Z.A,placeholder:"Currencies you want to re
1651ceive",onDropdownChange:this.handleChangeCurrencyYouWantToRecieve,className:"theme-dropdown",validate:[L.mw],staticValues:this.currency_options})}),(0,a.jsxs)(d.A.Column,{computer:7,tablet:8,mobile:16,children:[(0,a.jsx)(te.A,{bindToThisObject:null===(i=this.props.getAllformVal)||void 0===i?void 0:i.previous_year_annual_revenue,name:"previous_year_annual_revenue",type:"text",component:Z.A,placeholder:"Company\u2019s last year annual revenue",validate:[L.mw],className:"theme-dropdown",url:f.H$+"/instarem-objects/dropdown?type=LAST_YEAR_ANNUAL_REVENUE&account_type=CORPORATE&country_code=US"}),(0,a.jsx)("p",{className:"extraTextMargin",children:"Revenue is the total income from all sources - sales, funding, investors, etc. -- before any expenses are subtracted"})]}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(n=this.props.getAllformVal)||void 0===n?void 0:n.number_of_employees,name:"number_of_employees",type:"text",component:Z.A,placeholder:"Number of employees",validate:[L.mw],className:"theme-dropdown",url:f.H$+"/instarem-objects/dropdown?type=NUMBER_OF_EMPLOYEES&account_type=CORPORATE&country_code=US"})}),(0,a.jsx)(d.A.Column,{computer:24,tablet:8,mobile:16,children:(0,a.jsx)(J.A,{label:"I confirm that I am the authorized account representative of the business account and certify to the best of my knowledge, the accuracy of the information provided",name:"authorized_check",checked:null===(o=this.props.getAllformVal)||void 0===o?void 0:o.authorized_check})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(s=this.props.getAllformVal)||void 0===s?void 0:s.name_of_applicant,name:"name_of_applicant",type:"text",className:"input form-flow",component:X.A,validate:[L.mw,L.Ax],placeholder:"Name"})}),(0,a.jsx)(d.A.Column,{computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(r=this.props.getAllformVal)||void 0===r?void 0:r.job_title_of_applicant,name:"job_title_of_applicant",type:"text",className:"input form-flow",component:X.A,validate:[L.mw],placeholder:"Job title"})}),(0,a.jsx)(d.A.Column,{className:"dateField",computer:7,tablet:8,mobile:16,children:(0,a.jsx)(te.A,{bindToThisObject:null===(l=this.props.getAllformVal)||void 0===l?void 0:l.date_of_application,name:"date_of_application",type:"text",className:"input form-flow ",component:ee.A,validate:[L.mw],placeholder:"Date",parse:e=>e&&W()(e).format("YYYY-MM-DD"),disabled:!0})})]})})})}),(0,a.jsx)("button",{id:"submit",className:"longSubmitButton blue_percentage_48 saveandcontinue",children:"Save and continue"})]})]})})})]})})}}const Mi=(0,u.A)({form:n.Plk,onSubmitFail:j.Nc})(Fi),Pi=(0,c.Ng)(function(e){let t=(0,m.A)(n.Plk)(e);const{rootReducer:{userDataReducer:{userStateInfo:{remitterDetails:i}},documentDataReducer:{uploadDocConfig:o,documentDetails:a},userFlowReducer:{screens:s,currentScreen:r,timeline:l}}}=e;return{documents:a,getAllformVal:t,screens:s,currentScreen:r,timeline:l,uploadDocConfig:o,thisFormData:i}},{businessProfileSubmitRequest:ce.br,formValues:Ye.A,changeScreen:h.Xh,getUploadDocConfig:_.mp,activateLoader:j.LI,disableLoader:j.MV,showMessage:g.rG})(Mi);var $i=i(62727),Ui=i(12916),Vi=i(26376),Bi=i(56080),Yi=i(53894);Qt.Ay.div` 1652 display: flex; 1653 flex-direction: column; 1654 align-items: center; 1655`;const Hi=Qt.Ay.div` 1656 margin-top: 20px; 1657 .helperText { 1658 margin-top: 4px; 1659 font-size: 14px; 1660 line-height: 22px; 1661 font-family: ${si.F.hellix.regular}; 1662 color: ${Xt.A.textGrey}; 1663 } 1664`,zi=Qt.Ay.div` 1665 text-align: center; 1666 font-size: 28px; 1667 font-family: ${si.F.hellix.bold}; 1668 line-height: 38px; 1669 padding: 0 16px; 1670 margin-top: -39px; 1671 color: ${Xt.A.black}; 1672 max-width: 550px; 1673 @media ${ri.A.mobileXL} { 1674 max-width: 320px; 1675 font-size: 18px; 1676 } 1677`,Gi=Qt.Ay.div` 1678 width: 100%; 1679 display: flex; 1680 justify-content: space-between; 1681 align-items: flex-start; 1682 flex-direction: ${e=>{let{flexDirection:t}=e;return t?"row":"column"}}; 1683 padding: ${e=>{let{padding:t}=e;return(0,Yi.FZ)(t)}}; 1684 display: ${e=>{let{shouldHide:t}=e;return t?"none":"flex"}}; 1685 @media ${ri.A.mobileS} { 1686 flex-direction: column; 1687 } 1688`,qi=Qt.Ay.div` 1689 width: ${e=>e.width}px; 1690 1691 div[class*='makeStyles-formControl'] { 1692 margin: 0 !important; 1693 } 1694 div[class*='jss'] { 1695 margin: 0 !important; 1696 } 1697 1698 .MuiInputBase-root, 1699 [class*='outlinedDropdownField__OutlinedDropdown'] { 1700 width: ${e=>{let{isHalfColumn:t}=e;return t?"100%":"450px"}} !important; 1701 } 1702 label.label-color, 1703 label.MuiFormLabel-root { 1704 font-size: 16px !important; 1705 line-height: 17px !important; 1706 } 1707 label.Mui-error { 1708 color: ${Xt.A.newerror} !important; 1709 } 1710 label.Mui-focused { 1711 margin-top: -3px !important; 1712 } 1713 .MuiFormControl-root { 1714 height: 50px; 1715 margin-bottom: 0; 1716 } 1717 div.Mui-focused { 1718 outline: none !important; 1719 border: none !important; 1720 } 1721 margin: 0; 1722 .div-160 { 1723 width: 160px !important; 1724 } 1725 1726 .addressErrorMsg { 1727 color: ${Xt.A.red}; 1728 } 1729 1730 .input-error-wrapper { 1731 div { 1732 height: auto; 1733 margin-bottom: 0; 1734 }
1735 #issuing-country { 1736 width: 100%; 1737 } 1738 span { 1739 margin-bottom: 0; 1740 } 1741 } 1742 1743 span.error-msg { 1744 margin-top: 5px; 1745 color: ${Xt.A.newerror}; 1746 font-size: 12px; 1747 } 1748 .form-text-field, 1749 .input.form-flow { 1750 width: 100%; 1751 .input { 1752 width: 100%; 1753 } 1754 label { 1755 background-color: ${Xt.A.white}; 1756 padding: 0 5px; 1757 margin: -14px 10px; 1758 } 1759 input { 1760 width: 100%; 1761 height: 50px; 1762 border: 1px solid ${Xt.A.textDarkGray}; 1763 border-radius: 3px; 1764 &:focus { 1765 border: 1px solid ${Xt.A.black}; 1766 border-radius: 3px; 1767 } 1768 &:hover { 1769 border: 1px solid ${Xt.A.black}; 1770 border-radius: 3px; 1771 } 1772 } 1773 } 1774 .date-picker-label { 1775 margin: -8px 10px; 1776 padding: 0 5px; 1777 background: ${Xt.A.white}; 1778 } 1779 .react-datepicker-wrapper { 1780 border: 1px solid ${Xt.A.textDarkGray}; 1781 border-radius: 3px; 1782 .react-datepicker__input-container { 1783 padding: 15px 10px !important; 1784 border: none !important; 1785 } 1786 } 1787 1788 @media ${ri.A.mobileXL} { 1789 width: 400px !important; 1790 .MuiInputBase-root, 1791 [class*='outlinedDropdownField__OutlinedDropdown'] { 1792 width: 400px !important; 1793 } 1794 } 1795 @media ${ri.A.mobileL} { 1796 width: 350px !important; 1797 .MuiInputBase-root, 1798 [class*='outlinedDropdownField__OutlinedDropdown'] { 1799 width: 350px !important; 1800 } 1801 } 1802 @media ${ri.A.mobileM} { 1803 width: 300px !important; 1804 .MuiInputBase-root, 1805 [class*='outlinedDropdownField__OutlinedDropdown'] { 1806 width: 300px !important; 1807 } 1808 } 1809 @media ${ri.A.mobileS} { 1810 width: 250px !important; 1811 .MuiInputBase-root, 1812 [class*='outlinedDropdownField__OutlinedDropdown'] { 1813 width: 250px !important; 1814 } 1815 } 1816`,Ki=Qt.Ay.div` 1817 padding: ${e=>{let{padding:t}=e;return(0,Yi.FZ)(t)}}; 1818 display: flex; 1819 justify-content: flex-start; 1820 align-items: center; 1821 flex-direction: column; 1822 1823 input[type='file'] { 1824 opacity: 0 !important; 1825 position: absolute !important; 1826 } 1827 .accountImage { 1828 margin-top: 36px; 1829 } 1830 input { 1831 &:focus { 1832 font-family: ${si.F.hellix.regular} !important; 1833 } 1834 &:not(:placeholder-shown):not(:focus) { 1835 border-color: ${Xt.A.borderGrey}; 1836 font-family: ${si.F.hellix.regular} !important; 1837 } 1838 ::-webkit-input-placeholder { 1839 /* Chrome/Opera/Safari */ 1840 color: ${Xt.A.disabled} !important; 1841 text-transform: none !important; 1842 } 1843 ::-moz-placeholder { 1844 /* Firefox 19+ */ 1845 color: ${Xt.A.disabled} !important; 1846 text-transform: none !important; 1847 } 1848 :-ms-input-placeholder { 1849 /* IE 10+ */ 1850 color: ${Xt.A.disabled} !important; 1851 text-transform: none !important; 1852 } 1853 :-moz-placeholder { 1854 /* Firefox 18- */ 1855 color: ${Xt.A.disabled} !important; 1856 text-transform: none !important; 1857 } 1858 } 1859 .navigationContainer { 1860 display: grid; 1861 grid-template-columns: 1fr 1fr 1fr; 1862 width: 100%; 1863 align-items: center; 1864 justify-content: center; 1865 z-index: 2; 1866 1867 .backButton { 1868 grid-column: 1; 1869 cursor: pointer; 1870 } 1871 .closeButton { 1872 grid-column: 3; 1873 cursor: pointer; 1874 } 1875 * { 1876 justify-self: center; 1877 } 1878 @media ${ri.A.mobileToTabletXL} { 1879 grid-template-columns: 0fr 1fr 1fr; 1880 } 1881 @media ${ri.A.mobileXL} { 1882 margin-top: 8px; 1883 grid-template-columns: 0fr 1fr 1fr; 1884 1885 .closeButton { 1886 justify-self: right; 1887 margin-right: 15px; 1888 } 1889 } 1890 } 1891 1892 @media ${ri.A.mobileXL} { 1893 width: 100%; 1894 margin: 0; 1895 padding: ${e=>{let{padding:t}=e;return(0,Yi.FZ)(t)}}; 1896 } 1897`,Qi=Qt.Ay.div` 1898 font-size: 12px; 1899 font-family: ${si.F.hellix.regular}; 1900 line-height: 18px; 1901`,Wi=Qt.Ay.div` 1902 font-size: 18px; 1903 font-family: ${si.F.hellix.bold}; 1904 line-height: 26px; 1905 margin-bottom: 36px; 1906`,Xi=Qt.Ay.div` 1907 font-size: 16px; 1908 font-family: ${si.F.hellix.regular}; 1909 line-height: 22px; 1910 text-align: center; 1911 margin-bottom: 36px; 1912 max-width: 369px; 1913 white-space: ${e=>{let{isAustracCase:t}=e;return t?"pre-line":"normal"}}; 1914`;var Zi=i(61338),Ji=i(24480),en=i(13432),tn=i(78955),nn=i(69510),on=i(12335),an=i(48111);Qt.Ay.div` 1915 display: flex; 1916 flex-direction: column; 1917 align-items: center; 1918 justify-content: center; 1919`;const sn=Qt.Ay.div` 1920 font-family: ${si.F.hellix.bold}; 1921 margin: 3px 0; 1922 display: flex; 1923 justify-content: flex-start; 1924 width: 450px; 1925 align-items: center; 1926 color: ${Xt.A.darkBlue}; 1927 line-height: 24px; 1928 font-size: 16px; 1929 cursor: pointer; 1930 1931 @media ${ri.A.mobileXL} { 1932 width: 400px; 1933 } 1934 1935 @media ${ri.A.mobileL} { 1936 width: 350px !important; 1937 } 1938 @media ${ri.A.mobileM} { 1939 width: 300px !important; 1940 } 1941`,rn=Qt.Ay.div` 1942 display: flex; 1943 flex-direction: column; 1944 align-items: center; 1945 justify-content: center; 1946 max-width: 450px; 1947 1948 ${an.OF} { 1949 width: 450px !important ; 1950 } 1951 @media ${ri.A.mobileXL} { 1952 ${an.OF} { 1953 width: 320px !important; 1954 } 1955 } 1956 1957 @media ${ri.A.mobileM} { 1958 ${an.OF} { 1959 width: unset !important; 1960 } 1961 } 1962`,ln=Qt.Ay.div` 1963 display: flex; 1964 justify-content: center; 1965 margin: 16px 0 28px; 1966`,dn=Qt.Ay.div` 1967 margin-right: 45px; 1968 @media ${ri.A.mobileL} { 1969 margin-right: 0; 1970 } 1971`,cn=(0,u.A)({form:Bi.sM,onSubmitFail:j.Nc})(e=>{const{getAllformVal:t,retrievedValues:i,initialize:n,addressConfig:s,handleSubmit:r,userAddress:l}=e,[d,c]=(0,o.useState)([]),{unit_number:u,street_number:m,street_name:p,building_name:h,building_number:_,suburb:x,state:v,city:f,postcode:y,province:b,address1:g,address2:j}=i||{},A={unit_number:u,street_number:m,street_name:p,building_name:h,building_number:_,suburb:x,state:v,city:f,postcode:y,province:b,address1:g,address2:j};return(0,o.useEffect)(()=>{l?null===n||void 0===n||n(l):i&&(null===n||void 0===n||n(A));const e=(0,tn.sr)(s);e&&c(e||[])},[]),(0,a.jsx)(dn,{children:(0,a.jsx)("form",{onSubmit:r,children:null===d||void 0===d?void 0:d.map((e,i)=>{switch(e.type){case"text":return(0,a.jsx)(Gi,{padding:[13,0,13,0],children:(0,a.jsx)(qi,{width:400,children:(0,a.jsx)(te.A,{bindToThisObject:t?t[e.field]:null,name:e.field,type:"text",parentClassName:"form-text-field",component:on.JS,maxWidth:"450px",validate:e.validate,normalize:e.normalize,label:e.placeholder,placeholder:e.placeholder,showLabel:!0,disableUnderlineStyling:!0})})});case"dropdown":return(0,a.jsx)(Gi,{padding:[13,0,13,0],children:(0,a.jsx)(qi,{width:450,children:(0,a.jsx)(te.A,{bindToThisObject:t?t[e.field]:null,name:e.field,type:"text",component:nn.A,className:"theme-dropdown",url:`${e.url}`,validate:e.validate,normalize:e.normalize,placeholder:e.placeholder})})});default:return(0,a.jsx)(a.Fragment,{})}})})})}),un=(0,u.A)({form:Bi.sM,onSubmitFail:j.Nc})(e=>{var t;const{handleSubmitAddress:i,documentList:n,handleSubmit:s,userAddress:r,setUserAddress:l}=e,[d,u]=(0,o.useState)(!1),[p,h]=(0,o.useState)(),_=(0,c.d4)(e=>(0,m.A)(Bi.sM)(e)),x=(0,c.d4)(Ui.gI),v=(0,c.d4)(Ui.$J),f=null===v||void 0===v||null===(t=v.transactionDetail
1971s)||void 0===t?void 0:t.selectedBene,y=[x,null===f||void 0===f?void 0:f.bank_account_country].includes("AU");return(0,o.useEffect)(()=>{(0,ui.zU)(mi.V6.SCREEN_VIEWED,{pageName:mi.Ys.AddressCollectionPage}),r&&(h(r),u(!0))},[]),(0,a.jsxs)(rn,{children:[d?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(cn,{addressConfig:null===n||void 0===n?void 0:n.fields_json,getAllformVal:_,retrievedValues:p,handleSubmit:s,userAddress:r}),(0,a.jsx)(ln,{children:(0,a.jsx)(Zi.A,{text:Bi.g$.ADDRESS.goSearch,type:"link",onClick:()=>{const e={type:mi.zY.BUTTON,ctaName:Bi.g$.ADDRESS.goSearch,section:mi.XQ.ADDRESS_VERIFICATION,pageName:mi.Ys.AddressCollectionPage,flowType:mi.UQ.SEND_MONEY};(0,ui.zU)(mi.V6.CTA_CLICKED,e),r&&l(null),u(!1)}})}),(0,a.jsx)(Zi.A,{text:Bi.g$.next,onClick:s(async e=>{const t={type:mi.zY.BUTTON,pageName:mi.Ys.AddressCollectionPage,ctaName:Bi.g$.next,flowType:mi.UQ.BENEFICIARY};(0,ui.zU)(mi.V6.CTA_CLICKED,t);const o=null===n||void 0===n?void 0:n.fields_json.map(e=>e.name),a=Object.fromEntries(Object.entries(e).filter(e=>{let[t,i]=e;return!!i})),s=Object.keys(a).filter(e=>o.includes(e)).reduce((e,t)=>(e[t]=a[t],e),{}),r={code:null===n||void 0===n?void 0:n.code,details:JSON.stringify({...s,...y?{country_code:null===f||void 0===f?void 0:f.bank_account_country}:{}}),document_type:null===n||void 0===n?void 0:n.document_type};await i(r)}),width:450})]}):(0,a.jsx)(a.Fragment,{children:(0,a.jsx)(Ji.A,{newSearchUi:!0,iconPlacement:"left",retrievedValuesCallBack:e=>{h({...en.t,...e}),u(!0)},searchPlaceHolder:Bi.g$.ADDRESS.searchBtn,beneAddressFlow:!0})}),!d&&(0,a.jsx)(sn,{onClick:()=>{const e={type:mi.zY.BUTTON,pageName:mi.Ys.AddressCollectionPage,ctaName:Bi.g$.ADDRESS.enterData,flowType:mi.UQ.BENEFICIARY};(0,ui.zU)(mi.V6.CTA_CLICKED,e),d||h(en.t),u(!d)},children:(0,a.jsx)("span",{children:Bi.g$.ADDRESS.enterData})})]})}),mn=un;var pn=i(41397),hn=i(814);const _n=Qt.Ay.div` 1972 .additionalinfo_wrapper { 1973 align-items: flex-start; 1974 margin-bottom: '48px'; 1975 } 1976 .ui.search.selection.dropdown { 1977 width: 450px; 1978 } 1979 .MuiFormControl-marginNormal { 1980 margin-left: 0; 1981 } 1982`,xn=Qt.Ay.div` 1983 align-items: flex-start; 1984`;Qt.Ay.div` 1985 font-size: 28px; 1986 font-family: ${si.F.hellix.bold}; 1987 line-height: 38px; 1988 margin-bottom: 48px; 1989 text-align: center; 1990 margin-top: -26px; 1991 color: ${Xt.A.black}; 1992 @media ${ri.A.tab} { 1993 margin-top: 0; 1994 } 1995`;var vn=i(10993);const fn=(0,u.A)({form:Bi.sM,onSubmitFail:j.Nc})(e=>{var t;const{data:i,handleDocumentUpload:n,fileBackUploadInputRef:o,fileFrontUploadInputRef:s,frontFilesBase:r,setFrontFilesBase:l,backFilesBase:d,setBackFilesBase:u,frontFiles:m,setFrontFiles:p,backFiles:h,setBackFiles:_,fileErrors:x,setFilesError:v}=e,f=(0,c.wA)();return(0,pn.isEmpty)(null===i||void 0===i?void 0:i.fields_json)?(f((0,g.rG)({text:["Something went wrong"],type:"info"})),(0,a.jsx)(a.Fragment,{})):(0,a.jsx)(_n,{children:(0,a.jsxs)("form",{onSubmit:e.handleSubmit(async()=>{await n(i)}),children:[(0,a.jsx)(xn,{children:null===i||void 0===i||null===(t=i.fields_json)||void 0===t?void 0:t.map((e,t)=>(0,a.jsx)(Gi,{padding:[13,0],children:(0,a.jsx)(qi,{width:450,children:(0,a.jsx)(hn.O,{field:e,isPolandBeneIdentiyNumberRequired:!0})})},"subFields"+t))}),(null===i||void 0===i?void 0:i.show_upload_button)&&(0,a.jsx)("div",{className:"additionalinfo_wrapper",children:(0,a.jsx)(vn.h,{label:"Upload documents",fileFrontUploadInputRef:s,fileBackUploadInputRef:o,setFilesError:v,frontFiles:m,backFiles:h,frontFilesBase:r,backFilesBase:d,setFrontFiles:p,setBackFiles:_,setFrontFilesBase:l,setBackFilesBase:u,fileErrors:x,isBackRequired:null===i||void 0===i?void 0:i.is_back_required})}),(0,a.jsx)(Gi,{padding:[48,0,24,0],children:(0,a.jsx)(qi,{width:450,children:(0,a.jsx)(Zi.A,{text:"Submit",width:450,id:"submit"})})})]})})});var yn=i(46519);const bn=()=>{var e,t;const[i,s]=(0,o.useState)(0),[r,l]=(0,o.useState)([]),[d,u]=(0,o.useState)(),p=(0,o.useRef)(null),f=(0,o.useRef)(null),[b,N]=(0,o.useState)(""),[w,S]=(0,o.useState)(""),[C,T]=(0,o.useState)(),[E,I]=(0,o.useState)(),[R,k]=(0,o.useState)({frontError:"",backError:""}),O=(0,c.wA)(),L=(0,c.d4)(e=>(0,m.A)(Bi.sM)(e)),F=(0,c.d4)(Ui.$J),M=null===F||void 0===F||null===(e=F.transactionDetail
1995s)||void 0===e?void 0:e.selectedBene,P=(0,c.d4)(Ui.gI),$=null===F||void 0===F?void 0:F.sendMoneyData,U=(0,c.d4)(Ui.yi),V=null===U||void 0===U?void 0:U.screens,B=null===U||void 0===U?void 0:U.timeline,Y=null===F||void 0===F||null===(t=F.paymentMethodData)||void 0===t?void 0:t.currentScreen,H=[P,null===M||void 0===M?void 0:M.bank_account_country].includes("AU"),z=null===M||void 0===M?void 0:M.beneficiary_name,G=e=>{O((0,h.Xh)(x.clv,e,V,B,null,!0)),O((0,h.yt)(e,{is_required:!0}))},q=async e=>{var t;const{temp_transaction_id:i,formProps:o,otherInfo:a,selectedBene:s}=$;o.additional_info={...o.additional_info,...e};const r=await O((0,_.wW)(i,{...o},a,s));var l;null!==r&&void 0!==r&&null!==(t=r.data)&&void 0!==t&&t.success?(O((0,_.lm)({beneficiary_additional_info_required:!1})),G(n.GKy)):((0,j.MV)(),null!==r&&void 0!==r&&null!==(l=r.data)&&void 0!==l&&l.data&&O((0,g.rG)({text:[r.data.data.message],type:"info"})))},K=async(e,t)=>{O((0,_.Nf)({isNameVerificationError:e,displayBeneName:t})),O((0,h.Xh)(x.clv,n.O2v,V,B,null,!0)),O((0,h.yt)(n.O2v,{is_required:!1,isIndependent:!0}))},Q=async()=>{O((0,j.LI)());const e=await O((0,v._I)(null===M||void 0===M?void 0:M.beneficiary_id));if(e){var t,i;const o=null===e||void 0===e||null===(t=e.data)||void 0===t||null===(i=t.data)||void 0===i?void 0:i.beneficiary_additional_info;o&&o.length>0?(l(o),O((0,j.MV)())):(O((0,j.LI)()),Y!==n.GKy?null!==M&&void 0!==M&&M.is_validate_vop_enable?(0,yn.m)(O,M,q,K):q():((0,j.MV)(),O((0,_.gM)({isAddressRequired:!1})),O((0,_.bl)({address_required:!1})),G(n.GKy)))}};(0,o.useEffect)(()=>{(0,ui.zU)(mi.V6.SCREEN_VIEWED,{pageName:mi.Ys.AdressPage}),Q()},[]);const W=async e=>{var t;O((0,j.LI)());const n=await O((0,Vi.T)(e,null===M||void 0===M?void 0:M.beneficiary_id));null!==n&&void 0!==n&&null!==(t=n.data)&&void 0!==t&&t.success&&(i<(null===r||void 0===r?void 0:r.length)?s(e=>e+1):Q(),O((0,j.eG)()),O((0,j.MV)()))},X=async e=>{const t=L&&Object.fromEntries(Object.entries(L).filter(e=>{let[t,i]=e;return null!=i})),n=[{fieldname:"front_document",is_back_document:!1},...e.is_back_required?[{fieldname:"back_document",is_back_document:!0}]:[]],o={...(null===e||void 0===e?void 0:e.show_upload_button)&&{front_document:null===C||void 0===C?void 0:C[0]},...(null===E||void 0===E?void 0:E[0])&&{back_document:E[0]},code:null===e||void 0===e?void 0:e.code,details:JSON.stringify(t),document_type:null===e||void 0===e?void 0:e.document_type,...(null===e||void 0===e?void 0:e.show_upload_button)&&{documents:JSON.stringify(n)}};if(null!==e&&void 0!==e&&e.show_upload_button&&(!C||e.is_back_required&&!E))k({frontError:C?"":"Required",backError:e.is_back_required&&!E?"Required":""});else{var a;O((0,j.LI)());const e=await O((0,Vi.T)(o,null===M||void 0===M?void 0:M.beneficiary_id));null!==e&&void 0!==e&&null!==(a=e.data)&&void 0!==a&&a.success&&(i<(null===r||void 0===r?void 0:r.length)?(T(null),I(null),k({frontError:"",backError:""}),O((0,D.cL)(Bi.sM)),s(e=>e+1),O((0,j.eG)()),O((0,j.MV)())):Q()),O((0,j.MV)())}};return(0,a.jsxs)(Ki,{padding:[36,20],children:[(0,a.jsx)("div",{className:"navigationContainer",children:(0,a.jsx)("img",{className:"backButton",src:A.E71,alt:"back",onClick:()=>{const e={type:mi.zY.BACK,pageName:Y!==n.GKy?mi.Bi.SEND_MONEY:mi.Bi.PAYMENT_METHOD,flowType:mi.UQ.BENEFICIARY};(0,ui.zU)(mi.V6.CTA_CLICKED,e),i<1?(O((0,j.LI)()),Y!==n.GKy?G(n.BJY):G(n.GKy),O((0,j.MV)())):(s(0),T(null),I(null),k({frontError:"",backError:""}))}})}),i<1?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(zi,{children:Bi.g$.heading}),(0,a.jsx)("img",{className:"accountImage",src:A.X2,alt:"additional-info-bene"}),(0,a.jsx)(Qi,{children:Bi.g$.sendingMoneyTo}),(0,a.jsx)(Wi,{children:null===M||void 0===M?void 0:M.beneficiary_name}),(0,a.jsx)(Xi,{isAustracCase:!0,children:H?Bi.g$.descriptionAustrac:(0,y.Ym)(Bi.g$.description,{NAME:z})}),(0,a.jsx)(Zi.A,{text:Bi.g$.continueBtn,onClick:()=>{const e={type:mi.zY.BUTTON,pageName:mi.Bi.SEND_MONEY,ctaName:Bi.g$.continueBtn,flowType:mi.UQ.BENEFICIARY};(0,ui.zU)(mi.V6.CTA_CLICKED,e),s(e=>e+1)}})]}):(0,a.jsx)(a.Fragment,{children:(()=>{if((null===r||void 0===r?void 0:r.length)>0&&i<=(null===r||void 0===r?void 0:r.length)){var e,t;const n=r[i-1];return null!==n&&void 0!==n&&null!==(e=n.code)&&void 0!==e&&null!==(t=e.toLowerCase())&&void 0!==t&&t.includes("address")?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(zi,{children:`${null===M||void 0===M?void 0:M.benef
1995iciary_name} ${Bi.g$.ADDRESS.addresRequired}`}),(0,a.jsx)(Xi,{children:Bi.g$.ADDRESS.description}),(0,a.jsx)(mn,{documentList:n,handleSubmitAddress:W,userAddress:d,setUserAddress:u})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(zi,{children:`${z} ${Bi.g$.DOCUMENTS.documentsRequired}`}),(0,a.jsx)(Xi,{children:Bi.g$.DOCUMENTS.description}),(0,a.jsx)(fn,{data:n,handleDocumentUpload:X,dispatch:O,fileFrontUploadInputRef:f,fileBackUploadInputRef:p,setFilesError:k,frontFiles:C,backFiles:E,frontFilesBase:b,backFilesBase:w,setFrontFiles:T,setBackFiles:I,setFrontFilesBase:N,setBackFilesBase:S,fileErrors:R})]})}})()})]})};var gn=i(8656),jn=i(17391),An=i(19225),Nn=i(73968),wn=i(82675),Sn=i(9374);const Cn=e=>{let{account_type:t,bank_account_country:i,currency_code:o,isBeneSchemaApplicable:s,beneSchemaBeneNameField:r,formValues:l}=e;const d=((null===l||void 0===l?void 0:l.beneficiary_name)||"").trim(),c=d.length>2&&/^\S+$/.test(d)?Sn.BJ:An.KU,u=()=>{if(t===n.a6V){if(n.qDl.includes(i)&&"USD"===o)return 100;if("CN"===i&&"CNY"===o)return 60}return 50};let m=!1,h=!1;t===n.a6V&&"IN"===i&&"INR"===o&&(m=!0),t===n.a6V&&"CN"===i&&"CNY"===o&&(h=!0);const _=[L.mw,L.$2],x=[L.mw,L.xR],v=[L.mw,L.w9],f=()=>m?_:h?x:v;return s&&l?(0,a.jsxs)(Nn.ky,{children:[(0,wn.$S)(r,{formValues:l,applyInFieldValidation:!0}),(0,a.jsx)(Nn.CE,{children:c})]}):t===n.a6V?(0,a.jsx)(Yi.fv,{width:450,children:(0,a.jsx)(te.A,{name:"company_name",type:"text",component:p.JS,normalize:(0,L.YR)(u()),validate:f,placeholder:"Company name"})}):t===n.sOf?(0,a.jsxs)(Nn.ky,{children:[(0,a.jsx)(Yi.fv,{width:450,children:(0,a.jsx)(te.A,{name:"beneficiary_name",type:"text",component:p.JS,normalize:(0,L.YR)(60),validate:L.Oq,placeholder:"Full name"})}),(0,a.jsx)(Nn.CE,{children:c})]}):(0,a.jsx)(a.Fragment,{})};var Dn=i(14048),Tn=i(1472);const En=e=>{let{currency_code:t,additionalFields:i,current_bank_fields:n,debit_card_details:s,beneWalletDetails:r,bank_validations:l,remitter_country:d,bank_account_country:u,debit_validations:m,wallet_validations:h,beneCashPayoutDetails:_,formValues:x,payout_method:v,storeValidationConfig:f}=e;const y=(0,c.wA)(),b=(n&&s||n||r||_)&&t&&(n||_);return(0,o.useEffect)(()=>{const e="LOCAL"===v?"bank":null===v||void 0===v?void 0:v.toLowerCase(),t=(0,An.MI)(e,m,l,h);y((0,D.Zg)(An.kA,"bank_card_validations",t))},[y,v]),(0,a.jsxs)(Yi.fv,{width:450,children:[t&&i&&(0,a.jsx)(p.sY,{renderFields:i,formValues:x,renderAdditionalField:!0,dispatch:y,currency_code:t,formName:An.kA,hideRecipientReceivingOptions:!0,isVopTransactionFlow:!0}),b&&(0,a.jsx)(p.sY,{fields:n,renderFields:n,debitCardFields:s,formValues:x,dispatch:y,currency_code:t||"INR",formName:An.kA,countryCode:d,bank_account_country:u,isBlock:!0,bank_validations:l,debit_validations:m,wallet_validations:h,beneCashPayoutDetails:_,beneWalletDetails:null===r||void 0===r?void 0:r.BANK_DETAIL,isSingleRowField:!0,hideRecipientReceivingOptions:!0,onCountryCurrencyPairChange:f,isVopTransactionFlow:!0})]})};var In=i(79899),Rn=i(6320),kn=i(97042),On=i(160),Ln=i(46269);const Fn=e=>{let{children:t,...i}=e;const[n,a]=(0,o.useState)({beneficiary_bank_validations:null,bene_schema_validation:null}),s=(0,c.d4)(Ui.$J),{selectedBene:r}=(null===s||void 0===s?void 0:s.sendMoneyData)||{},{bank_account_country:l,country_of_business:d,currency_code:u,account_type:m}=r||{},p=(0,o.useCallback)(()=>{const{beneficiary_bank_validations:e,bene_schema_validation:t}=n;return{beneficiary_bank_validations:e,bene_schema_validation:t}},[n]),h=(0,o.useCallback)(async(e,t)=>{const i={...e},n={...t};a({beneficiary_bank_validations:i,bene_schema_validation:n})},[]);return o.cloneElement(t,{...i,getValidationConfig:p,storeValidationConfig:h,validationState:n,reduxData:{bank_account_country:l,country_of_business:d,currency_code:u,account_type:m,formName:An.kA}})},Mn=(0,u.A)({form:An.kA,validate:(e,t)=>(0,An.tf)(t.getValidationConfig,t.reduxData)(e),asyncValidate:(e,t,i)=>(0,An.vT)(i.reduxData)(e,t),asyncBlurFields:An.j2,onSubmitFail:Dn.Nc})(e=>{let{handleSubmit:t,storeValidationConfig:i,formValues:s}=e;const[r,l]=(0,o.useState)(),[d,u]=(0,o.useState)(),[m,h]=(0,o.useState)(),[v,f]=(0,o.useState)(),[b,g]=(0,o.useState)({}),j=(0,c.d4)(Ui.$J),N=(0,c.d4)(Ui.yi),w=(0,c.d4)(Ui.gI),{isNameVerificationError:S,selectedBene:C,displayBeneName:T}=(null===j||void 0===j?void 0:j.sendMoneyData)||{},{beneficiary_name:E,account_type:I,bank_account_country:R,currency_code:k,routing_config_type:O,payout_method:F}=C||{},M=null===C||void 0===C?void 0:C.beneficiary_id,{screens:P,timeline:$}=N,U=(0,c.d4)(Ui.$J),V=null===U||void 0===U?void 0:U.sendMoneyData,{source_currency:B}
1995=(null===U||void 0===U?void 0:U.transactionDetails)||{},Y=(0,c.wA)(),H=An.Sq,{details_selected:z}=s||{},G=(0,o.useMemo)(()=>(0,Tn.E)(n.WEr)&&(0,Tn.I)(n.WEr)||[],[]),q=(0,o.useMemo)(()=>(0,y.pc)(G,R,k),[R,k,G]),K=(0,o.useCallback)(async()=>{var e;Y((0,Dn.LI)());const t=q?kn.YR:kn._I,i=await Y(t(M)),n=null===i||void 0===i||null===(e=i.data)||void 0===e?void 0:e.data,o="LOCAL"===F?"bank":null===F||void 0===F?void 0:F.toLowerCase();if(n){f(n);const e=(null===n||void 0===n?void 0:n.beneficiary_name)||(null===n||void 0===n?void 0:n.full_name);Y((0,D.n_)(An.kA,{...n,details_selected:q?F:o,beneficiary_name:e,bank_account_country:(null===n||void 0===n?void 0:n.destination_country)||(null===n||void 0===n?void 0:n.bank_account_country)}))}Y((0,Dn.MV)())},[]);(0,o.useEffect)(()=>{const e="LOCAL"===F?"bank":null===F||void 0===F?void 0:F.toLowerCase();Y((0,D.Zg)(An.kA,"details_selected",q?F:e))},[q,F,Y]);const[Q,W]=(0,o.useState)(!1);(0,o.useEffect)(()=>{(!(0,pn.isEmpty)(m)||!(0,pn.isEmpty)(r)&&d)&&(z&&M&&F)&&!Q&&W(!0)},[m,r,d,z,M,F,Q]),(0,o.useEffect)(()=>{Q&&K()},[Q,K]);const X=e=>{let t,o,a,s=null,r=null,l=null,d=null;if(s=e.filter(e=>"BANK"===e.routing_config_type),r=e.filter(e=>n.dqv.includes(e.routing_config_type)),l=e.filter(e=>n.bMJ.includes(e.routing_config_type)),d=e.filter(e=>"WALLET"===e.routing_config_type),r&&(r=r[0]),s&&(s=s[0]),l&&(l=l[0]),d&&(d=d[0]),s){let{BANK_DETAIL:e,ADDITIONAL_DETAIL:n,beneficiary_routing_config_id:r}=s;a=r,t=e,o=n,null===i||void 0===i||i({...t,...o}),g(e=>({...e,bank_validations:{...t,...o}}))}let c=null,u=null;if(r){let{BANK_DETAIL:e,ADDITIONAL_DETAIL:t,beneficiary_routing_config_id:n}=r;c=n,null===i||void 0===i||i({...e,...t}),g(i=>({...i,debit_validations:{...e,...t}})),u=t}let m=null;l&&(m=l.beneficiary_routing_config_id);let p=null,h=null;if(d){let{BANK_DETAIL:e,ADDITIONAL_DETAIL:t,beneficiary_routing_config_id:n}=d;null===i||void 0===i||i({...e,...t}),g(i=>({...i,wallet_validations:{...e,...t}})),h=t,p=n}g(e=>({...e,current_bank_fields:t,additionalFields:o||u||h,config_id:a,debit_config_id:c,debit_card_details:r,beneCashPayoutDetails:l,cash_payout_config:m,wallet_config:p,beneWalletDetails:d}))},Z=(0,o.useCallback)(async()=>{Y((0,Dn.LI)());const e=await Y((0,Rn.su)({bank_account_country:R,currency_code:k,account_type:I},F,O));(0,pn.isEmpty)(e)||u(e),Y((0,Dn.MV)())},[Y,k,R,I,O,F]),J=(0,o.useCallback)(async()=>{var e;Y((0,Dn.LI)());const t=await Y((0,In.ug)(R,k,I)),i=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.data;(0,pn.isEmpty)(i)||(X(i),l(i)),Y((0,Dn.MV)())},[Y,k,R,I,O]),ee=(0,o.useCallback)(async()=>{var e;Y((0,Dn.LI)());const t=await Y((0,In.Ms)(R,k,I)),i=null===t||void 0===t||null===(e=t.data)||void 0===e?void 0:e.data;(0,pn.isEmpty)(i)||(h(i),X(i)),Y((0,Dn.MV)())},[k,R,I,i]);(0,o.useEffect)(()=>{q?(J(),Z()):ee()},[q,J,Z,ee]);const ie=e=>{Y((0,jn.Xh)(x.clv,e,P,$,null,!0)),Y((0,jn.yt)(e,{is_required:!0}))},ne=async(e,t)=>{Y((0,_.Nf)({isNameVerificationError:e,displayBeneName:t}))},oe=async e=>{var t;const{temp_transaction_id:i,formProps:o,otherInfo:a,selectedBene:s}=V;Y((0,Dn.LI)()),o.additional_info={...o.additional_info,...e};const r=await Y((0,In.wW)(i,{...o},a,s));var l;null!==r&&void 0!==r&&null!==(t=r.data)&&void 0!==t&&t.success?ie(n.GKy):((0,Dn.MV)(),null!==r&&void 0!==r&&null!==(l=r.data)&&void 0!==l&&l.data&&Y((0,On.r)({text:[r.data.data.message],type:"info"})))},ae=()=>{var e;return(0,a.jsx)(Cn,{account_type:I,bank_account_country:R,currency_code:k,isBeneSchemaApplicable:q,beneSchemaBeneNameField:null===d||void 0===d||null===(e=d.personal_details)||void 0===e?void 0:e.beneficiary_name,formValues:s})},se=()=>{if("PL"===R&&"EUR"===k)return(0,a.jsx)(Hi,{children:(0,a.jsxs)(Yi.fv,{width:450,children:[(0,a.jsx)(te.A,{name:"beneficiary_identity_number",type:"text",component:p.JS,maxWidth:"100%",normalize:(0,L.YR)(18),validate:[L.mw,L.Uo],placeholder:"Identity number"}),(0,a.jsx)(Nn.CE,{children:An.$v})]})})};return(0,a.jsxs)(Ki,{padding:[36,20],children:[(0,a.jsx)("div",{className:"navigationContainer",children:(0,a.jsx)("img",{className:"backButton",src:A.E71,alt:"back",onClick:()=>{const e={type:mi.zY.BACK,pageName:mi.Bi.SEND_MONEY,flowType:n.UQm.TRANSACTION};(0,ui.zU)(mi.V6.CTA_CLICKED,e),Y((0,D.zr)(An.kA)),ie(n.BJY)}})}),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(zi,{children:H.heading.replace("{RECIPIENT_NAME}",E)}
1995),(0,a.jsx)(Nn.VY,{children:S?H.nameDescription:H.bankDetailsDescription}),(0,a.jsxs)(Nn.zy,{onSubmit:t(async e=>{var t,i;Y((0,Dn.LI)());const n=(0,An.b6)(e);let o;if(o=q?await Y((0,An.ml)({...n,currency_code:k,bank_account_country:R},M)):await Y((0,An.Yn)(n,M,b)),null!==(t=o)&&void 0!==t&&null!==(i=t.data)&&void 0!==i&&i.success){const e=await Y((0,kn.a0)(null,B)),t=null===e||void 0===e?void 0:e.filter(e=>e.beneficiary_id===M),i=(0,Ln.V)(t||[]);(0,pn.isEmpty)(null===i||void 0===i?void 0:i[0])||Y((0,kt.LG)(i[0])),(async()=>{(0,yn.m)(Y,C,oe,ne)})()}}),children:[S&&T?(0,a.jsxs)(a.Fragment,{children:[ae(),se()]}):(0,a.jsxs)(a.Fragment,{children:[ae(),(0,a.jsx)(Nn.tM,{children:(()=>{const{debit_card_details:e,beneWalletDetails:t,bank_validations:n,debit_validations:o,wallet_validations:l,beneCashPayoutDetails:d,current_bank_fields:c}=b||{};return q&&!(0,pn.isEmpty)(r)&&null!==s&&void 0!==s&&s.details_selected&&!(0,pn.isEmpty)(v)?(0,a.jsx)(gn.A,{beneConfig:r,formValues:{...s,account_type:I,bank_account_country:R,currency_code:k},dispatch:Y,formName:An.kA,currentBeneDetails:v,isVopTransactionFlow:!0,isSingleRowField:!0,onCountryCurrencyPairChange:i}):(0,pn.isEmpty)(m)?(0,a.jsx)(a.Fragment,{}):(0,a.jsx)(En,{currency_code:k,additionalFields:null===m||void 0===m?void 0:m.ADDITIONAL_DETAIL,current_bank_fields:c,debit_card_details:e,beneWalletDetails:t,remitter_country:w,bank_account_country:R,debit_validations:o,wallet_validations:l,bank_validations:n,beneCashPayoutDetails:d,formValues:s,payout_method:F,storeV
1995alidationConfig:i})})()}),se()]}),(0,a.jsx)(Nn.Ef,{children:(0,a.jsx)(p.mU,{text:"Submit",width:450})})]})]})]})});const Pn=(0,c.Ng)(function(e){return{formValues:(0,m.A)(An.kA)(e)||{}}},{})(e=>(0,a.jsx)(Fn,{children:(0,a.jsx)(Mn,{...e})}));var $n=i(80083),Un=i(49171),Vn=i(78325),Bn=i(19533);const Yn=Qt.Ay.div` 1996 display: flex; 1997 flex-direction: column; 1998 align-items: center; 1999 justify-content: center; 2000 height: 100vh; 2001 width: 100%; 2002 2003 .apple-pay-delay-wrapper__header { 2004 font-family: ${Bn.F2.hellix.bold}; 2005 font-weight: 700; 2006 text-align: center; 2007 letter-spacing: 0; 2008 font-size: 28px; 2009 line-height: 38px; 2010 color: ${Bn.lm.black}; 2011 } 2012 .apple-pay-delay-wrapper__description { 2013 text-align: center; 2014 letter-spacing: 0; 2015 font-size: 24px; 2016 line-height: 38px; 2017 color: ${Bn.lm.textGrey}; 2018 } 2019`,Hn=()=>{var e;const t=(0,c.wA)(),i=(0,vt.Zp)(),s=null===(e=(0,c.d4)(Ui.RP))||void 0===e?void 0:e.transaction_number,r=(0,Tn.E)(x.Fgx)?(0,Tn.I)(x.Fgx).delayInMs:n.foj;return(0,o.useEffect)(()=>{t((0,Dn.LI)());const e=setInterval(()=>{t((0,Dn.MV)()),i(`${n.C1b}/acknowledgement/apple-pay/success/`+s)},r);return()=>clearInterval(e)},[r]),(0,a.jsxs)(Yn,{children:[(0,a.jsx)("span",{className:"apple-pay-delay-wrapper__header",children:"Verifying your payment"}),(0,a.jsx)("span",{className:"apple-pay-delay-wrapper__description",children:"This will only take a few moments"})]})},zn=Qt.Ay.div` 2020 min-height: 100vh; 2021 display: flex; 2022 justify-content: center; 2023 font-family: ${Bn.F2.hellix.regular}; 2024`,Gn=Qt.Ay.div` 2025 background: ${Bn.lm.white}; 2026 width: 375px; 2027 padding: 32px 20px 36px; 2028 display: flex; 2029 flex-direction: column; 2030 align-items: center; 2031 gap: 12px; 2032`,qn=Qt.Ay.h1` 2033 font-size: 24px; 2034 font-family: ${Bn.F2.hellix.bold}; 2035 line-height: 1.5; 2036 color: ${Bn.lm.black}; 2037 text-align: center; 2038 width: 335px; 2039 letter-spacing: -0.2px; 2040 white-space: pre-line; 2041`,Kn=Qt.Ay.img` 2042 width: 250px; 2043 height: 178px; 2044 object-fit: contain; 2045`,Qn=Qt.Ay.ul` 2046 width: 335px; 2047 list-style: disc; 2048 padding-left: 24px; 2049 display: flex; 2050 flex-direction: column; 2051 gap: 6px; 2052 margin-bottom: 24px; 2053`,Wn=Qt.Ay.li` 2054 font-size: 16px; 2055 line-height: 22px; 2056 color: ${Bn.lm.textGrey}; 2057`,Xn=Qt.Ay.span` 2058 font-family: ${Bn.F2.hellix.bold}; 2059 color: ${Bn.lm.textGrey}; 2060`,Zn=Qt.Ay.div` 2061 min-height: 100vh; 2062 display: flex; 2063 flex-direction: column; 2064 align-items: center; 2065 position: relative; 2066 font-family: ${Bn.F2.hellix.regular}; 2067 box-sizing: border-box; 2068 @media screen and (max-width: 500px) { 2069 padding-top: 60px; 2070 } 2071`,Jn=Qt.Ay.div` 2072 width: 450px; 2073 max-width: 100%; 2074 display: flex; 2075 flex-direction: column; 2076 box-sizing: border-box; 2077 @media screen and (max-width: 500px) { 2078 width: 100%; 2079 padding: 0 20px; 2080 } 2081`,eo=Qt.Ay.div` 2082 position: absolute; 2083 top: 20px; 2084 left: 20px; 2085 @media screen and (max-width: 500px) { 2086 top: 16px; 2087 left: 16px; 2088 } 2089`,to=Qt.Ay.h1` 2090 font-size: 28px; 2091 font-family: ${Bn.F2.hellix.bold}; 2092 line-height: 38px; 2093 color: ${Bn.lm.black}; 2094 text-align: center; 2095 margin: 0 0 12px; 2096 padding-top: 12px; 2097`,io=Qt.Ay.p` 2098 font-size: 16px; 2099 font-family: ${Bn.F2.hellix.regular}; 2100 line-height: 22px; 2101 color: ${Bn.lm.black}; 2102 text-align: center; 2103 max-width: 450px; 2104 margin-bottom: 48px; 2105`,no=Qt.Ay.div` 2106 background: ${Bn.lm.lightShadedGrey}; 2107 border-radius: 8px; 2108 padding: 16px; 2109 margin-bottom: 8px 0 48px; 2110 max-width: 450px; 2111`,oo=Qt.Ay.p` 2112 font-size: 16px; 2113 line-height: 24px; 2114 font-family: ${Bn.F2.hellix.bold}; 2115 color: ${Bn.lm.black}; 2116 margin: 0 0 14px; 2117`,ao=Qt.Ay.div` 2118 display: flex; 2119 justify-content: space-between; 2120 align-items: center; 2121 padding: 8px 0; 2122 2123 &:last-child { 2124 border-bottom: none; 2125 } 2126`,so=Qt.Ay.span` 2127 font-size: 14px; 2128 color: ${Bn.lm.textGrey}; ; 2129`,ro=Qt.Ay.span` 2130 font-size: 14px; 2131 font-family: ${Bn.F2.hellix.bold}; 2132 color: ${Bn.lm.textGrey}; 2133`,lo=Qt.Ay.div` 2134 display: flex; 2135 align-items: center; 2136 gap: 8px; 2137`,co=Qt.Ay.span` 2138 background: ${Bn.lm.lightGreen}; 2139 color: ${Bn.lm.white}; 2140 font-size: 10px; 2141 line-height: 10px; 2142 font-family: ${Bn.F2.hellix.bold}; 2143 padding: 6px 8px; 2144 border-radius: 999px; 2145 white-space: nowrap; 2146`,uo=Qt.Ay.p` 2147 font-size: 16px; 2148 color: ${Bn.lm.green}; 2149 margin: 8px 0 0; 2150 max-width: 450px; 2151`,mo=(Qt.Ay.p` 2152 font-size: 16px; 2153 color: ${Bn.lm.brandRed}; 2154 margin: -16px 0 16px 2px; 2155 font-family: ${Bn.F2.hellix.regular}; 2156`,Qt.Ay.div` 2157 position: relative; 2158 margin-bottom: 16px; 2159`),po=Qt.Ay.img` 2160 position: absolute; 2161 right: 14px; 2162 top: 16px;
2163 width: 20px; 2164 height: 20px; 2165 pointer-events: none; 2166 z-index: 1; 2167`,ho=Qt.Ay.div` 2168 background: ${Bn.lm.lightShadedGrey}; 2169 border-box: 1px solid ${Bn.lm.borderGrey}; 2170 border-radius: 8px; 2171 padding: 16px; 2172 margin-top: 12px; 2173`,_o=Qt.Ay.p` 2174 font-size: 16px; 2175 color: ${Bn.lm.green}; 2176 line-height: 22px; 2177 font-family: ${Bn.F2.hellix.regular}; 2178`,xo=Qt.Ay.label` 2179 display: flex; 2180 align-items: flex-start; 2181 gap: 12px; 2182 cursor: pointer; 2183 margin-top: 16px; 2184`,vo=Qt.Ay.input` 2185 width: 18px; 2186 height: 18px; 2187 min-width: 18px; 2188 margin-top: 2px; 2189 cursor: pointer; 2190 accent-color: ${Bn.lm.brandPrimary}; 2191`,fo=Qt.Ay.span` 2192 font-size: 14px; 2193 line-height: 22px; 2194 color: ${Bn.lm.textGrey}; 2195 font-family: ${Bn.F2.hellix.regular}; 2196`,yo=Qt.Ay.div` 2197 margin-top: 20px; 2198`;var bo=i(78272);const go=e=>(0,a.jsx)(p.JS,{...e,meta:{...e.meta,error:e.meta.error||e.challanApiError||void 0,touched:e.meta.touched||!!e.challanApiError}}),jo=(0,u.A)({form:"dhaChallanForm"})(e=>{const{onBack:t}=e,{challanForm:i}=n.cGR,s=(0,c.wA)(),r=(0,c.d4)(Ui.yi),[l,d]=(0,o.useState)(!1),[u,m]=(0,o.useState)(null),[_,v]=(0,o.useState)(!1),[f,y]=(0,o.useState)(""),[b,g]=(0,o.useState)(!1),[A,N]=(0,o.useState)(!1),[w,S]=(0,o.useState)(null),C=null!==u&&void 0!==u&&u.due_date?(e=>{const t=W()().startOf("day"),i=W()(e).startOf("day");return Math.ceil(i.diff(t,"days",!0))})(u.due_date):null,D=null!==C&&C>=0&&C<=3;return(0,a.jsxs)(Zn,{children:[(0,a.jsx)(eo,{children:(0,a.jsx)(p.oq,{newBackButton:!0,goBack:t})}),(0,a.jsxs)(Jn,{children:[(0,a.jsx)(to,{children:i.title}),(0,a.jsx)(io,{children:i.subtitle}),(0,a.jsxs)(mo,{children:[(0,a.jsx)(te.A,{name:"challanNumber",type:"text",component:go,maxWidth:"450px",label:i.challanLabel,placeholder:i.challanPlaceholder,maxLength:12,validate:[bo.Ih],disabled:_,onChange:async e=>{const t=e.target.value;if(y(t),d(!1),m(null),g(!1),S(null),t.length===n.z$y){v(!0),s((0,j.LI)());const e=await s((0,bo.wP)(Number(t)));if(s((0,j.MV)()),(null===e||void 0===e?void 0:e.errorCode)===n.NUU)g(!0);else if((null===e||void 0===e?void 0:e.errorCode)===n.Csd)S(i.nameMismatchText);else if((null===e||void 0===e?void 0:e.errorCode)===n.ne9)S(i.defaultMessage);else if(e&&!e.errorCode){m(e),d(!0),s({type:x.tqm,data:{...e,challan_number:Number(t),fromDhaFlow:!0}});const i={ctaName:mi.XQ.DHA_CHALLAN_VERIFIED,pageName:mi.Ys.DHAFlow,flowType:mi.UQ.DHA_FLOW,...e};(0,ui.zU)(mi.V6.PROGRESS_UPDATED,i)}else s((0,h.Xh)(x.clv,n.BJY,null===r||void 0===r?void 0:r.screens,null===r||void 0===r?void 0:r.timeline));v(!1)}},challanApiError:w}),(l&&u||b)&&(0,a.jsx)(po,{src:`${n.iQA}/circle-tick-icon.svg`,alt:"verified"})]}),b&&(0,a.jsx)(ho,{children:(0,a.jsx)(_o,{children:i.alreadyPaidMessage})}),l&&u&&(0,a.jsxs)(no,{children:[(0,a.jsx)(oo,{children:i.reviewTitle}),(u?[{label:i.reviewLabels.applicantName,value:u.applicant_name},{label:i.reviewLabels.nicopNumber,value:u.nicop_number},{label:i.reviewLabels.amount,value:u.amount},{label:i.reviewLabels.dueDate,value:(0,a.jsxs)(lo,{children:[D&&(0,a.jsxs)(co,{children:[C," ",C>1?i.daysLeftSuffix:"day left"]}),u.due_date]})}]:[]).map(e=>{let{label:t,value:i}=e;return(0,a.jsxs)(ao,{children:[(0,a.jsx)(so,{children:t}),(0,a.jsx)(ro,{children:i})]},t)}),D&&(0,a.jsx)(uo,{children:i.urgencyMessage})]}),l&&u&&(0,a.jsxs)(xo,{children:[(0,a.jsx)(vo,{type:"checkbox",checked:A,onChange:e=>N(e.target.checked)}),(0,a.jsx)(fo,{children:i.confirmCheckboxLabel})]}),(0,a.jsx)(yo,{children:(0,a.jsx)(p.mU,{text:i.buttonText,onClick:async()=>{const e={type:mi.zY.BUTTON,ctaName:mi.XQ.CONFIRM,pageName:mi.Ys.DHAFlow,flowType:mi.UQ.DHA_FLOW,challanNumber:Number(f),dueDate:null===u||void 0===u?void 0:u.due_date,amount:null===u||void 0===u?void 0:u.amount};(0,ui.zU)(mi.V6.CTA_CLICKED,e),s((0,j.LI)());const t=await s((0,bo.co)(Number(f),A));s((0,j.MV)()),t&&s((0,h.Xh)(x.clv,n.BJY,null===r||void 0===r?void 0:r.screens,null===r||void 0===r?void 0:r.timeline,null,!0))},width:"100%",disabled:!l||!A||_})})]})]})}),Ao={};Ao[n.Cq6]=$i.default,Ao[n.BJY]=r,Ao[n.Nv$]=Tt,Ao[n.uOw]=Tt,Ao[n.FrG]=Tt,Ao[n.kki]=l.Ay,Ao[n.xlY]=$n.default,Ao[n.RNB]=bn,Ao[n.ZV9]=()=>{const[e,t]=(0,o.useState)(!1),{landing:i}=n.cGR;if(e)return(0,a.jsx)(jo,{onBack:()=>t(!1)});return(0,a.jsx)(zn,{children:(0,a.jsxs)(Gn,{children:[(0,a.jsx)(qn,{children:i.heading}),(0,a.jsx)(Kn,{src:`${n.iQA}/dha-pkr-illustration.svg`,alt:"illustration-image"}),(0,a.jsx)(Qn,{children:i.features.map(e=>{let{label:t,description:i}=e;return(0,a.jsxs)(Wn,{children:[(0,a.jsx)(Xn,{children:t}),": ",i]},t)})}),(0,a.jsx)(p.mU,{text:i.buttonText,onClick:async()=>{const e={type:mi.zY.BUTTON,ctaName:mi.XQ.CONFIRM,pageName:mi.Ys.DHAFlow,flowType:mi.UQ.DHA_FLOW};(0,ui.zU)(mi.V6.CTA_CLICKED,e),t(!0)},height:46})]})})},Ao[n.O2v]=Pn,Ao[n.jRy]=z,Ao[n.mRt]=C,Ao[n.NBu]=jt,Ao[n.r00]=Nt.A,Ao[n.DQZ]=Nt.A,Ao[n.WUK]=At.A,Ao[n.GKy]=ai,Ao[n.VyO]=xt,Ao[n.lq4]=ge,Ao[n.eoJ]=Me,Ao[n.ksn]=Be,Ao[n.BQq]=Xe,Ao[n.eoE]=mt,Ao[n.cih]=Pi,Ao[n.XY]=()=>(0,a.jsx)(Hn,{}),Ao[n.A3A]=Ge,Ao[n.QAo]=Nt.A,Ao[n.CZw]=ii,Ao[n.DRR]=Ut.A,Ao[n.SpV]=ki,Ao[n.j7c]=()=>(0,a.jsx)(l.Ay,{isTransactionOriented:!0}),Ao[n.lbb]=e=>(0,a.jsx)(Un.A,{...e,isSgOnboardingflow:!0}),Ao[n.Hmn]=e=>(0,a.jsx)(Vn.A,{...e,isSgOnboardingflow:!0});const No=Ao},73478(){},197(){},62230(){}}]);
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.