PageSourceSearch

https://carret.in/_next/static/chunks/9171-989a88f704b32fc1.js

js carret.in collected 2026-10-01 23:58:52 UTC 159,125 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9171],{23273:function(e,a,t){"use strict";t.d(a,{AD:function(){return r},AO:function(){return N},CG:function(){return B},FT:function(){return y},GY:function(){return j},Gg:function(){return w},LY:function(){return S},N5:function(){return n},Nb:function(){return o},Nz:function(){return k},Pd:function(){return d},U6:function(){return h},UB:function(){return u},_g:function(){return s},_z:function(){return v},aw:function(){return c},cK:function(){return C},cT:function(){return g},jL:function(){return l},kS:function(){return T},n1:function(){return p},nY:function(){return f},qS:function(){return b},qw:function(){return _},ut:function(){return m},yw:function(){return x}});var i=t(32095);let n=e=>i.ZP.post("kyc/ext/onboarding/document_file/",e),l=e=>i.ZP.post("kyc/ext/onboarding/affiliated_entity_details/",e),s=e=>i.ZP.post("kyc/ext/onboarding/bank/",e),o=(e,a)=>i.ZP.patch("kyc/ext/onboarding/bank/".concat(e,"/"),a),r=e=>i.ZP.get("kyc/ext/onboarding/additional_kyc_data/?account_id=".concat(e)),d=e=>i.ZP.patch("kyc/ext/onboarding/additional_kyc_data/",e),c=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,s=new URLSearchParams;e&&s.set("account_id",e),a&&s.set("doc_type",a),t&&s.set("owner_type",t),n&&s.set("affiliated_entity_id",n),l&&s.set("doc_sub_type",l);let o=s.toString();return i.ZP.get(o?"kyc/ext/onboarding/document_file/?".concat(o):"kyc/ext/onboarding/document_file/")},u=e=>i.ZP.get("kyc/ext/onboarding/bank/?account_id=".concat(e)),_=function(e,a){let t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return i.ZP.get("kyc/ext/onboarding/affiliated_entity_details/?account_id=".concat(e,"&type=").concat(a).concat(t?"&is_final_signatory=".concat(t):""))},p=(e,a)=>i.ZP.patch("kyc/ext/onboarding/affiliated_entity_details/".concat(e,"/"),a),m=e=>i.ZP.post("kyc/ext/onboarding/whitelisted_crypto_address/",e),h=(e,a)=>i.ZP.patch("kyc/ext/onboarding/whitelisted_crypto_address/".concat(e,"/"),a),f=e=>i.ZP.get("kyc/ext/onboarding/whitelisted_crypto_address/?account_id=".concat(e)),x=e=>i.ZP.post("kyc/ext/onboarding/register_fiu/",e),v=(e,a)=>i.ZP.patch("kyc/ext/onboarding/register_fiu/".concat(e,"/"),a),y=e=>i.ZP.get("kyc/ext/onboarding/register_fiu/?account_id=".concat(e)),g=()=>i.ZP.get("kyc/hyperverge_token/"),j=e=>i.ZP.post("kyc/verify_affiliated_kyc/",e),b=e=>i.ZP.post("kyc/ext/onboarding/generate_external_kyc_link/",e),N=e=>i.ZP.post("kyc/consolidated_kyc_document/",e),S=e=>i.ZP.get("kyc/ext/onboarding/verification_task_errors/"),w=()=>i.ZP.get("kyc/rekyc/status/"),C=()=>i.ZP.post("kyc/rekyc/trigger/"),k=e=>i.ZP.delete("kyc/ext/onboarding/whitelisted_crypto_address/".concat(e,"/")),B=e=>i.ZP.get("kyc/ext/onboarding/sanctions-check/?account_id=".concat(e)),T=e=>i.ZP.post("kyc/ext/onboarding/sanctions-check/",e)},39716:function(e,a,t){"use strict";t.d(a,{Mp:function(){return r},U0:function(){return s},j4:function(){return o}});var i=t(39513),n=t(40723),l=t(23273);let s=e=>{let{user_id:a,doc_type:t,owner_type:i,entity_id:n,url_for:l,file_type:s,affiliated_entity_id:o}=e,r=Date.now();switch(l){case"coi":return"onboarding/".concat(a,"/coi/coi_id_").concat(a,"_t_").concat(r,".").concat(s);case"pan":return"onboarding/".concat(a,"/pan/pan_id_").concat(a,"_t_").concat(r,".").concat(s);case"aadhaar":return"onboarding/".concat(a,"/aadhaar/").concat(t,"_id_").concat(a,"_t_").concat(r,".").concat(s);case"aadhaar_front":return"onboarding/".concat(a,"/aadhaar/aadhaar_front_id_").concat(a,"_t_").concat(r,".").concat(s);case"aadhaar_back":return"onboarding/".concat(a,"/aadhaar/aadhaar_back_id_").concat(a,"_t_").concat(r,".").concat(s);case"passport_front":return"onboarding/".concat(a,"/passport/").concat(i,"/passport_front_id_").concat(a,"_t_").concat(r,".").concat(s);case"passport_back":return"onboarding/".concat(a,"/passport/").concat(i,"/passport_back_id_").concat(a,"_t_").concat(r,".").concat(s);case"pan_shareholder":case"pan_director":case"pan_ubo":case"pan_source_declaration_signatory":return"onboarding/".concat(a,"/pan/").concat(i,"/pan_id_").concat(o,"_t_").concat(r,".").concat(s);case"aadhaar_shareholder":case"aadhaar_ubo":case"aadhaar_director":case"aadhaar_source_declaration_signatory":return"onboarding/".concat(a,"/aadhaar/").concat(i,"/").concat(t,"_id_").concat(o,"_t_").concat(r,".").concat(s);case"address_proof_source_declaration_signatory":case"address_proof_shareholder":case"address_proof_ubo":case"address_proof_director":case"address_proof_authorized_person":return"onboarding/".concat(a,"/address_proof/").concat(i,"/address_proof_id_").concat(o,"_t_").concat(r,".").concat(s);case"video_declaration_wallet":case"video_declaration_director":case"source_of_funds":case"wallet_declaration":case"sanctions_doc":case"financial_statement":return"onboarding/".concat(a,"/").concat(t,"/").concat(t,"_id_t_").concat(r,".").concat(s);case"aoa":return"onboarding/".concat(a,"/aoa/aoa_id_").concat(a,"_t_").concat(r,".").concat(s);case"ubo_doc":return"onboarding/".concat(a,"/ubo_doc/ubo_doc_id_").concat(a,"_t_").concat(r,".").concat(s);case"moa":return"onboarding/".concat(a,"/moa/moa_id_").concat(a,"_t_").concat(r,".").concat(s);case"br":return"onboarding/".concat(a,"/br/br_id_").concat(a,"_t_").concat(r,".").concat(s);case"gstin":return"onboarding/".concat(a,"/gstin/gstin_id_").concat(a,"_t_").concat(r,".").concat(s);case"kyc_form":return"onboarding/".concat(a,"/kyc_form/kyc_form_id_").concat(a,"_t_").concat(r,".").concat(s);case"shareholding_doc":return"onboarding/".concat(a,"/shareholding/shareholding_doc_id_").concat(a,"_t_").concat(r,".").concat(s);case"director_doc":return"onboarding/".concat(a,"/director_doc/director_doc_id_").concat(a,"_t_").concat(r,".").concat(s);case"bank_statement":return"onboarding/".concat(a,"/bank_statement/bank_statement_id_").concat(a,"_t_").concat(r,".").concat(s);case"ubo":return"onboarding/".concat(a,"/ubo/ubo_id_").concat(a,"_t_").concat(r,".").concat(s);case"fignate_screenshot":return"onboarding/".concat(a,"/fiu_registration/fignate_screenshot_id_").concat(a,"_t_").concat(r,".").concat(s);case"fiu_email_confirmation":return"onboarding/".concat(a,"/fiu_registration/fiu_email_confirmation_id_").concat(a,"_t_").concat(r,".").concat(s);case"fiu_proof_date_of_initial_registration":return"onboarding/".concat(a,"/fiu_registration/fiu_proof_date_of_initial_registration_id_").concat(a,"_t_").concat(r,".").concat(s);case"fiu_non_applicability_declaration":return"onboarding/".concat(a,"/fiu_registration/fiu_non_applicability_declaration_id_").concat(a,"_t_").concat(r,".").concat(s);case"net_worth_certificate":return"onboarding/".concat(a,"/networth/networth_id_").concat(a,"_t_").concat(r,".").concat(s);case"financial_statement_for_fiu":return"onboarding/".concat(a,"/financial_statement_for_fiu/financial_statement_for_fiu_id_").concat(a,"_t_").concat(r,".").concat(s);case"bank_statement_for_fiu":return"onboarding/".concat(a,"/bank_statement_for_fiu/bank_statement_for_fiu_id_").concat(a,"_t_").concat(r,".").concat(s);case"fiu_onboarding_questionaire":return"onboarding/".concat(a,"/fiu_registration/fiu_onboarding_questionaire_id_").concat(a,"_t_").concat(r,".").concat(s);case"fiu_aml_policy":return"onboarding/".concat(a,"/fiu_registration/fiu_aml_policy_id_").concat(a,"_t_").concat(r,".").concat(s);case"other_document":return"onboarding/".concat(a,"/other_documents/").concat(t,"_id_t_").concat(r,".").concat(s);case"operating_address_proof":return"onboarding/".concat(a,"/operating_address_proof/operating_address_proof_id_").concat(a,"_t_").concat(r,".").concat(s);case"share_certificate":return"onboarding/".concat(a,"/share_certificate/share_certificate_id_").concat(a,"_t_").concat(r,".").concat(s);case"ownership_structure":return"onboarding/".concat(a,"/ownership_structure/ownership_structure_id_").concat(a,"_t_").concat(r,".").concat(s);case"ubo_chart":case"licenses":return"onboarding/".concat(a,"/licenses/licenses_id_").concat(a,"_t_").concat(r,".").concat(s);case"others":return"onboarding/".concat(a,"/other_documents/others_id_t_").concat(r,".").concat(s);default:{let e=l||t;if(!e)return;return"onboarding/".concat(a,"/").concat(e,"/").concat(e,"_id_").concat(a,"_t_").concat(r,".").concat(s)}}},o=async e=>{let{email:a,doc_type:t,owner_type:s,doc_sub_type:o=null,objName:r,affiliated_entity_id:d=null,setSaveResponse:c,reference_id:u=null,object_type:_,object_id:p}=e;if(!a){i.Am.error("Email not selected");return}if(r)try{let e={email:a,doc_type:t,owner_type:s,object_name:r,object_type:_,object_id:p};_&&p&&(e.object_type=_,e.object_id=p),d&&(e.affiliated_entity_id=Number(d)),u&&(e.reference_id=Number(u)),o&&(e.doc_sub_type=o);let n=await (0,l.N5)(e);return i.Am.success("Document saved"),c&&c(n),n}catch(e){(0,n.sI)(e)}},r=["Binance","Coinbase","Kraken","Bitstam","Huobi Global","OKX","KuCoin","Gate.io","Bybit","Bitget","Gemini","Bitfinex","Bittrex","Coinmama","Crypto.com","CoinDCX","WazirX","ZebPay","CoinSwitch Kuber","Bitso","Mercado Bitcoin","Luno","OKCoin","Coinbase Custody","BitGo","Fireblocks","Anchorage Digital","Fidelity Digital Assets","Gemini Custody","BNY Mellon Digital Assets","Komainu","Trustology","MetaMask","Trust Wallet","Ledger","Trezor","Phantom","Exodus","Ledger","Trezor","SafePal","Keystone","Tangem","Ellipal","CoolWallet","DCENT","Coinkite","Blockstream","Foundation Devices","Shift Crypto","Block Inc.","Cypherock","OneKey","SecuX","BC Vault","GridPlus","KeepKey","Self-Custody Wallet","Others"]},58021:function(e,a,t){"use strict";t.d(a,{w:function(){return s}});var i=t(85893),n=t(97182),l=t(89609);t(67294);let s=e=>{let{compact:a=!1}=e;return(0,i.jsx)(l.Z,{sx:{display:"flex",height:a?"40vh":"80vh",justifyContent:"center",alignItems:"center",width:"100%"},children:(0,i.jsx)(n.Z,{size:a?"4rem":"6rem"})})}},58915:function(e,a,t){"use strict";t.d(a,{Z:function(){return eJ}});var i=t(85893),n=t(67294),l=t(75668),s=t.n(l),o=t(45007),r=t(25612),d=t.n(r),c=t(11163),u=t(66854),_=t(36296),p=t(63030),m=t(2709),h=t(91390),f=t(26398),x=t(21038),v=t(52857),y=t(64958),g=t(40723),j=t(24610);let b=()=>{let{userDetails:e}=(0,o.v9)(e=>e.auth),a=(0,n.useMemo)(()=>(0,j.iw)(null==e?void 0:e.client_type),[null==e?void 0:e.client_type]),t=(0,n.useCallback)(e=>(0,j.Ql)(a,e),[a]),i=(0,n.useMemo)(()=>(0,j.GX)(a),[a]),l=(0,n.useMemo)(()=>
1(0,j.l_)(a),[a]);return{profile:a,profileKey:a.key,steps:a.steps,extraCompanyDocs:a.extraCompanyDocs,overviewSections:i,statusDocMapping:l,isFeatureVisible:t}},N=[{key:"startOnboarding",label:"Onboarding Overview",caption:"Document Checklist",icon:(0,i.jsx)(_.Z,{fontSize:"small"})},{key:"companyInformation",label:"Company Information",caption:"Entity Basic Details",icon:(0,i.jsx)(p.Z,{fontSize:"small"})},{key:"companyDocumentation",label:"Company Documents",caption:"Entity Foundational Documents",icon:(0,i.jsx)(m.Z,{fontSize:"small"})},{key:"keyPersonnel",label:"Key Personnel",caption:"Board, Director & UBO Details",icon:(0,i.jsx)(m.Z,{fontSize:"small"})},{key:"walletDeclaration",label:"Wallet Details",caption:"Asset Verification & Declaration",icon:(0,i.jsx)(m.Z,{fontSize:"small"})},{key:"fiuRegistration",label:"FIU Registration",caption:"Registration Details",icon:(0,i.jsx)(m.Z,{fontSize:"small"})},{key:"companyDeclaration",label:"Other Declarations",caption:"Compliance statements",icon:(0,i.jsx)(m.Z,{fontSize:"small"})},{key:"documentVerificationStatus",label:"Document Verification Status",caption:"Track review progress",icon:(0,i.jsx)(u.Z,{fontSize:"small"})}];var S=e=>{let{collapsed:a=!1,onToggleCollapsed:t}=e,[l,s]=(0,n.useState)("startOnboarding"),{steps:r}=b(),u=N.filter(e=>r.includes(e.key)),_=(0,c.useRouter)(),{page:p}=_.query,m=(0,o.I0)(),j=Math.max(u.findIndex(e=>e.key===l),0);u.length;let S=e=>{s(e),m((0,y.TT)(e)),(0,g.rd)("page",e,_)},w=e=>e<j?"Completed":e===j?"Active":"Upcoming";return(0,n.useEffect)(()=>{if(p){let e=r.includes(p)?p:r[0];s(e),e&&m((0,y.TT)(e))}},[m,p,r]),(0,i.jsxs)("div",{className:"".concat(d().sidebar," ").concat(a?d().sidebarCollapsed:""),children:[(0,i.jsx)("div",{className:d().collapseRow,children:(0,i.jsx)(x.Z,{title:a?"Expand sidebar":"Collapse sidebar",placement:"right",arrow:!0,children:(0,i.jsx)(v.Z,{size:"small",className:d().collapseButton,onClick:e=>{e.preventDefault(),e.stopPropagation(),t&&t()},"aria-label":a?"Expand sidebar":"Collapse sidebar",children:a?(0,i.jsx)(f.Z,{fontSize:"small"}):(0,i.jsx)(h.Z,{fontSize:"small"})})})}),(0,i.jsxs)("div",{className:d().sidebarHeader,children:[(0,i.jsx)("h3",{children:"Start Onboarding"}),(0,i.jsx)("p",{className:d().helper,children:"Complete each section to move forward."})]}),(0,i.jsx)("ul",{className:d().stepList,children:u.map((e,t)=>{let n=w(t),s=d()["state".concat(n)];return(0,i.jsxs)("li",{className:"".concat(d().stepItem," ").concat(s," ").concat(l===e.key?d().isSelected:""),onClick:()=>S(e.key),title:a?e.label:void 0,children:[(0,i.jsx)("div",{className:"".concat(d().stepBadge," ").concat(d()["badge".concat(n)]),children:(0,i.jsx)("span",{children:"Completed"===n?"✓":t+1})}),(0,i.jsxs)("div",{className:d().stepCopy,children:[(0,i.jsx)("p",{children:e.label}),e.caption&&(0,i.jsx)("span",{children:e.caption})]}),(0,i.jsx)("div",{className:d().stepIcon,children:e.icon})]},e.key)})})]})},w=t(10987),C=t.n(w),k=t(84677);function B(e){let{setStep:a}=e,{overviewSections:t}=b(),[n,...l]=t;return(0,i.jsxs)("section",{className:C().documentScreen,children:[(0,i.jsxs)("header",{className:C().documentScreenHeader,children:[(0,i.jsx)("h1",{children:"Onboarding Documents"}),(0,i.jsx)("p",{style:{fontSize:"0.8rem",marginTop:"-0.5rem"},children:"Please keep the following documents and information ready to complete the onboarding. Ensure the consolidated document is signed by the authorised signatory selected in the Director Information tab."})]}),(0,i.jsxs)("div",{className:"".concat(C().badgeBg," p-4 mt-4 mb-4 rounded-md text-sm"),children:[(0,i.jsx)("strong",{children:"Note:"})," Any non-government issued document or non-bank document (declaration or otherwise) must be submitted on company letterhead, signed, and stamped by the directors."]}),n?(0,i.jsx)("div",{className:"".concat(C().glassCard," ").concat(C().detailCard),children:(0,i.jsxs)("article",{children:[(0,i.jsx)("h2",{children:n.title}),(0,i.jsx)("ul",{children:n.items.map(e=>(0,i.jsx)("li",{children:e},e))})]})}):null,l.map(e=>(0,i.jsx)("div",{className:C().detailGrid,children:(0,i.jsxs)("article",{className:"".concat(C().glassCard," ").concat(C().detailCard),children:[(0,i.jsx)("h2",{children:e.title}),(0,i.jsx)("ul",{children:e.items.map(e=>(0,i.jsx)("li",{children:e},e))})]})},e.key)),(0,i.jsx)("div",{className:C().documentScreenActions,children:(0,i.jsx)(k.Z,{variant:"contained",onClick:()=>a(e=>e+1),children:"Next"})})]})}var T=t(39173),A=t(65806),D=t(12166),L=t(69132),O=t(85547),E=t(23273),I=t(82008),R=t(72952),Z=t(11769);let P=e=>String(e||"").toLowerCase().trim().replace(/[\s-]+/g,"_"),F=function(e){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"pending",t=P(e);
1if(!t)return a;if("verification_failed"===t)return"Verification Failed";if("string"==typeof e){let a=e.trim();if(a&&a===t)return String(t).split("_").filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}return e},z=(0,n.createContext)(null),W=e=>{let{children:a}=e,t=(0,n.useMemo)(()=>({formatStatusLabel:F,normalizeStatusKey:P}),[]);return(0,i.jsx)(z.Provider,{value:t,children:a})},K=()=>(0,n.useContext)(z)||{formatStatusLabel:F,normalizeStatusKey:P};var V=e=>{var a;let{setBankObjName:t,setIsBankAdded:l,existingBankData:s,bankIndex:r=0,formId:d,addBankHandler:c}=e,{userDetails:u}=(0,o.v9)(e=>e.auth),[_,p]=n.useState(s||null),[m,h]=n.useState(null),{formatStatusLabel:f,normalizeStatusKey:x}=K(),v=(null==s?void 0:s.status)==="verified",y=f(m,"pending"),g=x(y),j=(null==_?void 0:_.status)==="verification_failed"?"Verification Failed":null==_?void 0:_.status,b=j?f(j,j):"",N=j?x(j):"",S=async e=>{try{let{data:a}=await getOnboardingBanks(e);a&&a.length>0&&p(a[0]),l(a&&a.length>0)}catch(e){console.log(e)}};return(0,n.useEffect)(()=>{(null==u?void 0:u.id)&&S(null==u?void 0:u.id)},[u]),(0,n.useEffect)(()=>{s&&(p(s),l(!0))},[s,l]),(0,i.jsx)("div",{className:"".concat(C().glassCard," ").concat(C().bankCard),children:(0,i.jsxs)("form",{className:C().bankCardForm,"data-bank-form":r,children:[(0,i.jsxs)("div",{className:"".concat(C().labelRow," ").concat(C().bankCardHeader),children:[(0,i.jsxs)("p",{className:C().inputTitle,children:["Bank Account Details ",r>=0&&"(".concat(r+1,")")]}),j?(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(N)]||""),children:b}):null]}),(0,i.jsxs)("div",{className:C().gridOfThree,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Bank Account Number"}),(0,i.jsx)("input",{required:!0,placeholder:"",name:"acc_no_".concat(r),disabled:v,defaultValue:null==_?void 0:_.acc_no,title:"Please enter a valid bank account number"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Account Holder Name"}),(0,i.jsx)("input",{required:!0,placeholder:"",name:"acc_name_".concat(r),disabled:v,defaultValue:null==_?void 0:_.acc_name,pattern:"[A-Za-z\\s]+",title:"Please enter a valid account holder name"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Bank Name"}),(0,i.jsx)("input",{required:!0,placeholder:"",name:"bank_name_".concat(r),disabled:v,defaultValue:null==_?void 0:_.bank_name,pattern:"[A-Za-z\\s]+",title:"Please enter a valid bank name"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"IFSC Code"}),(0,i.jsx)("input",{required:!0,placeholder:"",name:"ifsc_".concat(r),disabled:v,defaultValue:null==_?void 0:_.ifsc,pattern:"[A-Za-z0-9]{11}",title:"Please enter a valid 11-digit alphanumeric IFSC code"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Bank Account Statement"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(g)]||""),children:y})]}),(0,i.jsx)(Z.Z,{user_id:null==u?void 0:u.id,url_for:"bank_statement",doc_type:"bank_statement",owner_type:"self",email:null==u?void 0:null===(a=u.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,setObjNamePass:t,isRequired:!0,data:s,setSaveResponse:e=>h(null==e?void 0:e.status)})]})]}),(!s||(null==s?void 0:s.status)==="verification_failed"||(null==s?void 0:s.status)==="rejected"||(null==s?void 0:s.status)==="pending")&&(0,i.jsx)("div",{className:C().walletFormActions,children:(0,i.jsx)(k.Z,{variant:"contained",onClick:()=>c(r),size:"small",className:C().gradientCta,style:{borderRadius:"10px"},children:s?"Update Bank Details":"Submit Bank Details"})})]})})},H=t(39716),Y=t(39513);let U=[{label:"Private Limited",value:"private_limited"},{label:"Public Limited",value:"public_limited"},{label:"Holding Company",value:"holding_company"},{label:"LLP",value:"llp"},{label:"NGO",value:"ngo"},{label:"Government Company",value:"government_company"},{label:"Other",value:"other"}],M=e=>{if(!e)return{line1:"",line2:"",city:"",state:"",pincode:""};try{let a="string"==typeof e?JSON.parse(e):e;return{line1:a.addressLine1||"",line2:a.addressLine2||"",city:a.city||"",state:a.state||"",pincode:
1a.pincode||""}}catch(a){return{line1:e,line2:"",city:"",state:"",pincode:""}}};var q=e=>{var a,t;let{setStep:l}=e,{userDetails:s}=(0,o.v9)(e=>e.auth),r=(0,o.I0)(),{isFeatureVisible:d}=b(),c=d(j.Ot.COMPANY_TYPE),u=d(j.Ot.GSTIN_FIELD),_=d(j.Ot.BANK_ACCOUNT_CARD),[p,m]=n.useState(null),[h,f]=n.useState(!1),[x,v]=n.useState(1),[y,N]=n.useState(""),[S,w]=n.useState(""),[B,Z]=n.useState(!1),[P,F]=n.useState(!1),[z,W]=n.useState(""),[K,q]=n.useState(""),[G,X]=n.useState(!1),[J,Q]=n.useState({email:null==s?void 0:null===(a=s.user)||void 0===a?void 0:a.email}),[$,ee]=n.useState([]),[ea,et]=n.useState({}),[ei,en]=n.useState(!0),[el,es]=n.useState(!0),[eo,er]=n.useState(M(null==s?void 0:s.registered_address)),[ed,ec]=n.useState(M(null==s?void 0:s.operating_address)),[eu,e_]=n.useState(!1),[ep,em]=n.useState(!0),[eh,ef]=n.useState(!0),ex=(null==J?void 0:J.is_cin_verified)?"verified":(null==J?void 0:J.is_cin_verified)===null?"pending":"rejected",ev=(null==J?void 0:J.is_gstin_verified)?"verified":(null==J?void 0:J.is_gstin_verified)===null?"pending":"rejected",ey=async()=>{try{let{data:e}=await (0,E.UB)(null==s?void 0:s.id);ee(e||[]),v(Math.max((null==e?void 0:e.length)||1,1))}catch(e){console.log(e)}},eg=async()=>{try{let{data:e}=await (0,E.AD)(null==s?void 0:s.id);et(e)}catch(e){console.log(e)}},ej=async e=>{try{let{data:a}=await (0,E.AD)(e);Q(a)}catch(e){console.log(e),(0,g.sI)(e)}};n.useEffect(()=>{if((null==s?void 0:s.id)&&(_&&ey(),eg(),ej(null==s?void 0:s.id),(null==s?void 0:s.is_mobile_number_verified)&&X(!0),(null==s?void 0:s.phone_number)&&W(s.phone_number),(null==s?void 0:s.registered_address)&&er(M(s.registered_address)),(null==s?void 0:s.operating_address)&&ec(M(s.operating_address)),(null==s?void 0:s.registered_address)&&(null==s?void 0:s.operating_address))){let e=M(s.registered_address),a=M(s.operating_address);e.line1===a.line1&&e.line2===a.line2&&e.city===a.city&&e.state===a.state&&e.pincode===a.pincode&&e.line1&&e_(!0)}},[null==s?void 0:s.id,_]);let eb=async e=>{var a,t,i;e.preventDefault();let n=new FormData(e.target),o=n.get("mobile"),d="string"==typeof o?o.trim():"",m=n.get("company_name")||(null==s?void 0:s.company_name),f=c&&n.get("company_type")||(null==s?void 0:s.company_type),x=n.get("cin")||(null==J?void 0:J.cin),v=u&&n.get("gstin")||(null==J?void 0:J.gstin),y={addressLine1:eo.line1,addressLine2:eo.line2,city:eo.city,state:eo.state,pincode:eo.pincode},j=eu?{...y}:{addressLine1:ed.line1,addressLine2:ed.line2,city:ed.city,state:ed.state,pincode:ed.pincode},b=n.get("business_activity")||(null==s?void 0:s.business_activity),N=n.get("source_of_funds")||(null==s?void 0:s.source_of_funds),S=n.get("source_of_wealth")||(null==s?void 0:s.source_of_wealth),w=n.get("acc_name"),C=n.get("acc_no"),k=n.get("bank_name"),B=n.get("ifsc"),A={...J,email:(null==s?void 0:null===(a=s.user)||void 0===a?void 0:a.email)||(null==s?void 0:s.email)};(null==ea?void 0:ea.is_cin_verified)||(A.cin=x),!u||(null==ea?void 0:ea.is_gstin_verified)||(A.gstin=v);let D={phone_number:d||z||(null==s?void 0:s.phone_number),company_name:m,operating_address:JSON.stringify(j),registered_address:JSON.stringify(y),business_activity:b,source_of_funds:N,source_of_wealth:S};f&&(D.company_type=f);let L={acc_name:w,acc_no:C,bank_name:k,ifsc:B,email:(null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.email)||(null==s?void 0:s.email)};try{if(_&&!h){let{data:e}=await (0,E._g)(L);await (0,H.j4)({email:(null==s?void 0:null===(i=s.user)||void 0===i?void 0:i.email)||(null==s?void 0:s.email),doc_type:"bank_statement",owner_type:"self",objName:p,affiliated_entity_id:null,uploadDocApi:"",reference_id:null==e?void 0:e.id,object_type:"bank",object_id:null==e?void 0:e.id})}await (0,T.Yd)(null==s?void 0:s.id,D),(A.cin||u&&A.gstin)&&await (0,E.Pd)(A),r((0,O.c)()),l(e=>e+1)}catch(e){(0,g.sI)(e),console.log(e)}},eN=async e=>{x<3&&v(e=>e+1);try{var a,t;let i;let n=document.querySelector('form[data-bank-form="'.concat(e,'"]'));if(!n){Y.Am.error("Bank form not found");return}let l=new FormData(n),o={acc_name:l.get("acc_name_".concat(e)),acc_no:l.get("acc_no_".concat(e)),bank_name:l.get("bank_name_".concat(e)),ifsc:l.get("ifsc_".concat(e)),email:(null==s?void 0:null===(a=s.user)||void 0===a?void 0:a.email)||(null==s?void 0:s.email)};if(!o.acc_name||!o.acc_no||!o.bank_name||!o.ifsc){Y.Am.error("Please fill all bank details");return}let r=null==$?void 0:$[e];
1(null==r?void 0:r.id)&&((null==r?void 0:r.status)==="verification_failed"||(null==r?void 0:r.status)==="rejected"||(null==r?void 0:r.status)==="pending")?(await (0,E.Nb)(r.id,o),i={id:r.id}):i=(await (0,E._g)(o)).data,p&&await (0,H.j4)({email:(null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.email)||(null==s?void 0:s.email),doc_type:"bank_statement",owner_type:"self",objName:p,affiliated_entity_id:null,reference_id:null==i?void 0:i.id,object_type:"bank",object_id:null==i?void 0:i.id}),await ey(),Y.Am.success("Bank account updated successfully")}catch(e){(0,g.sI)(e)}},eS=async()=>{try{let e=document.querySelector('input[name="mobile"]'),a=null==e?void 0:e.value;if(!a||!/^\d{10}$/.test(a)){Y.Am.error("Please enter a valid 10-digit mobile number");return}B?(await (0,I.O4)({mobile_number:a}),Y.Am.success("OTP resent successfully")):(await (0,I.nz)({mobile_number:a}),Y.Am.success("OTP sent successfully")),W(a),Z(!0),F(!0)}catch(e){(0,g.sI)(e)}},ew=async()=>{try{var e;if(!K||!/^\d{6}$/.test(K)){Y.Am.error("Please enter a valid 6-digit OTP");return}let a=await (0,I.bO)({mobile_number:z,otp:K});(null===(e=a.data)||void 0===e?void 0:e.success)?(X(!0),F(!1),Y.Am.success("OTP verified successfully")):Y.Am.error("Mobile number verification failed"),await (0,T.M_)()}catch(e){(0,g.sI)(e)}},eC=n.useMemo(()=>Math.max((null==$?void 0:$.length)||0,1),[null==$?void 0:$.length]);return(0,i.jsxs)("div",{className:"pb-8",children:[(0,i.jsxs)("form",{className:C().compInfoBox,onSubmit:eb,children:[(0,i.jsx)("h4",{className:C().uploadTitle,children:"Basic Details of the Company"}),(0,i.jsx)("p",{className:C().uploadSubtitle,style:{fontSize:"0.8rem"},children:"Provide the fundamental identification details for your registered entity. Please ensure that the company name and registration numbers (CIN/GSTIN) exactly match your official incorporation records to facilitate a seamless verification process."}),(0,i.jsx)("div",{className:C().formBox,children:(0,i.jsxs)("div",{className:"".concat(C().collapseHeader),style:{flexDirection:"column"},children:[(0,i.jsxs)("div",{className:"flex justify-between w-full",children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Institutional Information"}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>en(e=>!e),"aria-expanded":ei,children:ei?"Hide":"Show"})]}),ei&&(0,i.jsxs)("div",{className:C().gridOfThree,style:{width:"100%"},children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Company Name "}),(0,i.jsx)("input",{placeholder:"Enter company name",name:"company_name",required:!0,defaultValue:null==s?void 0:s.company_name,disabled:!!(null==s?void 0:s.company_name)&&(null==ea?void 0:ea.is_cin_verified)&&(!u||(null==ea?void 0:ea.is_gstin_verified))})]}),c&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Company Type"}),(0,i.jsxs)("div",{className:C().selectWrapper,children:[(0,i.jsx)("select",{placeholder:"Select company type",name:"company_type",defaultValue:null==s?void 0:s.company_type,className:C().customSelect,required:!0,children:U.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,i.jsx)("div",{className:C().dropdownArrow,children:"▼"})]})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Email"}),(0,i.jsx)("input",{placeholder:"Enter email",name:"email",value:(null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.email)||(null==s?void 0:s.email),disabled:!0})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Mobile"}),(0,i.jsxs)("div",{className:"flex gap-2",children:[(0,i.jsx)("input",{placeholder:"Enter mobile",name:"mobile",defaultValue:null==s?void 0:s.phone_number,required:!0,pattern:"\\d{10}",title:"Please enter a valid 10-digit mobile number",style:{flex:1},readOnly:G}),G?(0,i.jsx)(k.Z,{type:"button",variant:"contained",color:"success",size:"small",disabled:!0,startIcon:(0,i.jsx)(L.Z,{fontSize:"small"}),sx:{borderRadius:"12px",whiteSpace:"nowrap"},children:"Verified"}):(0,i.jsx)(k.Z,{type:"button",variant:"outlined",size:"small",onClick:eS,style:{borderRadius:"12px"},children:B?"Resend OTP":"Send OTP"})]})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 justify-between",children:[(0,i.jsx)("label",{children:"Corporate Identity Number"}),(0,i.jsx)("div",{}),(0,i.jsx)("div",{className:"".concat(C().statusPill," ").concat(ex?C()["status_".concat(ex)]:""),children:"verified"===ex?"Verified":"verification_failed"===ex?"Verification Failed":"rejected"===ex?"Rejected":"pending"===ex?"Pending":""})]}),(0,i.jsx)("input",{placeholder:"Enter CIN",name:"cin",required:!1,defaultValue:null==J?void 0:J.cin,pattern:"[A-Za-z0-9]{21}",title:"Please enter a valid 21-digit alphanumeric CIN",disabled:null==J?void 0:J.is_cin_verified,onChange:e=>N(e.target.value)})]}),u&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 justify-between",children:[(0,i.jsx)("label",{children:"GSTIN"}),(0,i.jsx)("div",{}),(0,i.jsx)("div",{className:"".concat(C().statusPill," ").concat(ev?C()["status_".concat(ev)]:""),children:"verified"===ev?"Verified":"verification_failed"===ev?"Verification Failed":"rejected"===ev?"Rejected":"pending"===ev?"Pending":""})]}),(0,i.jsx)("input",{placeholder:"Enter GSTIN",name:"gstin",required:!1,defaultValue:null==J?void 0:J.gstin,onChange:e=>w(e.target.value),pattern:"[A-Za-z0-9]{15}",title:"Please enter a valid 15-digit alphanumeric GSTIN",disabled:null==J?void 0:J.is_gstin_verified})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("div",{className:"flex items-center gap-2 justify-between",children:(0,i.jsx)("label",{children:"Business Activity"})}),(0,i.jsx)("input",{placeholder:"Enter Business Activity",name:"business_activity",required:!1,defaultValue:null==s?void 0:s.business_activity})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("div",{className:"flex items-center gap-2 justify-between",children:(0,i.jsx)("label",{children:"Source of Funds"})}),(0,i.jsx)("input",{placeholder:"Enter Source of Funds",name:"source_of_funds",required:!1,defaultValue:null==s?void 0:s.source_of_funds})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("div",{className:"flex items-center gap-2 justify-between",children:(0,i.jsx)("label",{children:"Source of Wealth"})}),(0,i.jsx)("input",{placeholder:"Enter Source of Wealth",name:"source_of_wealth",required:!1,defaultValue:null==s?void 0:s.source_of_wealth})]})]})]})}),(0,i.jsx)("div",{className:"".concat(C().formBox),children:(0,i.jsxs)("div",{className:"".concat(C().collapseHeader),style:{flexDirection:"column"},children:[(0,i.jsxs)("div",{className:"flex justify-between w-full",children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Registered Address"}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>em(e=>!e),"aria-expanded":ep,children:ep?"Hide":"Show"})]}),ep&&(0,i.jsxs)("div",{className:C().gridOfThree,style:{width:"100%"},children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Address Line 1"}),(0,i.jsx)("input",{placeholder:"Enter Address Line 1",value:eo.line1,onChange:e=>er(a=>({...a,line1:e.target.value})),required:!0,title:"Please enter Address Line 1"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("label",{children:["Address Line 2"," ",(0,i.jsx)("span",{style:{fontWeight:400,color:"#6a5b8a",fontSize:"0.8rem"},children:"(Optional)"})]}),(0,i.jsx)("input",{placeholder:"Enter Address Line 2 (optional)",value:eo.line2,onChange:e=>er(a=>({...a,line2:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"City"}),(0,i.jsx)("input",{placeholder:"Enter City",value:eo.city,onChange:e=>er(a=>({...a,city:e.target.value})),required:!0,title:"Please enter City"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"State"}),(0,i.jsx)("input",{placeholder:"Enter State",value:eo.state,onChange:e=>er(a=>({...a,state:e.target.value})),required:!0,title:"Please enter State"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Pincode"}),(0,i.jsx)("input",{placeholder:"Enter Pincode",value:eo.pincode,onChange:e=>er(a=>({...a,pincode:e.target.value})),required:!0,pattern:"\\d{6}",title:"Please enter a valid 6-digit Pincode"})]})]})]})}),(0,i.jsx)("div",{className:"".concat(C().formBox),children:(0,i.jsxs)("div",{className:"".concat(C().collapseHeader),style:{flexDirection:"column"},children:[(0,i.jsxs)("div",{className:"flex justify-between w-full items-center",children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Operating Address"}),(0,i.jsxs)("div",{className:"flex items-center gap-4",children:[(0,i.jsx)(A.Z,{className:C().addressCheckbox,control:(0,i.jsx)(D.Z,{checked:eu,onChange:e=>{let a=e.target.checked;e_(a),a&&ec({...eo})},size:"small"}),label:(0,i.jsx)("span",{className:C().checkboxLabel,children:"Same as Registered Address"})}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>ef(e=>!e),"aria-expanded":eh,children:eh?"Hide":"Show"})]})]}),eh&&(0,i.jsxs)("div",{className:C().gridOfThree,style:{width:"100%"},children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Address Line 1"}),(0,i.jsx)("input",{placeholder:"Enter Address Line 1",value:ed.line1,onChange:e=>ec(a=>({...a,line1:e.target.value})),required:!eu,disabled:eu,title:"Please enter Address Line 1"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("label",{children:["Address Line 2"," ",(0,i.jsx)("span",{style:{fontWeight:400,color:"#6a5b8a",fontSize:"0.8rem"},children:"(Optional)"})]}),(0,i.jsx)("input",{placeholder:"Enter Address Line 2 (optional)",value:ed.line2,onChange:e=>ec(a=>({...a,line2:e.target.value})),disabled:eu})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"City"}),(0,i.jsx)("input",{placeholder:"Enter City",value:ed.city,onChange:e=>ec(a=>({...a,city:e.target.value})),required:!eu,disabled:eu,title:"Please enter City"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"State"}),(0,i.jsx)("input",{placeholder:"Enter State",value:ed.state,onChange:e=>ec(a=>({...a,state:e.target.value})),required:!eu,disabled:eu,title:"Please enter State"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Pincode"}),(0,i.jsx)("input",{placeholder:"Enter Pincode",value:ed.pincode,onChange:e=>ec(a=>({...a,pincode:e.target.value})),required:!eu,disabled:eu,pattern:"\\d{6}",title:"Please enter a valid 6-digit Pincode"})]})]})]})}),_&&(0,i.jsx)("div",{className:"".concat(C().formBox," ").concat(C().collapseHeader," flex-col justify-start gap-4"),children:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"w-full flex justify-between",children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Company Bank Account Details"}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>es(e=>!e),"aria-expanded":el,children:el?"Hide":"Show"})]}),el&&(0,i.jsxs)(i.Fragment,{children:[Array.from({length:x},(e,a)=>(0,i.jsx)("div",{style:{width:"100%"},children:(0,i.jsx)(V,{setBankObjName:m,setIsBankAdded:f,setBankData:ee,bankData:$,bankIndex:a,existingBankData:$[a]||null,formId:"bankForm".concat(a),addBankHandler:eN})},a)),(0,i.jsxs)("div",{className:C().bankActions,children:[(0,i.jsxs)("div",{children:[x>eC&&(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>{x>1&&v(e=>e-1)},size:"small",color:"error",style:{marginRight:"10px",borderRadius:"10px",backgroundColor:"#ffe6e6"},children:"Remove Bank Account"}),x<3&&(0,i.jsxs)(k.Z,{variant:"outlined",onClick:()=>{x<3&&v(e=>e+1)},size:"small",style:{borderRadius:"10px"},className:"".concat(C().gradientCta),children:["Add Bank Account (",x,"/3)"]})]}),(null==$?void 0:$.length)<3&&x.length===(null==$?void 0:$.length)&&(0,i.jsx)("div",{children:(0,i.jsx)(k.Z,{variant:"contained",onClick:()=>eN(x-1),size:"small",className:C().gradientCta,style:{borderRadius:"10px"},children:"Submit Bank details"})})]})]})]})}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>l(e=>e-1),children:"Back"}),(0,i.jsx)(k.Z,{type:"submit",variant:"contained",className:C().gradientCta,children:"Save & Next"})]})]}),(0,i.jsx)(R.Z,{modalStatus:P,modalHandleClose:()=>F(!1),children:(0,i.jsxs)("div",{style:{padding:"20px",minWidth:"400px"},children:[(0,i.jsx)("h3",{style:{marginBottom:"15px",fontSize:"18px",fontWeight:"600"},children:"Verify Mobile Number"}),(0,i.jsxs)("p",{style:{marginBottom:"20px",color:"#666"},children:["OTP has been sent to ",z]}),(0,i.jsxs)("div",{style:{marginBottom:"20px"},children:[(0,i.jsx)("label",{style:{display:"block",marginBottom:"8px",fontWeight:"500"},children:"Enter OTP"}),(0,i.jsx)("input",{type:"text",placeholder:"Enter 6-digit OTP",value:K,onChange:e=>q(e.target.value),maxLength:6,pattern:"\\d{6}",style:{width:"100%",padding:"10px",border:"1px solid #ddd",borderRadius:"4px",fontSize:"16px"}})]}),(0,i.jsxs)("div",{style:{display:"flex",gap:"10px",justifyContent:"flex-end"},children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>F(!1),children:"Cancel"}),(0,i.jsx)(k.Z,{variant:"contained",onClick:ew,children:"Verify OTP"})]})]})})]})}
1,G=t(25026),X=t(93454),J=t(76592),Q=t(70360),$=t(46577),ee=t(8863),ea=t(19827),et=e=>{let{walletAddress:a="_________",network:t="_________",asset:n="_________",platform:l="_________",label:s="_________",purpose:o="_________",entityName:r="_________",finalSigningDirectorName:d="_________",walletData:c=[]}=e;return(0,i.jsxs)("div",{className:C().declarationLetter,children:[(0,i.jsxs)("p",{children:["I"," ",(0,i.jsx)("span",{className:C().dynamicText,children:d}),", hereby solemnly affirm, agree, undertake and declare to the"," ",(0,i.jsx)("span",{className:C().dynamicText,children:r})," as under:"]}),(0,i.jsx)("p",{children:"I, as a User of the Carret website/mobile application, have requested for enabling the Virtual Digital Asset (“VDA”) withdrawal and/or deposit feature (“Feature”)."}),(0,i.jsx)("p",{children:"Funds received/sent are risk-free and I guarantee that there is no fraud/risk associated. These funds have been received from/sent to the following wallet details:"}),c&&c.length>0&&(0,i.jsx)(G.Z,{component:X.Z,variant:"outlined",sx:{my:2},children:(0,i.jsxs)(J.Z,{children:[(0,i.jsx)(Q.Z,{children:(0,i.jsxs)($.Z,{children:[(0,i.jsx)(ee.Z,{component:"th",sx:{width:"20%",fontWeight:"bold",width:"10%"},children:"No"}),(0,i.jsx)(ee.Z,{component:"th",sx:{width:"20%",fontWeight:"bold"},children:"Wallet Address"}),(0,i.jsx)(ee.Z,{component:"th",sx:{width:"15%",fontWeight:"bold"},children:"Network"}),(0,i.jsx)(ee.Z,{component:"th",sx:{width:"15%",fontWeight:"bold"},children:"Asset"}),(0,i.jsx)(ee.Z,{component:"th",sx:{width:"20%",fontWeight:"bold"},children:"Platform"}),(0,i.jsx)(ee.Z,{component:"th",sx:{width:"30%",fontWeight:"bold"},children:"Wallet Address Label"})]})}),(0,i.jsx)(ea.Z,{children:c.map((e,a)=>(0,i.jsxs)($.Z,{children:[(0,i.jsx)(ee.Z,{sx:{wordBreak:"break-word",width:"10%"},children:(0,i.jsx)("p",{children:a+1})}),(0,i.jsx)(ee.Z,{sx:{wordBreak:"break-all",maxWidth:"300px"},children:(0,i.jsx)("p",{children:e.address})}),(0,i.jsx)(ee.Z,{sx:{wordBreak:"break-word"},children:(0,i.jsx)("p",{children:e.network})}),(0,i.jsx)(ee.Z,{sx:{wordBreak:"break-word"},children:(0,i.jsx)("p",{children:e.symbol})}),(0,i.jsx)(ee.Z,{sx:{wordBreak:"break-word"},children:(0,i.jsx)("p",{children:e.platform})}),(0,i.jsx)(ee.Z,{sx:{wordBreak:"break-word"},children:(0,i.jsx)("p",{children:e.address_label})})]},a))})]})}),(0,i.jsxs)("p",{children:["The wallet address is owned by"," ",(0,i.jsx)("span",{className:C().dynamicText,children:r}),". I declare that these funds are from my own sources."]}),(0,i.jsxs)("p",{children:["The purpose of transfer of assets is"," ",(0,i.jsx)("span",{className:C().dynamicText,children:o}),"."]}),(0,i.jsxs)("p",{children:["I agree to indemnify and keep\xa0",(0,i.jsx)("span",{className:C().dynamicText,children:"Carret"})," indemnified at all times in respect of any damage, cost, charges, and expenses that"," ",(0,i.jsx)("span",{className:C().dynamicText,children:"Carret"})," may incur or any loss or damage that"," ",(0,i.jsx)("span",{className:C().dynamicText,children:"Carret"})," may suffer on account of the information submitted being found to be false or fabricated in any manner."]})]})},ei=t(62134);let en=["USDT","BTC","ETH"],el={BTC:["BTC"],ETH:["ETH"],USDT:["ETH","TRX","BSC"]},es=e=>{var a,t,l;let{walletIndex:s,existingWalletData:o,userDetails:r,setObjNameWalletVideo:d,setWalletVideoMap:c,onAddWallet:u,onDeleteWallet:_,onRemoveUnsubmitted:p}=e,{formatStatusLabel:m,normalizeStatusKey:h}=K(),[f,v]=(0,n.useState)(null),[y,g]=(0,n.useState)(!1),[j,b]=(0,n.useState)(""),[N,S]=(0,n.useState)(0),w=(null==o?void 0:null===(a=o.asset)||void 0===a?void 0:a.symbol)||(null==o?void 0:o.asset)||(null==o?void 0:o.symbol)||"",B=(null==o?void 0:null===(t=o.network)||void 0===t?void 0:t.symbol)||(null==o?void 0:o.network)||(null==o?void 0:o.chain)||"";(0,n.useEffect)(()=>{b((null==o?void 0:o.platform)||""),A(w||"")},[null==o?void 0:o.platform,w]);let[T,A]=(0,n.useState)(w||""),D=el[T]||[],L=(null==o?void 0:o.status)||"pending",O="rejected"===h(L)||"rejected"===f||"verification_failed"===f,E=!!o&&!O,I=n.useMemo(()=>{let e=Array.from(new Set([...H.Mp||[],null==o?void 0:o.platform])).filter(
1Boolean),a=String(j||"").trim().toLowerCase();return a?e.filter(e=>String(e).trim().toLowerCase().includes(a)):e},[j,null==o?void 0:o.platform]);return(0,i.jsxs)("div",{className:C().walletForm,children:[(0,i.jsxs)("form",{"data-wallet-form":s,children:[(0,i.jsxs)("div",{className:"".concat(C().labelRow," ").concat(C().walletFormHeader),children:[(0,i.jsxs)("h6",{className:"m-0",children:["Wallet ",s+1]}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(h(L))]||""),children:m(L,"pending")})]}),(0,i.jsxs)("div",{className:C().gridOfThree,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Wallet Address"}),(0,i.jsx)("input",{required:!0,placeholder:"",name:"address_".concat(s),disabled:E,defaultValue:(null==o?void 0:o.address)||""})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Asset"}),(0,i.jsxs)("div",{className:C().selectWrapper,children:[(0,i.jsxs)("select",{name:"asset_".concat(s),value:T,disabled:E,required:!0,onChange:e=>A(e.target.value),children:[(0,i.jsx)("option",{value:"",children:"Select Asset"}),en.map(e=>(0,i.jsx)("option",{value:e,children:e},e))]}),(0,i.jsx)("div",{className:C().dropdownArrow,children:"▼"})]})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Network"}),(0,i.jsxs)("div",{className:C().selectWrapper,children:[(0,i.jsxs)("select",{name:"network_".concat(s),defaultValue:B,disabled:E,required:!0,children:[(0,i.jsx)("option",{value:"",children:"Select Network"}),D.map(e=>(0,i.jsx)("option",{value:e,children:e},e))]}),(0,i.jsx)("div",{className:C().dropdownArrow,children:"▼"})]})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Platform"}),(0,i.jsxs)("div",{className:C().searchSelect,children:[(0,i.jsx)("input",{required:!0,className:"w-full",placeholder:"Search platform",name:"platform_".concat(s),disabled:E,value:j,onChange:e=>{b(e.target.value),g(!0)},onFocus:()=>g(!0),onBlur:()=>{window.setTimeout(()=>g(!1),120)},pattern:"[A-Za-z0-9]{3,}",title:"Please enter a valid platform name",autoComplete:"off"}),y&&!E?(0,i.jsx)("div",{className:C().searchDropdown,role:"listbox","aria-label":"Platform options",children:(I||[]).length?(I||[]).map(e=>(0,i.jsx)("button",{type:"button",className:C().searchOption,role:"option","aria-selected":String(e)===String(j),onMouseDown:e=>{e.preventDefault()},onClick:()=>{b(e),g(!1)},children:e},e)):(0,i.jsx)("div",{className:C().searchEmpty,children:"No platforms found"})}):null]})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Wallet Address Label"}),(0,i.jsx)("input",{required:!0,placeholder:"",name:"address_label_".concat(s),disabled:E,defaultValue:(null==o?void 0:o.address_label)||"",pattern:"[A-Za-z0-9\\s]+",title:"Please enter a valid address label"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsxs)("div",{className:C().infoIcon,children:[(0,i.jsx)("label",{children:"Wallet Ownership Video"}),(0,i.jsx)(x.Z,{title:"Wallet Ownership video should clearly show the Company name as the user & the Address to be whitelisted",arrow:!0,placement:"right-start",children:(0,i.jsx)(ei.Z,{className:"opacity-50 text-xs h-4 w-4 pb-[2px] mt-[-0.2rem]",fontSize:"inherit"})})]}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(h(f||"pending"))]||""),children:m(f,"pending")})]}),(0,i.jsx)(Z.Z,{user_id:null==r?void 0:r.id,url_for:"video_declaration_wallet",doc_type:"video_declaration_wallet",owner_type:"self",wallet_id:(null==o?void 0:o.id)||null,email:null==r?void 0:null===(l=r.user)||void 0===l?void 0:l.email,affiliated_entity_id:null,preFillData:null,setObjNamePass:d,docKey:"video_declaration_wallet_".concat(s,"_").concat(N),onStatusChange:e=>{let{status:a}=e;return v(a)},setSaveResponse:e=>c(a=>({...a,[s]:e}))})]})]})]},N),(0,i.jsxs)("div",{className:C().walletFormActions,children:[(null==o?void 0:o.id)&&(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>_(o.id),size:"small",color:"error",style:{borderRadius:"10px"},children:"Delete Wallet"}),!o&&(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>{A(""),b(""),g(!1),v(null),S(e=>e+1),null==p||p(s)},size:"small",color:"error",style:{borderRadius:"10px"},children:"Remove Wallet Details"}),(!o||O)&&(0,i.jsx)(k.Z,{variant:"contained",onClick:()=>u(s),size:"small",className:"".concat(C().gradientCta),style:{borderRadius:"10px"},children:o?"Update Wallet Details":"Submit Wallet Details"})]})]})};var eo=e=>{var a,t,l,s;let{setStep:r}=e,{userDetails:d}=(0,o.v9)(e=>
1e.auth),[c,u]=n.useState(null),[_,p]=(0,n.useState)({}),[m,h]=(0,n.useState)([]),[f,x]=(0,n.useState)(1),{finalSigningDirector:v}=(0,o.v9)(e=>e.onboarding),[y,j]=(0,n.useState)(!1),[b,N]=(0,n.useState)(null),S=async e=>{try{let{data:a}=await (0,E.nY)(e);h(a||[]),x(Math.max((null==a?void 0:a.length)||1,1))}catch(e){console.log(e)}},w=()=>{f>1&&x(e=>e-1)},B=e=>{p(a=>{let t={...a};return delete t[e],t}),f>1&&e===f-1&&e>=((null==m?void 0:m.length)||0)&&w()},T=async e=>{try{var a,t;let i=document.querySelector('form[data-wallet-form="'.concat(e,'"]')),n=null==m?void 0:m[e];if(!i){Y.Am.error("Wallet form not found");return}let l=new FormData(i),s={address:l.get("address_".concat(e)),asset:l.get("asset_".concat(e)),network:l.get("network_".concat(e)),platform:l.get("platform_".concat(e)),address_label:l.get("address_label_".concat(e)),purpose_of_transfer:(null==n?void 0:n.purpose_of_transfer)||(null==m?void 0:null===(a=m[0])||void 0===a?void 0:a.purpose_of_transfer)||void 0,email:null==d?void 0:null===(t=d.user)||void 0===t?void 0:t.email};if(!s.address||!s.asset||!s.network||!s.platform){Y.Am.error("Please fill all required wallet details");return}(null==n?void 0:n.id)&&((null==n?void 0:n.status)==="verification_failed"||(null==n?void 0:n.status)==="rejected")?(await (0,E.U6)(n.id,s),Y.Am.success("Wallet updated successfully")):(await (0,E.ut)(s),Y.Am.success("Wallet added successfully")),await S(null==d?void 0:d.id)}catch(e){(0,g.sI)(e)}},A=async e=>{if(e)try{await (0,E.Nz)(e),Y.Am.success("Wallet deleted successfully"),await S(null==d?void 0:d.id),N(null)}catch(e){(0,g.sI)(e)}},D=async e=>{if(e.preventDefault(),0===m.length){Y.Am.warning("Please add at least one wallet before proceeding");return}if(m.some((e,a)=>!_[a])){Y.Am.error("Please upload the wallet ownership video for all wallets");return}let a=new FormData(e.target).get("purpose_of_transfer")||m[0].purpose_of_transfer;m.length>0&&h(m.map(e=>({...e,purpose_of_transfer:a})));try{var t;await (0,E.U6)(null===(t=m[0])||void 0===t?void 0:t.id,{purpose_of_transfer:a}),Y.Am.success("Wallet details updated successfully")}catch(e){(0,g.sI)(e);return}r(e=>e+1)};return(0,n.useEffect)(()=>{(null==d?void 0:d.id)&&S(null==d?void 0:d.id)},[null==d?void 0:d.id]),(0,i.jsxs)("form",{className:C().compInfoBox,onSubmit:D,children:[(0,i.jsxs)("div",{className:C().formBox,children:[(0,i.jsxs)("header",{className:"".concat(C().documentScreenHeader," mb-4"),children:[(0,i.jsx)("h1",{children:"Wallet Addition"}),(0,i.jsx)("p",{className:C().uploadSubtitle,style:{fontSize:"0.8rem"},children:"Whitelist the digital asset wallet addresses intended for your institutional transfers. Please ensure the wallet address and network selection are accurate and the ownership video declares the same."})]}),(0,i.jsxs)("div",{className:"".concat(C().glassCard," ").concat(C().walletCard),children:[(0,i.jsx)("div",{className:"".concat(C().labelRow," ").concat(C().walletCardHeader),children:(0,i.jsx)("p",{className:C().inputTitle,children:"Company Wallet details"})}),Array.from({length:f},(e,a)=>{var t;return(0,i.jsx)("div",{className:"".concat(C().walletSection," ").concat(a===f-1?C().walletSectionLast:""),style:{marginBottom:a===f-1?0:"1rem"},children:(0,i.jsx)(es,{walletIndex:a,existingWalletData:m[a]||null,userDetails:d,setObjNameWalletVideo:u,setWalletVideoMap:p,onAddWallet:T,onDeleteWallet:e=>N(e),onRemoveUnsubmitted:B},(null===(t=m[a])||void 0===t?void 0:t.id)||"wallet-".concat(a))},a)}),(0,i.jsx)("div",{className:C().walletActions,children:f<3&&(0,i.jsxs)(k.Z,{variant:"outlined",onClick:()=>{f<3&&x(e=>e+1)},size:"small",className:C().gradientCta,style:{borderRadius:"10px"},children:["Add Wallet (",f,"/3)"]})}),(0,i.jsx)("div",{className:C().gridOfThree,style:{marginTop:"1.5rem"},children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Purpose of Transfer"}),(0,i.jsx)("textarea",{required:!0,placeholder:"",name:"purpose_of_transfer",defaultValue:null===(a=m[0])||void 0===a?void 0:a.purpose_of_transfer,disabled:0===m.length||!!(null===(t=m[0])||void 0===t?void 0:t.purpose_of_transfer),onClick:()=>{0===m.length&&Y.Am.warning("Please add at least one wallet before filling this field")},title:"Please enter a valid purpose of transfer"})]})}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>j(!0),style:{borderRadius:"10px"},className:C().gradientCta,children:"View Declaration"})]})]}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>r(e=>e-1),children:"Back"}),(0,i.jsx)(k.Z,{type:"submit",variant:"contained",className:C().gradientCta,children:"Save & Next"})]}),(0,i.jsx)(R.Z,{modalStatus:y,modalHandleClose:()=>j(!1),children:(0,i.jsx)(et,{entityName:null==d?void 0:d.company_name,walletData:m,purpose:(null===(l=m[0])||void 0===l?void 0:l.purpose_of_transfer)||(null===(s=document.querySelector('textarea[name="purpose_of_transfer"]'))||void 0===s?void 0:s.value),finalSigningDirectorName:null==v?void 0:v.name})}),(0,i.jsx)(R.Z,{modalStatus:!!b,modalHandleClose:()=>N(null),customStyles:{maxWidth:"420px",width:"calc(100% - 0rem)"},children:(0,i.jsxs)("div",{style:{padding:"1.5rem"},children:[(0,i.jsx)("p",{style:{margin:0,fontSize:"1rem",fontWeight:500},children:"Are you sure you want to delete this wallet?"}),(0,i.jsxs)("div",{style:{marginTop:"1rem",display:"flex",justifyContent:"center",gap:"0.6rem"},children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>N(null),children:"Cancel"}),(0,i.jsx)(k.Z,{variant:"contained",color:"error",onClick:()=>A(b),children:"Delete"})]})]})})]})},er=e=>{let{blackListedCountries:a=[],greyListedCountries:t=[],sanctionsFields:n=[],sanctionsForm:l={},containerStyle:s}=e;return(0,i.jsxs)("div",{className:C().declarationLetter,style:s,children:[n.map((e,a)=>{let t=!!(null==l?void 0:l[e.key]),n=(null==l?void 0:l[e.detailsKey])||"";return(0,i.jsxs)("div",{style:{marginTop:"0.7rem"},children:[(0,i.jsx)("p",{children:(0,i.jsx)("span",{children:e.label})}),(0,i.jsx)("p",{children:(0,i.jsx)("span",{children:"Selected : ".concat(t?"Yes":"No")})}),(0,i.jsx)("p",{children:t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:e.detailsLabel})," ",(0,i.jsx)("span",{className:C().dynamicText,children:n||"-"})]})})]},e.key)}),(0,i.jsxs)("div",{style:{marginTop:"0.7rem"},children:[(0,i.jsx)("p",{children:(0,i.jsx)("span",{children:"(7) Kindly declare, none of the Beneficial owner/Director/Authorised signatory are subject to or part of any negative sanction lists."})}),(0,i.jsx)("p",{children:(0,i.jsx)("span",{className:C().dynamicText,children:(null==l?void 0:l.sanctions_declaration_confirmed)?"We declare that none of the Beneficial owner/Director/Authorised signatory are subject to or part of any negative sanction lists.":"Declaration not confirmed"})})]})]})},ed=t(1031),ec=t(61053),eu=e=>{let{personName:a="_________",companyName:t="_________",din:n="_________"}=e;return(0,i.jsxs)("div",{className:C().declarationLetter,children:[(0,i.jsxs)("p",{children:["I, ",(0,i.jsx)("span",{className:C().dynamicText,children:a}),", as the Director of ",(0,i.jsx)("span",{className:C().dynamicText,children:t}),", hereby declare and undertake that the crypto asset being transferred by our company is sourced from clean sources and is free from any involvement in malicious, terrorist, or child abuse activities."]}),(0,i.jsx)("p",{children:"I affirm that the aforementioned crypto asset and related transactions have been obtained legally and in compliance with all applicable laws, regulations, and guidelines. Our company maintains strict measures to ensure that the funds used for acquiring the crypto asset are from legitimate sources and not associated with illegal or unethical activities."}),(0,i.jsxs)("p",{children:["My Director Identification Number (DIN) is"," ",(0,i.jsx)("span",{className:C().dynamicText,children:n}),", which can be verified for authentication. This undertaking assures you that our company upholds high standards of compliance and ethical conduct."]}
1),(0,i.jsx)("p",{children:"We have implemented robust internal controls, and compliance procedures, regarding terrorist financing, and other illegal activities associated with cryptocurrencies. Our employees are well-informed about anti-money laundering (AML) and know-your-customer (KYC) regulations."}),(0,i.jsx)("p",{children:"Should any evidence or suspicion arise regarding the illegitimate source of the crypto asset, our company is prepared to cooperate fully with law enforcement agencies and regulatory authorities."})]})},e_=e=>{let{companyName:a="_________"}=e;return(0,i.jsxs)("div",{className:C().declarationLetter,children:[(0,i.jsxs)("p",{children:[" ","We, ",(0,i.jsx)("span",{className:C().dynamicText,children:a}),", hereby affirm and ensure the establishment of a distinct account exclusively designated for transactions with Carretx Technologies Private Limited ('Carret'). This measure is implemented to maintain transparency and enhance security in financial operations. It is our commitment that no transactions associated with"," ",(0,i.jsx)("span",{className:C().dynamicText,children:"Carret"})," will be conducted through third party-funded accounts."]})," ",(0,i.jsxs)("p",{children:["Furthermore, we recognize and consent to furnishing monthly bank account statements pertaining to the account utilized for transferring funds to"," ",(0,i.jsx)("span",{className:C().dynamicText,children:"Carret"}),"."]})," ",(0,i.jsxs)("p",{children:["In the event of any deviation from the above-mentioned terms, I understand that ",(0,i.jsx)("span",{className:C().dynamicText,children:a})," bears full responsibility. Moreover, in instances where payments are not transferred from the specified account, or in cases of liens or receipt of police complaints, I acknowledge"," ",(0,i.jsx)("span",{className:C().dynamicText,children:"Carret"}),"’s right to place a lien on my account and take necessary actions as per their internal policies."]})]})},ep=e=>{let{companyName:a="_________",pan:t="_________"}=e;return(0,i.jsxs)("div",{className:C().declarationLetter,children:[(0,i.jsxs)("ul",{className:"list-disc ml-6 space-y-3 text-sm text-gray-700 leading-relaxed text-[15px] mb-2",children:["I, ",(0,i.jsx)("span",{className:C().dynamicText,children:a})," (PAN-",(0,i.jsx)("span",{className:C().dynamicText,children:t}),"), a customer of"," ",(0,i.jsx)("strong",{children:"Carretx Technologies Private Limited (Carret)"})," engaged in trading activities, hereby declare, undertake, and acknowledge the following:"]}),(0,i.jsxs)("ul",{className:"list-disc ml-6 space-y-3 text-sm text-gray-700 leading-relaxed text-[15px] mb-2",children:[(0,i.jsx)("li",{children:"I understand and agree that in the course of OTC trading with Carret, if any lien, debit freeze, or similar restriction is placed on any bank account belonging to Carret or Carret’s end users, and such action is directly or indirectly related to transactions conducted by me, I shall be fully responsible for resolving the issue with the concerned bank and/or regulatory authority."}),(0,i.jsx)("li",{children:"I agree that if the available balance in my account with Carret is sufficient to cover the disputed/lien-marked amount, Carret shall have the right to lien mark or block such amount promptly. In cases where the available balance is insufficient, I agree to immediately deposit with Carret an amount equivalent to the disputed/lien-marked sum, which shall be lien-marked by Carret and held at Carret until the issue is resolved and the restrictions on Carret’s or its customers’ accounts are lifted."}),(0,i.jsxs)("li",{children:["I acknowledge that these funds will be kept under lien and not available for withdrawal or use until such time as:",(0,i.jsxs)("ul",{className:"list-disc ml-8 mt-2 space-y-1",children:[(0,i.jsx)("li",{children:"The lien/debit freeze on the affected Carret and/or Carret user account(s) is lifted,"}),(0,i.jsx)("li",{children:"The underlying matter has been resolved to Carret’s satisfaction."})]})]}),(0,i.jsx)("li",{children:"Upon resolution of the issue and removal of all account restrictions on Carret and its customers, the lien on the amount held in reserve will be released, and the funds will be made accessible to me."}),(0,i.jsx)("li",{children:"This declaration is made voluntarily and is binding upon me, my successors, and assigns."})]})]})},em=e=>{var a,t;let{setStep:l}=e,{userDetails:s}=(0,o.v9)(e=>
1e.auth),[r,d]=(0,n.useState)(!1),[c,u]=(0,n.useState)(!1),[_,p]=(0,n.useState)(!1),[m,h]=(0,n.useState)(null),{finalSigningDirector:f}=(0,o.v9)(e=>e.onboarding);return(0,i.jsxs)("div",{className:"mt-2",children:[(0,i.jsx)("hr",{className:"my-4 mt-6"}),(0,i.jsxs)("div",{className:"".concat(C().compInfoBox," flex flex-col md:flex-row md:justify-between md:items-center"),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Source of Funds Declaration"}),(0,i.jsx)("p",{children:"Disclosure detailing the lawful origin and legitimacy of the company's funds"})]}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>d(!0),className:C().gradientCta,style:{borderRadius:"10px"},children:"View Declaration"})]}),(0,i.jsx)("hr",{className:"my-2 mt-0"}),(0,i.jsxs)("div",{className:"".concat(C().compInfoBox," flex flex-col md:flex-row md:justify-between md:items-center"),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Bank Account Segregation"}),(0,i.jsx)("p",{children:"Assurance that company funds will be maintained in a designated, segregated bank account"})]}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>u(!0),className:C().gradientCta,style:{borderRadius:"10px"},children:"View Declaration"})]}),(0,i.jsx)("hr",{className:"my-2 mt-0"}),(0,i.jsxs)("div",{className:"".concat(C().compInfoBox," flex flex-col md:flex-row md:justify-between md:items-center"),children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Customer Undertaking for Lien Resolution"}),(0,i.jsx)("p",{children:"Commitment from the company to cooperate in resolving any liens or restrictions of assets."})]}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>p(!0),className:C().gradientCta,style:{borderRadius:"10px"},children:"View Declaration"})]}),(0,i.jsx)(R.Z,{modalStatus:r,modalHandleClose:()=>d(!1),children:(0,i.jsx)(eu,{personName:null==f?void 0:f.name,companyName:null==s?void 0:s.company_name,din:null==f?void 0:f.din,entityName:null==s?void 0:s.company_name,directorName:null==f?void 0:f.name})}),(0,i.jsx)(R.Z,{modalStatus:c,modalHandleClose:()=>u(!1),children:(0,i.jsx)(e_,{companyName:null==s?void 0:s.company_name})}),(0,i.jsx)(R.Z,{modalStatus:_,modalHandleClose:()=>p(!1),children:(0,i.jsx)(ep,{companyName:null==s?void 0:s.company_name,pan:null==m?void 0:null===(a=m.created_object_data)||void 0===a?void 0:a.pan_no})}),(0,i.jsx)("div",{className:"hidden",children:(0,i.jsx)(Z.Z,{user_id:null==s?void 0:s.id,url_for:"pan",doc_type:"pan",owner_type:"self",email:null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.email,affiliated_entity_id:null,preFillData:null,setSaveResponse:h})})]})},eh=e=>{var a;let{modalHandleClose:t}=e,{userDetails:l}=(0,o.v9)(e=>e.auth),[s,r]=(0,n.useState)(!1);return null==l||null===(a=l.user)||void 0===a||a.is_admin_enabled,(0,i.jsxs)("div",{className:"bg-white rounded-2xl p-6 shadow-md max-w-2xl mx-auto text-gray-800",children:[(0,i.jsxs)("div",{className:"p-4",children:[(0,i.jsx)("h3",{className:"font-semibold text-gray-900 mb-2",children:"In Process"}),(0,i.jsxs)("ul",{className:"list-disc pl-5 space-y-1 text-sm",children:[(0,i.jsx)("li",{children:"Your documents have been uploaded Successfully."}),(0,i.jsx)("li",{children:"The submitted information will be reviewed shortly. Team will get back to you soon."})]})]}),(0,i.jsx)("div",{className:"flex justify-end mt-6 gap-3",children:(0,i.jsx)(k.Z,{variant:"outlined",onClick:t,disabled:s,children:"Close"})})]})};let ef=[["Algeria","Angola","Bolivia","Bulgaria","Cameroon","C\xf4te d'Ivoire"],["Haiti","Kenya","Kuwait","Lao PDR","Lebanon","Monaco"],["Nepal","Papua New Guinea","South Sudan","Syria","Venezuela","Vietnam"],["Democratic Republic of the Congo","Namibia","Virgin Islands (UK)","Yemen","",""]],ex=["Myanmar","Democratic People’s Republic of Korea","Iran"];var ev=()=>(0,i.jsxs)("div",{className:C().countryListWrap,children:[(0,i.jsxs)("div",{className:C().countryListCard,children:[(0,i.jsxs)("div",{className:C().countryListCardHeader,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:C().countryListTitle,children:"Jurisdictions with strategic deficiencies"}),(0,i.jsx)("p",{className:C().countryListSubtitle,children:"Listed countries / territories as per FATF - 2026"})]}),(0,i.jsx)("span",{className:C().countryListBadge,children:"Grey list"})]}),(0,i.jsx)("div",{className:C().countryTableWrap,children:(0,i.jsx)("table",{className:C().countryTable,children:(0,i.jsx)("tbody",{children:ef.map((e,a)=>(0,i.jsx)("tr",{children:e.map((e,t)=>(0,i.jsx)("td",{children:e},"".concat(a,"-").concat(t)))},a))})})})]}),(0,i.jsxs)("div",{className:"".concat(C().countryListCard),children:[(0,i.jsxs)("div",{className:C().countryListCardHeader,children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("p",{className:C().countryListTitle,children:"FATF Blacklisted countries"}),(0,i.jsx)("p",{className:C().countryListSubtitle,children:"High-risk jurisdictions under increased monitoring"})]}),(0,i.jsx)("span",{className:"".concat(C().countryListBadge," ").concat(C().countryListBadgeDanger),children:"Blacklist"})]}),(0,i.jsx)("div",{className:C().countryTableWrap,children:(0,i.jsx)("table",{className:"".concat(C().countryTable),children:(0,i.jsx)("tbody",{children:(0,i.jsx)("tr",{children:ex.map(e=>(0,i.jsx)("td",{children:e},e))})})})})]})]});let ey=[{key:"dealings_with_high_risk_jurisdictions",detailsKey:"dealings_with_high_risk_jurisdictions_details",label:"1. Does the company or any of its related parties incorporated, operates or has revenues and principal place of business with direct or indirect dealings in /with / through the listed countries / territories?",detailsLabel:"If Yes, please provide details for the company or its related parties in detail
1:"},{key:"related_parties_in_high_risk_jurisdictions",detailsKey:"related_parties_in_high_risk_jurisdictions_details",label:"2.Does the company have any beneficial owners, directors, officers, authorized signatories, partners (as applicable) and related parties are citizens, nationality and resides in any of the listed countries / territories?",detailsLabel:"If Yes, provide details including full name of the individual(s), role in the company, the country of citizenship, nationality and place of residence. If entity, provide the activities involved, country of operation and the relationship with the company:"},{key:"trade_with_high_risk_jurisdictions",detailsKey:"trade_with_high_risk_jurisdictions_details",label:"3. Does the company or any of its related parties deals, trades, transports any goods, services, technology, software, resources that originate from, or to / from / through the listed countries / territories?",detailsLabel:"If Yes, provide the activities involved, country of operation and the relationship with the company:"},{key:"dealings_with_sanctioned_persons_or_entities",detailsKey:"dealings_with_sanctioned_persons_or_entities_details",label:"4. Does the company or any of its related parties have any direct or indirect dealings with or through any Sanctions Persons or Sanctioned Entity?",detailsLabel:"If Yes, provide details including full name of the individual(s), role in the company, the country of citizenship, nationality and place of residence. If entity, provide the activities involved, country of operation and the relationship with the company:"},{key:"arms_weapons_defence_business",detailsKey:"arms_weapons_defence_business_details",label:"5. Does the company or any of its related parties directly or indirectly deal in products related to Arms, Weapons, pyrotechnics or defence industries?",detailsLabel:"If Yes, provide full name of the company(ies) and its business activities:"},{key:"has_pep_associations",detailsKey:"has_pep_associations_details",label:"6. Does the company have any beneficial owners, directors, officers, authorized signatories, partners (as applicable) and related parties who is a PEP (Politically Exposed Person).",detailsLabel:"If Yes, provide details including full name of the individual(s), role in the company, nationality and place of residence and their position or role in the government"}];var eg=e=>{var a,t;let{setStep:l}=e,s=(0,o.I0)(),{userDetails:r}=(0,o.v9)(e=>e.auth),{isFeatureVisible:d}=b(),c=d(j.Ot.OTHER_DECLARATIONS_EXTRA),[u,_]=(0,n.useState)([]),[p,m]=(0,n.use
1State)([]),[h,f]=(0,n.useState)("none"),[x,v]=(0,n.useState)(!1),[y,g]=(0,n.useState)("none"),[N,S]=(0,n.useState)(!1),[w,B]=(0,n.useState)(!1),[A,D]=(0,n.useState)(()=>ey.reduce((e,a)=>(e[a.key]=!1,e[a.detailsKey]="",e),{})),L=()=>ey.reduce((e,a)=>{let t=!!A[a.key];return e[a.key]=t?"YES":"NO",e[a.detailsKey]=t&&A[a.detailsKey]||"",e},{account_id:null==r?void 0:r.id,sanctions_declaration_confirmed:!!A.sanctions_declaration_confirmed}),Z=async()=>{try{await (0,E.kS)(L()),Y.Am.success("Sanctions declaration submitted successfully")}catch(e){console.log(e),Y.Am.error("Failed to submit sanctions declaration")}},P=async e=>{e.preventDefault();let a={blacklisted_countries:"none"===h?[]:[h.toString()],greylisted_countries:"none"===y?[]:[y.toString()]};try{await (0,T.Yd)(null==r?void 0:r.id,a),await (0,E.kS)(L()),s((0,O.c)()),S(!0)}catch(e){console.log(e)}},F=async()=>{try{var e,a;let t=await (0,I.j4)("is_blacklisted=true"),i=await (0,I.j4)("is_greylisted=true"),n=[{id:"none",name:"None"},...(null==t?void 0:null===(e=t.data)||void 0===e?void 0:e.results)||[]],l=[{id:"none",name:"None"},...(null==i?void 0:null===(a=i.data)||void 0===a?void 0:a.results)||[]];_(n),m(l)}catch(e){console.log(e)}};return(0,n.useEffect)(()=>{F()},[]),(0,n.useEffect)(()=>{(async()=>{if(null==r?void 0:r.id)try{var e;let{data:a}=await (0,E.CG)(r.id),t=null==a?void 0:null===(e=a.results)||void 0===e?void 0:e[0];if(!t)return;let i=ey.reduce((e,a)=>(e[a.key]="YES"===String((null==t?void 0:t[a.key])||"").toUpperCase(),e[a.detailsKey]=(null==t?void 0:t[a.detailsKey])||"",e),{sanctions_declaration_confirmed:!!(null==t?void 0:t.sanctions_declaration_confirmed)});D(e=>({...e,...i}))}catch(e){console.log(e)}})()},[null==r?void 0:r.id]),(0,n.useEffect)(()=>{let e=Array.isArray(null==r?void 0:r.blacklisted_countries)?r.blacklisted_countries.map(e=>e.id):[],a=Array.isArray(null==r?void 0:r.greylisted_countries)?r.greylisted_countries.map(e=>e.id):[];f((null==e?void 0:e[0])||"none"),g((null==a?void 0:a[0])||"none")},[r]),(0,i.jsxs)("form",{className:C().compInfoBox,onSubmit:P,children:[(0,i.jsxs)("div",{className:"".concat(C().formBox," ").concat(C().sectionCard),children:[(0,i.jsxs)("div",{className:C().sectionCardHeader,style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,i.jsx)("p",{className:C().inputTitle,children:"SANCTIONS DECLARATION"}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>B(!w),style:{borderRadius:"10px"},className:C().toggleButtonStyle,children:w?(0,i.jsx)(ed.Z,{fontSize:"small"}):(0,i.jsx)(ec.Z,{fontSize:"small"})})]}),w&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ev,{}),(0,i.jsxs)("div",{style:{marginTop:"1rem",display:"grid",gap:"0.9rem"},children:[ey.map(e=>{let a=!!A[e.key];return(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{style:{display:"block",lineHeight:1.4},children:(0,i.jsx)("span",{children:e.label})}),(0,i.jsxs)("div",{className:C().radioBox,children:[(0,i.jsxs)("label",{className:C().radioOption,children:[(0,i.jsx)("input",{type:"radio",name:e.key,checked:a,onChange:()=>D(a=>({...a,[e.key]:!0}))}),(0,i.jsx)("span",{children:"Yes"})]}),(0,i.jsxs)("label",{className:C().radioOption,children:[(0,i.jsx)("input",{type:"radio",name:e.key,checked:!a,onChange:()=>D(a=>({...a,[e.key]:!1,[e.detailsKey]:""}))}),(0,i.jsx)("span",{children:"No"})]})]}),a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("p",{style:{marginTop:"0.6rem",marginBottom:"0.35rem",fontSize:"0.82rem"},children:e.detailsLabel}),(0,i.jsx)("textarea",{placeholder:"Enter details",value:A[e.detailsKey],onChange:a=>D(t=>({...t,[e.detailsKey]:a.target.value})),style:{marginTop:"0.2rem",minHeight:"80px"},required:!0})]})]},e.key)}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{style:{display:"block",lineHeight:1.4},children:"Kindly declare, none of the Beneficial owner/Director/Authorised signatory are subject to or part of any negative sanction lists."}),(0,i.jsxs)("label",{className:C().checkboxOption,children:[(0,i.jsx)("input",{type:"checkbox",checked:!!A.sanctions_declaration_confirmed,onChange:e=>D(a=>({...a,sanctions_declaration_confirmed:e.target.checked})),required:!0}),(0,i.jsx)("span",{children:"We declare that none of the Beneficial owner/Director/Authorised signatory are subject to or part of any negative sanction lists."})]})]})]}),(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",width:"100%",alignSelf:"center",marginTop:"1rem",gap:"1rem"},children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>v(!0),style:{borderRadius:"10px"},className:C().gradientCta,children:"View Declaration"}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:Z,style:{borderRadius:"10px"},className:C().gradientCta,children:"Submit"})]})]})]}),c&&(0,i.jsx)(em,{}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>l(e=>e-1),children:"Back"}),(0,i.jsx)(k.Z,{type:"sumit",variant:"contained",className:C().gradientCta,children:"Save"})]}),(0,i.jsx)(R.Z,{modalStatus:x,modalHandleClose:()=>v(!1),customStyles:{maxHeight:"70vh"},children:(0,i.jsx)(er,{blackListedCountries:[null===(a=u.find(e=>
1String(e.id)===String(h)))||void 0===a?void 0:a.name].filter(Boolean),greyListedCountries:[null===(t=p.find(e=>String(e.id)===String(y)))||void 0===t?void 0:t.name].filter(Boolean),sanctionsFields:ey,sanctionsForm:A,containerStyle:{minHeight:"auto",maxHeight:"60vh",overflowY:"auto"}})}),(0,i.jsx)(R.Z,{modalStatus:N,modalHandleClose:()=>S(!1),children:(0,i.jsx)(eh,{modalHandleClose:()=>S(!1)})})]})},ej=t(27990),eb=t(30381),eN=t.n(eb),eS=e=>{var a;let{kycStatus:t,isExternalTokenExpired:l,isTitleVisible:s=!0,affiliatedEntityId:r,ownerType:d,preFillData:c=null,truncateTokenLength:u=null,fundtionCall:_=()=>{}}=e,[p,m]=(0,n.useState)(!1),[h,f]=(0,n.useState)(null==c?void 0:c.external_kyc_token),{userDetails:x}=(0,o.v9)(e=>e.auth),v=async()=>{m(!0);try{let e={account_id:null==x?void 0:x.id,affiliated_entity_id:r},{data:a}=await (0,E.qS)(e);f(a.external_kyc_token),y(a.external_kyc_token),_()}catch(e){(0,g.sI)(e)}finally{m(!1)}},y=e=>{(0,g.BI)("https://www.carret.in/onboarding/kyc/".concat(e))};(0,n.useEffect)(()=>{c&&f((null==c?void 0:c.is_external_token_expired)?null:null==c?void 0:c.external_kyc_token)},[c]);let j=h&&Number.isFinite(u)&&u>0&&h.length>u?"".concat(h.slice(0,u),"..."):h,b=String(null!==(a=null!=t?t:null==c?void 0:c.kyc_status)&&void 0!==a?a:"").toLowerCase(),N=!!(null!=l?l:null==c?void 0:c.is_external_token_expired),S=(null==c?void 0:c.token_expiry_time)?new Date(c.token_expiry_time).getTime():null,w=Number.isFinite(S)&&S<Date.now();return console.log(w,"isTokenExpiryInPast"),(0,i.jsxs)("div",{className:"text-sm",children:[s&&(0,i.jsxs)("p",{className:"text-4xl font-medium",children:["Upload ",d," documents"]}),(0,i.jsxs)("div",{className:"flex align-center flex-col gap-2 pb-3",children:[s&&(0,i.jsx)("p",{className:"text-sm",children:"KYC Link"}),(0,i.jsxs)("div",{children:[(0,i.jsxs)("div",{className:"flex items-center gap-2 justify-between",children:[(0,i.jsxs)("p",{className:"text-xs bg-gray-100 p-2 rounded-md flex-1 min-w-0 truncate",children:[j||"Not Generated"," "]}),N&&"pending"===b||w||!h?(0,i.jsx)(k.Z,{variant:"outlined",onClick:v,loading:p,size:"small",children:"Generate"}):h?(0,i.jsx)(ej.Z,{onClick:()=>y(h),fontSize:"small",cursor:"pointer"}):null]}),(0,i.jsxs)("p",{className:"text-xs pt-2 opacity-50",children:["Expiring at"," ",eN()(null==c?void 0:c.token_expiry_time).format("DD/MM/YYYY HH:mm:ss")]})]})]})]})},ew=e=>{var a,t,l,s,r,d,c;let{affiliatedEntityId:u,ownerType:_="shareholder",uploadDone:p,preFillData:m=null}=e,{userDetails:h}=(0,o.v9)(e=>e.auth),[f,x]=n.useState(null),[v,y]=n.useState(null),[j,b]=n.useState(null),N=async()=>{try{let e=await (0,E.aw)(null==h?void 0:h.id,"pan",_,null==m?void 0:m.id),a=await (0,E.aw)(null==h?void 0:h.id,"aadhaar_front",_,null==m?void 0:m.id),t=await (0,E.aw)(null==h?void 0:h.id,"aadhaar_back",_,null==m?void 0:m.id);(null==e?void 0:e.count)&&x(null==e?void 0:e.results[0]),(null==t?void 0:t.count)&&b(null==t?void 0:t.results[0]),(null==a?void 0:a.count)&&y(null==a?void 0:a.results[0])}catch(e){console.log("error",e),(0,g.sI)(e)}};return(0,n.useEffect)(()=>{m&&N(null==m?void 0:m.id)},[m]),(0,i.jsxs)("form",{onSubmit:e=>{e.preventDefault(),p()},className:C().ocrBox,children:[(0,i.jsx)(eS,{accountId:null==h?void 0:h.id,affiliatedEntityId:u,ownerType:_,preFillData:m}),m&&(null==m?void 0:m.kyc_status)!=="pending"&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C().gridOfThree,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Pan No"}),(0,i.jsx)("input",{placeholder:"",name:"pan_no",disabled:!0,value:null==f?void 0:null===(a=f.created_object_data)||void 0===a?void 0:a.pan_no})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Name"}),(0,i.jsx)("input",{placeholder:"",name:"name",disabled:!0,value:null==f?void 0:null===(t=f.created_object_data)||void 0===t?void 0:t.name})]})]}),(0,i.jsxs)("div",{className:C().gridOfThree,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Aadhaar No"}),(0,i.jsx)("input",{placeholder:"",name:"mobile",disabled:!0,value:null==v?void 0:null===(l=v.created_object_data)||void 0===l?void 0:l.aadhaar_no})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"D.O.B"}),(0,i.jsx)("input",{placeholder:"",name:"company_name",disabled:!0,value:null==v?void 0:null===(s=v.created_object_data)||void 0===s?void 0:s.dob})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Father Name"}),(0,i.jsx)("input",{placeholder:"",name:"mobile",disabled:!0,value:null==j?void 0:null===(r=j.created_object_data)||void 0===r?void 0:r.father_name})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Address"}),(0,i.jsx)("input",{placeholder:"",name:"company_name",disabled:!0,value:null==j?void 0:null===(d=j.created_object_data)||void 0===d?void 0:d.address})]})]})]}),(0,i.jsx)("div",{className:C().gridOfThree,children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("label",{children:["Upload Address Proof ",(0,i.jsx)("br",{})," (Bank Statement/Utility Bill)"]}),(0,i.jsx)(Z.Z,{user_id:null==h?void 0:h.id,email:null==h?void 0:null===(c=h.user)||void 0===c?void 0:c.email,preFillData:null,setSaveResponse:b,url_for:"address_proof_"+_,doc_type:"address_proof",owner_type:_,affiliated_entity_id:u})]})}),(0,i.jsxs)("div",{className:C().ocrBoxBtn,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:p,children:"Close"}),(0,i.jsx)(k.Z,{variant:"outlined",type:"submit",children:"Done"})]})]})}
1,eC=t(6897),ek=t(3451),eB=t(65408),eT=t(32200),eA=t(33146),eD=t(3314),eL=t(86884),eO=t(37228),eE=t(53907);let eI=e=>{let a=String(null!=e?e:"").replace(/\s+/g," ").trim();return a?a.toLowerCase().replace(/(^|[\s-'])([a-z])/g,(e,a,t)=>"".concat(a).concat(t.toUpperCase())):""},eR=e=>{let a=String(null!=e?e:"").trim();if(!a)return"";if(/^\d{4}-\d{2}-\d{2}$/.test(a)){let[e,t,i]=a.split("-");return"".concat(i,"/").concat(t,"/").concat(e)}return/^\d{2}-\d{2}-\d{4}$/.test(a)?a.replace(/-/g,"/"):a};var eZ=e=>{var a,t;let{setStep:l}=e,{userDetails:s}=(0,o.v9)(e=>e.auth),{isFeatureVisible:r}=b(),d=r(j.Ot.DIRECTOR_VIDEO),[c,u]=n.useState([]),[_,p]=n.useState(!1),[m,h]=n.useState(!0),[f,v]=n.useState(!0),{formatStatusLabel:y,normalizeStatusKey:N}=K(),[S,w]=n.useState({}),[B,T]=n.useState([1]),[A,D]=n.useState(null),[L,O]=n.useState({}),[I,R]=n.useState(null),P=n.useMemo(()=>((null==c?void 0:c.results)||[]).some(e=>{let a=null==e?void 0:e.type,t=null==e?void 0:e.role,i=Array.isArray(a)?a.join(","):String(a||""),n=Array.isArray(t)?t.join(","):String(t||"");return i.toLowerCase().includes("authorized_person")||n.toLowerCase().includes("authorized signatory")}),[c]),F=e=>{let{docKey:a,hasUpload:t,status:i}=e;w(e=>({...e,[a]:{hasUpload:t,status:i}}))},z=e=>{var a;return y(null==S?void 0:null===(a=S[e])||void 0===a?void 0:a.status,"pending")||"pending"},W=e=>N(z(e)),V=async()=>{try{let{data:e}=await (0,E.qw)(null==s?void 0:s.id,["authorized_person","director","ubo"]);u(e)}catch(e){(0,g.sI)(e)}},H=e=>{1!==e&&T(a=>a.filter(a=>a!==e))};return(0,n.useEffect)(()=>{V()},[s,_]),(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:C().compInfoBox,children:[(0,i.jsx)("form",{id:"boardResolutionForm",onSubmit:e=>{e.preventDefault(),l(e=>e+1)},children:(0,i.jsxs)("div",{className:"".concat(C().collapseHeader),style:{flexDirection:"column"},children:[(0,i.jsxs)("div",{className:"flex justify-between w-full flex-column",children:[(0,i.jsx)("p",{className:C().inputTitle,children:d?"Board Resolution & Director Video Declaration":"Board Resolution"}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>h(e=>!e),"aria-expanded":m,children:m?"Hide":"Show"})]}),m&&(0,i.jsxs)("div",{className:"".concat(C().gridOfThree," w-full"),children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelWithLink,children:[(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[(0,i.jsx)("label",{children:"Board Resolution"}),(0,i.jsx)(x.Z,{title:"Board Resolution should be on the company letterhead and signed by directors and stamped",arrow:!0,placement:"right-start",children:(0,i.jsx)(ei.Z,{className:"opacity-50 text-xs h-4 w-4 pb-[2px]",fontSize:"inherit"})})]}),(0,i.jsx)("a",{href:"https://carret-media.s3.ap-south-1.amazonaws.com/onboarding-assets/BR_format.pdf",target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(x.Z,{title:"Download the board resolution format for document upload",children:(0,i.jsx)("span",{className:C().downloadLink,children:"Download format"})})})]}),(0,i.jsx)(Z.Z,{user_id:null==s?void 0:s.id,url_for:"br",doc_type:"br",owner_type:"self",email:null==s?void 0:null===(a=s.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,docKey:"br",onStatusChange:F}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(W("br"))]||""),children:z("br")})})]}),d&&(0,i.jsx)(x.Z,{title:P?"":"Ensure that the video declaration is completed by the final signing director of the company.",placement:"top",arrow:!0,disableHoverListener:P,children:(0,i.jsxs)("div",{id:"director-video-declaration",className:C().inputBox,style:{width:"100%",opacity:P?1:.6,cursor:P?"default":"not-allowed"},children:[(0,i.jsxs)("div",{className:C().labelWithLink,children:[(0,i.jsx)("label",{children:"Director Video"}),(0,i.jsx)("a",{href:"https://carret-media.s3.ap-south-1.amazonaws.com/onboarding-assets/Director+Video+Verification.pdf",target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(x.Z,{title:"Download the script to be followed for director video declaration",children:(0,i.jsx)("span",{className:C().downloadLink,children:"Download format"})})})]}),(0,i.jsxs)("div",{className:"w-[100%]",children:[P?(0,i.jsx)(Z.Z,{user_id:null==s?void 0:s.id,url_for:"video_declaration_director",doc_type:"video_declaration_director",owner_type:"self",email:null==s?void 0:null===(t=s.user)||void 0===t?void 0:t.email,affiliated_entity_id:null,preFillData:null,setSaveResponse:R,isRequired:!0,docKey:"video_declaration_director",onStatusChange:F}):(0,i.jsx)("div",{style:{border:"1px dashed #cbd5e1",borderRadius:"10px",padding:"0.75rem",fontSize:"0.82rem",color:"#64748b",textAlign:"center"},children:"Add an Authorized Signatory first to enable director video declaration."}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",marginTop:"0.5rem"},children:(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(W("video_declaration_director"))]||""),children:z("video_declaration_director")})})]})]})})]})]})}),(0,i.jsxs)("div",{className:"".concat(C().collapseHeader),style:{display:"flex",flexDirection:"column"},children:[(0,i.jsxs)("div",{className:"flex flex-column justify-between w-full",children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Add Key Person"}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>v(e=>!e),"aria-expanded":f,children:f?"Hide":"Show"})]}),f&&(0,i.jsx)(i.Fragment,{children:B.map((e,a)=>(0,i.jsx)(eP,{removeAddListItem:H,addListNo:e,setListUpdate:p,setUpdateResponse:D,uploadResponse:A,setDirectorRoleMap:O,directorVideoUpload:I},e))})]}),(0,i.jsx)(eF,{authorizedPersonList:null==c?void 0:c.results,uploadResponse:A,filledData:null,setListUpdate:p}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>l(e=>e-1),children:"Back"}),(0,i.jsx)(k.Z,{variant:"contained",type:"submit",form:"boardResolutionForm",className:"".concat(C().gradientCta),children:"Next"})]})]})})};let eP=e=>{let{filledData:a=null,index:t,setListUpdate:l,removeAddListItem:s=null,addListNo:r=null,uploadResponse:d,setUpdateResponse:c,setDirectorRoleMap:u,directorVideoUpload:_}=e,{userDetails:p}=(0,o.v9)(e=>e.auth),{finalSigningDirector:m}=(0,o.v9)(e=>e.onboarding),[h,f]=n.useState(!1),v=Array.isArray(null==a?void 0:a.role)?null==a?void 0:a.role:"string"==typeof(null==a?void 0:a.role)?null==a?void 0:a.role.split(",").map(e=>
1e.trim()).filter(Boolean):[],[y,j]=n.useState(v),[b,N]=n.useState(!0),S=async e=>{var a,t,i,n,o,d,_,h,f,x,v;e.preventDefault(),e.stopPropagation();let j=eI(e.target.name.value),b={line1:(null===(a=e.target.address_line1)||void 0===a?void 0:a.value)||"",line2:(null===(t=e.target.address_line2)||void 0===t?void 0:t.value)||"",city:(null===(i=e.target.address_city)||void 0===i?void 0:i.value)||"",state:(null===(n=e.target.address_state)||void 0===n?void 0:n.value)||"",pincode:(null===(o=e.target.address_pincode)||void 0===o?void 0:o.value)||""},N=null===(d=e.target.designation)||void 0===d?void 0:d.value,S=e.target.email_id.value,w=null===(_=e.target.shareholding_percentage)||void 0===_?void 0:_.value,C=null===(h=e.target.din)||void 0===h?void 0:h.value,k=null===(f=e.target.doa)||void 0===f?void 0:f.value,B=null===(x=e.target.is_final_signatory)||void 0===x?void 0:x.value,T=k?k.split("-").reverse().join("/"):void 0,A={"Authorized Signatory":"authorized_person",Director:"director",UBO:"ubo"},D=y.map(e=>A[e]).filter(Boolean).join(","),L={name:j,email:null==p?void 0:null===(v=p.user)||void 0===v?void 0:v.email,type:D,email_id:S,role:y.join(", ")};y.includes("Authorized Signatory")&&(L.address=JSON.stringify({addressLine1:b.line1,addressLine2:b.line2,city:b.city,state:b.state,pincode:b.pincode}),L.designation=N),y.includes("UBO")&&(L.shareholding_percentage=w,L.address=JSON.stringify({addressLine1:b.line1,addressLine2:b.line2,city:b.city,state:b.state,pincode:b.pincode})),y.includes("Director")&&(L.din=C,L.address=JSON.stringify({addressLine1:b.line1,addressLine2:b.line2,city:b.city,state:b.state,pincode:b.pincode}),T&&(L.doa=T),L.is_final_signatory=!m&&"true"===B);try{let a=await (0,E.jL)(L);c(a),e.target.reset(),u(e=>({...e,[r]:!1})),l&&l(e=>!e),s&&s(r)}catch(e){console.log(e),(0,g.sI)(e)}};return n.useEffect(()=>{u(e=>({...e,[r]:y.includes("Director")}))},[r,y,u]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("form",{className:C().formBox,onSubmit:S,children:[(0,i.jsxs)("div",{className:"".concat(C().badgeBg," p-4 mt-4 mb-4 rounded-md text-sm"),children:[(0,i.jsx)("strong",{children:"Note: "}),(0,i.jsxs)("ul",{className:"list-disc pl-5 mt-2 space-y-1 ".concat(C().noteListRoboto),children:[(0,i.jsx)("li",{className:"".concat(C().noteListRoboto),children:"UBO is a natural person(s) exercising control or ultimately have a controlling ownership interest means ownership of/entitlement to more than 10 percent of the shares or capital or profits of the company."}),(0,i.jsx)("li",{children:"The Authorized Person is an individual formally granted the legal capacity to execute agreements and manage account operations on behalf of the entity, typically as evidenced by a Board Resolution."}),(0,i.jsx)("li",{children:"A Director is a formally appointed individual responsible for the governance and management of the entity, as registered with regulatory authorities and listed in the incorporation documents."})]})]}),(0,i.jsxs)("div",{className:C().gridOfThree,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Name"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter name",name:"name",defaultValue:null==a?void 0:a.name,disabled:a,pattern:"[A-Za-z\\s]+",title:"Please enter a valid name",onBlur:e=>{e.target.value=eI(e.target.value)}})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Email"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter email",name:"email_id",defaultValue:null==a?void 0:a.email_id,disabled:a,pattern:"[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",title:"Please enter a valid email"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Select Role"}),(0,i.jsx)(eC.Z,{fullWidth:!0,children:(0,i.jsx)(ek.Z,{multiple:!0,value:y,onChange:e=>j(e.target.value),disabled:a,renderValue:e=>e.join(", "),children:["UBO","Director","Authorized Signatory"].map(e=>(0,i.jsxs)(eB.Z,{value:e,dense:!0,sx:{py:.5,minHeight:32},children:[(0,i.jsx)(D.Z,{size:"small",checked:y.indexOf(e)>-1,sx:{p:.5,"& .MuiSvgIcon-root":{fontSize:18}}}),(0,i.jsx)(eT.Z,{primary:e,primaryTypographyProps:{fontSize:13},sx:{m:0}})]},e))})})]}),y.includes("Authorized Signatory")&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Designation"}),(0,i.jsx)("input",{placeholder:"Enter Designation",name:"designation",required:!0,defaultValue:null==a?void 0:a.Designation,disabled:a,pattern:"[A-Za-z0-9\\s]+",title:"Please enter a valid designation"})]})}),y.includes("UBO")&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Shareholding Percentage"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter shareholding percentage",name:"shareholding_percentage",defaultValue:null==a?void 0:a.shareholding_percentage,disabled:a,type:"number",min:10,max:100,pattern:"\\d{1,3}",title:"Please enter a valid shareholding percentage (minimum 10%)"})]})}),y.includes("Director")&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"DIN"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter DIN",name:"din",defaultValue:null==a?void 0:a.din,disabled:a})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Date of Appointment"}),(0,i.jsx)("input",{placeholder:"DOA",name:"doa",defaultValue:null==a?void 0:a.doa,disabled:a,type:a?"text":"date"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().infoIcon,children:[(0,i.jsx)("label",{children:"Final Signing Director"}),(0,i.jsx)(x.Z,{title:"This director is authorized to sign the final consolidated document containing all company information and declarations.",arrow:!0,placement:"right-start",children:(0,i.jsx)(ei.Z,{className:"opacity-50 text-xs h-4 w-4 pb-[2px]",fontSize:"inherit"})})]}),(0,i.jsxs)("select",{name:"is_final_signatory",defaultValue:m?"false":(null==a?void 0:a.is_final_signatory)||"false",disabled:a||!!m,children:[(0,i.jsx)("option",{value:"false",children:"No"}),(0,i.jsx)("option",{value:"true",children:"Yes"})]})]})]})]}),(y.includes("Authorized Signatory")||y.includes("UBO")||y.includes("Director"))&&(0,i.jsxs)("div",{className:"".concat(C().collapseHeader),style:{flexDirection:"column",marginTop:"1rem"},children:[(0,i.jsxs)("div",{className:"flex justify-between w-full",children:[(0,i.jsx)("p",{className:C().inputTitle,children:"Address"}),(0,i.jsx)("button",{type:"button",className:C().collapseToggle,onClick:()=>N(e=>!e),"aria-expanded":b,children:b?"Hide":"Show"})]}),b&&(0,i.jsxs)("div",{className:C().gridOfThree,style:{width:"100%"},children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Address Line 1"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter Address Line 1",name:"address_line1",defaultValue:null==a?void 0:a.address,disabled:a,title:"Please enter Address Line 1"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("label",{children:["Address Line 2"," ",(0,i.jsx)("span",{style:{fontWeight:400,color:"#6a5b8a",fontSize:"0.8rem"},children:"(Optional)"})]}),(0,i.jsx)("input",{placeholder:"Enter Address Line 2 (optional)",name:"address_line2",disabled:a})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"City"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter City",name:"address_city",disabled:a,title:"Please enter City"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"State"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter State",name:"address_state",disabled:a,title:"Please enter State"})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Pincode"}),(0,i.jsx)("input",{required:!0,placeholder:"Enter Pincode",name:"address_pincode",disabled:a,pattern:"\\d{6}",title:"Please enter a valid 6-digit Pincode"})]})]})]}),(0,i.jsxs)("div",{className:"mt-4 flex gap-4 justify-end flex-center",children:[(0,i.jsx)("div",{className:C().actionButtonBox,children:a?(0,i.jsx)(k.Z,{onClick:()=>f(!0),variant:"outlined",children:"View Docs"}):(0,i.jsx)(k.Z,{type:"submit",size:"",variant:"contained",className:C().gradientCta,style:{marginTop:"-1rem"},children:"Save"})})," ",r>1&&(0,i.jsx)("div",{className:"".concat(C().actionButtonBox),style:{display:"flex",justifyContent:"start"},children:(0,i.jsx)(k.Z,{onClick:()=>s(r),startIcon:(0,i.jsx)(eL.Z,{}),variant:"outlined",children:"Remove"})})]})]}),(0,i.jsx)(R.Z,{modalStatus:h,setModalStatus:f,children:(0,i.jsx)(ew,{affiliatedEntityId:(null==d?void 0:d.id)||(null==a?void 0:a.id),ownerType:"authorized_person",uploadDone:()=>{f(!1),l&&l(e=>!e)},preFillData:a||d})})]})},eF=e=>{var a,t,l,s;let{authorizedPersonList:r,uploadResponse:d,filledData:c,setListUpdate:u}=e,[_,p]=n.useState(!1),[m,h]=n.useState(null),[f,y]=n.useState(!1),[j,b]=n.useState(null),[N,S]=n.useState([]),{formatStatusLabel:w,normalizeStatusKey:B}=K(),[T,A]=n.useState({}),[D,L]=n.useState({name:"",email_id:"",address_line1:"",address_line2:"",address_city:"",address_state:"",address_pincode:"",designation:"",shareholding_percentage:"",din:"",doa:"",is_final_signatory:!1,kyc_status:""}),{userDetails:O}=(0,o.v9)(e=>e.auth),{finalSigningDirector:I}=(0,o.v9)(e=>e.onboarding);n.useEffect(()=>{A({})},[null==m?void 0:m.id,_]);let P=e=>{let{docKey:a,hasUpload:t,status:i}=e;A(e=>({...e,[a]:{hasUpload:t,status:i}}))},F=e=>{var a;return w(null==T?void 0:null===(a=T[e])||void 0===a?void 0:a.status,"pending")||"pending"},z=e=>B(F(e)),W=e=>{if(!e)return"";let a=String(e).trim().toLowerCase();return a?"ubo"===a?"UBO":"director"===a?"Director":"authorized_person"===a?"Authorized person":a.replace(/_/g," ").split(/\s+/).filter(
1Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" "):""},V=e=>{let a=(()=>{if(Array.isArray(e))return e.map(W).filter(Boolean);if("string"==typeof e&&e.includes(","))return e.split(",").map(e=>W(e)).filter(Boolean);let a=W(e);return a?[a]:[]})();return a.length?(0,i.jsx)(eA.Z,{spacing:.25,sx:{alignItems:"flex-start"},children:a.map((e,a)=>(0,i.jsx)("span",{children:e},"".concat(e,"-").concat(a)))}):"-"},H=e=>{if(!e)return{label:"-",color:"default"};let a=String(e).trim();if(!a)return{label:"-",color:"default"};let t=a.toLowerCase(),i=t.replace(/_/g," ").split(/\s+/).filter(Boolean).map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ");return["verified","approved","completed","success","passed"].includes(t)?{label:i,color:"success"}:["pending","in_progress","inprogress","processing"].includes(t)?{label:i,color:"warning"}:["failed","rejected","declined","error"].includes(t)?{label:i,color:"error"}:["initiated","generated","created"].includes(t)?{label:i,color:"info"}:{label:i,color:"default"}},Y=e=>{let a=String(e||"").toLowerCase().trim();return a&&"-"!==a?"verification_failed"===a?"verification_failed":"rejected"===a?"rejected":"uploaded"===a?"uploaded":"approved"===a?"approved":"verified"===a?"verified":["completed","success","passed"].includes(a)?"approved":["pending","in_progress","inprogress","processing"].includes(a)?"pending":["failed","declined","error"].includes(a)?"verification_failed":a:"pending"},U=e=>{let a=Array.isArray(null==e?void 0:e.type)?e.type:"string"==typeof(null==e?void 0:e.type)?e.type.split(",").map(e=>e.trim()).filter(Boolean):[];b(e),S(a);let t={addressLine1:"",addressLine2:"",city:"",state:"",pincode:""};if(null==e?void 0:e.address)try{t="string"==typeof e.address?JSON.parse(e.address):e.address}catch(a){t.addressLine1=e.address}L({name:(null==e?void 0:e.name)||"",email_id:(null==e?void 0:e.email_id)||"",address_line1:t.addressLine1||"",address_line2:t.addressLine2||"",address_city:t.city||"",address_state:t.state||"",address_pincode:t.pincode||"",designation:(null==e?void 0:e.designation)||"",shareholding_percentage:(null==e?void 0:e.shareholding_percentage)||"",din:(null==e?void 0:e.din)||"",doa:(null==e?void 0:e.doa)||"",is_final_signatory:!!(null==e?void 0:e.is_final_signatory),kyc_status:(null==e?void 0:e.kyc_status)||""}),y(!0)},M=()=>{y(!1),b(null),S([])},q=async()=>{try{let e={name:D.name,email_id:D.email_id},a={line1:D.address_line1,line2:D.address_line2,city:D.address_city,state:D.address_state,pincode:D.address_pincode};N.includes("authorized_person")&&(e.address=JSON.stringify({addressLine1:a.line1,addressLine2:a.line2,city:a.city,state:a.state,pincode:a.pincode}),e.designation=D.designation),N.includes("ubo")&&(e.address=JSON.stringify({addressLine1:a.line1,addressLine2:a.line2,city:a.city,state:a.state,pincode:a.pincode}),e.shareholding_percentage=D.shareholding_percentage),N.includes("director")&&(e.din=D.din,e.address=JSON.stringify({addressLine1:a.line1,addressLine2:a.line2,city:a.city,state:a.state,pincode:a.pincode}),D.doa&&(e.doa=eR(D.doa)),e.is_final_signatory=(!I||(null==j?void 0:j.id)===(null==I?void 0:I.id))&&D.is_final_signatory),await (0,E.n1)(null==j?void 0:j.id,e),y(!1),b(null),S([]),u(e=>!e)}catch(e){(0,g.sI)(e)}};return(0,i.jsxs)(eD.Z,{className:"mb-6",children:[(0,i.jsx)(G.Z,{component:X.Z,elevation:0,sx:{border:"1px solid rgba(163, 141, 255, 0.35)",borderRadius:2,overflowX:"auto",overflowY:"hidden",backgroundColor:"#fff",boxShadow:"0 18px 45px rgba(36, 16, 81, 0.12)",fontFamily:"Roboto, Helvetica, Arial, sans-serif"},children:(0,i.jsxs)(J.Z,{size:"small","aria-label":"authorized person table",sx:{minWidth:980,fontFamily:"Roboto, Helvetica, Arial, sans-serif","& th, & td":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}},children:[(0,i.jsx)(Q.Z,{children:(0,i.jsx)($.Z,{sx:{background:"linear-gradient(90deg, #8276d1ff 0%, #6e5bc8 55%, #8a63ff 100%);"},children:["Name","Role","Email","Final Signatory","KYC Link","KYC Status","Action"].map((e,a,t)=>(0,i.jsx)(ee.Z,{sx:{fontWeight:700,textAlign:"left",whiteSpace:"nowrap",color:"#ffffff",borderBottom:"none",py:1.4,px:2},children:e},e))})}),(0,i.jsx)(ea.Z,{sx:{"& .MuiTableRow-root:nth-of-type(even)":{backgroundColor:"rgba(93, 79, 230, 0.04)"},"& .MuiTableRow-root:hover":{backgroundColor:"rgba(93, 79, 230, 0.08)"}},children:null==r?void 0:r.map((e,a)=>{var t,n,l;return(0,i.jsxs)($.Z,{hover:!0,children:[(0,i.jsx)(ee.Z,{sx:{fontWeight:400,color:"grey.900",borderColor:"rgba(0,0,0,0.06)",whiteSpace:"nowrap",verticalAlign:"top",py:1.6,px:2},children:(null==e?void 0:e.name)||"-"}),(0,i.jsx)(ee.Z,{sx:{borderColor:"rgba(0,0,0,0.06)",verticalAlign:"top",py:1.6,px:2},children:V(null==e?void 0:e.type)}),(0,i.jsx)(ee.Z,{sx:{borderColor:"rgba(0,0,0,0.06)",whiteSpace:"nowrap",verticalAlign:"top",py:1.6,px:2},children:(null==e?void 0:e.email_id)||"-"}),(0,i.jsx)(ee.Z,{sx:{borderColor:"rgba(0,0,0,0.06)",verticalAlign:"top",py:1.6,px:2},children:(()=>
1{if(!(Array.isArray(null==e?void 0:e.type)?e.type:"string"==typeof(null==e?void 0:e.type)?e.type.split(",").map(e=>e.trim()).filter(Boolean):[]).includes("director"))return"-";let a=null==e?void 0:e.is_final_signatory;return!0===a||"true"===a?"Yes":"No"})()}),(0,i.jsx)(ee.Z,{sx:{borderColor:"rgba(0,0,0,0.06)",whiteSpace:"nowrap",verticalAlign:"top",py:1.6,px:2},children:(0,i.jsx)(eS,{isTitleVisible:!1,affiliatedEntityId:null==e?void 0:e.id,ownerType:"authorized_person",fundtionCall:()=>shareholderListData(),preFillData:e,truncateTokenLength:15})}),(0,i.jsx)(ee.Z,{sx:{borderColor:"rgba(0,0,0,0.06)",whiteSpace:"nowrap",verticalAlign:"top",py:1.6,px:2},children:(()=>{let{label:a}=H(null==e?void 0:e.kyc_status),t=Y(B((null==e?void 0:e.kyc_status)||a||"pending"));return(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C().docStatusBadgeForTable," ").concat(C()["docStatus_".concat(t)]||""),children:a})})()}),(0,i.jsx)(ee.Z,{sx:{borderColor:"rgba(0,0,0,0.06)",verticalAlign:"top",minWidth:120,py:1.2,px:2},children:(0,i.jsxs)(eA.Z,{direction:"row",spacing:1,alignItems:"center",children:[(0,i.jsx)(x.Z,{title:"Upload",children:(0,i.jsx)(v.Z,{"aria-label":"Upload",onClick:()=>{h(e),p(!0)},size:"small",sx:{border:"1px solid rgba(163, 141, 255, 0.7)",color:"#5d4fe6",borderRadius:2,width:34,height:34,backgroundColor:"#ffffff"},children:(0,i.jsx)(eO.Z,{fontSize:"small"})})}),(0,i.jsx)(x.Z,{title:"Edit",children:(0,i.jsx)(v.Z,{"aria-label":"Edit",onClick:()=>U(e),size:"small",sx:{border:"1px solid rgba(163, 141, 255, 0.7)",color:"#5d4fe6",borderRadius:2,width:34,height:34,backgroundColor:"#ffffff"},children:(0,i.jsx)(eE.Z,{fontSize:"small"})})})]})})]},null!==(l=null!==(n=null!==(t=null==e?void 0:e.id)&&void 0!==t?t:null==e?void 0:e.email_id)&&void 0!==n?n:null==e?void 0:e.name)&&void 0!==l?l:a)})})]})}),(0,i.jsx)(R.Z,{modalStatus:_,setModalStatus:p,modalHandleClose:()=>p(!1),children:(0,i.jsx)("div",{className:"".concat(C().ocrBox," ").concat(C().editModalBox),children:(0,i.jsxs)("div",{className:C().gridOfTwo,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Aadhaar Front"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(z("aadhaar_front"))]||""),children:F("aadhaar_front")})]}),(0,i.jsx)(Z.Z,{user_id:null==O?void 0:O.id,url_for:"aadhaar_front",doc_type:"aadhaar_front",owner_type:"authorized_person",email:null==O?void 0:null===(a=O.user)||void 0===a?void 0:a.email,affiliated_entity_id:null==m?void 0:m.id,preFillData:m,docKey:"aadhaar_front",onStatusChange:P})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Aadhaar Back"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(z("aadhaar_back"))]||""),children:F("aadhaar_back")})]}),(0,i.jsx)(Z.Z,{user_id:null==O?void 0:O.id,url_for:"aadhaar_back",doc_type:"aadhaar_back",owner_type:"authorized_person",email:null==O?void 0:null===(t=O.user)||void 0===t?void 0:t.email,affiliated_entity_id:null==m?void 0:m.id,preFillData:m,docKey:"aadhaar_back",onStatusChange:P})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"PAN"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(z("pan"))]||""),children:F("pan")})]}),(0,i.jsx)(Z.Z,{user_id:null==O?void 0:O.id,url_for:"pan",doc_type:"pan",owner_type:"authorized_person",email:null==O?void 0:null===(l=O.user)||void 0===l?void 0:l.email,affiliated_entity_id:null==m?void 0:m.id,preFillData:m,docKey:"pan",onStatusChange:P})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Upload Address Proof"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(z("address_proof"))]||""),children:F("address_proof")})]}),(0,i.jsx)(Z.Z,{user_id:null==O?void 0:O.id,doc_type:"address_proof",owner_type:"authorized_person",email:null==O?void 0:null===(s=O.user)||void 0===s?void 0:s.email,affiliated_entity_id:null==m?void 0:m.id,url_for:"address_proof_authorized_person",preFillData:m,docKey:"address_proof",onStatusChange:P})]})]})})}),(0,i.jsx)(R.Z,{modalStatus:f,setModalStatus:y,modalHandleClose:M,children:(0,i.jsxs)("div",{className:C().ocrBox,children:[(0,i.jsxs)("div",{className:C().gridOfThree,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Name"}),(0,i.jsx)("input",{placeholder:"Enter name",value:D.name,onChange:e=>L(a=>({...a,name:e.target.value})),onBlur:e=>L(a=>({...a,name:eI(e.target.value)}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Email"}),(0,i.jsx)("input",{placeholder:"Enter email",value:D.email_id,onChange:e=>L(a=>({...a,email_id:e.target.value}))})]}),N.includes("authorized_person")&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Designation"}),(0,i.jsx)("input",{placeholder:"Enter designation",value:D.designation,onChange:e=>L(a=>({...a,designation:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"KYC Status"}),(0,i.jsx)("input",{placeholder:"Enter KYC Status",value:D.kyc_status,disabled:!0})]})]}),N.includes("ubo")&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Shareholding Percentage"}),(0,i.jsx)("input",{placeholder:"Enter shareholding percentage",value:D.shareholding_percentage,onChange:e=>L(a=>({...a,shareholding_percentage:e.target.value}))})]}),N.includes("director")&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"DIN"}),(0,i.jsx)("input",{placeholder:"Enter DIN",value:D.din,onChange:e=>L(a=>({...a,din:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Designation"}),(0,i.jsx)("input",{placeholder:"Enter designation",value:D.designation,onChange:e=>L(a=>({...a,designation:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"KYC Status"}),(0,i.jsx)("input",{placeholder:"Enter KYC Status",value:D.kyc_status,disabled:!0})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Date of Appointment"}),(0,i.jsx)("input",{placeholder:"DOA",value:D.doa,onChange:e=>L(a=>({...a,doa:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().infoIcon,children:[(0,i.jsx)("label",{children:"Final Signing Director"}),(0,i.jsx)(x.Z,{title:"This director is authorized to sign the final consolidated document containing all company information and declarations.",arrow:!0,placement:"right-start",children:(0,i.jsx)(ei.Z,{className:"opacity-50 text-xs h-4 w-4 pb-[2px]",fontSize:"inherit"})})]}),(0,i.jsxs)("select",{value:D.is_final_signatory?"true":"false",onChange:e=>L(a=>({...a,is_final_signatory:"true"===e.target.value})),disabled:!!I&&(null==j?void 0:j.id)!==(null==I?void 0:I.id),children:[(0,i.jsx)("option",{value:"false",children:"No"}),(0,i.jsx)("option",{value:"true",children:"Yes"})]})]})]}),(N.includes("authorized_person")||N.includes("ubo")||N.includes("director"))&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Address Line 1"}),(0,i.jsx)("input",{placeholder:"Enter Address Line 1",value:D.address_line1,onChange:e=>L(a=>({...a,address_line1:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("label",{children:["Address Line 2"," ",(0,i.jsx)("span",{style:{fontWeight:400,color:"#6a5b8a",fontSize:"0.8rem"},children:"(Optional)"})]}),(0,i.jsx)("input",{placeholder:"Enter Address Line 2 (optional)",value:D.address_line2,onChange:e=>L(a=>({...a,address_line2:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"City"}),(0,i.jsx)("input",{placeholder:"Enter City",value:D.address_city,onChange:e=>L(a=>({...a,address_city:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"State"}),(0,i.jsx)("input",{placeholder:"Enter State",value:D.address_state,onChange:e=>L(a=>({...a,address_state:e.target.value}))})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Pincode"}),(0,i.jsx)("input",{placeholder:"Enter Pincode",value:D.address_pincode,onChange:e=>L(a=>({...a,address_pincode:e.target.value}))})]})]})]}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:M,children:"Cancel"}),(0,i.jsx)(k.Z,{variant:"contained",onClick:q,children:"Save"})]})]})})]})};var ez=e=>{var a,t,l,s,r,d,c,u,_;let{setStep:p}=e,{userDetails:m}=(0,o.v9)(e=>e.auth),{formatStatusLabel:h,normalizeStatusKey:f}=K(),{isFeatureVisible:v}
1=b(),y=v(j.Ot.FIU_FULL_FLOW),[N,S]=(0,n.useState)("YES"),[w,B]=(0,n.useState)("YES"),[T,A]=(0,n.useState)("APPLIED"),[D,L]=(0,n.useState)(null),[O,I]=(0,n.useState)({}),R=e=>{let{docKey:a,status:t}=e;a&&I(e=>({...e,[a]:t}))},P=e=>h(null==O?void 0:O[e],"pending"),F=e=>f((null==O?void 0:O[e])||"pending"),z=async e=>{var a;if(e.preventDefault(),!y){p(e=>e+1);return}let t={email:null==m?void 0:null===(a=m.user)||void 0===a?void 0:a.email};if("YES"===N)Object.assign(t,{reporting_entity_id:e.target.reporting_entity_id.value,date_of_confirmation:e.target.date_of_confirmation.value.split("-").reverse().join("/"),company_registered:N});else if("NO"===N){if("YES"===w)"APPLIED"===T?Object.assign(t,{application_stage:T,date_of_initial_registration:e.target.date_of_initial_registration.value.split("-").reverse().join("/"),company_registered:N,planning_fiu_registration:w}):"YET_TO_START"===T&&Object.assign(t,{application_stage:T,expected_start_date:e.target.expected_start_date.value.split("-").reverse().join("/"),company_registered:N,planning_fiu_registration:w});else if("NO"===w){let a=e.target.reason_not_applicable.value,i=e=>["verified","uploaded","failed","rejected"].includes(((null==O?void 0:O[e])||"").toLowerCase());Object.assign(t,{reason_not_applicable:a,company_registered:N,planning_fiu_registration:w,net_worth_certificate:i("net_worth_certificate")?"YES":"NO",financial_statements:i("financial_statement_for_fiu")?"YES":"NO",bank_statement:i("bank_statement_for_fiu")?"YES":"NO"})}}p(e=>e+1);try{(null==D?void 0:D.id)?await (0,E._z)(D.id,t):await (0,E.yw)(t)}catch(e){console.log(e),(0,g.sI)(e)}};return(0,n.useEffect)(()=>{let e=async()=>{try{let{data:e}=await (0,E.FT)(null==m?void 0:m.id),a=(null==e?void 0:e.results)||[];if(a.length>0){let e=a[0];L(e),e.company_registered&&S(e.company_registered),e.planning_fiu_registration&&B(e.planning_fiu_registration),e.application_stage&&A(e.application_stage)}}catch(e){console.log(e)}};(null==m?void 0:m.id)&&e()},[null==m?void 0:m.id]),(0,i.jsxs)("form",{className:C().compInfoBox,onSubmit:z,children:[(0,i.jsxs)("header",{className:"".concat(C().documentScreenHeader," mb-4"),children:[(0,i.jsx)("h1",{children:"FIU Registration Applicability"}),(0,i.jsx)("p",{className:C().uploadSubtitle,style:{fontSize:"0.8rem"},children:y?"Declare your organization's status as a Reporting Entity. If your organization is not required to register with FIU-IND, please provide the supporting documentation for non-applicability.":"Upload the AML Policy required for onboarding."})]}),y?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Is the company registered?"}),(0,i.jsxs)("div",{className:C().radioBox,children:[(0,i.jsxs)("label",{style:{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},children:[(0,i.jsx)("input",{type:"radio",name:"companyRegistered",value:"YES",checked:"YES"===N,onChange:e=>S(e.target.value),className:"mr-1"}),"YES"]}),(0,i.jsxs)("label",{style:{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},children:[(0,i.jsx)("input",{type:"radio",name:"companyRegistered",value:"NO",checked:"NO"===N,onChange:e=>S(e.target.value),className:"mr-1"}),"NO"]})]})]}),"YES"===N&&(0,i.jsx)("div",{className:C().formBox,children:(0,i.jsxs)("div",{className:"".concat(C().gridOfThree," ").concat(C().fiuRegisteredGrid),children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Reporting entity ID"}),(0,i.jsx)("input",{placeholder:"Enter reporting entity id",name:"reporting_entity_id",required:!0,defaultValue:null==D?void 0:D.reporting_entity_id})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Date of confirmation (dd/mm/yyyy)"}),(0,i.jsx)("input",{placeholder:"Enter Date of confirmation",name:"date_of_confirmation",required:!0,type:"date",defaultValue:(null==D?void 0:D.date_of_confirmation)?D.date_of_confirmation.split("/").reverse().join("-"):""})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsxs)("label",{children:["Screenshot of FINGATE 2.0 dashboard",(0,i.jsx)("br",{}),"showing REID & Company name"]}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("fignate_screenshot"))]||""),children:P("fignate_screenshot")})]}),(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"fignate_screenshot",doc_type:"fignate_screenshot",owner_type:"self",email:null==m?void 0:null===(a=m.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,docLabel:"FINGATE dashboard screenshot",docKey:"fignate_screenshot",onStatusChange:R})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"FIU email confirmation"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("fiu_email_confirmation"))]||""),children:P("fiu_email_confirmation")})]}),(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"fiu_email_confirmation",doc_type:"fiu_email_confirmation",owner_type:"self",email:null==m?void 0:null===(t=m.user)||void 0===t?void 0:t.email,affiliated_entity_id:null,preFillData:null,docLabel:"FIU email confirmation",docKey:"fiu_email_confirmation",onStatusChange:R})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"FIU Onboarding Questionnaire"}),(0,i.jsx)("a",{href:"https://carret-media.s3.ap-south-1.amazonaws.com/onboarding-assets/AML_Questionnaire_Carret_Format.docx",target:"_blank",rel:"noopener noreferrer",children:(0,i.jsx)(x.Z,{title:"Download the AML Policy for document upload",children:(0,i.jsx)("span",{className:C().downloadLink,children:"Download format"})})}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("fiu_onboarding_questionaire"))]||""),children:P("fiu_onboarding_questionaire")})]}),(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"fiu_onboarding_questionaire",doc_type:"fiu_onboarding_questionaire",owner_type:"self",email:null==m?void 0:null===(l=m.user)||void 0===l?void 0:l.email,affiliated_entity_id:null,preFillData:null,docLabel:"FIU Onboarding Questionnaire",docKey:"fiu_onboarding_questionaire",onStatusChange:R})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"AML Policy"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("fiu_aml_policy"))]||""),children:P("fiu_aml_policy")})]}),(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"fiu_aml_policy",doc_type:"fiu_aml_policy",owner_type:"self",email:null==m?void 0:null===(s=m.user)||void 0===s?void 0:s.email,affiliated_entity_id:null,preFillData:null,docLabel:"AML Policy",docKey:"fiu_aml_policy",onStatusChange:R})]})]})}),"NO"===N&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:C().formBox,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Is the company planning to get FIU registration?"}),(0,i.jsxs)("div",{className:C().radioBox,children:[(0,i.jsxs)("label",{style:{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},children:[(0,i.jsx)("input",{type:"radio",name:"isPlanning",value:"YES",checked:"YES"===w,onChange:e=>B(e.target.value),className:"mr-1"}),"YES"]}),(0,i.jsxs)("label",{style:{fontFamily:"Roboto, Helvetica, Arial, sans-serif"},children:[(0,i.jsx)("input",{type:"radio",name:"isPlanning",value:"NO",checked:"NO"===w,onChange:e=>B(e.target.value),className:"mr-1"}),"NO"]})]})]}),"YES"===w?(0,i.jsxs)("div",{className:"".concat(C().gridOfThree," pt-2"),children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Stage of application"}
1),(0,i.jsxs)("select",{name:"stage",id:"stage",onChange:e=>A(e.target.value),value:T,children:[(0,i.jsx)("option",{value:"APPLIED",children:"Applied"}),(0,i.jsx)("option",{value:"YET_TO_START",children:"Yet to start"})]})]}),"APPLIED"===T&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Date of initial registration"}),(0,i.jsx)("input",{placeholder:"Enter Date of initial registration",name:"date_of_initial_registration",required:!0,type:"date",defaultValue:(null==D?void 0:D.date_of_initial_registration)?D.date_of_initial_registration.split("/").reverse().join("-"):""})]}),"YET_TO_START"===T&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:" Expected date of starting the process"}),(0,i.jsx)("input",{placeholder:"Enter  Expected date of starting the process",name:"expected_start_date",required:!0,type:"date",defaultValue:(null==D?void 0:D.expected_start_date)?D.expected_start_date.split("/").reverse().join("-"):""})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{style:{textWrap:"nowrap"},children:"Proof of registration"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("fiu_proof_date_of_initial_registration"))]||""),children:P("fiu_proof_date_of_initial_registration")})]}),(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"fiu_proof_date_of_initial_registration",doc_type:"fiu_proof_date_of_initial_registration",owner_type:"self",email:null==m?void 0:null===(r=m.user)||void 0===r?void 0:r.email,affiliated_entity_id:null,preFillData:null,docLabel:"Proof of FIU registration process",docKey:"fiu_proof_date_of_initial_registration",onStatusChange:R})]})})]}):(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:C().formBox,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Why does FIU registration not applicable"}),(0,i.jsx)("textarea",{placeholder:"",name:"reason_not_applicable",required:!0,defaultValue:null==D?void 0:D.reason_not_applicable})]}),(0,i.jsx)("h4",{className:C().formTitle,children:"We are providing the following supporting document for the same"}),(0,i.jsx)("table",{className:C().supportingDocsTable,children:(0,i.jsxs)("tbody",{children:[(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:C().supportingDocsLeftCell,children:(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Net Worth Certificate"}),(0,i.jsx)("span",{className:"mr-2 ".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("net_worth_certificate"))]||""),children:P("net_worth_certificate")})]})}),(0,i.jsx)("td",{className:C().supportingDocsRightCell,children:(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"net_worth_certificate",doc_type:"net_worth_certificate",owner_type:"self",email:null==m?void 0:null===(d=m.user)||void 0===d?void 0:d.email,affiliated_entity_id:null,preFillData:null,docLabel:"Net Worth Certificate",docKey:"net_worth_certificate",onStatusChange:R})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:C().supportingDocsLeftCell,children:(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Financial Statements showing company reserves and profits"}),(0,i.jsx)("span",{className:"mr-2 ".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("financial_statement_for_fiu"))]||""),children:P("financial_statement_for_fiu")})]})}),(0,i.jsx)("td",{className:C().supportingDocsRightCell,children:(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"financial_statement_for_fiu",doc_type:"financial_statement_for_fiu",owner_type:"self",email:null==m?void 0:null===(c=m.user)||void 0===c?void 0:c.email,affiliated_entity_id:null,preFillData:null,docLabel:"Financial Statements",docKey:"financial_statement_for_fiu",onStatusChange:R})})]}),(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{className:C().supportingDocsLeftCell,children:(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Bank Statement for intra-company transactions"}),(0,i.jsx)("span",{className:"mr-2 ".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("bank_statement_for_fiu"))]||""),children:P("bank_statement_for_fiu")})]})}),(0,i.jsx)("td",{className:C().supportingDocsRightCell,children:(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"bank_statement_for_fiu",doc_type:"bank_statement_for_fiu",owner_type:"self",email:null==m?void 0:null===(u=m.user)||void 0===u?void 0:u.email,affiliated_entity_id:null,preFillData:null,docLabel:"Bank Statement",docKey:"bank_statement_for_fiu",onStatusChange:R})})]})]})})]})})]})})]}):(0,i.jsx)("div",{className:C().formBox,children:(0,i.jsx)("div",{className:C().gridOfThree,children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"AML Policy"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(F("fiu_aml_policy"))]||""),children:P("fiu_aml_policy")})]}),(0,i.jsx)(Z.Z,{user_id:null==m?void 0:m.id,url_for:"fiu_aml_policy",doc_type:"fiu_aml_policy",owner_type:"self",email:null==m?void 0:null===(_=m.user)||void 0===_?void 0:_.email,affiliated_entity_id:null,preFillData:null,docLabel:"AML Policy",docKey:"fiu_aml_policy",onStatusChange:R})]})})}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>p(e=>e-1),children:"Back"}),(0,i.jsx)(k.Z,{type:"sumit",variant:"contained",className:C().gradientCta,children:"Save & Next"})]})]})},eW=t(33453),eK=t(92365),eV=t(40110),eH=t(96727),eY=e=>{var a,t,l,s,r,d,c,u,_,p,m,h,f,v;let{setStep:y}=e,{userDetails:g}=(0,o.v9)(e=>e.auth),{extraCompanyDocs:N,isFeatureVisible:S}=b(),w=S(j.Ot.GST_CERTIFICATE),[B,T]=n.useState(null),[A,D]=(0,n.use
1State)({}),{formatStatusLabel:L,normalizeStatusKey:O}=K(),[I,R]=(0,n.useState)([]),[P,F]=(0,n.useState)(!1),[z,W]=(0,n.useState)(null),V=(0,n.useRef)(!1),[H,Y]=(0,n.useState)(null),U=(0,n.useCallback)(()=>(null==g?void 0:g.id)?(0,E.aw)(g.id,"others","self").then(e=>{let{data:a}=e;Y(a)}).catch(e=>{console.error("Error fetching others documents:",e)}):Promise.resolve(),[null==g?void 0:g.id]);(0,n.useEffect)(()=>{U()},[U]);let M=(0,n.useCallback)(()=>{let e=Date.now();V.current=!0,W({id:e,name:"",doc_type:"others_custom_".concat(e)}),F(!0)},[]),q=(0,n.useCallback)(()=>{F(!1),W(null)},[]),G=(0,n.useMemo)(()=>{let e=e=>{if(!e)return{};try{return"string"==typeof e?JSON.parse(e):e}catch(a){return{addressLine1:e}}},a=e(null==g?void 0:g.registered_address),t=e(null==g?void 0:g.operating_address),i=a.addressLine1===t.addressLine1&&a.addressLine2===t.addressLine2&&a.city===t.city&&a.state===t.state&&a.pincode===t.pincode;return!a.addressLine1&&!t.addressLine1||!i},[null==g?void 0:g.registered_address,null==g?void 0:g.operating_address]),X=(0,n.useMemo)(()=>[{key:"coi",label:"Certificate of Incorporation"},...w?[{key:"gstin",label:"GST Certificate"}]:[],{key:"pan",label:"Company PAN"},{key:"aoa",label:"Articles of Association"},{key:"moa",label:"Memorandum of Association"},{key:"financial_statement",label:"Latest Financial Statements"},...N.filter(e=>e.required)],[N,w]),J=(0,n.useMemo)(()=>X.filter(e=>{var a;return null===(a=A[e.key])||void 0===a?void 0:a.hasUpload}).length,[A,X]),Q=(0,n.useMemo)(()=>X.length?Math.round(J/X.length*100):0,[X.length,J]),$=(0,n.useCallback)(e=>{let{docKey:a,hasUpload:t,status:i}=e;if(D(e=>{let n=null==e?void 0:e[a];return(null==n?void 0:n.hasUpload)===t&&(null==n?void 0:n.status)===i?e:{...e,[a]:{hasUpload:t,status:i}}}),z&&a===z.doc_type&&t){if(V.current){V.current=!1;return}R(e=>e.some(e=>e.doc_type===z.doc_type)?e:[...e,z]),U(),q()}},[q,U,z]),ee=e=>{var a;return L(null==A?void 0:null===(a=A[e])||void 0===a?void 0:a.status,"pending")||"pending"},ea=e=>O(ee(e)),et=async e=>{e.preventDefault(),y(e=>e+1)};return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{className:C().formBox,children:[(0,i.jsxs)("div",{className:C().uploadHeader,children:[(0,i.jsxs)("div",{className:"w-full",children:[(0,i.jsx)("p",{className:C().uploadTitle,children:"Onboarding Documents"}),(0,i.jsx)("p",{className:C().uploadSubtitle,style:{fontSize:"0.8rem"},children:"Upload high-resolution copies of the entity's foundational, operational, and financial documents required for verification. For any supplementary records, utilize the additional document feature and provide a clear name for each uploaded file to ensure accurate processing."})]}),(0,i.jsxs)("div",{className:C().progressCard,children:[(0,i.jsxs)("div",{className:C().progressHeader,children:[(0,i.jsxs)("span",{children:[Q,"% Complete"]}),(0,i.jsxs)("span",{className:C().progressMeta,children:[J,"/",X.length," uploaded"]})]}),(0,i.jsx)("div",{className:C().progressBar,children:(0,i.jsx)("span",{className:C().progressFill,style:{width:"".concat(Q,"%")}})})]})]}),(0,i.jsxs)("div",{className:C().uploadSection,children:[(0,i.jsx)("div",{className:C().sectionTitle,children:"Company Documents"}),(0,i.jsxs)("div",{className:C().uploadGrid,children:[(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Certificate of Incorporation"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("coi"))]||""),children:ee("coi")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"coi",doc_type:"coi",owner_type:"self",email:null==g?void 0:null===(a=g.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,docLabel:"Certificate of Incorporation",docKey:"coi",onStatusChange:$})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsxs)("div",{className:C().infoIcon,children:[(0,i.jsx)("label",{children:"Articles of Association"}),(0,i.jsx)(x.Z,{title:"Internal rulebook that governs company's daily operations and detailing the relationship between the company, its shareholders, and its management.",arrow:!0,placement:"right-start",children:(0,i.jsx)(ei.Z,{className:"opacity-50 text-xs h-4 w-4 pb-[2px]",fontSize:"inherit"})})]}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("aoa"))]||""),children:ee("aoa")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"aoa",doc_type:"aoa",owner_type:"self",email:null==g?void 0:null===(t=g.user)||void 0===t?void 0:t.email,affiliated_entity_id:null,preFillData:null,docLabel:"Articles of Association",docKey:"aoa",onStatusChange:$})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsxs)("div",{className:C().infoIcon,children:[(0,i.jsx)("label",{children:"Memorandum of Association"}),(0,i.jsx)(x.Z,{title:"Legal charter defining a company's external scope, including its objectives and powers",arrow:!0,placement:"right-start",children:(0,i.jsx)(ei.Z,{className:"opacity-50 text-xs h-4 w-4 pb-[2px]",fontSize:"inherit"})})]}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("moa"))]||""),children:ee("moa")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"moa",doc_type:"moa",owner_type:"self",email:null==g?void 0:null===(l=g.user)||void 0===l?void 0:l.email,affiliated_entity_id:null,preFillData:null,docLabel:"Memorandum of Association",docKey:"moa",onStatusChange:$})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Upload PAN"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("pan"))]||""),children:ee("pan")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"pan",doc_type:"pan",owner_type:"self",email:null==g?void 0:null===(s=g.user)||void 0===s?void 0:s.email,affiliated_entity_id:null,preFillData:null,setSaveResponse:T,docLabel:"Company PAN",docKey:"pan",onStatusChange:$})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().fieldStatus,children:[(0,i.jsx)("label",{children:"PAN"}),(0,i.jsx)("span",{className:"".concat(C().statusPill," ").concat((null==B?void 0:null===(r=B.created_object_data)||void 0===r?void 0:r.status)?C().statusVerified:C().statusRejected),children:(null==B?void 0:null===(d=B.created_object_data)||void 0===d?void 0:d.status)?"Verified":"Rejected"})]}),(0,i.jsx)("input",{placeholder:"",name:"PAN",disabled:!0,value:null==B?void 0:null===(c=B.created_object_data)||void 0===c?void 0:c.pan_no,className:C().readonlyField})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().fieldStatus,children:[(0,i.jsx)("label",{children:"Name"}),(0,i.jsx)("span",{className:"".concat(C().statusPill," ").concat((null==B?void 0:null===(u=B.created_object_data)||void 0===u?void 0:u.status)?C().statusVerified:C().statusRejected),children:(null==B?void 0:null===(_=B.created_object_data)||void 0===_?void 0:_.status)?"Verified":"Rejected"})]}),(0,i.jsx)("input",{placeholder:"",name:"company_name",disabled:!0,value:null==B?void 0:null===(p=B.created_object_data)||void 0===p?void 0:p.name,className:C().readonlyField})]}),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Latest Financial Statements"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("financial_statement"))]||""),children:ee("financial_statement")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"financial_statement",doc_type:"financial_statement",owner_type:"self",email:null==g?void 0:null===(m=g.user)||void 0===m?void 0:m.email,affiliated_entity_id:null,preFillData:null,docLabel:"Latest Financial Statements",docKey:"financial_statement",onStatusChange:$})]}),w&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"GST Certificate"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("gstin"))]||""),children:ee("gstin")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"gstin",doc_type:"gstin",owner_type:"self",email:null==g?void 0:null===(h=g.user)||void 0===h?void 0:h.email,affiliated_entity_id:null,preFillData:null,docLabel:"GST Certificate",docKey:"gstin",onStatusChange:$})]}),N.map(e=>{var a;return(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsxs)("label",{children:[e.label,!e.required&&(0,i.jsxs)("span",{style:{fontWeight:400,color:"#6a5b8a",fontSize:"0.8rem"},children:[" ","(Optional)"]})]}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea(e.key))]||""),children:ee(e.key)})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:e.key,doc_type:e.key,owner_type:"self",email:null==g?void 0:null===(a=g.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,docLabel:e.label,docKey:e.key,onStatusChange:$,isRequired:e.required,uploadInfoText:e.uploadInfoText})]},e.key)}),G&&(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:"Operating Address Proof"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea("operating_address_proof"))]||""),children:ee("operating_address_proof")})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"operating_address_proof",doc_type:"operating_address_proof",owner_type:"self",email:null==g?void 0:null===(f=g.user)||void 0===f?void 0:f.email,affiliated_entity_id:null,preFillData:null,docLabel:"Operating Address Proof",docKey:"operating_address_proof",onStatusChange:$,isRequired:G})]}),I.map(e=>{var a;return(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:e.name||"Other Document"}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea(e.doc_type))]||""),children:ee(e.doc_type)})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"others",doc_type:e.doc_type,owner_type:"self",email:null==g?void 0:null===(a=g.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,docLabel:e.name||"Other Document",docKey:e.doc_type,onStatusChange:$})]},e.doc_type)}),(()=>{let e=new Map;return((null==H?void 0:H.results)||[]).filter(e=>
1!(null==e?void 0:e.is_deleted)).forEach(a=>{let t=(null==a?void 0:a.doc_sub_type)?String(a.doc_sub_type):"__none__",i=e.get(t);if(!i){e.set(t,a);return}let n=new Date((null==i?void 0:i.created_at)||0).getTime();new Date((null==a?void 0:a.created_at)||0).getTime()>=n&&e.set(t,a)}),Array.from(e.values()).map(e=>{var a;let t=(null==e?void 0:e.doc_sub_type)?String(e.doc_sub_type):"__none__",n="others_".concat(t),l=(null==e?void 0:e.doc_sub_type)||"Other Document";return(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsxs)("div",{className:C().labelRow,children:[(0,i.jsx)("label",{children:l}),(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C()["docStatus_".concat(ea(n))]||""),children:ee(n)})]}),(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"others",doc_type:n,owner_type:"self",email:null==g?void 0:null===(a=g.user)||void 0===a?void 0:a.email,affiliated_entity_id:null,preFillData:null,docLabel:l,docKey:n,onStatusChange:$})]},(null==e?void 0:e.id)||(null==e?void 0:e.object_name)||n)})})(),(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("div",{className:C().labelRow,children:(0,i.jsx)("label",{children:"Other Documents"})}),(0,i.jsx)(k.Z,{variant:"outlined",onClick:M,size:"small",className:C().gradientCta,style:{borderRadius:"10px"},children:"Add Extra Document"})]})]})]}),(0,i.jsxs)(eW.Z,{open:P,onClose:q,fullWidth:!0,width:"400px",sx:{"&, & *":{fontFamily:"Roboto, Helvetica, Arial, sans-serif"}},children:[(0,i.jsx)(eK.Z,{children:"Add Extra Document"}),(0,i.jsxs)(eV.Z,{children:[(0,i.jsx)("div",{className:"mt-2",children:(0,i.jsxs)("div",{className:C().inputBox,children:[(0,i.jsx)("label",{children:"Document Name"}),(0,i.jsx)("input",{placeholder:"Enter document name",value:(null==z?void 0:z.name)||"",onChange:e=>W(a=>a?{...a,name:e.target.value}:a)})]})}),(0,i.jsx)("div",{className:"mt-4",children:z?(0,i.jsx)(Z.Z,{user_id:null==g?void 0:g.id,url_for:"others",doc_type:z.doc_type,owner_type:"self",email:null==g?void 0:null===(v=g.user)||void 0===v?void 0:v.email,affiliated_entity_id:null,preFillData:null,docLabel:z.name||"Other Document",docKey:z.doc_type,onStatusChange:$}):null})]}),(0,i.jsx)(eH.Z,{children:(0,i.jsx)(k.Z,{variant:"outlined",onClick:q,children:"Close"})})]}),(0,i.jsxs)("div",{className:C().actionButtonBox,children:[(0,i.jsx)(k.Z,{variant:"outlined",onClick:()=>y(e=>e-1),children:"Back"}),(0,i.jsx)(k.Z,{type:"submit",variant:"contained",className:C().gradientCta,onClick:et,children:"Save & Next"})]})]})})},eU=t(96788),eM=t(73378),eq=()=>{let{userDetails:e}=(0,o.v9)(e=>e.auth),[a,t]=(0,n.useState)([]),[l,s]=(0,n.useState)({}),[r,d]=(0,n.useState)({}),[u,_]=(0,n.useState)({}
1),[p,m]=(0,n.useState)(!0),[h,f]=(0,n.useState)(null),[x,v]=(0,n.useState)(!1),[y,g]=(0,n.useState)(""),j=(0,c.useRouter)(),{formatStatusLabel:N,normalizeStatusKey:S}=K(),{statusDocMapping:w,extraCompanyDocs:B}=b(),T=e=>{g(String(e||"")),v(!0)},A=()=>{v(!1),g("")},D=e=>{let a=(e||[]).length?(e||[]).join(" | "):"";if(!a)return"-";let t=a.length>30,n=t?"".concat(a.slice(0,30),"..."):a;return(0,i.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[(0,i.jsx)("span",{children:n}),t?(0,i.jsx)(k.Z,{type:"button",variant:"text",size:"small",onClick:()=>T(a),sx:{minWidth:0,padding:0,textTransform:"none"},children:"More"}):null]})},L=e=>String(e||"").toLowerCase().trim().replace(/[^a-z0-9]+/g,"_"),O=e=>{let a=(e||[]).map(L).filter(Boolean);if(!a.length)return"pending";if(a.some(e=>"verification_failed"===e||"rejected"===e))return"verification_failed";let t=new Set(["pending","uploaded","success","verify"]);if(a.some(e=>t.has(e)))return"pending";let i=new Set(["verified","approved"]);return a.every(e=>i.has(e))?"verified":a[0]||"pending"},I=e=>{let a=String(e||"").trim();if(!a)return"";let t=new Set(["cin","gstin","pan","aoa","moa","coi","br","din","ifsc","otp","fiu"]);return a.split("_").filter(Boolean).map(e=>{let a=e.toLowerCase();return t.has(a)?a.toUpperCase():a.charAt(0).toUpperCase()+a.slice(1)}).join(" ")},R={"Company Information":"companyInformation","Company Documents":"companyDocumentation","Key Personnel":"keyPersonnel","Wallet Declaration":"walletDeclaration","Fiu Registration":"fiuRegistration"},Z=Array.from(new Set(Object.values(w).flat())),P=w["Key Personnel"]||[],F=w["Fiu Registration"]||[],z=[{kind:"doc",docType:"bank_statement"},{kind:"doc",docType:"bank_account"},{kind:"doc",docType:"gstin"},{kind:"doc",docType:"cin"},{kind:"doc",docType:"coi"},{kind:"doc",docType:"pan"},{kind:"doc",docType:"aoa"},{kind:"doc",docType:"moa"},{kind:"doc",docType:"financial_statement"},...(B||[]).map(e=>e.key).map(e=>({kind:"doc",docType:e})),{kind:"group",label:"Key Personnel",docTypes:P,pageName:"Key Personnel"},{kind:"doc",docType:"video_declaration_wallet"},{kind:"group",label:"FIU Registration",docTypes:F,pageName:"Fiu Registration"}].filter(e=>"group"===e.kind?(e.docTypes||[]).length>0:Z.includes(e.docType)),W=Object.entries(w).reduce((e,a)=>{let[t,i]=a;return(i||[]).forEach(a=>{e[a]||(e[a]=[]),e[a].push(t)}),e},{}),V=(e,a)=>{let t=(null==W?void 0:W[e])||[];return t.length?("object"==typeof a?JSON.stringify(a).toLowerCase():String(a||"").toLowerCase()).includes("document")&&("cin"===e||"gstin"===e)||t.includes("Company Documents")&&("cin"===e||"gstin"===e)?"Company Documents":t[0]:null},H=(e,a)=>{if(!e)return null;let t=String(e||"").toLowerCase().trim().replace(/[^a-z0-9]+/g,"_");if(("object"==typeof a?JSON.stringify(a).toLowerCase():String(a||"").toLowerCase()).includes("document")&&(t.includes("cin")||t.includes("gstin")))return t.includes("cin")?"cin":"gstin";for(let e of Z)if(t.includes(String(e).toLowerCase()))return e;return null},Y=e=>{e&&R[e]&&j.push("/onboarding/corporate?page=".concat(R[e]))},U=async()=>{try{m(!0);let{data:a}=await (0,E.LY)(null==e?void 0:e.id),i=a||[];t(i);let n=(i||[]).reduce((e,a)=>{if(!(null==a?void 0:a.id))return e;let t=H(null==a?void 0:a.verification_type,null==a?void 0:a.verification_errors);if(!t)return e;let i=null==a?void 0:a.verification_errors,n=(("object"==typeof i&&i?Object.values(i):i?[i]:[])||[]).map(e=>"string"==typeof e?e:JSON.stringify(e)).filter(Boolean);return n.length&&(e[t]=Array.from(new Set([...e[t]||[],...n]))),e},{});_(n),f(null)}catch(e){console.error("Error fetching verification status:",e),f("Failed to load verification status")}finally{m(!1)}};return((0,n.useEffect)(()=>{(null==e?void 0:e.id)&&U()},[null==e?void 0:e.id]),(0,n.useEffect)(()=>{if(!(null==e?void 0:e.id))return;let a=e=>String(e||"").toLowerCase().trim().replace(/[\s-]+/g,"_"),t=e=>{let t=(e||[]).map(a).filter(Boolean);if(!t.length)return"pending";if(t.some(e=>"verification_failed"===e||"rejected"===e))return"verification_failed";let i=new Set(["pending","uploaded","success","verify"]);if(t.some(e=>i.has(e)))return"pending";let n=new Set(["verified","approved"]);return t.every(e=>n.has(e))?"verified":t[0]||"pending"};(0,E.aw)(e.id).then(e=>{let{data:a}=e,i=((null==a?void 0:a.results)||[]).reduce((e,a)=>{let t=null==a?void 0:a.doc_type;return t&&(e[t]||(e[t]=[]),e[t].push(null==a?void 0:a.status)),e},{}),n=Object.keys(i).reduce((e,a)=>(e[a]=t(i[a]),e),{}),l=Object.entries(w).reduce((e,a)=>{let[t,i]=a;return e[t]=(i||[]).reduce((e,a)=>(e[a]=(null==n?void 0:n[a])||"pending",e),{}),e},{});s(n),d(l)}).catch(e=>{console.error("Error fetching document file list:",e)})},[null==e?void 0:e.id]),p)?(0,i.jsx)("div",{children:(0,i.jsx)("p",{children:"Loading verification status..."})}):h?(0,i.jsx)("div",{children:(0,i.jsx)("p",{className:C().error,children:h})}):(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:C().title,children:"Document Verification Status"}),(0,i.jsx)("p",{className:C().uploadSubtitle,style:{fontSize:"0.8rem"},children:"Monitor the progress of your submitted corporate documents and verification checks. Use this tab to track approval statuses or identify any specific items that may require re-upload or additional clarification from our compliance team to complete your onboarding."}),(0,i.jsxs)("table",{className:C().docVerificationTable,children:[(0,i.jsx)("thead",{children:(0,i.jsxs)("tr",{children:[(0,i.jsx)("th",{children:"Docs"}),(0,i.jsx)("th",{children:"Status"}),(0,i.jsx)("th",{children:"Error"}),(0,i.jsx)("th",{children:"Go To"})]})}),(0,i.jsx)("tbody",{children:(()=>{let e=new Set([...P,...F]),a=new Set(z.filter(e=>"doc"===e.kind).map(e=>e.docType));return[...z,...Z.filter(t=>!e.has(t)&&!a.has(t)).map(e=>({kind:"doc",docType:e}))].filter(e=>"group"!==e.kind||(e.docTypes||[]).length)})().map(e=>{var a;let t="group"===e.kind,n=t?"__group_".concat(L(e.pageName||e.label)):e.docType,s=t?e.label:(null===(a=B.find(a=>a.key===e.docType))||void 0===a?void 0:a.label)||I(e.docType),o=t?Array.from(new Set((e.docTypes||[]).flatMap(e=>(null==u?void 0:u[e])||[]))):(null==u?void 0:u[e.docType])||[],r=t?O((e.docTypes||[]).map(e=>(null==l?void 0:l[e])||"pending")):(null==l?void 0:l[e.docType])||"pending",d=S(r),c=N(r,"pen
1ding"),_=t?e.pageName:V(e.docType,o);return(0,i.jsxs)("tr",{children:[(0,i.jsx)("td",{children:s}),(0,i.jsx)("td",{children:(0,i.jsx)("span",{className:"".concat(C().docStatusBadge," ").concat(C().docStatusBadgeForTable," ").concat(C()["docStatus_".concat(d)]||""),children:c})}),(0,i.jsx)("td",{children:D(o)}),(0,i.jsx)("td",{children:_?(0,i.jsx)(k.Z,{type:"button",variant:"contained",className:"".concat(C().gradientCta," rounded-[12px]"),size:"small",sx:{borderRadius:"12px",whiteSpace:"nowrap",minWidth:0},onClick:()=>Y(_),"aria-label":"Go to ".concat(_),children:(0,i.jsx)(eM.Z,{fontSize:"small",sx:{transform:"rotate(320deg)"}})}):"-"})]},n)})})]}),(0,i.jsxs)(eW.Z,{open:x,onClose:A,maxWidth:"sm",fullWidth:!0,PaperProps:{sx:{borderRadius:"10px"}},"aria-labelledby":"document-verification-error-dialog-title",children:[(0,i.jsx)(eK.Z,{id:"document-verification-error-dialog-title",children:"Error details"}),(0,i.jsx)("hr",{}),(0,i.jsx)(eV.Z,{children:(0,i.jsx)(eU.Z,{sx:{whiteSpace:"pre-wrap",wordBreak:"break-word"},children:y||"-"})}),(0,i.jsx)(eH.Z,{children:(0,i.jsx)(k.Z,{type:"button",onClick:A,variant:"contained",className:C().gradientCta,children:"Close"})})]})]})},eG=t(42381),eX=t(58021),eJ=()=>{let e=(0,o.I0)(),{curPage:a}=(0,o.v9)(e=>e.onboarding),{userDetails:t}=(0,o.v9)(e=>e.auth),{steps:l,isFeatureVisible:r}
1=b(),d=(0,c.useRouter)(),[u,_]=(0,n.useState)(0),[p,m]=(0,n.useState)(!1),[h,f]=(0,n.useState)(!1),[x,v]=(0,n.useState)(!1),[N,w]=(0,n.useState)(null),[C,T]=(0,n.useState)(!1),A=async()=>{try{let{data:a}=await (0,E.qw)(null==t?void 0:t.id,"",!0);a.results&&a.results.length>0&&e((0,y.St)(a.results[0]))}catch(e){console.log(e)}},D=async()=>{try{var e;let{data:a}=await (0,E.Gg)();(null==a?void 0:null===(e=a.current_cycle)||void 0===e?void 0:e.can_next_cycle_start)&&(w(a),v(!0))}catch(e){console.log("Re-KYC status check error:",e)}},L=async()=>{if(!C){T(!0);try{let{data:e}=await (0,E.cK)();(null==e?void 0:e.id)&&(null==e?void 0:e.cycle_number)&&(Y.Am.success("Re-KYC cycle ".concat(e.cycle_number," has been triggered successfully!")),v(!1))}catch(l){var e,a,t,i,n;(null==l?void 0:null===(e=l.response)||void 0===e?void 0:e.status)===409?(null==l||null===(t=l.response)||void 0===t||null===(a=t.data)||void 0===a||a.cycle,Y.Am.warning((null==l?void 0:null===(n=l.response)||void 0===n?void 0:null===(i=n.data)||void 0===i?void 0:i.detail)||"An open KYC cycle already exists."),v(!1)):Y.Am.error("Failed to trigger Re-KYC. Please try again."),console.error("Re-KYC trigger error:",l)}finally{T(!1)}}},O=()=>{v(!1)},I=null!=N&&!!N.next_due_at&&new Date(N.next_due_at)<new Date;return(0,n.useEffect)(()=>{u>=l.length&&_(Math.max(l.length-1,0))},[u,l.length]),(0,n.useEffect)(()=>{let a=l[u];a&&(e((0,y.TT)(a)),(0,g.rd)("page",a,d))},[u,l]),(0,n.useEffect)(()=>{let e=d.query.page;if(l.length){if(e){let a=l.indexOf(e);if(a>=0){_(a);return}}_(e=>e>=0&&e<l.length?e:0)}},[d.query.page,l]),(0,n.useEffect)(()=>{A(),D()},[]),(0,n.useEffect)(()=>eG.O.subscribe(e=>{m(e>0)}),[]),(0,i.jsxs)(W,{children:[(0,i.jsxs)("div",{className:s().shell,children:[(0,i.jsx)("div",{className:s().glowLayer,"aria-hidden":"true"}),(0,i.jsx)("div",{className:s().nebulaLayer,"aria-hidden":"true"}),(0,i.jsx)("div",{className:s().sparkLayer,"aria-hidden":"true"}),(0,i.jsxs)("div",{className:"".concat(s().layout," ").concat(h?s().layoutCollapsed:""),children:[(0,i.jsx)("aside",{className:s().sidebarColumn,children:(0,i.jsx)(S,{collapsed:h,onToggleCollapsed:()=>f(e=>!e)})}),(0,i.jsxs)("main",{className:s().mainLayout,children:[p&&(0,i.jsx)("div",{className:s().pageLoaderOverlay,children:(0,i.jsx)(eX.w,{})}),(e=>{switch(console.log(e,"page"),e){case"startOnboarding":default:return(0,i.jsx)(B,{setStep:_});case"companyInformation":return(0,i.jsx)(q,{setStep:_});case"companyDocumentation":return(0,i.jsx)(eY,{setStep:_});case"walletDeclaration":return r(j.Ot.WALLET_TAB)?(0,i.jsx)(eo,{setStep:_}):(0,i.jsx)(eg,{setStep:_});case"companyDeclaration":return(0,i.jsx)(eg,{setStep:_});case"fiuRegistration":return r(j.Ot.FIU_FULL_FLOW)?(0,i.jsx)(ez,{setStep:_}):(0,i.jsx)(eg,{setStep:_});case"keyPersonnel":return(0,i.jsx)(eZ,{setStep:_});case"documentVerificationStatus":return(0,i.jsx)(eq,{setStep:_})}})(a)]})]})]}),(0,i.jsx)(R.Z,{modalStatus:x,modalHandleClose:O,children:(0,i.jsxs)("div",{style:{padding:"2rem",fontFamily:"var(--fontSans)"},children:[(0,i.jsx)("h2",{style:{marginBottom:"1rem",fontSize:"1.5rem",fontWeight:600},children:"Re-KYC Required"}),(0,i.jsx)("p",{style:{marginBottom:"1rem",lineHeight:"1.6",color:"#333"},children:I?"Your current KYC verification has expired, please initiate re-KYC.":"Your current KYC verification is expiring, and needs to be renewed."}),(null==N?void 0:N.next_due_at)&&(0,i.jsxs)("div",{style:{backgroundColor:"#fff3cd",padding:"0.75rem",borderRadius:"4px",borderLeft:"4px solid #ffc107",marginBottom:"1rem"},children:[(0,i.jsx)("strong",{style:{color:"#856404"},children:"Due Date:"})," ",new Date(N.next_due_at).toLocaleDateString("en-IN",{year:"numeric",month:"long",day:"numeric"})]}),(0,i.jsx)("p",{style:{marginBottom:"1.5rem",lineHeight:"1.6",color:"#333"},children:"Please click the button below to initiate the Re-KYC process and complete your verification."}),(0,i.jsxs)("div",{style:{display:"flex",gap:"1rem",justifyContent:"flex-end"},children:[(0,i.jsx)(k.Z,{onClick:O,variant:"outlined",disabled:C,children:"Cancel"}),(0,i.jsx)(k.Z,{onClick:L,variant:"contained",color:"primary",disabled:C,children:C?"Triggering...":"Initiate Re-KYC"})]})]})})]})}},24610:function(e,a,t){"use strict";t.d(a,{GX:function(){return x},Ot:function(){return l},Ql:function(){return f},aK:function(){return n},iw:function(){return h},l_:function(){return v}});let i={OTC:"otc",TAAS_R:"taas_r"},n="otc, taas_r",l={GST_CERTIFICATE:"gstCertificate",GSTIN_FIELD:"gstinField",COMPANY_TYPE:"companyType",BANK_ACCOUNT_CARD:"bankAccountCard",WALLET_TAB:"walletTab",DIRECTOR_VIDEO:"directorVideo",FIU_FULL_FLOW:"fiuFullFlow",OTHER_DECLARATIONS_EXTRA:"otherDeclarationsExtra",OVERVIEW_KEY_PERSONNEL:"overviewKeyPersonnel",OVERVIEW_OTHER_DECLARATIONS:"overviewOtherDeclarations"},s={START_ONBOARDING:"startOnboarding",COMPANY_INFORMATION:"companyInformation",COMPANY_DOCUMENTATION:"companyDocumentation",KEY_PERSONNEL:"keyPersonnel",WALLET_DECLARATION:"walletDeclaration",FIU_REGISTRATION:"fiuRegistration",COMPANY_DECLARATION:"companyDeclaration",DOCUMENT_VERIFICATION_STATUS:"documentVerificationStatus"},o=[s.START_ONBOARDING,s.COMPANY_INFORMATION,s.COMPANY_DOCUMENTATION,s.KEY_PERSONNEL,s.WALLET_DECLARATION,s.FIU_REGISTRATION,s.COMPANY_DECLARATION,s.DOCUMENT_VERIFICATION_STATUS],r={[l.GST_CERTIFICATE]:!0,[l.GSTIN_FIELD]:!0,[l.COMPANY_TYPE]:!0,[l.BANK_ACCOUNT_CARD]:!0,[l.WALLET_TAB]:!0,[l.DIRECTOR_VIDEO]:!0,[l.FIU_FULL_FLOW]:!0,[l.OTHER_DECLARATIONS_EXTRA]:!0,[l.OVERVIEW_KEY_PERSONNEL]:!0,[l.OVERVIEW_OTHER_DECLARATIONS]:!0},d={[l.GST_CERTIFICATE]:!1,[l.GSTIN_FIELD]:!1,[l.COMPANY_TYPE]:!1,[l.BANK_ACCOUNT_CARD]:!1,[l.WALLET_TAB]:!1,[l.DIRECTOR_VIDEO]:!1,[l.FIU_FULL_FLOW]:!1,[l.OTHER_DECLARATIONS_EXTRA]:!1,[l.OVERVIEW_KEY_PERSONNEL]:!0,[l.OVERVIEW_OTHER_DECLARATIONS]:!1},c=[{key:"companyDocuments",title:"Company Documents",items:[{label:"Certificate of Incorporation"},{label:"GST Certificate",feature:l.GST_CERTIFICATE},{label:"Articles of Association"},{label:"Memorandum of Association"},{label:"Company PAN"},{label:"Latest Financial Statements"},{label:"Bank Account Statement"}]},{key:"keyPersonnel",title:"Key Personnel Details",feature:l.OVERVIEW_KEY_PERSONNEL,items:[{label:"Board Resolution"},{label:"Director Video Declaration",feature:l.DIRECTOR_VIDEO},{label:"PAN"},{label:"Aadhaar"},{label:"Proof of Residence (Bank Statement/ Utility Bill)"}]},{key:"otherDeclarations",title:"Other Declarations",feature:l.OVERVIEW_OTHER_DECLARATIONS,items:[{label:"Wallet Ownership Video",feature:l.WALLET_TAB},{label:"FIU Registration Non-Applicability"},{label:"Sanctions Questionnaire"},{label:"Source of Funds Declaration"},{label:"Bank Account Segregation"},{label:"Customer Undertaking for Lien Resolution"}]}],u={"Company Information":["bank_statement","bank_account","gstin","cin"],"Company Documents":["coi","gstin","pan","aoa","moa","financial_statement"],"Key Personnel":["br","video_declaration_director","director_name","director_din","director_date","verify_director","aadhaar_front","aadhaar_back","pan_card","address_proof"],"Wallet Declaration":["video_declaration_wallet"],"Fiu Registration":["net_worth_certificate","financial_statement_for_fiu","bank_statement_for_fiu","fiu_proof_date_of_initial_registration","fiu_email_confirmation","fignate_screenshot","fiu_onboarding_questionaire","fiu_aml_policy"]},_={[i.OTC]:{key:i.OTC,steps:o,features:r,extraCompanyDocs:[]},[i.TAAS_R]:{key:i.TAAS_R,steps:o.filter(e=>e!==s.WALLET_DECLARATION&&e!==s.FIU_REGISTRATION),features:d,extraCompanyDocs:[{key:"share_certificate",label:"Share Certificate & Shareholders Register",required:!0},{key:"ownership_structure",label:"Ownership Structure",required:!0},{key:"ubo_chart",label:"Diagram (UBO chart)",required:!0},{key:"licenses",label:"Licenses (if regulated entity)",required:!1,uploadInfoText:"If you have multiple license documents, please upload them as a ZIP file (up to 100MB)."},{key:"fiu_aml_policy",label:"AML Policy",required:!0}]}},p=e=>e?(Array.isArray(e)?e:String(e).split(/[\s,|]+/)).map(e=>
1String(e).toLowerCase().trim()).filter(Boolean):[],m=e=>{let a=p(e);return a.includes(i.OTC)?i.OTC:a.includes(i.TAAS_R)?i.TAAS_R:i.OTC},h=e=>_[m(e)]||_[i.OTC],f=(e,a)=>{var t;return!!(null==e?void 0:null===(t=e.features)||void 0===t?void 0:t[a])},x=e=>c.filter(a=>!a.feature||f(e,a.feature)).map(a=>({key:a.key,title:a.title,items:(a.items||[]).filter(a=>(!a.feature||!!f(e,a.feature))&&(!a.docKey||!!((null==e?void 0:e.extraCompanyDocs)||[]).some(e=>e.key===a.docKey))&&!!a.label).map(e=>e.label)})).filter(e=>e.items.length>0),v=e=>{let a=Object.fromEntries(Object.entries(u).map(e=>{let[a,t]=e;return[a,[...t]]}));return f(e,l.BANK_ACCOUNT_CARD)||(a["Company Information"]=a["Company Information"].filter(e=>"bank_statement"!==e&&"bank_account"!==e)),f(e,l.GST_CERTIFICATE)||(a["Company Information"]=a["Company Information"].filter(e=>"gstin"!==e),a["Company Documents"]=a["Company Documents"].filter(e=>"gstin"!==e)),a["Company Documents"]=[...a["Company Documents"],...((null==e?void 0:e.extraCompanyDocs)||[]).map(e=>e.key)],f(e,l.DIRECTOR_VIDEO)||(a["Key Personnel"]=a["Key Personnel"].filter(e=>"video_declaration_director"!==e)),f(e,l.WALLET_TAB)||delete a["Wallet Declaration"],f(e,l.FIU_FULL_FLOW)||delete a["Fiu Registration"],a}},10987:function(e){e.exports={corpStepBox:"styles_corpStepBox__kg9qm",stepTitle:"styles_stepTitle__rngjZ",formBox:"styles_formBox__FR3wv",sectionCard:"styles_sectionCard__BZX4V",compInfoBox:"styles_compInfoBox__5fGya",formTitle:"styles_formTitle__nPr4J",inputTitle:"styles_inputTitle__JRPgS",uploadHeader:"styles_uploadHeader__BfoN_",collapseHeader:"styles_collapseHeader__XOWr7",collapseToggle:"styles_collapseToggle__R_kMF",labelWithLink:"styles_labelWithLink__FmmNV",downloadLink:"styles_downloadLink__FwYL7",progressCard:"styles_progressCard__8P6hS",progressHeader:"styles_progressHeader__BB6_k",progressMeta:"styles_progressMeta___NOc4",progressBar:"styles_progressBar__67xKI",progressFill:"styles_progressFill__zLzPy",uploadTitle:"styles_uploadTitle__34xc8",uploadSubtitle:"styles_uploadSubtitle__HbioV",uploadSection:"styles_uploadSection__6KD_6",sectionTitle:"styles_sectionTitle__fVAlm",uploadGrid:"styles_uploadGrid__QjDFg",readonlyField:"styles_readonlyField__Zmi89",fieldStatus:"styles_fieldStatus__ZRuyQ",statusPill:"styles_statusPill__7CohM",status_verified:"styles_status_verified__bDAKQ",status_rejected:"styles_status_rejected____s7t",status_verification_failed:"styles_status_verification_failed__8YBMN",status_pending:"styles_status_pending__dOHAO",statusVerified:"styles_statusVerified__Dfqmo",statusRejected:"styles_statusRejected__xSNHL",inputBox:"styles_inputBox__yzAdt",radioBox:"styles_radioBox__4eHhY",radioOption:"styles_radioOption__2rT1c",checkboxOption:"styles_checkboxOption__5nM4u",addressCheckbox:"styles_addressCheckbox__gyX63",checkboxLabel:"styles_checkboxLabel__u8i2N",labelRow:"styles_labelRow__JKmTn",infoIcon:"styles_infoIcon__o3AFG",searchSelect:"styles_searchSelect__1t0GJ",searchDropdown:"styles_searchDropdown__uerir",searchOption:"styles_searchOption__sr_v8",searchEmpty:"styles_searchEmpty__VQQh0",docStatusBadge:"styles_docStatusBadge__Tro1V",docStatusBadgeForTable:"styles_docStatusBadgeForTable__YSHWB",docStatus_pending:"styles_docStatus_pending__ESfZs",docStatus_rejected:"styles_docStatus_rejected__ex6zg",docStatus_verification_failed:"styles_docStatus_verification_failed__chJTB",docStatus_manual_review:"styles_docStatus_manual_review__7fLK8",docStatus_verified:"styles_docStatus_verified__z0_6f",docStatus_approved:"styles_docStatus_approved__EL3co",docStatus_uploaded:"styles_docStatus_uploaded__lF3VX",docVerificationTable:"styles_docVerificationTable__hbS2P",commonInput:"styles_commonInput__KQRaj",gridOfThree:"styles_gridOfThree__0O4pk",gridOfTwo:"styles_gridOfTwo___otPF",actionButtonBox:"styles_actionButtonBox__zz1wu",bankActions:"styles_bankActions__cqvKm",bankSubmitBox:"styles_bankSubmitBox__oO1hr",gradientCta:"styles_gradientCta__8_I1O",documentScreen:"styles_documentScreen__S_xfj",documentScreenHeader:"styles_documentScreenHeader__GW6b1",badge:"styles_badge__lSh_4",badgeBg:"styles_badgeBg__xy6Mu",noteListRoboto:"styles_noteListRoboto__DVhKF",glassCard:"styles_glassCard__ppFQX",bankCard:"styles_bankCard__V1mKL",bankCardForm:"styles_bankCardForm__BhoQ3",bankCardHeader:"styles_bankCardHeader__bm9kS",walletCard:"styles_walletCard__XeNry",walletCardHeader:"styles_walletCardHeader__N6w_
1s",walletSection:"styles_walletSection___7VmF",walletSectionLast:"styles_walletSectionLast__sN_mo",walletForm:"styles_walletForm___D6wk",walletFormHeader:"styles_walletFormHeader__3WQ2O",walletFormActions:"styles_walletFormActions__Pic_f",walletActions:"styles_walletActions__snqW4",noteCard:"styles_noteCard__1bfj_",documentMatrix:"styles_documentMatrix__BjD5x",documentColumn:"styles_documentColumn__M3zaC",detailGrid:"styles_detailGrid__T53_k",detailCard:"styles_detailCard__CJQrz",documentScreenActions:"styles_documentScreenActions__YEtXg",ocrBox:"styles_ocrBox__3X4Ai",title:"styles_title__Vzl0w",ocrBoxBtn:"styles_ocrBoxBtn__iEKI_",editModalBox:"styles_editModalBox__2p_j2",declarationLetter:"styles_declarationLetter__OzfeU",dynamicText:"styles_dynamicText__db7QH",footer:"styles_footer__51sEC",checkBoxContainer:"styles_checkBoxContainer__E6hXu",fiuRegisteredGrid:"styles_fiuRegisteredGrid__T9_Gl",supportingDocsTable:"styles_supportingDocsTable__iVnIJ",supportingDocsLeftCell:"styles_supportingDocsLeftCell__vNDdT",supportingDocsRightCell:"styles_supportingDocsRightCell__LfsdF",supportingDocsLabelRow:"styles_supportingDocsLabelRow__oX9FH",section:"styles_section__uNm65",topLabel:"styles_topLabel__pCFex",selectWrapper:"styles_selectWrapper__JLPjU",dropdownArrow:"styles_dropdownArrow__EKL8R",statusContainer:"styles_statusContainer__6MU5i",error:"styles_error__uWPZE",verificationList:"styles_verificationList__rYMLB",verificationItem:"styles_verificationItem__uFp2G",itemHeader:"styles_itemHeader__qXlbo",docInfo:"styles_docInfo__qdPm8",docType:"styles_docType__jwwr_",pageName:"styles_pageName__wznXd",status:"styles_status__WmrBi",status_success:"styles_status_success__xDjxD",status_failure:"styles_status_failure__B0djY",errorSection:"styles_errorSection__h8Drw",errorLabel:"styles_errorLabel__G5qCS",errorDetails:"styles_errorDetails__CSr_k",errorItem:"styles_errorItem__hqMOY",metadata:"styles_metadata__j_RWu",actionSection:"styles_actionSection__TW91D",countryListWrap:"styles_countryListWrap__BHmzX",countryListCard:"styles_countryListCard__uKeY6",countryListCardDanger:"styles_countryListCardDanger__vSTj1",countryListCardHeader:"styles_countryListCardHeader__7OCV1",countryListTitle:"styles_countryListTitle__TB_R_",countryListSubtitle:"styles_countryListSubtitle__Xm5Ld",countryListBadge:"styles_countryListBadge__hdh3S",countryListBadgeDanger:"styles_countryListBadgeDanger__QyMPQ",countryTableWrap:"styles_countryTableWrap__751gJ",countryTable:"styles_countryTable__aIiGs",countryTableDanger:"styles_countryTableDanger__F6D9J"}},25612:function(e){e.exports={sidebar:"sidebar_sidebar__3WegF",sidebarHeader:"sidebar_sidebarHeader___9oxg",collapseRow:"sidebar_collapseRow__y394H",collapseButton:"sidebar_collapseButton__LZqi_",sidebarCollapsed:"sidebar_sidebarCollapsed__o6tjf",stepList:"sidebar_stepList__WDoG6",stepItem:"sidebar_stepItem__IHC9r",stepCopy:"sidebar_stepCopy__orfw7",stepIcon:"sidebar_stepIcon__PeAJO",stepBadge:"sidebar_stepBadge__b_0E6",isSelected:"sidebar_isSelected__Cx4gT",eyebrow:"sidebar_eyebrow__Q5sVU",helper:"sidebar_helper__TQx3I",badgeCompleted:"sidebar_badgeCompleted__qO9P9",badgeActive:"sidebar_badgeActive__yYhL4",badgeUpcoming:"sidebar_badgeUpcoming__YkZXi",stateActive:"sidebar_stateActive__OL5w_",stateCompleted:"sidebar_stateCompleted__IekuY",stateUpcoming:"sidebar_stateUpcoming__9mYXX",footerCard:"sidebar_footerCard__BJ29m",progressTrack:"sidebar_progressTrack__bHHHH"}},75668:function(e){e.exports={shell:"styles_shell__0bYgj",glowLayer:"styles_glowLayer__iii22",nebulaLayer:"styles_nebulaLayer__MnqYa",sparkLayer:"styles_sparkLayer__imwzB",pageLoaderOverlay:"styles_pageLoaderOverlay__KLgIE",layout:"styles_layout__nyrZZ",layoutCollapsed:"styles_layoutCollapsed__HwQ4Z",sidebarColumn:"styles_sidebarColumn__RdiB7",mainLayout:"styles_mainLayout__Vdscx"}}}]);

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.