1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6579],{36579:function(e,a,l){let t;var i,n,o,s,r=l(2265);l(2488);var d=l(4514),c=l(80183),u=l(42949),m=l(15192),v=l(84575),p=l(57437),h=l(20383),g=l(21622),b=l(11984),N=l(95565),f=l(27710),x=l(44452),C=l(9177),E=l(76891),y=l(95154),S=l(68052),A=l(42152),j=l(87550),T=l(59642),D=l(91181),w=l(79611),I=l(85154);l(33659);var _=l(87736),O=l(49232),k=l(45409),R=l(37351),M=l(11269),L=l(13372);let P=e=>p.jsx("div",{className:"menu-switch",children:e.menuList.map((a,l)=>p.jsx("div",{className:"menu "+(e.selectedMenu===a?"selected lbl-txt-info-13":"lbl-txt-info-13"),onClick:()=>e.onChangeMenuCB&&e.onChangeMenuCB(a),children:a},l))}),F=e=>{var a;return p.jsxs("div",{className:"search-input "+(null!==(a=e.className)&&void 0!==a?a:""),children:[p.jsx("img",{fetchPriority:"low",className:"icon left",src:"./assets/searchicon.svg",alt:"search-icon"}),p.jsx("input",{type:"text",placeholder:"Search",value:e.value,onChange:a=>e.onChangeSearchInput?e.onChangeSearchInput(a.target.value):void 0}),p.jsx("img",{fetchPriority:"low",className:"icon right filter-icon",src:"./assets/filter_alt.svg",alt:"filter-icon",onClick:e.onClickFilterIcon}),e.isFilterApplied?p.jsx("div",{className:"red-dot"}):""]})},B={RESOLVED:"RESOLVED"},V={My_Queries:"My Queries",FAQ:"FAQ"},U={CREAE_FOLIO:"/folio/create",UPDATE_FOLIO:"/servicecenter/updatefoliodetails",UPDATE_MOBILE:"/servicecenter/updatefoliodetails/updatemobile",UPDATE_EMAIL:"/servicecenter/updatefoliodetails/updateemail",UPDATE_NOMINEE:"/servicecenter/updatefoliodetails/updatenominee",ADD_BANK_ACCOUNT_DETAILS:"/servicecenter/updatefoliodetails/addbankaccountdetails",NAV_TER_OTHERS:"/servicecenter/navterandothers",UNCLAIMED_IDCW_REDEMPTION:"/servicecenter/navterandothers/unclaimedidcwredemption",NAV_IDCW_RETURNS_OF_SCHEME:"/servicecenter/navterandothers/mutualfundnavidcwhistory",OUR_SERVICES:"/servicecenter/ourservices",UPDATE_PERSONAL_DETAILS:"/servicecenter/updatepersonaldetails",WHATSAPP_SERVICE:"/servicecenter/ourservices/whatsappservice",ACCOUNT_STATEMENT:"/servicecenter/accountstatement",ACCOUNT_STATEMENTS:"/servicecenter/accountstatement/accountstatements",CAPITAL_GAINS:"/servicecenter/accountstatement/capitalgains",STT_LETTER:"/servicecenter/accountstatement/sttletter",RELATIONSHIP_MANAGER:"/servicecenter/rm",UPDATE_IFSC_BANK:"/servicecenter/updatefoliodetails/updateifsc",FATCA_UPDATE:"https://mfs.kfintech.com/fatcaupdate",TER:"/servicecenter/navterandothers/totalexpenseratio"},Y={expiryNeeded:"Expiry date shound needed",amountNotEmpty:"Amount Should not be empty",mandateAmountLesser:"Mandate amount cannot be lesser than â¹5,000",mandateAmountGreater:"Mandate amount cannot be greater than â¹1,00,00,000",amountZero:"Amount Should not be zero",upiAmountGreater:"Mandate amount cannot be greater than â¹1,00,000"},G=[V.My_Queries,V.FAQ],z={folio:{id:"folio",isMandate:!0},caseType:{id:"caseType",isMandate:!0},subCaseType:{id:"subCaseType",isMandate:!0},comments:{id:"comments",isMandate:!0},attachment:{id:"attachment",isMandate:!1},mobile:{id:"mobile",isMandate:!0},email:{id:"email",isMandate:!0},reEnterMobile:{id:"reEnterMobile",isMandate:!0},reEnterEmail:{id:"reEnterEmail",isMandate:!0},validatepan:{id:"validatepan",isMandate:!0}},H={ORDER:"order",CASE_TYPE:"caseType",SUB_CASE_TYPE:"subCaseType",STATUS:"status",FROM_DATE:"fromDate",TO_DATE:"toDate"},K="doc, docx, zip, xls, xlsx, pdf, png, jpeg, jpg",q="Ascending",W=[{id:q,displayvalue:"Newest to Oldest"},{id:"Decending",displayvalue:"Oldest to Newest"}],Z="Our Service",X="NAV, TER and Others",Q="Account Statement",J="Update Folio Details",$="Update Personal details",ee={DDMMYYYY:"dd-mm-yyyy"},ea={pan:/^[A-Za-z]{5}[0-9]{4}[A-Za-z]$/,mobile:/^[6789]\d{9}$/},el={VALID_EMAIL:"Field is mandatory",MATCH_EMAIL:"Email ID must match",VALID_MOBILE:"Field is mandatory",MATCH_MOBILE:"Mobile number must match",MANDATORY_ERROR:"Field is mandatory",PAN_MANDATORY_ERROR:"PAN Number is mandatory",MOBILE_MANDATORY_ERROR:"Mobile Number is mandatory",ACCOUNT_NUMBER_ERROR:"Bank Account should be 5-18 digits",ACCOUNTNUM_MISMATCH_ERROR:"Account Number and Confirm Account Number must be same",IFSC_ERROR:"IFSC Code should be 11 characters, First 4 characters should be alphabets, Fifth character should be zero & 6-11th characters can be numbers or alphabets",IS_MANDATORY_ERROR:" is mandatory",NOT_VALID_ER
1ROR:"is not valid",FILE_FORMAT_ERROR:"The file format is not an acceptable format",MAX_FILE_SIZE_ERROR:"The maximum file size is 2MB",FROM_DATE_ERROR_MSG:"Selected date cannot be a future date.",SAME_AS_EXISTING_MOBILE:"New mobile number cannot be the same as the existing mobile number.",SAME_AS_EXISTING_EMAIL:"New email cannot be the same as the existing email.",CASE_TYPE_ERROR:"Select Case Type",ENTER_VALID:"Please enter a valid",NO_DATA_FOUND:"No data found"},et="Total Expense Ratio",ei=[et,"Notices"],en={type:"type",schemeType:"schemeType",scheme:"scheme",planOption:"planOption",fromDate:"fromDate",toDate:"toDate"},eo={DOWNLOAD:"DOWNLOAD",VIEW:"VIEW"},es={sendOtp:"OTP Sent successfully",resentOtp:"OTP Resent successfully"},er=e=>p.jsxs("div",{className:"query-section-header",children:[p.jsx(P,{menuList:G,selectedMenu:e.selectedMenu,onChangeMenuCB:e.onChangeMenuCB}),e.selectedMenu===V.My_Queries?p.jsx(F,{onChangeSearchInput:e.onChangeSearchInput,value:e.searchValue,onClickFilterIcon:e.onClickFilterIcon,isFilterApplied:e.isFilterApplied,selectedMenu:e.selectedMenu}):null]}),ed=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return e?e.getDate()+"-"+(e.getMonth()+1)+"-"+e.getFullYear():""},ec=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},eu=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,".").concat(l,".").concat(t)},em=e=>{let a=new Date,l=new Date(a);return l.setMonth(a.getMonth()-6),{latestData:e.filter((e,a)=>0===a),lastThreeMonthsData:e.filter((e,a)=>new Date(e.createdOn)>l&&0!=a)}},ev=(e,a,l)=>e&&0!==e.length?null==e?void 0:e.slice((a-1)*l,a*l):[],ep=()=>new Date().getFullYear().toString(),eh=()=>["January","February","March","April","May","June","July","August","September","October","November","December"][new Date().getMonth()],eg=async()=>"Bearer "+await u.getBearerToken();(i=o||(o={}))[i.ClientError=1]="ClientError",i[i.ServerError=2]="ServerError",i[i.GeneralNetworkError=3]="GeneralNetworkError",i[i.UnknownError=4]="UnknownError";let eb={ENVIRONMENT:"prod",SERVICE_URL:"https://www.axismf.com",AGGREGATOR_URL:"https://www.axismf.com",SERVICE_MOCK_URL:"https://www.axismf.com",RAZORPAY_KEY_EMANDATE:"rzp_live_OCjOVOYgTZqq0e",RAZORPAY_KEY_UPIAUTOPAY:"rzp_live_l5HUa3iQN1Eyyq"};var eN=e=>{};let ef=async function(e,a,l){try{let t={...await u.getApiServiceHeaders({env:eb,url:e}),...a};t=u.prepareHeaders(e,t);let i=await u.getActualRequest(l,{env:eb,url:e});return await fetch(e,{method:"POST",credentials:"include",headers:t,body:i,next:{revalidate:0}}).then(ex).then(eC).then(a=>eE(a,e))}catch(e){if(e.errortype)return Promise.resolve(e);{let e={errortype:o.UnknownError,code:0,message:"Network Error"};return eN(e),Promise.resolve(e)}}};function ex(e){if(e.status>=200&&e.status<300||e.status>=400&&e.status<500)return e;if(e.status>=500&&e.status<600){let a={errortype:o.ServerError,code:e.status,message:"Unable to communicate with server"};throw eN(a),a}throw{errortype:o.GeneralNetworkError,code:e.status,message:""}}function eC(e){return e.text()}async function eE(e,a){return JSON.parse(await u.getActualResponse(e,{env:eb,url:a}))}let ey={SERVICE_URL:eb.SERVICE_URL,AGGREGATOR_URL:eb.AGGREGATOR_URL,SERVICE_MOCK_URL_RM:eb.SERVICE_MOCK_URL_RM},eS={EXPENSE_RATIO:{GET_EXPENSE_RATIO_DETAILS:"/cms/expense-ratio-details",GET_TOTAL_EXPENSE_RATIO:"/cms/total-expense-ratio",TER_NOTICES:"/cms/ter-notices"},INIT:{NEW_FOLIO_CONFIG:"/cms/new-folio-config"},SUPPORT:{GET_TICKET_RESPONSE:"/customer-ticketing-services/api/v1/getResponses",GET_SUB_CASE_TYPES:"/cms/case-sub-type",GET_CASE_TYPES:"/cms/case-type",RAISE_QUERY:"/customer-ticketing-services/api/v1/RaiseQuery",FOLIO_SCHEME_DETAILS:"/aggregator-services/user-services/folio-scheme-detail-count",QUERY_STATUS:"/cms
1/query-status",UPDATE_FOLIO_DETAILS:"/cms/update-folio-details",UNCLAMIED_REDEMPTION:"/cms/unclaimed-redemption",STATEMENT:"/cms/statement",FEEDBACK:"/customer-ticketing-services/api/v1/feedback"},SERVICE:{GET_SERVICE_DETAILS:"/cms/service-details",WHATSAPP_SERVICE:"/cms/whatsapp-service",WHATSAPP_TERMS_AND_CONDITIONS:"/cms/whatsapp-terms-and-conditions",GET_CONSENT_DETAILS:"/consent-services/api/v1/getConsent",INITIATE_OPT:"/service-centre/whatsapp/api/v1/initiate-opt",CONFIRM_OTP:"/service-centre/whatsapp/api/v1/confirm-opt",UPDATE_CONSENT:"/consent-services/api/v1/updateConsent",GET_FOLIO_DETAILS:"/aggregator-services/user-services/all-folio-details",UPDATE_NOMINEE:"/service-centre/update-folio/api/v1/update-nominee",VERIFY_OTP:"/service-centre/update-folio/api/v2/verify-otp",Banks:{Banks:"/cms/banks",BankCity:"/cms/bank/city",BankBranch:"/cms/bank/branch",BankIfsc:"/cms/bank/ifsc",UpdateBank:"/service-centre/update-details/api/v1/update-bank"},TOP_RECENT_TRANSACTION:"/aggregator-services/user-services/get-top-recent-transaction-sc",NAV_IDCW_ALL_SCHEME_DATA:"/cms/all-schemes",PLAN_OPTIONS_DATA:"/cms/service/plan-options",PLAN_OPTIONS_TER_DATA:"/cms/ter/plan-options",NAV_IDCW_HISTORY_DATA:"/cms/nav-idcw-history",NAV_VIEW_DATA:"/cms/nav-download",IDCW_VIEW_DATA:"/cms/idcw-download",ACCOUNT_STATEMENT:"/service-centre/statement/download/api/v1/post-login/account-statement",CAPITAL_GAIN:"/service-centre/statement/download/api/v1/capital-gain",STT:"/service-centre/statement/download/api/v1/stt",PRE_LOGIN:"/service-centre/statement/download/api/v1/pre-login/account-statement",SINCE_INCEPTION:"/service-centre/api/v1/since-investment-date-details",VERIFY_OTP_MOBILE:"/service-centre/update-folio/api/v1/verify-mobile-email",VERIFY_OTP_EMAIL:"/service-centre/update-folio/api/v1/verify-mobile-email",UPDATE_EMAIL:"/service-centre/update-folio/api/v1/update-email",UPDATE_MOBILE:"/service-centre/update-folio/api/v1/update-mobile",UNCLAIMED_DETAILS:"/service-centre/others/api/v1/unclaimedDetails",CONTACT_YOUR_RM:"/cms/contact-your-rm",GET_RM_DETAILS:"/contact-rm/api/v1/getRMDetails",REQUEST_RM:"/contact-rm/api/v1/requestRM",REQUEST_CALLBACK:"/contact-rm/api/v1/requestCallback",GETHOLDINGINFOLIO:"/aggregator-services/user-services/api/v2/getholdings-in-folio",updateIfscGenerateOtp:"/service-centre/api/v1/updateIfscGenerateOtp",updateIfscVerifyOtp:"/service-centre/api/v1/updateIfscVerifyOtp",expenseRatioNotices:"/cms/expense-ratio-notices",emandate:"/cms/e-mandate",upiautopay:"/cms/upi-autopay",MODIFY_KYC_GENERATE_OTP:"/kyc-sdk-services/v1/kyc/modify-kyc/otp/generate",MODIFY_KYC_VERIFY_OTP:"/kyc-sdk-services/v1/kyc/update-mobile-email",GET_ADD_BANK_FLAG:"/service-centre/update-details/get-add-bank-flag",ADD_BANK_GENERATE_OTP:"/service-centre/update-details/add-bank-generate-otp",ADD_BANK_VALIDATE_OTP:"/service-centre/update-details/add-bank-validate-otp",BankDetails:"/cart-services/api/v1/get-bank-details"},Paymentservices:{RegisteredEmandatesBanks:"/payments-services/registered-emandates-banks/v1",emandatesBanks:"/payments-services/emandates-banks/v1",NewRegisterEmandates:"/payments-services/new-register-emandates/v1",TransactionStatus:"/payments-services/transaction-status/v1"},Remuneration:{GENERATE_OTP:"/service-centre/api/v1/remuneration-generate-otp",VERIFY_OTP:"/service-centre/api/v1/remuneration-verify-otp"}},eA=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SUPPORT.FEEDBACK,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify({ticketId:e}));(null==i?void 0:i.status)==="success"&&a.success(i)},ej=e=>{var a,l,t,i,n,o;let[s,d]=r.useState(""),c=e=>{eA(e,{default:m,success:u})},u=e=>{e&&e&&d(e.message)},m=e=>{},h=e=>{c(e)};return r.useEffect(()=>{if(s){let e=setTimeout(()=>{d("")},3e3);return()=>clearTimeout(e)}},[s]),p.jsxs("div",{className:"query-card",children:[p.jsxs("div",{className:"card-header",children:[p.jsxs("div",{className:"header-content",children:[p.jsx("div",{className:"query-name lbl-banner-sub-heading",children:e.query.caseSubType}),p.jsx("div",{className:"query-description lbl-txt-content",children:e.query.remarks})]}),p.jsx("span",{className:"status-info status-danger"+(null!==(o=e.query.caseStatus)&&void 0!==o?o:"").toLowerCase(),children:e.query.caseStatus})]}),p.jsxs("div",{className:"query-data",children:[p.jsxs("div",{className:"data-row",children:[p.jsx("label",{className:"data-label lbl-txt-content",children:"Case type"}),p.jsx("div",{className:"data-val lbl-banner-sub-heading",children:e.query.caseType})]}),p.jsxs("div",{className:"data-row",children:[p.jsx("label",{className:"data-label lbl-txt-content",children:"Ticket Number"}),p.jsx("div",{className:"data-val lbl-banner-sub-heading",children:e.query.ticketNumber})]}),p.jsxs("div",{className:"data-row",children:[p.jsx("label",{className:"data-label lbl-txt-content",children:"Date of Submission"}),p.jsx("div",{className:"data-val lbl-banner-sub-heading",children:eu(new Date(e.query.createdOn))})]}),p.jsxs("div",{className:"data-row",children:[p.jsx("label",{className:"data-label lbl-txt-content",children:"TAT of closure"}),p.jsx("div",{className:"data-val lbl-banner-sub-heading",children:null===(a=e.query)||void 0===a?void 0:a.tatClosure})]}),p.jsxs("div",{className:"closure-data lbl-txt-content",children:[p.jsx("label",{className:"data-label query-closure-center",children:"Closure Remark"}),p.jsx("div",{className:"data-val lbl-txt-info-16",children:(null===(t=e.query)||void 0===t?void 0:null===(l=t.description)||void 0===l?void 0:l.trim().length)?null===(n=e.query)||void 0===n?void 0:null===(i=n.description)||void 0===i?void 0:i.trim():"NA"})]}),e.query.caseStatus&&e.query.caseStatus.toUpperCase()===B.RESOLVED&&!e.query.feedback?p.jsxs("div",{className:"re-ask-query-content",children:[p.jsxs("span",{className:"lbl-card-tag-3",children:["Are you satisfied with the resolution ",p.jsx("button",{className:"btn-primary",onClick:()=>h(e.query.ticketNumber),children:"Yes"})]}),p.jsxs("span",{className:"lbl-card-tag-3",children:["if No please",p.jsx("button",{className:"btn-outline-primary",onClick:()=>e.onClickReRaiseQuery?e.onClickReRaiseQuery(e.query):void 0,children:"Raise Query"})]})]}):""]}),s&&p.jsx(v.CustomToast,{id:"mf-simple-toast",message:s,limit:3,autoClose:!0,autoCloseDelay:5e3,type:"default"})]})},eT=e=>{let[a,l]=r.useState([]),[t,i]=r.useState(1);r.useEffect(()=>{var a;(null===(a=e.queryList)||void 0===a?void 0:a.length)?l(JSON.parse(JSON.stringify(e.queryList))):l([])},[e.queryList,t]);let{latestData:n,lastThreeMonthsData:o}=em(a),s=ev(o,t,5);return p.jsx(r.Fragment,{children:p.jsxs("div",{className:"query-content "+((null==a?void 0:a.length)?"with-data":"no-data"),children:[n&&n.length>0||o&&o.length>0?p.jsxs(r.Fragment,{children:[n&&n.length>0&&p.jsx("label",{className:"bl-text-steps query-content-lable",children:"Latest Queries"}),n&&n.length>0?n.map((a,l)=>p.jsx(ej,{query:a,onClickReRaiseQuery:e.onClickAskQuery},l)):"",s&&s.length>0&&p.jsx("label",{className:"query-content-lable lbl-content-heading-7",children:"Last 3 months"}),s&&s.length>0?s.map((a,l)=>(a.status,p.jsx(ej,{query:a,onClickReRaiseQuery:e.onClickAskQuery},l))):""]}):p.jsxs("div",{className:"no-query-holder",children:[p.jsxs("div",{className:"no-data-content",children:[p.jsx("img",{fetchPriority:"low",className:"no-query-img",src:"./assets/no-query-data.svg",alt:"no-query-img"}),p.jsx("div",{className:"lbl-list-heading",children:"No queries currently available"}),p.jsx("div",{className:"lbl-txt-content",children:"Please ask a query if you are facing any issue"})]}),p.jsx("button",{className:"btn-primary ask-query-btn",onClick:()=>{e.onClickAskQuery&&e.onClickAskQuery()},children:"Ask a Query"})]}),p.jsx(h.PaginationFooter,{listLength:o.length,currentPage:t,dataPerPage:5,onChangePage:a=>{i(a),null==e||e.setCurrentPageChange(a)}})]})})},eD=e=>{let a;return e&&(a=e.replace(/[^a-zA-Z0-9]/g,"")),a},ew=e=>{let a;return e&&(a=e.replace(/[^a-zA-Z\s]/g,"").replace(/\s{1,}/g," ")),a},eI=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:80;return e?e.length>a?e.substring(0,a):e:""},e_=(e,a)=>
1{let l=document.getElementById(e);l&&(l.scrollIntoView({behavior:"smooth",block:"center"}),l.focus())},eO=(e,a)=>{var l,t;return null===(t=e.filter(e=>e.category===a)[0])||void 0===t?void 0:null===(l=t.services)||void 0===l?void 0:l.filter(e=>"enable"==e.status)},ek=(e,a)=>{var l;return null===(l=e.filter(e=>e.category===a)[0])||void 0===l?void 0:l.description},eR=(e,a)=>{var l;return null===(l=e.filter(e=>e.category===a)[0])||void 0===l?void 0:l.category},eM=e=>{let a="";switch(e){case"Our Service":a="OUR_SERVICES";break;case"Update Folio Details":a="UPDATE_FOLIO";break;case"NAV, TER and Other Services":a="NAV_TER_OTHERS";break;case"Update Personal details":a="UPDATE_PERSONAL_DETAILS";break;case"WhatsApp Service":a="WHATSAPP_SERVICE";break;case"Change/Update Email Address":a="UPDATE_EMAIL";break;case"Add Bank Account Details":a="ADD_BANK_ACCOUNT_DETAILS";break;case"Change Registered Mobile Number":a="UPDATE_MOBILE";break;case"Update Nominee Details":a="UPDATE_NOMINEE";break;case"Unclaimed IDCW and Redemption":a="UNCLAIMED_IDCW_REDEMPTION";break;case"NAV and IDCW Returns of Scheme":a="NAV_IDCW_RETURNS_OF_SCHEME";break;case"Account Statement":a="ACCOUNT_STATEMENT";break;case"Account Statements":a="ACCOUNT_STATEMENTS";break;case"Capital Gains":a="CAPITAL_GAINS";break;case"STT Letter":a="STT_LETTER";break;case"Update Bank IFSC":a="UPDATE_IFSC_BANK";break;case"FATCA Update":a="FATCA_UPDATE";break;case"TER":a="TER";break;default:return"OUR_SERVICES"}return a},eL=e=>{if(!e||"string"!=typeof e)return;let[a,l,t]=e.split("/");if(t&&l&&a)return"".concat(a,"-").concat(l,"-").concat(t)},eP=e=>{if(!e||"string"!=typeof e)return;let[a,l,t]=e.split("-");if(a&&l&&t)return"".concat(a,"/").concat(l,"/").concat(t)},eF=e=>{let[a,l,t]=e.split("-");return"".concat(t,"-").concat(l,"-").concat(a)},eB=function(e,a){let l,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",i=[];return e&&a===ee.DDMMYYYY&&(l=new Date((i=e.split(t))[2]+"-"+i[1]+"-"+i[0])),l};function eV(){var e,a,l;return null!==(l=null===(a=window)||void 0===a?void 0:null===(e=a.location)||void 0===e?void 0:e.pathname)&&void 0!==l?l:""}let eU=e=>p.jsx("div",{className:"query-section-footer",children:p.jsx("button",{className:"ask-query-btn btn-primary",onClick:()=>{var a,l;return null!==(l=null===(a=e.onClickAskQuery)||void 0===a?void 0:a.call(e))&&void 0!==l?l:void 0},children:"Ask a Query"})}),eY=e=>{let[a,l]=r.useState(!1),t=e=>{navigator.clipboard.writeText(e),l(!0)};return p.jsxs("div",{className:"askquery-success-content",children:[p.jsxs("div",{className:"main-content",children:[p.jsx("img",{fetchPriority:"low",className:"tick-img",src:"/assets/tick-mark.svg",alt:"success-tick-icon"}),p.jsxs("div",{className:"text-content",children:[p.jsx("div",{className:"text-header-style-success",children:"You have successfully raised an issue"}),p.jsx("div",{className:"lbl-txt-content content-info",children:"Our Representative will review your concern and should send a personal response with in next 24 hours"})]}),p.jsxs("div",{className:"ticket-content",children:[p.jsx("label",{className:"lbl-txt-info-2",children:"Ticket No."}),p.jsxs("div",{className:"ticket-no-holder lbl-banner-sub-heading",children:[p.jsx("span",{children:e.ticketNo}),e.ticketNo?p.jsxs("div",{className:"copy-img-holder",children:[p.jsx("img",{fetchPriority:"low",className:"copy-icon",src:"/assets/copyicon.svg",alt:"copy-icon",onClick:()=>t(e.ticketNo)}),p.jsx(C.SimpleTooltip,{message:"Copied!",show:a,autoCloseDelay:2e3,onAutoCloseCB:()=>{l(!1)}})]}):""]})]})]}),p.jsx("div",{className:"content-footer",children:p.jsx("button",{className:"btn-primary",onClick:e.onClickDone,children:"Done"})})]})},eG=e=>{var a;null===(a=d.getRouter())||void 0===a||a.pushPath(e)},ez=()=>{var e;null===(e=d.getRouter())||void 0===e||e.navigateBack()},eH=e=>{let a=a=>{e.onChangeValueCB&&e.onChangeValueCB(a)};return p.jsx("div",{className:"folio-dropdown-content",children:e.optionList&&e.optionList.length?p.jsx(r.Fragment,{children:e.optionList.map(l=>{var t,i;return p.jsxs("div",{className:"option "+((null===(t=e.selectedOption)||void 0===t?void 0:t.folioNumber)===l.folioNumber?"selected":""),onClick:()=>a(l),children:[p.jsxs("div",{className:"name-row",children:[p.jsxs("div",{className:"name",children:[(null==l?void 0:l.folioNumber)||""," ",l.name?"(".concat(l.name,")"):""]}),(null===(i=e.selectedOption)||void 0===i?void 0:i.folioNumber)===l.folioNumber?p.jsx("div",{className:"mark-icon",children:p.jsx("img",{fetchPriority:"low",src:"/assets/mark.svg",alt:"mark-icon"})}):null]}),p.jsxs("div",{className:"bank-row",children:[p.jsx("div",{className:"bank-name",children:l.bank}),p.jsxs("div",{className:"scheme-holder",children:[p.jsx("span",{children:"Scheme: "}
1),p.jsx("span",{className:"scheme",children:l.scheme})]})]})]})})}):p.jsx("div",{className:"nodata-msg",children:"No data available"})})},eK=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SUPPORT.RAISE_QUERY,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json","x-jwt-token":t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},eq={APPLICANTDETAILSFORMVALIDATION:{validAddress:"Enter a valid address",nriCityCharCount:"Enter minimum 3 and maximum 60 characters",threeSixtyCharacterCount:"Enter minimum 3 and maximum 60 characters",threeTenCharacterCount:"Pin Code should have maximum 10 numbers"},COMMON_VALIDATION:{validPan:"Enter a valid PAN number"},ADD_NEW_FORM_VALIDATION:{isDocumentTypeSelected:"Select a document type before entering the document number",isApplicantAndNomineePanAreSame:"Applicant's and Nominee's PAN cannot be same",isNomineeAppointeePan:"Nominee and Appointee PAN should not be same",isValidDocumentNumber:"Enter a valid document number",isValidAadhar:"Enter last four digits of Aadhar number",isValidDrivingLicense:"Enter a valid Driving License number",isValidPassport:"Enter a valid Passport number",addressThreeCharacter:"Address must be at least 3 characters.",addressEightyCharacter:"Address cannot exceed 80 characters.",addressSixCharacter:"Enter minimum 6 and maximum 80 characters",mobileRequired:"Mobile Number is mandatory",invalidNomineeMobileNum:"Enter a valid nominee mobile number"},DOWNLOAD_APP:{enterValidMobileNumber:"Enter a valid mobile number"},SERVICES:{VALID_EMAIL:"Field is mandatory",MATCH_EMAIL:"Email ID must match",MATCH_MOBILE:"Mobile number must match",MANDATORY_ERROR:"Field is mandatory",PAN_MANDATORY_ERROR:"PAN Number is mandatory",FOLIO_MANDATORY_ERROR:"Folio Number is mandatory",ACCOUNT_NUMBER_ERROR:"Bank Account should be 5-18 digits",ACCOUNTNUM_MISMATCH_ERROR:"Account number and Confirm account number must be same",IS_MANDATORY_ERROR:" is mandatory",NOT_VALID_ERROR:"is not valid",FILE_FORMAT_ERROR:"The file format is not an acceptable format",MAX_FILE_SIZE_ERROR:"The maximum file size is 2MB",FROM_DATE_ERROR_MSG:"Selected date cannot be a future date.",SAME_AS_EXISTING_MOBILE:"New mobile number cannot be the same as the existing mobile number.",SAME_AS_EXISTING_EMAIL:"New email cannot be the same as the existing email.",CASE_TYPE_ERROR:"Select Case Type",ENTER_VALID:"Please enter a valid Email ID",ENTER_VALID_MOBILE:"Please enter a valid Mobile Number",VALID_PAN:"Please enter a valid PAN",PANFOLIOVAILD:"PAN/Folio number is required",FOLIOPAN:"Please enter valid PAN/Folio Number",VALIDFOLIO:"Please enter a valid folio number",REGISTER_EMAIL:"Invalid Email ID",FEILD:"select field",NOMINEE_BLANK:"Name of Nominee is required",INVALID_BANK:"Account number is required",ALPHABETS_ONLY:"Please enter only alphabets",INVESTER_NAME:"Name of Investor is required",TEN_DIGIT_MOBILE:"Please enter a valid 10-digit mobile number",MOBILE_MATCH:"Mobile number must match",VALID_EMAILID:"Please enter valid email id",APPLICANT_NOMINEE:"Applicant and Nominee Name's must not be same",PAN_APPOINTEE_NOMINEE_SAME:"Applicant and Nominee PAN must not be same",SELECT_FOLIO:"Please select Folio",SELECT_SCHEME:"Please select Scheme",CASE_TYPE:"Please select CaseType",SUB_CASE_TYPE:"Please select CaseSubType",DOB_REQUIRED:"Date Of Birth is mandatory",RELATION_REQUIRED:"Relation is mandatory",ALLOCATION_REQUIRED:"Allocation percentage is mandatory",APPOINTEE_EIGHTEEN:"Appointee must be 18 years or older",APPOINTEE_RELATION:"Appointee Relation is mandatory",VALID_MOBILE_NUMBER:"Please enter a valid Mobile Number",APPOINTEE_MOBILE_NUMBER:"Please Enter a valid Mobile number",VALID_PAN_NUMBER:"Please enter a valid PAN Number",MOBILE_REQ:"Mobile Number is mandatory",EMAIL_REQ:"Email ID is mandatory",VALID_USER_FOLIO:"No transactions available for given input",APPOINTEE_MAX_NAME:"Appointee Name should have minimum 3 characters",NOMINEE_MAX_NAME:"Nominee Name is mandatory and should have minimum 3 characters",VALID_PAN_NUM:"Please enter a valid PAN Number",VALID_MOBILE_NUM:"Please enter a valid Mobile Number"},UPDATE_BANK_IFSC:{SAME_IFSC_UPDATE:"New IFSC Code cannot be the same as the existing IFSC Code",EMPTY_IFSC:"IFSC code cannot be empty",INVALID_IFSC:"IFSC Code should be 11 characters, First 4 characters should be alphabets, Fifth character should be zero & 6-11th characters can be numbers or alphabets",EMPTY_Brnac
1h_NAME:"Branch name cannot be empty",EMPTY_CITY_NAME:"City name cannot be empty"},EXPENSE_RATIO:{greaterThanToday:"Date cannot be greater than today",greterThanDate:"From date should not be greater than To date.",earlierThanDate:"From date should not be greater than To date.",fromDate:"Please select valid From Date",toDate:"Please select valid To Date",selectDates:"Please select valid From Date and To Date"}},eW=e=>{var a,l,t;let i=r.useRef(null),n=u.useRootContextData(),[o,s]=r.useState(void 0),[c,m]=r.useState(!1),[v,h]=r.useState(!1),[C,E]=r.useState(null==e?void 0:e.folioList),[y,S]=r.useState({}),[A,j]=r.useState(),[T,D]=r.useState({caseType:"",comments:"",folio:"",subCaseType:""}),[w,I]=r.useState({}),[_,O]=r.useState(""),[k,R]=r.useState(""),M=u.useLoginContextData(),L=r.useRef(null),P=M.isUserLoggedIn()||M.isUserSoftLoggedIn()?"post login journey":"pre login journey",F=null!==(l=null===(a=M.loggedInUserDetails)||void 0===a?void 0:a.user_type)&&void 0!==l?l:"na";r.useEffect(()=>{T[z.caseType.id]&&(B(z.subCaseType.id,""),e.getSubCaseTypes&&e.getSubCaseTypes(T[z.caseType.id]))},[T[z.caseType.id]]),r.useEffect(()=>{if(y&&y.folioNumber){var e;B(z.folio.id,null!==(e=y.folioNumber)&&void 0!==e?e:"")}},[y]),r.useEffect(()=>{e.subCaseTypeList&&e.subCaseTypeList.length&&B(z.subCaseType.id,e.subCaseTypeList&&e.selectedQuery?e.subCaseTypeList[0]:" ")},[e.subCaseTypeList]),r.useEffect(()=>{e.selectedQuery&&D({caseType:e.selectedQuery.caseType,subCaseType:e.selectedQuery.caseSubType,comments:e.selectedQuery.resolutionComments,folio:""})},[e.selectedQuery]);let B=function(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T,t=null==a?void 0:a.replace(/[^A-Za-z0-9 ]*$/,"").replace(/^\s+/,"");t.length<=250&&D(V(e,t,l))},V=function(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:T,t={...l};return t[e]=a,t},U=e=>{S(e),I({...w,folio:""})},Y=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:20;if(e.length<=a)return e;let l=e.lastIndexOf("."),t=l>-1?e.slice(l):"",i=e.slice(0,a-t.length-3);return"".concat(i,"...").concat(t)},G=(e,a)=>{let l={...w},t=T[e.id];l[e.id]=H(e,t),I(l)},H=(e,a)=>{let l=0;a&&(l=a.trim().length);let t="";switch(e.id){case z.folio.id:z.folio.isMandate&&!l&&(t=eq.SERVICES.SELECT_FOLIO);break;case z.caseType.id:z.caseType.isMandate&&!l&&(t=eq.SERVICES.CASE_TYPE);break;case z.subCaseType.id:z.subCaseType.isMandate&&!l&&(t=eq.SERVICES.SUB_CASE_TYPE);break;default:t=""}return t},q=()=>{let e={...w},a=!0;return Object.values(z).map(l=>{if(l.isMandate){let t=T[l.id];e[l.id]=H(l,t),e[l.id]&&(a=!1)}}),{errorMsg:e,isValid:a}},W=()=>{var e,a;let l;l=new FileReader,A&&l.readAsDataURL(A),eK({attachment:null!==(e=l.result)&&void 0!==e?e:"",caseType:T[z.caseType.id],caseSubType:T[z.subCaseType.id],comments:T[z.comments.id],folioNumber:null!==(a=null==y?void 0:y.folioNumber)&&void 0!==a?a:"",owner:""},{default:X,success:Z})},Z=e=>{m(!1),s(e),h(!0)},X=e=>{var a,l;s(void 0),m(!1),null===(a=n.triggerToast)||void 0===a||a.call(n,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})};return r.useEffect(()=>{},[]),p.jsxs("div",{className:"ask-query",ref:L,children:[p.jsx("div",{className:"query-header lbl-sub-heading2",children:"Ask a Query"}),p.jsxs("form",{className:"query-form",onSubmit:a=>{a.preventDefault(),(null==e?void 0:e.triggerListCHild)&&(null==e||e.triggerListCHild(!0));let l=q();I(l.errorMsg),l.isValid&&!w[z.attachment.id]&&(m(!0),W())},children:[p.jsx("div",{className:"query-content",children:p.jsxs("div",{className:"input-holder",children:[p.jsx(g.DefaultDropdown,{optionList:C,label:"Select Folio",className:"material-outlined-dropdown input-field",selectedOption:null==y?void 0:y.dispName,dialogLabel:"Select Existing Folio",onSelectCB:U,displayValueKey:"dispName",hasClose:!0,isError:!!w[z.folio.id],errorMessage:w[z.folio.id],content:p.jsx(eH,{onChangeValueCB:U,optionList:C,selectedOption:y})}),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-field",optionList:e.caseTypeList,label:"Select Case Type",hasClose:!0,selectedOption:T[z.caseType.id],onSelectCB:e=>{B(z.caseType.id,e),I({...w,caseType:"",subCaseType:""})},isError:!!w[z.caseType.id],errorMessage:w[z.caseType.id]}),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-field",optionList:e.subCaseTypeList,label:"Select Case Sub-Type",hasClose:!0,onFocus:()=>{var e;return(null===(e=T[z.caseType.id])||void 0===e?void 0:e.length)===0?I({caseType:"Please select CaseType"}):null},selectedOption:T[z.subCaseType.id],onSelectCB:e=>{B(z.subCaseType.id,e)},isError:!!w[z.subCaseType.id],errorMessage:w[z.subCaseType.id]}),p.jsx(b.MOutlinedTextArea,{className:"mo-textarea-default input-field",label:"Type a query and enter your comments below",rows:4,value:T[z.comments.id],isError:!!w[z.comments.id],errorMessage:w[z.comments.id],onChange:e=>B(z.comments.id,e),onFocusOut:()=>G(z.comments)}),p.jsxs("div",{className:"upload-file-holder",children:[p.jsxs("div",{className:"attachment-alert lbl-txt-info-2",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/infoicon.svg",alt:"info-icon"}),"Add attachment to resolve your query effectively."]}),p.jsx("input",{ref:i,type:"file",className:"file-input",onChange:e=>{if(e.target&&e.target.files&&e.target.files.length){let a=e.target.files[0],l=a.name?a.name.split("."):"",t=l[l.length-1].toLowerCase(),i=Object.assign({},w);K.split(", ").includes(t)?a.size>2e6?i[z.attachment.id]=eq.SERVICES.MAX_FILE_SIZE_ERROR:i[z.attachment.id]="":i[z.attachment.id]=eq.SERVICES.FILE_FORMAT_ERROR,j(a),I(i),O(Y(a.name))}else O("")},accept:".pdf, .png, .jpeg, .xls, .xlsx, .doc, .docx, .zip, .jpg",size:2e6}),A?p.jsxs(r.Fragment,{children:[p.jsxs("div",{className:"file-name lbl-txt-info-9",children:[p.jsx("img",{fetchPriority:"low",className:"file-icon",src:"/assets/drive_folder_upload_grey.svg",alt:"upload-file-image"}),_,p.jsx("img",{fetchPriority:"low",className:"delete-icon",src:"/assets/delete_icon_red.svg",alt:"file-delete-icon",onClick:()=>{j(void 0),O("");let e={...w};e[z.attachment.id]="",I(e)}})]}),w[z.attachment.id]?p.jsx("div",{className:"file-upload-error lbl-error-txt",children:w[z.attachment.id]}):""]}):p.jsx(N.ButtonWithIcon,{className:"btn-outline-primary upload-btn lbl-primary-txt-info2",value:"Attach File",icon:"/assets/drive_folder_upload.svg",type:"button",onClick:()=>{i.current&&i.current.click()}}),p.jsxs("div",{className:"lbl-txt-info-5",children:["Please use: ",K,". Maximum file size 2MB."]})]})]})}),p.jsxs("div",{className:"query-footer",children:[p.jsx("button",{className:"btn-outline-primary btn only-web",type:"button",onClick:()=>e.onCloseAskQuery&&e.onCloseAskQuery(),children:"Back to My Queries"}),p.jsx(f.ButtonWithLoader,{className:"btn-primary btn submit-btn",value:"Submit",isLoading:c,type:"submit",onClick:()=>{var e,a,l;let t={page_section:null!==(e=eV())&&void 0!==e?e:"",category1:null!==(a=T[z.caseType.id])&&void 0!==a?a:"",category2:null!==(l=T[z.subCaseType.id])&&void 0!==l?l:"",flow_name:P,user_type:F};d.GoogleAnalytics.recordEvent(d.GoogleAnalyticEvents.CustomerTicketing.QuerySubmitted(t))}})]})]}),v?p.jsx(x.OverlayPopup,{className:"dialog-popup-content dialog-popup-default",onClose:()=>h(!1),isFloating:!1,content:p.jsx(eY,{ticketNo:null!==(t=null==o?void 0:o.data.TicketNumber)&&void 0!==t?t:"",onClickDone:()=>{h(!1),e.onCloseAskQuery&&e.onCloseAskQuery(!0)}})}):""]})},eZ=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SUPPORT.GET_TICKET_RESPONSE,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},"");(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},eX=async e=>{let a=ey.SERVICE_URL+eS.SUPPORT.QUERY_STATUS,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},eQ=async e=>{let a=ey.SERVICE_URL+eS.SUPPORT.GET_CASE_TYPES,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},eJ=async(e,a)=>{let l=ey.SERVICE_URL+eS.SUPPORT.GET_SUB_CASE_TYPES,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify({caseType:e}));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},e$=async e=>{let a=ey.AGGREGATOR_URL+eS.SUPPORT.FOLIO_SCHEME_DETAILS,l=await u.getBearerToken(),t=await ef(a,{"Content-Type":"application/json",Authorization:"Bearer "+l},"");(null==t?void 0:t.status)==="success"?e.success(t):e.default(t)},e0=e=>p.jsx(x.OverlayPopup,{className:"dialog-popup-content",onClose:e.onClosePopup,isFloating:!0,showHeader:!0,showCloseOption:!0,title:"Filter",content:p.jsx(e1,{caseTypeList:e.caseTypeList,getSubCaseTypes:e.getSubCaseTypes,subCaseTypeList:e.subCaseTypeList,onApplyFilter:e.onApplyFilter,filterFormData:e.filterFormData,queryStatusList:e.queryStatusList})}),e1=e=>{let a;let[l,t]=r.useState({order:"",caseType:"",subCaseType:"",status:"",fromDate:ec(new Date),toDate:ec(new Date)}),[i,n]=r.useState(void 0),[o,s]=r.useState(""),[d,c]=r.useState(!1),[u,m]=r.useState(""),[v,h]=r.useState(!1);r.useEffect(()=>{t(e.filterFormData)},[e.filterFormData]),r.useEffect(()=>{if(e.queryStatusList&&e.queryStatusList.length){let a=[];e.queryStatusList.map(e=>
1{a.push({id:e,displayvalue:e})}),n(a)}},[e.queryStatusList]);let b=(e,a)=>{let i={...l};i[e]=a,e==H.CASE_TYPE&&(i[H.SUB_CASE_TYPE]="");let n=eB(i[H.FROM_DATE],ee.DDMMYYYY),o=eB(i[H.TO_DATE],ee.DDMMYYYY);n&&o&&n>o&&([H.FROM_DATE]=i[H.TO_DATE]),t(i),s(""),c(!1)},N=e=>{if(!e)return;let[a,l,t]=e.replace(/\//g,"-").split("-").map(Number);if(a&&l&&t)return new Date(t,l-1,a)};return p.jsxs("div",{className:"query-filter-content",children:[p.jsxs("div",{className:"filter-content-holder",children:[p.jsxs("div",{className:"filter-row width-100",children:[p.jsx("label",{className:"lbl-info5",children:"Sort by Date"}),p.jsx("div",{className:"filter-content",children:p.jsx(E.Chips,{className:"sip-freq-btn",list:W,selectedradio:l[H.ORDER],onChange:e=>{b(H.ORDER,null!=e?e:"")}})})]}),p.jsxs("div",{className:"filter-row",children:[p.jsx("label",{className:"lbl-info5",children:"Case Type"}),p.jsx("div",{className:"filter-content",children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-field",optionList:e.caseTypeList,label:"Select Case Type",hasClose:!0,selectedOption:l?l[H.CASE_TYPE]:"",onSelectCB:a=>{b(H.CASE_TYPE,a),e.getSubCaseTypes&&e.getSubCaseTypes(a),a&&(h(!1),m(""))},isError:v,errorMessage:u})})]}),p.jsxs("div",{className:"filter-row",children:[p.jsx("label",{className:"lbl-info5",children:"Case Sub-Type"}),p.jsx("div",{className:"filter-content",children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-field",optionList:l&&l[H.CASE_TYPE]?e.subCaseTypeList:[],label:"Select Case Type",hasClose:!0,selectedOption:l?l[H.SUB_CASE_TYPE]:"",onSelectCB:e=>b(H.SUB_CASE_TYPE,e),onFocus:()=>{""===l[H.CASE_TYPE]&&(h(!0),m(eq.SERVICES.CASE_TYPE_ERROR))}})})]}),p.jsxs("div",{className:"filter-row",children:[p.jsx("label",{className:"lbl-info5",children:"Case Status"}),p.jsx("div",{className:"filter-content",children:p.jsx(y.MultiSelectChips,{className:"sip-freq-btn",list:null!=i?i:[],selectedRadioList:l&&l[H.STATUS]?l[H.STATUS].split(","):[],onChange:e=>{let a="";(null==e?void 0:e.length)&&(a=e.join(",")),b(H.STATUS,a)}})})]}),p.jsxs("div",{className:"filter-row",children:[p.jsx("label",{className:"lbl-info5",children:"By Date"}),p.jsxs("div",{className:"filter-content",children:[p.jsx(S.DatePickerComponent,{label:"From",selectedDate:N(l[H.FROM_DATE]),dateSeparator:"-",dateFormat:"DDMMYYYY",minDate:new Date(1899,0,1),maxDate:N(l[H.TO_DATE]?l[H.TO_DATE]:ec(new Date)),disabled:!1,removeClearIcon:!0,onChange:e=>{b(H.FROM_DATE,null==e?void 0:e.stringDate)}}),p.jsx(S.DatePickerComponent,{label:"To",selectedDate:N(l[H.TO_DATE]),dateSeparator:"-",dateFormat:"DDMMYYYY",minDate:N(l[H.FROM_DATE]),maxDate:new Date,disabled:!1,removeClearIcon:!0,onChange:e=>{b(H.TO_DATE,null==e?void 0:e.stringDate)}})]})]})]}),p.jsxs("div",{className:"filter-footer",children:[p.jsx("button",{className:"btn-outline-primary",onClick:()=>{let e={...l};Object.keys(e).map(a=>{e[a]=""}),t(e)},children:"Reset"}),p.jsx("button",{className:"btn-primary",onClick:()=>{var a;let t=new Date,[i,n,o]=l.fromDate.split("-").map(Number);if(new Date(o,n-1,i)>t){c(!0),s(eq.SERVICES.FROM_DATE_ERROR_MSG);return}null===(a=e.onApplyFilter)||void 0===a||a.call(e,l)},disabled:(a=!0,Object.values(e.filterFormData).map(e=>{e&&(a=!1)}),a&&Object.values(l).map(e=>{e&&(a=!1)}),a),children:"Apply"})]})]})},e2=()=>{var e,a;let l=r.useRef(null),[t,i]=r.useState([]),[n,o]=r.useState([]),[s,h]=r.useState(G[0]),[g,b]=r.useState(),[N,f]=r.useState(!1),[x,C]=r.useState(!1),[E,y]=r.useState(!1),[S,A]=r.useState(!1),[j,T]=r.useState(""),[D,w]=r.useState(""),[I,_]=r.useState(void 0),[O,k]=r.useState(void 0),[R,M]=r.useState(void 0),[L,P]=r.useState({order:"",caseType:"",subCaseType:"",status:"",fromDate:"",toDate:""}),[F,B]=r.useState([]),U=u.useLoginContextData(),Y=U.isUserLoggedIn()||U.isUserSoftLoggedIn()?"post login journey":"pre login journey",z=null!==(a=null===(e=U.loggedInUserDetails)||void 0===e?void 0:e.user_type)&&void 0!==a?a:"na",[H,K]=r.useState(!0),[W,Z]=r.useState(1),[X,Q]=r.useState(!1);r.useEffect(()=>{J()},[U]);let J=async()=>{var e;K("not-loggedin"!==await (null===(e=U.getLoginStatus)||void 0===e?void 0:e.call(U)))};r.useEffect(()=>{var e;U.loggedInUserDetails.pan&&eu(null!==(e=U.loggedInUserDetails.pan)&&void 0!==e?e:"")},[U.loggedInUserDetails.pan]),r.useEffect(()=>{(null==F?void 0:F.length)&&(ep(),ex(),ey())},[F]),r.useEffect(()=>{if(X){let e=setTimeout(()=>{ep()},5e3);return()=>clearTimeout(e)}},[X]),r.useEffect(()=>{if(L){let e=!1;Object.values(L).map(a=>{a&&(e=!0)}),y(e)}},[JSON.stringify(L)]);let $=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];f(!1),k(void 0),e&&await ep()},ee=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:j,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n;return e?Object.assign([],a).filter(a=>{let l="";return Object.values(a).map(e=>{l+=" "+e}),e.split(" ").every(a=>(a=a.toUpperCase(),e=e.toUpperCase(),RegExp("".concat(a),"gi").test(l)))}):a},ea=e=>{var a,l,t,i;e?b(e):b(void 0),f(!0);let n={page_section:null!==(t=eV())&&void 0!==t?t:"",page_sub_section:"our_services",cta_name:"Ask a Query",flow_name:Y,user_type:z};d.GoogleAnalytics.recordEvent(d.GoogleAnalyticEvents.CustomerTicketing.CtaClick(n));let o={page_section:null!==(i=eV())&&void 0!==i?i:"",page_sub_section:"our_services",cta_name:"Ask a Query",flow_name:Y,user_type:z,category:"NA"};d.GoogleAnalytics.recordEvent(null===(l=d.GoogleAnalyticEvents)||void 0===l?void 0:null===(a=l.ServiceCentre)||void 0===a?void 0:a.ButtonClick(o))},el=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:L,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n,l=Object.assign([],a);return e.caseType&&(l=et(l,e.caseType)),e.subCaseType&&(l=ei(l,e.subCaseType)),(e.fromDate||e.toDate)&&(l=eo(l,e.fromDate,e.toDate)),e.status&&(l=es(l,e.status)),e.order&&(l=ed(l,e.order)),l},et=(e,a)=>e=e.filter(e=>e.caseType.toLowerCase()===a.toLowerCase()),ei=(e,a)=>e=e.filter(e=>{var l;return(null===(l=e.caseSubType)||void 0===l?void 0:l.toLowerCase())===a.toLowerCase()});function en(e,a){let l=e.split("-"),t=parseInt(l[0],10),i=parseInt(l[1],10)-1,n=parseInt(l[2],10);return a?new Date(n,i,t,0,0,0,0):new Date(n,i,t,23,59,59,999)}let eo=(e,a,l)=>e=a&&l?e.filter(e=>new Date(e.createdOn)>=en(a,!0)&&new Date(e.createdOn)<=en(l,!1)):a?e.filter(e=>new Date(e.createdOn)>
1=en(a,!0)):e.filter(e=>new Date(e.createdOn)<=en(l,!1)),es=(e,a)=>{let l=(a=a.toLowerCase()).split(",");return e=e.filter(e=>{var a;return l.includes(null===(a=e.status)||void 0===a?void 0:a.toLowerCase())})},ed=(e,a)=>(e.sort(function(e,l){var t=new Date(ec(e.createdOn.split(" ")[0])),i=new Date(ec(l.createdOn).split(" ")[0]);return a===q?t<i?-1:t==i?0:1:t<i?1:t==i?0:-1}),e),ec=e=>{if(e){let a=e.split("-");return a[1]+"-"+a[0]+"-"+a[2]}return""},eu=e=>{e$({default:ev,success:em})},em=e=>{let a=[];e.userFolios.map(e=>{let l={name:e.folioName,bank:e.bankName+" "+e.bankAccountNumber,scheme:e.schemeCount,dispName:e.folioName+" / "+e.folioNumber,folioNumber:e.folioNumber};a.push(l)}),B(a)},ev=e=>{},ep=async()=>{var e;let a=await (null===(e=U.getLoggedinUserDetails)||void 0===e?void 0:e.call(U));eZ((null==a?void 0:a.pan)||"",{default:eg,success:eh})},eh=e=>{let a=null==e?void 0:e.data;a&&(a=a.map(e=>{var a,l;return e.createdOn=null===(a=e.createdOn)||void 0===a?void 0:a.split(" ")[0],e.tat=null===(l=e.tat)||void 0===l?void 0:l.split(" ")[0],e}),C(!1),o(JSON.parse(JSON.stringify(a))),i(a),Q(!1))},eg=e=>{C(!1)},eb=e=>{k(void 0),C(!0),eJ(e,{default:ef,success:eN})},eN=e=>{C(!1),k(e.data.subCaseType)},ef=e=>{k([]),C(!1)},ex=()=>{C(!0),M(void 0),eX({default:eE,success:eC})},eC=e=>{C(!1),M(e.data.status)},eE=e=>{C(!1),M([])},ey=()=>{eQ({default:eA,success:eS})},eS=e=>{_(e.data.caseTypes)},eA=e=>{_([])};return r.useEffect(()=>{l.current&&l.current.scrollTo({top:0,behavior:"smooth"})},[W]),r.useEffect(()=>{l.current&&l.current.scrollTo({top:0,behavior:"smooth"})},[]),H||window.location.replace("/"),p.jsxs("div",{className:"query-section",ref:l,children:[p.jsx(m.Loader,{showLoader:x}),N?p.jsx(eW,{caseTypeList:I,onCloseAskQuery:$,selectedQuery:g,getSubCaseTypes:eb,subCaseTypeList:O,folioList:F,triggerListCHild:e=>{Q(e)}}):p.jsxs(r.Fragment,{children:[p.jsx(er,{selectedMenu:s,onChangeMenuCB:e=>{h(e)},searchValue:j,onChangeSearchInput:e=>{let a=e.replace(/[^a-zA-Z0-9 ]/g,""),l=a.length>200?a.slice(0,200):a;T(l);let t=ee(l);i(t=el(void 0,t))},isFilterApplied:E,onClickFilterIcon:()=>{A(!0)}}),s===V.My_Queries?p.jsxs(r.Fragment,{children:[p.jsx(eT,{onClickAskQuery:ea,queryList:t,filterFormData:L,setCurrentPageChange:Z}),t.length?p.jsx(eU,{onClickAskQuery:ea}):""]}):p.jsx(c.FaqHomePage,{})]}),S?p.jsx(e0,{caseTypeList:I,subCaseTypeList:O,filterFormData:L,queryStatusList:R,getSubCaseTypes:eb,onClosePopup:()=>{A(!1)},onApplyFilter:e=>{P(e);let a=el(e);i(a=ee(void 0,a)),A(!1)}}):"",p.jsx(v.CustomToast,{id:"queryselection",message:D,limit:3,autoClose:!0,autoCloseDelay:5e3,type:"success",theme:"dark"})]})},e3=()=>p.jsxs("div",{className:"contactus-card",children:[p.jsx("div",{className:"img-holder",children:p.jsx("img",{fetchPriority:"low",src:"./assets/contact_us.svg",alt:"cantact-image"})}),p.jsxs("div",{className:"contact-content-holder",children:[p.jsx("div",{className:"content-heading lbl-card-title",children:"Contact Us"}),p.jsx("div",{className:"info-txt lbl-card-tag",children:"Not sure what you need? The team at AxisMF will be happy to listen to you and suggest ideas you hadnât considered"})]}),p.jsxs("div",{className:"contact-info",children:[p.jsxs("div",{className:"contact-email",children:[p.jsx("img",{fetchPriority:"low",src:"./assets/email_icon.svg",alt:"email-icon"}),p.jsx("span",{className:"lbl-banner-title-1",children:"[email protected]"})]}),p.jsxs("div",{className:"contact-phone",children:[p.jsx("img",{fetchPriority:"low",src:"./assets/phone_icon.svg",alt:"phone-icon"}),p.jsx("span",{className:"lbl-banner-title-1",children:"8108622211"})]})]})]}),e9=(e,a,l,t)=>{if(!a)return"Valid ".concat(e," is required.");let i=a.trim().length;if(i<l||i>t)return"Enter minimum ".concat(l," and maximum ").concat(t," characters")},e6=function(e){let a,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&""!=e&&!(l?/^[A-Z]{3}[P][A-Z][0-9]{4}[A-Z]$/:/^[A-Z]{3}[PTG][A-Z][0-9]{4}[A-Z]$/).test(e)&&(a=eq.COMMON_VALIDATION.validPan),a},e5=e=>{var a,l;let t;return!e||/^\d+$/.test(e.replace(/\s+/g,""))?t="Address 1 is mandatory":!e||/^[()/,-.]+$/.test(e.trim())?t=eq.APPLICANTDETAILSFORMVALIDATION.val
1idAddress:(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<6||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=80)&&(t=eq.ADD_NEW_FORM_VALIDATION.addressSixCharacter),t},e4=e=>{var a,l;let t;return(null==e?void 0:e.trim())?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=60)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.nriCityCharCount):t="City is mandatory",t},e8=e=>{var a,l;let t;return(null==e?void 0:e.trim())?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=60)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.threeSixtyCharacterCount):t="State is mandatory",t},e7=e=>{var a,l;let t;return(null==e?void 0:e.trim())?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=60)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.threeSixtyCharacterCount):t="Country is mandatory",t},ae=e=>{var a,l;let t;return((null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>10)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.threeTenCharacterCount),t},aa=e=>{let a;return e?(e&&!/^\+?[1-9]\d{1,14}$/.test(e)&&(a=eq.DOWNLOAD_APP.enterValidMobileNumber),/^(\d)\1+$/.test(e))?eq.DOWNLOAD_APP.enterValidMobileNumber:a:void 0},al=(e,a)=>{let l;return/^[6789]\d{9}$/.test(e)||(l=(null==e?void 0:e.length)==0?eq.SERVICES.MOBILE_REQ:eq.SERVICES.VALID_MOBILE_NUMBER),l},at=e=>{let a;return e&&""!=e&&!/^\d{4}$/.test(e)&&(a=eq.ADD_NEW_FORM_VALIDATION.isValidAadhar),a},ai=e=>{let a;return e&&""!=e&&!/^[A-Z][A-Z0-9]{9}$/.test(e)&&(a=eq.ADD_NEW_FORM_VALIDATION.isValidPassport),a},an=e=>{let a;return e&&""!=e&&!/^[A-Z0-9]{20}$/.test(e)&&(a=eq.ADD_NEW_FORM_VALIDATION.isValidDrivingLicense),a},ao=(e,a,l)=>{let t;return!a||a.length<l?t="".concat(e," is mandatory and should have minimum 3 characters"):"Nominee Name"===e&&a&&a.length>=120?t="Nominee Name should have maximum 120 characters":"Appointee Name"===e&&a&&a.length>=100?t="Appointee Name should have maximum 100 characters":"Nominee Name"!==e&&"Appointee Name"!==e&&a&&a.length>32&&(t="".concat(e," should have maximum 32 characters")),t},as=e=>{let a;return/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)||(a=eq.SERVICES.EMAIL_REQ),a},ar=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["com","in","co.in","org"],l=a.map(e=>e.replace(".","\\.")).join("|");return RegExp("^[^\\s@]+@[^\\s@]+\\.(".concat(l,")$"),"i").test(e)},ad=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.MODIFY_KYC_GENERATE_OTP,t=await ef(l,{},JSON.stringify({mobile:e,email:a}));return(null==t?void 0:t.status)==="success"?{success:t}:{default:t}},ac=e=>{var a,l;let[t,i]=r.useState({email:!0,mobile:!0}),n=e=>{i(a=>({...a,[e]:!1}))},o=a=>{e.onResend(a),i(e=>({...e,[a]:!0}))};return p.jsxs("div",{className:"verify-otp",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/otp_icon.png",alt:"otp icon"}),p.jsxs("label",{className:"lbl-txt-info-8 txt-center info",children:[null==e?void 0:e.displayMessage," ",p.jsx("br",{}),p.jsx("label",{className:"llbl-card-title-12 txt-center info",children:"Please enter both OTP to proceed"})]}),p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",value:e.otpValueMail,type:"password",onChange:a=>{let l=a.replace(/[^0-9]/gi,"").replace(/^\s+/,"");e.onMailOtpChange(l)},label:"Enter Email OTP"},"1"),p.jsxs("div",{className:"info-holder",children:[p.jsx("label",{className:"lbl-txt-content",children:"Didn't receive code? "}),(null==t?void 0:t.email)?p.jsxs(r.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"Retry in"}),p.jsx(T.CountdownTimer,{className:"countdown-timer-default",interval:"01:00",onCountdownComplete:()=>n("email")})]}):p.jsx("button",{id:"verify-otp-request-again",className:"btn-text-primary btn-retry",onClick:()=>o("email"),children:"Resend OTP"})]}),p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",value:e.otpValueMobile,onChange:a=>{let l=a.replace(/[^0-9]/gi,"").replace(/^\s+/,"");e.onMobileOtpChange(l)},type:"password",label:"Enter Mobile OTP"},"1"),p.jsxs("div",{className:"info-holder",children:[p.jsx("label",{className:"lbl-txt-content",children:"Didn't receive code? "}),(null==t?void 0:t.mobile)?p.jsxs(r.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"Retry in"}),p.jsx(T.CountdownTimer,{className:"countdown-timer-default",interval:"01:00",onCountdownComplete:()=>n("mobile")})]}):p.jsx("button",{id:"verify-otp-request-again",className:"btn-text-primary btn-retry",onClick:()=>o("mobile"),children:"Resend OTP"})]}),p.jsx("div",{className:"footer-holder",children:p.jsx("button",{id:"verify-otp-submit",className:"btn-primary",type:"button",disabled:(null===(a=e.otpValueMobile)||void 0===a?void 0:a.length)!==6||(null===(l=e.otpValueMail)||void 0===l?void 0:l.length)!==6,onClick:e.onVerify,children:"Submit"})})]})},au=async(e,a)=>{var l,t;let i=ey.AGGREGATOR_URL+eS.SERVICE.MODIFY_KYC_VERIFY_OTP,n={emailOtp:e.emailOtp,mobileOtp:e.mobileOtp,emailToken:e.emailToken,mobileToken:e.mobileToken,isEmailVerified:e.isEmailVerified,isMobileVerified:e.isMobileVerified},o=await ef(i,{},JSON.stringify(n));(null==o?void 0:o.status)==="success"?null===(l=a.success)||void 0===l||l.call(a,o):null===(t=a.default)||void 0===t||t.call(a,o)},am="mobile",av="email",ap=()=>({mobile:"",email:"",errorMessage:{name:void 0,email:void 0}}),ah=e=>{var a,l,t,i,n,o,s;let[c,v]=r.useState(ap()),[h,g]=r.useState(!1),[b,N]=r.useState(!1),[f,C]=r.useState(!1),[E,y]=r.useState(!1),[S,T]=r.useState(""),[w,I]=r.useState(""),[_,O]=r.useState(""),[k,R]=r.useState({emailToken:"",mobileToken:""}),[M,L]=r.useState({mobile:"",email:""}),[P,F]=r.useState(!1),[B,V]=r.useState(!1),[U,Y]=r.useState(!0),[G,z]=r.useState(""),H=u.useLoginContextData(),K=(null==c?void 0:c.mobile)!==(null==M?void 0:M.mobile),q=(null==c?void 0:c.email)!==(null==M?void 0:M.email);r.useEffect(()=>{var a,l;null==e||null===(a=e.isTriggerisMobileChanged)||void 0===a||a.call(e,K),null==e||null===(l=e.isTriggerisEmailChanged)||void 0===l||l.call(e,q)},[K,q]),r.useEffect(()=>{var a,l;null==e||null===(a=e.transMobileNo)||void 0===a||a.call(e,null==c?void 0:c.mobile),null==e||null===(l=e.transemailID)||void 0===l||l.call(e,null==c?void 0:c.email)},[null==c?void 0:c.mobile,null==c?void 0:c.email]),r.useEffect(()=>{var e;(null==c?void 0:c.mobile.length)===0&&Y(!1);let a=null==H?void 0:null===(e=H.loggedInUserDetails)||void 0===e?void 0:e.pan;W(null!=a?a:"")},[]);let W=async e=>{y(!0);let a=await u.placeGetPageSpecificInfo({pan:e,pageName:"ServicesContactDetails",pageUrl:window.location.href,journeyId:"",journeyName:"",source:""});a.success?X(a.success):a.default&&Z(a.default),y(!1)}
1,Z=e=>{},X=e=>{if(null==e?void 0:e.data){var a,l,t,i;v(a=>{var l,t,i,n;return{...a,email:(null!==(i=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.emailId)&&void 0!==i?i:"").toLowerCase(),mobile:null!==(n=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.mobileNo)&&void 0!==n?n:""}}),L({mobile:null!==(t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.mobileNo)&&void 0!==t?t:"",email:(null!==(i=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.emailId)&&void 0!==i?i:"").toLowerCase()})}},Q=async()=>{var a,l,t,i,n,o,s,r,u,m,v,p,h,g,b,f,x,E,y,S,A,j,T,D,w,I,_,O,k;let L;d.LocalStorage.instance.userDetails.email.set(null==c?void 0:c.email),d.LocalStorage.instance.userDetails.mobile.set(null==c?void 0:c.mobile),K&&q?(null==(L=await ad(null==c?void 0:null===(a=c.mobile)||void 0===a?void 0:a.slice(-10),null==c?void 0:c.email))?void 0:L.success)&&(N(!0),null==e||null===(l=e.isTriggershowVerify)||void 0===l||l.call(e,!0),null==e||null===(t=e.isTriggerParentPop)||void 0===t||t.call(e,!1)):q?(L=await ad(null,null==c?void 0:c.email),C(!0),null==e||null===(i=e.isTriggershowMobileVerify)||void 0===i||i.call(e,!0),null==e||null===(n=e.isTriggerParentPop)||void 0===n||n.call(e,!1)):K?(L=await ad(null==c?void 0:null===(o=c.mobile)||void 0===o?void 0:o.slice(-10),null),C(!0),null==e||null===(s=e.isTriggershowMobileVerify)||void 0===s||s.call(e,!0),null==e||null===(r=e.isTriggerParentPop)||void 0===r||r.call(e,!1)):(null==H||null===(m=H.setModifyKycDetails)||void 0===m||m.call(H,{email:null==M?void 0:M.email,mobile:null==M?void 0:M.mobile,pan:null==H?void 0:null===(u=H.loggedInUserDetails)||void 0===u?void 0:u.pan,isOtpVerifid:!0}),(null==e?void 0:e.showKYCConfirmation)&&(null==e||e.showKYCConfirmation()),null==e||null===(v=e.isTriggerParentPop)||void 0===v||v.call(e,!1),localStorage.setItem("fromModifyKyc","true"),eG("/digital-kyc")),(null==L?void 0:L.success)&&(null==e||null===(g=e.displayMsg)||void 0===g||g.call(e,null==L?void 0:null===(h=L.success)||void 0===h?void 0:null===(p=h.data)||void 0===p?void 0:p.displayMessage),z(null==L?void 0:null===(f=L.success)||void 0===f?void 0:null===(b=f.data)||void 0===b?void 0:b.displayMessage),R({emailToken:null==L?void 0:null===(E=L.success)||void 0===E?void 0:null===(x=E.data)||void 0===x?void 0:x.emailToken,mobileToken:null==L?void 0:null===(S=L.success)||void 0===S?void 0:null===(y=S.data)||void 0===y?void 0:y.mobileToken}),null==e||null===(T=e.emailToken)||void 0===T||T.call(e,null==L?void 0:null===(j=L.success)||void 0===j?void 0:null===(A=j.data)||void 0===A?void 0:A.emailToken),null==e||null===(I=e.mobileToken)||void 0===I||I.call(e,null==L?void 0:null===(w=L.success)||void 0===w?void 0:null===(D=w.data)||void 0===D?void 0:D.mobileToken),null===(O=H.triggerLoginToast)||void 0===O||O.call(H,{message:null!==(k=null==L?void 0:null===(_=L.success)||void 0===_?void 0:_.message)&&void 0!==k?k:"",isSuccess:!0}))},J=(e,a)=>{let l,t={...c};if(e===am){Y(!0),l=a.trim().replace(/\D/g,"");let e=/^[6789]\d{0,9}$/.test(l.slice(-10));if(l.length>10)return;t.errorMessage[am]=e?"":el.ENTER_VALID+" Mobile number"}else if(e===av){l=a.trim().replace(/\s/g,"").replace(/[^a-zA-Z0-9@._-]/g,"");let e="";""===l?e=eq.SERVICES.EMAIL_REQ:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(l)||(e=el.ENTER_VALID+" Email ID"),t.errorMessage[av]=e}t[e]=null!=l?l:"",v(t)},$=e=>{let a={...c};if(e===am){var l,t,i;Y(!0);let e=null===(l=c.mobile)||void 0===l?void 0:l.slice(-10).trim().replace(/\D/g,""),n=/^[6789]\d{0,9}$/.test(e);""===e?a.errorMessage[am]=al(null===(t=c.mobile)||void 0===t?void 0:t.slice(-10)):n?(a.errorMessage.mobile=al(null===(i=c.mobile)||void 0===i?void 0:i.slice(-10)),a.errorMessage.mobile&&(a.errorMessage[am]=el.ENTER_VALID+" Mobile number")):a.errorMessage[am]=el.ENTER_VALID+" Mobile number"}if(e===av){let e=c.email.trim().replace(/\s/g,"").replace(/[^a-zA-Z0-9@._-]/g,""),l="";""===e?l=eq.SERVICES.EMAIL_REQ:/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)||(l=el.ENTER_VALID+" Email ID"),a.errorMessage.email=l}v(a)},ee=()=>{N(!1),C(!1),I(""),T("")},ea=async()=>{var a,l,t,i,n,o,s,r,d;N(!1),C(!1);let c=q?_:null,u=K?_:null,m=await au(c&&c.length>0?c:w,u&&u.length>0?u:S,null==k?void 0:k.emailToken,null==k?void 0:k.mobileToken);(null==m?void 0:m.success)?(N(!1),null==e||null===(a=e.showKYCConfirmation)||void 0===a||a.call(e),null==H||null===(t=H.setModifyKycDetail
1s)||void 0===t||t.call(H,{email:null==M?void 0:M.email,mobile:null==M?void 0:M.mobile,pan:null==H?void 0:null===(l=H.loggedInUserDetails)||void 0===l?void 0:l.pan,isOtpVerifid:!0}),eG("/kyc")):(null==m?void 0:m.default)&&(V(null!==(s=null==m?void 0:m.default.data.isEmailVerified)&&void 0!==s&&s),F(null!==(r=null==m?void 0:m.default.data.isMobileVerified)&&void 0!==r&&r),null===(n=H.triggerLoginToast)||void 0===n||n.call(H,{message:null!==(d=null===(i=m.default)||void 0===i?void 0:i.message)&&void 0!==d?d:""}),I(""),T(""),O(""),(null===(o=m.default)||void 0===o?void 0:o.message)&&!(m.default.message.includes("LOG-039")||m.default.message.includes("Maximum attempts reached"))?b?N(!0):C(!0):(N(!1),C(!1)))},et=async e=>{var a,l;let t;if("email"===e){let e=await ad(null,null==c?void 0:c.email);(null==e?void 0:e.success)&&(null==H||null===(a=H.triggerLoginToast)||void 0===a||a.call(H,{message:"OTP Sent Successfully",isSuccess:!0}))}else(null==(t=await ad(null==c?void 0:c.mobile,null))?void 0:t.success)&&(null==H||null===(l=H.triggerLoginToast)||void 0===l||l.call(H,{message:"OTP Sent Successfully",isSuccess:!0}))},ei=async()=>{let e;if(null==(e=K?await ad(null==c?void 0:c.mobile,null):await ad(null,null==c?void 0:c.email))?void 0:e.success){var a;null==H||null===(a=H.triggerLoginToast)||void 0===a||a.call(H,{message:"OTP Sent Successfully",isSuccess:!0})}},en=!h||!(!al(null===(s=c.mobile)||void 0===s?void 0:s.slice(-10))&&!as(c.email));return p.jsxs("div",{className:"contact-details-confirmation-content remove-top-borader-spec",children:[p.jsx(m.Loader,{showLoader:E}),p.jsx("div",{className:"contact-details-confirmation",children:p.jsxs("div",{className:"row",children:[p.jsxs("div",{className:"input-holder",children:[p.jsx("span",{className:"plus-number",style:{zIndex:10},children:U||(null==c?void 0:c.mobile)?"+91":""}),p.jsx(j.MOutlinedTextBox,{id:"mobile-number",className:"moutlined-txtbx-default add-new-nominee-input kyc-first-num-input",label:"Enter Mobile Number",value:null===(a=c.mobile)||void 0===a?void 0:a.slice(-10),type:"text",isError:!!(null===(l=c.errorMessage)||void 0===l?void 0:l.mobile),errorMessage:null===(t=c.errorMessage)||void 0===t?void 0:t.mobile,inputMode:"numeric",onChange:e=>J(am,e),onFocusOut:()=>{$(am),(null==c?void 0:c.mobile)||Y(!1)},onFocus:()=>Y(!0)})]}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"email",className:"moutlined-txtbx-default add-new-nominee-input padding-zk-email-input",label:"Enter Email ID",value:c.email,isError:!!(null===(i=c.errorMessage)||void 0===i?void 0:i.email),errorMessage:null===(n=c.errorMessage)||void 0===n?void 0:n.email,onChange:e=>J(av,e),onFocusOut:()=>$(av)})}),p.jsxs("div",{className:"check-verify-kyc-info",children:[p.jsx(A.ConsentInputCheckbox,{className:"condition-checkbox regular-consent-checkbox-terms_text",disabled:!1,isSelected:h,isError:!1,onChange:()=>{g(!h)}}),p.jsx("label",{className:"lbl-card-title-1 terms-conditions",children:"I understand by proceeding that I am updating my existing verified KYC "})]}),p.jsx("div",{className:"disclimaer",children:p.jsxs("label",{className:"disclimaer-txt",children:[p.jsx("span",{className:"disclaimer-bold",children:"Disclaimer :"})," The modification will take upto 5 business days to reflect, subject to verification of documents."]})})]})}),p.jsx("div",{className:"submit-button add-zk-submit-box-shadow ".concat(en?"disabled":""),children:p.jsx("button",{className:"btn-outline-primary submit-btn",type:"button",onClick:Q,disabled:en,children:"Submit"})}),b&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content kyc-details-new",isFloating:!0,showHeader:!1,onClose:ee,content:p.jsx(ac,{mobilenumber:null==c?void 0:c.mobile,email:c.email,errormessage:"",onMobileOtpChange:e=>{(null==e?void 0:e.length)>6||T(e)},onMailOtpChange:e=>{(null==e?void 0:e.length)>6||I(e)},onVerify:ea,onResend:et,otpValueMobile:S,otpValueMail:w,displayMessage:G})}),f&&p.jsx(x.OverlayPopup,{className:"dialog-popup-default remove-top-borader-spec",showHeader:!1,isFloating:!1,onClose:ee,content:p.jsx(D.VerifyOTPPopup,{errormessage:"",...K&&{mobileNumber:null===(o=c.mobile)||void 0===o?void 0:o.slice(-10)},...q&&{emailId:c.email},onResend:ei,onVerify:ea,onOtpChange:e=>{O(e)},isNewUser:!0})})]})},ag=e=>{var a,l;let t=u.useLoginContextData(),i=t.isUserLoggedIn()||t.isUserSoftLoggedIn()?"post login journey":"pre login journey",n=null!==(l=null===(a=t.loggedInUserDetails)||void 0===a?void 0:a.user_t
1ype)&&void 0!==l?l:"na",[o,s]=r.useState(!1),c=e=>{let a=e.trim();return/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(a)},m=(e,a)=>{if(e){var l,o;e.includes("kyc")?s(!0):(e.includes("sttletter")||e.includes("capitalgains")||e.includes("updatemobile")||e.includes("updatenominee")||e.includes("updateifsc")||e.includes("updateemail")||e.includes("addbankaccountdetails"))&&!t.isUserLoggedIn()?null==t||null===(l=t.triggerLogin)||void 0===l||l.call(t,!0,{successLoginCB:()=>{c(e)?window.open(e,"_blank"):eG(e)}}):c(e)?window.open(e,"_blank"):eG(e);let r={page_section:null!==(o=eV())&&void 0!==o?o:"NA",page_sub_section:"service center",cta_name:null!=a?a:"NA",flow_name:i,user_type:n};d.GoogleAnalytics.recordEvent(d.GoogleAnalyticEvents.ServiceCentre.CtaClick(r))}};return p.jsxs("div",{className:"service-menu-card",children:[e.list.map((e,a)=>{var l,t;return p.jsxs("div",{className:"change-mobileno",onClick:()=>{var a;return m(e.categoryUrl||e.url,null!==(a=null==e?void 0:e.category)&&void 0!==a?a:"")},children:[p.jsx("img",{fetchPriority:"low",src:null!==(l=e.icon)&&void 0!==l?l:e.categoryIcon,alt:"menu item"}),p.jsxs("div",{className:"column-row-wide",children:[p.jsx("label",{className:"lbl-card-title-2",children:null!==(t=e.title)&&void 0!==t?t:e.category}),p.jsx("label",{className:"lbl-primary-txt-content2",children:e.description})]})]},a)}),o&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,showCloseOption:!1,onClose:()=>s(!1),content:p.jsx(ah,{})})]})},ab=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.TOP_RECENT_TRANSACTION,t=await u.getBearerToken(),i=await ef(l,{Authorization:"Bearer "+t,"Content-Type":"application/json"},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},aN=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.GET_SERVICE_DETAILS,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},af=e=>{var a,l;let t;let[i,n]=r.useState(!0),[o,s]=r.useState(!0),[c,m]=r.useState(0),v=u.useLoginContextData(),h=e.isClearEmailOtp,g=e.isClearMobileOtp,[b,N]=r.useState(!0);function f(e){let a=r.useRef();return r.useEffect(()=>{a.current=e},[e]),a.current}let x=f(e.otpValueMobile),C=f(e.otpValueMail);r.useEffect(()=>{setTimeout(()=>N(!1),100)},[]),r.useEffect(()=>{let a=x&&6===x.length,l=""===e.otpValueMobile,t=C&&6===C.length,i=""===e.otpValueMail;(a&&l||t&&i)&&m(e=>e+1)},[e.otpValueMobile,e.otpValueMail,x,C]);let E=()=>{s(!1),n(!1)},y=(a,l)=>{"email"===a?n(!0):s(!0),e.onResend(a,l)};return p.jsxs("div",{className:"verify-otp verify-multiple-otp",children:[p.jsx("img",{fetchPriority:"low",src:d.pathChanger("otp_icon.png"),alt:"otp icon"}),p.jsx("label",{className:"lbl-banner-heading txt-center title",children:"OTP Verification"}),p.jsxs(p.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"OTP will be sent to your new mobile number (".concat((t="",(t=e.newMobileNumberVal||"")?t.slice(0,6).replace(/\d/g,"X")+t.slice(-4):""),")")}),p.jsx("div",{className:"otp-holder",children:p.jsx(w.OTPBox,{className:"otp-box-default",length:"6",isInputSecure:!0,value:e.otpValueMobile,onChange:a=>{e.onMobileOtpChange(a)},autoClose:!1,isClearField:e.isClearMobileOtp,firstInputFocusOff:!(g||b)},"mobile-".concat(c))}),p.jsxs("div",{className:"info-holder",children:[p.jsx("label",{className:"lbl-txt-content",children:"Didn't receive code? "}),o?p.jsxs(r.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"Retry in"}),p.jsx(T.CountdownTimer,{className:"countdown-timer-default",interval:"01:00",onCountdownComplete:E})]}):p.jsx("button",{id:"verify-otp-request-again",className:"btn-text-primary btn-retry",onClick:()=>{var a,l,t;return y("mobile",(null==e?void 0:e.updateContextType)==="M"?null!==(l=e.newMobileNumberVal)&&void 0!==l?l:"":null!==(t=null==v?void 0:null===(a=v.loggedInUserDetails)||void 0===a?void 0:a.phone_number)&&void 0!==t?t:"")},children:"Resend OTP"})]}),p.jsx("label",{className:"verify-otp-border-line"})]}),p.jsxs(p.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"OTP will be sent to your new mail id (".concat((e=>{if(e){let[a,l]=e.toLowerCase().split("@");if(!a||!l)return e;let t="X".repeat(8);return"".concat(t).concat(a.slice(-2),"@").concat(l)}return""})(e.newEmailVal||""),")")}),p.jsx("div",{className:"otp-holder",children:p.jsx(w.OTPBox,{className:"otp-box-default",length:"6",isInputSecure:!0,value:e.otpValueMail,onChange:a=>{e.onMailOtpChange(a)},autoClose:!1,isClearField:e.isClearEmailOtp,firstInputFocusOff:!h},"email-".concat(c))}),p.jsxs("div",{className:"info-holder",children:[p.jsx("label",{className:"lbl-txt-content",children:"Didn't receive code? "}),i?p.jsxs(r.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"Retry in"}),p.jsx(T.CountdownTimer,{className:"countdown-timer-default",interval:"01:00",onCountdownComplete:E})]}):p.jsx("button",{id:"verify-otp-request-again",className:"btn-text-primary btn-retry",onClick:()=>{var a,l,t;return y("email",(null==e?void 0:e.typeOtpFrom)==="E"?null!==(l=e.newEmailVal)&&void 0!==l?l:"":null!==(t=null===(a=v.loggedInUserDetails)||void 0===a?void 0:a.email)&&void 0!==t?t:"")},children:"Resend OTP"})]})]}),p.jsx("div",{className:"footer-holder",children:p.jsx("button",{id:"verify-otp-submit",className:"btn-primary",type:"button",disabled:!(6===e.otpValueMobile.length&&6===e.otpValueMail.length),onClick:e.onVerify,children:((null==e?void 0:null===(a=e.typeOtpFrom)||void 0===a?void 0:a.length)&&(null==e||null===(l=e.typeOtpFrom)||void 0===l||l.length),"Verify OTP")})})]})},ax=e=>{var a,l,t;let i=u.useLoginContextData(),n=u.useRootContextData(),o=i.isUserLoggedIn()||i.isUserSoftLoggedIn()?"post login journey":"pre login journey",s=null!==(t=null===(a=i.loggedInUserDetails)||void 0===a?void 0:a.user_t
1ype)&&void 0!==t?t:"na",[c,m]=r.useState(!1),v=null==i?void 0:i.isUserLoggedIn(),[h,g]=r.useState(!1),[b,N]=r.useState(!1),[f,C]=r.useState(!1),[E,y]=r.useState(!1),[S,A]=r.useState(""),[j,T]=r.useState(""),[w,I]=r.useState(""),[_,O]=r.useState(""),[k,R]=r.useState(""),[M,L]=r.useState({emailToken:"",mobileToken:""}),[P,F]=r.useState({mobile:"",email:""}),[B,V]=r.useState(!1),[U,Y]=r.useState(!1),[G,z]=r.useState(!1),[H,K]=r.useState(""),[q,W]=r.useState(""),[Z,X]=r.useState(""),[Q,J]=r.useState(!1),[$,ee]=r.useState(!1),[ea,el]=r.useState(!1);function et(e){let a=e.trim();return/^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(a)}let ei=(a,l)=>{if(a){var t,r,c;v&&"/kyc"===a?m(!0):a.includes("https://mfs.kfintech.com/panupdation/")?null==n||n.triggerServiceIssueDialog(!0):(a.includes("sttletter")||a.includes("capitalgains")||a.includes("updatemobile")||a.includes("updatenominee")||a.includes("updateifsc")||a.includes("updateemail")||a.includes("addbankaccountdetails")||"/kyc"===a||a.includes("/servicecenter/ourservices/e-mandate")||a.includes("/servicecenter/ourservices/autopay"))&&!i.isUserLoggedIn()?null==i||null===(t=i.triggerLogin)||void 0===t||t.call(i,!0,{successLoginCB:()=>{et(a)?window.open(a,"_blank"):"/kyc"===a?m(!0):eG(a)}}):et(a)?window.open(a,"_blank"):eG(a);let u={page_section:null!==(r=eV())&&void 0!==r?r:"NA",page_sub_section:null!==(c=null==e?void 0:e.categoryName)&&void 0!==c?c:"service center",cta_name:null!=l?l:"NA",flow_name:o,user_type:s};d.GoogleAnalytics.recordEvent(d.GoogleAnalyticEvents.ServiceCentre.CtaClick(u))}},en=()=>{g(!1),N(!1)},eo=async e=>{var a,l,t,n,o,s,r;let d;"mobile"===e?(X(null!==(t=null==(d=await ad(j,null))?void 0:null===(l=d.success)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.mobileToken)&&void 0!==t?t:""),ee(!0),setTimeout(()=>{ee(!1)},500),setTimeout(()=>{ee(!0)},1e3)):"email"===e&&(W(null!==(s=null==(d=await ad(null,S))?void 0:null===(o=d.success)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.emailToken)&&void 0!==s?s:""),el(!0),setTimeout(()=>{el(!1)},500),setTimeout(()=>{el(!0)},1e3)),(null==d?void 0:d.success)&&(null==i||null===(r=i.triggerLoginToast)||void 0===r||r.call(i,{message:"OTP Resent successfully",isSuccess:!0}))},es=async()=>{var e,a,l,t,n,o,s;let r;R(""),O(""),el(!0),ee(!0),setTimeout(()=>{ee(!1),el(!1)},500),setTimeout(()=>{ee(!0),el(!0)},1e3),E?X(null!==(l=null==(r=await ad(j,null))?void 0:null===(a=r.success)||void 0===a?void 0:null===(e=a.data)||void 0===e?void 0:e.mobileToken)&&void 0!==l?l:""):W(null!==(o=null==(r=await ad(null,S))?void 0:null===(n=r.success)||void 0===n?void 0:null===(t=n.data)||void 0===t?void 0:t.emailToken)&&void 0!==o?o:""),(null==r?void 0:r.success)&&(null==i||null===(s=i.triggerLoginToast)||void 0===s||s.call(i,{message:"OTP Resent Successfully",isSuccess:!0}))},er=()=>{let e=f?w:null,a=E?w:null;au({emailOtp:e&&e.length>0?e:k,mobileOtp:a&&a.length>0?a:_,emailToken:q,mobileToken:Z,isEmailVerified:U,isMobileVerified:B},{default:ed,success:ec})},ed=e=>{var a,l,t,n,o,s,r,d,c,u;Y(null!==(d=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.isEmailVerified)&&void 0!==d&&d),V(null!==(c=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.isMobileVerified)&&void 0!==c&&c),null===(t=i.triggerLoginToast)||void 0===t||t.call(i,{message:null!==(u=null==e?void 0:e.message)&&void 0!==u?u:""}),(null==e?void 0:null===(n=e.message)||void 0===n?void 0:n.includes("reinitiate"))?(O(""),R(""),el(!0),ee(!0),setTimeout(()=>{ee(!1),el(!1)},500),setTimeout(()=>{ee(!0),el(!0)},1e3),g(!1)):(null==e?void 0:null===(o=e.message)||void 0===o?void 0:o.includes("Email OTP is validated successfully; however,Incorrect mobile OTP is entered"))?(O(""),ee(!0),setTimeout(()=>{ee(!1)},500),setTimeout(()=>{ee(!0)},1e3)):(null==e?void 0:null===(s=e.message)||void 0===s?void 0:s.includes("Incorrect OTP"))?(R(""),O(""),el(!0),ee(!0),setTimeout(()=>{ee(!1),el(!1)},500),setTimeout(()=>{ee(!0),el(!0)},1e3)):(null==e?void 0:null===(r=e.message)||void 0===r?void 0:r.includes("Mobile OTP is validated successfully; however,Incorrect email OTP is entered"))&&(R(""),el(!0),setTimeout(()=>{el(!1)},500),setTimeout(()=>{el(!0)},1e3)),I(""),(null==e?void 0:e.message)&&!((null==e?void 0:e.message.includes("LOG-039"))||(null==e?void 0:e.message.includes("Maximum attempts reached"))||(null==e?void 0:e.message.includes("reinitiate")))?h?g(!0):N(!0):(g(!1),N(!1))},ec=e=>{var a;
1ee(!1),el(!1),g(!1),null==i||null===(a=i.setModifyKycDetails)||void 0===a||a.call(i,{isOtpVerifid:!0}),eG("/kyc")},eu=async()=>{er()};return p.jsxs("div",{className:"update-folio-menu-card",children:[null==e?void 0:null===(l=e.list)||void 0===l?void 0:l.map((e,a)=>p.jsxs("div",{className:"change-mobileno",onClick:()=>ei(e.url,null==e?void 0:e.title),children:[p.jsx("img",{fetchPriority:"low",src:e.icon,alt:"menu item"}),p.jsxs("div",{className:"column-row-wide",children:[p.jsx("label",{className:"lbl-card-title-2 title-texto",children:e.title}),p.jsx("label",{className:"lbl-primary-txt-content2 texto",children:e.text}),p.jsx("label",{className:"lbl-card-title-2",children:e.link})]})]},a)),c&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content kyc-details-updation",showHeader:!0,title:"Contact Details Confirmation",showCloseOption:!1,onClose:()=>m(!1),content:p.jsx(ah,{showKYCConfirmation:()=>m(!1),isTriggerParentPop:e=>m(e),isTriggershowMobileVerify:e=>{N(e)},isTriggershowVerify:e=>{g(e)},isTriggerisMobileChanged:e=>y(e),isTriggerisEmailChanged:e=>C(e),transMobileNo:e=>{T(e)},transemailID:e=>{A(e)},displayMsg:e=>{K(e)},emailToken:e=>{W(e)},mobileToken:e=>{X(e)}})}),h&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content dialog-popup-content-mobile-email-update",isFloating:!0,showHeader:!1,onClose:en,content:p.jsx(af,{mobilenumber:j,email:S,errormessage:"",onMobileOtpChange:e=>{(null==e?void 0:e.length)>6||O(e)},onMailOtpChange:e=>{(null==e?void 0:e.length)>6||R(e)},onVerify:eu,onResend:e=>eo(e),otpValueMobile:_,otpValueMail:k,newMobileNumberVal:j,newEmailVal:S,isClearMobileOtp:$,isClearEmailOtp:ea})}),b&&p.jsx(x.OverlayPopup,{className:"dialog-popup-default remove-top-borader-spec",showHeader:!1,isFloating:!1,onClose:en,content:p.jsx(D.VerifyOTPPopup,{errormessage:"",...E&&{mobileNumber:null==j?void 0:j.slice(-10)},...f&&{emailId:S},onResend:es,onVerify:eu,onOtpChange:e=>{I(e)},isNewUser:!0,isClearField:!($||ea)})})]})},aC=async e=>{let a=ey.SERVICE_URL+eS.SUPPORT.UPDATE_FOLIO_DETAILS,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},aE=r.memo(e=>{var a,l;let[t,i]=r.useState(!0),[n,o]=r.useState(!0),[s,c]=r.useState(0),m=u.useLoginContextData(),[v,h]=r.useState(e.isClearEmailOtp),[g,b]=r.useState(e.isClearMobileOtp),[N,f]=r.useState(v),[x,C]=r.useState(g),[E,y]=r.useState(!0),[S,A]=r.useState(0);function j(e){let a=r.useRef();return r.useEffect(()=>{a.current=e},[e]),a.current}r.useEffect(()=>{(null==e?void 0:e.isClearEmailOtp)&&(null==e?void 0:e.isClearMobileOtp)?(y(!0),h(!(null==e?void 0:e.isClearEmailOtp))):(h(e.isClearEmailOtp),b(e.isClearMobileOtp))},[e.isClearEmailOtp,e.isClearMobileOtp]),r.useEffect(()=>{f(v),C(g)},[v,g]);let D=j(e.otpValueMobile),I=j(e.otpValueMail);r.useEffect(()=>{setTimeout(()=>y(!1),100)},[]),r.useEffect(()=>{let a=D&&6===D.length,l=""===e.otpValueMobile,t=I&&6===I.length,i=""===e.otpValueMail;(a&&l||t&&i)&&c(e=>e+1)},[e.otpValueMobile,e.otpValueMail,D,I]);let _=()=>{let a="";return(a="M"===e.updateContextType?e.newMobileNumberVal||"":e.selectedFolioMobileNo||"")?a.slice(0,6).replace(/\d/g,"X")+a.slice(-4):""},O=()=>{o(!1),i(!1)},k=(a,l)=>{"email"===a?(i(!0),f(!0),h(!0)):(o(!0),C(!0),b(!0)),e.onResend(a,l)},R=e=>{if(e){let[a,l]=e.toLowerCase().split("@");if(!a||!l)return e;let t="X".repeat(8);return"".concat(t).concat(a.slice(-2),"@").concat(l)}return""};return p.jsxs("div",{className:"verify-otp verify-multiple-otp",children:[p.jsx("img",{fetchPriority:"low",src:d.pathChanger("otp_icon.png"),alt:"otp icon"}),p.jsx("label",{className:"lbl-banner-heading txt-center title",children:"OTP Verification"}),p.jsxs(p.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"M"===e.updateContextType?"OTP will be sent to your new mobile number (".concat(_(),")"):"OTP will be sent to your registered mobile number (".concat(_(),")")}),p.jsx("div",{className:"otp-holder",children:p.jsx(w.OTPBox,{className:"otp-box-default",length:"6",isInputSecure:!0,value:e.otpValueMobile,onChange:a=>{e.onMobileOtpChange(a),6===a.length&&0===S&&(C(!1),f(!0),h(!1))},autoClose:!1,isClearField:g,firstInputFocusOff:!(x||E),onFocusOut:()=>{C(!1),b(!1)}},"mobile-".concat(s))}),p.jsxs("div",{className:"info-holder",children:[p.jsx("label",{className:"lbl-txt-content",children:"Didn't receive code? "}),n?p.jsxs(r.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"Request again in"}),p.jsx(T.CountdownTimer,{className:"countdown-timer-default countdown-zk-timer-default",interval:"01:00",onCountdownComplete:O})]}):p.jsx("button",{id:"verify-otp-request-again",className:"btn-text-primary btn-retry",onClick:()=>{var a,l,t;k("mobile",(null==e?void 0:e.updateContextType)==="M"?null!==(l=e.newMobileNumberVal)&&void 0!==l?l:"":null!==(t=null==m?void 0:null===(a=m.loggedInUserDetails)||void 0===a?void 0:a.phone_number)&&void 0!==t?t:"")},children:"Resend OTP"})]}),p.jsx("label",{className:"verify-otp-border-line"})]}),p.jsxs(p.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"E"===e.updateContextType?"OTP will be sent to your new mail id (".concat(R(e.newEmailVal||""),")"):"OTP will be sent to your registered mail id (".concat(R(e.selectedFolioEmailId||""),")")}),p.jsx("div",{className:"otp-holder",children:p.jsx(w.OTPBox,{className:"otp-box-default",length:"6",isInputSecure:!0,value:e.otpValueMail,onChange:a=>{A(a.length),e.onMailOtpChange(a)},autoClose:!1,isClearField:v||N,firstInputFocusOff:!N,onFocusOut:()=>{f(!1),h(!1)}},"email-".concat(s))}),p.jsxs("div",{className:"info-holder",children:[p.jsx("label",{className:"lbl-txt-content",children:"Didn't receive code? "}),t?p.jsxs(r.Fragment,{children:[p.jsx("label",{className:"lbl-txt-content",children:"Request again in"}),p.jsx(T.CountdownTimer,{className:"countdown-timer-default countdown-zk-timer-default",interval:"01:00",onCountdownComplete:O})]}):p.jsx("button",{id:"verify-otp-request-again",className:"btn-text-primary btn-retry",onClick:()=>{var a,l,t;k("email",(null==e?void 0:e.typeOtpFrom)==="E"?null!==(l=e.newEmailVal)&&void 0!==l?l:"":null!==(t=null===(a=m.loggedInUserDetails)||void 0===a?void 0:a.email)&&void 0!==t?t:"")},children:"Resend OTP"})]})]}),p.jsx("div",{className:"footer-holder",children:p.jsx("button",{id:"verify-otp-submit",className:"btn-primary",type:"button",disabled:!(6===e.otpValueMobile.length&&6===e.otpValueMail.length),onClick:e.onVerify,children:((null==e?void 0:null===(a=e.typeOtpFrom)||void 0===a?void 0:a.length)&&(null==e||null===(l=e.typeOtpFrom)||void 0===l||l.length),"Verify OTP")})})]})}),ay=e=>{var a;return p.jsxs("div",{className:"service-success-dialog ".concat((null==e?void 0:e.className)?null==e?void 0:e.className:""),children:[p.jsxs("div",{className:"data-div",children:[p.jsx("span",{children:p.jsx("img",{fetchPriority:"low",src:"/assets/success_icon.gif",alt:"tick mark",className:"success-tick-gif"})}),p.jsx("label",{className:"lbl-card-title-2",children:e.successData})]}),e.refId?p.jsx("div",{className:"ref-no",children:p.jsxs("label",{className:"lbl-menu-item",children:["Reference ID:",e.refId]})}):null,p.jsxs("div",{className:"footer-holder",children:[void 0!==e.secondButtonName&&p.jsx("button",{id:"add-new-nominee-cancel",className:"btn-outline-primary",type:"button",onClick:e.goCancel,children:e.secondButtonName}),p.jsx("button",{id:"succes-redirect",className:"btn-primary",type:"button",onClick:e.goNext,children:null!==(a=e.buttonName)&&void 0!==a?a:"Done"})]})]})},aS=async(e,a,l)=>{let t=ey.AGGREGATOR_URL+eS.SERVICE.UPDATE_EMAIL;"mobile"===a&&(t=ey.AGGREGATOR_URL+eS.SERVICE.UPDATE_MOBILE);let i=await u.getBearerToken(),n=await ef(t,{"Content-Type":"application/json",Authorization:"Bearer "+i},JSON.stringify(e));(null==n?void 0:n.status)==="Success"?l.success(n):l.default(n)},aA=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.VERIFY_OTP_MOBILE,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},aj=e=>{let a=a=>{e.onChangeValueCB&&e.onChangeValueCB(a)};return p.jsx("div",{className:"service-folio-dropdown-content service-zk-folio-dropdown-content",children:e.optionList&&e.optionList.length?p.jsx(r.Fragment,{children:e.optionList.map(l=>{var t,i,n;return p.jsxs("div",{className:"option "+((null===(t=e.selectedOption)||void 0===t?void 0:t.folioNumber)===l.folioNumber?"selected":""),onClick:()=>a(l),children:[p.jsxs("div",{className:"name-row",children:[p.jsx("div",{className:"name",children:l.folioNumber+"/"+l.folioName}),p.jsx("div",{className:"folio-number",children:l.folioName?l.folioName:l.folioNumber}),(null===(i=e.selectedOption)||void 0===i?void 0:i.folioNumber)===l.folioNumber?p.jsx("div",{className:"mark-icon",children:p.jsx("img",{fetchPriority:"low",src:"/assets/mark.svg",alt:"mark-icon"})}):null]}),p.jsxs("div",{className:"bank-row",children:[p.jsxs("div",{className:"bank-name",children:[l.bankName," - ",l.bankAccountNumber]}),p.jsxs("div",{className:"scheme-holder",children:[p.jsx("span",{children:"Scheme: "}),p.jsx("span",{className:"scheme",children:null===(n=l.schemeCount)||void 0===n?void 0:n.toString().padStart(2,"0")})]})]})]})})}):p.jsx("div",{className:"service-nodata-msg",children:"No data available"})})},aT=e=>
1{let{copyTitle:a,copyContent:l}=e,t=(null==a?void 0:a.trim())&&(null==l?void 0:l.trim());return p.jsxs("div",{className:"thankyou-success-popup-sc",children:[p.jsxs("div",{className:"success-popup-window",children:[p.jsx("div",{className:"icon-container",children:p.jsx("img",{fetchPriority:"low",className:"success-icon",src:d.pathChanger("success_icon.gif"),alt:"success"})}),p.jsx("div",{className:"title",children:e.title}),p.jsx("div",{className:"subtitle-text",children:null==e?void 0:e.subTitle}),p.jsx("div",{className:"reference-id",children:p.jsx("span",{className:"id",children:e.description})})]}),t&&p.jsxs("div",{className:"ticket-container",children:[p.jsx("span",{className:"ticket-label",children:e.copyTitle}),p.jsxs("div",{className:"ticket-details",children:[e.copyContent,p.jsx("button",{className:"copy-button",onClick:()=>{if(l){var e;null===(e=navigator)||void 0===e||e.clipboard.writeText(l).then(()=>{}).catch(e=>{console.error("Failed to copy: ",e)})}},children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger("copyicon.svg"),alt:"Copy"})})]})]}),t&&p.jsx("button",{className:"secondary-button-text",onClick:e.onClickSecondaryButton,style:{width:"100%"},children:e.secondaryButtonText}),(null==e?void 0:e.shouldShowButtons)&&p.jsxs("div",{className:"button-container",children:[e.primaryButtonText?p.jsx("button",{className:"primary-button-text",onClick:e.onClickPrimaryButton,children:e.primaryButtonText}):"",e.secondaryButtonText?p.jsx("button",{className:"secondary-button-text",onClick:e.onClickSecondaryButton,children:e.secondaryButtonText}):""]})]})},aD=(e,a,l,t)=>{var i,n,o;let s=e.isUserLoggedIn()||e.isUserSoftLoggedIn()?"post login journey":"pre login journey",r=null!==(n=null===(i=e.loggedInUserDetails)||void 0===i?void 0:i.user_type)&&void 0!==n?n:"na",c={page_section:null!==(o=eV())&&void 0!==o?o:"NA",page_sub_section:null!=a?a:"NA",cta_name:null!=l?l:"NA",category:null!=t?t:"NA",flow_name:s,user_type:r};d.GoogleAnalytics.recordEvent(d.GoogleAnalyticEvents.ServiceCentre.ButtonClick(c))},aw=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.GET_FOLIO_DETAILS,t=await u.getBearerToken(),i=await ef(l,{Authorization:"Bearer "+t,"Content-Type":"application/json"},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)};var aI=!1;let a_=e=>ao("Nominee Name",e.trim(),3),aO=e=>{var a,l;let t;return e?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=60)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.threeSixtyCharacterCount):t="Country is mandatory",t},ak=e=>{let a;if(!e)return;let l=aa(e);return e?e.length<4&&(a=eq.ADD_NEW_FORM_VALIDATION.invalidNomineeMobileNum):a=eq.ADD_NEW_FORM_VALIDATION.mobileRequired,l&&(a=eq.ADD_NEW_FORM_VALIDATION.invalidNomineeMobileNum),a},aR=e=>{let a;if(e)return e?(null==e?void 0:e.length)>=120?a="Email should have maximum 120 characters":/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(e)||(a="Enter a valid email address"):a="Email is mandatory",a},aM=(e,a)=>{var l,t,i;return(null==e?void 0:null===(t=e.primaryApplicantDetails)||void 0===t?void 0:null===(l=t.pan)||void 0===l?void 0:l.trim())==(null==a?void 0:a.trim())||(null==e?void 0:null===(i=e.jointHolders)||void 0===i?void 0:i.some(e=>{var l;return(null==e?void 0:null===(l=e.pan)||void 0===l?void 0:l.trim())==(null==a?void 0:a.trim())}))},aL=(e,a,l)=>void 0!=e&&(null==e?void 0:e.trim())!=""&&void 0!=a&&(null==a?void 0:a.trim())!=""&&(null==e?void 0:e.trim())==(null==a?void 0:a.trim())&&l,aP=e=>{if(e){var[a,l,t]=e.replace(/\//g,"-").split("-").map(Number);if(4===String(a).length){let e=t;t=a,a=e}if(a&&l&&t)return new Date(t,l-1,a)}},aF=function(e){let a,l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){let t=new Date(e),i=new Date,n=aP(e),o=new Date;o.setFullYear(o.getFullYear()-18);let s=!!n&&n>o&&n<=new Date;if(l&&!s)return"Enter valid minor Nominee Date of Birth";t>i&&!aI&&(a="Enter a valid date of birth (DOB).")}else a=l?eq.SERVICES.DOB_REQUIRED:void 0;return a},aB=e=>ao("Appointee Name",e,3),aV=e=>{let a;return void 0!=e6(e,aI)&&(a="Please enter a valid PAN Number"),a},aU=e=>{let a;if(e){{let l=new Date(aY(e)),t=new Date;t.setFullYear(t.getFullYear()-18),new Date(l)>t&&(a=eq.SERVICES.APPOINTEE_EIGHTEEN)}return a}},aY=e=>{if(e){let a=e.split("-");return"".concat(a[2],"-").concat(a[1],"-").concat(a[0])}return""},aG=e=>{let a;return e||(a=eq.SERVICES.APPOINTEE_RELATION),a},az=e=>{if(e&&(!/^\+?[1-9]\d{1,14}$/.test(e)||/^(\d)\1+$/.test(e)))return eq.SERVICES.APPOINTEE_MOBILE_NUMBER},aH=e=>{var a,l;let t;let i=null!==(a=null==e?void 0:e.documentType)&&void 0!==a?a:"",n=null!==(l=null==e?void 0:e.documentNumber)&&void 0!==l?l:"";if(i)return n?(i&&n&&""!==n?("AADHAR"===i.toUpperCase()||"AADHAAR"===i.toUpperCase())&&at(n)?t=eq.ADD_NEW_FORM_VALIDATION.isValidAadhar:"Passport"===i&&ai(n)?t=eq.ADD_NEW_FORM_VALIDATION.isValidPassport:"PAN"===i&&e6(n,aI)?t=eq.COMMON_VALIDATION.val
1idPan:"Driving License"===i&&an(n)&&(t=eq.ADD_NEW_FORM_VALIDATION.isValidDrivingLicense):t=eq.ADD_NEW_FORM_VALIDATION.isValidDocumentNumber,t):"Document Number is mandatory"},aK=e=>{var a,l;let t;return e?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<6||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=80)&&(t=eq.ADD_NEW_FORM_VALIDATION.addressSixCharacter):t="Address 1 is mandatory",t},aq=e=>{var a,l;let t;return e?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=60)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.nriCityCharCount):t="City is mandatory",t},aW=e=>{var a,l;let t;return e?(!(null==e?void 0:e.trim())||(null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>=60)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.threeSixtyCharacterCount):t="State is mandatory",t},aZ=e=>{var a,l;let t;return((null==e?void 0:null===(a=e.trim())||void 0===a?void 0:a.length)<3||(null==e?void 0:null===(l=e.trim())||void 0===l?void 0:l.length)>10)&&(t=eq.APPLICANTDETAILSFORMVALIDATION.threeTenCharacterCount),t},aX={name:a_,pan:e6,dob:e=>aF(e,aI),relationship:e=>{let a;return e||(a=eq.SERVICES.RELATION_REQUIRED),a},mobile:ak,ratio:e=>{let a;return e||(a=eq.SERVICES.ALLOCATION_REQUIRED),a},email:aR,address1:e=>(null==e?void 0:e.trim())?aK(e):void 0,address2:e=>(null==e?void 0:e.trim())?aK(e):void 0,city:e=>(null==e?void 0:e.trim())?aq(e):void 0,state:e=>(null==e?void 0:e.trim())?aW(e):void 0,country:e=>(null==e?void 0:e.trim())?aO(e):void 0,pin:e=>(null==e?void 0:e.trim())?aZ(e):void 0,documentType:e=>{},documentNumber:()=>aH(null!=t?t:{})},aQ={name:e=>(null==e?void 0:e.trim())?aB(e):void 0,pan:e=>(null==e?void 0:e.trim())?aV(e):void 0,dob:aU,relationship:e=>(null==e?void 0:e.trim())?aG(e):void 0,mobile:az},aJ=(e,a)=>{var l,i,n,o,s,r,d,c,u;let m=!1,v=!1,p=!1;aI=a,t=e,Object.entries(aX).map(a=>{let[l,t]=a;e.errorMessage[l]=t(e[l])}),Object.entries(aQ).map(a=>{let[l,t]=a;e.guardian.errorMessage[l]=t(e.guardian[l])}),a&&(null==e?void 0:null===(i=e.name)||void 0===i?void 0:null===(l=i.trim())||void 0===l?void 0:l.toLowerCase())===(null==e?void 0:null===(s=e.guardian)||void 0===s?void 0:null===(o=s.name)||void 0===o?void 0:null===(n=o.trim())||void 0===n?void 0:n.toLowerCase())&&(null==e?void 0:null===(d=e.guardian)||void 0===d?void 0:null===(r=d.name)||void 0===r?void 0:r.trim())&&(e.guardian.errorMessage.name="Nominee and Appointee Name should not be same"),e.guardian.errorMessage.pan=(null===(c=e.guardian)||void 0===c?void 0:c.pan)?e.guardian.errorMessage.pan:void 0,a||(e.guardian.errorMessage.name=void 0,e.guardian.errorMessage.pan=void 0,e.guardian.errorMessage.dob=void 0,e.guardian.errorMessage.relationship=void 0,e.guardian.errorMessage.mobile=void 0);let h=Object.entries(e.errorMessage);for(let a=0;a<h.length;a++){let[l,t]=h[a];void 0!==t&&(v||e_("".concat(l,"-").concat(null==e?void 0:e.name)),v=!0)}let g=Object.entries(e.guardian.errorMessage);for(let a=0;a<g.length;a++){let[l,t]=g[a];void 0!==t&&(p||v||e_("".concat(l,"-").concat(null==e?void 0:e.name,"-").concat(null===(u=e.guardian)||void 0===u?void 0:u.name)),p=!0)}if(!m){let l=!!Object.entries(e.errorMessage).some(e=>{let[a,l]=e;return void 0!==l}),t=!!Object.entries(e.guardian.errorMessage).some(e=>{let[a,l]=e;return void 0!==l});m=a?!l&&!t:!l}return m},a$=()=>({name:"",pan:"",email:"",documentType:"",documentNumber:"",dob:"",mobile:"",relationship:"",ratio:"",incapacitationFlag:"",incapacitationThreshold_Aum:"",incapacitationThreshold_Percent:"",type:"",address:"",address1:"",address2:"",city:"",state:"",country:"",pin:"",sameAp
1plicantAddress:"",errorMessage:{name:void 0,pan:void 0,dob:void 0,mobile:void 0,relationship:void 0,address:void 0,email:void 0},guardian:{name:"",pan:"",dob:"",mobile:"",relationship:"",ratio:"",address:"",sameApplicantAddress:"",errorMessage:{name:void 0,pan:void 0,dob:void 0,mobile:void 0,relationship:void 0,address:void 0}},isSelected:!1}),a0=e=>{var a,l,t,i,n,o,s,d,c,m,v,h,b,N,f,x,C,E,y,A,T,D,w,I,_,O,k,R,M,L,P,F,B,V,U,Y,G,z,H,K,q,W,Z,X,Q,J,$,ee,ea,el,et,ei,en,eo,es,er,ed,ec,eu,em,ev,ep,eh,eg,eb,eN,ef,ex,eC,eE,ey,eS,eA,ej,eT,eO,ek,eR,eM,eF,eB,eV,eU,eY,eG,ez,eH,eK,eW,eZ,eX,eQ,eJ;let[e$,e0]=r.useState(a$()),[e1,e2]=r.useState(!1),[e3,aa]=r.useState(!0),[al,ao]=r.useState(!0),[as,ar]=r.useState(!1),[ad,ac]=r.useState(!1),au=/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/,[am,av]=r.useState(!1),[ap,ah]=r.useState(!1),ag=!ap&&e3,[ab,aN]=r.useState("Enter Document Number"),af=u.useLoginContextData(),ax=(null===(a=e.configdata)||void 0===a?void 0:a.documentTypes)||["AADHAR","PAN","Passport","Driving License"],[aC,aE]=r.useState({}),ay=async()=>{try{var e,a,l,t,i,n,o,s,r,d,c,m,v,p,h,g,b,N,f,x,C,E,y;let S=await (null==af?void 0:null===(e=af.getLoggedinUserDetails)||void 0===e?void 0:e.call(af)),A=await u.placeGetPageSpecificInfo({pan:null!==(t=null==S?void 0:S.pan)&&void 0!==t?t:"",pageName:"ServicesAddNominee",pageUrl:window.location.href,journeyId:"",journeyName:"",source:""});if((null==A?void 0:null===(a=A.success)||void 0===a?void 0:a.status)==="success"||(null==A?void 0:null===(l=A.success)||void 0===l?void 0:l.statusCode)===0){let e={addressLine1:null!==(N=null==A?void 0:null===(n=A.success)||void 0===n?void 0:null===(i=n.data)||void 0===i?void 0:i.addressLine1)&&void 0!==N?N:"",addressLine2:null!==(f=null==A?void 0:null===(s=A.success)||void 0===s?void 0:null===(o=s.data)||void 0===o?void 0:o.addressLine2)&&void 0!==f?f:"",city:null!==(x=null==A?void 0:null===(d=A.success)||void 0===d?void 0:null===(r=d.data)||void 0===r?void 0:r.city)&&void 0!==x?x:"",stateName:null!==(C=null==A?void 0:null===(m=A.success)||void 0===m?void 0:null===(c=m.data)||void 0===c?void 0:c.stateName)&&void 0!==C?C:"",pinCode:null!==(E=null==A?void 0:null===(p=A.success)||void 0===p?void 0:null===(v=p.data)||void 0===v?void 0:v.pinCode)&&void 0!==E?E:"",countryName:null!==(y=null==A?void 0:null===(g=A.success)||void 0===g?void 0:null===(h=g.data)||void 0===h?void 0:h.countryName)&&void 0!==y?y:""};aE(e),null===(b=af.getKycDetails)||void 0===b||b.call(af,null!=e?e:{})}else null==A||A.default}catch(e){console.error("API Error:",e)}},aS=(null==e?void 0:null===(i=e.foliodetails)||void 0===i?void 0:null===(t=i.primaryApplicantDetails)||void 0===t?void 0:null===(l=t.name)||void 0===l?void 0:l.toLowerCase())==(null==e$?void 0:null===(o=e$.name)||void 0===o?void 0:null===(n=o.trim())||void 0===n?void 0:n.toLowerCase())||(null===(d=e.foliodetails)||void 0===d?void 0:null===(s=d.jointHolders)||void 0===s?void 0:s.some(e=>{var a,l,t;return(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase())==(null==e$?void 0:null===(t=e$.name)||void 0===t?void 0:null===(l=t.trim())||void 0===l?void 0:l.toLowerCase())})),aA=(null==e$?void 0:null===(m=e$.name)||void 0===m?void 0:null===(c=m.trim())||void 0===c?void 0:c.toLowerCase())==(null==e$?void 0:null===(b=e$.guardian)||void 0===b?void 0:null===(h=b.name)||void 0===h?void 0:null===(v=h.trim())||void 0===v?void 0:v.toLowerCase())&&e1,aj=(null==e?void 0:null===(x=e.foliodetails)||void 0===x?void 0:null===(f=x.primaryApplicantDetails)||void 0===f?void 0:null===(N=f.pan)||void 0===N?void 0:N.trim())==(null==e$?void 0:null===(C=e$.documentNumber)||void 0===C?void 0:C.trim())||(null===(y=e.foliodetails)||void 0===y?void 0:null===(E=y.jointHolders)||void 0===E?void 0:E.some(e=>{var a,l;return(null==e?void 0:null===(a=e.pan)||void 0===a?void 0:a.trim())==(null===(l=e$.documentNumber)||void 0===l?void 0:l.trim())}));(null==e?void 0:null===(D=e.foliodetails)||void 0===D?void 0:null===(T=D.primaryApplicantDetails)||void 0===T?void 0:null===(A=T.pan)||void 0===A?void 0:A.trim())==(null==e$?void 0:null===(w=e$.pan)||void 0===w?void 0:w.trim())||null===(_=e.foliodetails)||void 0===_||null===(I=_.jointHolders)||void 0===I||I.some(e=>{var a,l;return(null==e?void 0:null===(a=e.pan)||void 0===a?void 0:a.trim())==(null==e$?void 0:null===(l=e$.pan)||void 0===l?void 0:l.trim())});let aT=(null==e$?void 0:e$.documentType)==="PAN"?null==e$?void 0:e$.documentNumber:null==e$?void 0:e$.pan,aD=(null==aT?void 0:aT.trim())!==""&&(null==e$?void 0:null===(k=e$.guardian)||void 0===k?void 0:null===(O=k.pan)||void 0===O?void 0:O.trim())!==""&&(null==aT?void 0:aT.trim())===(null==e$?void 0:null===(M=e$.guardian)||void 0===M?void 0:null===(R=M.pan)||void 0===R?void 0:R.trim())&&e1;e.nomineeData.reduce((e,a)=>e+(parseInt(a.ratio,10)||0),0),e1&&(null==e$||null===(P=e$.guardian)||void 0===P||null===(L=P.pan)||void 0===L||L.trim()),(null==e?void 0:null===(F=e.nomineeData)||void 0===F?void 0:F.some(e=>{var a,l;return(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase())===(null==e$?void 0:null===(l=e$.name)||void 0===l?void 0:l.toLowerCase())}))||null==e||null===(V=e.foliodetails)||void 0===V||null===(B=V.jointHolders)||void 0===B||B.some(e=>{var a,l;return(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase())===(null==e$?void 0:null===(l=e$.name)||void 0===l?void 0:l.toLowerCase())}),r.useEffect(()=>{ay()},[]),r.useEffect(()=>{if(!e.isFromEdit&&!e3){var a,l,t,i,n,o,s,r,d,c,u,m,v,p;e0({...e$,address1:null!==(r=eI(null==e?void 0:null===(a=e.selectedNominee)||void 0===a?void 0:a.address1))&&void 0!==r?r:"",address2:null!==(d=eI(null==e?void 0:null===(l=e.selectedNominee)||void 0===l?void 0:l.address2))&&void 0!==d?d:"",city:null!==(c=null==e?void 0:null===(t=e.selectedNominee)||void 0===t?void 0:t.city)&&void 0!==c?c:"",state:null!==(u=null==e?void 0:null===(i=e.selectedNominee)||void 0===i?void 0:i.state)&&void 0!==u?u:"",pin:null!==(v=null!==(m=null==e?void 0:null===(n=e.selectedNominee)||void 0===n?void 0:n.pin)&&void 0!==m?m:null==e?void 0:null===(o=e.selectedNominee)||void 0===o?void 0:o.pinCode)&&void 0!==v?v:"",country:null!==(p=null==e?void 0:null===(s=e.selectedNominee)||void 0===s?void 0:s.country)&&void 0!==p?p:"",errorMessage:{...e$.errorMessage,address1:void 0,address2:void 0,city:void 0,state:void 0,country:void 0,pin:void 0}}),aa(!1)}},[e3]),r.useEffect(()=>{aY()},[aC]);let aw=function(a,l,t){var i,n,o,s,r,d,c,u,m,v,p,h,g,b,N,f,x,C;let E,y;arguments.length>3&&void 0!==arguments[3]&&arguments[3];let S={...e$};switch(a){case"name":l&&0!==l.length?l.trim().length<3?E=t?eq.SERVICES.APPOINTEE_MAX_NAME:eq.SERVICES.NOMINEE_MAX_NAME:(null==e?void 0:null===(o=e.foliodetails)||void 0===o?void 0:null===(n=o.primaryApplicantDetails)||void 0===n?void 0:null===(i=n.name)||void 0===i?void 0:i.toLowerCase())==(null==l?void 0:null===(s=l.trim())||void 0===s?void 0:s.toLowerCase())||(null===(d=e.foliodetails)||void 0===d?void 0:null===(r=d.jointHolders)||void 0===r?void 0:r.some(e=>{var a,t;return(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase())==(null==l?void 0:null===(t=l.trim())||void 0===t?void 0:t.toLowerCase())}))?E=eq.SERVICES.APPLICANT_NOMINEE:t?(null==e$?void 0:null===(p=e$.name)||void 0===p?void 0:null===(v=p.trim())||void 0===v?void 0:v.toLowerCase())==(null==l?void 0:null===(h=l.trim())||void 0===h?void 0:h.toLowerCase())&&e1&&(E="Nominee and Appointee Name should not be same"):(null==e?void 0:null===(c=e.nomineeData)||void 0===c?void 0:c.some(e=>{var a;return(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase())===(null==l?void 0:l.toLowerCase())}))||(null==e?void 0:null===(m=e.foliodetails)||void 0===m?void 0:null===(u=m.jointHolders)||void 0===u?void 0:u.some(e=>{var a;return(null==e?void 0:null===(a=e.name)||void 0===a?void 0:a.toLowerCase())===(null==l?void 0:l.toLowerCase())}))?e.isFromEdit?e.nomineeData.forEach((a,t)=>{var i;(null==a?void 0:null===(i=a.name)||void 0===i?void 0:i.toLowerCase())===l.toLowerCase()&&(E="Nominee ".concat(t+1," and Nominee ").concat(e.nomineeData.length+1," cannot be the same"))}):e.nomineeData.forEach((a,t)=>{var i,n,o;if((null==a?void 0:null===(i=a.name)||void 0===i?void 0:i.toLowerCase())===l.toLowerCase()&&l.toLowerCase()===(null==e?void 0:e.selectedNominee.name.toLowerCase()))E=void 0;else if((null==a?void 0:null===(n=a.name)||void 0===n?void 0:n.toLowerCase())===l.toLowerCase()){let a=null!==(o=null==e?void 0:e.selectedNomineeIndex)&&void 0!==o?o:0;E="Nominee ".concat(t+1," and Nominee ").concat(a+1," cannot be the same")}}):E=void 0:E=t?eq.SERVICES.APPOINTEE_MAX_NAME:eq.SERVICES.NOMINEE_MAX_NAME;break;case"email":{let e=(null!=l?l:"").trim();E=e&&"Enter a valid email address"===aR(e)?"Enter a valid email address":void 0}break;case"pan":void 0==l?E=t?"Appointee PAN Number is mandatory":"PAN is mandatory":((null==e?void 0:null===(N=e.foliodetails)||void 0===N?void 0:null===(b=N.primaryApplicantDetails)||void 0===b?void 0:null===(g=b.pan)||void 0===g?void 0:g.trim())==(null==l?void 0:l.trim())||(null===(x=e.foliodetails)||void 0===x?void 0:null===(f=x.jointHolders)||void 0===f?void 0:f.some(e=>{var a;return(null==e?void 0:null===(a=e.pan)||void 0===a?void 0:a.trim())==(null==l?void 0:l.trim())})))&&!t?E=eq.SERVICES.PAN_APPOINTEE_NOMINEE_SAME:l.length>0?au.test(l.trim().toUpperCase())?(E=e6(l,!0),e.isFromEdit?e.nomineeData.forEach((e,a)=>{var t;""!==e.pan&&(null==e?void 0:null===(t=e.pan)||void 0===t?void 0:t.toLowerCase())===l.toLowerCase()&&(E="Same PAN already existing in the registered nominees")}):e.nomineeData.forEach((a,t)=>{var i,n,o,s;(null==a?void 0:null===(i=a.pan)||void 0===i?void 0:i.toLowerCase())===l.toLowerCase()&&l.toLowerCase()===(null==e?void 0:null===(o=e.selectedNominee)||void 0===o?void 0:null===(n=o.pan)||void 0===n?void 0:n.toLowerCase())?E=void 0:""!==a.pan&&(null==a?void 0:null===(s=a.pan)||void 0===s?void 0:s.toLowerCase())===l.toLowerCase()&&(E="Same PAN already existing in the registered nominees")})):E=eq.SERVICES.VALID_PAN_NUMBER:E=0===l.length?t?"Appointee PAN Number is mandatory":"PAN is mandatory":void 0;break;case"dob":E=0===l.length?e1?"Date of Birth is mandatory":void 0:"";break;case"relationship":E=0===l.length?eq.SERVICES.MANDATORY_ERROR:"";break;case"mobile":E=l?/^\+?[1-9]\d{1,14}$/.test(l)?void 0:"Please Enter a valid Mobile number":l&&l.length<4&&l.length>0?"Please Enter a valid Mobile number":void 0;break;case"address":if((null==l?void 0:l.length)>200)return;(null==l?void 0:l.trim().length)==0&&(E="Field is mandatory");break;case"ratio":if(void 0==l){E=eq.SERVICES.MANDATORY_ERROR;break}E=(null===(C=(y=(y=l.trim().replace(/\D/g,"")).replace(/^0+/,"")).trim())||void 0===C?void 0:C.length)>3||parseInt(y.trim())>100?"Allocation percentage is mandatory":0==y.length?"Allocation percentage is mandatory":void 0;break;default:return}t?S.guardian.errorMessage[a]=null!=E?E:void 0:S.errorMessage[a]=null!=E?E:void 0,e0(S)},aI=function(a,l,t){var i,n,o,s;let r;let d=arguments.length>3&&void 0!==arguments[3]&&arguments[3];as||(ar(!0),e.setHasNomineeFormChanged(!0)),"update"===e.source&&ao(!0);let c={...e$};switch(a){case"name":if((null==l?void 0:l.length)>120){c.errorMessage.name="Nominee Name should have maximum 120 characters",e0(c);return}if((null==l?void 0:l.length)>100&&t){c.guardian.errorMessage.name="Appointee Name should have maximum 100 characters",e0(c);return}r=ew(l),aw(a,l,t,d);break;case"email":if((null==l?void 0:l.length)>120){c.errorMessage.email="Email should have maximum 120 characters",e0(c);return}r=l,aw(a,l,t,d);break;case"documentType":"AADHAAR"===l.toUpperCase()||"AADHAR"===l.toUpperCase()?aN("Enter last 4 digits of your Aadhar"):"Passport"===l?aN("Enter Passport Number"):"PAN"===l?aN("Enter PAN Number"):"Driving License"===l?aN("Enter Driving License Number"):aN("Enter Document Number"),r=l,c.documentNumber="",c.errorMessage.documentNumber=void 0;break;case"documentNumber":c.errorMessage=c.errorMessage||{};let u=c.documentType||e$.documentType;if(!u){c.errorMessage.documentNumber=eq.ADD_NEW_FORM_VALIDATION.isDocumentTypeSelected;return}if("AADHAR"===u.toUpperCase()||"AADHAAR"===u.toUpperCase()){if((null==l?void 0:l.length)>4)return;r=null==l?void 0:l.replace(/\D/g,"")}else if("Passport"===u){if((null==l?void 0:l.length)>10)return;r=eD(null==l?void 0:l.toUpperCase())}else if("PAN"===u)r=function(e){let a=null==e?void 0:e.toUpperCase().replace(/[^A-Z0-9]/g,""),l="",t=0;for(;l.length<5&&t<(null==a?void 0:a.length);){let e=a[t];/[A-Z]/.test(e)&&(l+=e),t++}let i=0;for(;i<4&&t<(null==a?void 0:a.length);){let e=a[t];/[0-9]/.test(e)&&(l+=e,i++),t++}for(;l.length<10&&t<(null==a?void 0:a.length);){let e=a[t];
1if(/[A-Z]/.test(e)){l+=e;break}t++}return l}(l);else if("Driving License"===u){if((null==l?void 0:l.length)>20)return;r=eD(null==l?void 0:l.toUpperCase())}break;case"pan":if("string"!=typeof l||(null==l?void 0:l.length)>10)return;aw(a,null!=(r=eD(l.toUpperCase()))?r:"",t,d);break;case"dob":if("dob"===a&&!t){let e=aH(l),i=new Date;i.setFullYear((null==i?void 0:i.getFullYear())-18),void 0!==e&&e>i&&e<=new Date?(e2(!0),e0(c)):(e2(!1),e0(c={...c,guardian:{name:"",pan:"",dob:"",mobile:"",relationship:"",ratio:"",address:"",sameApplicantAddress:"Yes",errorMessage:{name:void 0,pan:void 0,dob:void 0,mobile:void 0,relationship:void 0,address:void 0}}})),aw(a,l,t,d)}r=l;break;case"relationship":r=l,aw(a,l,t,d);break;case"mobile":if((r=l.replace(/[^\d+]/g,"")).length>15)return;aw(a,r,t,d);break;case"address":if((null==l?void 0:l.length)>200)return;r=l,e3&&(r=aG()),aw(a,l,t,d);break;case"address1":let m=null==l?void 0:l.replace(/\s+/g," ");if((null==m?void 0:m.length)>80){c.errorMessage.address1=eq.ADD_NEW_FORM_VALIDATION.addressEightyCharacter,e0(c);return}r=null==m?void 0:m.replace(/[^a-zA-Z0-9 (),./-]/gi,""),(null==m?void 0:m.length)<3?c.errorMessage.address1=eq.ADD_NEW_FORM_VALIDATION.addressThreeCharacter:c.errorMessage.address1=void 0;break;case"address2":let v=null==l?void 0:l.replace(/\s+/g," ");if((null==v?void 0:v.length)>80){c.errorMessage.address2=eq.ADD_NEW_FORM_VALIDATION.addressEightyCharacter,e0(c);return}r=null==v?void 0:v.replace(/[^a-zA-Z0-9 (),./-]/gi,""),(null==v?void 0:v.length)<3?c.errorMessage.address2=eq.ADD_NEW_FORM_VALIDATION.addressThreeCharacter:c.errorMessage.address2=void 0;break;case"city":if((null==l?void 0:l.length)>60){c.errorMessage=c.errorMessage||{},c.errorMessage.city=e9("city",l,3,60),e0(c);return}r=null==l?void 0:l.replace(/[^a-zA-Z ]/g,""),c.errorMessage.city=void 0;break;case"state":if((null==l?void 0:l.length)>60){c.errorMessage=c.errorMessage||{},c.errorMessage.state=e9("state",l,3,60),e0(c);return}r=null==l?void 0:l.replace(/[^a-zA-Z ]/g,""),c.errorMessage.state=void 0;break;case"country":if((null==l?void 0:l.length)>60){c.errorMessage=c.errorMessage||{},c.errorMessage.country=e9("state",l,3,60),e0(c);return}r=null==l?void 0:l.replace(/[^a-zA-Z ]/g,""),c.errorMessage.country=void 0;break;case"pin":if((null==l?void 0:l.length)>10){c.errorMessage.pin="Pin Code should have maximum 10 numbers",e0(c);return}r=null==l?void 0:l.replace(/[^0-9]/g,"").toUpperCase(),c.errorMessage.pin=void 0;break;case"sameApplicantAddress":r="true"===l?"Yes":"No",aa("true"===l);let p=null!==(i=af.userKycDetails)&&void 0!==i?i:{city:""};"true"===l&&p?(c.address1=null!==(n=eI(p.addressLine1))&&void 0!==n?n:"",c.address2=null!==(o=eI(p.addressLine2))&&void 0!==o?o:"",c.city=p.city,c.state=p.stateName,c.pin=p.pinCode,c.country=p.countryName):(c.address1="",c.address2="",c.city="",c.state="",c.pin="",c.country=""),c.errorMessage.address1=void 0,c.errorMessage.address2=void 0,c.errorMessage.city=void 0,c.errorMessage.state=void 0,c.errorMessage.country=void 0,c.errorMessage.pin=void 0;break;case"ratio":if(aw(a,l,t,d),(null===(s=(r=(r=l.trim().replace(/\D/g,"")).replace(/^0+/,"")).trim())||void 0===s?void 0:s.length)>3||parseInt(r.trim())>100)return;break;default:return}t?c.guardian[a]=null!=r?r:"":(c[a]=null!=r?r:"","mobile"!==a&&(c.errorMessage[a]=void 0)),e0(c)},aO=a=>{var l,t,i,n,o,s,r,d,c,u,m;let v={...e$},p=e$.documentType;switch(a){case"nomineeName":v.errorMessage.name=a_(null==e$?void 0:e$.name),aS?v.errorMessage.name=eq.SERVICES.APPLICANT_NOMINEE:e.isFromEdit?(null==e$?void 0:null===(t=e$.name)||void 0===t?void 0:t.toLowerCase())!==""&&e.nomineeData.forEach((a,l)=>{var t,i;(null===(t=a.name)||void 0===t?void 0:t.toLowerCase())===(null==v?void 0:null===(i=v.name)||void 0===i?void 0:i.toLowerCase())&&(v.errorMessage.name="Nominee ".concat(l+1," and Nominee ").concat(e.nomineeData.length+1," cannot be the same"))}):(null==e$?void 0:null===(l=e$.name)||void 0===l?void 0:l.toLowerCase())!==""&&e.nomineeData.forEach((a,l)=>{var t,i,n,o,s,r;if((null==a?void 0:null===(t=a.name)||void 0===t?void 0:t.toLowerCase())===(null==v?void 0:null===(i=v.name)||void 0===i?void 0:i.toLowerCase())&&(null==e$?void 0:null===(n=e$.name)||void 0===n?void 0:n.toLowerCase())===(null==e?void 0:null===(o=e.selectedNominee)||void 0===o?void 0:o.name.toLowerCase()))v.errorMessage.name="";else if((null==a?void 0:null===(s=a.name)||void 0===s?void 0:s.toLowerCase())===(null==v?void 0:v.name.toLowerCase())){let a=null!==(r=null==e?void 0:e.selectedNomineeIndex)&&void 0!==r?r:0;v.errorMessage.name="Nominee ".concat(l+1," and Nominee ").concat(a+1," cannot be the same")}});break;case"nomineePan":aj?v.errorMessage.pan=eq.SERVICES.PAN_APPOINTEE_NOMINEE_SAME:(null==e$?void 0:null===(i=e$.pan)||void 0===i?void 0:i.length)>0&&(v.errorMessage.pan=e6(null==e$?void 0:e$.pan,e1),e.isFromEdit?e.nomineeData.forEach((e,a)=>{var l,t;(null==e?void 0:null===(l=e.pan)||void 0===l?void 0:l.toLowerCase())===(null==e$?void 0:null===(t=e$.pan)||void 0===t?void 0:t.toLowerCase())&&(v.errorMessage.pan="Same PAN already existing in the registered nominees")}):e.nomineeData.forEach((a,l)=>{var t,i,n,o,s,r,d;(null==a?void 0:null===(t=a.pan)||void 0===t?void 0:t.toLowerCase())===(null==e$?void 0:null===(i=e$.pan)||void 0===i?void 0:i.toLowerCase())&&(null==e$?void 0:null===(n=e$.pan)||void 0===n?void 0:n.toLowerCase())===(null==e?void 0:null===(s=e.selectedNominee)||void 0===s?void 0:null===(o=s.pan)||void 0===o?void 0:o.toLowerCase())?v.errorMessage.pan=void 0:(null==a?void 0:null===(r=a.pan)||void 0===r?void 0:r.toLowerCase())===(null==e$?void 0:null===(d=e$.pan)||void 0===d?void 0:d.toLowerCase())&&(v.errorMessage.pan="Same PAN already existing in the registered nominees")}));break;
1case"nomineeEmail":v.errorMessage.email=aR(null==e$?void 0:e$.email);break;case"address1":v.errorMessage.address1=(null==e$?void 0:null===(n=e$.address1)||void 0===n?void 0:n.trim())?e5(null==e$?void 0:e$.address1):void 0;break;case"address2":v.errorMessage.address2=(null==e$?void 0:null===(o=e$.address2)||void 0===o?void 0:o.length)>0?e5(null==e$?void 0:e$.address2):void 0;break;case"city":v.errorMessage.city=(null==e$?void 0:null===(s=e$.city)||void 0===s?void 0:s.trim())?e4(null==e$?void 0:e$.city):void 0;break;case"state":v.errorMessage.state=(null==e$?void 0:null===(r=e$.state)||void 0===r?void 0:r.trim())?e8(null==e$?void 0:e$.state):void 0;break;case"pin":v.errorMessage.pin=(null==e$?void 0:null===(d=e$.pin)||void 0===d?void 0:d.trim())?ae(e$.pin):void 0;break;case"country":v.errorMessage.country=(null==e$?void 0:null===(c=e$.country)||void 0===c?void 0:c.trim())?e7(null==e$?void 0:e$.country):void 0;break;case"nomineeRatio":(null==e$?void 0:e$.ratio)===""&&(v.errorMessage.ratio="Allocation percentage is mandatory");break;case"documentNumber":if((null==e$?void 0:e$.documentType)&&!(null==e$?void 0:null===(u=e$.documentNumber)||void 0===u?void 0:u.trim())){v.errorMessage.documentNumber="Document Number is mandatory";break}"PAN"===p&&(null==e$?void 0:e$.documentNumber)?(v.errorMessage.documentNumber=e6(null==e$?void 0:e$.documentNumber,e1),aM(e.foliodetails,null==e$?void 0:e$.documentNumber)?v.errorMessage.documentNumber=eq.ADD_NEW_FORM_VALIDATION.isApplicantAndNomineePanAreSame:aL(e$.documentNumber,e$.guardian.pan,e1)&&(v.guardian.errorMessage.documentNumber=eq.ADD_NEW_FORM_VALIDATION.isNomineeAppointeePan)):("AADHAR"===p.toUpperCase()||"AADHAAR"===p.toUpperCase())&&(null==e$?void 0:e$.documentNumber)?v.errorMessage.documentNumber=at(null==e$?void 0:e$.documentNumber):"Passport"===p&&(null==e$?void 0:e$.documentNumber)?v.errorMessage.documentNumber=ai(null==e$?void 0:e$.documentNumber):"Driving License"===p&&(null==e$?void 0:e$.documentNumber)&&(v.errorMessage.documentNumber=an(null==e$?void 0:e$.documentNumber));break;case"nomineeDob":v.errorMessage.dob=aF(e$.dob,e1);break;case"nomineeMobile":v.errorMessage.mobile=ak(null==e$?void 0:e$.mobile);break;case"guardianName":v.guardian.errorMessage.name=(null===(m=e$.guardian.name)||void 0===m?void 0:m.trim())?aB(e$.guardian.name):void 0,aA&&(v.guardian.errorMessage.name="Nominee and Appointee Name should not be same");break;case"guardianPan":v.guardian.errorMessage.pan=aV(e$.guardian.pan),aD&&(v.guardian.errorMessage.pan=eq.ADD_NEW_FORM_VALIDATION.isNomineeAppointeePan);break;case"guardianDob":v.guardian.errorMessage.dob=aU(e$.guardian.dob);break;case"guardianMobile":v.guardian.errorMessage.mobile=az(e$.guardian.mobile)}e0(v)},aP=(a,l)=>{var t,i,n,o,s,r,d,c,u,m,v,p,h,g,b,N,f,x,C,E,y,S,A,j,T,D;let w={...a.errorMessage,name:a_(null==a?void 0:a.name),email:aR(null==a?void 0:a.email),dob:aF(null==a?void 0:a.dob,l),mobile:ak(null==a?void 0:a.mobile),relationship:(null==a?void 0:null===(i=a.relationship)||void 0===i?void 0:null===(t=i.trim())||void 0===t?void 0:t.length)>0?void 0:eq.SERVICES.MANDATORY_ERROR,ratio:(null==a?void 0:null===(o=a.ratio)||void 0===o?void 0:null===(n=o.trim())||void 0===n?void 0:n.length)>0?void 0:"Allocation percentage is mandatory",address1:(null==a?void 0:null===(s=a.address1)||void 0===s?void 0:s.trim())?e5(null==a?void 0:a.address1):void 0,address2:(null==a?void 0:null===(r=a.address2)||void 0===r?void 0:r.trim())?e5(null==a?void 0:a.address2):void 0,city:(null==a?void 0:null===(d=a.city)||void 0===d?void 0:d.trim())?e4(null==a?void 0:a.city):void 0,state:(null==a?void 0:null===(c=a.state)||void 0===c?void 0:c.trim())?e8(null==a?void 0:a.state):void 0,country:(null==a?void 0:null===(u=a.country)||void 0===u?void 0:u.trim())?e7(null==a?void 0:a.country):void 0,pin:(null==a?void 0:null===(m=a.pin)||void 0===m?void 0:m.trim())?ae(null==a?void 0:a.pin):void 0,documentType:void 0,documentNumber:!((null==a?void 0:null===(p=a.documentType)||void 0===p?void 0:null===(v=p.trim())||void 0===v?void 0:v.length)>0)||(null==a?void 0:null===(h=a.documentNumber)||void 0===h?void 0:h.trim())?void 0:"Document Number is mandatory"},I={...a.guardian.errorMessage},_=null==a?void 0:a.documentType;return _&&(null==a?void 0:null===(g=a.documentNumber)||void 0===g?void 0:g.trim())&&("PAN"===_?(w.documentNumber=e6(null==a?void 0:a.documentNumber,l),aM(e.foliodetails,null==a?void 0:a.documentNumber)&&(w.documentNumber=eq.ADD_NEW_FORM_VALIDATION.isApplicantAndNomineePanAreSame)):"AADHAR"===_?w.documentNumber=at(null==a?void 0:a.documentNumber):"Passport"===_?w.documentNumber=ai(null==a?void 0:a.documentNumber):"Driving License"===_&&(w.documentNumber=an(null==a?void 0:a.documentNumber))),l&&(I.name=aB(null==a?void 0:null===(b=a.guardian)||void 0===b?void 0:b.name),I.name=(null==a?void 0:null===(f=a.guardian)||void 0===f?void 0:null===(N=f.name)||void 0===N?void 0:N.trim())?aB(null==a?void 0:null===(x=a.guardian)||void 0===x?void 0:x.name):void 0,I.pan=(null==a?void 0:null===(E=a.guardian)||void 0===E?void 0:null===(C=E.pan)||void 0===C?void 0:C.trim())?aV(null==a?void 0:null===(y=a.guardian)||void 0===y?void 0:y.pan):void 0,I.dob=aU(null==a?void 0:null===(S=a.guardian)||void 0===S?void 0:S.dob),I.mobile=az(null==a?void 0:null===(A=a.guardian)||void 0===A?void 0:A.mobile),I.relationship=void 0,(null==a?void 0:null===(T=a.guardian)||void 0===T?void 0:null===(j=T.pan)||void 0===j?void 0:j.trim())&&aL(null==a?void 0:a.documentNumber,null==a?void 0:null===(D=a.guardian)||void 0===D?void 0:D.pan,l)&&(I.pan=eq.ADD_NEW_FORM_VALIDATION.isNomineeAppointeePan)),{errorMessage:w,guardianErrorMessage:I}},aY=()=>{var a,l,t,i,n,o,s,r,d,c,u,m,v,p,h,g,b,N,f,x,C,E,y,S,A;
1let j=a$(),T=af.userKycDetails,D=!T||["addressLine1","city","stateName","countryName","pinCode"].some(e=>{var a;return null===T[e]||void 0===T[e]||(null===(a=T[e])||void 0===a?void 0:a.toString().trim())===""});j.name="update"===e.source?e.selectedNominee.name:"",j.email="update"===e.source&&null!==(t=e.selectedNominee.email)&&void 0!==t?t:"",j.documentType="update"===e.source&&null!==(n=null!==(i=e.selectedNominee.documentType)&&void 0!==i?i:e.selectedNominee.document_type)&&void 0!==n?n:"",j.documentNumber="update"===e.source&&null!==(s=null!==(o=e.selectedNominee.documentNumber)&&void 0!==o?o:e.selectedNominee.document_number)&&void 0!==s?s:"",j.address="update"===e.source?e.selectedNominee.address:"",j.pan="update"===e.source?e.selectedNominee.pan:"",j.dob="update"===e.source&&null!==(r=eL(null==e?void 0:e.selectedNominee.dob))&&void 0!==r?r:"",j.mobile="update"===e.source?e.selectedNominee.mobile:"",j.relationship="update"===e.source?e.selectedNominee.relationship:"",j.ratio="update"===e.source?e.selectedNominee.ratio:"",j.incapacitationFlag="update"===e.source?e.selectedNominee.incapacitationFlag:"",j.incapacitationThreshold_Aum="update"===e.source?e.selectedNominee.incapacitationThreshold_Aum:"",j.incapacitationThreshold_Percent="update"===e.source?e.selectedNominee.incapacitationThreshold_Percent:"",j.type="update"===e.source?e.selectedNominee.type:"",j.guardian.name="update"===e.source&&e.selectedNominee.guardian?e.selectedNominee.guardian.name:"",j.guardian.pan="update"===e.source&&e.selectedNominee.guardian?e.selectedNominee.guardian.pan:"",j.guardian.dob="update"===e.source&&e.selectedNominee.guardian&&null!==(d=null===(a=e.selectedNominee.guardian.dob)||void 0===a?void 0:a.replace(/\//g,"-"))&&void 0!==d?d:"",j.guardian.mobile="update"===e.source&&e.selectedNominee.guardian?e.selectedNominee.guardian.mobile:"",j.guardian.ratio="update"===e.source&&e.selectedNominee.guardian?e.selectedNominee.guardian.ratio:"",j.guardian.relationship="update"===e.source&&e.selectedNominee.guardian?e.selectedNominee.guardian.relationship:"",ah(D);let w="update"!==e.source||(null===(l=e.selectedNominee)||void 0===l?void 0:l.sameApplicantAddress)!=="No";aa(w),w||(j.address1=null!==(b=eI(null===(c=e.selectedNominee)||void 0===c?void 0:c.address1))&&void 0!==b?b:"",j.address2=null!==(N=eI(null===(u=e.selectedNominee)||void 0===u?void 0:u.address2))&&void 0!==N?N:"",j.city=null!==(f=null===(m=e.selectedNominee)||void 0===m?void 0:m.city)&&void 0!==f?f:"",j.state=null!==(x=null===(v=e.selectedNominee)||void 0===v?void 0:v.state)&&void 0!==x?x:"",j.pin=null!==(E=null!==(C=null===(p=e.selectedNominee)||void 0===p?void 0:p.pin)&&void 0!==C?C:null===(h=e.selectedNominee)||void 0===h?void 0:h.pinCode)&&void 0!==E?E:"",j.country=null!==(y=null===(g=e.selectedNominee)||void 0===g?void 0:g.country)&&void 0!==y?y:"",j.errorMessage.address1=void 0,j.errorMessage.address2=void 0,j.errorMessage.city=void 0,j.errorMessage.state=void 0,j.errorMessage.country=void 0,j.errorMessage.pin=void 0),w&&T&&(j.address1=null!==(S=eI(T.addressLine1))&&void 0!==S?S:"",j.address2=null!==(A=eI(T.addressLine2))&&void 0!==A?A:"",j.city=T.city,j.state=T.stateName,j.pin=T.pinCode,j.country=T.countryName,j.errorMessage.address1=void 0,j.errorMessage.address2=void 0,j.errorMessage.city=void 0,j.errorMessage.state=void 0,j.errorMessage.country=void 0,j.errorMessage.pin=void 0);let I=aH(j.dob),_=new Date;_.setFullYear(_.getFullYear()-18);let O=!!I&&I>_&&I<=new Date;if(e2(O),!e.isFromEdit&&"update"===e.source&&e.isNomineeMissing){let{errorMessage:e,guardianErrorMessage:a}=aP(j,O);j.errorMessage=e,j.guardian.errorMessage=a,av(!0)}e0(j),ar(!1)},aG=()=>{let a="",l="",t="",i="";if(e.foliodetails&&Object.entries(e.foliodetails).length){var n,o,s,r,d,c,u,m,v,p,h,g;a=null===(s=e.foliodetails)||void 0===s?void 0:null===(o=s.addressDetails)||void 0===o?void 0:null===(n=o.permanentAddress)||void 0===n?void 0:n.address,i=[a,l=null===(c=e.foliodetails)||void 0===c?void 0:null===(d=c.addressDetails)||void 0===d?void 0:null===(r=d.permanentAddress)||void 0===r?void 0:r.city,null===(v=e.foliodetails)||void 0===v?void 0:null===(m=v.addressDetail
1s)||void 0===m?void 0:null===(u=m.permanentAddress)||void 0===u?void 0:u.state,null===(g=e.foliodetails)||void 0===g?void 0:null===(h=g.addressDetails)||void 0===h?void 0:null===(p=h.permanentAddress)||void 0===p?void 0:p.pin].filter(Boolean).join(", "),e$.address=i}return i},aH=e=>{if(e){var[a,l,t]=e.replace(/\//g,"-").split("-").map(Number);if(4===String(a).length){let e=t;t=a,a=e}if(a&&l&&t)return new Date(t,l-1,a)}};return p.jsxs("div",{className:"add-new-nominee-form-holder add-new-nominee-form-holder-for-services",children:[p.jsxs("div",{className:"title-holder",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/person.svg",alt:"add new nominee"}),p.jsx("label",{className:"lbl-banner-heading",children:(null==e?void 0:e.isFromEdit)?" Add New Nominee":" Update Nominee"})]}),p.jsxs("div",{className:"add-new-nomineeform",children:[p.jsxs("div",{className:"minor-checkbox-holder",children:[p.jsx("input",{className:"check-box",type:"checkbox",id:"minor-checkbox",checked:e1,onChange:e=>{let a=e.target.checked;e2(a);let l=aH(e$.dob),t=new Date;t.setFullYear(t.getFullYear()-18);let i=!!l&&l>t&&l<=new Date,n=a&&e$.dob&&!i?"Enter valid minor Nominee Date of Birth":void 0;e0(e=>({...e,errorMessage:{...e.errorMessage,dob:n}}))}}),p.jsx("label",{htmlFor:"minor-checkbox",className:"minor-checkbox-label",children:"Select if the Nominee is Minor."})]}),p.jsxs("div",{className:"row",children:[p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"name-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Nominee name (As per Pan)*",disabled:!1,value:null==e$?void 0:e$.name,errorMessage:null===(U=e$.errorMessage)||void 0===U?void 0:U.name,isError:!!(null===(Y=e$.errorMessage)||void 0===Y?void 0:Y.name),onChange:e=>aI("name",e,!1),onFocusOut:()=>aO("nomineeName")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"email-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input ".concat((null===(G=e$.errorMessage)||void 0===G?void 0:G.name)?"add-new-nominee-input-email":""),label:"Email ID",inputMode:"email",value:null==e$?void 0:e$.email,errorMessage:null===(z=e$.errorMessage)||void 0===z?void 0:z.email,isError:!!(null===(H=e$.errorMessage)||void 0===H?void 0:H.email),onChange:e=>aI("email",e,!1),onFocusOut:()=>aO("nomineeEmail")})})]}),p.jsxs("div",{className:"row",children:[p.jsx("div",{className:"input-holder",children:p.jsx(S.DatePickerComponent,{id:"dob-".concat(null==e$?void 0:e$.name),label:e1?"Date of Birth*":"Date of Birth",selectedDate:e$.dob?aH(e$.dob):void 0,dateSeparator:"-",dateFormat:"DDMMYYYY",minDate:new Date(1899,0,1),maxDate:new Date,disabled:!1,errorMsg:null===(K=e$.errorMessage)||void 0===K?void 0:K.dob,onChange:e=>{var a;return aI("dob",null!==(a=e.stringDate)&&void 0!==a?a:"",!1)},onFocusOut:()=>aO("nomineeDob"),placeHolder:["DD","MM","YYYY"]})}),p.jsx("div",{className:"input-holder",children:p.jsx(g.DefaultDropdown,{id:"relationship-".concat(null==e$?void 0:e$.name),className:"material-outlined-dropdown relation-dropdown add-new-nominee-input",optionList:null===(q=e.configdata)||void 0===q?void 0:q.relationships,label:"Relationship with Investor*",selectedOption:e$.relationship,isError:!!(null===(W=e$.errorMessage)||void 0===W?void 0:W.relationship),errorMessage:null===(Z=e$.errorMessage)||void 0===Z?void 0:Z.relationship,onSelectCB:e=>aI("relationship",e,!1),hasClose:!0})})]}),p.jsxs("div",{className:"row",children:[p.jsx("div",{className:"input-holder",children:p.jsx(g.DefaultDropdown,{id:"documentType-".concat(null==e$?void 0:e$.name),className:"material-outlined-dropdown relation-dropdown add-new-nominee-input",optionList:e1?ax.filter(e=>"Driving License"!==e):ax,label:"Select Document",selectedOption:null==e$?void 0:e$.documentType,onSelectCB:e=>aI("documentType",e,!1),isError:!!(null===(X=e$.errorMessage)||void 0===X?void 0:X.documentType),errorMessage:null===(Q=e$.errorMessage)||void 0===Q?void 0:Q.documentType,hasClose:!0})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"documentNumber-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:ab,type:"text",value:null==e$?void 0:e$.documentNumber,errorMessage:null===(J=e$.errorMessage)||void 0===J?void 0:J.documentNumber,isError:!!(null===($=e$.errorMessage)||void 0===$?void 0:$.documentNumber),onChange:e=>aI("documentNumber",e,!1),onFocusOut:()=>aO("documentNumber")})})]}),p.jsxs("div",{className:"row row-last",children:[p.jsx("div",{className:"input-holder input-zk-holder",children:p.jsx(j.MOutlinedTextBox,{id:"mobile-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Mobile Number",value:e$.mobile,type:"text",isError:!!(null===(ee=e$.errorMessage)||void 0===ee?void 0:ee.mobile),errorMessage:null===(ea=e$.errorMessage)||void 0===ea?void 0:ea.mobile,disabled:!1,inputMode:"numeric",onChange:e=>aI("mobile",e,!1),onFocusOut:()=>aO("nomineeMobile")}
1)}),p.jsx("div",{className:"input-holder input-zk-holder",children:p.jsx(j.MOutlinedTextBox,{id:"ratio-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Allocation(%)*",value:e$.ratio,type:"text",isError:!!(null===(el=e$.errorMessage)||void 0===el?void 0:el.ratio),errorMessage:null===(et=e$.errorMessage)||void 0===et?void 0:et.ratio,disabled:!1,inputMode:"numeric",onChange:e=>aI("ratio",e,!1),onFocusOut:()=>aO("nomineeRatio")})})]}),e1&&p.jsxs("div",{className:"appointee-form",children:[p.jsxs("div",{className:"appointee-title",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/person.svg",alt:"add new nominee"}),p.jsx("span",{className:"lbl-banner-heading",children:"Appointee"})]}),p.jsxs("div",{className:"row",children:[p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"name-".concat(null==e$?void 0:e$.name,"-").concat(null===(ei=e$.guardian)||void 0===ei?void 0:ei.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Appointee/Guardian Name",value:null===(en=e$.guardian)||void 0===en?void 0:en.name,isError:!!(null===(es=e$.guardian)||void 0===es?void 0:null===(eo=es.errorMessage)||void 0===eo?void 0:eo.name),errorMessage:null===(ed=e$.guardian)||void 0===ed?void 0:null===(er=ed.errorMessage)||void 0===er?void 0:er.name,onChange:e=>aI("name",e,!0),onFocusOut:()=>aO("guardianName")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"pan-".concat(null==e$?void 0:e$.name,"-").concat(null===(ec=e$.guardian)||void 0===ec?void 0:ec.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Appointee PAN Number",value:null===(eu=e$.guardian)||void 0===eu?void 0:eu.pan,isError:!!(null===(ev=e$.guardian)||void 0===ev?void 0:null===(em=ev.errorMessage)||void 0===em?void 0:em.pan),errorMessage:null===(eh=e$.guardian)||void 0===eh?void 0:null===(ep=eh.errorMessage)||void 0===ep?void 0:ep.pan,onChange:e=>aI("pan",e,!0),onFocusOut:()=>aO("guardianPan"),onFocus:e=>aI("pan",e,!0)})})]}),p.jsxs("div",{className:"row",children:[p.jsx("div",{className:"input-holder",children:p.jsx(S.DatePickerComponent,{id:"dob-".concat(null==e$?void 0:e$.name,"-").concat(null==e$?void 0:null===(eg=e$.guardian)||void 0===eg?void 0:eg.name),label:"Appointee Date of Birth",selectedDate:(null==e$?void 0:null===(eb=e$.guardian)||void 0===eb?void 0:eb.dob)?aH(null==e$?void 0:null===(eN=e$.guardian)||void 0===eN?void 0:eN.dob):void 0,dateSeparator:"-",dateFormat:"DDMMYYYY",minDate:new Date(1899,0,1),maxDate:new Date,disabled:!1,errorMsg:null==e$?void 0:null===(ex=e$.guardian)||void 0===ex?void 0:null===(ef=ex.errorMessage)||void 0===ef?void 0:ef.dob,onChange:e=>{aI("dob",e.stringDate,!0),aO("guardianDob")},onFocusOut:()=>aO("guardianDob"),placeHolder:["DD","MM","YYYY"]})}),p.jsx("div",{className:"input-holder",children:p.jsx(g.DefaultDropdown,{id:"relationship-".concat(null==e$?void 0:e$.name,"-").concat(null===(eC=e$.guardian)||void 0===eC?void 0:eC.name),className:"material-outlined-dropdown relation-dropdown add-new-nominee-input",optionList:null===(eE=e.configdata)||void 0===eE?void 0:eE.relationships,label:"Appointee Relation",selectedOption:null==e$?void 0:null===(ey=e$.guardian)||void 0===ey?void 0:ey.relationship,isError:!!(null===(eA=e$.guardian)||void 0===eA?void 0:null===(eS=eA.errorMessage)||void 0===eS?void 0:eS.relationship),errorMessage:null===(eT=e$.guardian)||void 0===eT?void 0:null===(ej=eT.errorMessage)||void 0===ej?void 0:ej.relationship,onSelectCB:e=>aI("relationship",e,!0),hasClose:!0})})]}),p.jsx("div",{className:"row",children:p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"mobile-".concat(null==e$?void 0:e$.name,"-").concat(null===(eO=e$.guardian)||void 0===eO?void 0:eO.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Appointee Mobile Number",value:null===(ek=e$.guardian)||void 0===ek?void 0:ek.mobile,type:"text",isError:null===(eM=e$.guardian)||void 0===eM?void 0:null===(eR=eM.errorMessage)||void 0===eR?void 0:eR.mobile,errorMessage:null===(eB=e$.guardian)||void 0===eB?void 0:null===(eF=eB.errorMessage)||void 0===eF?void 0:eF.mobile,disabled:!1,inputMode:"numeric",onChange:e=>aI("mobile",e,!0),onFocusOut:()=>aO("guardianMobile"),onFocus:()=>{var e;return aI("mobile",null!==(e=e$.guardian.mobile)&&void 0!==e?e:"",!0)}})})})]}),p.jsxs("div",{className:"check-address",children:[p.jsx("label",{className:"lbl-txt-title",children:"Permanent Address"}),!ap&&p.jsxs("div",{className:"check-box-holder",children:[p.jsx("input",{className:"check-box",type:"checkbox",checked:e3,onChange:e=>{aI("sameApplicantAddress",e.target.checked?"true":"false",!1),e$.errorMessage.address=void 0}}),p.jsx("label",{className:e3?"lbl-txt-content":"lbl-primary-txt-content",children:"Same as First Applicant"})]})]}),p.jsxs("div",{className:"row",children:[p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"address1-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Address 1",value:(null==e$?void 0:e$.address1)||"",disabled:ag,isError:!!(null===(eV=e$.errorMessage)||void 0===eV?void 0:eV.address1),errorMessage:null===(eU=e$.errorMessage)||void 0===eU?void 0:eU.address1,onChange:e=>aI("address1",e,!1),onFocusOut:()=>aO("address1")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"address2-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Address 2",value:(null==e$?void 0:e$.address2)||"",disabled:ag,isError:!!(null===(eY=e$.errorMessage)||void 0===eY?void 0:eY.address2),errorMessage:null===(eG=e$.errorMessage)||void 0===eG?void 0:eG.address2,onChange:e=>aI("address2",e,!1),onFocusOut:()=>aO("address2")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"city-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"City",value:(null==e$?void 0:e$.city)||"",disabled:ag,isError:!!(null===(ez=e$.errorMessage)||void 0===ez?void 0:ez.city),errorMessage:null===(eH=e$.errorMessage)||void 0===eH?void 0:eH.city,onChange:e=>aI("city",e,!1),onFocusOut:()=>aO("city")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"state-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"State",value:(null==e$?void 0:e$.state)||"",disabled:ag,isError:!!(null===(eK=e$.errorMessage)||void 0===eK?void 0:eK.state),errorMessage:null===(eW=e$.errorMessage)||void 0===eW?void 0:eW.state,onChange:e=>aI("state",e,!1),onFocusOut:()=>aO("state")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"country-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Country",value:(null==e$?void 0:e$.country)||"",disabled:ag,isError:!!(null===(eZ=e$.errorMessage)||void 0===eZ?void 0:eZ.country),errorMessage:null===(eX=e$.errorMessage)||void 0===eX?void 0:eX.country,onChange:e=>aI("country",e,!1),onFocusOut:()=>aO("country")})}),p.jsx("div",{className:"input-holder",children:p.jsx(j.MOutlinedTextBox,{id:"pin-".concat(null==e$?void 0:e$.name),className:"moutlined-txtbx-default add-new-nominee-input",label:"Pincode",value:(null==e$?void 0:e$.pin)||"",disabled:ag,isError:!!(null===(eQ=e$.errorMessage)||void 0===eQ?void 0:eQ.pin),errorMessage:null===(eJ=e$.errorMessage)||void 0===eJ?void 0:eJ.pin,onChange:e=>aI("pin",e,!1),onFocusOut:()=>aO("pin")})})]})]}),p.jsx("div",{className:"add-new-nominee-footer-holder",children:p.jsx("button",{id:"add-new-nominee-add",className:"btn-primary",type:"button",disabled:!al,onClick:()=>{var a,l,t;av(!0);let i=aJ(e$,e1);
1(null==e$?void 0:e$.name)&&(e.isFromEdit,e.nomineeData).forEach((a,l)=>{var t,n,o,s,r,d,c,u;if(!((null==a?void 0:null===(t=a.name)||void 0===t?void 0:t.toLowerCase())===(null==e$?void 0:null===(n=e$.name)||void 0===n?void 0:n.toLowerCase())&&(null==e$?void 0:null===(o=e$.name)||void 0===o?void 0:o.toLowerCase())===(null==e?void 0:null===(r=e.selectedNominee)||void 0===r?void 0:null===(s=r.name)||void 0===s?void 0:s.toLowerCase()))&&(null==a?void 0:null===(d=a.name)||void 0===d?void 0:d.toLowerCase())===(null==e$?void 0:null===(c=e$.name)||void 0===c?void 0:c.toLowerCase())){let a=null!==(u=null==e?void 0:e.selectedNomineeIndex)&&void 0!==u?u:0,t=e.isFromEdit?e.nomineeData.length+1:a+1,n="Nominee ".concat(l+1," and Nominee ").concat(t," cannot be the same");e$.errorMessage.name=n,e0(e=>({...e,errorMessage:{...e.errorMessage,name:n}})),i=!1}}),e.isFromEdit||!0!==i||e.nomineeData.forEach((a,l)=>{var t,n,o,s,r,d,c;(null==a?void 0:null===(t=a.pan)||void 0===t?void 0:t.toLowerCase())===(null==e$?void 0:null===(n=e$.pan)||void 0===n?void 0:n.toLowerCase())&&(null==e$?void 0:null===(o=e$.pan)||void 0===o?void 0:o.toLowerCase())===(null==e?void 0:null===(r=e.selectedNominee)||void 0===r?void 0:null===(s=r.pan)||void 0===s?void 0:s.toLowerCase())?(e0(e=>({...e,errorMessage:{...e.errorMessage,pan:""}})),i=!0):""!==a.pan&&(null==a?void 0:null===(d=a.pan)||void 0===d?void 0:d.toLowerCase())===(null==e$?void 0:null===(c=e$.pan)||void 0===c?void 0:c.toLowerCase())&&(e0(e=>({...e,errorMessage:{...e.errorMessage,pan:"Same PAN already existing in the registered nominees"}})),i=!1)}),(null==e$?void 0:e$.name)&&!0===i&&(e.isFromEdit?e.nomineeData.forEach((a,l)=>{var t,n;(null==a?void 0:null===(t=a.name)||void 0===t?void 0:t.toLowerCase())===(null==e$?void 0:null===(n=e$.name)||void 0===n?void 0:n.toLowerCase())&&(e0(a=>({...a,errorMessage:{...a.errorMessage,name:"Nominee ".concat(l+1," and Nominee ").concat(e.nomineeData.length+1," cannot be the same")}})),i=!1)}):e.nomineeData.forEach((a,l)=>{var t,n,o,s,r,d,c,u;if((null==a?void 0:null===(t=a.name)||void 0===t?void 0:t.toLowerCase())===(null==e$?void 0:null===(n=e$.name)||void 0===n?void 0:n.toLowerCase())&&(null==e$?void 0:null===(o=e$.name)||void 0===o?void 0:o.toLowerCase())===(null==e?void 0:null===(r=e.selectedNominee)||void 0===r?void 0:null===(s=r.name)||void 0===s?void 0:s.toLowerCase()));else if((null==a?void 0:null===(d=a.name)||void 0===d?void 0:d.toLowerCase())===(null==e$?void 0:null===(c=e$.name)||void 0===c?void 0:c.toLowerCase())){let a=(null!==(u=null==e?void 0:e.selectedNomineeIndex)&&void 0!==u?u:0)+1;e0(e=>({...e,errorMessage:{...e.errorMessage,name:"Nominee ".concat(l+1," and Nominee ").concat(a," cannot be the same")}})),i=!1}})),aj&&(null==e$?void 0:e$.documentType)==="PAN"?(e_("pan-".concat(null==e$?void 0:e$.pan)),e0(e=>({...e,errorMessage:{...e.errorMessage,documentNumber:eq.ADD_NEW_FORM_VALIDATION.isApplicantAndNomineePanAreSame}})),i=!1):aD&&(e_("pan-".concat(null==e$?void 0:e$.pan,"-").concat(null==e$?void 0:null===(a=e$.guardian)||void 0===a?void 0:a.pan)),e0(e=>{var a;let l={...null==e?void 0:e.guardian,errorMessage:{...null==e?void 0:null===(a=e.guardian)||void 0===a?void 0:a.errorMessage,pan:eq.ADD_NEW_FORM_VALIDATION.isNomineeAppointeePan}};return{...e,guardian:l}}),i=!1),i&&(e$.dob=null!==(t=eP(e$.dob))&&void 0!==t?t:"",null==e$||!e$.documentType||(null==e$?void 0:null===(l=e$.documentNumber)||void 0===l?void 0:l.trim())||(e0(e=>({...e,errorMessage:{...e.errorMessage,documentNumber:"Document Number is mandatory"}})),i=!1),e.onAddOrUpdateNominee(e$)),ac(!ad)},children:(null==e?void 0:e.isFromEdit)?" Add Nominee":" Update Nominee"})})]})},a1=async e=>{let a=ey.SERVICE_URL+eS.INIT.NEW_FOLIO_CONFIG,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},a2=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.UPDATE_NOMINEE,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},a3=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.VERIFY_OTP,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},a9=e=>p.jsxs("div",{className:"warning-info-dialog",children:[p.jsxs("div",{className:"data-div",children:[p.jsx("span",{children:p.jsx("img",{fetchPriority:"low",src:e.imgUrl,alt:"Warning info"})}),p.jsx("label",{className:"lbl-popup-content title",children:e.infoData1}),p.jsx("label",{className:"lbl-txt-info-5 txt-center info",children:e.infoData2})]}),p.jsx("div",{className:"footer-holder",children:p.jsx("button",{id:"succes-redirect",className:"btn-primary",type:"button",onClick:e.goNext,children:e.buttonText})})]});function a6(e){return p.jsxs("div",{className:"delete-nominee-container-sc",children:[p.jsx("div",{className:"delete-nominee-header-sc",children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger("delete_nominee.png"),alt:"delete-nominee"})}),p.jsx("div",{className:"delete-nominee-body-sc",children:e.delteItemLength>1?p.jsx("span",{children:"Would you like to delete nominee ?"}):p.jsx("span",{children:"Would you like to proceed with no nominee?"})}),p.jsxs("div",{className:"delete-nominee-footer-sc",children:[p.jsx("button",{id:"add-new-nominee-cancel",className:"btn-outline-primary",type:"button",onClick:e.onClickNo,children:"No"}),p.jsx("button",{id:"add-new-nominee-add",className:"btn-primary",type:"button",disabled:!1,onClick:e.onClickYes,children:"Yes"})]})]})}let a5=e=>{var a;let{nominees:l,onClose:t,onContinue:i}=e,[n,o]=r.useState("Y"),[s,d]=r.useState(null),[c,m]=r.useState(""),[v,h]=r.useState(""),[b,N]=r.useState(""),[f,x]=r.useState(""),[C,E]=r.useState(""),[y,S]=r.useState(""),[A,T]=r.useState(""),D=768>u.useScreenWidth(),w=e=>{if(!e)return!0;let[a,l,t]=e.replace(/\//g,"-").split("-").map(e=>parseInt(e,10));if(!a||!l||!t)return!1;let i=new Date(t,l-1,a);if(isNaN(i.getTime()))return!1;let n=new Date,o=n.getFullYear()-i.getFullYear(),s=n.getMonth()-i.getMonth();return(s<0||0===s&&n.getDate()<i.getDate())&&o--,o>=18},I=r.useMemo(()=>l.map((e,a)=>({nom:e,index:a})).filter(e=>{let{nom:a}=e;return w(a.dob)}),[l]),_=r.useMemo(()=>I.map(e=>{let{nom:a}=e;return a.name}),[I]),O=r.useMemo(()=>{var e;return null!==(e=I.find(e=>e.index===s))&&void 0!==e?e:null},[I,s]),k=r.useMemo(()=>{var e;return null!==(e=l.find(e=>"Y"===e.incapacitationFlag))&&void 0!==e?e:null},[l]);r.useEffect(()=>{var e,a,l,t;let i=null==k?void 0:null===(a=k.type)||void 0===a?void 0:null===(e=a.match(/\d+/))||void 0===e?void 0:e[0],n=i?Number(i):null,o=n?n-1:null;d(null!=o?o:null);let s=(null!==(l=null==k?void 0:k.incapacitationThreshold_Aum)&&void 0!==l?l:"").trim(),r
1=(null!==(t=null==k?void 0:k.incapacitationThreshold_Percent)&&void 0!==t?t:"").trim(),c=/^[1-9]\d{0,2}$/.test(r)&&100>=Number(r),u=/^[1-9]\d{0,9}$/.test(s);k&&(c?(m("PERCENT"),h(r),N(""),S(""),T("")):u?(m("AMOUNT"),N(s),h(""),S(""),T("")):(m(""),h(""),N("")))},[k]);let R=O?O.index+1:null,M=O?null===(a=O.nom)||void 0===a?void 0:a.name:null;return p.jsxs("div",{className:"soa-details-popup-holder",children:[p.jsxs("div",{className:"soa-header",children:[p.jsx("div",{className:"soa-title",children:"SOA Details and Incapacitation Authorization"}),p.jsx("button",{type:"button",className:"soa-close-btn",onClick:t,"aria-label":"Close",children:"â"})]}),p.jsx("hr",{className:"soa-line"}),p.jsxs("div",{className:"soa-body",children:[p.jsxs("div",{className:"soa-top-section",children:[p.jsx("p",{className:"soa-statement",children:"I/We want the details of my/our nominee to be printed in the statement of holding, provided to me/us by the AMC/DP as follows"}),p.jsxs("div",{className:"soa-radio-row",children:[p.jsxs("label",{className:"soa-radio",children:[p.jsx("input",{type:"radio",name:"soaFlag",checked:"Y"===n,onChange:()=>{o("Y"),x("")}}),p.jsx("span",{children:"Name of Nominee(s)"})]}),p.jsxs("label",{className:"soa-radio",children:[p.jsx("input",{type:"radio",name:"soaFlag",checked:"N"===n,onChange:()=>{o("N"),x("")}}),p.jsx("span",{children:"Nomination: Yes"})]})]}),f&&p.jsx("div",{className:"field-error",children:f})]}),I.length>0&&p.jsxs("div",{className:"soa-bottom-section",children:[p.jsxs("div",{className:"soa-row soa-authorize-row",children:[p.jsxs("div",{className:"soa-authorize-row-1",children:[p.jsx("div",{className:"soa-label",children:"I hereby authorize"}),p.jsx("div",{className:"soa-input nominee-dd",children:p.jsx(g.DefaultDropdown,{id:"soa-nominee-dd",className:"material-outlined-dropdown",label:"Nominee Name",optionList:_,selectedOption:M,dialogLabel:"Select Nominee",onSelectCB:e=>{let a=I.find(a=>{let{nom:l}=a;return l.name===e});a?(d(a.index),E(""),m("PERCENT"),h(""),N(""),S(""),T("")):d(null)},isError:!!C,errorMessage:C,hasClose:!0})})]}),p.jsxs("div",{className:"soa-authorize-row-2",children:[p.jsx("span",{className:"soa-inline-text",children:"(nominee number"}),p.jsx("div",{className:"soa-input nominee-number-input",children:p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default sao-input",label:"Nominee Number",disabled:!0,value:null!=R?R:null})}),p.jsx("span",{className:"soa-inline-text",children:")"})]})]}),p.jsx("p",{className:"soa-info-text",children:"to operate my account on my behalf, in case of my incapacitation in terms of paragraph 3.5 of the circular. He/She is authorized to encash my assets upto:"}),p.jsxs("div",{className:"soa-allocation-rows ".concat(!D&&(A||y)?"soa-allocation-rows-web-error":""),children:[p.jsxs("div",{className:"soa-row soa-allocation-row",children:[p.jsxs("label",{className:"soa-radio soa-radio-incap inline",children:[p.jsx("input",{type:"radio",name:"allocationType",checked:"PERCENT"===c,onChange:()=>{m("PERCENT"),S(""),N(""),T("")},disabled:null===s}),p.jsx("span",{children:"% of assets in the account/folio"})]}),p.jsx("div",{className:"soa-input allocation-input ".concat(D&&y?"soa-input-mob-percent-error":""),children:p.jsx(j.MOutlinedTextBox,{id:"soa-percent",className:"moutlined-txtbx-default",label:"",type:"text",disabled:null===s||"PERCENT"!==c,value:v,inputMode:"numeric",onChange:e=>{let a=e.replace(/\D/g,"");a.length>3&&(a=a.slice(0,3)),"0"===a&&(a=""),a&&Number(a)>100||(m("PERCENT"),h(a),N(""),T(""),S(""))},isError:!!y,errorMessage:y})})]}),p.jsxs("div",{className:"soa-row soa-allocation-row",children:[p.jsxs("label",{className:"soa-radio soa-radio-incap inline",children:[p.jsx("input",{type:"radio",name:"allocationType",checked:"AMOUNT"===c,onChange:()=>{m("AMOUNT"),T(""),h(""),S("")},disabled:null===s}),p.jsx("span",{children:"Rs of assets in the account/folio"})]}),p.jsx("div",{className:"soa-input allocation-input ".concat(D&&A?"soa-input-mob-amount-error":""),children:p.jsx(j.MOutlinedTextBox,{id:"soa-amount",className:"moutlined-txtbx-default",label:"",type:"text",disabled:null===s||"AMOUNT"!==c,value:b,inputMode:"numeric",onChange:e=>{let a=e.replace(/\D/g,"");a.length>10&&(a=a.slice(0,10)),"0"===a&&(a=""),m("AMOUNT"),N(a),h(""),S(""),T("")},isError:!!A,errorMessage:A})})]})]})]})]}),p.jsx("hr",{className:"soa-line-bottom"}),p.jsx("div",{className:"soa-footer",children:p.jsx("button",{className:"soa-btn-primary",type:"button",onClick:()=>{let e=!0;if(n?x(""):(x("Please select an option."),e=!1),null===s){if(!e)return;i({soaFlag:n,incapacitationValue:"",incapacitationThresholdPercent:"0",incapacitationThresholdAum:"0",nomineeNumber:null});return}if(c||(S("Please select either % of assets or Rs of assets."),T(""),e=!1),"PERCENT"===c){if(v){let a=Number(v);isNaN(a)||a<1||a>100?(S("Please enter a value between 1 and 100."),e=!1):S("")}else S("Please enter a value between 1 and 100."),e=!1;T("")}"AMOUNT"===c&&(b&&/^[1-9][0-9]{0,9}$/.test(b)?T(""):(T("Please enter amount up to 10 digits (not 0)."),e=!1),S("")),e&&i({soaFlag:n,incapacitationValue:R?"NOM".concat(R):"",incapacitationThresholdPercent:"PERCENT"===c?v:"0",incapacitationThresholdAum:"AMOUNT"===c?b:"0",nomineeNumber:R})},children:"Continue"})})]})},a4={name:"",pan:"",dob:"",mobile:"",relationship:"",ratio:"",address:"",guardian:{name:"",pan:"",dob:"",mobile:"",relationship:"",ratio:"",address:"",sameAp
1plicantAddress:""},sameApplicantAddress:""},a8=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.Banks.BankIfsc,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},a7=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.Banks.Banks,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},le=e=>{var a,l,t;let i=(a,l)=>{e.handleSelectBankDetailsCB(a,l)};return p.jsxs("div",{className:"search-ifsc-section search-zk-ifsc-section",children:[p.jsxs("div",{className:"title-holder",children:[p.jsx("label",{className:"lbl-banner-heading",children:"Search IFSC Code"}),p.jsx("div",{className:"line-zk-ifsc-search-popup"})]}),p.jsx("div",{className:"content-holder",children:p.jsxs("div",{className:"row bank-city-branch-search-section",children:[p.jsx("div",{className:"bank-detail-selection",onClick:()=>e.handleGetBankDetailsCB("bankName","",""),children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown bank-acc-txtbx",optionList:null!==(t=e.bankData)&&void 0!==t?t:void 0,isSupportSearch:!0,label:"Select Bank",selectedOption:e.selectedBankDetails.bank,displayValueKey:"bankName",onSelectCB:e=>i(e,"bank"),hasClose:!0})}),p.jsx("div",{className:"bank-detail-selection",onClick:()=>{var a;return e.handleGetBankDetailsCB("city",null!==(a=e.selectedBankDetails.bank.bankCode)&&void 0!==a?a:"","")},children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown bank-acc-txtbx",optionList:e.bankCityNames,isSupportSearch:!0,label:"Select City",selectedOption:e.selectedBankDetails.city,displayValueKey:"bankName",onSelectCB:e=>i(e,"city"),hasClose:!0,disabled:""==e.selectedBankDetails.bank.bankName})}),p.jsx("div",{className:"bank-detail-selection",onClick:()=>{var a,l;return e.handleGetBankDetailsCB("branch",null!==(a=e.selectedBankDetails.bank.bankCode)&&void 0!==a?a:"",null!==(l=e.selectedBankDetails.city)&&void 0!==l?l:"")},children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown bank-acc-txtbx",optionList:e.bankBranchNames,label:"Select Branch",isSupportSearch:!0,selectedOption:e.selectedBankDetails.branch,displayValueKey:"branch",onSelectCB:e=>i(e,"branch"),disabled:""==e.selectedBankDetails.bank.bankName||""==e.selectedBankDetails.city,hasClose:!0})}),(null===(a=e.selectedBankDetails)||void 0===a?void 0:a.branch.ifscCode)&&p.jsx("div",{className:"bank-detail-selection",children:p.jsxs("div",{className:"ifsc-code-detail",children:[" ",p.jsxs("label",{className:"lbl-txt-content lbl-txt-ifsc-content",children:["IFSC Code:",p.jsxs("label",{className:"ifsc-code",children:[" ",null===(l=e.selectedBankDetails)||void 0===l?void 0:l.branch.ifscCode]})]})]})})]})}),p.jsx("div",{className:"btn-holder",children:p.jsx("button",{id:"add-bank-account-save",className:"btn-primary btn-save",onClick:e.handleSaveCB,children:"Save"})})]})},la=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.Banks.BankCity,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},ll=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.Banks.BankBranch,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},lt=async e=>{let a=ey.AGGREGATOR_URL+eS.SERVICE.GET_ADD_BANK_FLAG,l=await u.getBearerToken(),t=await ef(a,{"Content-Type":"application/json",Authorization:"Bearer "+l},"");(null==t?void 0:t.status)==="success"?e.success(t):e.default(t)},li=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.ADD_BANK_GENERATE_OTP,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},ln=async(e,a)=>{var l;let t=ey.AGGREGATOR_URL+eS.SERVICE.ADD_BANK_VALIDATE_OTP,i=await u.getBearerToken(),n=await ef(t,{"Content-Type":"application/json",Authorization:"Bearer "+i},JSON.stringify(e));(null==n?void 0:null===(l=n.status)||void 0===l?void 0:l.toLowerCase())==="success"?a.success(n):a.default(n)},lo=async e=>{let a=ey.SERVICE_URL+eS.SUPPORT.UNCLAMIED_REDEMPTION,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},ls=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.UNCLAIMED_DETAILS,t="Bearer ".concat(await u.getBearerToken()),i=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(e));(null==i?void 0:i.status)==="0"?a.success(i):a.default(i)},lr=async e=>
1{let a=ey.SERVICE_URL+eS.SUPPORT.STATEMENT,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},ld=e=>p.jsx("div",{className:"menu-switch",children:e.menuList.map((a,l)=>p.jsx("div",{className:"menu "+(e.selectedMenu===a?"selected lbl-list-heading":"lbl-menu-item"),onClick:()=>e.onChangeMenuCB&&e.onChangeMenuCB(a),children:a},l))}),lc=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.GETHOLDINGINFOLIO,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));i&&i.data.schemeDetails?a.success(i):a.default(i)},lu=e=>{var a;let l=a=>{e.onExistingFolioSelected&&e.onExistingFolioSelected(a)};return p.jsx("div",{className:"existing-folio-selection-service",children:e.existingUserfoliolist&&(null===(a=e.existingUserfoliolist)||void 0===a?void 0:a.length)!=0?e.existingUserfoliolist.map((a,t)=>{var i,n;return p.jsxs("div",{className:"folio-detail "+((null===(i=e.selectedOption)||void 0===i?void 0:i.schemeName)===a.schemeName?"selected":""),onClick:()=>l(a),children:[p.jsx("label",{className:"lbl-list-heading",children:a.schemeName}),(null===(n=e.selectedOption)||void 0===n?void 0:n.schemeName)===a.schemeName?p.jsx("div",{className:"mark-icon",children:p.jsx("img",{fetchPriority:"low",src:"/assets/mark.svg",alt:"mark-icon"})}):null]},t)}):p.jsx("label",{className:"lbl-txt-content",children:"No Existing Folio"})})},lm=e=>{let{onDateChange:a,onHandleFromTodate:l}=e,[t,i]=r.useState(""),[n,o]=r.useState(""),[s,d]=r.useState(!0),[c,u]=r.useState(!0),[m,v]=r.useState("");r.useEffect(()=>{h()},[]);let h=()=>{var e=new Date;o(ed(e));var l=new Date(e.getFullYear(),e.getMonth()-6,e.getDate());i(ed(l)),a(N(ec(l)),N(ec(e)))},g=e=>{i(e),a(N(e),N(n))},b=e=>{o(e),a(N(t),N(e))};function N(e){let[a,l,t]=e.split("-");return"".concat(l,"-").concat(a,"-").concat(t)}let f=e=>{d(e)},x=e=>{u(e)};return r.useEffect(()=>{(s||c)&&l(s,c)},[s,c]),r.useEffect(()=>{!s&&c?v("Please select From Date"):s&&!c?v("Please select To Date"):s||c?v(""):v("Please select From Date and Select To Date")},[s,c]),p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"from-date-to-date-module",children:[p.jsx(S.DatePickerComponent,{id:"dob",minDate:"01-01-1900",maxDate:ed(new Date),dateSeparator:"-",dateFormat:"DDMMYYYY",disabled:!1,label:"From Date",onChange:e=>{var a;return g(null!==(a=e.stringDate)&&void 0!==a?a:"")},selectedDate:t,isStringDateInput:!0,removeClearIcon:!0,getDateInputValidityOnChange:e=>f(e),placeHolder:["DD","MM","YYYY"]}),p.jsx(S.DatePickerComponent,{minDate:"01-01-1900",maxDate:ed(new Date),dateSeparator:"-",dateFormat:"DDMMYYYY",disabled:!t,label:"To Date",onChange:e=>{var a;return b(null!==(a=e.stringDate)&&void 0!==a?a:"")},isStringDateInput:!0,selectedDate:n,removeClearIcon:!0,getDateInputValidityOnChange:e=>x(e),placeHolder:["DD","MM","YYYY"]})]}),p.jsx("div",{className:"error-message",children:m})]})},lv=async(e,a,l)=>{let t="Bearer ".concat(await u.getBearerToken()),i=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},lp=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.SINCE_INCEPTION,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status.toLowerCase())==="success"?a.success(i):a.default(i)},lh=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.PRE_LOGIN,t="Bearer ".concat(await u.getBearerToken()),i=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},lg=e=>{var a,l,t,i;let[n,o]=r.useState(1),s=r.useRef(null),[d,c]=r.useState([]),[u,m]=r.useState([]),v=e=>{if(o(e),s.current){var a;null==s||null===(a=s.current)||void 0===a||a.scrollIntoView({behavior:"smooth",block:"center"})}};r.useEffect(()=>{c(ev(e.navlist,n,10))},[n,e.navlist]),r.useEffect(()=>{m(ev(e.idcwlist,n,10))},[u,e.idcwlist]);let g=e=>{let a=e.lastIndexOf(" - ");return -1!==a?e.substring(0,a):e};return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"webView myTable-service",children:[p.jsxs("table",{className:"navidcw-table",ref:s,children:[p.jsx("thead",{children:e.isNavSelected?p.jsxs("tr",{className:"lbl-content-heading-6",children:[p.jsx("th",{children:"Fund Name"}),p.jsx("th",{children:"Date"}),p.jsx("th",{children:"Current NAV"}),p.jsx("th",{children:"Previous NAV"}),p.jsx("th",{children:"Change"}),p.jsx("th",{children:"Percentage"})]}):p.jsxs("tr",{className:"lbl-content-heading-6",children:[p.jsx("th",{children:"Fund Name"}),p.jsx("th",{children:"Record Date"}),p.jsx("th",{children:"IDCW STATUS"}),p.jsx("th",{children:"IDCW (IN % OF FACE VALUE)"}
1),p.jsx("th",{children:"IDCW (IN PER UNIT)"}),p.jsx("th",{children:"Current NAV"})]})}),p.jsx("tbody",{className:"lbl-content-heading-3",children:e.isNavSelected?(null===(a=e.navlist)||void 0===a?void 0:a.length)?p.jsx(p.Fragment,{children:d.map((e,a)=>{var l,t,i,n,o,s;return p.jsxs("tr",{children:[p.jsx("td",{children:g(null!==(l=e.fundName)&&void 0!==l?l:"--")}),p.jsx("td",{children:null!==(t=e.date)&&void 0!==t?t:"--"}),p.jsx("td",{children:null!==(i=e.currentNav)&&void 0!==i?i:"--"}),p.jsx("td",{children:null!==(n=e.previousNav)&&void 0!==n?n:"--"}),p.jsx("td",{children:null!==(o=e.change)&&void 0!==o?o:"--"}),p.jsx("td",{children:null!==(s=e.percentage)&&void 0!==s?s:"--"})]},a)})}):p.jsx("tr",{children:p.jsx("td",{children:"No Data Available"})}):(null===(l=e.idcwlist)||void 0===l?void 0:l.length)?p.jsx(p.Fragment,{children:u.map((e,a)=>{var l,t,i,n,o,s;return p.jsxs("tr",{children:[p.jsx("td",{className:"lbl-txt-table-content",children:g(null!==(l=e.FundName)&&void 0!==l?l:"--")}),p.jsx("td",{children:null!==(t=e.Record_Date)&&void 0!==t?t:"--"}),p.jsx("td",{children:null!==(i=e.IDCW_STATUS)&&void 0!==i?i:"--"}),p.jsx("td",{children:null!==(n=e.IDCW_IN_PERCENTAGE_OF_FACE_VALUE)&&void 0!==n?n:"--"}),p.jsx("td",{children:null!==(o=e.IDCW_IN_PER_UNIT)&&void 0!==o?o:"--"}),p.jsx("td",{children:null!==(s=e.Current_NAV)&&void 0!==s?s:"--"})]},a)})}):p.jsx("tr",{children:p.jsx("td",{children:"No Data Available"})})})]}),p.jsxs("div",{children:[e.navlist&&e.navlist.length>10&&p.jsx(h.PaginationFooter,{listLength:e.navlist.length,currentPage:n,dataPerPage:10,onChangePage:v}),e.idcwlist&&e.idcwlist.length>10&&p.jsx(h.PaginationFooter,{listLength:e.idcwlist.length,currentPage:u,dataPerPage:10,onChangePage:v})]})]}),p.jsx("div",{className:"mobile-view",children:p.jsx("table",{className:"navidcw-table-mob",children:p.jsx("tbody",{className:"lbl-content-heading-3",children:e.isNavSelected?(null===(t=e.navlist)||void 0===t?void 0:t.length)?p.jsxs(p.Fragment,{children:[p.jsxs("tr",{children:[p.jsx("th",{children:"Fund Name"}),e.navlist.map((e,a)=>{var l;return p.jsx("td",{children:g(null!==(l=e.fundName)&&void 0!==l?l:"--")},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Date"}),e.navlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.date)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Current NAV"}),e.navlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.currentNav)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Previous NAV"}),e.navlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.previousNav)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Change"}),e.navlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.change)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Percentage"}),e.navlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.percentage)&&void 0!==l?l:"--"},a)})]})]}):p.jsx("tr",{children:p.jsx("td",{children:"No Data Available"})}):(null===(i=e.idcwlist)||void 0===i?void 0:i.length)?p.jsxs(p.Fragment,{children:[p.jsxs("tr",{children:[p.jsx("th",{children:"Fund Name"}),e.idcwlist.map((e,a)=>{var l;return p.jsxs("td",{children:[g(null!==(l=e.FundName)&&void 0!==l?l:"--")," "]},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Record Date"}),e.idcwlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.Record_Date)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"IDCW Status"}),e.idcwlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.IDCW_STATUS)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"IDCW in Percentage of Face Value"}),e.idcwlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.IDCW_IN_PERCENTAGE_OF_FACE_VALUE)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"IDCW in Per Unit"}),e.idcwlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.IDCW_IN_PER_UNIT)&&void 0!==l?l:"--"},a)})]}),p.jsxs("tr",{children:[p.jsx("th",{children:"Current NAV"}),e.idcwlist.map((e,a)=>{var l;return p.jsx("td",{children:null!==(l=e.Current_NAV)&&void 0!==l?l:"--"},a)})]})]}):p.jsx("tr",{children:p.jsx("td",{children:"No Data Available"})})})})})]})},lb=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.NAV_IDCW_ALL_SCHEME_DATA,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},lN=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.PLAN_OPTIONS_DATA,t={schemeCode:a.code},i=await ef(l,{"Content-Type":"application/json"},JSON.stringify(t));(null==i?void 0:i.status)==="success"?e.success(i):e.default(i)},lf=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.NAV_IDCW_HISTORY_DATA,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},lx=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.NAV_VIEW_DATA,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},lC=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.IDCW_VIEW_DATA,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},lE=e=>p.jsx("div",{className:"thankyou-request-call-back",children:p.jsxs("div",{className:"call-request",children:[p.jsxs("div",{className:"content-holder",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/requestsentimg.svg",className:"request-img",alt:"requestsentimg"}),p.jsx("label",{className:"lbl-popup-content ",children:"Your Call request has been sent!"}),p.jsxs("div",{className:"tnakyou-lbl",children:[p.jsx("span",{className:"lbl-menu-item",children:"Thank y
1ou for reaching out to us."}),p.jsx("span",{className:"lbl-menu-item",children:"Our representative will contact you shortly."})]}),p.jsx("label",{className:"lbl-input-heading-1 ",children:"Reference ID : XXXXXXXXXX"})]}),p.jsx("div",{className:"done-btn",children:p.jsx("button",{className:"btn-primary done",onClick:()=>{e.onClick("Popup closed")},children:"Done"})})]})}),ly=e=>{let{details:a,rmDetails:l}=e,[t,i]=r.useState(!1),[n,o]=r.useState(""),s=()=>{i(!1)};return p.jsxs("div",{className:"contact-your-rm-dialog-base",children:[p.jsxs("div",{className:"manager-details",children:[p.jsx("img",{fetchPriority:"low",src:null==l?void 0:l.image,alt:"Relationship manager"}),p.jsxs("div",{className:"details-div",children:[p.jsx("div",{className:"lbl-txt-info-7 name",children:null==l?void 0:l.name}),p.jsx("div",{className:"lbl-content-smallheading designation",children:null==l?void 0:l.department})]})]}),p.jsxs("div",{className:"contact-details",children:[p.jsxs("div",{className:"email-details",children:[p.jsx("img",{fetchPriority:"low",src:null==a?void 0:a.mailIcon,alt:"mail icon"}),p.jsx("div",{className:"lbl-card-title-2 title",children:null==a?void 0:a.mailDesc}),p.jsx("div",{className:"lbl-error-txt-1 email",children:null==l?void 0:l.email}),p.jsxs("button",{className:"email-btn btn-outline-primary",onClick:()=>{let e=null==l?void 0:l.email;e?navigator.clipboard.writeText(e).then(()=>{o("Email copied to clipboard!")}).catch(e=>{}):o("Email address is not available")},children:[p.jsx("img",{fetchPriority:"low",src:null==a?void 0:a.mailUsCopyIcon,alt:"copy icon"}),null==a?void 0:a.mailUsBtnWeb]})]}),p.jsxs("div",{className:"phone-details",children:[p.jsx("img",{fetchPriority:"low",src:null==a?void 0:a.callBackIcon,alt:"call back icon"}),p.jsx("div",{className:"lbl-card-title-2 title",children:null==a?void 0:a.callBackTitle}),p.jsx("div",{className:"lbl-sub-heading description",children:null==a?void 0:a.callBackDesc}),p.jsx("div",{className:"button-div",children:p.jsx("button",{className:"btn-outline-primary",onClick:()=>e.onRequestCallback(),children:null==a?void 0:a.callBackBtn})})]})]}),t&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content filter-web-popup",onClose:s,content:p.jsx(lE,{onClick:s})}),p.jsx(v.CustomToast,{id:"contact-your-rm",className:"toast",message:n,position:"top-right",type:"default",theme:"light",autoClose:!0})]})},lS=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.CONTACT_YOUR_RM,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},lA=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.GET_RM_DETAILS,t=await ef(l,{"Content-Type":"application/json"},"");(null==t?void 0:t.status.toLowerCase())==="success"?a.success(t):a.default(t)},lj=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.REQUEST_RM,t={name:e.name,mobile:e.mobile,email:e.email},i=await ef(l,{"Content-Type":"application/json"},JSON.stringify(t));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},lT=e=>{let{details:a}=e;return p.jsxs("div",{className:"assign-rm-dialog-base",children:[p.jsx("img",{fetchPriority:"low",src:null==a?void 0:a.assignRmIcon,alt:"assign rm icon"}),p.jsx("div",{className:"lbl-txt-content description",children:null==a?void 0:a.assignRmDesc}),p.jsx("div",{className:"button-div",children:p.jsx("button",{className:"btn-primary assign-rm-btn",onClick:e.onRequestRMApiCall,children:null==a?void 0:a.assignRmBtn})})]})},lD=e=>{let[a,l]=r.useState([{imgSrc:"/assets/rating-star-unselected.svg"},{imgSrc:"/assets/rating-star-unselected.svg"},{imgSrc:"/assets/rating-star-unselected.svg"},{imgSrc:"/assets/rating-star-unselected.svg"},{imgSrc:"/assets/rating-star-unselected.svg"}]),t=e=>{let t=JSON.parse(JSON.stringify(a));l(t=t.map((a,l)=>l<=e?{...a,imgSrc:"/assets/rating-star-selected.svg"}:{...a,imgSrc:"/assets/rating-star-unselected.svg"}))};return p.jsxs("div",{className:"rating-dialog",children:[p.jsx("div",{className:"lbl-banner-sub-heading title",children:"Call Rating Your Experience"}),p.jsx("div",{className:"star-rating-div",children:a&&a.length?a.map((e,a)=>p.jsx("div",{children:p.jsx("img",{fetchPriority:"low",src:e.imgSrc,className:"cursor",onClick:()=>t(a),alt:"Rating star"})})):null}),p.jsxs("div",{className:"footer-holder",children:[p.jsx("button",{id:"succes-redirect",className:"btn-outline-primary",type:"button",onClick:e.onCloseCB,children:"Not Now"}),p.jsx("button",{id:"succes-redirect",className:"btn-primary",type:"button",onClick:()=>{},children:"Submit"})]})]})},lw=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.REQUEST_CALLBACK,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status.toLowerCase())==="success"?a.success(t):a.default(t)},lI=e=>{let[a,l]=r.useState(!1),[t,i]=r.useState(e.selectedCity),[n,o]=r.useState(e.selectedBranch),[s,c]=r.useState(null);return p.jsxs("div",{className:"ifsc-search",children:[p.jsxs("div",{className:"ifsc-search-module",children:[p.jsxs("div",{className:"ifsc-search-header-with-img",children:[p.jsx("img",{fetchPriority:"low",className:"search-ifsc-mobile",src:d.pathChanger("ifsc_search.svg"),alt:"Search ifsc ",width:25,height:25}),p.jsx("label",{className:"lbl-banner-sub-heading",children:"Search IFSC Code"})]}),p.jsx("div",{className:"line-zk-ifsc-search-popup"}),p.jsxs("div",{className:"ifsc-city-branch",children:[a&&t&&n&&s&&p.jsxs("div",{className:"hide-bank-name",children:[p.jsx("label",{className:"lbl-card-sub-title-14",children:"Bank Name : "}),p.jsx("label",{className:"lbl-banner-sub-heading",children:null==e?void 0:e.banknameifsc})]}),p.jsx("div",{className:"select-city",children:p.jsx(g.DefaultDropdown,{id:"taxResidentCountry",optionList:null==e?void 0:e.bankCityNames,className:"material-outlined-dropdown bank-acc-txtbx",label:"Select City",selectedOption:e.selectedCity,onSelectCB:a=>{let t="string"==typeof a?a:a.city;i(t),e.onSelectCity(t),l(!0)},hasClose:!0,isSupportSearch:!0})}),p.jsx("div",{className:"select-branch",children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown bank-acc-txtbx",optionList:e.bankBranchNames,label:"Select Branch",isSupportSearch:!0,selectedOption:e.selectedBranch,displayValueKey:"branch",onSelectCB:a=>{let t="string"==typeof a?a:a.branch;o(t),e.onSelectBranch(t),l(!0);let i=e.branchDetails.find(e=>e.branch===t);c(i?i.ifscCode:null)},hasClose:!0})}),a&&t&&n&&s&&p.jsx("div",{className:"hide-ifsc",children:p.jsxs("div",{className:"inner
1-ifsc",children:[p.jsx("label",{className:"lbl-card-sub-title-14",children:"IFSC Code :"}),p.jsx("label",{className:"lbl-banner-sub-heading",children:s})]})})]}),a&&t&&n&&s&&p.jsxs("div",{className:"selected-info",children:[p.jsxs("div",{className:"local-bankname",children:[p.jsx("label",{className:"lbl-txt-info-2",children:"Bank Name :"}),p.jsx("label",{className:"lbl-banner-sub-heading",children:null==e?void 0:e.banknameifsc})]}),p.jsxs("div",{className:"selected-ifsc",children:[p.jsx("label",{className:"lbl-txt-info-2",children:"IFSC Code"}),p.jsx("label",{className:"lbl-primary-txt-info3 ",children:s})]})]})]}),p.jsxs("div",{className:"btn-holder",children:[p.jsx("button",{id:"add-bank-account-cancel",className:"btn-outline-primary btn-save",onClick:()=>{e.onSelectCity(""),e.onSelectBranch(""),i(""),o(""),c(null),e.onSelectIfscCode(null),e.onCloseCB()},children:"Cancel"}),p.jsx("button",{id:"add-bank-account-save",className:"btn-primary btn-cancel ".concat(t&&n&&s?"":"btn-disabled"),onClick:a=>{e.onSelectIfscCode(s),e.handleSaveCB(a)},disabled:!t||!n||!s,children:"Confirm IFSC"})]})]})},l_=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.updateIfscGenerateOtp,t=await u.getBearerToken(),i={folio:e.folio};i.pageUrl="".concat(window.location.href,"?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale&utm_content=demo_content");let n=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(i));(null==n?void 0:n.status)==="success"?a.success(n):a.default(n)},lO=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.updateIfscVerifyOtp,t=await u.getBearerToken(),i={folio:e.folio,newIFSCCode:e.newIFSCCode,otp:e.otp,newCity:e.newCity,oldBankName:e.oldBankName,oldBankAccountType:e.oldBankAccountType,oldBankAcno:e.oldBankAcno,oldIFSCCode:e.oldIFSCCode,oldCity:e.oldCity,oldAddress1:e.oldAddress1,oldAddress2:e.oldAddress2,oldAddress3:e.oldAddress3,investorName:e.investorName,otpToken:e.otpToken,bankBranch:e.bankBranch},n=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(i));(null==n?void 0:n.status)==="success"?a.success(n):a.default(n)},lk=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.BankDetails,t=await u.getBearerToken(),i={folioNo:e.folioNo},n=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(i));return(null==n?void 0:n.status)==="success"?(a.success(n),{success:n}):(a.default(n),{default:n})},lR=e=>{let a=a=>{e.onChangeValueCB&&e.onChangeValueCB(a)};return p.jsx("div",{className:"service-folio-dropdown-content",children:e.optionList&&e.optionList.length?p.jsx(r.Fragment,{children:e.optionList.map(l=>{var t,i,n;let o=(null===(t=e.selectedOption)||void 0===t?void 0:t.accountNo)===l.accountNo;return p.jsx("div",{className:"option "+(o?"selected":""),onClick:()=>a(l),children:p.jsxs("div",{className:"name-row",children:[p.jsx("div",{className:"name",children:l.accountName+"-"+l.maskedBankAccNo}),p.jsx("div",{className:"folio-number",children:l.accountName+"-"+l.maskedBankAccNo}),(null===(i=e.selectedOption)||void 0===i?void 0:i.accountNo)===l.accountNo&&(null===(n=e.selectedOption)||void 0===n?void 0:n.accountName)===l.accountName?p.jsx("div",{className:"mark-icon",children:p.jsx("img",{fetchPriority:"low",src:"/assets/mark.svg",alt:"mark-icon"})}):null]})})})}):p.jsx("div",{className:"service-nodata-msg",children:"No data available"})})},lM=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.WHATSAPP_TERMS_AND_CONDITIONS,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},lL=e=>{let{htmlString:a}=e;return p.jsx("div",{dangerouslySetInnerHTML:{__html:a||""}})},lP=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.Banks.UpdateBank,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="Success"?a.success(i):a.default(i)},lF=e=>{let[a,l]=r.useState(!1),t=a=>{e.onChangeMenu(a)};return r.useEffect(()=>{let e=()=>{let e=window.innerWidth<=768;e!==a&&l(e)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[a]),p.jsxs("div",{className:"expense-ratio-header",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("h3",{className:"lbl-services-title",children:"Total Expense Ratio For Mutual Funds"})]}),a?p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{marginTop:"-12px"}
1,children:p.jsx(P,{menuList:ei,selectedMenu:e.selectedMenu,onChangeMenuCB:t})}),p.jsx("h2",{className:"lbl-menu-item",style:{marginTop:"14px"},children:"Check out the total expense ratio of mutual fund schemes at Axis MF."})]}):p.jsxs(p.Fragment,{children:[p.jsx("h2",{className:"lbl-menu-item",children:"Check out the total expense ratio of mutual fund schemes at Axis MF."}),p.jsx(P,{menuList:ei,selectedMenu:e.selectedMenu,onChangeMenuCB:t})]})]})},lB=async function(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",t=ey.SERVICE_URL+eS.EXPENSE_RATIO.GET_EXPENSE_RATIO_DETAILS,i=await ef(t,{"Content-Type":"application/json"},JSON.stringify(e));if(i.echo=l,(null==i?void 0:i.status)==="success")a.success(i);else{let e=i;e?e.echo=l:e={echo:l},a.default(e)}},lV=async function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=ey.SERVICE_URL+eS.EXPENSE_RATIO.GET_TOTAL_EXPENSE_RATIO,t=await ef(l,{"Content-Type":"application/json"},"");if(t.echo=a,(null==t?void 0:t.status)==="success")e.success(t);else{let l=null==t?void 0:t.error;l?l.echo=a:l={echo:a},e.default(l)}},lU=async function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=ey.SERVICE_URL+eS.EXPENSE_RATIO.TER_NOTICES,t=await ef(l,{"Content-Type":"application/json"},"");if(t.echo=a,(null==t?void 0:t.status)==="success")e.success(t);else{let l=null==t?void 0:t.error;l?l.echo=a:l={echo:a},e.default(l)}},lY=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.PLAN_OPTIONS_TER_DATA,t={schemeCode:a.code},i=await ef(l,{"Content-Type":"application/json"},JSON.stringify(t));(null==i?void 0:i.status)==="success"?e.success(i):e.default(i)},lG=e=>{var a,l,t,i,n,o;let[s,d]=r.useState([]),[c,v]=r.useState(!1),[h,b]=r.useState(""),[N,x]=r.useState(),[C,E]=r.useState({type:"",schemeType:"",scheme:"",planOption:"",fromDate:"",toDate:""}),[y,S]=r.useState(),[A,j]=r.useState({}),[T,D]=r.useState(!1),[w,I]=r.useState(!1),[O,R]=r.useState([]),[L,P]=r.useState(""),[F,B]=r.useState(""),[V,U]=r.useState(""),[Y,G]=r.useState(!1),z=768>u.useScreenWidth(),[H,K]=r.useState([]),[q,W]=r.useState([]),[Z,X]=r.useState(""),[Q,J]=r.useState(0),[$,ee]=r.useState("0"),[ea,el]=r.useState("Open ended"),[et,ei]=r.useState({name:"",index:0}),[es,er]=r.useState(""),[ed,ec]=r.useState(""),[eu,em]=r.useState({type:[{name:"",code:""}]}),[ev,ep]=r.useState([]),[eh,eg]=r.useState(!0),[eb,eN]=r.useState("All"),[ef,ex]=r.useState([]),[eC,eE]=r.useState("All"),[ey,eS]=r.useState(),[eA,ej]=r.useState(!1),[eT,eD]=r.useState(""),ew=u.useLoginContextData(),[eI,e_]=r.useState(""),[eO,ek]=r.useState(""),[eR,eM]=r.useState(null),[eL,eP]=r.useState(!0),[eB,eV]=r.useState(!0);r.useEffect(()=>{as()},[]),r.useEffect(()=>{if(e.terCategoryData&&e.schemeData){var a;let l=e.terCategoryData.value[0].schemeType||[];K(l),W(e.terCategoryData.value.map((e,a)=>({id:a.toString(),displayvalue:e.type}))),ei({name:l[0],index:0});let t=null===(a=e.schemeData)||void 0===a?void 0:a.schemeNames[0];er(null==t?void 0:t.schemeName),ec(null==t?void 0:t.schemeCode)}},[e.terCategoryData,e.schemeData]),r.useEffect(()=>{if(e.schemeData&&""!=et.name){let l;if(3!==Q){var a;l=null===(a=e.schemeData)||void 0===a?void 0:a.schemeNames.filter(e=>e.type===et.name&&e.schemeNature===ea).map(e=>e.schemeName)}else l=[];ep(["All",...l||[]]),er("All"),ec("All")}},[et.name,e.schemeData,Q,ea]),r.useEffect(()=>{let e=q.find(e=>e.id===String(Q));e?X(e.displayvalue):X("")},[Q,q]),r.useEffect(()=>{eH({code:ed})},[es]),r.useEffect(()=>{B(ar(new Date));let e=new Date;e.setFullYear(e.getFullYear()-30),U(ar(e))},[]);let eU=e=>{eG(en.type,null!=e?e:""),ee(null!=e?e:""),"0"===e?(J(0),el("Open ended")):"1"===e?(J(1),el("Close ended")):"2"===e?(J(2),el("Matured")):(J(3),el("All"))},eY=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C;eG(en.schemeType,e,a),ei({name:e,index:e4})},eG=function(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:C,t={...l};t[e]=a,E(t);let i=new Date,n=new Date(a.split("-").reverse().join("-"));if(e===en.fromDate||e===en.toDate){if(n>i){j({...A,[e]:eq.EXPENSE_RATIO.greaterThanToday});return}j({...A,[e]:""})}if(t.fromDate||t.toDate?t.fromDate?t.toDate?j({...A,[en.toDate]:""}):j({...A,[en.toDate]:eq.EXPENSE_RATIO.toDate}):j({...A,[en.toDate]:eq.EXPENSE_RATIO.fromDate}):j({...A,[en.toDate]:eq.EXPENSE_RATIO.selectDates}),t.fromDate&&t.toDate){let e=new Date(t.fromDate.split("-").reverse().join("-")),a=new Date(t.toDate.split("-").reverse().join("-"));e>a?j({...A,[en.fromDate]:eq.EXPENSE_RATIO.greterThanDate}):j({...A,[en.fromDate]:""}),a<e?j({...A,[en.toDate]:eq.EXPENSE_RATIO.earlierThanDate}):j({...A,[en.toDate]:""})}},ez=function(e){let a=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e.preventDefault(),eL||eB){if(eB){if(eL){let e=ao(eO,"From Date"),l=ao(eI,"To Date");if(eM(e),new Date(eF(eO))>new Date(eF(eI))){eM(eq.EXPENSE_RATIO.greterThanDate);return}if(ai(eO,eI)){eM("Please select a valid date");return}if(e||l)return;eL&&eB&&(a||v(an(eO)),eZ(a))}else eM(eq.EXPENSE_RATIO.fromDate)}else eM(eq.EXPENSE_RATIO.toDate)}else eM(eq.EXPENSE_RATIO.selectDates)},eH=e=>{eg(!0),lY({default:eK,success:eW},e)},eK=e=>{eg(!1)},eW=e=>{eg(!1),e.data.planNames.length>0&&(ex(e.data.planNames),eS(e.data.planNames))},eZ=e=>{eD(""),ej(!1),e?I(!0):D(!0),lB({type:q[Q].displayvalue,schemeCode:null!=ed?ed:"All",fundType:3!==Q?et.name:"All",planName:null!=eC?eC:"",fromDate:eO,toDate:eI},{default:e6,success:e9},e?eo.DOWNLOAD:eo.VIEW)},eX=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",[a,l,t]=e.replaceAll("/","-").split("-");return new Date(Number(t),Number(l)-1,Number(a)).getTime()},eQ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=e.toLowerCase();return a.includes("regular")?"Regular Plan":a.includes("direct")?"Direct Plan":a.includes("retail")?"Retail Plan":null},eJ=e=>{var a,l;
1return null!==(l=null!==(a=e.schemeName)&&void 0!==a?a:e.nameOfScheme)&&void 0!==l?l:""},e$=e=>{var a,l;return null!==(l=null!==(a=e.schemeCode)&&void 0!==a?a:e.nsdlSchemeCode)&&void 0!==l?l:""},e0=e=>{var a;return null!==(a=e.date)&&void 0!==a?a:""},e1=e=>{var a,l;return null!==(l=null!==(a=e.planOption)&&void 0!==a?a:e.planName)&&void 0!==l?l:""},e2=e=>{if(null==e||""===e)return"";let a=String(e);return a.includes("%")?a:"".concat(a)},e3=e=>{let a=new Map;return e.forEach(e=>{let l=e$(e),t=eJ(e),i=e0(e),n=eQ(e1(e));if(!n)return;let o="".concat(i,"__").concat(l,"__").concat(t);a.has(o)||a.set(o,{schemeCode:l,schemeName:t,date:i,plans:{}}),a.get(o).plans[n]=e}),Array.from(a.values()).sort((e,a)=>{let l=eX(a.date)-eX(e.date);return 0!==l?l:e.schemeName.localeCompare(a.schemeName)})},e9=e=>{var a,l,t,i,n,o,s,r,d,c,u,m,v,p,h,g,b;let N=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.totalExpenseRatioData;if(e.echo===eo.DOWNLOAD){if(null===(t=e.data)||void 0===t?void 0:null===(l=t.s3CsvResponse)||void 0===l?void 0:l.location){if(z){let a=document.createElement("a");a.href=e.data.s3CsvResponse.location,a.setAttribute("download",""),a.setAttribute("target","_blank"),a.setAttribute("rel","noopener noreferrer"),document.body.appendChild(a),a.click(),document.body.removeChild(a)}else window.open(null==e?void 0:null===(n=e.data)||void 0===n?void 0:null===(i=n.s3CsvResponse)||void 0===i?void 0:i.location,"_blank")}else eD((null===(o=e.data)||void 0===o?void 0:o.message)==="Data not available"?"No Data Found":null!==(c=null!==(d=null===(s=e.data)||void 0===s?void 0:s.message)&&void 0!==d?d:null===(r=e.data)||void 0===r?void 0:r.error)&&void 0!==c?c:""),ej(!0);I(!1);return}(null==N?void 0:N.length)?(P(null!==(m=null==e?void 0:null===(u=e.data)||void 0===u?void 0:u.title)&&void 0!==m?m:""),R(e3(N)),ej(!1),eD("")):(R([]),eD((null===(v=e.data)||void 0===v?void 0:v.message)==="Data not available"?"No Data Found":null!==(b=null!==(g=null===(p=e.data)||void 0===p?void 0:p.message)&&void 0!==g?g:null===(h=e.data)||void 0===h?void 0:h.error)&&void 0!==b?b:""),ej(!0)),D(!1)},e6=e=>{var a,l,t;eD(null!==(t=null!==(l=e.message)&&void 0!==l?l:null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.error)&&void 0!==t?t:""),ej(!0),e.echo===eo.DOWNLOAD?I(!1):D(!1)},e5=()=>{window.innerWidth<=768?G(!1):G(!0)};r.useEffect(()=>(e5(),window.addEventListener("resize",e5),()=>{window.removeEventListener("resize",e5)}),[]);let[e4,e8]=r.useState(0);r.useEffect(()=>{eI&&aa(eI)},[eI]),r.useEffect(()=>{eO&&ae(eO)},[eO]);let e7=e=>e.replace(/-/g,"/"),ae=e=>{var a,l;let t=""!==e;ek(e),eM("");let i=null!==(a=ao(e,"From Date"))&&void 0!==a?a:"",n=null!==(l=ao(eI,"To Date"))&&void 0!==l?l:"";t||eB?eB?t?new Date(eF(e))>new Date(eF(eI))?eM(eq.EXPENSE_RATIO.greterThanDate):ai(e,eI)?eM("Please select a valid date"):eI||e?i?eM(i):n?eM(n):eM(""):eM(eq.EXPENSE_RATIO.selectDates):eM(eq.EXPENSE_RATIO.fromDate):eM(eq.EXPENSE_RATIO.toDate):eM(eq.EXPENSE_RATIO.selectDates)},aa=e=>{var a,l;let t=""!==e;e_(e);let i=null!==(a=ao(eO,"From Date"))&&void 0!==a?a:"",n=null!==(l=ao(e,"To Date"))&&void 0!==l?l:"";eL||t?t?eL?new Date(eF(eO))>new Date(eF(e))?eM(eq.EXPENSE_RATIO.greterThanDate):ai(eO,e)?eM("Please select a valid date"):eO||e?i?eM(i):n?eM(n):eM(""):eM(eq.EXPENSE_RATIO.selectDates):eM(eq.EXPENSE_RATIO.fromDate):eM(eq.EXPENSE_RATIO.toDate):eM(eq.EXPENSE_RATIO.selectDates)};r.useEffect(()=>{al()},[eL,eB]);let al=()=>{if(eL&&eB&&new Date(eF(eO))>new Date(eF(eI))){eM(eq.EXPENSE_RATIO.greterThanDate);return}},at=new Date("2026-03-31"),ai=(e,a)=>{if(!e||!a)return!1;let l=new Date(eF(e)),t=new Date(eF(a));return l<=at&&t>at},an=e=>!!e&&new Date(eF(e))<=at,ao=(e,a)=>{let l=new Date(e.split("-").reverse().join("-")),t=new Date;return(l.setHours(0,0,0,0),t.setHours(0,0,0,0),e)?isNaN(l.getTime())?"Invalid ".concat(a," format."):l>t?"".concat(a," cannot be a future date."):null:"Please select ".concat(a,".")},as=()=>{let e=new Date;B(ar(e)),e_(ar(e)),ek(ar(new Date(e.getFullYear(),e.getMonth()-3,e.getDate())))},ar=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;if(e){let a=e=>(e<10?"0":"")+e;return a(e.getDate())+"-"+a(e.getMonth()+1)+"-"+e.getFullYear()}return""},ad=["Regular Plan","Direct Plan","Retail Plan"],ac=e=>{var a,l,t;return p.jsxs(p.Fragment,{children:[p.jsx("td",{children:e2(null!==(a=null==e?void 0:e.baseTer)&&void 0!==a?a:null==e?void 0:e.baseExpenseRatio)}),p.jsx("td",{children:e2(null==e?void 0:e.addExpenses2)}),p.jsx("td",{children:e2(null==e?void 0:e.addExpenses3)}),p.jsx("td",{children:e2(null!==(l=null==e?void 0:e.gst)&&void 0!==l?l:null==e?void 0:e.statutoryLevies)}),p.jsx("td",{children:e2(null!==(t=null==e?void 0:e.totalTER)&&void 0!==t?t:null==e?void 0:e.totalTer)})]})};return p.jsxs("div",{className:"expense-ratio-content",children:[p.jsx(m.Loader,{showLoader:eh}),p.jsxs("form",{className:"expense-ratio-form",onSubmit:ez,children:[p.jsxs("div",{className:"input-row type-input-row",children:[p.jsx("label",{className:"lbl-popup-content",children:"Select Type"}),p.jsx(k.SimpleRadio,{className:"simple-radio-tax-resident-radio expense-ratio-radio lbl-content-heading-3",list:null!=q?q:[],displayValueKey:"displayvalue",idKey:"id",selectedId:$,onChange:e=>eU(e)})]}),Y?3!==Q&&p.jsxs("div",{className:"scheme-type-section",children:[p.jsx("label",{className:"lbl-popup-content",children:"Select Scheme Type"}),p.jsx("div",{className:"buttons-list",children:null===(a=e.terCategoryData)||void 0===a?void 0:a.value[Q].schemeType.map((e,a)=>p.jsx("div",{className:"type-button ".concat(e4===a?"active":""),onClick:()=>{eY(e),e8(a)},children:e},a))})]}):3!==Q&&p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-row",optionList:null!==(n=null===(l=e.terCategoryData)||void 0===l?void 0:l.value[Q].schemeType)&&void 0!==n?n:[],displayValueKey:"schemeType",label:"Select Scheme Type",selectedOption:null!==(o=et.name)&&void 0!==o?o:{},onSelectCB:eY,isError:!!A[en.schemeType],errorMessage:A[en.schemeType],hasClose:!0}),p.jsxs("div",{className:"schem-type-plan-opt",children:[p.jsxs("div",{className:"scheme-plan",children:[p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-row",optionList:null!=ev?ev:[],displayValueKey:"schemeName",label:"Select Scheme",selectedOption:null!=es?es:{},onSelectCB:a=>
1{if(eG(en.scheme,a),"All"===a){er("All"),ec("All");return}if(a){var l,t;let i=null===(t=e.schemeData)||void 0===t?void 0:null===(l=t.schemeNames.find(e=>e.schemeName===a))||void 0===l?void 0:l.schemeCode;er(a),ec(i)}},isError:!!A[en.scheme],errorMessage:A[en.scheme],hasClose:!0,disabled:"All"===et.name||3===Q}),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-row",optionList:ef,dialogLabel:"Select Plan Option",label:"Select Plan Option",selectedOption:eb,onSelectCB:e=>{eE(e||""),eN(e||""),eG(en.planOption,e)},hasClose:!0})]}),p.jsxs("div",{className:"scheme-plan-dates",children:[p.jsx(M.MOutlinedCustomDatepicker,{className:"date-picker-default",allowUserInput:!1,dateSeparator:"-",dateFormat:"DD-MM-YYYY",minYear:1900,maxYear:new Date().getFullYear(),defaultDate:eO,isDisabled:!1,label:"From Date",highlightToday:!0,onComplete:e=>ae(e),isError:!!eR}),p.jsx(M.MOutlinedCustomDatepicker,{className:"date-picker-default",allowUserInput:!1,dateSeparator:"-",dateFormat:"DD-MM-YYYY",minYear:1900,maxYear:new Date().getFullYear(),defaultDate:eI,isDisabled:!eO,label:"To Date",highlightToday:!0,onComplete:e=>aa(e),isError:!!eR})]}),eR&&p.jsx("div",{className:"error-message ter-zk-error-margin",children:eR}),p.jsx("div",{className:"date-range-note-expense-ratio",children:"Note: Please select a date range either before 31-Mar-2026 or from 01-Apr-2026 onwards."})]}),p.jsxs("div",{className:"input-row btn-div",children:[p.jsx(f.ButtonWithLoader,{className:"btn-primary",value:"View Now",isLoading:T,type:"submit",disabled:!1,onClick:()=>{}}),p.jsx(f.ButtonWithLoader,{className:"btn-outline-primary download",value:"Download",isLoading:w,type:"button",onClick:a=>{var l;aD(ew,"Total Expense Ratio For Mutual Funds","Download",null==e?void 0:null===(l=e.terCategoryData)||void 0===l?void 0:l.title),ez(a,!0)},disabled:!1})]})]}),eA&&p.jsx("div",{className:"error-message",children:eT}),O.length?p.jsxs("div",{className:"ter-table-section",children:[p.jsx("div",{className:"data-heading lbl-popup-content",children:L.replace("All All","All")}),p.jsx("br",{}),p.jsx("div",{className:"ter-table-scroll",children:p.jsxs("table",{className:"ter-combined-table",children:[p.jsxs("thead",{children:[p.jsxs("tr",{children:[p.jsxs("th",{rowSpan:2,children:["NSDL",p.jsx("br",{}),"Scheme Code"]}),p.jsx("th",{rowSpan:2,children:"Name of Scheme"}),p.jsxs("th",{rowSpan:2,children:["Date",p.jsx("br",{}),p.jsx("span",{children:"(DD/MM/YYYY)"})]}),ad.map(e=>p.jsx("th",{colSpan:5,className:"ter-plan-header",children:e},e))]}),p.jsx("tr",{children:ad.map(e=>p.jsxs(r.Fragment,{children:[c?p.jsxs("th",{children:["Base TER ",p.jsx("span",{children:"(%)1"})]}):p.jsxs("th",{children:["Base Expense Ratio ",p.jsx("span",{children:"(BER) (%)1"})]}),c?p.jsxs("th",{children:["Additional expenses as per regulation 52(6A)(B) ",p.jsx("span",{children:"(%)2"})]}):p.jsxs("th",{children:["Brokerage Cost ",p.jsx("span",{children:"(%)2"})]}),c?p.jsxs("th",{children:["Additional expenses as per regulation 52(6A)(C) ",p.jsx("span",{children:"(%)3"})]}):p.jsxs("th",{children:["Transaction Cost incurred for the purpose of execution of trade ",p.jsx("span",{children:"(%)3"})]}),c?p.jsxs("th",{children:["GST ",p.jsx("span",{children:"(%)4"})]}):p.jsxs("th",{children:["Statutory Levies (including GST) ",p.jsx("span",{children:"(%)4"})]}),p.jsxs("th",{children:["Total TER ",p.jsx("span",{children:"(%)"})]})]},"".concat(e,"-columns")))})]}),p.jsx("tbody",{children:O.map((e,a)=>p.jsxs("tr",{children:[p.jsx("td",{children:e.schemeCode}),p.jsx("td",{children:e.schemeName}),p.jsx("td",{children:e7(e.date)}),ad.map(a=>p.jsx(r.Fragment,{children:ac(e.plans[a])},"".concat(e.date,"-").concat(e.schemeCode,"-").concat(a)))]},"".concat(e.date,"-").concat(e.schemeCode,"-").concat(e.schemeName,"-").concat(a)))})]})})]}):null,p.jsx("section",{className:"disclaimer-section lbl-text-content4",children:c?p.jsx(lL,{htmlString:null===(t=e.expenseRatioData)||void 0===t?void 0:t.disclaimerBeforeApr}):p.jsx(lL,{htmlString:null===(i=e.expenseRatioData)||void 0===i?void 0:i.disclaimer})}),p.jsx("div",{className:"downloadapp-container mobile-download-app",style:{marginLeft:z?"0px":"-18px"},children:p.jsx(_.DownloadAppLink,{})})]})},lz=async(e,a)=>{let l=ey.SERVICE_URL+eS.SERVICE.expenseRatioNotices,t={year:null==e?void 0:e.year,month:null==e?void 0:e.month},i=await ef(l,{"Content-Type":"application/json"},JSON.stringify(t));(null==i?void 0:i.status.toLowerCase())==="success"?a.success(i):a.default(i)},lH=e=>{let a=a=>{e.onChangeValueCB&&e.onChangeValueCB(a)};return p.jsx("div",{className:"service-folio-dropdown-content",children:e.optionList&&e.optionList.length?p.jsx(r.Fragment,{children:e.optionList.map(l=>{let t=e.selectedOption===l;return p.jsx("div",{className:"option "+(t?"selected":""),onClick:()=>a(l),children:p.jsxs("div",{className:"name-row",children:[p.jsx("div",{className:"name",children:l}),p.jsx("div",{className:"folio-number",children:l}),e.selectedOption===l?p.jsx("div",{className:"mark-icon",children:p.jsx("img",{fetchPriority:"low",src:"/assets/mark.svg",alt:"mark-icon"})}):null]})})})}):p.jsx("div",{className:"service-nodata-msg",children:"No data available"})})},lK=e=>{var a,l,t,i,n,o,s,c;let[m,v]=r.useState(""),[h,b]=r.useState(""),[f,x]=r.useState([]),[C,E]=r.useState(!1),[y,S]=r.useState(!1),[A,j]=r.useState(""),[T,D]=r.useState(0),w=u.useRootContextData(),I=r.useRef(null);r.useEffect(()=>{b(eh()),v(ep())},[]),r.useEffect(()=>{h&&m&&O()},[m,h]),r.useEffect(()=>{let e=I.current;if(!e||"undefined"==typeof MutationObserver)return;let a=e=>{let a=e.querySelector(".service-folio-dropdown-content"),l=e.querySelector(".service-folio-dropdown-content .option.selected");a&&l&&window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{window.getComputedStyle(a),window.getComputedStyle(e);let t=a.scrollHeight>a.clientHeight?a:e,i=t.getBoundingClientRect(),n=l.getBoundingClientRect().top-i.top+t.scrollTop;t.scrollTo({top:Math.max(n,0),behavior:"auto"})})})},l=e=>{let l=null;!(l=e.classList.contains("web-dropdown")?e:e.querySelector(".web-dropdown"))||l.classList.contains("hidden")||a(l)},t=new MutationObserver(e=>
1{e.forEach(e=>{"attributes"===e.type&&"class"===e.attributeName&&e.target instanceof HTMLElement&&l(e.target),"childList"===e.type&&e.addedNodes.forEach(e=>{e instanceof HTMLElement&&l(e)})})});return t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class"]}),()=>{t.disconnect()}},[]);let O=()=>{lz({year:m,month:h},{default:R,success:k})},k=e=>{var a,l,t,i,n;D(0),x([]),(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.notices)?x(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.notices):(j(null!==(n=null===(t=e.data)||void 0===t?void 0:t.message)&&void 0!==n?n:""),null===(i=w.triggerToast)||void 0===i||i.call(w,{message:"No TER Notices found",toastType:"error"}))},R=e=>{},M=e=>{v(null!=e?e:""),S(!1)},L=e=>{b(null!=e?e:""),E(!1)},P=e=>{window&&window.open(e,"_blank")},F=r.useMemo(()=>Math.ceil((null==f?void 0:f.length)/9),[null==f?void 0:f.length]),B=r.useMemo(()=>{let e=9*T;return null==f?void 0:f.slice(e,e+9)},[f,T]),V=(e,a)=>p.jsxs("div",{className:"pdf-card",children:[p.jsx("img",{fetchPriority:"low",src:d.pathChanger("pdf.svg"),alt:"Scheme PDF",width:"40",height:"40"}),p.jsxs("div",{className:"scheme-text-icon",children:[p.jsx("label",{className:"lbl-list-heading schemes-text",children:e.fileName}),p.jsx(N.ButtonWithIcon,{className:"download-btn",onClick:()=>P(null==e?void 0:e.fileUrl),iconposition:"center",icon:d.pathChanger("download.svg"),iconHeight:"14px",iconWidth:"14px"})]})]},"".concat(e.fileName,"-").concat(e.fileUrl,"-").concat(a));return p.jsx(p.Fragment,{children:p.jsxs("div",{className:"notices-content",ref:I,children:[p.jsxs("div",{className:"notices-selected-menu-option",children:[p.jsx(g.DefaultDropdown,{optionList:null!==(n=null===(a=e.noticesData)||void 0===a?void 0:a.year)&&void 0!==n?n:[],label:"Select Year",className:"material-outlined-dropdown update-dd",selectedOption:m,dialogLabel:"Select Year",onSelectCB:M,hasClose:!0,content:p.jsx(lH,{onChangeValueCB:M,optionList:null!==(o=null===(l=e.noticesData)||void 0===l?void 0:l.year)&&void 0!==o?o:[],selectedOption:m})}),p.jsx(g.DefaultDropdown,{optionList:null!==(s=null===(t=e.noticesData)||void 0===t?void 0:t.month)&&void 0!==s?s:[],label:"Select Month",className:"material-outlined-dropdown update-dd",selectedOption:h,dialogLabel:"Select Month",onSelectCB:L,hasClose:!0,content:p.jsx(lH,{onChangeValueCB:L,optionList:null!==(c=null===(i=e.noticesData)||void 0===i?void 0:i.month)&&void 0!==c?c:[],selectedOption:h})})]}),(null==f?void 0:f.length)>0?p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"desktop-notices-slider",children:[p.jsx("div",{className:"pdf-sec-ter web-pdf-sec-ter",children:null==B?void 0:B.map(V)}),F>1&&p.jsxs("div",{className:"notices-slider-navigation",children:[p.jsx("button",{type:"button",className:"notices-slider-arrow notices-slider-arrow-left",onClick:()=>{D(e=>Math.max(e-1,0))},disabled:0===T,"aria-label":"View previous notices",children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger(0===T?"dd_arrow_light.svg":"dd_arrow_dark.svg"),alt:"dd_arrow","aria-hidden":"true",className:"notices-slider-arrow-image ".concat(0===T?"":"notices-slider-arrow-rotate")})}),p.jsx("div",{className:"notices-slider-dots","aria-label":"Notice pages",children:Array.from({length:F}).map((e,a)=>p.jsx("button",{type:"button",className:"notices-slider-dot ".concat(T===a?"notices-slider-dot-active":""),onClick:()=>D(a),"aria-label":"View notice page ".concat(a+1),"aria-current":T===a?"page":void 0},"notice-page-".concat(a)))}),p.jsx("button",{type:"button",className:"notices-slider-arrow notices-slider-arrow-right",onClick:()=>{D(e=>Math.min(e+1,F-1))},disabled:T===F-1,"aria-label":"View next notices",children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger(T===F-1?"dd_arrow_light.svg":"dd_arrow_dark.svg"),alt:"dd_arrow","aria-hidden":"true",className:"notices-slider-arrow-image ".concat(T===F-1?"notices-slider-arrow-rotate":"")})})]})]}),p.jsx("div",{className:"mobile-notices-list",children:p.jsx("div",{className:"pdf-sec-ter",children:null==f?void 0:f.map(V)})})]}):"",p.jsx("div",{className:"downloadapp-container mobile-download-app",children:p.jsx(_.DownloadAppLink,{})})]})})},lq=e=>{let{advantageDetails:a}=e;return p.jsx("div",{className:"mandate-advatage-part",children:p.jsx("div",{className:"advantage-card-all",children:null==a?void 0:a.map((e,a)=>p.jsxs("div",{className:"cards-data",children:[p.jsx("div",{className:"img-size",children:p.jsx("img",{fetchPriority:"low",src:e.image,alt:"Advantage ".concat(a+1)})}),p.jsxs("div",{className:"card-into-container",children:[p.jsx("div",{className:"title lbl-list-heading",children:"".concat(e.text)}),p.jsx("label",{className:"lbl-primary-txt-content6",children:e.description})]})]},a))})})},lW=e=>{var a,l;return p.jsxs("div",{className:"madate-upi-flow-part",children:[p.jsx("div",{className:"madate-upi-flow",children:null==e?void 0:null===(a=e.details)||void 0===a?void 0:a.map((a,l)=>{var t,i;return p.jsxs("div",{className:"flow-card",children:[p.jsx("div",{className:"img-size",children:p.jsx("img",{fetchPriority:"low",src:null==a?void 0:a.image,alt:"Step ".concat(l+1)})}),p.jsx("div",{className:"title lbl-list-heading",children:null==a?void 0:a.text}),p.jsx("div",{className:"description",children:p.jsx("p",{className:"lbl-primary-txt-content6",children:null==a?void 0:a.description})}),l!==(null!==(i=null==e?void 0:null===(t=e.details)||void 0===t?void 0:t.length)&&void 0!==i?i:0)-1&&p.jsx("div",{className:"arror-img",children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger("e-flow-arrow.svg"),alt:"arrow"})})]},l)})}),p.jsx("div",{className:"register-btn",children:p.jsx(f.ButtonWithLoader,{className:"register-btn-sty btn-primary",value:null!==(l=null==e?void 0:e.emandateBtnTitle)&&void 0!==l?l:"",isLoading:!1,onClick:()=>{(null==e?void 0:e.handleRegisterBtn)&&(null==e||e.handleRegisterBtn())},disabled:!1})})]})},lZ=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.emandate,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},lX=e=>{var a,l,t,i,n,o,s,r,d,c;return p.jsxs("div",{className:"emandate-card",children:[p.jsxs("div",{className:"card-header",children:[p.jsxs("div",{className:"bank-info",children:[p.jsx("img",{fetchPriority:"low",src:null==e?void 0:null===(a=e.details)||void 0===a?void 0:a.bankLogo,alt:"AXIS Bank",className:"bank-logo"}
1),p.jsxs("div",{className:"bank-details",children:[p.jsx("div",{className:"lbl-list-heading",children:null==e?void 0:null===(l=e.details)||void 0===l?void 0:l.bankAccName}),p.jsx("div",{className:"lbl-input-heading",children:null==e?void 0:null===(t=e.details)||void 0===t?void 0:t.maskBankAccountNo})]})]}),p.jsx("button",{className:"lbl-info2",children:null==e?void 0:null===(i=e.details)||void 0===i?void 0:i.tag})]}),p.jsx("hr",{className:"divider"}),p.jsxs("div",{className:"card-footer",children:[p.jsxs("div",{className:"label-column",children:[p.jsxs("div",{className:"lbl-txt-content",children:[(null==e?void 0:null===(o=e.details)||void 0===o?void 0:null===(n=o.tag)||void 0===n?void 0:n.toLowerCase().includes("upi"))?"UPI Autopay Limi":"e- Mandate Limi","t"]}),p.jsx("div",{className:"lbl-txt-title",children:"â¹".concat((c=null!==(d=null==e?void 0:null===(s=e.details)||void 0===s?void 0:s.eamount)&&void 0!==d?d:"")?parseFloat(c).toLocaleString("en-IN",{minimumFractionDigits:0}):"")})]}),p.jsxs("div",{className:"label-column",children:[p.jsx("div",{className:"lbl-txt-content",children:"Expiry"}),p.jsx("div",{className:"lbl-txt-title",children:null==e?void 0:null===(r=e.details)||void 0===r?void 0:r.expiryDate})]})]})]})},lQ=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.Paymentservices.RegisteredEmandatesBanks,t=await eg(),i={method:e.method},n=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(i));(null==n?void 0:n.status)==="success"?a.success(n):a.default(n)},lJ=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.upiautopay,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},l$=e=>{var a,l,t;return p.jsx("div",{className:"register-bank-list",children:p.jsx("div",{className:"card-list",children:p.jsxs("div",{className:"card",children:[p.jsxs("div",{className:"left-radio-text",children:[p.jsx("div",{className:"rd-btn",children:p.jsx(k.SimpleRadio,{className:"simple-radio-tax-resident-radio expiry-date-select",idKey:"id",list:[{id:"0",name:"Yes"}],isDisabled:!1,displayValueKey:"displayValue",selectedId:e.index===e.selectedIndex&&(null==e?void 0:null===(a=e.details)||void 0===a?void 0:a.bankAccountverify)!=="N"?"0":"1",onChange:e.onChange})}),p.jsxs("div",{className:"bank-context",children:[p.jsx("label",{className:"lbl-card-tag-8",children:"".concat(e.details.bankName," ").concat((t=null!==(l=e.details.fullBankAccountNumber)&&void 0!==l?l:"")&&!(t.length<2)?"XX"+t.slice(-2):t)}),p.jsx("label",{className:"lbl-txt-info-4",children:e.details.bankAccountNo})]})]}),p.jsx("div",{className:"verified-logo",children:p.jsxs("div",{className:"img-text",children:[p.jsx("div",{className:"img-size",children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger("N"===e.details.bankAccountverify?"not-verified.svg":"verified-icon.svg"),alt:O.getAltText(d.pathChanger("N"===e.details.bankAccountverify?"not-verified.svg":"verified-icon.svg"))})}),p.jsx("div",{className:"content",children:p.jsx("p",{className:"lbl-txt-info",children:"N"===e.details.bankAccountverify?"Not Verified":"Verified"})})]})})]})})})},l0=e=>{var a,l,t,i,n,o,s,r,d,c,u,m,v;let h=null==e?void 0:null===(t=e.details)||void 0===t?void 0:null===(l=t.sucessMessage)||void 0===l?void 0:null===(a=l[0])||void 0===a?void 0:a.title,g=null==e?void 0:null===(o=e.details)||void 0===o?void 0:null===(n=o.sucessMessage)||void 0===n?void 0:null===(i=n[0])||void 0===i?void 0:i.imageUrl,b=null==e?void 0:null===(d=e.details)||void 0===d?void 0:null===(r=d.sucessMessage)||void 0===r?void 0:null===(s=r[0])||void 0===s?void 0:s.firstDescription,N=null==e?void 0:null===(m=e.details)||void 0===m?void 0:null===(u=m.sucessMessage)||void 0===u?void 0:null===(c=u[0])||void 0===c?void 0:c.secondDescription,f=null==e?void 0:null===(v=e.details)||void 0===v?void 0:v.ctaButton;return p.jsxs("div",{className:"register-success",children:[p.jsxs("div",{className:"data-div",children:[p.jsx("span",{className:"success-tick",children:p.jsx("img",{fetchPriority:"low",src:g,alt:"tick mark",className:"success-tick-gif"})}),p.jsx("label",{className:"lbl-txt-content5 success-title",children:null!=h?h:""})]}),p.jsx("label",{className:"lbl-txt-content txt-center info",children:null!=b?b:""}),p.jsx("div",{className:"ref-no",children:p.jsx("label",{className:"lbl-txt-content5",children:"UMR No : D65as6c6tyacg"})}),p.jsx("label",{className:"lbl-txt-content txt-center info",children:null!=N?N:""}),p.jsx("div",{className:"footer-holder",children:p.jsx("button",{id:"succes-redirect",className:"btn-primary",type:"button",onClick:()=>{eG("/dashboard")},children:null!=f?f:"Done"})})]})},l1=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.Paymentservices.NewRegisterEmandates,t=await eg(),i={startDate:e.startDate,date:e.date,amount:e.amount,method:e.method,receipt:e.receipt,bank:{bankName:e.bankName,bankAccountNo:e.bankAccountNo,bankAccType:e.bankAccType,bankIFSCCode:e.bankIFSCCode}},n=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(i));(null==n?void 0:n.statusCode)==="success"?a.success(n):a.default(n)}
1,l2=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.Paymentservices.emandatesBanks,t=await eg(),i={userId:e.userId},n=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(i));(null==n?void 0:n.status)==="success"?a.success(n):a.default(n)},l3=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.Paymentservices.TransactionStatus,t=await eg(),i={razorpay_payment_id:e.razorpay_payment_id,razorpay_order_id:e.razorpay_order_id,razorpay_signature:e.razorpay_signature,method:e.method,pageURL:e.pageURL,source:"WEB"},n=await ef(l,{Authorization:t,"Content-Type":"application/json"},JSON.stringify(i));(null==n?void 0:n.status)==="success"?a.success(n):a.default(n)},l9={EMANDATE:eb.RAZORPAY_KEY_EMANDATE},l6={EMANDATE:eb.RAZORPAY_KEY_UPIAUTOPAY},l5=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.VERIFY_OTP_EMAIL,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},l4=async e=>{let a=ey.SERVICE_URL+eS.SERVICE.WHATSAPP_SERVICE,l=await ef(a,{"Content-Type":"application/json"},"");(null==l?void 0:l.status)==="success"?e.success(l):e.default(l)},l8=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.GET_CONSENT_DETAILS,t=await u.getBearerToken(),i={consentType:"whatsapp/login - Tnc",pan:null==e?void 0:e.pan},n=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(i));(null==n?void 0:n.status)==="success"?a.success(n):a.default(n)},l7=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.INITIATE_OPT,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},te=async(e,a,l,t)=>{let i=ey.AGGREGATOR_URL+eS.SERVICE.CONFIRM_OTP,n=await u.getBearerToken(),o=await ef(i,{"Content-Type":"application/json",Authorization:"Bearer "+n},JSON.stringify({otp:a,token:e,pan:l}));(null==o?void 0:o.status)==="success"?t.success(o):t.default(o)},ta=async(e,a)=>{let l=ey.AGGREGATOR_URL+eS.SERVICE.UPDATE_CONSENT,t=await u.getBearerToken(),i=await ef(l,{"Content-Type":"application/json",Authorization:"Bearer "+t},JSON.stringify(e));(null==i?void 0:i.status)==="success"?a.success(i):a.default(i)},tl=e=>{let{type:a,goNext:l,setShowOptSuccessState:t}=e,i="opt-out"===a;return p.jsxs("div",{className:"service-success-dialog",children:[p.jsxs("div",{className:"data-div",children:[p.jsx("span",{children:p.jsx("img",{fetchPriority:"low",src:"/assets/tick-mark.gif",alt:"tick mark",className:"success-tick-gif"})}),p.jsx("label",{className:"lbl-ws-card-title-2",children:i?"You have successfully opt-out for Axis Mutual Fund Whatsapp Communications":"You have successfully opt-in for Axis Mutual Fund Whatsapp Communications"}),p.jsx("label",{className:"lbl-ws-menu-item",children:i?"Now you canât initiate transactions with Axis Mutual Fund through Whatsapp":"You can now initiate transactions with Axis Mutual Fund through Whatsapp"})]}),p.jsx("div",{className:"footer-holder footer-zk-holder",children:p.jsx("button",{id:"succes-redirect",className:"btn-primary btn-zk-padding-change",type:"button",onClick:l,children:"OK"})}),p.jsxs("div",{className:"lbl-ws-menu-item opt-footer-note",children:["Note : Please"," ",p.jsx("span",{className:"link",onClick:()=>{t(!1),eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.WHATSAPP_SERVICES)},children:"click here"})," ","to ",i?"opt-in":"opt-out"," for receiving Whatsapp Communications"]})]})},tt=[{id:"in",displayValue:"To Opt-in",apiKey:"Opt-in",disabled:!1},{id:"out",displayValue:"To Opt-Out",apiKey:"Opt-out",disabled:!1}],ti={DeemedOpt:"Deemed opt-in",optIn:"Opt-in",optOut:"Opt-out"};(n=s||(s={})).PAN="pan",n.MOBILE_NO="mobile_no";let tn=["Declarations/Confirmations","I hereby declare that I am an existing investor in the scheme(s) of Axis Mutual Fund.","I here declare that the details provided by me are true and correct.","I understand that the remuneration details (herein after referred to as 'data') provided are sensitive and personal and therefore is being furnished strictly for servicing my specific request for the same.","I understand that, no part of this data should be reproduced, shared, published, distributed, displayed, performed, copied or stored for public or private use in any information retrieval system, or transmitted in any form by any mechanical, photographic or electronic process, including electronically or digitally on the internet or world
1wide web, or over any network, or local area network.","I understand that, no part of this data should be modified or changed or exploited in any way, or used to construct any kind of database, or mirrored at any other location."],to=[{id:"bank_account",displayvalue:"Bank Account Number"},{id:"pan",displayvalue:"PAN Number"}],ts={pan:{REQUIRED:"Please Enter PAN Number",INVALID:"Please Enter a valid PAN Number"},bank_account:{REQUIRED:"Please Enter Bank Account Number",INVALID:"Please Enter a valid Bank Account Number"}},tr={FOLIO_REQUIRED:"Folio Number is Required",FOLIO_INVALID:"Enter a valid folio number.",VERIFICATION_REQUIRED:"Please select Verification Type",CONSENT_REQUIRED:"Please agree to the terms and conditions"},td=e=>{let[a,l]=r.useState({value:""}),[t,i]=r.useState({value:to[1].id}),[n,o]=r.useState({value:""}),[s,c]=r.useState(!1),[u,m]=r.useState(""),[v,h]=r.useState(!1),b="pan"===t.value,N=!!a.isValid&&!!t.value&&!!n.isValid&&s,x=async r=>{var d,c,u,v,p,g,N,f;r.preventDefault();let x="",C=b?"pan":"bank_account";if((null===(d=a.value)||void 0===d?void 0:d.trim())?a.isValid||(l(e=>({...e,errorMsg:tr.FOLIO_INVALID})),x||(x="folio-input")):(l(e=>({...e,errorMsg:tr.FOLIO_REQUIRED})),x||(x="folio-input")),t.value||(i(e=>({...e,errorMsg:tr.VERIFICATION_REQUIRED})),x||(x="verification-input")),(null===(c=n.value)||void 0===c?void 0:c.trim())?n.isValid||(o(e=>({...e,errorMsg:ts[C].INVALID})),x||(x="verify-input")):(o(e=>({...e,errorMsg:ts[C].REQUIRED})),x||(x="verify-input")),s||(m(tr.CONSENT_REQUIRED),x||(x="consent-input")),x){setTimeout(()=>{let e=document.getElementById(x);e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),e.focus())},0);return}h(!0);try{await (null==e?void 0:e.onsubmit({folio:null!==(g=null===(u=a.value)||void 0===u?void 0:u.trim())&&void 0!==g?g:"",pan:b&&null!==(N=null===(v=n.value)||void 0===v?void 0:v.trim())&&void 0!==N?N:"",bankAcNo:b?"":null!==(f=null===(p=n.value)||void 0===p?void 0:p.trim())&&void 0!==f?f:"",remunerationConsent:s?"Y":"N"}))}finally{h(!1)}};return p.jsx("section",{className:"remuneration-form-section",children:p.jsxs("form",{className:"remuneration-form",onSubmit:x,children:[p.jsxs("header",{className:"arrow-heading-wrapper",children:[p.jsx("img",{fetchPriority:"low",className:"img-arrow",src:d.pathChanger("backside-arrow.svg"),alt:"Back",onClick:()=>ez()}),p.jsx("h2",{className:"remuneration-form-heading",children:"Remuneration Form"})]}),p.jsxs("fieldset",{className:"remuneration-folio-details",children:[p.jsx("legend",{children:"Folio Details"}),p.jsxs("div",{className:"form-inputs",children:[p.jsx(j.MOutlinedTextBox,{id:"folio-input",className:"moutlined-txtbx-default unclaimed-form",disabled:!1,label:"Folio Number",value:a.value,onChange:e=>{if(!/^[0-9]*$/.test(e)||e.length>15)return;let a=e.length>=9&&e.length<=15;l({value:e,isValid:a,errorMsg:a?"":e.length>0?tr.FOLIO_INVALID:""})},onFocusOut:()=>{l(e=>e.value&&!e.isValid?{...e,errorMsg:tr.FOLIO_INVALID}:e)},isError:!!a.errorMsg,errorMessage:a.errorMsg,autoCapitalize:"none"}),p.jsx(g.DefaultDropdown,{id:"verification-input",label:"Select Verification Type",className:"material-outlined-dropdown",optionList:to,selectedOption:to.find(e=>e.id===t.value),displayValueKey:"displayvalue",dialogLabel:"Select Option",onSelectCB:e=>{var a;let l="string"==typeof e?e:null!==(a=null==e?void 0:e.id)&&void 0!==a?a:"";i({value:l,isValid:!!l,errorMsg:l?"":tr.VERIFICATION_REQUIRED}),o({value:""})},hasClose:!0,isError:!!t.errorMsg,errorMessage:t.errorMsg}),p.jsx(j.MOutlinedTextBox,{id:"verify-input",className:"moutlined-txtbx-default unclaimed-form",disabled:!1,label:b?"PAN Number":"Bank Account Number",value:n.value,onChange:e=>{if(b){if(/^[A-Z0-9]*$/.test(null==e?void 0:e.toUpperCase())&&(null==e?void 0:e.length)<=10){let a=e.toUpperCase(),l=/^([A-Z]){5}([0-9]){4}([A-Z]){1}$/.test(a);o({value:a,isValid:l,errorMsg:e?l?"":ts.pan.INVALID:""})}}else{if(!/^[0-9]*$/.test(e)||e.length>18)return;let a=e.length>=9&&e.length<=18;o({value:e,isValid:a,errorMsg:a?"":e.length>0?ts.bank_account.INVALID:""})}},onFocusOut:()=>{let e=b?"pan":"bank_account";o(a=>a.value&&!a.isValid?{...a,errorMsg:ts[e].INVALID}:a)},isError:!!n.errorMsg,errorMessage:n.errorMsg,maxLength:b?10:18,autoCapitalize:b?"characters":"none",inputMode:b?"text":"numeric"})]})]}),p.jsxs("div",{id:"consent-input",className:"remuneration-check-box",children:[p.jsx(A.ConsentInputCheckbox,{className:"condition-checkbox regular-consent-checkbox-terms_text",disabled:!1,isSelected:s,isError:!!u,title:p.jsx("span",{children:" I agree to the Aforesaid terms and conditions."}),onChange:()=>{let e=!s;c(e),m(e?"":tr.CONSENT_REQUIRED)}}),u&&p.jsx("div",{className:"lbl-error-txt",children:u})]}),p.jsx("section",{className:"remuneration-declarations",children:p.jsx("ol",{children:tn.map((e,a)=>p.jsx("li",{children:e},a))})}),p.jsx("footer",{className:"remuneration-submit-container",children:p.jsx(f.ButtonWithLoader,{id:"remuneration-form",className:"btn-primary",value:"Submit",type:"submit",isLoading:v,disabled:!N})})]})})},tc=async(e,a)=>{let l=ey.SERVICE_URL+eS.Remuneration.GENERATE_OTP,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},tu=async(e,a)=>{let l=ey.SERVICE_URL+eS.Remuneration.VERIFY_OTP,t=await ef(l,{"Content-Type":"application/json"},JSON.stringify(e));(null==t?void 0:t.status)==="success"?a.success(t):a.default(t)},tm=e=>{let{name:a,years:l,files:t,setRemunerationData:i,...n}=e;return p.jsxs("section",{className:"remuneration-data",children:[p.jsxs("header",{className:"arrow-heading-wrapper",children:[p.jsx("img",{fetchPriority:"low",className:"img-arrow",src:d.pathChanger("backside-arrow.svg"),alt:"Back",onClick:()=>i(null)}),p.jsx("h2",{className:"remuneration-data-heading",children:null!=a?a:"Remuneration"})]}),p.jsx("div",{className:"remuneration-data-container",children:null==t?void 0:t.map((e,a)=>p.jsxs(r.Fragment,{children:[p.jsx("p",{children:null==e?void 0:e.label}),p.jsx("img",{src:null==e?void 0:e.fileUrl,alt:"pdf-".concat(a+1)})]},a))})]})};a.ASK_QUERY_INPUTS=z,a.AccountStatementItemsModule=e=>{let[a,l]=r.useState("Account"),[t,i]=r.useState([]),[n,o]=r.useState([]),[s,c]=r.useState([]),[h,b]=r.useState("Folio Number"),[N,f]=r.useState([]),[C,E]=r.useState({folioNumber:"",folioName:"",schemeCount:"",bankAccountNumber:"",bankName:"",mobileNo:"",ivnName:"",emailId:""}),[y,S]=r.useState(!1),[A,T]=r.useState(""),[D,w]=r.useState({schemeId:"",sc
1hemeName:"",optionType:""}),[I,_]=r.useState(""),[O,R]=r.useState([]),[M,L]=r.useState(""),[P,F]=r.useState("Your request for Account Statement has been registered. You should receive your Statement at your registered email ID shortly"),[B,V]=r.useState([]),[Y,G]=r.useState({fromDate:"",toDate:""}),[,z]=r.useState(""),[,H]=r.useState(null),[K]=r.useState(""),[q,W]=r.useState(""),[Z,X]=r.useState(""),[J,$]=r.useState(!1),[ee,ea]=r.useState(""),et=u.useLoginContextData(),[ei,en]=r.useState(!1),[eo,es]=r.useState(""),[er,ed]=r.useState("default"),[ec,eu]=r.useState(!1),[em,ev]=r.useState(""),[ep,eh]=r.useState(""),[eg,eb]=r.useState(""),[eN,ef]=r.useState(!1),[ex,eC]=r.useState(!1),[eE,eA]=r.useState(""),[ej,eT]=r.useState([]),eD=u.useRootContextData(),ew=e=>/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/.test(e),eI=e=>/^[A-Z0-9]{1,15}$/.test(e);r.useEffect(()=>{var e,a,l,t,i,n,o;eK(),eX(null!==(t=et.loggedInUserDetails.pan)&&void 0!==t?t:""),R([{id:null!==(i=null===(e=et.loggedInUserDetails.pan)||void 0===e?void 0:e.toUpperCase())&&void 0!==i?i:"",displayName:null!==(n=null===(a=et.loggedInUserDetails.pan)||void 0===a?void 0:a.toUpperCase())&&void 0!==n?n:""}]),L(null!==(o=null===(l=et.loggedInUserDetails.pan)||void 0===l?void 0:l.toUpperCase())&&void 0!==o?o:""),eu(null==et?void 0:et.isUserLoggedIn())},[et]),r.useEffect(()=>{(null==C?void 0:C.folioNumber)&&e0(C.folioNumber)},[null==C?void 0:C.folioNumber]),r.useEffect(()=>{eR()},[Y]);let e_=()=>{b("Folio Number"),E({folioNumber:"",folioName:"",schemeCount:"",bankAccountNumber:"",bankName:"",mobileNo:"",ivnName:"",emailId:""}),w({schemeId:"",schemeName:"",optionType:""}),_(""),G({fromDate:"",toDate:""}),W(""),X(""),ev(""),eh(""),eb(""),eA(""),es("")},ek=e=>{E(e)},eR=()=>{let e=!0;return"Date Range"===I&&(eN&&ex?eN&&ex?Y&&"undefined--undefined"!==Y.fromDate&&"undefined--undefined"!==Y.toDate?new Date(Y.fromDate)>new Date(Y.toDate)?(X("From date should not be greater than To date."),e=!1):new Date(Y.fromDate).toDateString()===new Date().toDateString()?(X("From date cannot same as today's date."),e=!1):(X(""),e=!0):"undefined--undefined"===Y.fromDate&&"undefined--undefined"===Y.toDate?(X("Please select valid From Date and Select To Date"),e=!1):"undefined--undefined"===Y.fromDate?(X("Please select valid From Date "),e=!1):"undefined--undefined"===Y.toDate&&(X("Please select valid To Date"),e=!1):(X(""),e=!0):e=!1),e},eL=()=>{let e=!0;return ec&&(0===N.length||null===N?(eh(eq.SERVICES.SELECT_FOLIO),eb(eq.SERVICES.SELECT_SCHEME),e=!1):(eh(""),eb(""))),I?W(""):(W("Choose Time Period"),e=!1),"Date Range"===I&&(e=eR()),e},eP=e=>{if(W(""),X(""),_(e),"Current Financial Year"===e){let{fromDate:e,toDate:a}=eY(0,ec);G({fromDate:e,toDate:a})}else if("Previous Financial Year"===e){let{fromDate:e,toDate:a}=eY(1,ec);G({fromDate:e,toDate:a})}else"Since Investment"===e?G({fromDate:"",toDate:""}):"Date Range"===e&&G({fromDate:"",toDate:""})},eF=()=>{aN({default:eB,success:eV})},eB=e=>{},eV=e=>{let a=eO(e.data.serviceCentre,Q);(a=null==a?void 0:a.map(e=>{var a;let l=eM("Account Statement"===e.title?"Account Statements":null!==(a=e.title)&&void 0!==a?a:"");return l&&"Account Statement Guide"!==e.title&&"internal"==e.pageType&&(e.url=U[l]),e})).length=3,eT(a)},eU=e=>{let l=ej.find(e=>{var l;return null===(l=e.title)||void 0===l?void 0:l.includes(a)});return l?"title"===e?null==l?void 0:l.title:null==l?void 0:l.text:null},eY=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1?arguments[1]:void 0,l=new Date().getMonth(),t=new Date().getFullYear(),i=(l<3?t-1:t)-e,n=new Date(i,3,1),o=new Date(i+1,3,0),s=e=>{let l=e.getFullYear(),t=String(e.getMonth()+1).padStart(2,"0"),i=String(e.getDate()).padStart(2,"0");return a?"".concat(l,"-").concat(t,"-").concat(i):"".concat(t,"-").concat(i,"-").concat(l)};return{fromDate:s(n),toDate:s(o)}},ez=()=>"PAN Number"!==h?eE?eE.length<=15&&eI(eE)?(ev(""),{hasError:!1}):(ev(eq.SERVICES.VALID_USER_FOLIO),{hasError:!0}):(ev(eq.SERVICES.FOLIO_MANDATORY_ERROR),{hasError:!0}):eE?eE.length<10?(ev(eq.SERVICES.VALID_PAN),{hasError:!0}):10===eE.length?ew(eE)?(ev(""),{hasError:!1}):(ev(eq.SERVICES.VALID_PAN),{hasError:!0}):void 0:(ev(eq.SERVICES.PAN_MANDATORY_ERROR),{hasError:!0}),eH=e=>{let a=e.replace(/[^0-9]/g,"").toUpperCase().slice(0,20);return(eA(a),a)?a.length<14?(ev(eq.SERVICES.VALIDFOLIO),{hasError:!0}):a.length<=15&&eI(a)?(ev(""),{hasError:!1}):(ev(eq.SERVICES.VALID_USER_FOLIO),{hasError:!0}):(ev(eq.SERVICES.MANDATORY_ERROR),{hasError:!0})},eK=()=>{lr({default:eZ,success:eW})},eW=async a=>{var t,n,s;i(a.data.statement),o(a.data.timePeriod),c(a.data.category.map(e=>
1({id:e,displayName:e})));let r=window.location.pathname.split("/").pop(),d=await (null===(t=et.getLoginStatus)||void 0===t?void 0:t.call(et)),u=d&&"not-loggedin"!==d;u||("capitalgains"===r?(eG("/"),null===(n=et.triggerLogin)||void 0===n||n.call(et,!0,{successLoginCB:()=>eG("/servicecenter/accountstatement/capitalgains")})):"sttletter"===r&&(eG("/"),null===(s=et.triggerLogin)||void 0===s||s.call(et,!0,{successLoginCB:()=>eG("/servicecenter/accountstatement/sttletter")}))),u&&(null==e?void 0:e.isnewDashboard)&&("capitalgains"===r?eG("/servicecenter/accountstatement/capitalgains"):"sttletter"===r&&eG("/servicecenter/accountstatement/sttletter")),"accountstatement"===r?(l("Account"),F("Your request for Account Statement has been registered. You should receive your Statement at your registered email ID shortly")):"capitalgains"===r?(l("Capital Gain"),F("Your request for Capital Gain Statement has been registered. You should receive your Statement at your registered Email ID shortly")):"sttletter"===r&&(l("STT Letter"),F("Your request for STT Statement has been registered. You should receive your Statement at your registered Email ID shortly"))},eZ=e=>{},eX=e=>{0==N.length&&e&&(f([]),e$({default:eJ,success:eQ}))},eQ=e=>{let a=[];e.userFolios.map(e=>{let l={folioName:e.folioName,bankAccountNumber:e.bankAccountNumber,bankName:e.bankName,schemeCount:e.schemeCount,dispName:e.folioName+" /"+e.folioNumber+")",folioNumber:e.folioNumber,mobileNo:e.mobileNo,emailId:e.emailId,ivnName:e.ivnName};a.push(l)}),f(a),E(a[0])},eJ=e=>{},e0=async e=>{var a;V([]),await (null===(a=et.getLoggedinUserDetails)||void 0===a?void 0:a.call(et)),lc({folioId:e},{default:e2,success:e1})},e1=e=>{let a=[];if(!e||!e.data.schemeDetails)return;e.data.schemeDetails.map(e=>{let l={schemeId:e.schemeId,schemeName:e.schemeName,optionType:e.optionType};a.push(l)});let l=[{optionType:a.map(e=>e.optionType).join(","),schemeId:a.map(e=>e.schemeId).join(","),schemeName:"All"},...a];V(l),w(l[0])},e2=e=>{},e3=(e,a,l)=>{var t,i;T(e),en(!0);let n=null!==(t=null==l?void 0:l.fromDate)&&void 0!==t?t:Y.fromDate,o=null!==(i=null==l?void 0:l.toDate)&&void 0!==i?i:Y.toDate,s="";if("Account"===a)s=eS.SERVICE.ACCOUNT_STATEMENT;else if("Capital Gain"===a)s=eS.SERVICE.CAPITAL_GAIN;else{if("STT Letter"!==a)return;s=eS.SERVICE.STT}let r="".concat(ey.AGGREGATOR_URL).concat(s);ec?lv("PAN Number"===h?{folio:"0",scheme:D.schemeId,fromDate:n,toDate:o,smtpType:"email"==e?"E":"P"}:{folio:C.folioNumber,scheme:D.schemeId,fromDate:n,toDate:o,smtpType:"email"==e?"E":"P"},{success:"email"===e?e6:e9,default:e4},r):lh("PAN Number"===h?{email:"",folio:"",pan:eE,fromDate:Y.fromDate.replace(/-/g,"/"),toDate:Y.toDate.replace(/-/g,"/")}:{email:"",folio:eE,pan:"",fromDate:Y.fromDate.replace(/-/g,"/"),toDate:Y.toDate.replace(/-/g,"/")},{success:e5,default:e8})},e9=e=>{var l;"Account"===a&&window.notify_visitors.manual.onclick({notification:26998}),en(!1);let t=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.AccountStatement;if(t){es("");let e=atob(t),l=new Uint8Array(e.length);for(let a=0;a<e.length;a++)l[a]=e.charCodeAt(a);let i=new Blob([l],{type:"application/pdf"}),n=URL.createObjectURL(i),o=document.createElement("a");o.href=n,"Account"===a?o.download="Account-statement.pdf":"Capital Gain"===a?o.download="Capital-Gain-statement.pdf":"STT Letter"===a&&(o.download="STT-Letter-statement.pdf"),o.click(),setTimeout(()=>{URL.revokeObjectURL(n)},1e3)}else eD.triggerToast({message:el.NO_DATA_FOUND,toastType:"default"})},e6=e=>{"Account"===a&&window.notify_visitors.manual.onclick({notification:26998}),ea(e.msg),S(!0),en(!1)},e5=e=>{"No transactions available for the given Input"===e.msg?(ed("error"),es(e.msg)):(ea(e.msg),S(!0)),en(!1)},e4=e=>{var a;eD.triggerToast({message:null!==(a=e.msg)&&void 0!==a?a:"",toastType:"default"}),en(!1)},e8=e=>{var a;eD.triggerToast({message:null!==(a=e.message)&&void 0!==a?a:"",toastType:"default"}),en(!1)},e7=()=>new Promise(async(e,a)=>{lp(ec?{folioNo:C.folioNumber}:"PAN Number"===h?{folioNo:"",pan:eE}:{folioNo:eE},{success:l=>{var t,i;let n=null==l?void 0:null===(t=l.data)||void 0===t?void 0:t.startDate,o=null==l?void 0:null===(i=l.data)||void 0===i?void 0:i.endDate;n&&o?e({fromDate:n,toDate:o}):a(Error("Since Investment dates missing in response"))},default:e=>{a(e)}})}),ae=async e=>{aD(et,"".concat(eU("title")),e,a),es("");try{if("Since Investment"===I&&(!Y.fromDate||!Y.toDate)){en(!0);let l=await e7();return G(l),en(!1),e3(e,a,l)}
1if(ec){if(!eL())return;e3(e,a)}else{var l;!(null===(l=ez())||void 0===l?void 0:l.hasError)&&eL()&&e3("email",a)}}catch(e){en(!1),X("Unable to fetch Since Investment date range. Please try again.")}},aa=(e,a)=>{ef(e),eC(a)};return r.useEffect(()=>{},[eN,ex]),r.useEffect(()=>{eF()},[]),p.jsxs(r.Fragment,{children:[y&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content account-stmt-zk-nowrap",onClose:()=>S(!1),content:p.jsx(ay,{goNext:()=>{var e,a;(null==et?void 0:null===(e=et.isUserLoggedIn)||void 0===e?void 0:e.call(et))?(S(!1),eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.DASHBOARD)):(S(!1),null===(a=et.triggerLogin)||void 0===a||a.call(et,!0,{successLoginCB:()=>{eG("/dashboard")}}))},successData:P,secondButtonName:"Explore our schemes",buttonName:"Go to Dashboard",className:"account-statement-zk-popup",goCancel:()=>{S(!1),eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)}})}),p.jsxs("div",{className:"account-statement-module".concat((null==e?void 0:e.isnewDashboard)?" new-dashboard-statement":""),children:[p.jsxs("div",{className:"account-statement-inner",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[!(null==e?void 0:e.isnewDashboard)&&p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title ",children:eU("title")})]}),p.jsx("label",{className:"lbl-menu-item lbl-menu-item-sc-acct-stmt",children:eU("description")}),p.jsxs("div",{className:"Menu-card",children:[p.jsx(ld,{menuList:t,selectedMenu:a,onChangeMenuCB:t=>{var i,n;e.isnewDashboard&&a!==t&&e_(),"Account"===t?(l(t),e.isnewDashboard||eG(U.ACCOUNT_STATEMENTS)):"Capital Gain"===t?et.isUserLoggedIn()?(l(t),e.isnewDashboard||eG(U.CAPITAL_GAINS)):null==et||null===(i=et.triggerLogin)||void 0===i||i.call(et,!0,{successLoginCB:()=>{l(t),e.isnewDashboard||eG(U.CAPITAL_GAINS)}}):"STT Letter"!==t||(et.isUserLoggedIn()?(l(t),e.isnewDashboard||eG(U.STT_LETTER)):null==et||null===(n=et.triggerLogin)||void 0===n||n.call(et,!0,{successLoginCB:()=>{l(t),e.isnewDashboard||eG(U.STT_LETTER)}}))}}),p.jsx("div",{className:"Horizontal-line"})]}),p.jsxs("div",{className:"change-card-info",children:[p.jsx("label",{className:"lbl-list-heading",children:"Select Type"}),p.jsx(k.SimpleRadio,{className:"simple-radio-tax-resident-radio select-radio",list:s,idKey:"id",displayValueKey:"displayName",selectedId:h,onChange:e=>{if(b(e),!ec)return eA(""),ev(""),{hasError:!1}}}),p.jsxs("div",{className:"dd-row",children:["Folio Number"===h&&ec&&p.jsx("div",{className:"folio-dropdown",children:p.jsxs("div",{className:"row",children:[p.jsx(g.DefaultDropdown,{optionList:N,label:"Select Folio",className:"material-outlined-dropdown mpdd-folio",selectedOption:(null==C?void 0:C.folioNumber)+((null==C?void 0:C.folioName)?" ("+(null==C?void 0:C.folioName)+" )":""),dialogLabel:"Select Folio",hasClose:!0,onSelectCB:ek,displayValueKey:"dispName",isError:!!ep,errorMessage:ep,content:p.jsx(aj,{onChangeValueCB:ek,optionList:N,selectedOption:C})}),p.jsx(g.DefaultDropdown,{optionList:N,label:"Select Scheme",className:"material-outlined-dropdown mpdd-folio",selectedOption:D.schemeName,dialogLabel:"Select Scheme",onSelectCB:ek,hasClose:!0,displayValueKey:"schemeName",isError:!!eg,errorMessage:eg,disabled:e.isnewDashboard&&!C.folioNumber,content:p.jsx(lu,{onExistingFolioSelected:e=>{w(e)},existingUserfoliolist:B,selectedOption:D})})]})}),"Folio Number"===h&&!ec&&p.jsx("div",{className:"detail-form-inner",children:p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default pan-folio-field",disabled:!1,isError:!!em,label:"Folio Number",value:eE,onChange:e=>eH(e),errorMessage:em,onFocusOut:ez,onFocus:ez})}),"PAN Number"===h&&ec&&p.jsx("div",{className:"detail-form-inner",children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown pan-folio-field",label:"PAN Number",optionList:O,selectedOption:M,hasClose:!0,onSelectCB:e=>{L(e.id),z(e)},displayValueKey:"displayName"},"3")}),"PAN Number"===h&&!ec&&p.jsx("div",{className:"detail-form-inner",children:p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default pan-folio-field",disabled:!1,isError:!!em,label:"PAN Number",value:eE,onChange:e=>{let a=e.replace(/[^A-Za-z0-9]/g,"").toUpperCase().slice(0,10);return(eA(a),a)?a.length<10?(ev(eq.SERVICES.VALID_PAN),{hasError:!0}):10===a.length?ew(a)?(ev(""),{hasError:!1}):(ev(eq.SERVICES.VALID_PAN),{hasError:!0}):void 0:(ev(eq.SERVICES.PAN_MANDATORY_ERROR),{hasError:!0})},errorMessage:em,onFocusOut:ez,onFocus:ez})}),p.jsx("div",{className:"dd-display-mobile",children:p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown mpdd-period-change",label:"Cho
1ose Period",optionList:n,hasClose:!0,selectedOption:I,onSelectCB:e=>{let a;if(W(""),_(a="string"==typeof e?e:e&&"object"==typeof e&&e.displayName||""),"Current Financial Year"===a){let{fromDate:e,toDate:a}=eY(0,ec);G({fromDate:e,toDate:a})}else if("Previous Financial Year"===a){let{fromDate:e,toDate:a}=eY(1,ec);G({fromDate:e,toDate:a})}else G({fromDate:"",toDate:""})},displayValueKey:"displayName"},"3")})]}),p.jsxs("div",{className:"onactiononandoff",children:[p.jsx("div",{className:"onactiononandoff-row",children:n.map((e,a)=>p.jsx("div",{className:"actionperiod",onClick:()=>eP(e),children:p.jsx("button",{className:"".concat(I===e?"btn-primary":"btn-outline-primary"," onandoffaction"),children:e})},a))}),q&&p.jsx("div",{className:"error-message",children:q}),"Date Range"===I&&p.jsx("div",{className:"date-picker-container",children:p.jsx(lm,{onDateChange:(e,a)=>{G({fromDate:e,toDate:a})},onHandleFromTodate:(e,a)=>aa(e,a)})}),Z&&p.jsx("div",{className:"error-message",children:Z})]}),J&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content",isFloating:!0,showHeader:!1,onClose:()=>$(!1),content:p.jsx(ay,{goNext:()=>{$(!1)},successData:ee})})]})]}),p.jsxs("div",{className:"btn-row-for-accout",children:[!ec&&p.jsx("button",{className:"btn-primary submit-btn",onClick:()=>ae("Submit"),children:"Submit"}),ec&&p.jsxs(p.Fragment,{children:["Folio Number"===h&&p.jsx("button",{className:"btn-outline-primary submit-btn",onClick:()=>ae("download"),children:"Download"}),p.jsx("button",{className:"btn-primary submit-btn",onClick:()=>{ae("email")},children:"Email"})]})]}),p.jsx(v.CustomToast,{id:"mf-simple-toast",message:eo,limit:3,autoClose:!0,autoCloseDelay:5e3,type:er}),p.jsx(m.Loader,{showLoader:ei})]})]})},a.AccountStatementModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState(!1),[o,s]=r.useState("");r.useEffect(()=>{c()},[]);let c=()=>{aN({default:u,success:m})},u=e=>{},m=e=>{let l=eO(e.data.serviceCentre,Q);a(l=null==l?void 0:l.map(e=>{var a,l;let t=eM("Account Statement"===e.title?"Account Statements":null!==(a=e.title)&&void 0!==a?a:"");return t&&"Account Statement Guide"!==e.title&&"internal"==e.pageType&&(null===(l=e.title)||void 0===l||l.toLowerCase().replace(/\s+/g,""),e.url=U[t]),e})),t(ek(e.data.serviceCentre,Q)),s(eR(e.data.serviceCentre,Q))},v=()=>{window.innerWidth<=768?n(!1):n(!0)};return r.useEffect(()=>(v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}),[]),p.jsxs("div",{className:"update-folio-module",children:[p.jsxs("div",{className:"Acct-statement-header-label-div",children:[p.jsxs("div",{className:"title-warapper",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:o})]}),p.jsx("label",{className:"lbl-menu-item",children:l})]}),p.jsx("div",{className:"update-folio-module-inner",children:p.jsx(ax,{list:e,categoryName:"Account Statement"})}),i&&p.jsx("div",{className:"downloadapp-container"})]})},a.AddBankAccountDetailsModule=()=>{var e,a,l,t,i,n,o,s,c;let[v,h]=r.useState({folioNumber:"",folioName:"",schemeCount:"",bankAccountNumber:"",bankName:"",mobileNo:"",ivnName:"",emailId:""}),[b,N]=r.useState(!1),[f,C]=r.useState([]),[E,y]=r.useState({ifscCode:"",bankName:"",accountNo:"",confirmAccNo:"",accountTypeSelect:"SAVINGS"}),[S,T]=r.useState({ifscCode:"",bankName:"",accountNo:"",confirmAccNo:""}),[w,_]=r.useState(!1),[O,k]=r.useState([]),[R,M]=r.useState(""),[L,P]=r.useState(void 0),[F,B]=r.useState(void 0),[V,U]=r.useState(void 0),[Y,G]=r.useState(!1),[z,H]=r.useState(""),[K,q]=r.useState(""),[W,Z]=r.useState(""),[X,Q]=r.useState(!1),[J,$]=r.useState(""),[ee,ea]=r.useState(!1),[el,et]=r.useState(!1),ei=u.useLoginContextData(),[en,eo]=r.useState({bankName:!0,bankCode:"",city:""}),[es,er]=r.useState({bankCode:"",bankName:"",branch:"",branchAddress:"",microCode:"",branchCity:"",branchDistrict:"",branchState:"",contact:"",bankIcon:""}),ed=ei.isUserLoggedIn()||ei.isUserSoftLoggedIn()?"post login journey":"pre login journey",ec=null!==(a=null===(e=ei.loggedInUserDetails)||void 0===e?void 0:e.user_type)&&void 0!==a?a:"na",[eu,em]=r.useState({bank:{bankName:"",bankCode:""},city:"",branch:{branch:"",ifscCode:""}}),[ev,ep]=r.useState(""),[eh,eg]=r.useState([]),[eb,eN]=r.useState(null),ef=u.useRootContextData(),[ex,eC]=r.useState(!1),[eE,ey]=r.useState(""),[eS,eA]=r.useState(""),[ej,eT]=r.useState(""),[eD,ew]=r.useState(""),[eI,e_]=r.useState(!1),[eO,ek]=r.useState(""),[eR,eM]=r.useState(""),[eL,eP]=r.useState([]),[eF,eB]=r.useState(""),[eU,eY]=r.useState(""),[eH,eK]=r.useState(""),eW=["SAVINGS","CURRENT"],[eZ,eX]=r.useState(!1),eQ=r.useRef(null),eJ=r.useRef(null),[e0,e1]=r.useState("No File Chosen"),[e2,e3]=r.useState(""),[e9,e6]=r.useState(!1),[e5,e4]=r.useState(""),[e8,e7]=r.useState("No File Chosen"),[ae,aa]=r.useState(""),[al,at]=r.useState(""),[ai,an]=r.useState({oldBank:"",oldBranch:"",oldBankIfsc:"",oldBankAccNo:"",oldAccountType:"",oldBankChequeType:"",oldBankCheque:""}),ao=!!e5&&!!al;function as(e){var a;
1return null!==(a=({"image/jpg":"jpg","image/jpeg":"jpeg","application/pdf":"pdf","image/png":"png"})[e])&&void 0!==a?a:e}let ar=async e=>{var a;let l=null===(a=e.target.files)||void 0===a?void 0:a[0];if(l){if(!["application/pdf","image/jpeg","image/jpg","image/png"].includes(l.type)){alert("Please select a valid file (PDF, JPG, JPEG, PNG).");return}if(l.size>2097152){alert("File size must be less than 2 MB.");return}e7(l.name),aa(l.type);let e=new FileReader;e.onloadend=()=>{e.result&&at(e.result)},e.readAsDataURL(l)}};r.useEffect(()=>{a0(),ad(),aO(),aY(),P([]),B([])},[]);let ad=async()=>{var e;e_(!0);let a=await (null==ei?void 0:null===(e=ei.getLoggedinUserDetails)||void 0===e?void 0:e.call(ei));await Promise.allSettled([new Promise(e=>{e$({default:a=>{e()},success:a=>{av(a),e()}})}),new Promise(e=>{var l;aw({userId:null!==(l=null==a?void 0:a.pan)&&void 0!==l?l:""},{default:am,success:au}),e()}),new Promise(e=>{lt({default:a=>{e()},success:a=>{aM(a),e()}})})]),e_(!1)};r.useEffect(()=>{(null==v?void 0:v.folioNumber)&&(null==eL?void 0:eL.length)>0&&ac()},[null==v?void 0:v.folioNumber,eL]),r.useEffect(()=>{e1("No File Chosen"),e3(""),e4(""),e7("No File Chosen"),aa(""),at(""),Q(!1),eQ.current&&(eQ.current.value=""),eJ.current&&(eJ.current.value="")},[null==v?void 0:v.folioNumber]);let ac=()=>{var e,a;let l=eL.find(e=>e.folioNo===(null==v?void 0:v.folioNumber)),t=null==l?void 0:null===(a=l.primaryApplicantDetails)||void 0===a?void 0:null===(e=a.occupationDetails)||void 0===e?void 0:e.taxCategory;eB(null!=t?t:"undefined")},au=e=>{eP(e.folioList.map(e=>e.folioDetails))},am=e=>{},av=async e=>{let a=[];e.userFolios.map(e=>{let l={folioName:e.folioName,bankAccountNumber:e.bankAccountNumber,bankName:e.bankName,schemeCount:e.schemeCount,dispName:e.folioName+" /"+e.folioNumber+")",folioNumber:e.folioNumber,mobileNo:e.mobileNo,emailId:e.emailId,ivnName:e.ivnName};a.push(l)}),C(a);let l=await d.SessionStorage.instance.profileFolioNumber.get(),t=l?JSON.parse(l):null;if(sessionStorage.removeItem("profileFolioNumber"),t&&(null==t?void 0:t.behaviour)=="add-bank"){let e=a.find(e=>e.folioNumber==(null==t?void 0:t.folioNo));e&&h(e);return}h(a[0])},ap=e=>{T(a=>({...a,...e}))},ah=(e,a)=>{y(l=>({...l,[e]:a}))},ag=(e,a)=>{if(" "==a)return;let l="";switch(e){case"ifscCode":l=a.replace(/[^a-zA-Z0-9]/gi,"").replace(/^\s+/,"").toUpperCase(),ea(!1),l.length<=11?(ap(aE("ifscCode",l)),ah("ifscCode",l),11===l.length&&(ap({ifscCode:""}),eX(!1),aA(l))):ap(aE("ifscCode",l));break;case"accountNo":(l=a.replace(/[^0-9]/gi,"").replace(/^\s+/,"")).length<=18&&(l.length<5?ap({accountNo:eq.SERVICES.ACCOUNT_NUMBER_ERROR}):ap({accountNo:""}),18===l.length&&ap({accountNo:""}),ah("accountNo",l));break;case"confirmAccNo":(l=a.replace(/[^0-9]/gi,"").replace(/^\s+/,"")).length<=18&&(l.length<5?ap({confirmAccNo:eq.SERVICES.ACCOUNT_NUMBER_ERROR}):l!=E.accountNo?ap({confirmAccNo:eq.SERVICES.ACCOUNTNUM_MISMATCH_ERROR}):ap({confirmAccNo:""}),ah("confirmAccNo",l));break;case"accountTypeSelect":ah("accountTypeSelect",a);break;case"bankName":0==a.length?ap({bankNames:"Bank Name ".concat(eq.SERVICES.IS_MANDATORY_ERROR)}):ap({bankNames:""}),ah("bankName",l=a.replace(/[^A-Za-z]/g,"").replace(/^\s+/,""));break;default:return}},ab=e=>{_(e)},aN=e=>{var a,l,t,i;0===f.length||null===f?ep(eq.SERVICES.SELECT_FOLIO):ep("");let n={ifscCode:/^[A-Z]{4}0[A-Z0-9]{6}$/,accountNo:/^[0-9]*$/,confirmAccNo:/^[0-9]*$/},o={};for(let[a,l]of Object.entries(e)){let e=null==l?void 0:l.trim();e?"accountNo"===a?e.length<5&&(o[a]=eq.SERVICES.ACCOUNT_NUMBER_ERROR):"confirmAccNo"===a?e.length<5&&(o[a]=eq.SERVICES.ACCOUNT_NUMBER_ERROR):""!=e&&"ifscCode"===a?e.length<11?(o[a]="IFSC Code should be 11 characters, First 4 characters should be alphabets, Fifth character should be zero & 6-11th characters can be numbers or alphabets",eX(!0)):(null==n?void 0:n[a])==void 0||(null==n?void 0:null===(i=n[a])||void 0===i?void 0:i.test(e))||(o[a]="Invalid IFSC Code",eX(!1)):""==e||(null==n?void 0:n[a])==void 0||(null==n?void 0:null===(t=n[a])||void 0===t?void 0:t.test(e))||(o[a]="".concat(af(a)," ").concat(eq.SERVICES.NOT_VALID_ER
1ROR)):o[a]="".concat(af(a)," ").concat(eq.SERVICES.IS_MANDATORY_ERROR)}return""!=e.accountNo&&""!=e.confirmAccNo&&e.confirmAccNo.length>5&&(null===(a=e.accountNo)||void 0===a?void 0:a.trim())!==(null===(l=e.confirmAccNo)||void 0===l?void 0:l.trim())&&(o.confirmAccNo=eq.SERVICES.ACCOUNTNUM_MISMATCH_ERROR),!(0!=Object.values(o).length&&Object.values(o).every(e=>""!=e))||(ap(o),!1)},af=e=>({ifscCode:"IFSC code",bankName:"Bank name",accountNo:"Account number",confirmAccNo:"Confirm account number",accountTypeSelect:"Account Type"})[e],ax=e=>{switch(e){case"ifscCode":let a=aE("ifscCode",null==E?void 0:E.ifscCode);a.ifscCode?ap(a):aA(null==E?void 0:E.ifscCode);break;case"accountNo":ap(aE("accountNo",null==E?void 0:E.accountNo));break;case"confirmAccNo":ap(aE("confirmAccNo",null==E?void 0:E.confirmAccNo))}},aE=(e,a)=>{var l,t,i,n,o;let s={ifscCode:/^[A-Z]{4}0[A-Z0-9]{6}$/,accountNo:/^[0-9]*$/,confirmAccNo:/^[0-9]*$/},r=null==a?void 0:a.trim(),d="";return r?""!=r&&"ifscCode"===e?r.length<11?(d="IFSC Code should be 11 characters, First 4 characters should be alphabets, Fifth character should be zero & 6-11th characters can be numbers or alphabets",eX(!0)):(null==s?void 0:s[e])==void 0||(null==s?void 0:null===(t=s[e])||void 0===t?void 0:t.test(r))||(d="Invalid IFSC Code",eX(!1)):""==r||(null==s?void 0:s[e])==void 0||(null==s?void 0:null===(l=s[e])||void 0===l?void 0:l.test(r))||(d="".concat(af(e)," ").concat(eq.SERVICES.NOT_VALID_ERROR," ")):(d="".concat(af(e)," ").concat(eq.SERVICES.IS_MANDATORY_ERROR),"ifscCode"===e&&eX(!1)),"confirmAccNo"==e&&((null==E?void 0:E.confirmAccNo)!=""&&""!=r&&(null==E?void 0:null===(i=E.confirmAccNo)||void 0===i?void 0:i.length)<5?d=eq.SERVICES.ACCOUNT_NUMBER_ERROR:(null==E?void 0:E.accountNo)!=""&&""!=r&&(null==E?void 0:null===(n=E.accountNo)||void 0===n?void 0:n.trim())!==(null==r?void 0:r.trim())&&(d=eq.SERVICES.ACCOUNTNUM_MISMATCH_ERROR)),"accountNo"==e&&(null==E?void 0:E.accountNo)!=""&&""!=r&&(null==E?void 0:null===(o=E.accountNo)||void 0===o?void 0:o.length)<5&&(d=eq.SERVICES.ACCOUNT_NUMBER_ERROR),{[e]:d}},ay=e=>{h(e),aS(),em({bank:{bankName:"",bankCode:""},city:"",branch:{branch:"",ifscCode:""}}),y({ifscCode:"",bankName:"",accountNo:"",confirmAccNo:"",accountTypeSelect:"SAVINGS"}),_(!1)};r.useEffect(()=>{ao&&eK("")},[ao]),r.useEffect(()=>{var e;let a=eL.find(e=>e.folioNo===(null==v?void 0:v.folioNumber)),l=null==a?void 0:null===(e=a.bank)||void 0===e?void 0:e.find(e=>"Y"===e.defaultBank);an(e=>({...e,oldBank:(null==l?void 0:l.bankName)||"",oldBranch:(null==l?void 0:l.branch)||"",oldBankIfsc:(null==l?void 0:l.ifsc)||"",oldBankAccNo:(null==l?void 0:l.accountNumber)||"",oldAccountType:(null==l?void 0:l.accountType)||""}))},[eL,null==v?void 0:v.folioNumber]),r.useEffect(()=>{aS()},[eh]);let aS=()=>{let e=eh&&(null==eh?void 0:eh.find(e=>(null==e?void 0:e.folio)==v.folioNumber));e?eN(e.addBankFlag):eN(null)},aA=e=>{ah("ifscCode",e),a8({ifscCode:e},{default:aI,success:a_})},aI=e=>{ap({ifscCode:"Branch details not found"})},a_=e=>{var a,l,t,i,n,o,s,r,d,c,u,m,v,p,h,g;let b=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.branchDetails;(null==b?void 0:b.length)===0||null==b?ap({ifscCode:"Invalid IFSC Code"}):ap({ifscCode:"",bankName:""}),ah("bankName",null==b?void 0:null===(l=b[0])||void 0===l?void 0:l.bankName),em({bank:{bankName:null===(t=b[0])||void 0===t?void 0:t.bankName,bankCode:null===(i=b[0])||void 0===i?void 0:i.bankCode},city:null===(n=b[0])||void 0===n?void 0:n.branchCity,branch:{branch:null===(o=b[0])||void 0===o?void 0:o.branch,ifscCode:E.ifscCode}}),er({bankCode:null===(s=b[0])||void 0===s?void 0:s.bankCode,bankName:null===(r=b[0])||void 0===r?void 0:r.bankName,branch:null===(d=b[0])||void 0===d?void 0:d.branch,branchAddress:null===(c=b[0])||void 0===c?void 0:c.branchAddress,microCode:null===(u=b[0])||void 0===u?void 0:u.microCode,branchCity:null===(m=b[0])||void 0===m?void 0:m.branchCity,branchDistrict:null===(v=b[0])||void 0===v?void 0:v.branchDistrict,branchState:null===(p=b[0])||void 0===p?void 0:p.branchState,contact:null===(h=b[0])||void 0===h?void 0:h.contact,bankIcon:null===(g=b[0])||void 0===g?void 0:g.bankIcon}),ea(!0)},aO=()=>{aC({default:aR,success:ak})},ak=e=>{var a,l,t,i,n;k(null===(a=e.data)||void 0===a?void 0:a.bankAccount.accountType),M(null===(l=e.data)||void 0===l?void 0:l.bankAccount.accountType[0]);let o=null===(t=e.data)||void 0===t?void 0:t.bankAccount.disclaimer;q(o="".concat(null==o?void 0:o.split(",")[0]," <a href=").concat(null===(i=e.data)||void 0===i?void 0:i.bankAccount.clickHere,' target="_blank rel="noopener noreferrer" class="click-zk-here-link" aria-label="Click here for more details">').concat(null==o?void 0:o.split(",")[1],"</a>")),Z(null===(n=e.data)||void 0===n?void 0:n.bankAccount.clickHere)}
1,aR=e=>{},aM=e=>{eg(e.data.folioList)},aL=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];e_(!0);let a={folio:null==v?void 0:v.folioNumber};a.pageUrl="".concat(window.location.href,"?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale&utm_content=demo_content"),li(a,{default:aP,success:a=>aF(a,e)})},aP=e=>{if((null==e?void 0:e.statusCode)==="EC017"){e_(!1),e6(!0);return}if(e){var a,l;null===(a=ef.triggerToast)||void 0===a||a.call(ef,{message:null!==(l=null==e?void 0:e.message)&&void 0!==l?l:"",toastType:"error"})}e_(!1)},aF=(e,a)=>{if(null==e?void 0:e.data){var l,t,i,n,o,s,r;eC(!0),eT(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.validateToken),ew(null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.otp),ek(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.mobile),eM(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.email);let d=a?"OTP Resent successfully":null!==(r=null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.message)&&void 0!==r?r:"";null===(s=ef.triggerToast)||void 0===s||s.call(ef,{message:d,toastType:"success"})}e_(!1)},aB=async()=>{var e,a,l,t,i,n,o;let s=await (null==ei?void 0:null===(e=ei.getLoggedinUserDetails)||void 0===e?void 0:e.call(ei));e_(!0),ln({otp:eE,otpToken:ej,folio:v.folioNumber,mobile:null==s?void 0:s.phone_number,investorName:null==s?void 0:s.user_name,oldBankIfsc:ai.oldBankIfsc,oldBankAccNo:ai.oldBankAccNo,oldAccountType:ai.oldAccountType,oldBankChequeType:as(e2),oldBankCheque:e5,newAccountType:null!=R?R:"",newBankAccNo:E.accountNo,newBankIfsc:null==E?void 0:E.ifscCode,newBankChequeType:as(ae),newBankCheque:al,defaultBank:"false",newBankName:null!==(t=null==eu?void 0:null===(a=eu.bank)||void 0===a?void 0:a.bankName)&&void 0!==t?t:null==es?void 0:es.bankName,newBankAddress:null==es?void 0:es.branchAddress,newBankCity:null!==(i=null==eu?void 0:eu.city)&&void 0!==i?i:null==es?void 0:es.branchCity,newBankState:null==es?void 0:es.branchState,newBankBranch:null!==(n=null==eu?void 0:null===(l=eu.branch)||void 0===l?void 0:l.branch)&&void 0!==n?n:null==es?void 0:es.branch,newBankCode:null!==(o=null==eu?void 0:eu.bankCode)&&void 0!==o?o:null==es?void 0:es.bankCode},{default:aV,success:aU})},aV=e=>{var a,l,t;e_(!1),(null==e?void 0:null===(a=e.msg)||void 0===a?void 0:a.includes("attempts Remaining"))?eC(!0):eC(!1),e&&(null===(l=ef.triggerToast)||void 0===l||l.call(ef,{message:null!==(t=null==e?void 0:e.msg)&&void 0!==t?t:"",toastType:"error"}))},aU=e=>{if(e_(!1),null==e?void 0:e.data){var a;H(null==e?void 0:e.msg),eA(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.refNo),G(!0)}},aY=()=>{a7({default:aG,success:az})},aG=e=>{P([])},az=e=>{P(e.data.bankNames)},aH=e=>{la({bankCode:e},{default:aK,success:aq})},aK=e=>{eo(e=>({...e,bankCode:""}))},aq=e=>{B(e.data.cityNames)},aW=e=>{ll(e,{default:aZ,success:aX})},aZ=e=>{var a;ap({ifscCode:null!==(a=e.message)&&void 0!==a?a:""}),eo(e=>({...e,city:"",bankCode:""}))},aX=e=>{var a;U(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.branchDetails)},aQ=()=>{G(!1),aS(),em({bank:{bankName:"",bankCode:""},city:"",branch:{branch:"",ifscCode:""}}),y({ifscCode:"",bankName:"",accountNo:"",confirmAccNo:"",accountTypeSelect:"SAVINGS"}),_(!1),Q(!1),e1("No File Chosen"),e3(""),e4(""),e7("No File Chosen"),aa(""),at("")},[aJ,a$]=r.useState(),a0=async()=>{var e,a,l,t;e_(!0);let i=await (null===(e=ei.getLoggedinUserDetails)||void 0===e?void 0:e.call(ei));null==i||i.pan;let n=await u.placeGetPageSpecificInfo({pan:null!==(a=null==i?void 0:i.pan)&&void 0!==a?a:"",pageName:"PortfolioProfile",pageUrl:window.location.href,journeyId:"",journeyName:"",source:""});n.success?(e_(!1),(null==n?void 0:null===(l=n.success)||void 0===l?void 0:l.data)&&a$(null==n?void 0:null===(t=n.success)||void 0===t?void 0:t.data)):n.default};return p.jsxs(r.Fragment,{children:[p.jsx(m.Loader,{showLoader:eI}),p.jsxs("div",{className:"add-bank-account-details",children:[p.jsxs("div",{className:"add-bank-account-sec",children:[p.jsxs("div",{className:"title-section",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title title",children:"Add Bank Account Details"})]}),p.jsxs("label",{className:"lbl-sub-heading info",children:[" ","Disclaimer : Please provide your bank details through which you will make payment for schemes. Also please note the bank account will be linked to your folio for all future transactions."]})]}),p.jsx("div",{className:"folio-dropdown-div",children:p.jsx(g.DefaultDropdown,{optionList:f,label:"Select Folio",className:"material-outlined-dropdown",selectedOption:(null==v?void 0:v.folioNumber)+((null==v?void 0:v.folioName)?" ("+(null==v?void 0:v.folioName)+" )":""),dialogLabel:"Select Folio",onSelectCB:ay,displayValueKey:"dispName",hasClose:!0,isError:!!ev,errorMessage:ev,dialogNote:"Folios with contact details updated in last 48 hours are not allowed to add bank, please try again later.",content:p.jsx(aj,{onChangeValueCB:ay,optionList:f,selectedOption:v})})}),0===f.length&&p.jsx("div",{className:"lbl-menu-item empty-info-row-sc",style:{paddingLeft:"24px",fontSize:"16px",marginTop:"30px"},children:"No folio is selected"}),p.jsxs("section",{className:"add-bank-username-section",children:[p.jsx("h3",{className:"username-section-title",children:"User Name"}),p.jsx("h2",{className:"username-section-name",children:null==aJ?void 0:aJ.name})]}),f.length>
10&&p.jsxs("div",{className:"new-bank-details",children:[p.jsx("div",{className:"title",children:"New Bank Details"}),p.jsx("div",{className:"account-section",children:p.jsxs("div",{className:"content-holder",children:[p.jsxs("div",{className:"row",children:[p.jsxs("div",{className:"ifsc-code-input-section ".concat(eZ?"ifsc-zk-code-input-section":""),children:[p.jsx(j.MOutlinedTextBox,{id:"ifscCode",className:"moutlined-txtbx-default bank-acc-txtbx lbl-bold-input-value",disabled:!1,isError:!!S.ifscCode,value:null!==(l=null==E?void 0:E.ifscCode)&&void 0!==l?l:"",errorMessage:S.ifscCode,label:"IFSC Code",onChange:e=>ag("ifscCode",e),onFocusOut:()=>ax("ifscCode")}),p.jsx("label",{className:"lbl-primary-txt-content search-ifsc-btn",onClick:()=>ab(!0),children:"Search IFSC"})]}),p.jsx(j.MOutlinedTextBox,{id:"bankName",className:"moutlined-txtbx-default bank-acc-txtbx bank-acc-nametxtbx lbl-bold-input-value",disabled:!0,isError:!!S.bankName,errorMessage:S.bankName,value:null!==(t=null==E?void 0:E.bankName)&&void 0!==t?t:"",label:"Bank Name",onChange:e=>ag("bankName",e),onFocusOut:()=>ax("bankName")})]}),p.jsxs("div",{className:"row",children:[p.jsx(j.MOutlinedTextBox,{id:"accountNo",className:"moutlined-txtbx-default bank-acc-txtbx lbl-bold-input-value",disabled:!1,isError:!!S.accountNo,errorMessage:S.accountNo,value:null!==(i=null==E?void 0:E.accountNo)&&void 0!==i?i:"",type:"password",label:"Account Number",inputMode:"numeric",onChange:e=>ag("accountNo",e),disableCopyPaste:!0,onFocusOut:()=>ax("accountNo")}),p.jsx(j.MOutlinedTextBox,{id:"confirmAccNo",className:"moutlined-txtbx-default bank-acc-txtbx lbl-bold-input-value",disabled:!1,isError:!!S.confirmAccNo,errorMessage:S.confirmAccNo,value:null!==(n=null==E?void 0:E.confirmAccNo)&&void 0!==n?n:"",label:"Confirm Account Number",onChange:e=>ag("confirmAccNo",e),inputMode:"numeric",disableCopyPaste:!0,onFocusOut:()=>ax("confirmAccNo")}),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown account-type-field",label:"Account type",optionList:O,selectedOption:R,hasClose:!0,onSelectCB:e=>{M(e),"RESIDENT INDIAN"!==eF||eW.includes(e)?(M(e),eY("")):eY("Only Savings or Current account types are allowed for Resident Indians.")},displayValueKey:"displayName",isError:!!eU,errorMessage:null!=eU?eU:""},"3")]})]})})]}),p.jsxs("div",{className:"upload-wrapper",children:[p.jsxs("div",{className:"upload-wrapper-p",children:[p.jsxs("p",{className:"upload-heading",children:["Upload Bank account proof (any one) :",p.jsxs("span",{className:"upload-note",children:[" ","Supported Format: .pdf, .jpg, .jpeg, .png (file size < 2 MB)."]})," ",p.jsxs("span",{className:"upload-note-pp-na",children:[" ","Please note that passwordâprotected files will not be accepted and will be rejected."]})]}),p.jsx("p",{className:"upload-note-b",children:"Any one of Statement of Account, Colored scanned cheque or First page of passbook along with transaction pages covering the last 3 months."}),p.jsx("hr",{className:"upload-wrapper-divider"}),p.jsxs("div",{className:"upload-boxes",children:[p.jsxs("div",{className:"upload-box-wrapper",children:[p.jsxs("div",{className:"upload-default-bank",children:[p.jsxs("p",{className:"upload-default-bank-name",children:["Default Bank - ",ai.oldBank]}),p.jsxs("p",{className:"upload-default-bank-no",children:["A/C - ",ai.oldBankAccNo]})]}),p.jsxs("div",{className:"upload-box",children:[p.jsx("button",{className:"choose-btn",onClick:()=>{var e;return null===(e=eQ.current)||void 0===e?void 0:e.click()},children:"Upload Document"}),p.jsxs("span",{className:"file-name",children:[e0.substring(0,30),e0.length>31?"...":""]}),p.jsx("input",{type:"file",accept:".pdf,image/jpeg,image/jpg,image/png",onChange:e=>{var a,l,t,i;let n=null===(a=e.target.files)||void 0===a?void 0:a[0];if(n){let a=n.type,o=null==n?void 0:null===(i=n.name)||void 0===i?void 0:null===(t=i.split("."))||void 0===t?void 0:null===(l=t.pop())||void 0===l?void 0:l.toLowerCase();if(!["application/pdf","image/jpeg","image/jpg","image/png"].includes(a)||!["jpg","jpeg","png","pdf"].includes(null!=o?o:"")){alert("Please select a valid file (PDF, JPG, JPEG, PNG)."),e.target.value="";return}if(n.size>2097152){alert("File size must be less than 2 MB."),e.target.value="";return}e1(n.name),e3(n.type);let s=new FileReader;s.onloadend=()=>{s.result&&e4(s.result)},s.readAsDataURL(n)}},style:{display:"none"},ref:eQ})]})]}),p.jsxs("div",{className:"upload-box-wrapper",children:[p.jsxs("div",{className:"upload-default-bank",children:[p.jsxs("p",{className:"upload-default-bank-name",children:["New Bank - ",null!==(o=null==E?void 0:E.bankName)&&void 0!==o?o:""]}),p.jsxs("p",{className:"upload-default-bank-no",children:["A/C - ",(null==E?void 0:E.accountNo)===E.confirmAccNo&&null!==E.confirmAccNo?E.confirmAccNo:""]})]}),p.jsxs("div",{className:"upload-box",children:[p.jsx("button",{className:"choose-btn",onClick:()=>{var e;return null===(e=eJ.current)||void 0===e?void 0:e.click()},children:"Upload Document"}),p.jsxs("span",{className:"file-name",children:[e8.substring(0,30),e8.length>31?"...":""]}),p.jsx("input",{type:"file",accept:".pdf,image/jpeg,image/jpg,image/png",onCh
1ange:ar,style:{display:"none"},ref:eJ})]})]})]}),eH?p.jsx("div",{className:"error-zk-document-upload",children:eH}):null]}),!ao&&p.jsx("div",{className:"upload-wrapper-error",children:"Both documents are required to proceed"})]}),p.jsxs("div",{className:"des-btns",children:[p.jsx(A.ConsentInputCheckbox,{className:"reg-consent-checkbox-agree-all regular-consent-checkbox-acceptcheckbox",disabled:!1,isError:!1,isSelected:X,title:K?p.jsx("div",{className:"service-center-add-bank-terms-cond",dangerouslySetInnerHTML:{__html:K}}):"I / We confirm that the subscription to units is made through my bank account / joint account where first account holder is one of the joint account holders of the bank account. For details on possible NAV allotment basis Payment Methods and Banks,\xa0Click here.",onChange:()=>{Q(!X),X||$("")}}),J?p.jsx("div",{className:"error-zk-terms-add-bank",children:J}):"",p.jsxs("div",{className:"btn-holder",children:[p.jsx("button",{id:"add-bank-account-cancel",className:"btn-outline-primary btn-cancel",onClick:()=>{aD(ei,"Add Bank Account Details","Cancel","NA"),y({ifscCode:"",bankName:"",accountNo:"",confirmAccNo:"",accountTypeSelect:""}),ap({ifscCode:"",bankName:"",accountNo:"",confirmAccNo:""}),ez()},children:"Cancel"}),p.jsx("button",{id:"add-bank-account-submit",className:"btn-primary btn-add",onClick:()=>{aD(ei,"Add Bank Account Details","Add Bank","NA"),X?$(""):$("Terms and conditions should be checked");let e=aN(E);if("RESIDENT INDIAN"!==eF||eW.includes(null!=R?R:"")?(M(R),eY("")):eY("Only Savings or Current account types are allowed for Resident Indians."),ao&&(eK(""),e&&X&&!eU)){var a;aL(!1);let e={page_section:null!==(a=eV())&&void 0!==a?a:"",page_sub_section:"update_folio",cta_name:"Submit",category:"Add Bank Account Details",flow_name:ed,user_type:ec};d.GoogleAnalytics.recordEvent(d.GoogleAnalyticEvents.ServiceCentre.ButtonClick(e))}},children:"Add Bank"})]})]})]}),w?p.jsx(x.OverlayPopup,{className:"dialog-popup-content ifsc-zk-search-popup-changes-add-bank",showHeader:!1,isFloating:!1,showCloseOption:!1,onClose:()=>_(!1),content:p.jsx(le,{bankData:L,handleSelectBankDetailsCB:(e,a)=>{switch(a){case"bank":em(l=>{var t,i;return{...l,[a]:{...l[a],bankName:null!==(t=null==e?void 0:e.bankName)&&void 0!==t?t:"",bankCode:null!==(i=null==e?void 0:e.bankCode)&&void 0!==i?i:""},city:"",branch:{branch:"",ifscCode:""}}});break;case"city":em(l=>({...l,[a]:e,branch:{branch:"",ifscCode:""}}));break;case"branch":em(l=>{var t,i;return{...l,[a]:{...l[a],branch:null!==(t=null==e?void 0:e.branch)&&void 0!==t?t:"",ifscCode:null!==(i=null==e?void 0:e.ifscCode)&&void 0!==i?i:""}}});break;default:return}},selectedBankDetails:eu,handleGetBankDetailsCB:(e,a,l)=>{switch(e){case"bankName":en.bankName&&(aY(),eo(e=>({...e,bankName:!1})));break;case"city":""!=a&&a!=en.bankCode&&(aH(a),eo(e=>({...e,bankCode:a})));break;case"branch":""!=l&&""!=a&&(l!=en.city||a!=en.bankCode)&&(aW({bankCode:a,branchCity:l}),eo(e=>({...e,city:l,bankCode:a})));break;default:return}},bankCityNames:F,bankBranchNames:V,handleSaveCB:e=>{var a;e.preventDefault();let l=null==eu?void 0:null===(a=eu.branch)||void 0===a?void 0:a.ifscCode;""!=l&&(ah("ifscCode",l),aA(l),ab(!1))},onCloseCB:()=>{em({bank:{bankName:"",bankCode:""},city:"",branch:{branch:"",ifscCode:""}}),_(!1)}})}):null,ex&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content remove-top-borader-spec",isFloating:!0,showHeader:!0,onClose:()=>{eC(!1)},content:p.jsx(D.VerifyOTPPopup,{onResend:()=>{ey(""),aL(!0)},errormessage:"",mobileNumber:null!==(s=(null==v?void 0:v.mobileNo)||null)&&void 0!==s?s:eO,onOtpChange:e=>{ey(e)},onVerify:()=>{aB(),ey(""),eC(!1)},emailId:null!==(c=(null==v?void 0:v.emailId)||null)&&void 0!==c?c:eR})}),e9&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content show-lock-debit-freeze-fund-popup-content show-lock-debit-freeze-fund-popup-content-email-mobile",showHeader:!0,isFloating:!1,title:"Account Freezed",onClose:()=>{e6(!1)},content:p.jsx(I.FundLokPopupDialog,{})}),Y&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content service-center-success-popup-add-bank",showHeader:!1,isFloating:!0,onClose:()=>aQ(),showCloseOption:!1,content:p.jsx(aT,{title:"Your bank details have been submitted successfully.",subTitle:"Your request has been received and is currently under verification. You will be notified once the verification is complete",description:"Reference ID : ".concat(eS),shouldShowButtons:!0,secondaryButtonText:"Go to Dashboard",primaryButtonText:"Explore our schemes",onClickPrimaryButton:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)},onClickSecondaryButton:()=>{aQ(),eG("/dashboard")}})})]})]})}
1,a.ERROR_MESSAGES=el,a.EmandateUpiAutopayDetailsModule=()=>{var e,a,l,t,i,n,o,s,c,v,h,b,N,C,E,y,A;let[T,D]=r.useState(!1),[w,I]=r.useState(),[_,O]=r.useState(),[k,R]=r.useState((null==w?void 0:w.mandateExpiry.includes("Until Cancelled"))?"Until Cancelled":null!==(c=null==w?void 0:w.mandateExpiry[0])&&void 0!==c?c:""),M=()=>{let e=new Date,a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},[P,F]=r.useState(M()),[B,V]=r.useState("â¹1,00,000"),[U,G]=r.useState([]),z=u.useLoginContextData(),[H,K]=r.useState(0),[q,W]=r.useState(""),[Z,X]=r.useState(""),[Q,J]=r.useState(),[$,ee]=r.useState(!1),ea={firstName:null!==(v=null==z?void 0:null===(e=z.loggedInUserDetails)||void 0===e?void 0:e.first_name)&&void 0!==v?v:"",lastName:null!==(h=null==z?void 0:null===(a=z.loggedInUserDetails)||void 0===a?void 0:a.last_name)&&void 0!==h?h:"",email:null!==(b=null==z?void 0:null===(l=z.loggedInUserDetails)||void 0===l?void 0:l.email)&&void 0!==b?b:"",phone:null!==(N=null==z?void 0:null===(t=z.loggedInUserDetails)||void 0===t?void 0:t.phone_number)&&void 0!==N?N:"",pan:null!==(C=null==z?void 0:null===(i=z.loggedInUserDetails)||void 0===i?void 0:i.pan)&&void 0!==C?C:"",token:null!==(E=null==z?void 0:null===(n=z.loggedInUserDetails)||void 0===n?void 0:n.token)&&void 0!==E?E:"",clientId:null!==(y=null==z?void 0:null===(o=z.loggedInUserDetails)||void 0===o?void 0:o.client_id)&&void 0!==y?y:""},[el,et]=r.useState(0),ei=el<=768,{Razorpay:en}=L.useRazorpay(),[eo,es]=r.useState(!1),er=u.useRootContextData(),[ed,ec]=r.useState((null===(s=U[0])||void 0===s?void 0:s.bankAccountverify)!=="N"),eu=r.useRef(0);r.useEffect(()=>{es(!0),eh(),F(ef)},[]),r.useEffect(()=>{var e,a;et(null===(e=window)||void 0===e?void 0:e.innerWidth);let l=()=>{var e;return et(null===(e=window)||void 0===e?void 0:e.innerWidth)};return null===(a=window)||void 0===a||a.addEventListener("resize",l),()=>{var e;null===(e=window)||void 0===e||e.removeEventListener("resize",l)}},[]),r.useEffect(()=>{var e,a,l;(null==z?void 0:null===(e=z.loggedInUserDetails)||void 0===e?void 0:e.email)!==void 0&&(null==z?void 0:null===(a=z.loggedInUserDetails)||void 0===a?void 0:a.email)!==""&&eu.current<2&&(em({userId:(null==z?void 0:null===(l=z.loggedInUserDetails)||void 0===l?void 0:l.email)||""}),eu.current+=1)},[z]);let em=e=>{l2(e,{default:ep,success:ev})},ev=e=>{var a,l,t,i;es(!1);let n=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.bankList.findIndex(e=>"Y"===e.bankAccountverify);-1!==n&&K(n),ec((null==e?void 0:null===(t=e.data)||void 0===t?void 0:null===(l=t.bankList[n])||void 0===l?void 0:l.bankAccountverify)!=="Y"),G(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.bankList)},ep=e=>{var a,l;es(!1),G([]),null===(a=er.triggerToast)||void 0===a||a.call(er,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},eh=()=>{lZ({default:eg,success:eb})},eg=e=>{var a,l;null===(a=er.triggerToast)||void 0===a||a.call(er,{message:null!==(l=e.msg)&&void 0!==l?l:"",toastType:"error"})},eb=e=>{var a,l,t,i,n,o;I(e.data.eMandate),O(e.data.successPopup),R((null==e?void 0:null===(t=e.data)||void 0===t?void 0:null===(l=t.eMandate)||void 0===l?void 0:null===(a=l.mandateExpiry)||void 0===a?void 0:a.includes("Until Cancelled"))?"Until Cancelled":null!==(o=null==e?void 0:null===(n=e.data)||void 0===n?void 0:null===(i=n.eMandate)||void 0===i?void 0:i.mandateExpiry[0])&&void 0!==o?o:"")},eN=()=>{let e=new Date;e.setFullYear(e.getFullYear()+40);let a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},ef=()=>{let e=new Date;e.setFullYear(e.getFullYear()+30);let a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},ex=()=>{let e=new Date;return e.setMonth(e.getMonth()+6),e.setHours(0,0,0,0),e},eC=e=>{R(e)},eE=e=>{let[a,l,t]=null==e?void 0:e.split(/[-\/]/);F("".concat(a.padStart(2,"0"),"-").concat(l.padStart(2,"0"),"-").concat(t)),new Date(t,l-1,a)<ex()?X("Cannot choose date less than 6 months"):X("")},ey=e=>{l1(e,{default:eA,success:eS})},eS=e=>{var a,l,t,i;eI({orderId:null!==(t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.orderId)&&void 0!==t?t:"",customerId:null!==(i=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.customerId)&&void 0!==i?i:"",paymentMode:u.PaymentModes.E_MANDATE,amount:"0",razorPaymentSuccessCallBack:e=>{}})},eA=e=>{var a,l;null===(a=er.triggerToast)||void 0===a||a.call(er,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},ej=(e,a)=>{var l;let t=null===(l=null!=e?e:B)||void 0===l?void 0:l.trim().replace(/[^0-9]+/g,""),i=Number(t);if(0===i?W(Y.amountZero):i<5e3?W(Y.mandateAmountLesser):i>1e7?W(Y.mandateAmountGreater):W(""),!a){let e=eT(t);V("â¹".concat(e))}},eT=e=>
1e?parseFloat(e).toLocaleString("en-IN",{minimumFractionDigits:0}):"",eD=e=>{if(e)switch(e){case u.PaymentModes.UPI:return"upi";case u.PaymentModes.NETBANKING:return"netbanking"}},ew=e=>e&&e===u.PaymentModes.E_MANDATE?l9.EMANDATE:"",eI=e=>{let{orderId:a,paymentMode:l,amount:t,razorPaymentSuccessCallBack:i,customerId:n}=e;J(null),ee(!1);let o=Number(null==t?void 0:t.trim().replace(/[^0-9.-]+/g,"")),s=new en({key:ew(l),order_id:a,amount:o,customer_id:n,currency:"INR",name:"AXIS_MF",timeout:300,handler:function(e){J(e),e_(e,l==u.PaymentModes.E_MANDATE?"mandate":l==u.PaymentModes.UPI_AUTOPAY?"autoupi":eD(l))},retry:{enabled:!1},recurring:l===u.PaymentModes.E_MANDATE||l===u.PaymentModes.UPI_AUTOPAY||void 0,prefill:{name:(null==ea?void 0:ea.firstName)||(null==ea?void 0:ea.lastName)?((null==ea?void 0:ea.firstName)+" "+(null==ea?void 0:ea.lastName)).trim():void 0,email:ea.email,method:l===u.PaymentModes.NETBANKING?void 0:eD(l),contact:ea.phone},notes:"Razorpay corporate office",theme:{color:"3399cc"},modal:{escape:!1,confirm_close:!0,ondismiss:()=>{ee(!0)}}});s.on("payment.failed",function(e){e_(e.error.metadata,l==u.PaymentModes.E_MANDATE?"mandate":l==u.PaymentModes.UPI_AUTOPAY?"autoupi":eD(l)),J(e)}),es(!1),s.open()},e_=(e,a)=>{var l,t,i,n,o,s;let r={method:a,razorpay_payment_id:null!==(t=null!==(l=null==e?void 0:e.razorpay_payment_id)&&void 0!==l?l:null==e?void 0:e.payment_id)&&void 0!==t?t:"",razorpay_order_id:null!==(n=null!==(i=null==e?void 0:e.razorpay_order_id)&&void 0!==i?i:null==e?void 0:e.order_id)&&void 0!==n?n:"",razorpay_signature:null!==(o=null==e?void 0:e.razorpay_signature)&&void 0!==o?o:"",pageURL:null!==(s=window.location.href)&&void 0!==s?s:""};es(!0),eO(r)},eO=e=>{l3(e,{default:eR,success:ek})},ek=e=>{D(!0),es(!1)},eR=e=>{var a,l;es(!1),null===(a=er.triggerToast)||void 0===a||a.call(er,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},eM=e=>{let a=Number(null==e?void 0:e.trim().replace(/[^0-9.-]+/g,"")),l=Number(null==B?void 0:B.trim().replace(/[^0-9.-]+/g,"")),t=a+l,i=eT(l>0?t.toString():e);0===t?W(Y.amountZero):t<5e3?W(Y.mandateAmountLesser):t>1e7?W(Y.mandateAmountGreater):W(""),V("â¹".concat(i))},eL=e=>{var a;(null===(a=U[null!=e?e:0])||void 0===a?void 0:a.bankAccountverify)==="Y"&&K(null!=e?e:0)};return p.jsxs("div",{className:"emandate-upi-module-sec emandate-zk-upi-module-sec",children:[p.jsx(m.Loader,{showLoader:eo}),p.jsxs("div",{className:"emandate-upi-details-sec",children:[p.jsxs("div",{className:"title-section",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title title ",children:null==w?void 0:w.title})]}),p.jsx("label",{className:"lbl-sub-heading info isMobile-hide",children:null==w?void 0:w.mandateAccountTitle})]}),p.jsx("div",{className:"sub-description isMobile-hide",children:p.jsxs("p",{className:"lbl-banner-title-6",children:[null==w?void 0:w.mandateAccountDesc," "]})}),p.jsx("div",{className:"bank-list-sec",children:null==U?void 0:U.map((e,a)=>p.jsx(l$,{index:a,selectedIndex:H,onChange:()=>eL(a),details:e}))}),p.jsx("div",{className:"form-title",children:p.jsx("div",{className:"title lbl-services-title",children:null==w?void 0:w.mandateDetailTitle})}),p.jsxs("div",{style:{gridTemplateColumns:ei?"1fr":"Until Cancelled"!==k?"1fr 1fr 1fr":"1fr 1fr",width:"Until Cancelled"!==k||ei?"100%":"70%"},className:"inputs-sec emandate-zk-expiry-font-change",children:[p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown menulist-dd common-sty",optionList:null==w?void 0:w.mandateExpiry,onSelectCB:e=>eC(e),selectedOption:k,label:null!==(A=null==w?void 0:w.mandateExpiryText)&&void 0!==A?A:"",hasClose:!0,dialogLabel:"Mandate Expiry"}),"Until Cancelled"!==k&&p.jsx("div",{className:"emandate-zk-date-font-change",children:p.jsx(S.DatePickerComponent,{className:"date-picker-component common-sty",label:"Date",dateSeparator:"/",dateFormat:"DDMMYYYY",placeHolder:["DD","MM","YYYY"],errorMsg:Z,minDate:new Date,maxDate:new Date((()=>{let e=new Date;e.setFullYear(e.getFullYear()+30);let a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(t,"/").concat(l,"/").concat(a)})()),selectedDate:P?(e=>{if(e){var[a,l,t]=e.replace(/\//g,"-").split("-").map(Number);if(4===String(a).length){let e=t;t=a,a=e}if(a&&l&&t)return new Date(t,l-1,a)}})(P):void 0,onChange:e=>{var a;return eE(null!==(a=e.stringDate)&&void 0!==a?a:"")}})}),p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",label:"Mandate Amount",isError:""!==q,id:"newMobileNumber",value:B,onChange:e=>ej(e,!1),errorMessage:q,inputMode:"numeric",onFocus:e=>ej(e,!0),onFocusOut:()=>
1{let e=Number(null==B?void 0:B.trim().replace(/[^0-9.-]+/g,""));0===e?W(Y.amountZero):e<5e3?W(Y.mandateAmountLesser):e>1e7?W(Y.mandateAmountGreater):W("")}},"1")]}),p.jsxs("div",{className:"amount-chips amount-zk-chips",style:{width:"Until Cancelled"!==k||ei?"100%":"70%"},children:[p.jsx("div",{className:"chip-list",children:null==w?void 0:w.mandateAmount.map((e,a)=>p.jsxs("div",{onClick:()=>eM(e),className:"chip lbl-primary-banner-title-2",children:[p.jsx("span",{className:"span-1",children:"+"}),p.jsx("span",{className:"span-1",children:"â¹"}),p.jsx("span",{className:"span-2",children:eT(e)})]},a))}),p.jsx("div",{className:"chip-des",children:p.jsx("p",{className:"lbl-txt-info-4",children:null==w?void 0:w.mandateAmountNote})})]}),p.jsxs("div",{className:"proceed-note",children:[p.jsx("div",{className:"note",children:p.jsxs("label",{className:"lbl-input-heading above-note",children:[p.jsx("strong",{className:"lbl-zk-input-note",children:"Note:"})," The token payment of Rs 1 will be deducted from your account for E-mandate registration process."]})}),p.jsx("div",{className:"proceed-btn",children:p.jsx(f.ButtonWithLoader,{className:"proceed-btn-sty btn-primary ",value:"Proceed",isLoading:!1,onClick:()=>{let e=Number(null==B?void 0:B.trim().replace(/[^0-9.-]+/g,""));if("Until Cancelled"!==k&&""===P)X(Y.expiryNeeded);else if(""===B)W(Y.amountNotEmpty);else if(e<5e3)W(Y.mandateAmountLesser);else if(e>1e7)W(Y.mandateAmountGreater);else if(""===q&&""===Z){var a;let l=U[H];ey({startDate:M(),date:"Until Cancelled"===k?eN():""!==P?P:eN(),amount:e,method:"mandate",bankName:l.bankName,bankAccountNo:null!==(a=l.fullBankAccountNumber)&&void 0!==a?a:"",bankAccType:l.bankAccType,bankIFSCCode:l.bankIFSCCode})}},disabled:ed})}),p.jsx("div",{className:"note",children:p.jsxs("label",{className:"lbl-input-heading below-note",children:[p.jsx("strong",{className:"lbl-zk-input-note",children:"Note:"})," The token payment of Rs 1 will be deducted from your account for E-mandate registration process."]})})]})]}),T&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,isFloating:!1,onClose:()=>D(!1),content:p.jsx(l0,{details:_})})]})},a.EmandateUpiAutopayModule=()=>{let[e,a]=r.useState(),l=u.useLoginContextData(),[t,i]=r.useState([]),[n,o]=r.useState(!1),[s,c]=r.useState(!1),v=s?t:t.slice(0,3),h=u.useRootContextData(),[g,b]=r.useState(!0),[N,x]=r.useState(!1),C=async()=>{var e;b("not-loggedin"!==await (null===(e=l.getLoginStatus)||void 0===e?void 0:e.call(l))),x(!0)};r.useEffect(()=>{if(g)eG("/servicecenter/ourservices/e-mandate");else{var e;eG("/"),null===(e=l.triggerLogin)||void 0===e||e.call(l,!0,{successLoginCB:()=>eG("/servicecenter/ourservices/e-mandate")})}},[g]),r.useEffect(()=>{C()},[l]),r.useEffect(()=>{N&&g&&(o(!0),A(),E(),P(L("THANKYOU_PAGE")))},[g,N]);let E=async()=>{var e;await (null===(e=l.getLoggedinUserDetails)||void 0===e?void 0:e.call(l)),lQ({method:"mandate"},{default:S,success:y})},y=e=>{o(!1),i(e.data)},S=e=>{if(o(!1),"PAN is not registered with OTM"!==e.message){var a,l;null===(a=h.triggerToast)||void 0===a||a.call(h,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})}},A=()=>{lZ({default:j,success:T})},j=e=>{var a,l;null===(a=h.triggerToast)||void 0===a||a.call(h,{message:null!==(l=e.msg)&&void 0!==l?l:"",toastType:"error"}),o(!1)},T=e=>{a(e.data.eMandate),o(!1)},D=()=>{aD(l,"e-Mandate","Register New e- Mandate","NA"),eG("/servicecenter/ourservices/e-mandate/eMandateDetails")},w=null==e?void 0:e.title,I=null==e?void 0:e.description,O=null==e?void 0:e.details,k=null==e?void 0:e.button,R=null==e?void 0:e.advantageTitle,M=null==e?void 0:e.advantageDetails,L=e=>"THANKYOU_PAGE"===e?d.GLOBAL_CONSTANT.ROUTE_PATHS.DASHBOARD:"/",P=async e=>{JSON.parse(await d.SessionStorage.instance.routingHistory.get()).some(e=>(null==e?void 0:e.trim())==="/thankyou")&&(e="/dashboard",window.addEventListener("popstate",()=>{window.location.pathname!==e&&(history.replaceState(null,"",e),window.location.href=e)}))};return p.jsxs("div",{className:"emandate-upi-module-sec",children:[p.jsx(m.Loader,{showLoader:n}),p.jsxs("div",{className:"title-container",children:[p.jsxs("div",{className:"title-section",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title title",children:w})]}),p.jsx("label",{className:"lbl-sub-heading info isMobile-hide",children:I})]}),t.length>3&&p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"view-all-button",disabled:!1,onClick:()=>c(e=>!e),children:s?"View Less":"View All"})]}),p.jsx("div",{className:"mandate-flow-sec",children:0===t.length&&p.jsx(lW,{details:O,emandateBtnTitle:k,handleRegisterBtn:D})}),t.length>0&&p.jsxs("div",{className:"mandate-bank-sec",children:[p.jsx("div",{className:"bank-list",children:null==v?void 0:v.map((e,a)=>p.jsx(lX,{details:e}))}),void 0!==k&&""!==k&&p.jsx("div",{className:"register-btn",children:p.jsx(f.ButtonWithLoader,{className:"register-btn-sty btn-primary",value:null!=k?k:"",isLoading:!1,onClick:D,disabled:!1})}),p.jsx("div",{className:"note-sec",children:p.jsxs("p",{className:"lbl-input-heading inside-note",children:[p.jsx("strong",{className:"heading",children:"Note:"})," One time e-Mandate registration charges may be leviedby your bank."]})})]}),p.jsxs("p",{className:"lbl-input-heading outside-note",children:[p.jsx("strong",{className:"heading",children:"Note:"})," One time e-Mandate registration charges may be leviedby your bank."]}),p.jsxs("div",{className:"mandate-advatage-sec",children:[p.jsx("div",{className:"title lbl-services-title",children:R}),p.jsx(lq,{advantageDetails:null!=M?M:[]})]}),p.jsx(_.DownloadAppLink,{})]})},a.InitializeClient=()=>{d.DeviceCommunicator.initialize()},a.NavIdcwHistoryModule=()=>{var e,a;let[l,t]=r.useState([]),[i,n]=r.useState([]),[o,s]=r.useState([]),[c,v]=r.useState([]),[b,N]=r.useState(!0),[f,x]=r.useState(0),[C,E]=r.useState([]),[y,A]=r.useState([]),[j,T]=r.useState({data:[{title:"",value:[]}],note:""}
1),[D,w]=r.useState([[]]),[I,_]=r.useState("0"),[O,M]=r.useState(0),[L,P]=r.useState(0),[F,B]=r.useState([]),[V,U]=r.useState([]),[Y,G]=r.useState(""),[z,H]=r.useState(""),[K,q]=r.useState({type:[{name:"",code:"",schemeNature:""}]}),[W,Z]=r.useState("All"),[X,Q]=r.useState("All"),[J,$]=r.useState(),[ee,ea]=r.useState([]),[el,et]=r.useState(""),[ei,en]=r.useState(""),[eo,es]=r.useState(""),[er,ed]=r.useState(null),[ec,eu]=r.useState(null),[em,ep]=r.useState(),[eh,eg]=r.useState(""),[eb,eN]=r.useState(""),[ef,ex]=r.useState(""),[eC,eE]=r.useState(""),[ey,eS]=r.useState(""),[eA,ej]=r.useState(""),[eT,eD]=r.useState(""),[ew,eI]=r.useState(""),[e_,eO]=r.useState(!1),[ek,eR]=r.useState({name:"",index:0}),[eM,eL]=r.useState(1),eP=r.useRef(null),[eB,eV]=r.useState(),[eU,eY]=r.useState(!0),[eG,ez]=r.useState(!0),eH=u.useLoginContextData();r.useEffect(()=>{e$(),e9(),e4(),eI(D[O][0])},[]),r.useEffect(()=>{var e;let a={0:"open ended",1:"close ended",2:"matured"},l=(null!==(e=null==K?void 0:K[ek.name])&&void 0!==e?e:[]).filter(e=>{var l,t;return null==e?void 0:null===(t=e.schemeNature)||void 0===t?void 0:null===(l=t.toLowerCase())||void 0===l?void 0:l.includes(a[I])});U(["All",...(null==l?void 0:l.map(e=>null==e?void 0:e.name))||[]]),G("All"),H("All"),eS(""),eE("")},[F,ek,I]),r.useEffect(()=>{let e=i.find(e=>e.id===String(O));e?ej(e.displayvalue):ej("")},[O,i]),r.useEffect(()=>{o.length>0&&Object.keys(K).length>0&&B(o.map(e=>K[e]))},[o,K]),r.useEffect(()=>{ae({code:z})},[Y]);let eK=e=>{var a,l,t,i;if(eS(""),eE(""),ep([]),G("All"),H("All"),Z("All"),Q("All"),ed(null),eu(null),_("0"),M(0),e$(),P(0),x(e),0===e){let e=null!=C?C:[];w(e);let t=null!==(l=null==e?void 0:null===(a=e[0])||void 0===a?void 0:a[0])&&void 0!==l?l:"";eI(t),eR({name:t,index:0}),B(o.map(e=>K[e]))}else{let e=null!=y?y:[];w(e);let a=null!==(i=null==e?void 0:null===(t=e[0])||void 0===t?void 0:t[0])&&void 0!==i?i:"";eI(a),eR({name:a,index:0}),B(c.map(e=>K[e]))}},eW=e=>{eS(""),eE(""),ep([]),_(null!=e?e:""),"0"===e?M(0):"1"===e?M(1):M(2)},eZ=e=>{var a;eS(""),eE(""),ep([]);let l=null!==(a=null==D?void 0:D[O])&&void 0!==a?a:[],t=null==l?void 0:l[e];t&&(P(e),eR({name:t,index:e}))},eX=e=>{if(aD(eH,"Mutual Fund NAV & IDCW History",e,0===O?"NAV":"IDCW History"),eS(""),eE(""),ep([]),eU||eG){if(eG){if(eU){let a=eQ(eo,"From Date"),l=eQ(ei,"To Date");if(ed(a),eu(l),new Date(eF(eo))>new Date(eF(ei))){ed(eq.EXPENSE_RATIO.greterThanDate);return}a||l||(0===f?"view"===e?at():ao():"view"===e?ar():au())}else ed(eq.EXPENSE_RATIO.fromDate)}else ed(eq.EXPENSE_RATIO.toDate)}else ed(eq.EXPENSE_RATIO.selectDates)},eQ=(e,a)=>{let l=new Date(e.split("-").reverse().join("-")),t=new Date;return(l.setHours(0,0,0,0),t.setHours(0,0,0,0),e)?isNaN(l.getTime())?"Invalid ".concat(a," format."):l>t?"".concat(a," cannot be a future date."):null:"Please select valid ".concat(a,".")},eJ=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;if(e){let a=e=>(e<10?"0":"")+e;return a(e.getDate())+"-"+a(e.getMonth()+1)+"-"+e.getFullYear()}return""},e$=()=>{let e=new Date;et(eJ(e)),en(eJ(e)),es(eJ(new Date(e.getFullYear(),e.getMonth()-3,e.getDate())))};r.useEffect(()=>{ei&&e1(ei)},[ei]),r.useEffect(()=>{eo&&e0(eo)},[eo]);let e0=e=>{var a,l;let t=""!==e;es(e),ed(""),eS(""),eE("");let i=null!==(a=eQ(e,"From Date"))&&void 0!==a?a:"",n=null!==(l=eQ(ei,"To Date"))&&void 0!==l?l:"";t||eG?eG?t?new Date(eF(e))>new Date(eF(ei))?ed(eq.EXPENSE_RATIO.greterThanDate):ei||e?i?ed(i):n?ed(n):ed(""):ed(eq.EXPENSE_RATIO.selectDates):ed(eq.EXPENSE_RATIO.fromDate):ed(eq.EXPENSE_RATIO.toDate):ed(eq.EXPENSE_RATIO.selectDates)},e1=e=>{var a,l;let t=""!==e;en(e),eu(""),eS(""),eE("");let i=null!==(a=eQ(eo,"From Date"))&&void 0!==a?a:"",n=null!==(l=eQ(e,"To Date"))&&void 0!==l?l:"";eU||t?t?eU?new Date(eF(eo))>new Date(eF(e))?ed(eq.EXPENSE_RATIO.greterThanDate):eo||e?i?ed(i):n?ed(n):ed(""):ed(eq.EXPENSE_RATIO.selectDates):ed(eq.EXPENSE_RATIO.fromDate):ed(eq.EXPENSE_RATIO.toDate):ed(eq.EXPENSE_RATIO.selectDates)},e2=e=>{eY(e);let a=new Date(eF(eo)),l=new Date(eF(ei));e||eG?eG?e?a>l?ed(eq.EXPENSE_RATIO.greterThanDate):ed(""):ed(eq.EXPENSE_RATIO.fromDate):ed(eq.EXPENSE_RATIO.toDate):ed(eq.EXPENSE_RATIO.selectDates)},e3=e=>{ez(e);let a=new Date(eF(eo)),l=new Date(eF(ei));eU||e?e?eU?a>l?ed(eq.EXPENSE_RATIO.greterThanDate):ed(""):ed(eq.EXPENSE_RATIO.fromDate):ed(eq.EXPENSE_RATIO.toDate):ed(eq.EXPENSE_RATIO.selectDates)},e9=()=>{N(!0),lf({default:e6,success:e5})},e6=e=>{var a;N(!1),eg(null!==(a=e.message)&&void 0!==a?a:"")},e5=e=>{N(!1);let a=e.data.data.filter(e=>"total expense ratio"!==e.title.toLowerCase());t(a.map(e=>"IDCW History"===e.title?e.title:e.title.toUpperCase())),n(a[0].value.map((e,a)=>({id:a.toString(),displayvalue:e.type})));let l=(null===(o=a.find(e=>"nav"===e.title.toLowerCase()))||void 0===o?void 0:o.value[0].schemeType)||[],i=(null===(r=a.find(e=>"idcw history"===e.title.toLowerCase()))||void 0===r?void 0:r.value[0].schemeType)||[];s(l),v(i),T(e.data),E(a[0].value.map(e=>e.schemeType)),A(a[1].value.map(e=>e.schemeType)),w(a[0].value.map(e=>e.schemeType));var o,r,d=l[0];eI(d),eR({name:d,index:0})},e4=()=>{N(!0),lb({default:e8,success:e7}
1)},e8=e=>{var a;N(!1),eN(null!==(a=e.message)&&void 0!==a?a:"")},e7=e=>{if(N(!1),e.data.schemeNames.length>0){let a=e.data.schemeNames[0];G(a.schemeName),H(a.schemeCode);let l=e.data.schemeNames.reduce((e,a)=>{let{type:l,schemeName:t,schemeCode:i,schemeNature:n}=a;return l&&(e[l]||(e[l]=[]),e[l].push({name:t,code:i,schemeNature:n})),e},{});q(l),B(o.map(e=>l[e]))}},ae=e=>{N(!0),lN({default:aa,success:al},e)},aa=e=>{var a;N(!1),ex(null!==(a=e.message)&&void 0!==a?a:"")},al=e=>{N(!1),Z("All"),Q("All"),e.data.planNames.length>0&&(ea(e.data.planNames.map(e=>e.planOption)),$(e.data.planNames))},at=()=>{N(!0),lx({type:null!=eA?eA:"",fundType:e_?o[L]:ew,schemeCode:z,planCode:X,fromDate:eo,toDate:ei},{default:ai,success:an})},ai=e=>{var a;N(!1),eE(null!==(a=e.message)&&void 0!==a?a:"")},an=e=>{var a;if(N(!1),eD(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.title),e.data&&e.data.navData&&e.data.navData.length>0){let a=e.data.navData.reduce((e,a)=>(e[a.fundName]||(e[a.fundName]=[]),e[a.fundName].push(a),e),{}),l=Object.keys(a).map(e=>({headerKey:e,component:p.jsx(lg,{isNavSelected:!0,navlist:a[e]})}));eL(1),ep(l),eE("")}else eE(e.data.message)},ao=()=>{N(!0),lx({type:null!=eA?eA:"",fundType:e_?o[L]:ew,schemeCode:z,planCode:X,fromDate:eo,toDate:ei},{default:ai,success:as})},as=e=>{var a;N(!1),eD(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.title),e.data&&e.data.s3CsvResponse&&e.data.s3CsvResponse.location?(window.open(e.data.s3CsvResponse.location,"_blank"),eE("")):eE(e.data.message)},ar=()=>{N(!0),lC({type:null!=eA?eA:"",fundType:e_?c[L]:ew,schemeCode:z,planCode:X,fromDate:eo,toDate:ei},{default:ad,success:ac})},ad=e=>{var a;N(!1),eS(null!==(a=e.message)&&void 0!==a?a:"")},ac=e=>{var a;if(N(!1),eD(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.title),e.data&&e.data.idcwData&&e.data.idcwData.length>0){let a=e.data.idcwData.reduce((e,a)=>(e[a.FundName]||(e[a.FundName]=[]),e[a.FundName].push(a),e),{}),l=Object.keys(a).map(e=>({headerKey:e,component:p.jsx(lg,{isNavSelected:!1,idcwlist:a[e]})}));eL(1),ep(l),eE("")}else eE(e.data.message)},au=()=>{N(!0),lC({type:null!=eA?eA:"",fundType:e_?c[L]:ew,schemeCode:z,planCode:X,fromDate:eo,toDate:ei},{default:ad,success:am})},am=e=>{N(!1),e.data&&e.data.s3CsvResponse&&e.data.s3CsvResponse.location?(window.open(e.data.s3CsvResponse.location,"_blank"),eS("")):eS(e.data.message)},av=()=>{window.innerWidth<=768?eO(!1):eO(!0)};return r.useEffect(()=>(av(),window.addEventListener("resize",av),()=>{window.removeEventListener("resize",av)}),[]),r.useEffect(()=>{eV(ev(em,eM,10))},[eM,em]),p.jsxs("div",{className:"nav-idcw-container",children:[p.jsx(m.Loader,{showLoader:b}),p.jsxs("div",{className:"header-content",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:"Mutual Fund NAV & IDCW History"})]}),p.jsx("p",{className:"lbl-menu-item",children:"Investors can check historical NAV and Income Distribution cum Capital Withdrawal performance for all Axis Mutual Fund scheme."})]}),p.jsxs("div",{className:"tabs-container",children:[p.jsx("div",{className:"tab-headings",children:l.map((e,a)=>p.jsx("label",{className:"lbl-txt-content ".concat(f==a?"tab-selected":""),onClick:()=>eK(a),children:e},a))}),p.jsx("div",{className:"tabs-content",dangerouslySetInnerHTML:{__html:j.note}})]}),p.jsxs("div",{className:"input-row type-input-row",children:[p.jsx("label",{className:"lbl-popup-content",children:"Select Type"}),p.jsx(k.SimpleRadio,{className:"simple-radio-tax-resident-radio type-radio-button",list:null!=i?i:[],displayValueKey:"displayvalue",idKey:"id",selectedId:I,onChange:e=>eW(e)})]}),e_?p.jsxs("div",{className:"scheme-type-section",children:[p.jsx("label",{className:"lbl-popup-content",children:"Select Scheme Type"}),p.jsx("div",{className:"buttons-list",children:(null!==(e=null==D?void 0:D[O])&&void 0!==e?e:[]).map((e,a)=>p.jsx("div",{className:"type-button ".concat(L===a?"active":""),onClick:()=>eZ(a),children:e},a))})]}):p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown input-row",optionList:null!==(a=null==D?void 0:D[O])&&void 0!==a?a:[],displayValueKey:"schemeType",label:"Select Scheme Type",selectedOption:null!=ew?ew:"",onSelectCB:e=>{eS(""),eE(""),ep([]),eI(e);var a,l,t,i,n=0;(n=0===f?null!==(l=null==C?void 0:null===(a=C[O])||void 0===a?void 0:a.indexOf(e))&&void 0!==l?l:-1:null!==(i=null==y?void 0:null===(t=y[O])||void 0===t?void 0:t.indexOf(e))&&void 0!==i?i:-1)<0||eR({name:e,index:n})},hasClose:!0}),p.jsxs("div",{className:"scheme-section",children:[e_&&p.jsx("label",{className:"lbl-popup-content",children:"Scheme"}),p.jsxs("div",{className:"dropdown-section",children:[p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown scheme-dropdown",optionList:V,label:"Select Scheme",selectedOption:Y,dialogLabel:"Select Scheme",hasClose:!0,onSelectCB:e=>{var a;let l=null!==(a=null==K?void 0:K[ek.name])&&void 0!==a?a:[];if("All"===e){G("All"),H("All"),eS(""),eE("");return}let t=null==l?void 0:l.find(a=>a.name===e);t&&(G(t.name),H(t.code)),eS(""),eE("")}}),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown plan-dropdown",optionList:ee,label:"Select Plan Option",selectedOption:W,dialogLabel:"Select Plan Option",hasClose:!0,onSelectCB:e=>{if("string"==typeof e){let a=null==J?void 0:J.find(a=>a.planOption===e);Z((null==a?void 0:a.planOption)||""),Q((null==a?void 0:a.planCode)||"")}eS(""),eE("")}})]}),p.jsxs("div",{className:"date-section",children:[p.jsx(S.DatePickerComponent,{minDate:"01-01-1900",maxDate:eJ(new Date),dateSeparator:"-",dateFormat:"DDMMYYYY",placeHolder:["DD","MM","YYYY"],disabled:!1,label:"From Date",onCh
1ange:e=>{var a;return e0(null!==(a=e.stringDate)&&void 0!==a?a:"")},selectedDate:eo,isStringDateInput:!0,removeClearIcon:!0,getDateInputValidityOnChange:e=>e2(e)}),p.jsx(S.DatePickerComponent,{minDate:"01-01-1900",maxDate:eJ(new Date),dateSeparator:"-",dateFormat:"DDMMYYYY",placeHolder:["DD","MM","YYYY"],disabled:!eo,label:"To Date",onChange:e=>{var a;return e1(null!==(a=e.stringDate)&&void 0!==a?a:"")},isStringDateInput:!0,selectedDate:ei,removeClearIcon:!0,getDateInputValidityOnChange:e=>e3(e)})]}),er&&p.jsx("div",{className:"error-message",children:er})]}),p.jsxs("div",{className:"download-view-section",ref:eP,children:[p.jsx("button",{className:"btn-outline-primary download-btn",type:"button",onClick:()=>eX("download"),children:"Download"}),p.jsx("button",{className:"btn-primary view-btn",type:"button",disabled:!1,onClick:()=>eX("view"),children:"View"})]}),p.jsx("div",{className:"error-section",children:[eh,eb,ef,eC,ey].map((e,a)=>e?p.jsx("div",{className:"error-message",children:"Data not available"===e?"No Data Found":e},a):null)}),(null==em?void 0:em.length)?p.jsxs("div",{className:"view-result-section",children:[p.jsx("div",{className:"accordion-title",children:p.jsx("label",{className:"lbl-list-heading",children:eT})}),p.jsx(R.ComponentAccordion,{className:"holding-applicant-accordion nav-accordion",list:eB,headerKey:"headerKey",isShowIcon:!0,expansionType:"single",isIfen:!0}),em&&(null==em?void 0:em.length)>10&&p.jsx(h.PaginationFooter,{listLength:(null==em?void 0:em.length)||0,currentPage:eM,dataPerPage:10,onChangePage:e=>{if(eL(e),eP.current){var a;null==eP||null===(a=eP.current)||void 0===a||a.scrollIntoView({behavior:"smooth",block:"start"})}}})]}):""]})},a.NavTerAndOthersModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState("");r.useEffect(()=>{o()},[]);let o=()=>{aN({default:s,success:c})},s=e=>{},c=e=>{let l=eO(e.data.serviceCentre,X);a(l=null==l?void 0:l.map(e=>{var a;let l=eM(null!==(a=e.title)&&void 0!==a?a:"");return l&&"internal"===e.pageType&&(e.url=U[l]),e})),t(ek(e.data.serviceCentre,X)),n(eR(e.data.serviceCentre,X))};return p.jsxs("div",{className:"update-folio-module",children:[p.jsxs("div",{className:"Acct-statement-header-label-div",children:[p.jsxs("div",{className:"title-warapper nav-zk-title-padding-bottom",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:"NAV, TER and Other Services"})]}),p.jsx("label",{className:"lbl-menu-item nav-zk-description-font",children:l})]})," ",p.jsx("div",{className:"update-folio-module-inner",children:p.jsx(ax,{list:e,categoryName:"NAV, TER and Other Services"})})]})},a.OurServicesModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState(""),[o,s]=r.useState(!1);r.useEffect(()=>{c()},[]);let c=()=>{aN({default:u,success:m})},u=e=>{},m=e=>{let l=eO(e.data.serviceCentre,Z);a(l=l.map(e=>{var a;return eM(null!==(a=e.title)&&void 0!==a?a:"")&&"internal"==e.pageType&&(null==e?void 0:e.order)===6&&(e.url="/kyc"),e})),t(ek(e.data.serviceCentre,Z)),n(eR(e.data.serviceCentre,Z)),s(!0)};return p.jsxs("div",{className:"our-services-Module",children:[p.jsxs("div",{className:"our-service-header-label-div",children:[p.jsxs("div",{className:"title-warapper",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:i})]}),p.jsx("label",{className:"lbl-menu-item",children:l})]}),p.jsx("div",{className:"our-services-Module-inner",children:p.jsx(ax,{list:e,categoryName:"Our Services"})}),p.jsx("div",{className:"downloadapp-container mobile-download-app",children:o&&p.jsx(_.DownloadAppLink,{})})]})},a.RelationshipManagerModule=()=>{var e,a,l,t,i,n,o;let[s,d]=r.useState(!1),[c,m]=r.useState(!1),[h,g]=r.useState({}),[b,N]=r.useState({}),[f,C]=r.useState(!1),[E,y]=r.useState(""),[S,A]=r.useState(""),[j,T]=r.useState(!1),[D,w]=r.useState(!1),[I,_]=r.useState(!1),O=u.useLoginContextData();r.useEffect(()=>{B(),Y()},[]);let k=()=>{m(!0)},R=async()=>{H()},M=e=>{m(!1),C(!0),y(e)},L=e=>{A(e)},P=()=>{w(!0),d(!1)},F=e=>{A(e)},B=()=>{lS({default:U,success:V})},V=e=>{g(e.data)},U=e=>{},Y=async()=>{var e,a;let l=await (null==O?void 0:null===(e=O.getLoggedinUserDetails)||void 0===e?void 0:e.call(O));lA({pan:null!==(a=null==l?void 0:l.pan)&&void 0!==a?a:""},{default:z,success:G})},G=e=>{N(null==e?void 0:e.data)},z=e=>{A(null==e?void 0:e.message),N({}),(null==e?void 0:e.statusCode)=="EC-00"&&_(!0)},H=()=>{var e,a,l;let t=null==O?void 0:O.loggedInUserDetails;lj({name:null!==(e=null==t?void 0:t.user_name)&&void 0!==e?e:"",mobile:null!==(a=null==t?void 0:t.phone_number)&&void 0!==a?a:"",email:null!==(l=null==t?void 0:t.email)&&void 0!==l?l:""},{default:q,success:K})},K=e=>{M(e.data.msg)}
1,q=e=>{L(null==e?void 0:e.message)},W=()=>{var e,a,l,t,i;let n=null==O?void 0:O.loggedInUserDetails;lw({callbackType:"",investorMob:null!==(e=null==n?void 0:n.phone_number)&&void 0!==e?e:"",investorName:null!==(a=null==n?void 0:n.user_name)&&void 0!==a?a:"",rmCode:null!==(l=null==b?void 0:b.rmCode)&&void 0!==l?l:"",rmMob:null!==(t=null==b?void 0:b.mobNo)&&void 0!==t?t:"",rmName:null!==(i=null==b?void 0:b.name)&&void 0!==i?i:""},{default:X,success:Z})},Z=e=>{P()},X=e=>{F(null==e?void 0:e.message)};return p.jsxs("div",{className:"relationship-manager-base",children:[p.jsx("div",{className:"button-div",children:(null===(e=Object.keys(b))||void 0===e?void 0:e.length)>0?p.jsx("button",{className:"btn-primary",onClick:()=>{I?k():d(!0)},children:"Contact Your RM"}):p.jsx("button",{className:"btn-primary",onClick:k,children:"Assign RM"})}),s?p.jsx(x.OverlayPopup,{className:"dialog-popup-content contact-your-rm",showHeader:!0,title:null==h?void 0:h.contactRmTitle,isFloating:!0,showCloseOption:!0,onClose:()=>{d(!1)},content:p.jsx(ly,{details:h,rmDetails:b,onRequestCallback:()=>{W()}})}):null,c?p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!0,title:null==h?void 0:h.assignRmTitle,isFloating:!0,showCloseOption:!0,onClose:()=>m(!1),content:p.jsx(lT,{details:h,onRequestRMApiCall:R})}):null,f?p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,isFloating:!0,onClose:()=>C(!1),content:p.jsx(ay,{goNext:()=>C(!1),successData:null!==(a=null==h?void 0:h.rmSentDesc)&&void 0!==a?a:"",buttonName:null!==(l=null==h?void 0:h.rmSentBtn)&&void 0!==l?l:"",label:null!==(t=null==h?void 0:h.rmSentTitle)&&void 0!==t?t:""})}):null,j?p.jsx(x.OverlayPopup,{className:"dialog-popup-content ",showHeader:!1,isFloating:!0,onClose:()=>C(!1),content:p.jsx(lD,{goNext:()=>C(!1),successData:E,buttonName:"Done",onCloseCB:()=>T(!1)})}):null,D?p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,isFloating:!0,onClose:()=>w(!1),content:p.jsx(ay,{goNext:()=>C(!1),successData:null!==(i=null==h?void 0:h.rmSentDesc)&&void 0!==i?i:"",buttonName:null!==(n=null==h?void 0:h.rmSentBtn)&&void 0!==n?n:"",label:null!==(o=null==h?void 0:h.rmSentTitle)&&void 0!==o?o:""})}):"",p.jsx(v.CustomToast,{id:"releationshipmanager",message:S,limit:3,autoClose:!0,autoCloseDelay:5e3,type:"error",theme:"dark"})]})},a.RemunerationModule=()=>{let[e,a]=r.useState(!1),[l,t]=r.useState(""),[i,n]=r.useState(""),[o,s]=r.useState(""),[d,c]=r.useState(!1),[m,v]=r.useState(!1),[h,g]=r.useState(null),[b,N]=r.useState(null),f=u.useRootContextData(),{keyboard_childClass:C}=u.useKeyboardSafeArea(),E=()=>{t(""),n(""),v(!1),c(!1)},y=async()=>{if(!l||!i||!(null==h?void 0:h.folio))return;c(!0);let e=new URLSearchParams(window.location.search).get("financial_year");await tu({folio:h.folio,otp:l,otpToken:i,year:e},{success:e=>{var l;N(null!==(l=null==e?void 0:e.data)&&void 0!==l?l:null),a(!1),E()},default:e=>{var a,l;null===(a=f.triggerToast)||void 0===a||a.call(f,{message:null!==(l=null==e?void 0:e.msg)&&void 0!==l?l:"OTP verification failed",toastType:"error"}),v(!0),setTimeout(()=>v(!1),0)}}),c(!1)},S=async()=>{h&&(t(""),v(!0),setTimeout(()=>v(!1),0),await tc(h,{success:e=>{var a,l,t,i,o;n(null!==(t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.otpToken)&&void 0!==t?t:""),s(null!==(i=null==e?void 0:e.msg)&&void 0!==i?i:""),null===(l=f.triggerToast)||void 0===l||l.call(f,{message:null!==(o=null==e?void 0:e.msg)&&void 0!==o?o:"",toastType:"success"})},default:e=>{var a,l;null===(a=f.triggerToast)||void 0===a||a.call(f,{message:null!==(l=null==e?void 0:e.msg)&&void 0!==l?l:"Failed to resend OTP",toastType:"error"})}}))},A=async e=>{let l={...e,pageUrl:window.location.href};g(l),await tc(l,{success:e=>{var l,t,i,o,r;n(null!==(i=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.otpToken)&&void 0!==i?i:""),s(null!==(o=null==e?void 0:e.msg)&&void 0!==o?o:""),a(!0),null===(t=f.triggerToast)||void 0===t||t.call(f,{message:null!==(r=null==e?void 0:e.msg)&&void 0!==r?r:"",toastType:"success"})},default:e=>{var a,l;null===(a=f.triggerToast)||void 0===a||a.call(f,{message:null!==(l=null==e?void 0:e.msg)&&void 0!==l?l:"Failed to generate OTP",toastType:"error"})}})};return p.jsxs("section",{children:[b?p.jsx("div",{children:p.jsx(tm,{...b,setRemunerationData:N})}):p.jsx("div",{children:p.jsx(td,{onsubmit:A})}),e&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content remove-top-borader-spec remuneration-popup",is
1Floating:!0,showHeader:!0,onClose:()=>{a(!1),E()},content:p.jsx("div",{className:C,children:p.jsx(D.VerifyOTPPopup,{otpValue:l,otpICon:"otp_icon.png",onOtpChange:e=>{t(e)},onVerify:y,onResend:S,errormessage:"",verifyOtpLoader:d,isClearField:m,displaymessage:o,showTwoFAContent:!0})})})]})},a.ServiceCenterModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState([]),[o,s]=r.useState(""),[d,c]=r.useState([]),[m,v]=r.useState([]),[h,g]=r.useState([]),[b,N]=r.useState(0),f=u.useLoginContextData(),[x,C]=r.useState(""),[E,y]=r.useState("");r.useEffect(()=>{S(),D()},[]),r.useEffect(()=>{0==o.length?c(i.filter(e=>{let{category:a}=e;return null==a?void 0:a.toLowerCase().includes(o.toLowerCase())})):g(m.filter(e=>{let{category:a,title:l}=e;return(null==a?void 0:a.toLowerCase().includes(o.toLowerCase()))||(null==l?void 0:l.toLowerCase().includes(o.toLowerCase()))}))},[o,m,i]);let S=async()=>{var e;let a=await (null===(e=f.getLoggedinUserDetails)||void 0===e?void 0:e.call(f));(null==a?void 0:a.pan)&&ab({UserID:a.pan,Folio:"0"},{default:T,success:A})},A=e=>{Array.isArray(e.data)?a(j(e.data)):console.error("Response data is not an array")},j=e=>e.filter(e=>"success"!==e.status.toLowerCase()),T=e=>{t(e.message||"error occurred")},D=()=>{aN({default:w,success:I})},w=e=>{},I=e=>{n(e.data.serviceCentre);let a=e.data.serviceCentre.flatMap(e=>[{title:e.category,category:e.category,categoryUrl:e.categoryUrl,icon:e.categoryIcon,description:e.description},...e.services.map(a=>({title:a.title,category:e.category,icon:a.icon,description:a.text,order:a.order,status:a.status,pageType:a.pageType,url:a.url}))]);C(e.data.serviceCentre[0].description),y(e.data.serviceCentre[0].category),v(a)};return p.jsxs("div",{className:"service-center-module",children:[p.jsxs("div",{className:"servie-center-header",children:[p.jsxs("div",{className:"service-header-label-div",children:[p.jsx("label",{className:"lbl-services-title",children:"Service Centre"}),p.jsx("label",{className:"lbl-menu-item",children:"Our services are available across multiple channels, to help you with your queries"})]}),p.jsxs("div",{className:"service-search-container",children:[p.jsx("input",{type:"text",className:"search-scheme-input",placeholder:"Search",value:o,onChange:e=>{s(e.target.value)}}),p.jsx("img",{fetchPriority:"low",width:"18px",height:"18px",src:"/assets/search.svg",alt:"Search Icon"})]})]}),p.jsx("div",{className:"service-center-inner",children:0===o.length?p.jsx(ag,{list:i.filter(e=>{let{category:a}=e;return null==a?void 0:a.toLowerCase().includes(o.toLowerCase())})}):h.length>0?p.jsx(ag,{list:h}):p.jsx("div",{className:"Nodata-container",children:p.jsx("label",{className:"lbl-menu-item",children:"No result Found. Try another keyword to search!"})})})]})},a.SupportModule=()=>p.jsxs("div",{className:"support-module",children:[p.jsx("div",{className:"query-holder",children:p.jsx(e2,{})}),p.jsx("div",{className:"contact-holder",children:p.jsx(e3,{})})]}),a.TotalExpenseRatioModule=()=>{let[e,a]=r.useState(void 0),[l,t]=r.useState(null),[i,n]=r.useState(null),[o,s]=r.useState(),[d,c]=r.useState(et);r.useEffect(()=>{m(),b(),g(),u()},[]);let u=()=>{lV({default:E,success:C})},m=()=>{lf({default:v,success:h})},v=e=>{},h=e=>{n(e.data.data.find(e=>"total expense ratio"===e.title.toLowerCase())||null)},g=()=>{lU({success:x,default:E})},b=()=>{lb({default:N,success:f})},N=e=>{},f=e=>{s(e.data)},x=e=>{t(e.data.ter)},C=e=>{a(e.data.totalExpenseRatio)},E=e=>{};return p.jsxs("div",{className:"total-expense-ratio-module",children:[p.jsx(lF,{selectedMenu:d,onChangeMenu:e=>{c(e)}}),d===et?p.jsx(lG,{terCategoryData:i,schemeData:o,expenseRatioData:e}):p.jsx(lK,{noticesData:l||void 0})]})},a.UnclaimedIdcwRedemptionModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState([]),[o,s]=r.useState(void 0),[c,m]=r.useState(""),[v,h]=r.useState(""),[b,N]=r.useState([]),[f,x]=r.useState(!1),[C,E]=r.useState(""),[y,A]=r.useState(""),[T,D]=r.useState(!1),w=u.useLoginContextData(),I=u.useRootContextData(),[k,R]=r.useState("");r.useEffect(()=>{M()},[]),r.useEffect(()=>{Y()},[C,o,c]);let M=()=>{n([]),lo({default:L,success:P})},L=e=>{},P=e=>{var l;a(e.data.pdf),R(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.unclaimedText),n(e.data.options),t(U(e.data.disclaimer))},F=()=>{let e={pan:C};if("DOB"===o){let[a,l,t]=null==c?void 0:c.split(/[-\/]/),i="".concat(l.padStart(2,"0"),"-").concat(a.padStart(2,"0"),"-").concat(t);e.dob=i}"Registered Email ID"===o&&(e.email=c),"Bank Account Number"===o&&(e.bankAccountNumber=c),"Name of Nominee"===o&&(e.nameOfNominee=c),"Name of Investor"===o&&(e.nameOfInvestor=c),ls(e,{default:B,success:V})},B=e=>{var a,l,t;if(((null===(a=e.message)||void 0===a?void 0:a.toLowerCase())||"").includes("you have no outstanding claims for redemptions/idcw")){null===(l=I.triggerToast)||void 0===l||l.call(I,{message:null!==(t=e.message)&&void 0!==t?t:"No outstanding claims",toastType:"error"}),A(""),h(""),x(!1),N([]);return}A(e.message||"An error occurred")},V=e=>{N(e.data),x(!0),h("")},U=e=>e.replace(/1800 221 322/g,'<a href="tel:1800221322" class="lbl-link-text">1800 221 322</a>').replace(/\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b/g,'<a href="mailto:[email protected]" class="lbl-link-text">$&</a>'),Y=()=>{let e=C.length>0,a=void 0!==o;D(e&&a&&!0)},G=e=>{switch(o){case"Bank Account Number":e.length<=25&&m(e.replace(/[^0-9]/g,""));break;case"Name of Investor":case"Name of Nominee":m(e.replace(/[^a-zA-Z\s]/g,""));break;case"DOB":h(""),m(e);break;default:m(e)}},z=()=>C?C.length<10?(A(eq.SERVICES.FOLIOPAN),{hasError:!0}):10===C.length?Z(C)?(A(""),{hasError:!1}):(A(eq.SERVICES.VALID_PAN),{hasError:!0}):C.length<=15?X(C)&&Q(C)?(A(""),{hasError:!1}):(A(eq.SERVICES.VALID_PAN),{hasError:!0}):void 0:(A(eq.SERVICES.PANFOLIOVAILD),{hasError:!0}),H=()=>{var e;aD(w,"Unclaimed Redemption/IDCW details","Submit","NA");let a="";switch(z(),o){case"Registered Email ID":K(c)||(a=eq.SERVICES.REGISTER_EMAIL);break;case"DOB":c&&0!==c.length||(a=eq.SERVICES.FEILD);break;case"Bank Account Number":0===c.length?a=eq.SERVICES.INVALID_BANK:q(c)||(a=eq.SERVICES.INVALID_BANK);break;case"Name of Nominee":c||(a=eq.SERVICES.NOMINEE_BLANK);break;case"Name of Investor":c?W(c.replace(/\s/g,""))||(a=eq.SERVICES.ALPHABETS_ONLY):a=eq.SERVICES.INVESTER_NAME}
1a?h(a):(null===(e=z())||void 0===e?void 0:e.hasError)||(h(""),x(!1),F())},K=e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),q=e=>/^\d+$/.test(e),W=e=>/^[a-zA-Z\s]*$/.test(e),Z=e=>/^[A-Z]{5}[0-9]{4}[A-Z]{1}$/.test(e),X=e=>/^[A-Z0-9]{1,15}$/.test(e),Q=e=>/^\d{15}$/.test(e);return p.jsxs("div",{className:"unclamied-Redemption-Holder",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:"Unclaimed Redemption/IDCW details"})]}),p.jsxs("div",{className:"unclaimed-inner-all",children:[p.jsxs("div",{className:"unclamied-inner-column-wide",children:[e&&e.map((e,a)=>p.jsxs("div",{className:"unclamied-details-form",children:[p.jsx("label",{className:"lbl-card-title-2-heading",children:e.title}),p.jsx("label",{className:"lbl-card-title-2-description",children:e.description}),e.pdfUrl&&e.pdfName?p.jsx("div",{className:"details-row-wide",children:p.jsxs("a",{href:e.pdfUrl,className:"download-text",target:"_blank",rel:"noopener noreferrer","aria-label":e.pdfName||O.getAriaLabelFromUrl(e.pdfUrl),children:[p.jsx("div",{children:p.jsx("img",{fetchPriority:"low",className:"",src:"/assets/service_downlod_icon.svg",alt:"Download icon"})}),p.jsx("div",{children:p.jsx("label",{className:"lbl-banner-heading-4-detail",children:e.pdfName})})]})}):""]},a)),k&&p.jsx("div",{className:"unclamied-details-form idcw-redemption-unclaimed-text",dangerouslySetInnerHTML:{__html:k}})]}),p.jsx("div",{className:"disclaimer",children:l&&p.jsx("p",{dangerouslySetInnerHTML:{__html:l}})}),p.jsxs("div",{className:"redemption-detail-form",children:[p.jsx("label",{className:"heading",children:"Fill the following details"}),p.jsxs("div",{className:"detail-form-inner",children:[p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default unclaimed-form",disabled:!1,isError:!!y,label:"PAN Number/Folio Number",value:C,onChange:e=>{E(e.toUpperCase().slice(0,15).replace(/[^A-Z0-9]/g,"")),Y()},errorMessage:y}),p.jsx(g.DefaultDropdown,{optionList:i,label:"Option",className:"material-outlined-dropdown",selectedOption:o,dialogLabel:"Select Option",onSelectCB:e=>{s(e),m(""),h(""),Y()},hasClose:!0}),"DOB"===o?p.jsx("div",{className:"unlclimed-date-component",children:p.jsx(S.DatePickerComponent,{id:"",className:"date-picker-component",label:"DOB",errorMsg:v,dateSeparator:"/",dateFormat:"DDMMYYYY",minDate:new Date("1900/01/01"),maxDate:new Date,selectedDate:c?d.globalHelpers.getFormatedDateFromStringDate(c,"DDMMYYYY"):"",removeClearIcon:!0,onChange:e=>{var a;return G(null!==(a=e.stringDate)&&void 0!==a?a:"")}})}):p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default unclaimed-form",disabled:!o,isError:!!v,label:(()=>{switch(o){case"Registered Email ID":return"Enter Registered Email ID";case"DOB":return"Date of Birth";case"Bank Account Number":return"Bank Account Number";case"Name of Investor":return"Name of Investor";case"Name of Nominee":return"Name of Nominee";default:return""}})(),value:c,onChange:G,errorMessage:v})]}),p.jsx("button",{className:"btn-primary submit-form",onClick:()=>H(),children:"Submit"})]}),p.jsx("div",{className:"apiresponse",children:f&&(b.length>0?p.jsx("div",{className:"api",children:b.map((e,a)=>p.jsxs("div",{className:"apiresponse-investment",children:[p.jsxs("label",{className:"lbl-card-title-2",children:[e.invName,", ",e.invAddress]}),p.jsxs("label",{className:"lbl-card-title-3",children:["Kindly verify above details and contact ",p.jsx("span",{children:p.jsx("a",{href:"mailto:[email protected]","aria-label":O.getAriaLabelFromUrl("mailto:[email protected]","Email customer support"),children:"[email protected]"})})," for support on your pending claims against Redemption/IDCW"]})]},a))}):p.jsx("div",{children:v&&p.jsx("div",{className:"error-message",children:v})}))})]}),p.jsx("div",{className:"downloadapp-container mobile-download-app",children:p.jsx(_.DownloadAppLink,{})})]})},a.UpdateBankIfsc=()=>{var e,a,l,t;let[i,n]=r.useState([]),[o,s]=r.useState(!1),[c,v]=r.useState(!1),[h,b]=r.useState({folioNumber:"",folioName:"",schemeCount:"",bankAccountNumber:"",bankName:"",mobileNo:"",ivnName:"",emailId:""}),[N,f]=r.useState({accountNo:"",accountName:"",ifscCode:"",accountType:"",bankAcn:"",bankAdd1:"",bankAdd2:"",bankAdd3:"",maskedBankAccNo:"",micrNo:"",city:"",state:"",bankCode:"",Defaultbank:"",bankIcon:"",maskFolio:"",tpvVerified:"",netbankingEnabled:!1,upiEnabled:!1}),[,C]=r.useState(""),[E,y]=r.useState(void 0),[S,T]=r.useState(""),[w,I]=r.useState(void 0),[_,O]=r.useState(""),[k,R]=r.useState({bankName:"",ifscCode:"",accountNumber:"",branch:""}),[M,L]=r.useState(null),[P,F]=r.useState({ifscCode:"",branch:"",city:""}),[B,V]=r.useState(!1),[U,Y]=r.useState(!1),[G,z]=r.useState(""),[H,K]=r.useState(null),[q,W]=r.useState(),[Z,X]=r.useState(!1),[Q,J]=r.useState({}),$=u.useLoginContextData(),[ee,ea]=r.useState(""),el=u.useRootContextData(),[et,ei]=r.useState(!1),[en,eo]=r.useState(""),[es,er]=r.useState(""),[ed,ec]=r.useState(""),[eu,em]=r.useState(""),[ev,ep]=r.useState(""),[eh,eg]=r.useState(""),[eb,eN]=r.useState(""),[ef,ex]=r.useState(!1),[eC,eE]=r.useState(void 0),[ey,eS]=r.useState(!1),[eA,ej]=r.useState(!0),eT=async()=>{var e;ej("not-loggedin"!==await (null===(e=$.getLoginStatus)||void 0===e?void 0:e.call($)))};r.useEffect(()=>{if(eA)eG("/servicecenter/updatefoliodetails/updateifsc");else{var e;eG("/"),null===(e=$.triggerLogin)||void 0===e||e.call($,!0,{successLoginCB:()=>eG("/servicecenter/updatefoliodetails/updateifsc")})}},[eA]),r.useEffect(()=>{eT()},[$]),r.useEffect(()=>{let e=/^[A-Z]{4}0[A-Z0-9]{6}$/,a=setTimeout(()=>{M&&M.length<11?(F(e=>({...e,ifscCode:"IFSC Code should be 11 characters, First 4 characters should be alphabets, Fifth character should be zero & 6-11th characters can be numbers or alphabets"})),eS(!0)):(M&&!e.test(M)?F(e=>({...e,ifscCode:"Invalid IFSC format"})):(null==N?void 0:N.ifscCode)===M?F(e=>({...e,ifscCode:eq.UPDATE_BANK_IFSC.SAME_IFSC_UPDATE})):F(e=>({...e,ifscCode:""})),eS(!1))},0);return()=>clearTimeout(a)},[M]),r.useEffect(()=>{var e;eJ(null!==(e=$.loggedInUserDetails.pan)&&void 0!==e?e:"")},[$.loggedInUserDetails.email]),r.useEffect(()=>{eD(),F({ifscCode:"",branch:"",city:""}),ea(""),v(!1)}
1,[h]);let eD=()=>{h&&eU({folioNo:h.folioNumber})};r.useEffect(()=>{(null==N?void 0:N.ifscCode)&&ew(null==N?void 0:N.ifscCode)},[null==N?void 0:N.ifscCode]);let ew=e=>{a8({ifscCode:e},{default:eI,success:e_})},eI=e=>{var a;null===(a=el.triggerToast)||void 0===a||a.call(el,{message:"Branch details not found",toastType:"error"})},e_=e=>{var a,l;let t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.branchDetails;((null==t?void 0:t.length)===0||null==t)&&(null===(l=el.triggerToast)||void 0===l||l.call(el,{message:"Invalid IFSC Code",toastType:"error"})),eg(t[0].branch),eN(t[0].branchCity)};r.useEffect(()=>{M&&11===M.length&&eO(M)},[M]);let eO=e=>{a8({ifscCode:e},{default:ek,success:eR})},ek=e=>{var a;null===(a=el.triggerToast)||void 0===a||a.call(el,{message:"Branch details not found",toastType:"error"})},eR=e=>{var a,l;let t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.branchDetails;((null==t?void 0:t.length)===0||null==t)&&(null===(l=el.triggerToast)||void 0===l||l.call(el,{message:"Invalid IFSC Code",toastType:"error"})),O(t[0].branch),T(t[0].branchCity)};r.useEffect(()=>{N.bankCode&&o&&eM(N.bankCode)},[N.bankCode,o]),r.useEffect(()=>{S&&(null==N?void 0:N.bankCode)&&eF({branchCity:S,bankCode:null==N?void 0:N.bankCode})},[S,N.bankCode]);let eM=e=>{la({bankCode:e},{default:eL,success:eP})},eL=e=>{},eP=e=>{var a,l;(null===(l=e.data)||void 0===l?void 0:null===(a=l.cityNames)||void 0===a?void 0:a.length)&&y(e.data.cityNames)},eF=e=>{ll(e,{default:eB,success:eV})},eB=e=>{},eV=e=>{var a;I(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.branchDetails)},eU=e=>{eE([]),lk(e,{default:eY,success:eH})},eY=e=>{},eH=e=>{f(null==e?void 0:e.bankList[0]),eE(null==e?void 0:e.bankList)},eK=e=>{b(e),L(""),O(""),T("")},eW=e=>{L(""),O(""),T(""),f(e)},eZ=e=>{s(e)},eX=()=>{let e=!0,a=(a,l,t)=>{l?F(e=>({...e,[a]:""})):(F(e=>({...e,[a]:t})),e=!1)};return M?(null==N?void 0:N.ifscCode)===M?(F(e=>({...e,ifscCode:eq.UPDATE_BANK_IFSC.SAME_IFSC_UPDATE})),e=!1,eS(!1)):/^[A-Z]{4}0[A-Z0-9]{6}$/.test(M)?(F(e=>({...e,ifscCode:""})),eS(!1)):(F(e=>({...e,ifscCode:eq.UPDATE_BANK_IFSC.INVALID_IFSC})),eS(!0),e=!1):(F(e=>({...e,ifscCode:eq.UPDATE_BANK_IFSC.EMPTY_IFSC})),e=!1,eS(!1)),a("branch",_,eq.UPDATE_BANK_IFSC.EMPTY_Brnach_NAME),a("city",S,eq.UPDATE_BANK_IFSC.EMPTY_CITY_NAME),e},eQ=()=>{V(!1),Y(!1)},eJ=e=>{n([]),e$({default:e1,success:e0})},e0=e=>{let a=[];e.userFolios.map(e=>{let l={folioName:e.folioName,bankAccountNumber:e.bankAccountNumber,bankName:e.bankName,schemeCount:e.schemeCount,dispName:e.folioName+" /"+e.folioNumber+")",folioNumber:e.folioNumber,mobileNo:e.mobileNo,emailId:e.emailId,ivnName:e.ivnName};a.push(l)}),n(a),a.length>0&&b(a[0])},e1=e=>{var a;C(null!==(a=e.message)&&void 0!==a?a:"")},e2=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ei(!0),ex(!1),l_({folio:h.folioNumber},{default:e3,success:a=>e9(a,e)})},e3=e=>{var a,l;ei(!1),ex(!0),null===(a=el.triggerToast)||void 0===a||a.call(el,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},e9=(e,a)=>{if(ei(!1),e){var l,t,i,n,o,s;let r=a?"OTP Resent successfully":null!==(s=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.msg)&&void 0!==s?s:"";null===(t=$.triggerLoginToast)||void 0===t||t.call($,{message:null!=r?r:"",isSuccess:!0}),ex(!0),V(!1),V(!0),er(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.mobile),ec(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.email),ep(null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.otpToken)}},e6=()=>{ei(!0),ex(!1),lO({folio:h.folioNumber,newIFSCCode:M||"",newCity:S||"",oldBankName:null==N?void 0:N.accountName,oldBankAccountType:N.accountType,oldBankAcno:N.bankAcn,oldIFSCCode:N.ifscCode,oldCity:eb,oldAddress1:N.bankAdd1,oldAddress2:N.bankAdd2,oldAddress3:N.bankAdd3,otp:G,investorName:h.ivnName,otpToken:ev,bankBranch:eh},{default:e=>{var a,l,t;ei(!1),z(""),ex(!0);let i=null!==(t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.message)&&void 0!==t?t:null==e?void 0:e.message;i.includes("attempts Remaining")||i.includes("The OTP you entered has expired. Please request a new OTP to proceed")?V(!0):V(!1),null===(l=el.triggerToast)||void 0===l||l.call(el,{message:null!=i?i:"",toastType:"error"})},success:e=>{if(ei(!1),null==e?void 0:e.data){var a,l;eD();let t=null===(a=e.data)||void 0===a?void 0:a.refNo;em(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.message),W(t),V(!1),X(!0),z("")}}})},e5=(e,a)=>{if("ifsc"===e){var l,t,i;let e=null==a?void 0:null===(i=a.replace(/[^a-zA-Z0-9]/g,""))||void 0===i?void 0:null===(t=i.replace(/^\s+/,""))||void 0===t?void 0:null===(l=t.toUpperCase())||void 0===l?void 0:l.toUpperCase();e.length>11||L(e)}else"branch"===e?(O(a),a?F(e=>({...e,branch:""})):F(e=>({...e,branch:"Branch name cannot be empty"}))):"city"===e&&(T(a),a?F(e=>({...e,city:""})):F(e=>({...e,city:"City name cannot be empty"})))};return r.useEffect(()=>{M&&11===M.length&&/^[A-Z]{4}0[A-Z0-9]{6}$/.test(M)&&M!==(null==N?void 0:N.ifscCode)&&(F(e=>({...e,ifscCode:""})),eS(!1)),_&&F(e=>({...e,branch:""})),S&&F(e=>({...e,city:""}))},[M,_,S]),p.jsxs(r.Fragment,{children:[p.jsx(m.Loader,{showLoader:et}),Z&&p.jsx(x.OverlayPopup,{isFloating:!0,showHeader:!1,showCloseOption:!1,className:"dialog-popup-content",onClose:()=>
1X(!1),content:p.jsx(aT,{title:"Thank you for updating your bank IFSC code details. Your changes have been saved successfully.",description:"Reference ID : ".concat(q),shouldShowButtons:!0,primaryButtonText:"Explore our schemes",secondaryButtonText:"Go to Dashboard",onClickPrimaryButton:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)},onClickSecondaryButton:()=>{X(!1),eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.DASHBOARD)}})}),p.jsxs("div",{className:"update-bank-ifsc",children:[p.jsxs("div",{className:"update-bank-container",children:[p.jsxs("div",{className:"update-bank-title",children:[p.jsxs("div",{className:"arrow-and-title",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/backarrowservicecenter.svg",className:"back-arrow-service",onClick:()=>{window.location.href="/servicecenter/updatefoliodetails"},alt:"back arrow service"}),p.jsx("label",{className:"lbl-section-title",children:"Update Bank IFSC"})]}),p.jsxs("label",{className:"lbl-menu-item",children:["Investor will be able to update the IFSC Code of the bank"," "]})]}),p.jsxs("div",{className:"moutlined-container dropdown-zk-input-bold",children:[p.jsxs("div",{children:[p.jsx(g.DefaultDropdown,{optionList:i,label:"Select Folio",className:"material-outlined-dropdown update-dd",selectedOption:(null==h?void 0:h.folioNumber)+((null==h?void 0:h.folioName)?" ("+(null==h?void 0:h.folioName)+" )":""),dialogLabel:"Select Folio",onSelectCB:eK,displayValueKey:"dispName",hasClose:!0,isError:!!en,errorMessage:en,content:p.jsx(aj,{onChangeValueCB:eK,optionList:i,selectedOption:h})}),0===i.length&&p.jsx("div",{className:"lbl-menu-item empty-info-row-sc",style:{fontSize:"16px",marginTop:"30px"},children:"No folio is selected"})]}),(null==i?void 0:i.length)>0&&eC&&(null==eC?void 0:eC.length)>1&&p.jsx("div",{className:"dropdown-zk-input-bold",children:p.jsx(g.DefaultDropdown,{optionList:eC,label:"Select Bank",className:"material-outlined-dropdown update-dd",selectedOption:"".concat(null==N?void 0:N.accountName," - ").concat(null==N?void 0:N.maskedBankAccNo),dialogLabel:"Select Bank",onSelectCB:eW,hasClose:!0,content:p.jsx(lR,{onChangeValueCB:eW,optionList:eC,selectedOption:N})})})]}),(null==i?void 0:i.length)>0&&p.jsxs(r.Fragment,{children:[p.jsxs("div",{className:"current-bank-details-container",children:[p.jsx("label",{className:"lbl-banner-sub-heading",children:"Current Bank Details"}),p.jsxs("div",{className:"bank-details",children:[p.jsxs("div",{className:"bank-ifsc",children:[p.jsxs("div",{className:"bank-name",children:[p.jsx("label",{className:"lbl-input-heading-1 label-input-heading-1",children:"Bank Name"}),p.jsx("label",{className:"lbl-list-heading label-input-heading",children:(null==N?void 0:N.accountName)||"N/A"})]}),p.jsxs("div",{className:"bank-name",children:[p.jsx("label",{className:"lbl-input-heading-1 label-input-heading-1",children:"IFSC Code"}),p.jsx("label",{className:"lbl-list-heading label-input-heading",children:(null==N?void 0:N.ifscCode)||"N/A"})]})]}),p.jsxs("div",{className:"account-branch",children:[p.jsxs("div",{className:"account-number",children:[p.jsx("label",{className:"lbl-input-heading-1 label-input-heading-1",children:"Account Number"}),p.jsx("label",{className:"lbl-list-heading label-input-heading",children:N.bankAcn||"N/A"})]}),p.jsxs("div",{className:"account-number",children:[p.jsx("label",{className:"lbl-input-heading-1 label-input-heading-1",children:"Branch"}),p.jsx("label",{className:"lbl-list-heading label-input-heading",children:eh||"N/A"})]})]})]})]}),p.jsxs("div",{className:"new-bank-details-container",children:[p.jsx("label",{className:"lbl-banner-sub-heading",children:"New Bank Details"}),p.jsxs("div",{className:"new-content-holder",children:[p.jsxs("div",{className:"ifsc-content ".concat(ey?"ifsc-zk-content":""),children:[p.jsx(j.MOutlinedTextBox,{id:"ifscCode",className:"moutlined-txtbx-default mo-ifsc",disabled:!1,value:M||"",label:"IFSC Code",onChange:e=>e5("ifsc",e),isError:!!P.ifscCode,errorMessage:P.ifscCode}),p.jsx("label",{className:"lbl-primary-txt-content btn-search-ifsc",onClick:()=>eZ(!0),children:"Search IFSC"})]}),p.jsx("div",{className:"branch-content",children:p.jsx(j.MOutlinedTextBox,{id:"bankName",className:"moutlined-txtbx-default mo-branch",label:"Branch",disabled:!1,value:_,onCh
1ange:e=>e5("branch",e),isError:!!P.branch,errorMessage:P.branch})}),p.jsx("div",{className:"city-content",children:p.jsx(j.MOutlinedTextBox,{id:"bankName",className:"moutlined-txtbx-default mo-bankname",label:"City",value:S,onChange:e=>e5("city",e),disabled:!1,isError:!!P.city,errorMessage:P.city})})]})]})]}),p.jsx(A.ConsentInputCheckbox,{className:"regular-consent-checkbox-acceptcheckbox mf-consent-checkbox",disabled:!1,isError:!1,isSelected:c,title:"I / We confirm that the subscription to units is made through my bank account / joint account where first account holder is one of the joint account holders of the bank account. For details on possible NAV allotment basis Payment Methods and Banks,\xa0Click here.",onChange:()=>{v(!c)}})]}),c?"":p.jsx("div",{className:"error-terms",children:ee}),p.jsxs("div",{className:"btn-holder update-bank-ifc-zk-btn",children:[p.jsx("button",{id:"add-bank-account-cancel",className:"btn-outline-primary btn-cancel",onClick:()=>{aD($,"Update Bank IFSC","Cancel","NA"),ez()},children:"Cancel"}),p.jsx("button",{id:"add-bank-account-submit",className:"btn-primary btn-cancel",onClick:()=>{aD($,"Update Bank IFSC","Update IFSC","NA");let e=eX();0===i.length||null===i?eo(eq.SERVICES.SELECT_FOLIO):eo(""),c?ea(""):ea("Terms and conditions should be checked"),e&&c&&e2()},children:"Update IFSC"})]}),o?p.jsx(x.OverlayPopup,{className:"dialog-popup-content m-full-screen sc-updateIfsc-popUp",showHeader:!1,isFloating:!1,onClose:()=>{s(!1),O(""),T("")},content:p.jsx(lI,{bankCityNames:E,selectedCity:S,bankBranchNames:w,selectedBranch:_,onSelectCity:e=>{"string"==typeof e?T(e):"object"==typeof e&&e.city&&T(e.city)},onSelectBranch:e=>{"string"==typeof e?O(e):"object"==typeof e&&e.city&&O(e.city)},handleSaveCB:e=>{e.preventDefault(),s(!1)},onCloseCB:()=>{s(!1),L(null)},branchDetails:w||[],banknameifsc:(null==N?void 0:N.accountName)||"no bank name",onSelectIfscCode:e=>{L(e)}})}):"",B&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content remove-top-borader-spec",isFloating:!0,showHeader:!0,onClose:eQ,content:p.jsx(D.VerifyOTPPopup,{onResend:()=>{e2(!0)},errormessage:"",mobileNumber:null!==(l=(null==h?void 0:null===(e=h.primaryApplicantDetails)||void 0===e?void 0:e.mobileNo)||null)&&void 0!==l?l:es,onOtpChange:e=>{z(e)},onVerify:()=>e6(),isClearField:ef,emailId:null!==(t=(null==h?void 0:null===(a=h.primaryApplicantDetails)||void 0===a?void 0:a.emailId)||null)&&void 0!==t?t:ed})}),U&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content",isFloating:!0,showHeader:!1,onClose:eQ,content:p.jsx(ay,{goNext:()=>{Y(!1),eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.DASHBOARD)},goCancel:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)},secondButtonName:"Explore our schemes",successData:eu,refId:q,buttonName:"Go to Dashboard"})})]})]})},a.UpdateFolioModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState("");r.useEffect(()=>{o()},[]);let o=()=>{aN({default:s,success:c})},s=e=>{},c=e=>{let l=eO(e.data.serviceCentre,J);a(l=l.map(e=>{var a;let l=eM(null!==(a=e.title)&&void 0!==a?a:"");return l&&"internal"==e.pageType&&(e.url=U[l]),e})),t(ek(e.data.serviceCentre,J)),n(eR(e.data.serviceCentre,J))};return p.jsxs("div",{className:"update-folio-module",children:[p.jsxs("div",{className:"Acct-statement-header-label-div",children:[p.jsxs("div",{className:"title-warapper",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:i})]}),p.jsx("label",{className:"lbl-menu-item",children:l})]}),p.jsx("div",{className:"update-folio-module-inner",children:p.jsx(ax,{list:e,categoryName:"Update Folio Details"})})]})},a.UpdateMobileNumberModule=e=>{var a,l,t,i,n,o,s,c,h;let[b,N]=r.useState([]),[f,C]=r.useState(void 0),[E,y]=r.useState([]),[S,A]=r.useState({folioNumber:"",folioName:"",schemeCount:"",bankAccountNumber:"",bankName:"",mobileNo:"",ivnName:"",emailId:""}),[T,D]=r.useState({}),[,w]=r.useState(""),[_,O]=r.useState(""),[k,R]=r.useState(!1),[M,L]=r.useState([]),[P,F]=r.useState(void 0),[B,V]=r.useState(!1),[U,Y]=r.useState(""),[G,H]=r.useState(""),[K,q]=r.useState(""),[W,Z]=r.useState(!1),[X,Q]=r.useState(!1),[J,$]=r.useState(""),[ee,ea]=r.useState(""),[el,et]=r.useState(""),[ei,en]=r.useState(""),[eo,es]=r.useState(""),[er,ed]=r.useState(),[ec,eu]=r.useState(!1),em=u.useLoginContextData(),ev=u.useRootContextData(),[ep,eh]=r.useState(""),[eg,eb]=r.useState(!1),[eN,ef]=r.useState(!1),[ex,eC]=r.useState(""),[eE,ey]=r.useState(""),[eS,eA]=r.useState(""),[ej,eT]=r.useState(!1),[eD,ew]=r.useState(!1),[eI,e_]=r.useState(!1),[eO,ek]=r.useState(!0),eR=async()=>{var e;ek("not-loggedin"!==await (null===(e=em.getLoginStatus)||void 0===e?void 0:e.call(em)))};r.useEffect(()=>{if(eO)"Mobile Number"===e.module?eG("/servicecenter/updatefoliodetails/updatemobile"):eG("/servicecenter/updatefoliodetails/updateemail");else{var a,l;eG("/"),"Mobile Number"===e.module?null===(a=em.triggerLogin)||void 0===a||a.call(em,!0,{successLoginCB:()=>eG("/servicecenter/updatefoliodetails/updatemobile")}):null===(l=em.triggerLogin)||void 0===l||l.call(em,!0,{successLoginCB:()=>eG("/servicecenter/updatefoliodetails/updateemail")})}},[eO]),r.useEffect(()=>{eR()},[em]),r.useEffect(()=>{eM()},[]),r.useEffect(()=>{M.length>0&&F(M[0])},[M]),r.useEffect(()=>{b.length>0&&C(b[0])},[b]);let eM=async()=>{var e;eb(!0),await (null==em?void 0:null===(e=em.getLoggedinUserDetails)||void 0===e?void 0:e.call(em)),await Promise.allSettled([new Promise(e=>{aC({default:eP,success:a=>{eL(a),e()}})}),new Promise(e=>{y([]),e$({default:eJ,success:a=>{eQ(a),e()}})})]),eb(!1)},eL=e=>{N(e.data.email.emailConfig),L(e.data.email.emailConfig)},eP=e=>{},eF=a=>{var l,t;if((null==a?void 0:a.length)>10)return;let i=null==S?void 0:S.mobileNo,n=["6","7","8","9"],o=null===(l=null!==(t=null!=a?a:J)&&void 0!==t?t:"")||void 0===l?void 0:l.replace(/[^0-9]/g,"");return/^\d*$/.test(o)&&o.length<=10?0===o.length||n.includes(o.charAt(0))?($(o),10===o.length?(T[z.mobile.id]="",ee.length,o===i&&(T[z.mobile.id]=eq.SERVICES.SAME_AS_EXISTING_MOBILE)):o.length<10&&(T[z.mobile.id]="".concat(eq.SERVICES.ENTER_VALID_MOBILE))):n.includes(o.charAt(0))||(T[z.mobile.id]="Mobile number must start with 6, 7, 8, or 9"):0===o.length?T[z.mobile.id]="".concat(eq.SERVICES.MANDATORY_ERROR):o.length<10&&(T[z.mobile.id]="".concat(eq.SERVICES.ENTER_VALID," ").concat(e.module)),10===o.length&&10===ee.length&&o!==ee&&(T[z.reEnterMobile.id]=eq.SERVICES.MATCH_MOBILE),D(T),0===Object.keys(T).length},eB=e=>{var a,l;if((null==e?void 0:e.length)>10)return;let t=null==S?void 0:S.mobileNo,i=["6","7","8","9"],n=null===(a=null!==(l=null!=e?e:ee)&&void 0!==l?l:"")||void 0===a?void 0:a.replace(/[^0-9]/g,"");return J===t&&(T[z.mobile.id]=eq.SERVICES.SAME_AS_EXISTING_MOBILE),/^\d*$/.test(n)&&n.length<=10?0===n.length||i.includes(n.charAt(0))?(ea(n),10===n.length?(T[z.reEnterMobile.id]="",10===J.length&&n!==J&&(T[z.reEnterMobile.id]=eq.SERVICES.MATCH_MOBILE)):n.length<10&&(T[z.reEnterMobile.id]="".concat(eq.SERVICES.ENTER_VALID_MOBILE),J.length<10&&(T[z.mobile.id]="".concat(eq.SERVICES.ENTER_VALID_MOBILE)))):i.includes(n.charAt(0))||(T[z.reEnterMobile.id]="Mobile number must start with 6, 7, 8, or 9"):0===n.length?T[z.reEnterMobile.id]="".concat(eq.SERVICES.MANDATORY_ERROR):n.length<10&&(T[z.reEnterMobile.id]="".concat(eq.SERVICES.ENTER_VALID," Mobile Number")),10===n.length&&J.length<10&&(T[z.mobile.id]="".concat(eq.SERVICES.ENTER_VALID," Mobile Number")),D(T),0===Object.keys(T).length},eV=a=>{let l={};if("Mobile Number"===e.module){let e=null==S?void 0:S.mobileNo,t=["6","7","8","9"];J||void 0!==a&&a!==z.mobile.id||(l[z.mobile.id]=eq.SERVICES.MANDATORY_ERROR),ee||void 0!==a&&a!==z.reEnterMobile.id||(l[z.reEnterMobile.id]=eq.SERVICES.MANDATORY_ERROR),J&&(/^\d{10}$/.test(J)?t.includes(J.charAt(0))||(l[z.mobile.id]="Mobile number must start with 6, 7, 8, or 9"):l[z.mobile.id]="".concat(eq.SERVICES.ENTER_VALID_MOBILE)),ee&&(/^\d{10}$/.test(ee)?t.includes(ee.charAt(0))||(l[z.reEnterMobile.id]="Mobile number must start with 6, 7, 8, or 9"):l[z.reEnterMobile.id]="".concat(eq.SERVICES.ENTER_VALID_MOBILE)),J!==ee&&10===J.length&&10===ee.length&&(l[z.reEnterMobile.id]=eq.SERVICES.MATCH_MOBILE),J===e&&(l[z.mobile.id]=eq.SERVICES.SAME_AS_EXISTING_MOBILE)}if("Email"===e.module){let e=null==S?void 0:S.emailId;ar(el)?el===e&&(l[z.email.id]=eq.SERVICES.SAME_AS_EXISTING_EMAIL):l[z.email.id]="".concat(eq.SERVICES.ENTER_VALID),ar(ei)?el!==ei&&
1(l[z.reEnterEmail.id]=eq.SERVICES.MATCH_EMAIL):l[z.reEnterEmail.id]="".concat(eq.SERVICES.ENTER_VALID)}return D(l),0===Object.keys(l).length},eU=function(a,l,t,i){var n,o;let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4],r=arguments.length>5?arguments[5]:void 0;"email"===r||"mobile"===r?Y("email"===r?"E":"M"):Y("email"===a?"E":"M");let d="Email"===e.module?"E":"M",c="Email"===e.module?"Email":"Mobile",u={folio:null==S?void 0:S.folioNumber,reqType:d,changeRequestDesc:c,newValue:(null==t?void 0:t.trim())||"",currentEmailId:null!==(n=S.emailId)&&void 0!==n?n:"",currentMobileNo:null!==(o=S.mobileNo)&&void 0!==o?o:"",relationship:"Email"===e.module?f:P,...i?{resendFlag:i}:{}};eb(!0),"email"===r||"mobile"===r?aS(u,r,{default:eY,success:e=>eH(e,s,a)}):aS(u,a,{default:eY,success:e=>eH(e,s,a)})},eY=e=>{var a,l,t;if((null==e?void 0:e.statusCode)==="EC017"){eb(!1),ef(!0);return}null===(a=ev.triggerToast)||void 0===a||a.call(ev,{message:null!==(t=null!==(l=null==e?void 0:e.msg)&&void 0!==l?l:null==e?void 0:e.message)&&void 0!==t?t:"",toastType:"error"}),eb(!1)},eH=(e,a,l)=>{var t,i,n,o,s;let r=a?"OTP Resent successfully":null!==(n=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.msg)&&void 0!==n?n:"";null===(i=ev.triggerToast)||void 0===i||i.call(ev,{message:r,toastType:"success"}),(null==e?void 0:e.data)&&!ej&&(V(!0),"email"===l?(ey(ei),ey(null==e?void 0:null===(o=e.data)||void 0===o?void 0:o.email),q("")):(eA(ee),eA(null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.mobile),H(""))),eb(!1)},eK=e=>{eb(!0),aA({folio:null==S?void 0:S.folioNumber,mobileOtp:G,emailOtp:K,reqType:U},{default:eW,success:eZ})},eW=e=>{var a,l;R(!0),eb(!1),null===(a=ev.triggerToast)||void 0===a||a.call(ev,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"}),(null==e?void 0:e.message)==="Please enter a valid Email & Mobile OTP"?(H(""),q(""),e_(!0),ew(!0)):"Email OTP is validated successfully; however, an Incorrect Mobile OTP is entered"===e.message?(H(""),ew(!0)):(q(""),e_(!0))},eZ=a=>{var l;if("Mobile Number"===e.module){var t={notification:27001};window.notify_visitors.manual.onclick(t)}if("Email"===e.module){var t={notification:27002};window.notify_visitors.manual.onclick(t)}ew(!1),e_(!1),V(!1),eu(!0),es(null==a?void 0:null===(l=a.data)||void 0===l?void 0:l.msg),ed(a.data.referenceNumber),eb(!1),eT(!1)},eX=async()=>{var e;await (null===(e=em.getLoggedinUserDetails)||void 0===e?void 0:e.call(em)),y([]),e$({default:eJ,success:eQ})},eQ=e=>{let a=[];eb(!1),e.userFolios.map(e=>{let l={folioName:e.folioName,bankAccountNumber:e.bankAccountNumber,bankName:e.bankName,schemeCount:e.schemeCount,dispName:e.folioName+" /"+e.folioNumber+")",folioNumber:e.folioNumber,mobileNo:e.mobileNo,emailId:e.emailId,ivnName:e.ivnName};a.push(l)}),y(a),A(""===S.folioNumber?a[0]:S)},eJ=e=>{var a;eb(!1),w(null!==(a=e.message)&&void 0!==a?a:"")},e0=async()=>{var e,a;let l=await (null===(e=em.getLoggedinUserDetails)||void 0===e?void 0:e.call(em));eK(null!==(a=null==l?void 0:l.user_id)&&void 0!==a?a:"")},e1=r.useCallback((a,l)=>{var t;eT(!0);let i=null!==(t=em.loggedInUserDetails.email)&&void 0!==t?t:"",n="",o="mobile";"Email"===e.module?(n=ei,o="email"):"Mobile Number"===e.module&&(n=ee,o="mobile"),eU(a,i,n,"email"===a?"REE":"REM",!0,o)},[e.module,ei,ee]),e2=e=>{eC(""),A(e);let a=S[e.id];a?($(a.newMobileNumber),ea(a.reEnterMobileNumber),et(a.newEmail),en(a.reEnterEmail)):($(""),ea(""),et(""),en(""),C("Self"),F("Self"))},e3=e=>{eV(e)},e9=()=>{eu(!1),Z(!1),eb(!0),"Mobile Number"===e.module?eC(J):eC(el),$(""),ea(""),et(""),en(""),eX()};return p.jsxs(r.Fragment,{children:[p.jsx(m.Loader,{showLoader:eg}),ec&&p.jsx(x.OverlayPopup,{isFloating:!0,showHeader:!1,showCloseOption:!1,className:"dialog-popup-content",onClose:()=>e9(),content:p.jsx(aT,{title:"Email"===e.module?"Thank you for updating your email. Your changes have been saved successfully.":"Thank you for updating your mobile number. Your changes have been saved successfully.",description:"Reference ID : ".concat(er),shouldShowButtons:!0,primaryButtonText:"Explore our schemes",secondaryButtonText:"Go to Dashboard",onClickPrimaryButton:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)},onClickSecondaryButton:()=>{eu(!1),eG("/dashboard")}})}),p.jsxs("div",{className:"Update-service-module Update-zk-service-module ".concat(B?"update-zk-show-verify":""),children:[p.jsxs("div",{className:"Update-service-inner",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsxs("label",{className:"lbl-services-title",children:["Update ","Email"===e.module?"Email ID":"Mobile Number"]})]}),p.jsx("label",{className:"lbl-menu-item",children:"Mobile Number"===e.module?"Investor will be able to update the mobile number of a particular Folio.":"Investor will be able to update the email ID of a particular Folio."}),p.jsxs("div",{className:"folio-reg-val",children:[p.jsx("div",{className:"onclick-fol
1io-action",onClick:()=>{Q(!X)},children:p.jsx(g.DefaultDropdown,{optionList:E,label:"Select Folio",className:"material-outlined-dropdown update-dd",selectedOption:(null==S?void 0:S.folioNumber)+((null==S?void 0:S.folioName)?" ("+(null==S?void 0:S.folioName)+" )":""),dialogLabel:"Select Folio",onSelectCB:e2,displayValueKey:"dispName",hasClose:!0,isError:!!ep,errorMessage:ep,content:p.jsx(aj,{onChangeValueCB:e2,optionList:E,selectedOption:S})})}),E.length>0&&p.jsx("div",{className:"muted-text-box",children:(null==S?void 0:S.folioNumber)&&p.jsx(p.Fragment,{children:p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox update-dd",label:null===(a=e.formData)||void 0===a?void 0:a.headerTitle,id:"newMobileNumber",value:ex.length>0?ex:"Email"===e.module?S.emailId:S.mobileNo,disabled:!0,disableCopyPaste:!0})})})]}),E.length>0&&p.jsxs("div",{className:"dd-entering-data",children:["Mobile Number"===e.module&&[p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",label:null===(l=e.formData)||void 0===l?void 0:l.Labelone,isError:!!T[z.mobile.id],id:"newMobileNumber",value:J,inputMode:"numeric",onChange:eF,errorMessage:T[z.mobile.id]||eq.SERVICES.TEN_DIGIT_MOBILE,onFocus:eF,onFocusOut:()=>e3(z.mobile.id)},"1"),p.jsx(j.MOutlinedTextBox,{id:"reEnterMobileNumber",className:"moutlined-txtbx-default updating-textbox",label:"Re-Enter New Mobile ".concat(null===(t=e.formData)||void 0===t?void 0:t.Labeltwo),value:ee,onChange:eB,isError:!!T[z.reEnterMobile.id],errorMessage:T[z.reEnterMobile.id]||eq.SERVICES.MOBILE_MATCH,inputMode:"numeric",onFocus:eB,onFocusOut:()=>e3(z.reEnterMobile.id)},"2"),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown updating-textbox",label:null===(i=e.formData)||void 0===i?void 0:i.Labelthree,optionList:M,selectedOption:P,onSelectCB:e=>{F(e)},hasClose:!0},"3")],"Email"===e.module&&[p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",value:el,onChange:e=>{let a=null==S?void 0:S.emailId,l=e.replace(/\s/g,""),t={...T};return et(l),t[z.email.id]="",t[z.reEnterEmail.id]="",/^[a-zA-Z0-9@._-]*$/.test(l)?""===l?t[z.email.id]="".concat(eq.SERVICES.ENTER_VALID):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)&&ar(l)?l===a&&(t[z.email.id]=eq.SERVICES.SAME_AS_EXISTING_EMAIL):t[z.email.id]="".concat(eq.SERVICES.ENTER_VALID):t[z.email.id]="".concat(eq.SERVICES.ENTER_VALID),""===t[z.email.id]&&ei&&ei!==l&&(t[z.reEnterEmail.id]=eq.SERVICES.MATCH_EMAIL),D(t),Object.values(t).every(e=>""===e)},label:null===(n=e.formData)||void 0===n?void 0:n.Labelone,isError:!!T[z.email.id],errorMessage:T[z.email.id]||eq.SERVICES.VALID_EMAILID,onFocus:()=>{}},"1"),p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",value:ei,onChange:e=>{let a=null==S?void 0:S.emailId,l=(null==e?void 0:e.replace(/\s+/g,""))||"",t={...T};return en(l),t[z.reEnterEmail.id]="",t[z.email.id]="",/^[a-zA-Z0-9@._-]*$/.test(l)?""===l?t[z.reEnterEmail.id]="".concat(eq.SERVICES.ENTER_VALID):/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(l)&&ar(l)?el!==l&&(t[z.reEnterEmail.id]=eq.SERVICES.MATCH_EMAIL):t[z.reEnterEmail.id]="".concat(eq.SERVICES.ENTER_VALID):t[z.reEnterEmail.id]="".concat(eq.SERVICES.ENTER_VALID),el===a&&(t[z.email.id]=eq.SERVICES.SAME_AS_EXISTING_EMAIL),D(t),Object.values(t).every(e=>""===e)},label:"Re-Enter New ".concat(null===(o=e.formData)||void 0===o?void 0:o.Labeltwo),isError:!!T[z.reEnterEmail.id],errorMessage:ei?T[z.reEnterEmail.id]:eq.SERVICES.VALID_EMAIL,onFocus:()=>{}},"2"),p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown updating-textbox",label:null===(s=e.formData)||void 0===s?void 0:s.Labelthree,optionList:b,selectedOption:f,onSelectCB:e=>{C(e)},hasClose:!0},"3")]]}),0===E.length&&p.jsx("div",{className:"lbl-menu-item empty-info-row-sc",style:{fontSize:"16px",marginTop:"20px"},children:"No folio is selected"})]}),p.jsxs("div",{className:"update-btns",children:[p.jsx("button",{className:"btn-outline-primary updating",onClick:()=>{aD(em,"Update Mobile Number","Cancel","NA"),$(""),ea(""),A({folioNumber:"",folioName:"",schemeCount:"",bankAccountNumber:"",bankName:"",mobileNo:"",ivnName:"",emailId:""}),ez()},children:"Cancel"}),p.jsx("button",{className:"btn-primary updating",onClick:()=>{var a;if(aD(em,"Update Mobile Number","Update","NA"),0===E.length||null===E){eh(eq.SERVICES.SELECT_FOLIO);return}if(eh(""),!eV())return;let l=null!==(a=em.loggedInUserDetails.email)&&void 0!==a?a:"";"Mobile Number"===e.module&&(Y("M"),eU("mobile",l,ee)),"Email"===e.module&&(Y("E"),eU("email",l,ei))},children:"Update"})]}),B&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content dialog-popup-content-mobile-email-update",isFloating:!0,showHeader:!1,onClose:()=>{V(!1),q(""),H(""),eT(!1)},content:p.jsx(aE,{mobilenumber:"Mobile Number"===e.module?null!==(c=S.mobileNo||null)&&void 0!==c?c:eS:"",email:"Email"===e.module?null!==(h=S.emailId||null)&&void 0!==h?h:eE:"",errormessage:"",onMobileOtpChange:e=>{H(e)},onMailOtpChange:e=>{q(e)},onVerify:e0,onResend:e1,otpValueMobile:G,otpValueMail:K,newMobileNumberVal:ee,newEmailVal:ei,selectedFolioMobileNo:null==S?void 0:S.mobileNo,selectedFolioEmailId:null==S?void 0:S.emailId,typeOtpFrom:U,updateContextType:"Mobile Number"===e.module?"M":"E",isClearMobileOtp:eD,isClearEmailOtp:eI})}),W&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content",isFloating:!0,showHeader:!1,onClose:()=>e9(),content:p.jsx(ay,{goNext:()=>{Z(!1),eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.DASHBOARD)},goCancel:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)},secondButtonName:"Explore our schemes",successData:eo,refId:er,buttonName:"Go to Dashboard"})}),eN&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content show-lock-debit-freeze-fund-popup-content show-lock-debit-freeze-fund-popup-content-email-mobile",showHeader:!0,isFloating:!1,title:"Account Freezed",onClose:()=>{ef(!1)},content:p.jsx(I.FundLokPopupDialog,{})}),k&&p.jsx(v.CustomToast,{id:"serviceupdatemobilenumber",message:_,limit:3,autoClose:!0,autoCloseDelay:5e3,type:"error",theme:"dark"})]})]})},a.UpdateNomineeModule=()=>{var e,a,l,t,i,n;let[o,s]=r.useState([]),[c,v]=r.useState([]),[h,b]=r.useState({}),[N,f]=r.useState([]),[C,E]=r.useState({}),[y,S]=r.useState(!1),[A,j]=r.useState(!1),[T,w]=r.useState(!1),[_,O]=r.useState({}),[k,R]=r.useState(!1),[M,L]=r.useState(""),[P,F]=r.useState(!1),[B,V]=r.useState(""),[U,Y]=r.useState(),[G,z]=r.useState(""),[H,K]=r.useState(a4),[q,W]=r.useState(-1),[Z,X]=r.useState(!1),[Q,J]=r.useState(""),[$,ee]=r.useState(!1),[ea,el]=r.useState(),[et,ei]=r.useState(),[en,eo]=r.useState(),[es,er]=r.useState(!1),[ed,ec]=r.useState(!1),[eu,em]=r.useState(!1),ev=u.useRootContextData(),[ep,eh]=r.useState(""),[eg,eb]=r.useState(""),[eN,ef]=r.useState(""),ex=u.useLoginContextData(),[eC,eE]=r.useState(""),[ey,eS]=r.useState(!1),[eA,ej]=r.useState(!1),[eT,eD]=r.useState(0),[ew,eI]=r.useState(!1),[e_,eO]=r.useState(!1),[ek,eR]=r.useState(null),[eM,eL]=r.useState(!1),[eP,eF]=r.useState(!1),[eB,eV]=r.useState(""),[eU,eY]=r.useState(""),[ez,eH]=r.useState(""),[eK,eW]=r.useState(!1),eZ=769>u.useScreenWidth(),eX=eU&&"0"!==eU?"Rs ".concat(eU):ez?"".concat(ez,"%"):"NA",eQ=[{name:"Document Type",apiKey:"document_type"},{name:"Document Number",apiKey:"document_number"},{name:"Date of Birth",apiKey:"dob"},{name:"Relationship with Investor",apiKey:"relationship"},{name:"Email ID",apiKey:"email"},{name:"Mobile Number",apiKey:"mobile"},{name:"Allocation",apiKey:"ratio"}],[eJ,e0]=r.useState(!0),e1=async()=>{var e;e0("not-loggedin"!==await (null===(e=ex.getLoginStatus)||void 0===e?void 0:e.call(ex)))},e2=()=>{ae(!0,"update",o[0],0)},e3=e=>{var a,l;return{...e,pinCode:null!==(l=null!==(a=e.pinCode)&&void 0!==a?a:e.pin)&&void 0!==l?l:""}},[e9,e6]=r.useState([]),e5=e=>{let a=e3(e),l=["name","relationship","ratio"].some(e=>!a[e]||""===a[e].toString().trim());return a.pan&&a.pan.trim(),a.documentNumber&&""!==a.documentNumber.trim()&&a.documentType&&a.documentType.trim(),l},e4=e=>{if(!e)return!0;let[a,l,t]=e.replace(/\//g,"-").split("-").map(e=>parseInt(e,10));if(!a||!l||!t)return!1;let i=new Date(t,l-1,a);if(isNaN(i.getTime()))return!1;let n=new Date,o=n.getFullYear()-i.getFullYear(),s=n.getMonth()-i.getMonth();return(s<0||0===s&&n.getDate()<i.getDate())&&o--,o>=18},e8=r.useMemo(()=>o.map((e,a)=>({nom:e,index:a})).filter(e=>{let{nom:a}=e;return e4(a.dob)}),[o]);r.useEffect(()=>{let e=document.getElementById("root");return eZ&&(null==e||e.classList.add("scroll-lock")),()=>{null==e||e.classList.remove("scroll-lock")}},[eZ]),r.useEffect(()=>{let e=o.some(e=>e5(e));eL(e),e?e6(o.map(()=>!0)):e6([])},[o]),r.useEffect(()=>{if(eJ)eG("/servicecenter/updatefoliodetails/updatenominee");else{var e;eG("/"),null===(e=ex.triggerLogin)||void 0===e||e.call(ex,!0,{successLoginCB:()=>eG("/servicecenter/updatefoliodetails/updatenominee")})}},[eJ]),r.useEffect(()=>{e1()},[ex]),r.useEffect(()=>{ao()},[ex.loggedInUserDetails.email]),r.useEffect(()=>{(N[0]!==C||"true"!==sessionStorage.getItem("ADD_NOMINEE_FROM_DASHBOARD"))&&e7()},[null==C?void 0:C.folioNumber]);let e7=async()=>{var e;ej(!0);let a=await (null==ex?void 0:null===(e=ex.getLoggedinUserDetails)||void 0===e?void 0:e.call(ex));await Promise.allSettled([new Promise(e=>{var l;aw({userId:null!==(l=null==a?void 0:a.pan)&&void 0!==l?l:""},{default:a=>{ai(a),e()},success:a=>{aa(a),e()}})}),new Promise(e=>{e$({default:a=>{ac(a),e()},success:a=>{ad(a),e()}})})]),ej(!1)};r.useEffect(()=>{null!==et?(el(et),ei(null)):el(0)},[o]);let ae=function(e,a){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a4,t=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4?arguments[4]:void 0;if(aD(ex,"Update Nominee Details","Add Nominee","NA"),eD(e=>e+1),i||0!==N.length&&null!==N)eE("");else{eE(eq.SERVICES.SELECT_FOLIO);return}z(a),K(l),"update"==a?(ei(t),S(e),j(!1),W(t)):"delete"==a?(W(null),eW(!0),s(e=>JSON.parse(JSON.stringify(e)).filter((e,a)=>a!==t))):(S(e),W(null),j(!0))},aa=e=>{e.folioList.map(e=>e.folioDetails.folioNo);let a=e.folioList.map(e=>e.folioDetails);v(a),(async()=>
1{let e=await d.SessionStorage.instance.profileFolioNumber.get(),l=e?JSON.parse(e):null;if(setTimeout(()=>{sessionStorage.removeItem("profileFolioNumber")},2e3),l&&(null==l?void 0:l.behaviour)=="update-nominee"){let e=a.find(e=>e.folioNo==l.folioNo),t=null==e?void 0:e.nominees.find((e,a)=>{if(e.name=l.nominee_name)return{index_:a,...e}});ae(!0,"update",t,null==t?void 0:t.index_,!0)}})()};r.useEffect(()=>{if(C.folioNumber&&c){var e;an(c,null!==(e=C.folioNumber)&&void 0!==e?e:"")}},[C.folioNumber,c]);let[al,at]=r.useState(!1);r.useEffect(()=>{if(c.length>0&&N.length>0&&!al){at(!0);let e="true"===sessionStorage.getItem("ADD_NOMINEE_FROM_DASHBOARD");if(setTimeout(()=>{sessionStorage.removeItem("ADD_NOMINEE_FROM_DASHBOARD")},3e3),e){let e=N.find(e=>{let a=c.find(a=>a.folioNo===e.folioNumber);return!(null==a?void 0:a.nominees)||0===a.nominees.length});e&&E(e)}}},[c,N,al]);let ai=e=>{},an=(e,a)=>{var l,t,i;let n=e.filter(e=>e.folioNo===a),o=n.flatMap(e=>e.nominees||[]).filter(e=>e.folio===a).sort((e,a)=>{let l=e=>{var a;if("NOM"===e)return 1;let l=parseInt(null!==(a=null==e?void 0:e.replace("NOM",""))&&void 0!==a?a:"",10);return isNaN(l)?Number.MAX_SAFE_INTEGER:l};return l(e.type)-l(a.type)}),r=o.find(e=>"Y"===e.incapacitationFlag);
1eV(null!==(l=null==r?void 0:r.name)&&void 0!==l?l:""),eY(null!==(t=null==r?void 0:r.incapacitationThreshold_Aum)&&void 0!==t?t:""),eH(null!==(i=null==r?void 0:r.incapacitationThreshold_Percent)&&void 0!==i?i:""),b(n?n[0]:{}),s([...o])},ao=()=>{a1({default:as,success:ar})},as=e=>{},ar=e=>{var a;O(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.config)},ad=async e=>{let a=[];e.userFolios.map(e=>{let l={folioName:e.folioName,bankAccountNumber:e.bankAccountNumber,bankName:e.bankName,schemeCount:e.schemeCount,dispName:e.folioName+" /"+e.folioNumber+")",folioNumber:e.folioNumber};a.push(l)}),f(a);let l=await d.SessionStorage.instance.profileFolioNumber.get(),t=l?JSON.parse(l):null;if(setTimeout(()=>{sessionStorage.removeItem("profileFolioNumber")},2e3),t&&((null==t?void 0:t.behaviour)=="update-nominee"||(null==t?void 0:t.behaviour)=="add-nominee")){let e=a.find(e=>e.folioNumber==(null==t?void 0:t.folioNo));e&&E(e),(null==t?void 0:t.behaviour)=="add-nominee"&&ae(!0,"add",null,-1,!0);return}"true"!==sessionStorage.getItem("ADD_NOMINEE_FROM_DASHBOARD")&&E(void 0===C.folioNumber?a.length>0?a[0]:{}:C)},ac=e=>{};r.useEffect(()=>{eu&&(e7(),em(!1))},[eu]);let au=e=>{E(e),an(c,e.folioNumber)},am=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];ej(!0),a2({Folio:null==h?void 0:h.folioNo},{default:av,success:a=>ap(a,e)})},av=e=>{if((null==e?void 0:e.statusCode)==="EC017"){ej(!1),R(!0);return}ej(!1)},ap=(e,a)=>{var l,t,i,n,o,s,r,d,c,u,m;if(ah(null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.msg)){ej(!1);let l=a?"OTP Resent successfully":null!==(o=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.msg)&&void 0!==o?o:"";null===(i=ev.triggerToast)||void 0===i||i.call(ev,{message:l,toastType:"success"}),(null==e?void 0:null===(n=e.data)||void 0===n?void 0:n.msg)?(eh(null==e?void 0:null===(s=e.data)||void 0===s?void 0:s.email),eb(null==e?void 0:null===(r=e.data)||void 0===r?void 0:r.mobile),ef(null==e?void 0:null===(d=e.data)||void 0===d?void 0:d.otpToken),w(!1),w(!0),S(!1)):null===(u=ev.triggerToast)||void 0===u||u.call(ev,{message:null!==(m=null===(c=e.data)||void 0===c?void 0:c.msg)&&void 0!==m?m:"",toastType:"error"})}},ah=e=>["OTP","triggered","registered","mobile","email","folio"].some(a=>e.toLowerCase().includes(a.toLowerCase())),ag=()=>{if(eS(!1),h&&"object"==typeof h){var e;ej(!0),H&&(H.name||H.dob||H.pan||H.mobile)&&(null!==q&&-1!==q?o.splice(q,1,H):o.push(H));let a=null!=ek?ek:{soaFlag:"N",incapacitationValue:"",incapacitationThresholdPercent:"0",incapacitationThresholdAum:"0"},l="Y"===a.soaFlag?"Yes":"No";a3({folio:null!==(e=null==h?void 0:h.folioNo)&&void 0!==e?e:"",otp:M,otpToken:eN,soaFlag:l,incapacitationValue:a.incapacitationValue,incapacitationThresholdPercent:Number(a.incapacitationThresholdPercent)||0,incapacitationThresholdAum:Number(a.incapacitationThresholdAum)||0,nominees:o.slice(0,10).map((e,a)=>{var l,t,i,n,o,s,r,d,c,u,m,v,p,h,g,b,N,f,x,C,E,y,S,A,j,T;return{nomType:"NOM".concat(a+1),name:null!==(d=null==e?void 0:e.name)&&void 0!==d?d:"",ratio:null!==(c=null==e?void 0:e.ratio)&&void 0!==c?c:"",dob:(null==e?void 0:null===(l=e.dob)||void 0===l?void 0:l.trim())?function(e){let[a,l,t]=e.split("-");return"".concat(l,"-").concat(a,"-").concat(t)}(e.dob.replace(/\//g,"-")):"",relation:null!==(u=null==e?void 0:e.relationship)&&void 0!==u?u:"",email:null!==(m=null==e?void 0:e.email)&&void 0!==m?m:"",mobileNumber:null!==(v=null==e?void 0:e.mobile)&&void 0!==v?v:"",address1:null!==(p=null==e?void 0:e.address1)&&void 0!==p?p:"",address2:null!==(h=null==e?void 0:e.address2)&&void 0!==h?h:"",city:null!==(g=null==e?void 0:e.city)&&void 0!==g?g:"",state:null!==(b=null==e?void 0:e.state)&&void 0!==b?b:"",country:null!==(N=null==e?void 0:e.country)&&void 0!==N?N:"",pinCode:null!==(x=null!==(f=null==e?void 0:e.pin)&&void 0!==f?f:null==e?void 0:e.pinCode)&&void 0!==x?x:"",identityType:null!==(C=null==e?void 0:e.documentType)&&void 0!==C?C:"",idNumber:null!==(E=null==e?void 0:e.documentNumber)&&void 0!==E?E:"",guardianName:null!==(y=null==e?void 0:null===(t=e.guardian)||void 0===t?void 0:t.name)&&void 0!==y?y:"",guardianPan:null!==(S=null==e?void 0:null===(i=e.guardian)||void 0===i?void 0:i.pan)&&void 0!==S?S:"",guardianRelation:null!==(A=null==e?void 0:null===(n=e.guardian)||void 0===n?void 0:n.relationship
1)&&void 0!==A?A:"",guardianDob:(null==e?void 0:null===(o=e.guardian)||void 0===o?void 0:o.dob)?function(e){if(e.includes("/")){let[a,l,t]=e.replace(/\//g,"-").split("-");return"".concat(l,"-").concat(a,"-").concat(t)}let[a,l,t]=e.split("-");return"".concat(l,"-").concat(a,"-").concat(t)}(e.guardian.dob):"",guardianEmail:null!==(j=null==e?void 0:null===(s=e.guardian)||void 0===s?void 0:s.email)&&void 0!==j?j:"",guardianMobile:null!==(T=null==e?void 0:null===(r=e.guardian)||void 0===r?void 0:r.mobile)&&void 0!==T?T:""}})},{default:ab,success:aN})}},ab=e=>{var a,l;null===(a=ev.triggerToast)||void 0===a||a.call(ev,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"}),eS(!0),L(""),w(!1),"Maximum attempts reached. Please reinitiate the transaction"!==e.message&&w(!0),ej(!1)},aN=e=>{var a;window.notify_visitors.manual.onclick({notification:27003});let l=JSON.parse(JSON.stringify(o));null!==q?l.splice(q,1,H):l.push(H),s(l),K(a4),ej(!1),er(!0),w(!1),L(""),V(null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.msg),Y(e.data.referenceNumber),eI(!1),eW(!1)},af=()=>{F(!1),ee(!1),J(""),el(0)},ax=e=>{if(eM){e6(a=>a.map((a,l)=>l===e?!a:a));return}ea!==e?el(e):el(null)},aC=e=>{if(1===e)return"First";if(2===e)return"Second";if(3===e)return"Third";if(4===e)return"Fourth";if(5===e)return"Fifth";if(6===e)return"Sixth";if(7===e)return"Seventh";else if(8===e)return"Eighth";else if(9===e)return"Ninth";else if(10===e)return"Tenth"},aE=()=>{aD(ex,"Update Nominee Details","Cancel","NA"),ec(!0)},aS=()=>{er(!1)};return p.jsxs(r.Fragment,{children:[p.jsx(m.Loader,{showLoader:eA}),es&&p.jsx(x.OverlayPopup,{isFloating:!0,showHeader:!1,showCloseOption:!1,className:"dialog-popup-content",onClose:()=>aS(),content:p.jsx(aT,{title:"Thank you for updating your nominee details. Your changes have been saved successfully.",description:"Reference ID : ".concat(U),shouldShowButtons:!0,primaryButtonText:"Explore our schemes",secondaryButtonText:"Go to Dashboard",onClickPrimaryButton:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)},onClickSecondaryButton:()=>{er(!1),eG("/dashboard")}})}),p.jsxs("div",{className:"update-nominee-module update-zk-nominee-module",children:[p.jsxs("div",{className:"update-nominee-titlesection",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:"Update Nominee Details"})]}),!eZ&&p.jsxs("label",{className:"lbl-menu-item info",children:[" ","Investor will be able to Update the nominee of particular Folio."]})]}),eM&&eZ&&p.jsxs("h1",{className:"nominee-details-missing",children:["As per recent SEBI guidelines, some nominee details are missing. Please"," ",(null==o?void 0:o.length)===1&&p.jsx("span",{onClick:e2,style:{color:"var(--color-red-bd-1)",textDecoration:"underline",cursor:"pointer"},children:"click here"})," ",(null==o?void 0:o.length)===1&&" to ","update it."]}),p.jsx("div",{className:"onclick-folio-action",children:p.jsx(g.DefaultDropdown,{optionList:N,label:"Select Folio",className:"material-outlined-dropdown mpdd-folio",selectedOption:(null==C?void 0:C.folioNumber)?"".concat(C.folioNumber).concat((null==C?void 0:C.folioName)?" ("+C.folioName+" )":""):"",dialogLabel:"Select Folio",onSelectCB:au,isError:!!eC,errorMessage:eC,hasClose:!0,content:p.jsx(aj,{onChangeValueCB:au,optionList:N,selectedOption:C})})}),eM&&!eZ&&p.jsxs("h1",{className:"nominee-details-missing",children:["As per recent SEBI guidelines, some nominee details are missing. Please"," ",(null==o?void 0:o.length)===1&&p.jsx("span",{onClick:e2,style:{color:"var(--color-red-bd-1)",textDecoration:"underline",cursor:"pointer"},children:"click here"})," ",(null==o?void 0:o.length)===1&&" to ","update it."]}),p.jsxs("div",{className:"nominee-details",children:[(null==N?void 0:N.length)>0&&(null==o?void 0:o.length)>0&&p.jsx("label",{className:"lbl-card-title-2 header",children:"Nominee Details"}),o.map((e,a)=>{let l=eM?e9[a]:ea===a;return p.jsxs("div",{className:"details-block",children:[p.jsxs("label",{className:"lbl-sub-heading details-index-text change-zk-font-wt-nominee",children:[p.jsx("img",{fetchPriority:"low",src:"/assets/personicon.svg",alt:"personicon"}),aC(a+1)," Nominee"]}),p.jsxs("div",{className:"data-item",children:[p.jsxs("div",{className:"lbl-card-title-1 name",onClick:()=>ax(a),children:[p.jsx("div",{className:"text",children:e.name}),p.jsx("div",{className:"arrow-icon ".concat(l?"":"rotate"),children:p.jsx("img",{fetchPriority:"low",src:d.pathChanger("arrow_back_up.svg"),alt:"Collapse"})})]}),l&&p.jsxs(r.Fragment,{children:[p.jsxs("div",{className:"details-row web",children:[p.jsx("div",{className:"data-row",children:eQ.map(a=>{var l,t,i,n,o;return p.jsxs("div",{className:"column",children:[p.jsx("span",{className:"lbl-txt-content text",children:a.name}),p.jsxs("span",{className:"lbl-banner-title-1 value",children:["document_type"===a.apiKey?(null===(l=e.documentNumber)||void 0===l?void 0:l.trim())?e.documentType:(null===(t=e.pan)||void 0===t?void 0:t.trim())?"PAN CARD":"-":"document_number"===a.apiKey?(null===(i=e.documentNumber)||void 0===i?void 0:i.trim())?e.documentNumber:(null===(n=e.pan)||void 0===n?void 0:n.trim())?e.pan:"-":(null===(o=e[a.apiKey])||void 0===o?void 0:o.trim())?e[a.apiKey]:"-","ratio"===a.apiKey?"%":""]})]},a.apiKey)})}),p.jsxs("div",{className:"button-row add-nominee",children:[0!==a&&p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"btn-add-nominee btn-primary",onClick:()=>aE(),children:"Delete Nominee"}),p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"btn-add-nominee btn-primary",onClick:()=>ae(!0,"update",e,a),children:"Update Nominee"})]}),o.length>1&&e5(e)&&p.jsxs("div",{className:"exclamation-mark-notice",children:[p.jsx("img",{fetchPriority:"low",src:d.pathChanger("exclamation-mark-notice-2.svg"),alt:"notice-img",className:"exclamation-mark-notice-img",draggable:"false"}),p.jsx("h2",{className:"exclamation-mark-notice-text",children:"Some details are missing. Kindly update the details"})]})]}),p.jsx("div",{className:"details-row mobile",children:eQ.slice(0,2).map(a=>{var l;return p.jsxs("div",{className:"column",children:[p.jsx("span",{className:"lbl-txt-content text ",children:a.name}),p.jsxs("span",{className:"lbl-banner-title-1 value",children:["document_type"===a.apiKey?null!==e.documentNumber?e.documentType:null!==e.pan?"PAN CARD":"-":"document_number"===a.apiKey?null!==e.documentNumber?e.documentNumber:null!==e.pan?e.pan:"-":(null===(l=e[a.apiKey])||void 0===l?void 0:l.trim())?e[a.apiKey]:"-","ratio"==a.apiKey?"%":""]})]})})}),p.jsx("div",{className:"details-row mobile",children:eQ.slice(2,4).map(a=>p.jsxs("div",{className:"column",children:[p.jsx("span",{className:"lbl-txt-content text ",children:a.name}),p.jsxs("span",{className:"lbl-banner-title-1 value",children:[e[a.apiKey],"ratio"==a.apiKey?"%":""]})]}))}),p.jsx("div",{className:"details-row mobile",children:eQ.slice(4,6).map(a=>p.jsxs("div",{className:"column",children:[p.jsx("span",{className:"lbl-txt-content text ",children:a.name}),p.jsxs("span",{className:"lbl-banner-title-1 value",children:[e[a.apiKey],"ratio"==a.apiKey?"%":""]})]}))}),p.jsx("div",{className:"details-row mobile",children:p.jsxs("div",{className:"data-row",children:[eQ.slice(6,7).map(a=>p.jsxs("div",{className:"column last",children:[p.jsx("span",{className:"lbl-txt-content text ",children:a.name}),p.jsxs("span",{className:"lbl-banner-title-1 value",children:[e[a.apiKey],"ratio"==a.apiKey?"%":""]})]})),p.jsxs("div",{className:"button-row add-nominee",children:[p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"btn-add-nominee btn-primary",disabled:!1,onClick:()=>ae(!0,"update",e,a),children:"Update Nominee"}),0!==a?p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"btn-add-nominee btn-primary",disabled:!1,onClick:()=>aE(),children:"Delete Nominee"}):""]}),o.length>1&&e5(e)&&p.jsxs("div",{className:"exclamation-mark-notice-mob",children:[p.jsx("img",{fetchPriority:"low",src:d.pathChanger("exclamation-mark-notice-2.svg"),alt:"notice-img",className:"exclamation-mark-notice-img-mob",draggable:"false"}),p.jsx("h2",{className:"exclamation-mark-notice-text-mob",children:"Some details are missing. Kindly update the details"})]})]})})]})]})]},a)})]}),p.jsxs(r.Fragment,{children:[0===o.length?p.jsx("div",{className:"lbl-txt-content empty-info-row empty-zk-info-row",children:"Nominee details are currently unavailable. Please add nominee."}):null,e8.length>0&&(null===(e=o[0])||void 0===e?void 0:e.soaFlag)&&p.jsxs("div",{className:"soa-container",children:[p.jsx("div",{className:"soa-title-c",children:p.jsx("h2",{className:"section-title",children:"SOA Details "})}),p.jsx("div",{className:"soa-row",children:p.jsx("span",{className:"soa-label",children:(null===(a=o[0])||void 0===a?void 0:a.so
1aFlag)==="Y"?"Name of Nominee":"Nomination: Yes"})}),p.jsx("hr",{className:"soa-line-between"}),p.jsx("h2",{className:"section-title",children:"Incapacitation Authorization"}),p.jsxs("div",{className:"soa-row-g",children:[p.jsxs("div",{className:"soa-row-c",children:[p.jsx("span",{className:"soa-label",children:"Nominee Name:"}),p.jsx("span",{className:"soa-value ".concat(eB?"":"soa-value-na"),children:eB||"-"})]}),p.jsxs("div",{className:"soa-row-c",children:[p.jsx("span",{className:"soa-label",children:"Assets in % / Assets in Rupees:"}),p.jsx("span",{className:"soa-value ".concat("NA"!==eX?"":"soa-value-na"),children:"NA"!==eX?eX:"-"})]})]})]}),p.jsxs("div",{className:"button-row add-nominee add-margin-zk-button",children:[o.length<3?p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"btn-add-nominee btn-primary",disabled:!1,onClick:()=>ae(!0,"add"),children:(o.length,"+ Add Nominee")}):null,o.length>0?p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"btn-add-nominee btn-primary btn-save-nominee",disabled:!1,onClick:()=>{if(aD(ex,"Update Nominee Details","Update","NA"),!eK){var e;null===(e=ev.triggerToast)||void 0===e||e.call(ev,{message:"Looks like nothing was updated. Your nominee details are already up to date.",toastType:"default"});return}let a=o.map(e=>parseFloat(e.ratio)).reduce((e,a)=>e+a,0);if(100===a){if(X(!1),ee(!1),J(""),eM||!(o.length>0))return;eO(!0)}else(a<100||a>100)&&(X(!0),ee(!0),J("Total allocation should be 100%"))},children:"Save Nominee"}):null]})]}),y?p.jsx(x.OverlayPopup,{className:"dialog-popup-content add-zk-nominee-popup-content",showHeader:!1,showCloseOption:!1,onClose:()=>S(!1),content:p.jsx(a0,{configdata:_,onClose:()=>S(!1),foliodetails:h,onAddOrUpdateNominee:e=>{eI(!0);let a=JSON.parse(JSON.stringify(e));K(()=>a),S(!1),eW(!0),s(e=>{let l;return null!==q&&e.length>0?(l=e.slice())[q]=a:(l=[...e,a],W(e.length)),l.length,l})},source:G,selectedNominee:H,nomineeData:o,isFromEdit:A,selectedNomineeIndex:ea,isNomineeMissing:"update"===G&&e5(H),setHasNomineeFormChanged:eW},eT)}):null,e_&&!eM&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content soa-details-overlay",showHeader:!1,isFloating:!0,showCloseOption:!1,hideCloseIcon:!0,onClose:()=>eO(!1),content:p.jsx(a5,{nominees:o,onClose:()=>eO(!1),onContinue:e=>{eR(e),eO(!1),am(!1)}})}),T&&ew?p.jsx(x.OverlayPopup,{className:"dialog-popup-content service-verifyotp remove-top-borader-spec",showHeader:!0,isFloating:!0,showCloseOption:!1,onClose:()=>{S(!1),w(!1),L("")},content:p.jsx(D.VerifyOTPPopup,{otpICon:"delete_nominee.png",onResend:()=>{L(""),am(!0)},errormessage:"",mobileNumber:null!==(i=(null==h?void 0:null===(l=h.primaryApplicantDetails)||void 0===l?void 0:l.mobileNo)||null)&&void 0!==i?i:eg,onOtpChange:e=>{L(e)},onVerify:()=>{ag()},isClearField:ey,verifyOtpLoader:eA,emailId:null!==(n=(null==h?void 0:null===(t=h.primaryApplicantDetails)||void 0===t?void 0:t.emailId)||null)&&void 0!==n?n:ep})}):null,P?p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,isFloating:!0,onClose:()=>F(!1),content:p.jsx(ay,{goNext:af,successData:B,secondButtonName:"Explore our schemes",refId:U,buttonName:"Go to Dashboard",goCancel:()=>{eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.MUTUAL_FUNDS)}})}):"",$&&Z?p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,isFloating:!0,onClose:()=>{F(!1),X(!1),J("")},content:p.jsx(a9,{goNext:af,infoData1:Q,infoData2:"Please reallocate to reach the above total",buttonText:"Edit Allocation",imgUrl:"/assets/edit_icon.svg"})}):null,k&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content show-lock-debit-freeze-fund-popup-content",showHeader:!0,isFloating:!1,title:"Account Freezed",onClose:()=>{R(!1)},content:p.jsx(I.FundLokPopupDialog,{})}),ed?p.jsx(x.OverlayPopup,{className:"dialog-popup-content dialog-popup-default",showHeader:!1,onClose:()=>{ec(!1)},content:p.jsx(a6,{onClickNo:()=>{ec(!1)},onClickYes:()=>{ec(!1),eW(!0),ae(!0,"delete",H,null!=ea?ea:0)},delteItemLength:o.length})}):""]})]})},a.UpdatePersonalDetailsModule=()=>{let[e,a]=r.useState([]),[l,t]=r.useState(""),[i,n]=r.useState("");r.useEffect(()=>{o()},[]);let o=()=>{aN({default:s,success:c})},s=e=>{},c=e=>{let l=eO(e.data.serviceCentre,$);l=l.map(e=>{var a;let l=eM(null!==(a=e.title)&&void 0!==a?a:"");return l&&"internal"===e.pageType&&(e.url=U[l]),e}),t(ek(e.data.serviceCentre,$)),a(l),n(eR(e.data.serviceCentre,$))};return p.jsxs("div",{className:"update-folio-module",children:[p.jsxs("div",{className:"Acct-statement-header-label-div",children:[p.jsxs("div",{className:"title-warapper",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title",children:i})]}),p.jsx("label",{className:"lbl-menu-item",children:l})]}),p.jsx("div",{className:"update-folio-module-inner-personaldetails",children:p.jsx(ax,{list:e,categoryName:"Update Personal Details"})})]})},a.UpiAutopay=()=>{let[e,a]=r.useState(),l=u.useLoginContextData(),[t,i]=r.useState([]),[n,o]=r.useState(!1),[s,c]=r.useState(!1),v=s?t:t.slice(0,3),h=u.useRootContextData(),[g,b]=r.useState(!0),[N,x]=r.useState(!1),C=async()=>{var e;b("not-loggedin"!==await (null===(e=l.getLoginStatus)||void 0===e?void 0:e.call(l))),x(!0)};r.useEffect(()=>{if(g)eG("/servicecenter/ourservices/autopay");else{var e;eG("/"),null===(e=l.triggerLogin)||void 0===e||e.call(l,!0,{successLoginCB:()=>eG("/servicecenter/ourservices/autopay")})}},[g]),r.useEffect(()=>{C()},[l]),r.useEffect(()=>{N&&g&&(o(!0),A(),E())},[g,N]);let E=async()=>{var e,a;let t=await (null===(e=l.getLoggedinUserDetails)||void 0===e?void 0:e.call(l));lQ({pan:null!==(a=null==t?void 0:t.pan)&&void 0!==a?a:"",method:"autoupi"},{default:S,success:y}
1)},y=e=>{o(!1),i(e.data)},S=e=>{if(o(!1),"PAN is not registered with OTM"!==e.message){var a,l;null===(a=h.triggerToast)||void 0===a||a.call(h,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})}},A=()=>{lJ({default:j,success:T})},j=e=>{var a,l;null===(a=h.triggerToast)||void 0===a||a.call(h,{message:null!==(l=e.msg)&&void 0!==l?l:"",toastType:"error"})},T=e=>{a(e.data.upiAutopay)},D=()=>{aD(l,"UPI Autopay","Register New UPI Autopay","NA"),eG("/servicecenter/ourservices/e-mandate/upiautopayDetails")},w=null==e?void 0:e.title,I=null==e?void 0:e.description,O=null==e?void 0:e.details,k=null==e?void 0:e.button,R=null==e?void 0:e.advantageTitle,M=null==e?void 0:e.advantageDetails;return p.jsxs("div",{className:"emandate-upi-module-sec",children:[p.jsx(m.Loader,{showLoader:n}),p.jsxs("div",{className:"title-container",children:[p.jsxs("div",{className:"title-section",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title title",children:w})]}),p.jsx("label",{className:"lbl-sub-heading info isMobile-hide",children:I})]}),t.length>3&&p.jsx("button",{id:"nominee-selection-add-new",type:"button",className:"view-all-button",disabled:!1,onClick:()=>c(e=>!e),children:s?"View Less":"View All"})]}),p.jsx("div",{className:"mandate-flow-sec",children:0===t.length&&p.jsx(lW,{details:O,emandateBtnTitle:k,handleRegisterBtn:D})}),t.length>0&&p.jsxs("div",{className:"mandate-bank-sec",children:[p.jsx("div",{className:"bank-list",children:null==v?void 0:v.map((e,a)=>p.jsx(lX,{details:e}))}),void 0!==k&&""!==k&&p.jsx("div",{className:"register-btn",children:p.jsx(f.ButtonWithLoader,{className:"register-btn-sty btn-primary",value:null!=k?k:"",isLoading:!1,onClick:D,disabled:!1})}),p.jsx("div",{className:"note-sec",children:p.jsxs("p",{className:"lbl-input-heading",children:[p.jsx("strong",{children:"Note:"})," One time e-Mandate registration charges may be leviedby your bank."]})})]}),p.jsxs("div",{className:"mandate-advatage-sec",children:[p.jsx("div",{className:"title lbl-services-title",children:R}),p.jsx(lq,{advantageDetails:null!=M?M:[]})]}),p.jsx(_.DownloadAppLink,{})]})},a.UpiAutopayDetailsModule=()=>{var e,a,l,t,i,n,o,s,c,v,h,b,N,C,E,y,A;let[T,D]=r.useState(!1),[w,I]=r.useState(),[_,O]=r.useState(),[k,R]=r.useState((null==w?void 0:w.upiExpiry.includes("Until Cancelled"))?"Until Cancelled":null!==(c=null==w?void 0:w.upiExpiry[0])&&void 0!==c?c:""),M=()=>{let e=new Date,a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},[P,F]=r.useState(M()),[B,V]=r.useState("â¹1,00,000"),[U,G]=r.useState([]),z=u.useLoginContextData(),[H,K]=r.useState(0),[q,W]=r.useState(""),[Z,X]=r.useState(""),[Q,J]=r.useState(),[$,ee]=r.useState(!1),ea={firstName:null!==(v=null==z?void 0:null===(e=z.loggedInUserDetails)||void 0===e?void 0:e.first_name)&&void 0!==v?v:"",lastName:null!==(h=null==z?void 0:null===(a=z.loggedInUserDetails)||void 0===a?void 0:a.last_name)&&void 0!==h?h:"",email:null!==(b=null==z?void 0:null===(l=z.loggedInUserDetails)||void 0===l?void 0:l.email)&&void 0!==b?b:"",phone:null!==(N=null==z?void 0:null===(t=z.loggedInUserDetails)||void 0===t?void 0:t.phone_number)&&void 0!==N?N:"",pan:null!==(C=null==z?void 0:null===(i=z.loggedInUserDetails)||void 0===i?void 0:i.pan)&&void 0!==C?C:"",token:null!==(E=null==z?void 0:null===(n=z.loggedInUserDetails)||void 0===n?void 0:n.token)&&void 0!==E?E:"",clientId:null!==(y=null==z?void 0:null===(o=z.loggedInUserDetails)||void 0===o?void 0:o.client_id)&&void 0!==y?y:""},[el,et]=r.useState(0),ei=el<=768,en=u.useRootContextData(),{Razorpay:eo}=L.useRazorpay(),[es,er]=r.useState(!1),[ed,ec]=r.useState((null===(s=U[0])||void 0===s?void 0:s.bankAccountverify)!=="N"),eu=r.useRef(0);r.useEffect(()=>{er(!0),eh(),F(ef)},[]),r.useEffect(()=>{var e,a;et(null===(e=window)||void 0===e?void 0:e.innerWidth);let l=()=>{var e;return et(null===(e=window)||void 0===e?void 0:e.innerWidth)};return null===(a=window)||void 0===a||a.addEventListener("resize",l),()=>{var e;null===(e=window)||void 0===e||e.removeEventListener("resize",l)}},[]),r.useEffect(()=>{var e,a,l;(null==z?void 0:null===(e=z.loggedInUserDetails)||void 0===e?void 0:e.email)!==void 0&&(null==z?void 0:null===(a=z.loggedInUserDetails)||void 0===a?void 0:a.email)!==""&&eu.current<2&&(em({userId:(null==z?void 0:null===(l=z.loggedInUserDetails)||void 0===l?void 0:l.email)||""}),eu.current+=1)},[z]);let em=e=>{l2(e,{default:ep,success:ev})},ev=e=>{var a,l,t,i;er(!1);let n=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.bankList.findIndex(e=>"Y"===e.bankAccountverify);-1!==n&&K(n),ec((null==e?void 0:null===(t=e.data)||void 0===t?void 0:null===(l=t.bankList[n])||void 0===l?void 0:l.bankAccountverify)!=="Y"),G(null==e?void 0:null===(i=e.data)||void 0===i?void 0:i.bankList)},ep=e=>{var a,l;er(!1),G([]),null===(a=en.triggerToast)||void 0===a||a.call(en,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},eh=()=>{lJ({default:eg,success:eb})},eg=e=>{var a,l;null===(a=en.triggerToast)||void 0===a||a.call(en,{message:null!==(l=e.msg)&&void 0!==l?l:"",toastType:"error"})},eb=e=>{var a,l,t,i,n,o;I(e.data.upiAutopay),O(e.data.successPopup),R((null==e?void 0:null===(t=e.data)||void 0===t?void 0:null===(l=t.upiAutopay)||void 0===l?void 0:null===(a=l.upiExpiry)||void 0===a?void 0:a.includes("Until Cancelled"))?"Until Cancelled":null!==(o=null==e?void 0:null===(n=e.data)||void 0===n?void 0:null===(i=n.upiAutopay)||void 0===i?void 0:i.upiExpiry[0])&&void 0!==o?o:"")},eN=()=>{let e=new Date;e.setFullYear(e.getFullYear()+30);let a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},ef=()=>{let e=new Date;e.setFullYear(e.getFullYear()+30);let a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(a,"-").concat(l,"-").concat(t)},ex=()=>{let e=new Date;return e.setMonth(e.getMonth()+6),e.setHours(0,0,0,0),e},eC=e=>{R(e)},eE=e=>{let[a,l,t]=null==e?void 0:e.split(/[-\/]/);F("".concat(a.padStart(2,"0"),"-").concat(l.padStart(2,"0"),"-").concat(t)),new Date(t,l-1,a)<ex()?X("Cannot choose date less than 6 months"):X("")},ey=e=>{l1(e,{default:eA,success:eS})},eS=e=>{var a,l,t,i;eI({orderId:null!==(t=null==e?void 0:null===(a=e.data)||void 0===a?void 0:a.orderId)&&void 0!==t?t:"",customerId:null!==(i=null==e?void 0:null===(l=e.data)||void 0===l?void 0:l.customerId)&&void 0!==i?i:"",paymentMode:u.PaymentModes.UPI_AUTOPAY,amount:"0",razorPaymentSuccessCallBack:e=>{}})},eA=e=>{var a,l;null===(a=en.triggerToast)||void 0===a||a.call(en,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},ej=(e,a)=>{var l;let t=null===(l=null!=e?e:B)||void 0===l?void 0:l.trim().replace(/[^0-9]+/g,""),i=Number(t);if(0===i?W(Y.amountZero):i<5e3?W(Y.mandateAmountLesser):i>1e5?W(Y.upiAmountGreater):W(""),!a){let e=eT(t);V("â¹".concat(e))}},eT=e=>
1e?parseFloat(e).toLocaleString("en-US",{minimumFractionDigits:0}):"",eD=e=>{if(e)switch(e){case u.PaymentModes.UPI:return"upi";case u.PaymentModes.NETBANKING:return"netbanking"}},ew=e=>e&&e===u.PaymentModes.E_MANDATE?l6.EMANDATE:"",eI=e=>{let{orderId:a,paymentMode:l,amount:t,razorPaymentSuccessCallBack:i,customerId:n}=e;J(null),ee(!1);let o=Number(null==t?void 0:t.trim().replace(/[^0-9.-]+/g,"")),s=new eo({key:ew(l),order_id:a,amount:o,customer_id:n,currency:"INR",name:"AXIS_MF",timeout:300,handler:function(e){J(e),e_(e,l==u.PaymentModes.E_MANDATE?"mandate":l==u.PaymentModes.UPI_AUTOPAY?"autoupi":eD(l))},retry:{enabled:!1},recurring:l===u.PaymentModes.E_MANDATE||l===u.PaymentModes.UPI_AUTOPAY||void 0,prefill:{name:(null==ea?void 0:ea.firstName)||(null==ea?void 0:ea.lastName)?((null==ea?void 0:ea.firstName)+" "+(null==ea?void 0:ea.lastName)).trim():void 0,email:ea.email,method:l===u.PaymentModes.NETBANKING?void 0:eD(l),contact:ea.phone},notes:"Razorpay corporate office",theme:{color:"3399cc"},modal:{escape:!1,confirm_close:!0,ondismiss:()=>{ee(!0)}}});s.on("payment.failed",function(e){e_(e.error.metadata,l==u.PaymentModes.E_MANDATE?"mandate":l==u.PaymentModes.UPI_AUTOPAY?"autoupi":eD(l)),J(e)}),er(!1),s.open()},e_=(e,a)=>{var l,t,i,n,o,s;let r={method:a,razorpay_payment_id:null!==(t=null!==(l=null==e?void 0:e.razorpay_payment_id)&&void 0!==l?l:null==e?void 0:e.payment_id)&&void 0!==t?t:"",razorpay_order_id:null!==(n=null!==(i=null==e?void 0:e.razorpay_order_id)&&void 0!==i?i:null==e?void 0:e.order_id)&&void 0!==n?n:"",razorpay_signature:null!==(o=null==e?void 0:e.razorpay_signature)&&void 0!==o?o:"",pageURL:null!==(s=window.location.href)&&void 0!==s?s:""};er(!0),eO(r)},eO=e=>{l3(e,{default:eR,success:ek})},ek=e=>{D(!0),er(!1)},eR=e=>{var a,l;er(!1),null===(a=en.triggerToast)||void 0===a||a.call(en,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})},eM=e=>{let a=Number(null==e?void 0:e.trim().replace(/[^0-9.-]+/g,"")),l=Number(null==B?void 0:B.trim().replace(/[^0-9.-]+/g,"")),t=a+l,i=eT(l>0?t.toString():e);0===t?W(Y.amountZero):t<5e3?W(Y.mandateAmountLesser):t>1e7?W(Y.upiAmountGreater):W(""),V("â¹".concat(i))},eL=e=>{var a;(null===(a=U[null!=e?e:0])||void 0===a?void 0:a.bankAccountverify)==="Y"&&K(null!=e?e:0)};return p.jsxs("div",{className:"emandate-upi-module-sec",children:[p.jsx(m.Loader,{showLoader:es}),p.jsxs("div",{className:"emandate-upi-details-sec",children:[p.jsxs("div",{className:"title-section",children:[p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-services-title title ",children:null==w?void 0:w.title})]}),p.jsx("label",{className:"lbl-sub-heading info isMobile-hide",children:null==w?void 0:w.upiAccountTitle})]}),p.jsx("div",{className:"sub-description isMobile-hide",children:p.jsx("p",{className:"lbl-banner-title-6",children:null==w?void 0:w.upiAccountDesc})}),p.jsx("div",{className:"bank-list-sec",children:null==U?void 0:U.map((e,a)=>p.jsx(l$,{index:a,selectedIndex:H,onChange:()=>eL(a),details:e}))}),p.jsx("div",{className:"form-title",children:p.jsx("div",{className:"title lbl-services-title",children:null==w?void 0:w.upiDetailTitle})}),p.jsxs("div",{style:{gridTemplateColumns:ei?"1fr":"Until Cancelled"!==k?"1fr 1fr 1fr":"1fr 1fr",width:"Until Cancelled"!==k||ei?"100%":"70%"},className:"inputs-sec",children:[p.jsx(g.DefaultDropdown,{className:"material-outlined-dropdown menulist-dd common-sty",optionList:null==w?void 0:w.upiExpiry,onSelectCB:e=>eC(e),selectedOption:k,label:null!==(A=null==w?void 0:w.upiExpiryText)&&void 0!==A?A:"",hasClose:!0,dialogLabel:"UPI Autopay Expiry"}),"Until Cancelled"!==k&&p.jsx(S.DatePickerComponent,{className:"date-picker-component common-sty",label:"Date",dateSeparator:"/",dateFormat:"DDMMYYYY",errorMsg:Z,placeHolder:["DD","MM","YYYY"],minDate:new Date,maxDate:new Date((()=>{let e=new Date;e.setFullYear(e.getFullYear()+30);let a=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),t=e.getFullYear();return"".concat(t,"/").concat(l,"/").concat(a)})()),selectedDate:P?(e=>{if(e){var[a,l,t]=e.replace(/\//g,"-").split("-").map(Number);if(4===String(a).length){let e=t;t=a,a=e}if(a&&l&&t)return new Date(t,l-1,a)}})(P):void 0,onChange:e=>{var a;return eE(null!==(a=e.stringDate)&&void 0!==a?a:"")}}),p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default updating-textbox",label:"UPI Autopay Amount",isError:""!==q,id:"newMobileNumber",value:B,onChange:e=>ej(e,!1),errorMessage:q,inputMode:"numeric",onFocus:e=>ej(e,!0),onFocusOut:()=>
1{let e=Number(null==B?void 0:B.trim().replace(/[^0-9.-]+/g,""));0===e?W(Y.amountZero):e<5e3?W(Y.mandateAmountLesser):e>1e5?W(Y.upiAmountGreater):W("")}},"1")]}),p.jsxs("div",{className:"amount-chips",style:{width:"Until Cancelled"!==k||ei?"100%":"70%"},children:[p.jsx("div",{className:"chip-list",children:null==w?void 0:w.upiAmount.map((e,a)=>p.jsxs("div",{onClick:()=>eM(e),className:"chip lbl-primary-banner-title-2",children:[p.jsx("span",{className:"span-1",children:"+"}),p.jsx("span",{className:"span-1",children:"â¹"}),p.jsx("span",{className:"span-2",children:eT(e)})]},a))}),p.jsx("div",{className:"chip-des",children:p.jsx("p",{className:"lbl-txt-info-4",children:null==w?void 0:w.upiAmountNote})})]}),p.jsxs("div",{className:"proceed-note",children:[p.jsx("div",{className:"proceed-btn",children:p.jsx(f.ButtonWithLoader,{className:"proceed-btn-sty btn-primary ",value:"Proceed",isLoading:!1,onClick:()=>{let e=Number(null==B?void 0:B.trim().replace(/[^0-9.-]+/g,""));if("Until Cancelled"!==k&&""===P)X(Y.expiryNeeded);else if(e<5e3)W(Y.mandateAmountLesser);else if(e>1e5)W(Y.upiAmountGreater);else if(""===B)W(Y.amountNotEmpty);else if(""===q&&""===Z){var a;let l=U[H];ey({startDate:M(),date:"Until Cancelled"===k?eN():""!==P?P:eN(),amount:e,method:"autoupi",bankName:l.bankName,bankAccountNo:null!==(a=l.fullBankAccountNumber)&&void 0!==a?a:"",bankAccType:l.bankAccType,bankIFSCCode:l.bankIFSCCode})}},disabled:ed})}),p.jsx("div",{className:"note",children:p.jsxs("p",{className:"lbl-input-heading",children:[p.jsx("strong",{children:"Note:"})," The token payment of Rs 1 will be deducted from your account for UPI Autopay registration process."]})})]})]}),T&&p.jsx(x.OverlayPopup,{className:"dialog-popup-content",showHeader:!1,isFloating:!1,onClose:()=>D(!1),content:p.jsx(l0,{details:_})})]})},a.VerifyOtp=aE,a.WarningInfoDialog=a9,a.WhatsappServiceModule=()=>{var e,a;let[l,t]=r.useState(tt[0]),[i,n]=r.useState(tt),[o,c]=r.useState(!1),[v,h]=r.useState(!1),[g,b]=r.useState([]),[N,f]=r.useState({bannerText:"",banner:"",mobileNo:"",benefits:[],faq_q:[],faq_a:[],optionInDescription:"",optionOutDescription:"",termsConditionsUrl:""}),[C,E]=r.useState([]),[y,S]=r.useState(!1),[T,w]=r.useState({pan:"",mobile_no:""}),[I,O]=r.useState({mobile_no:"",pan:""}),[k,M]=r.useState(),[L,P]=r.useState(""),[F,B]=r.useState(!1),[V,U]=r.useState(""),[Y,G]=r.useState(),[z,H]=r.useState(""),[K,q]=r.useState(""),[W,Z]=r.useState({mobile:"",email:""}),[X,Q]=r.useState(""),[J,$]=r.useState(!1),ee=u.useLoginContextData(),et=ee.isUserLoggedIn(),[ei,en]=r.useState(!1),eo=u.useRootContextData(),[er,ed]=r.useState(!1),[ec,eu]=r.useState(!1),[em,ev]=r.useState(!1),[ep,eh]=r.useState(""),[eg,eb]=r.useState(!1),[eN,ef]=r.useState(!0),[ex,eC]=r.useState({mobile:"",email:""}),[eE,ey]=r.useState(!1),[eS,eA]=r.useState("opt-in");r.useEffect(()=>{eI()},[ee]),r.useEffect(()=>{eT()},[k]),r.useEffect(()=>{ej()},[]);let ej=async()=>{var e,a,l;let t=await (null==ee?void 0:null===(e=ee.getLoggedinUserDetails)||void 0===e?void 0:e.call(ee));eC({email:null!==(a=null==t?void 0:t.email)&&void 0!==a?a:"",mobile:null!==(l=null==t?void 0:t.phone_number)&&void 0!==l?l:""})},eT=async()=>{var e,a,l,t;let i=await (null==ee?void 0:ee.loggedInUserDetails),n=k&&(null==k?void 0:null===(e=k.consentDetail)||void 0===e?void 0:e.mobileNo);eu(!!(null==i?void 0:i.pan)),k&&et&&(ey(!1),w({pan:null!==(l=null==i?void 0:i.pan)&&void 0!==l?l:T.pan,mobile_no:(null==k?void 0:null===(a=k.consentDetail)||void 0===a?void 0:a.notification_consent_status)==="Opt-in"?null!=n?n:"":null!==(t=null==i?void 0:i.phone_number)&&void 0!==t?t:""}))};r.useEffect(()=>{eI()},[]),r.useEffect(()=>{eB()},[]),r.useEffect(()=>{et&&eD()},[et]);let eD=async()=>{await eY()};r.useEffect(()=>{em&&ew()},[em]);let ew=async()=>{await e$(),await eY()};r.useEffect(()=>{var e,a,l,i,o,s;if(k&&et){let s=null==k?void 0:null===(e=k.consentDetail)||void 0===e?void 0:e.whatsapp_consent_status;ef(null==k?void 0:null===(a=k.FE_Action)||void 0===a?void 0:a.isCheckbox_Req),eh(s),s.replace(/-/g,"").toLowerCase()===ti.DeemedOpt.replace(/-/g,"").toLowerCase()?(n(null==tt?void 0:null===(l=tt.map)||void 0===l?void 0:l.call(tt,(e,a)=>(0===a?e.disabled=!0:1===a&&(e.disabled=!1),e))),tt&&(null==tt?void 0:tt.some(e=>"Opt-out"===e.apiKey))?t(tt[1]):t(tt[0])):s.replace(/-/g,"").toLowerCase()===ti.optIn.replace(/-/g,"").toLowerCase()?(n(null==tt?void 0:null===(i=tt.map)||void 0===i?void 0:i.call(tt,(e,a)=>(0===a?e.disabled=!0:1===a&&(e.disabled=!1),e))),tt&&(null==tt?void 0:tt.some(e=>"Opt-out"===e.apiKey))?t(tt[1]):t(tt[0])):(n(null==tt?void 0:null===(o=tt.map)||void 0===o?void 0:o.call(tt,(e,a)=>(0===a?e.disabled=!1:1===a&&(e.disabled=!0),e))),tt&&(null==tt?void 0:tt.some(e=>"Opt-out"===e.apiKey))?t(tt[0]):t(tt[1]))}else if(k){let e=null==k?void 0:null===(s=k.consentDetail)||void 0===s?void 0:s.whatsapp_consent_status;e.replace(/-/g,"").toLowerCase()===ti.optOut.replace(/-/g,"").toLowerCase()?(t(tt[0]),c(!1)):e.replace(/-/g,"").toLowerCase()===ti.optIn.replace(/-/g,"").toLowerCase()&&(t(tt[1]),c(!1)),ef(!0)}},[k,ti,tt]);let eI=async()=>
1{try{await d.SessionStorage.instance.profileMenuSelection.get()&&$(!0)}catch(e){console.error("Error accessing session or saving portfolio:",e)}},e_=async e=>{let a=await (null==ee?void 0:ee.loggedInUserDetails);if(e){let s=i.filter(a=>a.id===e)[0];if(t(s),"Opt-out"===s.apiKey&&et){var l,n,o;w({pan:null!==(n=null==a?void 0:a.pan)&&void 0!==n?n:"",mobile_no:(null!==(o=null==k?void 0:null===(l=k.consentDetail)||void 0===l?void 0:l.mobileNo)&&void 0!==o?o:"").toString()})}}};r.useEffect(()=>{let e=ep.replace(/-/g,"").toLowerCase(),a=ti.optIn.replace(/-/g,"").toLowerCase(),t=ti.optOut.replace(/-/g,"").toLowerCase(),i=l.apiKey.toLowerCase();e===a&&l===tt[0]?eb(!0):e===t&&l===tt[1]?eb(!0):e===a&&i===t?eb(!1):e===i?eb(!0):eb(!1)},[ep,l,ti,tt]);let eO=e=>{var a;Q(null!==(a=null==e?void 0:e.termsConditionText)&&void 0!==a?a:"");let l=e.faq_q||[],t=e.faq_a||[],i=l.map((e,a)=>({question:e,component:p.jsx("div",{dangerouslySetInnerHTML:{__html:t[a]||""}})})),n=e.benefits;f(e),b(i);let o=[[],[]];for(let e=0;e<n.length;e++)e%2==0?o[0].push(n[e]):o[1].push(n[e]);E(o)},ek=async(e,a)=>{let l=a.replace(/[^0-9]/g,"").slice(0,10);switch(e){case s.MOBILE_NO:(w(e=>({...e,mobile_no:l})),10===l.length)?ea.mobile.test(l)?O(e=>({...e,mobile_no:""})):O(e=>({...e,mobile_no:eq.SERVICES.VALID_MOBILE_NUM})):O(e=>({...e,mobile_no:""}));break;case s.PAN:if((null==a?void 0:a.length)<=10){let e=a.replace(/[^A-Za-z0-9]/g,"").toUpperCase();w(a=>({...a,pan:e})),10===e.length&&(/^([A-Z]){5}([0-9]){4}([A-Z]){1}$/.test(e)?(eY(e),O(e=>({...e,pan:""}))):O(e=>({...e,pan:"Please enter a Valid Pan Number"})))}else 10===T.pan.length?O(e=>({...e,pan:""})):O(e=>({...e,pan:eq.SERVICES.VALID_PAN_NUM}));break;default:return}},eR=async()=>{var e,a,t,i,n,s,r,d,c,m,v,p,g,b,N,f,x,C,E,y,S,A,j,D,w,I,_,O,R,M;aD(ee,"WhatsApp Service","Send OTP","NA"),!0===(null!==(a=null==k?void 0:null===(e=k.FE_Action)||void 0===e?void 0:e.isCheckbox_Req)&&void 0!==a&&a)?(o?h(!1):h(!0),eM(T)&&o&&(et?"Opt-out"===l.apiKey?(null==T?void 0:T.mobile_no)===(null==k?void 0:null===(t=k.consentDetail)||void 0===t?void 0:t.mobileNo)?eK("send"):null===(i=eo.triggerToast)||void 0===i||i.call(eo,{message:"Please enter a valid mobile number for opt-out.",toastType:"error"}):eK("send"):(await u.apicommunicator.login.placeValidatePAN({pan:null==T?void 0:T.pan,pageURL:window.location.href}),"Opt-in"===l.apiKey&&((null==k?void 0:null===(n=k.consentDetail)||void 0===n?void 0:n.whatsapp_consent_status)==="Opt-in"||(null==k?void 0:null===(s=k.consentDetail)||void 0===s?void 0:s.whatsapp_consent_status)==="Deemed opt-in")?(null==T?void 0:T.mobile_no)!=(null==k?void 0:null===(v=k.consentDetail)||void 0===v?void 0:v.mobileNo)?null===(p=eo.triggerToast)||void 0===p||p.call(eo,{message:"You have already Opted In with different mobile number",toastType:"error"}):null===(g=eo.triggerToast)||void 0===g||g.call(eo,{message:"You have already Opted In",toastType:"error"}):"Opt-out"===l.apiKey&&((null==k?void 0:null===(r=k.consentDetail)||void 0===r?void 0:r.whatsapp_consent_status)==="Opt-in"||(null==k?void 0:null===(d=k.consentDetail)||void 0===d?void 0:d.whatsapp_consent_status)==="Deemed opt-in")?(null==T?void 0:T.mobile_no)===(null==k?void 0:null===(b=k.consentDetail)||void 0===b?void 0:b.mobileNo)?eK("send"):null===(N=eo.triggerToast)||void 0===N||N.call(eo,{message:"Please enter a valid mobile number for opt-out.",toastType:"error"}):"Opt-in"===l.apiKey&&(null==k?void 0:null===(c=k.consentDetail)||void 0===c?void 0:c.whatsapp_consent_status)==="Opt-out"?eK("send"):"Opt-out"===l.apiKey&&(null==k?void 0:null===(m=k.consentDetail)||void 0===m?void 0:m.whatsapp_consent_status)==="Opt-out"&&(null===(f=eo.triggerToast)||void 0===f||f.call(eo,{message:"You have already Opted Out",toastType:"error"}))))):eM(T)&&(et?"Opt-out"===l.apiKey?(null==k?void 0:k.consentDetail.whatsapp_consent_status)==="Opt-in"&&(null==T?void 0:T.mobile_no)===(null==k?void 0:null===(x=k.consentDetail)||void 0===x?void 0:x.mobileNo)?eK("send"):null===(C=eo.triggerToast)||void 0===C||C.call(eo,{message:"Please enter a valid mobile number for opt-out.",toastType:"error"}):eK("send"):(await u.apicommunicator.login.placeValidatePAN({pan:null==T?void 0:T.pan,pageURL:window.location.href}),"Opt-in"===l.apiKey&&((null==k?void 0:null===(E=k.consentDetail)||void 0===E?void 0:E.whatsapp_consent_status)==="Opt-in"||(null==k?void 0:null===(y=k.consentDetail)||void 0===y?void 0:y.whatsapp_consent_status)==="Deemed opt-in")?(null==T?void 0:T.mobile_no)!=(null==k?void 0:null===(w=k.consentDetail)||void 0===w?void 0:w.mobileNo)?null===(I=eo.triggerToast)||void 0===I||I.call(eo,{message:"You have already Opted In with different mobile number",toastType:"error"}):null===(_=eo.triggerToast)||void 0===_||_.call(eo,{message:"You have already Opted In",toastType:"error"}):"Opt-out"===l.apiKey&&((null==k?void 0:null===(S=k.consentDetail)||void 0===S?void 0:S.whatsapp_consent_status)==="Opt-in"||(null==k?void 0:null===(A=k.consentDetail)||void 0===A?void 0:A.whatsapp_consent_status)==="Deemed opt-in")?(null==T?void 0:T.mobile_no)===(null==k?void 0:null===(O=k.consentDetail)||void 0===O?void 0:O.mobileNo)?eK("send"):null===(R=eo.triggerToast)||void 0===R||R.call(eo,{message:"Please enter a valid mobile number for opt-out.",toastType:"error"}):"Opt-in"===l.apiKey&&(null==k?void 0:null===(j=k.consentDetail)||void 0===j?void 0:j.whatsapp_consent_status)==="Opt-out"?eK("send"):"Opt-out"===l.apiKey&&(null==k?void 0:null===(D=k.consentDetail)||void 0===D?void 0:D.whatsapp_consent_status)==="Opt-out"&&(null===(M=eo.triggerToast)||void 0===M||M.call(eo,{message:" You have already Opted Out",toastType:"error"}))))},eM=e=>{let a={mobile_no:ea.mobile,pan:ea.pan},l={};for(let[n,o]of Object.entries(e)){var t,i;o?""==o||"pan"!==n||(null==a?void 0:null===(t=a[n])||void 0===t?void 0:t.test(o))?""==o||(null==a?void 0:null===(i=a[n])||void 0===i?void 0:i.test(o))||(l[n]="Please enter a valid ".concat(eP(n))):l[n]="Please enter a valid PAN Number":"pan"===n?l[n]=el.PAN_MANDATORY_ERROR:"mobile_no"===n&&(l[n]=el.MOBILE_MANDATORY_ERROR)}return!(0!=Object.values(l).length&&Object.values(l).every(e=>""!=e))||(O(e=>({...e,...l})),!1)},eL=(e,a)=>{var l,t;let i={mobile_no:ea.mobile,pan:ea.pan},n={};
1a?""==a||"pan"!==e||(null==i?void 0:null===(l=i[e])||void 0===l?void 0:l.test(a))?""==a||(null==i?void 0:null===(t=i[e])||void 0===t?void 0:t.test(a))||(n[e]="Please enter a valid ".concat(eP(e))):n[e]=eq.SERVICES.VALID_PAN_NUM:"pan"===e?n[e]=el.PAN_MANDATORY_ERROR:"mobile_no"===e&&(n[e]=el.MOBILE_MANDATORY_ERROR),O(e=>({...e,...n}))},eP=e=>({mobile_no:"Mobile Number",pan:"Pan"})[e],eF=()=>{navigator.clipboard.writeText(N.mobileNo)},eB=()=>{ey(!0),l4({default:eU,success:eV})},eV=e=>{eO(e.data),ey(!1)},eU=e=>{ey(!1)},eY=async e=>{var a,l;ey(!0);let t=await (null==ee?void 0:null===(a=ee.getLoggedinUserDetails)||void 0===a?void 0:a.call(ee));l8({pan:e&&e?e:null!==(l=null==t?void 0:t.pan)&&void 0!==l?l:T.pan},{default:eH,success:ez})},ez=e=>{(null==e?void 0:e.data)&&M(null==e?void 0:e.data),ey(!1)},eH=e=>{if(null==e?void 0:e.message){var a,l;null===(a=eo.triggerToast)||void 0===a||a.call(eo,{message:null!==(l=e.message)&&void 0!==l?l:"",toastType:"error"})}ey(!1)},eK=e=>{let a={userId:T.pan,mobile:T.mobile_no,status:l.apiKey,pageUrl:""};a.pageUrl="".concat(window.location.href,"?utm_source=google&utm_medium=cpc&utm_campaign=summer_sale&utm_content=demo_content"),l7(a,{default:eZ,success:a=>eW(a,e)})},eW=(e,a)=>{H(e.data.token),e.data&&S(!0),"reSend"===a?null==eo||eo.triggerToast({message:es.resentOtp,toastType:"success"}):null==eo||eo.triggerToast({message:es.sendOtp,toastType:"success"})},eZ=e=>{eo.triggerToast({message:e.msg,toastType:"error"})},eX=()=>{te(z,L,T.pan,{default:eJ,success:eQ})},eQ=e=>{G(e.data.referenceNumber),U(e.msg),eA("Opt-out"===l.apiKey?"opt-out":"opt-in"),B(!0),ev(!0),ew()},eJ=e=>{var a,l,t;(null!==(l=e.msg)&&void 0!==l?l:"").includes("Maximum attempts reached")?(P(""),S(!1)):(P(""),S(!0)),null===(a=ee.triggerLoginToast)||void 0===a||a.call(ee,{message:null!==(t=e.msg)&&void 0!==t?t:""}),ev(!1)},e$=async()=>{let e={consentType:"service_centre",source:"Service Centre",whatsappConsentStatus:l.apiKey,notificationConsentStatus:l.apiKey,mobileNo:T.mobile_no,email:"",pan:T.pan,otpToken:z,extraData:{}};await u.apicommunicator.login.placeUpdateConsent(e),ta(e,{default:e1,success:e0})},e0=e=>{},e1=e=>{},e2=()=>{window.innerWidth<=768?en(!1):en(!0)};return r.useEffect(()=>(e2(),window.addEventListener("resize",e2),()=>{window.removeEventListener("resize",e2)}),[]),p.jsxs(p.Fragment,{children:[p.jsx(m.Loader,{showLoader:eE}),p.jsxs("div",{className:"whatsapp-service-module",children:[p.jsx("div",{className:"whatsapp-service-header-holder",children:p.jsxs("div",{className:"title-warapper-for-backarr",children:[p.jsx("img",{fetchPriority:"low",className:"back_img mobile-only",src:d.pathChanger("backbutton_calculator.svg"),alt:"Back",onClick:()=>window.history.back()}),p.jsx("label",{className:"lbl-section-title title",children:" WhatsApp Service"})]})}),p.jsxs("div",{className:"service-details-row",children:[p.jsxs("div",{className:"img-details",children:[p.jsx("label",{className:"lbl-card-title-2 subtitle",children:N.bannerText}),p.jsx("img",{fetchPriority:"low",src:N.banner,alt:"WhatsApp banner"})]}),p.jsxs("div",{className:"whatsapp-details",children:[p.jsx("div",{className:"detail-one",children:p.jsx("label",{className:"lbl-txt-info-7 what-app-header",children:"WhatsApp Service"})}),p.jsxs("div",{className:"detail-two",children:[p.jsxs("label",{className:"lbl-txt-content2 wtsp-number-text",children:["Send ",p.jsx("span",{className:"lbl-txt-info-7 whatsapp-hi-text",children:'"Hi"'})," on Whatsapp number"]}),p.jsxs("div",{className:"wtsp-number-row",children:[p.jsx("label",{className:"lbl-txt-info-7 wtsp-number",children:N.mobileNo}),p.jsx("img",{fetchPriority:"low",src:"/assets/copyicon.svg",onClick:()=>{eF()},alt:"copyicon"})]}),p.jsx("label",{className:"lbl-info2 reg-mob-text",children:"(From registered mobile number)"}),p.jsx("button",{className:"btn-primary web",onClick:()=>{let e="https://wa.me/".concat(N.mobileNo,"?text=").concat(encodeURIComponent("Hi"));window.open(e,"_blank")},children:"Chat with us"}),p.jsx("button",{className:"btn-primary mobile",onClick:()=>{let e="https://wa.me/".concat(N.mobileNo,"?text=").concat(encodeURIComponent("Hi"));window.open(e,"_blank")},children:"Chat with us"})]}),p.jsxs("div",{className:"get-instantly-container get-zk-instantly-container",children:[p.jsx("label",{className:"lbl-popup-content text-info",children:N.bannerText}),p.jsx("div",{className:"service-inner-part",children:p.jsx("div",{className:"instant-detail-one instant-zk-detail-one",children:C.map((e,a)=>p.jsx("div",{className:"row",children:e.map((e,a)=>p.jsx("li",{className:"lbl-txt-info-8 lbl-zk-txt-info-8",children:e},a))},a))})})]})]})]}),p.jsxs("div",{className:"entering-detail-container",children:[p.jsx("label",{className:"lbl-card-title-2 opt-option",children:"in"===l.id?null==N?void 0:N.optionInDescription:null==N?void 0:N.optionOutDescription}),p.jsx("div",{className:"opt-radio-list",children:null==i?void 0:i.map(e=>p.jsxs("label",{className:"radio-container ".concat((null==e?void 0:e.disabled)?"disabled":""," ").concat((null==l?void 0:l.id)===(null==e?void 0:e.id)?"selected-opt":""),children:[p.jsx("input",{className:"opt-simple-radio",type:"radio",id:null==e?void 0:e.id,checked:(null==l?void 0:l.id)===(null==e?void 0:e.id),disabled:null==e?void 0:e.disabled,onChange:()=>e_(null==e?void 0:e.id)}),null==e?void 0:e.displayValue]}))}),p.jsxs("div",{className:"to-opt-details",children:[p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default opt-details",disabled:ec,label:"PAN Number",isError:(null==I?void 0:I.pan)!=void 0&&(null==I?void 0:I.pan)!="",errorMessage:null==I?void 0:I.pan,value:T.pan,onChange:e=>ek(s.PAN,e),onFocus:e=>ek(s.PAN,e),onFocusOut:()=>eL(s.PAN,T.pan)}),p.jsx(j.MOutlinedTextBox,{className:"moutlined-txtbx-default opt-details",inputMode:"numeric",type:"tell",disabled:!1,label:"Mobile Number",isError:(null==I?void 0:I.mobile_no)!=void 0&&(null==I?void 0:I.mobile_no)!="",errorMessage:null==I?void 0:I.mobile_no,value:T.mobile_no.length>10&&T.mobile_no.startsWith("91")?T.mobile_no.slice(2):T.mobile_no,onChange:e=>ek(s.MOBILE_NO,e),onFocus:()=>eL(s.MOBILE_NO,T.mobile_no),onFocusOut:()=>eL(s.MOBILE_NO,T.mobile_no)})]}),(eN||(null==T?void 0:T.pan)==="")&&p.jsxs(r.Fragment,{children:[p.jsxs("div",{className:"content-holder",children:[p.jsx(A.ConsentInputCheckbox,{className:"condition-checkbox regular-consent-checkbox-terms_text",disabled:!1,isSelected:o,isError:!1,onChange:()=>{c(!o)}}),p.jsx("div",{className:"terms-conditions",dangerouslySetInnerHTML:{__html:X}})]}),v&&p.jsx("div",{className:"error-message-whatsapp",children:"Terms and Conditions is should be checked."})]}),p.jsx("button",{className:"btn-primary otp-btn",onClick:eR,disabled:eg||!T.pan&&!T.mobile_no||eN&&!o||!T.pan&&!T.mobile_no&&eN,children:"Send OTP"})]}),p.jsxs("div",{className:"whatsapp-faq-container",children:[p.jsx("div",{className:"lbl-popup-content header",children:"WhatsApp FAQ's"}),p.jsx("div",{className:"faq-list",children:p.jsx(R.ComponentAccordion,{className:"holding-applicant-accordion frequent-data",list:g,isShowIcon:!0,headerKey:"question",defaultView:"expand-first"})})]}),y?p.jsx(x.OverlayPopup,{className:"dialog-popup-content remove-top-borader-spec",showHeader:!0,isFloating:!0,showCloseOption:!1,onClose:()=>{P(""),S(!1)},content:p.jsx(D.VerifyOTPPopup,{onResend:()=>{P(""),eK("reSend")},errormessage:"",mobileNumber:et?null==ex?void 0:ex.mobile:null==k?void 0:null===(e=k.personalDetails)||void 0===e?void 0:e.mobileNo,onOtpChange:e=>{P(e)},onVerify:()=>{S(!1),P(""),eX()},emailId:et?null==ex?void 0:ex.email:null==k?void 0:null===(a=k.personalDetails)||void 0===a?void 0:a.emailId})}):"",F?p.jsx(x.OverlayPopup,{className:"dialog-popup-content whatsapp-services-success-popup",showHeader:!1,isFloating:!0,onClose:()=>B(!1),content:p.jsx(tl,{type:eS,goNext:()=>{B(!1),w({pan:"",mobile_no:""}),c(!1),et?eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.OUR_SERVICES):eG(d.GLOBAL_CONSTANT.ROUTE_PATHS.homepage)},setShowOptSuccessState:B})}):"",ei&&p.jsx("div",{className:"downloadapp-container",children:p.jsx(_.DownloadAppLink,{})})]})]})},a.WhatsappTermsAndConditionModule=()=>{let[e,a]=r.useState(),[l,t]=r.useState();r.useEffect(()=>{i()},[]);let i=()=>{lM({default:o,success:n})},n=e=>{a(e.data.chatbot),t(e.data.termsAndCondition)},o=e=>{};return p.jsxs("div",{className:"terms-and-condition-module",children:[p.jsx("div",{className:"whatsapp-titile-content",children:null==e?void 0:e.map(e=>p.jsx(r.Fragment,{children:p.jsxs("div",{className:"whatsapp-titile-content-list",children:[p.jsx("label",{className:"whatsapp-titile",children:e.title}),p.jsxs("div",{className:"whatsapp-titile-description",children:[" ",p.jsx(lL,{htmlString:e.description})," "]})]})}))}),p.jsx("div",{className:"whatsapp-terms-main-content",children:null==l?void 0:l.map(e=>p.jsx(r.Fragment,{children:p.jsxs("div",{className:"whatsapp-terms-main-sub-content",children:[p.jsx("label",{className:"whatsapp-terms-titile",children:e.title}),p.jsxs("div",{className:"whatsapp-terms-description",children:[" ",p.jsx(lL,{htmlString:e.description})," "]})]})}))})]})},a.placeAddBankOtpValidation=ln,a.placeAddbankOtp=li,a.placeFolioSchemeDetailCount=e$,a.placeGetAddBankFlag=lt,a.placeNewFolioConfig=a1,a.placeUpdateBank=lP,a.placeUpdateFolioDetails=aC,a.placeUpdateNominee=a2,a.placeVerifyOtp=a3,a.placeupdateemail=aS,a.placeverifyOtpEmail=l5,a.placeverifyotp=aA}}]);
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.