1var qe=Object.defineProperty;var t=(l,p)=>qe(l,"name",{value:p,configurable:!0});import{u as $,R as k,K as Y,y as A,ai as Se,j as e,C,al as J,p as se,ao as re,B as oe,br as be,t as ae,a6 as de,an as Ae,f as We,m as Ve,F as ne,az as ye,aj as ze,bV as $e,bE as Ke,n as Te,bs as Ye}from"./index-D29zZHPH.js";import{F as He,a as Qe,b as Je}from"./index-BcKrWeGX.js";import{l as O,F as Z,c as Ne,cJ as q,i as ie,j as me,k as pe,co as U,w as Ie,cF as De,f as je,V as Pe,d9 as Ze,da as et,n as Ee,bl as tt,E as at,c0 as ue,cA as te,ba as st,cG as rt,cN as lt,aA as nt,X as ot,cO as it,ck as ct}from"./index-BB00xsXm.js";import{r as o,R as L,g as le,u as dt}from"./react-router-BdkfgoY9.js";import{a as H,u as V}from"./redux-BDBQMhX3.js";import{S as xe,T as ut,B as _t,F as ve,D as Tt,E as gt,a as mt,A as pt,P as yt}from"./password-to-subscribe-IW7t8f0F.js";import{T as St}from"./index-Be7LuK_u.js";import{w as ft,x as ht,y as Ct,z as bt,B as xt,D as vt,E as At,F as Nt,H as It,I as Dt,t as jt,J as Pt,K as Et,L as kt,c as Lt}from"./copyTradingService-DMHPBRnU.js";import{i as Rt,a0 as wt,$ as ke,a3 as Mt,a7 as Ft,t as Xt,n as Ot,o as Ut,f as Bt,ag as Gt,ai as qt}from"./managedAccountService-BcPczXUF.js";import{u as fe}from"./useDebouncedEffect-BLaMjhdL.js";import{F as ce}from"./table-B_PQXdRl.js";import{F as W}from"./index-DFLppv0Q.js";import{F as ge}from"./action-item-DdF7-bAC.js";import{U as Wt}from"./unsubscribe-strategy-BlIPmVVt.js";import{B as Le}from"./business-object-enum-_WLYbqYl.js";import{F as Vt}from"./input-search-QS1NeAx_.js";import{F as Re}from"./index-DSZ05q4n.js";import{ah as zt}from"./walletService-Bm-n1MfI.js";import{L as $t}from"./link-trading-account-C7MiJJ04.js";import"./react-core-DQH9m0Cl.js";import"./SettlementPeriodInfo-Dc-THbU7.js";import"./highcharts-react.min-B8JaVMA9.js";import"./index-Dowu9SiZ.js";const Kt=t(l=>{const p=H(),d=$()?.languageResources,[r,S]=o.useState(""),[E,N]=o.useState({StatusType:null,AllocationMethodId:null}),[s,b]=o.useState({loader:!0,options:[]});o.useEffect(()=>{s?.options?.length==0&&D()},[]);const D=t(async()=>{try{const n=await Rt();n?.result?.Status===k.SUCCESS?(b(T=>({...T,options:Y(n?.result?.Data),loader:!1})),p({type:"CT_INVESTOR_FILTER_DATA",payload:{StatusType:Y(n?.result?.Data)[0]?.value}}),A.success(n?.result?.Message)):(A.error(n?.result?.Message),b({loader:!1,options:[]}))}catch(n){console.log("error",n),A.error(n),b({loader:!1,options:[]})}},"getStatusOption"),x={search:t(n=>{S(n.target.value.trim()),l?.setPage(1)},"search"),clearSearch:t(()=>{S(""),l?.setPage(1)},"clearSearch"),changeSelect:t((n,T)=>{N(m=>({...m,[T]:n})),T==="StatusType"&&p({type:"CT_INVESTOR_FILTER_DATA",payload:{StatusType:n?.value}})},"changeSelect")};return fe(()=>{p({type:"CT_INVESTOR_FILTER_DATA",payload:{Search:r,PageNumber:1}}),l?.setPage(1)},[r],Se.DE_BOUNCING_TIME_OUT),e.jsx(L.Fragment,{children:e.jsx("div",{className:"f_p-15 f_pb-0 f_border-bottom f_mbm-1",children:e.jsx("div",{className:"f_row",children:e.jsx("div",{className:"f_col-12 f_col-md-12 f_col-lg",children:e.jsxs("div",{className:"f_row",children:[e.jsx("div",{className:"f_col-12 f_col-sm-6 f_col-md-6 f_col-lg-4 f_col-xl-3 f_input-margin",children:e.jsx(O,{select:!0,oneLineLabel:!0,selectValue:E?.StatusType,children:e.jsx(Z,{label:d?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",options:s?.options,defaultValue:s?.options[0],name:"StatusType",value:E?.StatusType||s?.options[0],onChange:t(n=>x.changeSelect(n,"StatusType"),"onChange"),isLoading:s?.loader})})}),e.jsx("div",{className:"f_col-12 f_col-sm-6 f_col-md-6 f_col-lg-4 f_col-xl-3 f_input-margin",children:e.jsx(O,{label:d?.TXT_ACCOUNTID,"data-key":"TXT_ACCOUNTID",rightSide:r.length>0?e.jsx("span",{className:"f_cp",onClick:t(()=>x.clearSearch(),"onClick"),children:e.jsx(Ne,{size:"14",color:C.iconColor})}):null,children:e.jsx("input",{type:"number",placeholder:" ",name:"search",value:r,onChange:t(n=>x.search(n),"onChange"),onKeyDown:t(n=>["e","E","+","-","."].includes(n.key)&&n.preventDefault(),"onKeyDown"),autoComplete:"off"})})})]})})})})})},"Filter$2"),Yt=L.memo(l=>{const p=H(),d=$()?.languageResources,r=V(s=>s?.copyTrading?.ctInvestorAccountFilter),S=V(s=>s?.copyTrading?.ctInvestorAccountListLoader),E=o.useMemo(()=>[{visible:!0,title:d?.CP_CopyTrading_InvestorAccountList_TXT_CopierAccount,"data-key":"CP_CopyTrading_InvestorAccountList_TXT_CopierAccount",keyName:"AccountId",sort:!0,cellWidth:175,render:t(s=>e.jsx("span",{children:s?.AccountNumber}),"render")},{visible:!0,title:d?.TXT_AccountName,"data-key":"TXT_AccountName",keyName:"AccountName",sort:!0,render:t(s=>e.jsx("span",{children:s?.AccountName}),"render")},{visible:!0,title:d?.TXT_BALANCE,"data-key":"TXT_BALANCE",keyName:"Balance",sort:!0,render:t(s=>e.jsx("span",{children:J(parseFloat(s?.Balance),"",` ${s?.BaseCurrency}`,!1,!1)}),"render")},{visible:!0,title:d?.TXT_Generic_Equity,"data-key":"TXT_Generic_Equity",keyName:"UnRealizedPL",sort:!0,render:t(s=>e.jsx("span",{children:J(parseFloat(s?.Balance+s?.UnRealizedPL),"","",!1,!1)}),"render")},{visible:!0,title:d?.CP_ManagedAccount_InvestorAccountList_TXT_AllocationValue,"data-key":"CP_ManagedAccount_InvestorAccountList_TXT_AllocationValue",keyName:"Multiplier",sort:!0,render:t(s=>e.jsx("span",{children:q.FIX_Lot_CopyTrading===s?.LotAllocationMethodId||q.Balance_CopyTrading===s?.LotAllocationMethodId||q.Equity_CopyTrading===s?.LotAllocationMethodId?s?.Multiplier/100:s?.Multiplier===null?0:s?.Multiplier}),"render")},{visible:!0,title:d?.TXT_AllocationMethod,"data-key":"TXT_AllocationMethod",keyName:"AllocationMethodName",s
1ort:!0,render:t(s=>e.jsx("span",{children:s?.AllocationMethodName}),"render")},{visible:!0,title:d?.TXT_SubscribedOn,"data-key":"TXT_SubscribedOn",keyName:"BOApprovedDate",sort:!0,render:t(s=>e.jsx("span",{children:s?.BOApprovedDate?se(s?.BOApprovedDate).format(re.FULL_DATE_SEC_TIME):""}),"render")},{visible:!0,title:d?.CP_ManagedAccount_MySubscription_ActiveStrategy_TXT_Unsubscribed_On,"data-key":"CP_ManagedAccount_MySubscription_ActiveStrategy_TXT_Unsubscribed_On",keyName:"UnFollowedOn",sort:!1,render:t(s=>e.jsx("span",{children:s?.BOUnSubscribeAprrovalStatus===null?"N/A":s?.UnFollowedOn}),"render")}],[]),N={onPageChange:t(()=>{document.querySelector(".f_table-scroll")?.scrollIntoView({behavior:"smooth"})},"onPageChange"),resultChange:t(s=>{p({type:"CT_INVESTOR_FILTER_DATA",payload:{PageNumber:s.PageNumber,PageSize:s.PageSize}})},"resultChange"),sort:t(s=>{p({type:"CT_INVESTOR_FILTER_DATA",payload:{sort:s}})},"sort")};return e.jsx(L.Fragment,{children:e.jsx("div",{className:"f_table_open",children:e.jsx("div",{className:"f_module-layout",children:e.jsx(ce,{onScroll:"f_table-scroll",header:E,data:l?.data,sort:r?.sort,onSort:N.sort,onPageChange:t(s=>N.onPageChange(s),"onPageChange"),onPagination:t(s=>N.resultChange(s),"onPagination"),totalRecords:l?.totalRecord,PageNumber:r?.PageNumber,PageSize:r?.PageSize,dataLoading:S,className:"f_cp-table f_table-sticky-header ",showResultTitle:d?.CP_Common_Pagination_LBL_Showing_results,"data-result-key":"CP_Common_Pagination_LBL_Showing_results",noData:!S&&e.jsx(ie,{image:`${oe}/images/no-data-found/default-image.svg`,heading:d?.TXT_DataNotFound,description:d?.TXT_ExistingAccountsList_Descr,"data-headingKey":"TXT_DataNotFound","data-descriptionKey":"TXT_ExistingAccountsList_Descr"})})})})})}),Ht=L.memo(l=>{const p=H(),d=$()?.languageResources,{subscribedstrategId:r}=le(),S=V(a=>a?.copyTrading?.ctInvestorAccountFilter),[E,N]=o.useState([]),[s,b]=o.useState(!1),[D,x]=o.useState(0),[n,T]=o.useState(1),m=t(async()=>{p({type:"SET_CT_INVESTOR_ACCOUNT_LIST_LOADER",payload:!0});let a=S?.sort?.SortColumn||Object.keys(S?.sort)[0],f=S?.sort?.SortOrder||S?.sort[a];const F={PageNumber:S?.PageNumber,PageSize:S?.PageSize,StrategyId:r,SortColumn:a,SortOrder:f,StatusType:parseInt(S?.StatusType),SearchAccount:S?.Search||null},j=await ft(F);j?.result?.Status===k.SUCCESS?(N(j?.result?.Data?.Data),b(j?.result?.Data?.IsUnsubscribeApprovalAtFundManagerLevel),x(j?.result?.Data?.Pagination?.TotalRecord),p({type:"SET_CT_INVESTOR_ACCOUNT_LIST_LOADER",payload:!1})):(A.error(j?.result?.Message),p({type:"SET_CT_INVESTOR_ACCOUNT_LIST_LOADER",payload:!1}))},"GetInvestorAccountList");return o.useEffect(()=>{S?.StatusType&&m()},[S,n,r]),e.jsxs(L.Fragment,{children:[e.jsx("p",{className:"f_p-15 f_border-bottom","data-key":"CP_CopyTrading_StrategyDetails_InvestorAccount_Desc",children:d?.CP_CopyTrading_StrategyDetails_InvestorAccount_Desc}),e.jsx(Kt,{totalRecord:D,setPage:T,refreshData:m,strategyAccountDetail:l?.strategyAccountDetail}),e.jsx(Yt,{data:E,totalRecord:D,IsUnsubscribeApprovalAtFundManagerLevel:s,refreshData:m})]})}),Qt=L.memo(l=>{const p=$()?.languageResources,d=H(),r=V(T=>T?.managedAccount?.managedOrderListFilter),S=V(T=>T?.managedAccount?.managedOrderListLoader),[E,N]=o.useState([]),[s,b]=o.useState(0),D=t(async()=>{d({type:"SET_MANAGED_ORDER_LIST_LOADER",payload:!0});let T=r?.sort?.SortColumn||Object.keys(r?.sort)[0],m=r?.sort?.SortOrder||r?.sort[T];const a={PageNumber:r?.PageNumber,PageSize:r?.PageSize,SortColumn:T,SortOrder:m,AccountId:l?.accountId},f=await ht(a);f?.result?.Status===k.SUCCESS?(N(f?.result?.Data?.Data),b(f?.result?.Data?.Pagination?.TotalRecord),d({type:"SET_MANAGED_ORDER_LIST_LOADER",payload:!1})):(A.error(f?.result?.Message),d({type:"SET_MANAGED_ORDER_LIST_LOADER",payload:!1}))},"GetAllOpenClosedTradeList");o.useEffect(()=>{l?.accountId&&D()},[r,l?.accountId]);const x=o.useMemo(()=>[{visible:!0,title:p?.CP_Invest_StrategyDetail_ManageOpenClosedTradeList_TXT_MasterACNo,"data-key":"CP_Invest_StrategyDetail_ManageOpenClosedTradeList_TXT_MasterACNo",keyName:"Login",sort:!0,cellWidth:200,render:t(T=>e.jsx("span",{children:T?.Login}),"render")},{visible:!0,title:p?.TXT_OrderId,"data-key":"TXT_OrderId",keyName:"Order",sort:!0,render:t(T=>e.jsx("span",{children:T?.Order}),"render")},{visible:!0,title:p?.TXT_SYMBOL,"data-key":"TXT_SYMBOL",keyName:"Symbol",sort:!0,render:t(T=>e.jsx("span",{children:T?.Symbol}),"render")},{visible:!0,title:p?.TXT_OPENPRICE,"data-key":"TXT_OPENPRICE",keyName:"OpenPrice",sort:!0,render:t(T=>e.jsx("span",{children:J(parseFloat(T?.OpenPrice),"","",!1,!1,be(T?.OpenPrice))}),"render")},{visible:!0,title:p?.CP_Dashboard_AllACTypeCloseTransactions_TXT_ClosedPrice,"data-key":"CP_Dashboard_AllACTypeCloseTransactions_TXT_ClosedPrice",keyName:"ClosePrice",sort:!0,render:t(T=>e.jsx("span",{children:J(parseFloat(T?.ClosePrice),"","",!1,!1,be(T?.ClosePrice))}),"render")},{visible:!0,title:p?.CP_Invest_StrategyDetail_ChildClosedTradeList_TXT_OpenLot,"data-key":"CP_Invest_StrategyDetail_ChildClosedTradeList_TXT_OpenLot",keyName:"Volume",sort:!0,render:t(T=>e.jsx("span",{children:J(parseFloat(T?.Volume),"","",!1,!1,2)}),"render")},{visible:!0,title:p?.CP_Dashboard_AllACTypeCloseTransactions_TXT_OpenedTime,"data-key":"CP_Dashboard_AllACTypeCloseTransactions_TXT_OpenedTime",keyName:"OpenTime",sort:!0,render:t(T=>e.jsx("span",{children:se(T?.OpenTime).format(re.FULL_DATE_SEC_TIME_WITH_MONTH)}),"render")},{visible:!0,title:p?.CP_Dashboard_AllACTypeCloseTransactions_TXT_ClosedTime,"data-key":"CP_Dashboard_AllACTypeCloseTransactions_TXT_ClosedTime",keyName:"CloseTime",s
1ort:!0,render:t(T=>e.jsx("span",{children:se(T?.CloseTime).format(re.FULL_DATE_SEC_TIME_WITH_MONTH)}),"render")},{visible:!0,title:p?.CP_Compare_Index_TXT_Profit,"data-key":"CP_Compare_Index_TXT_Profit",keyName:"Profit",sort:!0,render:t(T=>e.jsx("span",{children:J(parseFloat(T?.Profit),"","",!0,!0,2)}),"render")},{visible:!0,title:p?.TXT_Commision,"data-key":"TXT_Commision",keyName:"Commission",sort:!1,render:t(T=>e.jsx("span",{children:J(parseFloat(T?.Commission),"","",!0,!0,2)}),"render")},{visible:!0,title:p?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",keyName:"TradeType",sort:!0,render:t(T=>e.jsx("span",{children:T?.TradeType}),"render")}],[]),n={onPageChange:t(()=>{document.querySelector(".f_table-scroll")?.scrollIntoView({behavior:"smooth"})},"onPageChange"),resultChange:t(T=>{d({type:"MANAGED_ORDER_LIST_FILTER_DATA",payload:{PageNumber:T.PageNumber,PageSize:T.PageSize}})},"resultChange"),sort:t(T=>{d({type:"MANAGED_ORDER_LIST_FILTER_DATA",payload:{sort:T}})},"sort")};return e.jsxs(L.Fragment,{children:[e.jsx("p",{className:"f_p-15 f_border-bottom f_mbm-1","data-key":"CP_Invest_StrategyDetail_ManageOrderOpenClose_TXT_ManageOrderDesc",children:p?.CP_Invest_StrategyDetail_ManageOrderOpenClose_TXT_ManageOrderDesc}),e.jsx("div",{className:"f_table_open",children:e.jsx("div",{className:"f_module-layout",children:e.jsx(ce,{onScroll:"f_table-scroll",header:x,data:E,sort:r?.sort,onSort:n.sort,onPageChange:t(T=>n.onPageChange(T),"onPageChange"),onPagination:t(T=>n.resultChange(T),"onPagination"),totalRecords:s,PageNumber:r?.PageNumber,PageSize:r?.PageSize,dataLoading:S,className:"f_cp-table f_table-sticky-header f_table-sticky-first f_table-sticky-last ",showResultTitle:p?.CP_Common_Pagination_LBL_Showing_results,"data-result-key":"CP_Common_Pagination_LBL_Showing_results",noData:!S&&e.jsx(ie,{image:`${oe}/images/no-data-found/default-image.svg`,heading:p?.TXT_DataNotFound,"data-headingKey":"TXT_DataNotFound","data-descriptionKey":"TXT_ExistingAccountsList_Descr",description:p?.TXT_ExistingAccountsList_Descr})})})})]})}),Jt=L.memo(()=>{const l=$()?.languageResources,{subscribedstrategId:p}=le(),d=H(),r=V(y=>y?.copyTrading?.ctWithdrawRequestFilter),S=V(y=>y?.copyTrading?.ctWithdrawRequestLoader),[E,N]=o.useState([]),[s,b]=o.useState(0),[D,x]=o.useState(!1),[n,T]=o.useState({flag:!1,data:null}),m=t(async()=>{d({type:"SET_CT_WITHDRAW_REQUEST_LOADER",payload:!0});let y=r?.sort?.SortColumn||Object.keys(r?.sort)[0],v=r?.sort?.SortOrder||r?.sort[y];const c={PageNumber:r?.PageNumber,PageSize:r?.PageSize,SortColumn:y,SortOrder:v,StrategyId:p,StatusType:r?.StatusType||null,Search:r?.Search||null},g=await wt(c);g?.result?.Status===k.SUCCESS?(N(g?.result?.Data?.Data),b(g?.result?.Data?.Pagination?.TotalRecord),d({type:"SET_CT_WITHDRAW_REQUEST_LOADER",payload:!1})):(A.error(g?.result?.Message),d({type:"SET_CT_WITHDRAW_REQUEST_LOADER",payload:!1}))},"GetPartialWithdrawalRequestList");o.useEffect(()=>{m()},[r]);const a=t(y=>l?.[U?.find(v=>v.value===y)?.key],"getApprovalStatus"),f={getStatus:t(y=>{if(y?.BOApprovalStatus===0)return e.jsx(W,{"data-key":U?.find(v=>v.value===0)?.key,name:a(0),bgColor:C.green,textColor:C.white,type:"linear"});if(y?.BOApprovalStatus===1)return e.jsx(W,{"data-key":U?.find(v=>v.value===1)?.key,name:a(1),bgColor:C.yellow,textColor:C.black,type:"linear"});if(y?.BOApprovalStatus===2)return e.jsx(W,{"data-key":U?.find(v=>v.value===2)?.key,name:a(2),bgColor:C.red,textColor:C.white,type:"linear"})},"getStatus"),approveReject:t(async y=>{y.preventDefault(),x(!0);const v={PartialWithdrawalRequestId:n?.data?.PartialWithdrawalRequestId,StatusId:n?.data?.type==="approve"?ae?.Approved:ae?.Rejected,SubscriptionId:n?.data?.SubscriptionId};try{const c=await Ct(v);c?.result?.Status===k.SUCCESS?(T({flag:!1,data:null}),A.success(c?.result?.Message),x(!1),m()):(A.error(c?.result?.Message),x(!1))}catch(c){console.log("error",c),A.error(c),x(!1)}},"approveReject")},F=o.useMemo(()=>[{visible:!0,title:l?.TXT_Generic_Account_Details,"data-key":"TXT_Generic_Account_Details",keyName:"AccountName",sort:!0,cellWidth:200,render:t(y=>e.jsxs("div",{children:[e.jsx("span",{children:y?.AccountName}),e.jsx("p",{children:y?.AccountNumber})]}),"render")},{visible:!0,title:l?.TXT_RequestBy,"data-key":"TXT_RequestBy",keyName:"UserName",sort:!1,render:t(y=>e.jsx("span",{children:y?.UserName}),"render")},{visible:!0,title:l?.CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn,"data-key":"CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn",keyName:"InsertedOn",sort:!0,render:t(y=>e.jsx("span",{children:se(y?.InsertedOn).format(re.FULL_DATE_SEC_TIME)}),"render")}
1,{visible:!0,title:l?.Amount,"data-key":"Amount",keyName:"PartialwithdrawalAmount",sort:!0,render:t(y=>e.jsx("span",{children:y?.PartialwithdrawalAmount}),"render")},{visible:!0,title:l?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",keyName:"BOApprovalStatus",sort:!0,render:t(y=>f.getStatus(y),"render")}],[]),j={onPageChange:t(()=>{document.querySelector(".f_table-scroll")?.scrollIntoView({behavior:"smooth"})},"onPageChange"),resultChange:t(y=>{d({type:"PARTIAL_WITHDRAWAL_REQUEST_FILTER_DATA",payload:{PageNumber:y.PageNumber,PageSize:y.PageSize}})},"resultChange"),sort:t(y=>{d({type:"PARTIAL_WITHDRAWAL_REQUEST_FILTER_DATA",payload:{sort:y}})},"sort")};return e.jsxs(L.Fragment,{children:[e.jsx("div",{children:e.jsx("div",{className:"f_table_open f_table-no-top-section",children:e.jsx("div",{className:"f_module-layout",children:e.jsx(ce,{onScroll:"f_table-scroll",header:F,data:E,sort:r?.sort,onSort:j.sort,onPageChange:t(y=>j.onPageChange(y),"onPageChange"),onPagination:t(y=>j.resultChange(y),"onPagination"),totalRecords:s,PageNumber:r?.PageNumber,PageSize:r?.PageSize,dataLoading:S,className:"f_cp-table f_table-sticky-header f_table-sticky-first f_table-sticky-last ",showResultTitle:l?.CP_Common_Pagination_LBL_Showing_results,"data-result-key":"CP_Common_Pagination_LBL_Showing_results",noData:!S&&e.jsx(ie,{image:`${oe}/images/no-data-found/default-image.svg`,heading:l?.TXT_DataNotFound,description:l?.TXT_ExistingAccountsList_Descr,"data-headingKey":"TXT_DataNotFound","data-descriptionKey":"TXT_ExistingAccountsList_Descr"})})})})}),n?.flag&&e.jsx(me,{open:n?.flag,className:"",maxWidth:"100%",modal:!1,closeIcon:!0,onClose:t(()=>T({flag:!1,data:null}),"onClose"),loading:D,icon:e.jsx(pe,{size:"30",color:C.yellow}),headingTitle:l?.TXT_PartialWithdrawalRequest,"heading-key":"TXT_PartialWithdrawalRequest",description:n?.data?.type==="approve"?l?.TXT_PartialWithdrawal_Confirm_Desc_Approve:l?.TXT_PartialWithdrawal_Confirm_Desc_Reject,"description-key":n?.data?.type==="approve"?"TXT_PartialWithdrawal_Confirm_Desc_Approve":"TXT_PartialWithdrawal_Confirm_Desc_Reject",closeBtnName:l?.TXT_No,"close-btn-key":"TXT_No",closeBtnClick:t(()=>T({flag:!1,data:null}),"closeBtnClick"),saveBtnName:l?.TXT_Generic_YES,"save-btn-key":"TXT_Generic_YES",saveBtnClick:t(y=>f.approveReject(y),"saveBtnClick")})]})}),Zt=L.memo(l=>{const p=H(),d=$()?.languageResources,[r,S]=o.useState(""),[E,N]=o.useState(null),[s,b]=o.useState({data:[],loader:!0}),D=t(async()=>{b({loader:!0,data:[]});try{const n=await ke(Le.Published);n?.result?.Status===k.SUCCESS?b({loader:!1,data:Y(n?.result?.Data[0]?.Data)}):b({loader:!1,data:[]})}catch(n){console.log("error",n),b({loader:!1,data:[]})}},"getStatus");o.useEffect(()=>{s?.data?.length===0&&D()},[]);const x={search:t(n=>{S(n.target.value.trim()),l?.setPage(1)},"search"),clearSearch:t(()=>{S(""),l?.setPage(1)},"clearSearch"),changeFilter:t(n=>{N(n),p({type:"CT_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{StatusType:n?.value}})},"changeFilter")};return fe(()=>{p({type:"CT_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{Search:r,PageNumber:1}}),l?.setPage(1)},[r],Se.DE_BOUNCING_TIME_OUT),e.jsx(L.Fragment,{children:e.jsxs("div",{className:"f_row",children:[e.jsx("div",{className:"f_col-12 f_col-sm-6 f_col-md-4 f_col-xl-3",children:e.jsx(Z,{label:d?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",options:s?.data,isSearchable:!0,isClearable:!0,isLoading:s?.loader,value:E,onChange:t(n=>x.changeFilter(n),"onChange")})}),e.jsx("div",{className:"f_col-12 f_col-sm-6 f_col-md-4 f_col-xl-3",children:e.jsx(O,{label:d?.TXT_PH_Search_By_AccName,"data-key":"TXT_PH_Search_By_AccName",rightSide:r.length>0?e.jsx("span",{className:"f_cp",onClick:t(()=>x.clearSearch(),"onClick"),children:e.jsx(Ne,{size:"14",color:C.iconColor})}):null,children:e.jsx("input",{type:"number",placeholder:" ",name:"search",value:r,onChange:t(n=>x.search(n),"onChange"),onKeyDown:t(n=>["e","E","+","-","."].includes(n.key)&&n.preventDefault(),"onKeyDown"),autoComplete:"off"})})})]})})}),ea=L.memo(()=>{const l=$()?.languageResources,{subscribedstrategId:p}=le(),d=H(),r=V(u=>u?.copyTrading?.ctSubscriptionRequestFilter),S=V(u=>
1u?.copyTrading?.ctStrategyDetailLoader),[E,N]=o.useState([]),[s,b]=o.useState({flag:!1,data:null}),[D,x]=o.useState(!1),[n,T]=o.useState({flag:!1,data:null}),[m,a]=o.useState(0),[f,F]=o.useState(1),[j,y]=o.useState(!1),v=t(async()=>{d({type:"SET_CT_SUBSCRIPTION_REQUEST_LOADER",payload:!0});let u=r?.sort?.SortColumn||Object.keys(r?.sort)[0],P=r?.sort?.SortOrder||r?.sort[u];const B={PageNumber:r?.PageNumber,PageSize:r?.PageSize,SortColumn:u,SortOrder:P,StrategyId:p,StatusType:r?.StatusType||null,Search:r?.Search||null},K=await bt(B);K?.result?.Status===k.SUCCESS?(N(K?.result?.Data?.Data),x(K?.result?.Data?.IsSubscribeApprovalAtFundManagerLevel),a(K?.result?.Data?.Pagination?.TotalRecord),d({type:"SET_CT_SUBSCRIPTION_REQUEST_LOADER",payload:!1})):(A.error(K?.result?.Message),d({type:"SET_CT_SUBSCRIPTION_REQUEST_LOADER",payload:!1}))},"GetSubscriptionRequestList");o.useEffect(()=>{v()},[r,f]);const c=t(u=>l?.[U?.find(P=>P.value===u)?.key],"getApprovalStatus"),g={getStatus:t(u=>{if(u?.BOApprovalStatus===0)return e.jsx(W,{fullWidth:!0,"data-key":U?.find(P=>P.value===0)?.key,name:c(0),bgColor:C.green,textColor:C.white,type:"linear"});if(u?.BOApprovalStatus===1)return e.jsx(W,{fullWidth:!0,"data-key":U?.find(P=>P.value===1)?.key,name:c(1),bgColor:C.yellow,textColor:C.black,type:"linear"});if(u?.BOApprovalStatus===2)return e.jsx(W,{fullWidth:!0,"data-key":U?.find(P=>P.value===2)?.key,name:c(2),bgColor:C.red,textColor:C.white,type:"linear"})},"getStatus"),approveReject:t(async u=>{u.preventDefault(),y(!0);const P={Id:s?.data?.SubscriptionId,StatusId:s?.data?.type==="approve"?ae?.Approved:ae?.Rejected};try{const B=await Mt(P);B?.result?.Status===k.SUCCESS?(b({flag:!1,data:null}),A.success(B?.result?.Message),y(!1),v()):(A.error(B?.result?.Message),y(!1))}catch(B){console.log("error",B),A.error(B),y(!1)}},"approveReject")},M=o.useMemo(()=>[{visible:!0,title:l?.TXT_Generic_Account_Name,"data-key":"TXT_Generic_Account_Name",keyName:"AccountName",sort:!0,cellWidth:200,render:t(u=>e.jsx("span",{children:u?.AccountName}),"render")},{visible:!0,title:l?.TXT_RequestBy,"data-key":"TXT_RequestBy",keyName:"SubscriberUserName",sort:!1,render:t(u=>e.jsx("span",{children:u?.SubscriberUserName}),"render")},{visible:!0,title:l?.TXT_AccountNumber,"data-key":"TXT_AccountNumber",keyName:"AccountNumber",sort:!0,render:t(u=>e.jsx("span",{children:u?.AccountNumber}),"render")},{visible:!0,title:l?.CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn,"data-key":"CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn",keyName:"InsertedOn",sort:!0,render:t(u=>e.jsx("span",{children:se(u?.InsertedOn).format(re.FULL_DATE_SEC_TIME)}),"render")},{visible:!0,title:l?.TXT_INVESTEDAMOUNT,"data-key":"TXT_INVESTEDAMOUNT",keyName:"AccountBalance",sort:!1,render:t(u=>e.jsx("span",{children:J(parseFloat(u?.AccountBalance),"","",!0,!0,2)}),"render")},{visible:!0,title:l?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",keyName:"BOApprovalStatus",sort:!0,render:t(u=>g.getStatus(u),"render")},{visible:!0,title:l?.TXT_Actions,"data-key":"TXT_Actions",keyName:"Actions",sort:!1,showHideColumns:null,render:t(u=>e.jsx("div",{className:"f_flex-align f_content-end",children:u?.BOApprovalStatus===ae?.Pending&&e.jsxs(L.Fragment,{children:[e.jsx(ge,{text:l?.TXT_GENERIC_APPROVE,onClick:t(()=>b({flag:!0,data:{...u,type:"approve"}}),"onClick"),children:e.jsx(Ie,{size:"14",color:C.iconColor})}),e.jsx(ge,{className:"f_ml-10",text:l?.TXT_Reject,onClick:t(()=>b({flag:!0,data:{...u,type:"reject"}}),"onClick"),children:e.jsx(De,{size:"14",color:C.iconColor})})]})}),"render")}],[D]),_={onPageChange:t(()=>{document.querySelector(".f_table-scroll")?.scrollIntoView({behavior:"smooth"})},"onPageChange"),resultChange:t(u=>{d({type:"CT_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{PageNumber:u.PageNumber,PageSize:u.PageSize}})},"resultChange"),sort:t(u=>{d({type:"CT_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{sort:u}})},"sort")};return e.jsxs(L.Fragment,{children:[e.jsxs("div",{className:"f_mt-20",children:[e.jsx("p",{className:"f_mb-15","data-key":"CP_CopyTrade_StrategyDetail_SubscriptionDesc",children:l?.CP_CopyTrade_StrategyDetail_SubscriptionDesc}),e.jsx(Zt,{setPage:F}),e.jsx("div",{className:"f_table_open f_mt-15",children:e.jsx("div",{className:"f_module-layout",children:e.jsx(ce,{onScroll:"f_table-scroll",header:M,data:E,sort:r?.sort,onSort:_.sort,onPageChange:t(u=>_.onPageChange(u),"onPageChange"),onPagination:t(u=>_.resultChange(u),"onPagination"),totalRecords:m,PageNumber:r?.PageNumber,PageSize:r?.PageSize,dataLoading:S,className:"f_cp-table f_table-sticky-header f_table-sticky-first f_table-sticky-last ",showResultTitle:l?.CP_Common_Pagination_LBL_Showing_results,"data-result-key":"CP_Common_Pagination_LBL_Showing_results",noData:!S&&e.jsx(ie,{image:`${oe}/images/no-data-found/default-image.svg`,heading:l?.TXT_DataNotFound,description:l?.TXT_ExistingAccountsList_Descr,"data-headingKey":"TXT_DataNotFound","data-descriptionKey":"TXT_ExistingAccountsList_Descr"})})})})]}),s?.flag&&e.jsx(me,{open:s?.flag,className:"",maxWidth:"100%",modal:!1,closeIcon:!0,onClose:t(()=>b({flag:!1,data:null}),"onClose"),loading:j,icon:e.jsx(pe,{size:"30",color:C.yellow}),headingTitle:l?.TXT_Strategy_Confirm_Title,"heading-key":"TXT_Strategy_Confirm_Title",description:l?.TXT_Strategy_Confirm_Prompt,"description-key":"TXT_Strategy_Confirm_Prompt",closeBtnName:l?.TXT_No,"close-btn-key":"TXT_No",closeBtnClick:t(()=>b({flag:!1,data:null}),"closeBtnClick"),saveBtnName:l?.TXT_Generic_YES,"save-btn-key":"TXT_Generic_YES",saveBtnClick:t(u=>g.approveReject(u),"saveBtnClick")}),n?.flag&&e.jsx(Wt,{open:n?.flag,close:t(()=>T({flag:!1,data:null}),"close"),data:n?.data,refreshData:v})]})}),ta=L.memo(()=>{const l=$()?.languageResources,{subscribedstrategId:p}=le(),d=H(),r=V(a=>a?.copyTrading?.ctTopUpRequestFilter),S=V(a=>a?.copyTrading?.ctTopUpRequestLoader),[E,N]=o.useState([]),[s,b]=o.useState(0),D=t(async()=>{d({type:"SET_CT_TOPUP_REQUEST_LOADER",payload:!0});let a=r?.sort?.SortColumn||Object.keys(r?.sort)[0],f=r?.sort?.SortOrder||r?.sort[a];const F={PageNumber:r?.PageNumber,PageSize:r?.PageSize,SortColumn:a,SortOrder:f,StrategyId:p},j=await xt(F);j?.result?.Status===k.SUCCESS?(N(j?.result?.Data?.Data),b(j?.result?.Data?.Pagination?.TotalRecord),d({type:"SET_CT_TOPUP_REQUEST_LOADER",payload:!1})):(A.error(j?.result?.Message),d({type:"SET_CT_TOPUP_REQUEST_LOADER",payload:!1}))},"GetTopupRequestList");o.useEffect(()=>{D()},[r]);const x=t(a=>l?.[U?.find(f=>f.value===a)?.key],"getApprovalStatus"),n={getStatus:t(a=>{if(a?.BOApprovalStatus===0)return e.jsx(W,{"data-key":U?.find(f=>f.value===0)?.key,name:x(0),bgColor:C.green,textColor:C.white,type:"linear"});if(a?.BOApprovalStatus===1)return e.jsx(W,{"data-key":U?.find(f=>f.value===1)?.key,name:x(1),bgColor:C.yellow,textColor:C.black,type:"linear"});if(a?.BOApprovalStatus===2)return e.jsx(W,{"data-key":U?.find(f=>f.value===2)?.key,name:x(2),bgColor:C.red,textColor:C.white,type:"linear"})},"getStatus")},T=o.useMemo(()=>[{visible:!0,title:l?.TXT_RequestBy,"data-key":"TXT_RequestBy",keyName:"InsertedBy",sort:!0,cellWidth:200,render:t(a=>e.jsx("span",{children:a?.InsertedBy}),"render")},{visible:!0,title:l?.CP_ManagedAccount_STopupRequestList_TXT_TopupAmount,"data-key":"CP_ManagedAccount_STopupRequestList_TXT_TopupAmount",ke
1yName:"TopupAmount",sort:!0,render:t(a=>e.jsx("span",{children:J(parseFloat(a?.TopupAmount),"","",!1,!1)}),"render")},{visible:!0,title:l?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",keyName:"BOApprovalStatus",sort:!0,render:t(a=>n.getStatus(a),"render")},{visible:!0,title:l?.CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn,"data-key":"CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn",keyName:"InsertedOn",sort:!0,render:t(a=>e.jsx("span",{children:se(a?.InsertedOn).format(re.FULL_DATE_SEC_TIME)}),"render")}],[]),m={onPageChange:t(()=>{document.querySelector(".f_table-scroll")?.scrollIntoView({behavior:"smooth"})},"onPageChange"),resultChange:t(a=>{d({type:"CT_TOPUP_REQUEST_FILTER_DATA",payload:{PageNumber:a.PageNumber,PageSize:a.PageSize}})},"resultChange"),sort:t(a=>{d({type:"CT_TOPUP_REQUEST_FILTER_DATA",payload:{sort:a}})},"sort")};return e.jsxs(L.Fragment,{children:[e.jsx("p",{className:"f_p-15 f_border-bottom f_mbm-1","data-key":"CP_Invest_StrategyDetail_TopUpFund_TXT_TopUpFundDesc",children:l?.CP_Invest_StrategyDetail_TopUpFund_TXT_TopUpFundDesc}),e.jsx("div",{className:"f_table_open",children:e.jsx("div",{className:"f_module-layout",children:e.jsx(ce,{onScroll:"f_table-scroll",header:T,data:E,sort:r?.sort,onSort:m.sort,onPageChange:t(a=>m.onPageChange(a),"onPageChange"),onPagination:t(a=>m.resultChange(a),"onPagination"),totalRecords:s,PageNumber:r?.PageNumber,PageSize:r?.PageSize,dataLoading:S,className:"f_cp-table f_table-sticky-header f_table-sticky-first f_table-sticky-last ",showResultTitle:l?.CP_Common_Pagination_LBL_Showing_results,"data-result-key":"CP_Common_Pagination_LBL_Showing_results",noData:!S&&e.jsx(ie,{image:`${oe}/images/no-data-found/default-image.svg`,heading:l?.TXT_DataNotFound,description:l?.TXT_ExistingAccountsList_Descr,"data-headingKey":"TXT_DataNotFound","data-descriptionKey":"TXT_ExistingAccountsList_Descr"})})})})]})}),aa=L.memo(l=>{const p=H(),d=$()?.languageResources,[r,S]=o.useState(""),[E,N]=o.useState(null),[s,b]=o.useState({data:[],loader:!0}),D=t(async()=>{b({loader:!0,data:[]});try{const n=await ke(Le.Published);n?.result?.Status===k.SUCCESS?b({loader:!1,data:Y(n?.result?.Data[0]?.Data)}):b({loader:!1,data:[]})}catch(n){console.log("error",n),b({loader:!1,data:[]})}},"getStatus");o.useEffect(()=>{s?.data?.length===0&&D()},[]);const x={search:t(n=>{S(n),l?.setPage(1)},"search"),changeFilter:t(n=>{N(n),p({type:"CT_UN_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{StatusType:n?.value}})},"changeFilter")};return fe(()=>{p({type:"CT_UN_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{Search:r,PageNumber:1}}),l?.setPage(1)},[r],Se.DE_BOUNCING_TIME_OUT),e.jsx(L.Fragment,{children:e.jsxs("div",{className:"f_row",children:[e.jsx("div",{className:"f_col-6 f_col-md-4 f_col-lg-3 f_col-xl-2",children:e.jsx(Z,{label:d?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",options:s?.data,isSearchable:!0,isClearable:!0,isLoading:s?.loader,value:E,onChange:t(n=>x.changeFilter(n),"onChange")})}),e.jsx("div",{className:"f_col-6 f_col-md-4 f_col-lg-4 f_col-xl-3 f_open-search f_pt-16",children:e.jsx(Vt,{placeholder:d?.TXT_Generic_Search,search:r,onSearch:t(n=>x.search(n),"onSearch"),className:"f_full-width f_ml-0","data-key":"TXT_Generic_Search"})})]})})}),sa=L.memo(()=>{const l=$()?.languageResources,{subscribedstrategId:p}=le(),d=H(),r=V(c=>c?.copyTrading?.ctUnSubscriptionRequestFilter),S=V(c=>c?.copyTrading?.ctUnSubscriptionRequestLoader),[E,N]=o.useState([]),[s,b]=o.useState({flag:!1,data:null}),[D,x]=o.useState(!1),[n,T]=o.useState(0),[m,a]=o.useState(1),f=t(async()=>{d({type:"SET_CT_UN_SUBSCRIPTION_REQUEST_LOADER",payload:!0});let c=r?.sort?.SortColumn||Object.keys(r?.sort)[0],g=r?.sort?.SortOrder||r?.sort[c];const M={PageNumber:r?.PageNumber,PageSize:r?.PageSize,StrategyId:p,StatusType:r?.StatusType||null,Search:r?.Search||null,SortColumn:c,SortOrder:g},_=await vt(M);_?.result?.Status===k.SUCCESS?(N(_?.result?.Data?.Data),T(_?.result?.Data?.Pagination?.TotalRecord),d({type:"SET_CT_UN_SUBSCRIPTION_REQUEST_LOADER",payload:!1})):(A.error(_?.result?.Message),d({type:"SET_CT_UN_SUBSCRIPTION_REQUEST_LOADER",payload:!1}))},"GetUnsubscriptionRequestList");o.useEffect(()=>{f()},[r,m]);const F=t(c=>l?.[U?.find(g=>g.value===c)?.key],"getApprovalStatus"),j={getStatus:t(c=>{if(c?.BOUnSubscribeAprrovalStatus===0)return e.jsx(W,{"data-key":U?.find(g=>g.value===0)?.key,name:F(0),bgColor:C.green,textColor:C.white,type:"linear"});if(c?.BOUnSubscribeAprrovalStatus===1)return e.jsx(W,{"data-key":U?.find(g=>g.value===1)?.key,name:F(1),bgColor:C.yellow,textColor:C.black,type:"linear"});if(c?.BOUnSubscribeAprrovalStatus===2)return e.jsx(W,{"data-key":U?.find(g=>g.value===2)?.key,name:F(2),bgColor:C.red,textColor:C.black,type:"linear"})},"getStatus"),approveReject:t(async c=>{c.preventDefault(),x(!0);const g={StatusId:s?.data?.type==="approve"?ae?.Approved:ae?.Rejected,SubscriptionId:s?.data?.SubscriptionId};try{const M=await Ft(g);M?.result?.Status===k.SUCCESS?(b({flag:!1,data:null}),A.success(M?.result?.Message),x(!1),f()):(A.error(M?.result?.Message),x(!1))}
1catch(M){console.log("error",M),A.error(M),x(!1)}},"approveReject")},y=o.useMemo(()=>[{visible:!0,title:l?.TXT_RequestBy,"data-key":"TXT_RequestBy",keyName:"UserName",sort:!0,cellWidth:200,render:t(c=>e.jsx("span",{children:c?.UserName}),"render")},{visible:!0,title:l?.TXT_AccountNumber,"data-key":"TXT_AccountNumber",keyName:"INVAccountNumber",sort:!1,render:t(c=>e.jsx("span",{children:c?.INVAccountNumber}),"render")},{visible:!0,title:l?.CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn,"data-key":"CP_ManagedAccount_FundManagerPartialWithdrawRequest_TXT_RequestOn",keyName:"UnFollowedRequestDate",sort:!0,render:t(c=>e.jsx("span",{children:c?.UnFollowedRequestDate===null?"N/A":se(c?.UnFollowedRequestDate).format(re.FULL_DATE_SEC_TIME)}),"render")},{visible:!0,title:l?.TXT_Generic_Status,"data-key":"TXT_Generic_Status",keyName:"BOApprovalStatus",sort:!0,render:t(c=>e.jsx("span",{children:j.getStatus(c)}),"render")},{visible:!0,title:l?.TXT_Actions,"data-key":"TXT_Actions",keyName:"Actions",sort:!1,showHideColumns:null,render:t(c=>e.jsx("div",{className:"f_flex-align f_content-end",children:c?.BOUnSubscribeAprrovalStatus===ae?.Pending&&e.jsxs(L.Fragment,{children:[e.jsx(ge,{text:l?.TXT_GENERIC_APPROVE,onClick:t(()=>b({flag:!0,data:{...c,type:"approve"}}),"onClick"),children:e.jsx(Ie,{size:"14",color:C.iconColor})}),e.jsx(ge,{className:"f_ml-10",text:l?.TXT_Reject,onClick:t(()=>b({flag:!0,data:{...c,type:"reject"}}),"onClick"),children:e.jsx(De,{size:"14",color:C.iconColor})})]})}),"render")}],[]),v={onPageChange:t(()=>{document.querySelector(".f_table-scroll")?.scrollIntoView({behavior:"smooth"})},"onPageChange"),resultChange:t(c=>{d({type:"CT_UN_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{PageNumber:c.PageNumber,PageSize:c.PageSize}})},"resultChange"),sort:t(c=>{d({type:"CT_UN_SUBSCRIPTION_REQUEST_FILTER_DATA",payload:{sort:c}})},"sort")};return e.jsxs(L.Fragment,{children:[e.jsxs("div",{className:"f_mt-20",children:[e.jsx("p",{className:"f_mb-15","data-key":"CP_CopyTrade_StrategyDetail_UnsubscriptionDesc",children:l?.CP_CopyTrade_StrategyDetail_UnsubscriptionDesc}),e.jsx(aa,{setPage:a}),e.jsx("div",{className:"f_table_open f_mt-15",children:e.jsx("div",{className:"f_module-layout",children:e.jsx(ce,{onScroll:"f_table-scroll",header:y,data:E,sort:r?.sort,onSort:v.sort,onPageChange:t(c=>v.onPageChange(c),"onPageChange"),onPagination:t(c=>v.resultChange(c),"onPagination"),totalRecords:n,PageNumber:r?.PageNumber,PageSize:r?.PageSize,dataLoading:S,className:"f_cp-table f_table-sticky-header f_table-sticky-first f_table-sticky-last ",showResultTitle:l?.CP_Common_Pagination_LBL_Showing_results,"data-result-key":"CP_Common_Pagination_LBL_Showing_results",noData:!S&&e.jsx(ie,{image:`${oe}/images/no-data-found/default-image.svg`,heading:l?.TXT_DataNotFound,description:l?.TXT_ExistingAccountsList_Descr,"data-headingKey":"TXT_DataNotFound","data-descriptionKey":"TXT_ExistingAccountsList_Descr"})})})})]}),s?.flag&&e.jsx(me,{open:s?.flag,className:"",maxWidth:"100%",modal:!1,closeIcon:!0,onClose:t(()=>b({flag:!1,data:null}),"onClose"),loading:D,icon:e.jsx(pe,{size:"30",color:C.yellow}),headingTitle:l?.TXT_PartialWithdrawalRequest,"heading-key":"TXT_PartialWithdrawalRequest",description:s?.data?.type==="approve"?l?.TXT_PartialWithdrawal_Confirm_Desc_Approve:l?.TXT_PartialWithdrawal_Confirm_Desc_Reject,"description-key":s?.data?.type==="approve"?"TXT_PartialWithdrawal_Confirm_Desc_Approve":"TXT_PartialWithdrawal_Confirm_Desc_Reject",closeBtnName:l?.TXT_No,"close-btn-key":"TXT_No",closeBtnClick:t(()=>b({flag:!1,data:null}),"closeBtnClick"),saveBtnName:l?.TXT_Generic_YES,"save-btn-key":"TXT_Generic_YES",saveBtnClick:t(c=>j.approveReject(c),"saveBtnClick")})]})}),ra=L.memo(l=>{const p=le(),{modalFlag:d,handleClose:r}=l,S=H(),[E,N]=o.useState(!1),[s,b]=o.useState(null),[D,x]=o.useState({loader:!1,data:[]}),[n,T]=o.useState(!1),m=$()?.languageResources,[a,f]=o.useState({StrategyTypeId:0,StrategyId:0,StrategyName:"",PublisherName:"",stType:null,IsPrivate:!1,PasswordProtected:!1,StrategyDescription:"",TradingType:null,AccountId:null,FeeSettlementAccountId:null,MinimumDeposit:0,MasterRawPF:0,AgentRawPF:0,FeeSettlementDay:0,InvestmentSettlementMethod:0,SubscriptionFee:0,SubscriptionFeeType:null,SubscriptionFeePeriodic:null,StrategyRemark:"",chkCopyStrategyTermandCondition:!1});o.useEffect(()=>{F(),j()},[]);const F=t(async()=>{S({type:"SET_CT_STRATEGY_DETAIL_LOADER",payload:!0});const _={StrategyId:p?.subscribedstrategId},u=await At(_);u?.result?.Status===k.SUCCESS?(f(u?.result?.Data),S({type:"SET_CT_STRATEGY_DETAIL_LOADER",payload:!1})):(A.error(u?.result?.Message),S({type:"SET_CT_STRATEGY_DETAIL_LOADER",payload:!1}))},"getStrategyData"),j=t(async()=>{const _={StrategyId:p?.subscribedstrategId},u=await Nt(_);u?.result?.Status===k.SUCCESS?b(u?.result?.Data):A.error(u?.result?.Message)},"getPreStrategyList");o.useEffect(()=>{if(a?.IsShowOpenTradesToInvetor&&D?.length===0){x({loader:!0,data:[]});async function _(){const u=await Xt();u?.result?.Status===k.SUCCESS?x({loader:!1,data:Y(u?.result?.Data||[])}):console.error("not fetching SSO provider data")}t(_,"GetOpenTradeIntervalTimeList"),_()}},[a?.IsShowOpenTradesToInvetor]);const y=je(),v=o.useRef(new Pe({element:t(_=>e.jsx("div",{className:"f_error_message",children:_}),"element"),autoForceUpdate:{forceUpdate:y}})),c={change:t((_,u)=>{let P=_.target.value;if(u==="MinimumDeposit"){if(!/^\d*\.?\d*$/.test(P))return;const[B="",K=""]=P.split(".");if(B.length>14||K.length>2)return;f({...a,[u]:P})}else f({...a,[u]:P})}
1,"change"),checkboxChange:t((_,u)=>{f({...a,[u]:_.target.checked})},"checkboxChange"),changeSelect:t((_,u)=>{f({...a,[u]:_})},"changeSelect"),close:t(()=>{r()},"close"),updateStrategy:t(async _=>{if(_.preventDefault(),N(!0),v?.current?.allValid()){let u={StrategyId:a?.StrategyId,StrategyDescription:a?.StrategyDescription,StrategyName:a?.StrategyName,PublisherName:a?.PublisherName,AccountId:a?.AccountId,PerformanceFee:a?.PerformanceFee,MinimumDeposit:a?.MinimumDeposit,TradingType:a?.TradingType,StrategyTypeId:a?.StrategyTypeId,PasswordProtected:a?.PasswordProtected,SubscriptionFee:a?.SubscriptionFee,SubscriptionFeeType:a?.SubscriptionFeeType,SubscriptionFeePeriodic:a?.SubscriptionFeePeriodic,IsShowNoofInvester:a?.IsShowNoofInvester,IsShowInvestmentAmount:a?.IsShowInvestmentAmount,IsShowOpenTradesToInvetor:a?.IsShowOpenTradesToInvetor,IsShowClosedTradesToInvetor:a?.IsShowClosedTradesToInvetor,IsSendDailyStatement:a?.IsSendDailyStatement,IsHideTradesInStatement:a?.IsHideTradesInStatement,OnlyLiveInvestors:a?.OnlyLiveInvestors,OpenTradeTimeInterval:a?.OpenTradeTimeInterval};console.log("data",u);try{const P=await It(u);P?.result?.Status===k.SUCCESS?(N(!1),r(),A.success(P?.result?.Message)):(N(!1),A.error(P?.result?.Message))}catch(P){console.log("error",P),N(!1),A.error(P)}}else N(!1),v?.current?.showMessages(),ye()},"updateStrategy")},g=Ze.map(_=>({..._,label:m?.[_?.key],value:_?.value})),M=et.map(_=>({..._,label:m?.[_?.label],value:_?.value}));return e.jsx(L.Fragment,{children:e.jsx(Ee,{className:"f_add-Strategy-modal f_side-modal-full-view f_side-modal-mobile-full-view",id:"ct-edit-strategy-sidepanel",open:d,modal:!1,position:"right",onClose:t(()=>c.close(),"onClose"),closeOnOutsideClick:!1,closeOnDocumentClick:!1,closeOnEscape:!1,headerClassName:"f_one-line",header:e.jsxs("h4",{"data-key":"TXT_EditStrategy",children:[m?.TXT_EditStrategy," ",e.jsx("br",{})," ",e.jsx("span",{className:"f_font-small f_text-white f_mt-3 f_block f_one-line",children:a?.StrategyName})]}),footer:l?.viewDetails?null:e.jsxs("div",{className:"f_row f_justify-content-center",children:[e.jsx("div",{className:"f_col-auto",children:e.jsx(ne,{disabled:E,isLoading:E,extraSmall:!0,name:m?.TXT_Update,"data-key":"TXT_Update",variant:"solid",onClick:t(_=>c.updateStrategy(_),"onClick")})}),e.jsx("div",{className:"f_col-auto",children:e.jsx(ne,{disabled:E,extraSmall:!0,name:m?.TXT_Generic_Cancel,"data-key":"TXT_Generic_Cancel",variant:"linear",onClick:t(()=>c.close(),"onClick")})})]}),children:e.jsx("div",{className:"f_h-full",children:e.jsx("div",{className:"f_add_strategy-modal",children:e.jsx("div",{className:"f_add_strategy-wrap",children:e.jsx("form",{id:"f_add-strategy-form-wrap",children:e.jsx("div",{className:"f_container",children:e.jsxs("div",{className:"f_row f_content-center",children:[e.jsx("div",{className:"f_col-f_col-12 f_col-md-4 f_col-lg-4 f_input-margin",children:e.jsxs("div",{className:"f_common-block-strategy f_h-full",children:[e.jsx("div",{className:"f_strategy-title mb-3",children:e.jsx("h4",{className:"f_mb-16 f_pb-8","data-key":"CP_Invest_CreateMAMStrategy_Strategy_Definition",children:m?.CP_Invest_CreateMAMStrategy_Strategy_Definition})}),e.jsx("div",{className:"f_strategy-profile-block",children:e.jsxs("div",{className:"f_row f_gutters-10",children:[e.jsx("div",{className:"f_col-12 f_input-margin",children:e.jsx(O,{label:m?.CP_TradersDashboard_Analytics_TradingList_TXT_StrategyDescription,"data-key":"CP_TradersDashboard_Analytics_TradingList_TXT_StrategyDescription",oneLineLabel:!0,asterisk:!1,hasError:v?.current?.message("StrategyDescription",a?.StrategyDescription,"max:1500"),children:e.jsx("textarea",{className:"f_comment-text",name:"StrategyDescription",maxLength:1500,value:a?.StrategyDescription,rows:"3",cols:"20",onChange:t(_=>c.change(_,"StrategyDescription"),"onChange")})})}),e.jsx("div",{className:"f_col-12 f_input-margin",children:e.jsx(O,{label:m?.TXT_STRATEGYNAME,"data-key":"TXT_STRATEGYNAME",oneLineLabel:!0,asterisk:!1,children:e.jsx("input",{type:"text",placeholder:" ",name:"strategyName",value:a?.StrategyName,onChange:t
1(_=>c.change(_,"strategyName"),"onChange"),autoComplete:"off",disabled:!0,maxLength:500})})}),e.jsx("div",{className:"f_col-12 f_input-margin",children:e.jsx(O,{label:m?.Txt_PublisherName,"data-key":"Txt_PublisherName",oneLineLabel:!0,asterisk:!1,hasError:v?.current?.message("PublisherName",a?.PublisherName,"required"),children:e.jsx("input",{type:"text",placeholder:" ",name:"PublisherName",value:a?.PublisherName,onChange:t(_=>c.change(_,"PublisherName"),"onChange"),autoComplete:"off",maxLength:100})})}),e.jsx("div",{className:"f_col-12 f_input-margin",children:e.jsx(O,{label:m?.StrategyAccount,"data-key":"StrategyAccount",select:!0,hasError:v?.current?.message("AccountId",de(Y(s?.AccountList||[]),a?.AccountId),"required"),children:e.jsx(Z,{asterisk:!0,options:Y(s?.AccountList||[]),isSearchable:!1,disabled:!0,name:"AccountId",value:de(Y(s?.AccountList||[]),a?.AccountId)||null,onChange:t(_=>c.changeSelect(_?.value,"AccountId"),"onChange")})})}),a?.StrategyTypeId==Ae?.SocialTrading&&e.jsx("div",{className:"f_col-12 f_input-margin f_hidden",children:e.jsx(O,{label:m?.CP_Invest_AccountGraph_TXT_PerformanceFee,"data-key":"CP_Invest_AccountGraph_TXT_PerformanceFee",oneLineLabel:!0,asterisk:!1,children:e.jsx("input",{type:"text",placeholder:" ",name:"PerformanceFee",value:a?.PerformanceFee,readOnly:!0})})}),e.jsx("div",{className:"f_col-12 f_input-margin",children:e.jsx(O,{label:m?.CP_Invest_MySubscription_FollowMAMStrategy_TXT_MinimumDeposit,"data-key":"CP_Invest_MySubscription_FollowMAMStrategy_TXT_MinimumDeposit",oneLineLabel:!0,asterisk:!1,hasError:v?.current?.message("MinimumDeposit",a?.MinimumDeposit,"required|numeric"),children:e.jsx("input",{type:"number",placeholder:" ",name:"MinimumDeposit",value:a?.MinimumDeposit,onChange:t(_=>c.change(_,"MinimumDeposit"),"onChange"),autoComplete:"off",onKeyDown:t(_=>["e","E","+","-"].includes(_.key)&&_.preventDefault(),"onKeyDown")})})}),e.jsx("div",{className:"f_col-12 f_input-margin f_hidden",children:e.jsx(O,{label:m?.TXT_Type,"data-key":"TXT_Type",select:!0,oneLineLabel:!0,children:e.jsx(Z,{isDisabled:!0,options:Y(s?.TradingType||[]),name:"TradingType",value:de(Y(s?.TradingType||[]),a?.TradingType)})})}),e.jsx("div",{className:"f_col-12 f_input-margin f_hidden",children:e.jsx(O,{label:m?.TXT_SubscriptionFee,"data-key":"TXT_SubscriptionFee",oneLineLabel:!0,asterisk:!1,children:e.jsx("input",{type:"text",placeholder:" ",name:"SubscriptionFee",value:a?.SubscriptionFee,readOnly:!0})})}),e.jsx("div",{className:"f_col-12 f_input-margin f_hidden",children:e.jsx(O,{label:m?.TXT_Generic_Type,"data-key":"TXT_Generic_Type",select:!0,oneLineLabel:!0,children:e.jsx(Z,{isDisabled:!0,options:g,name:"SubscriptionFeeType",value:de(g,a?.SubscriptionFeeType)})})}),e.jsx("div",{className:"f_col-12 f_input-margin f_hidden",children:e.jsx(O,{label:m?.CRM_Customer_StrategyDetail_ManagementFeePeriodic,"data-key":"CRM_Customer_StrategyDetail_ManagementFeePeriodic",select:!0,oneLineLabel:!0,children:e.jsx(Z,{isDisabled:!0,options:M,name:"SubscriptionFeePeriodic",value:de(M,a?.SubscriptionFeePeriodic)})})}),a?.PasswordProtected&&e.jsx("div",{className:"f_col-12 f_input-margin f_hidden",children:e.jsxs(O,{label:m?.PasswordProtected,"data-key":"PasswordProtected",isIcon:!0,oneLineLabel:!0,asterisk:!1,children:[e.jsx("input",{type:n?"text":"password",placeholder:" ",name:"PasswordProtected",value:a?.PasswordProtected,onChange:t(_=>c.change(_,"PasswordProtected"),"onChange"),autoComplete:"off",maxLength:"20"}),e.jsx("div",{className:"f_right-icon f_lh-0 f_cp",children:e.jsx(We,{params:{className:"f_tooltip",arrowStyle:{color:"#000000"}},desc:e.jsx("span",{"data-key":n?"TXT_HIDE_PASSWORD":"TXT_SHOW_PASSWORD",children:n?m?.TXT_HIDE_PASSWORD:m?.TXT_SHOW_PASSWORD}),children:e.jsx("span",{className:"",onClick:t(()=>T(!n),"onClick"),children:n?e.jsx("p",{className:"",children:e.jsx(at,{color:C.iconColor})}):e.jsx("p",{className:"",children:e.jsx(tt,{color:C.iconColor})})})})})]})})]})})]})}),e.jsx("div",{className:"f_col-f_col-12 f_col-md-4 f_col-lg-4 f_input-margin",children:e.jsxs("div",{className:"f_common-block-strategy f_h-full",children:[e.jsx("div",{className:"f_strategy-title mb-3",children:e.jsx("h4",{className:"f_mb-16 f_pb-8","data-key":"CP_Invest_CreateMAMStrategy_TXT_LeaderBoard_Configuration",children:m?.CP_Invest_CreateMAMStrategy_TXT_LeaderBoard_Configuration})}),e.jsx("div",{id:"f_prependLeaderConfiguration",children:e.jsx("div",{className:"f_leaderconfiguration-block f_strategy-fees-block f_fees-block",children:e.jsxs("div",{className:"f_row f_gutters-10",children:[e.jsx("div",{className:"f_col-12",children:e.jsxs("div",{className:"f_flex f_align-center f_content-between",children:[e.jsxs("p",{"data-key":"CP_Invest_CreateMAMStrategy_Show_No_of_Invester",children:[m?.CP_Invest_CreateMAMStrategy_Show_No_of_Invester," :"," "]}),e.jsx("div",{className:"f_leaderboard_action-wrap f_flex f_align-center",children:e.jsx(ue,{label:"",id:"IsShowNoofInvester",htmlFor:"IsShowNoofInvester",checked:a?.IsShowNoofInvester,onChange:t
1(_=>c.checkboxChange(_,"IsShowNoofInvester"),"onChange")})})]})}),e.jsx("div",{className:"f_col-12",children:e.jsxs("div",{className:"f_flex f_align-center f_content-between",children:[e.jsxs("p",{"data-key":"Txt_IsShowInvestmentAmount",children:[m?.Txt_IsShowInvestmentAmount," : "]}),e.jsx("div",{className:"f_leaderboard_action-wrap f_flex f_align-center",children:e.jsx(ue,{label:"",id:"IsShowInvestmentAmount",htmlFor:"IsShowInvestmentAmount",checked:a?.IsShowInvestmentAmount,onChange:t(_=>c.checkboxChange(_,"IsShowInvestmentAmount"),"onChange")})})]})}),e.jsxs("div",{className:"f_col-12 f_hidden",children:[e.jsxs("div",{className:"f_flex f_align-center f_content-between",children:[e.jsx("p",{"data-key":"CP_Invest_CreateMAMStrategy_Show_No_of_Invester",children:m?.CP_Invest_CreateMAMStrategy_Show_No_of_Invester}),e.jsxs("div",{className:"f_leaderboard_action-wrap f_flex f_align-center",children:[e.jsx(ue,{label:"",id:"IsShowOpenTradesToInvetor",htmlFor:"IsShowOpenTradesToInvetor",checked:a?.IsShowOpenTradesToInvetor,onChange:t(_=>c.checkboxChange(_,"IsShowOpenTradesToInvetor"),"onChange")}),D?.loader&&e.jsx(Ve,{iconSize:"16",className:"f_relative f_ml-5"})]})]}),!!(a?.IsShowOpenTradesToInvetor&&D?.data.length)&&e.jsxs("div",{className:"f_flex f_align-center f_flex-wrap f_pt-20",children:[e.jsx("p",{className:"f_mb-10","data-key":"CP_ManagedAccount_AddBinanceStrategyUI_TXT_TimInterval_Desc",children:m?.CP_ManagedAccount_AddBinanceStrategyUI_TXT_TimInterval_Desc}),e.jsx("div",{className:"f_w-50",children:e.jsx(Z,{label:m?.CP_ManagedAccount_AddBinanceStrategyUI_LBL_OpenTradeTimeInterval,"data-key":"CP_ManagedAccount_AddBinanceStrategyUI_LBL_OpenTradeTimeInterval",options:D?.data,isSearchable:!0,isClearable:!1,value:a?.OpenTradeTimeInterval,onChange:t(_=>c.changeSelect(_?.value,"OpenTradeTimeInterval"),"onChange")})})]})]}),e.jsx("div",{className:"f_col-12 f_hidden",children:e.jsxs("div",{className:"f_flex f_align-center f_content-between",children:[e.jsxs("p",{"data-key":"Txt_IsShowClosedTradesToInvetor",children:[m?.Txt_IsShowClosedTradesToInvetor," : "]}),e.jsx("div",{className:"f_leaderboard_action-wrap f_flex f_align-center",children:e.jsx(ue,{label:"",id:"IsShowClosedTradesToInvetor",htmlFor:"IsShowClosedTradesToInvetor",checked:a?.IsShowClosedTradesToInvetor,onChange:t(_=>c.checkboxChange(_,"IsShowClosedTradesToInvetor"),"onChange")})})]})}),e.jsx("div",{className:"f_col-12 f_hidden",children:e.jsx(Re,{label:m?.AllowDemoSubscribers,"data-key":"AllowDemoSubscribers",id:"OnlyLiveInvestors",htmlFor:"OnlyLiveInvestors",disabled:!0,checked:a?.OnlyLiveInvestors,onChange:t(_=>c.checkboxChange(_,"OnlyLiveInvestors"),"onChange")})})]})})})]})})]})})})})})})})})}),la=L.memo(l=>{const{modalFlag:p,handleClose:d,strategyData:r,loader:S}=l,E=ze(),N=dt(),s=$()?.languageResources,[b,D]=o.useState(!1),[x,n]=o.useState(null),[T,m]=o.useState({flag:!1,data:null}),[a,f]=o.useState({AllocateAmount:"0.00",FundSourceAccountId:null,LotAllocationMethodId:null,chkFollowStrategy:!1}),[F,j]=o.useState({flag:!0,data:[]}),[y,v]=o.useState({loader:!0,options:[]}),[c,g]=o.useState({loader:!1,amount:null}),[M,_]=o.useState({loader:!1,data:null}),[u,P]=o.useState(null),[B,K]=o.useState(!1),[_e,R]=o.useState(!1),X=je(),Q=o.useRef(new Pe({validators:{TopupAmount:{message:":attribute is invalid",rule:t((i,I,h)=>{const w=i?.toString().trim();if(w===""||i===null||i===void 0)return h.messagesTopUpAmount=s?.ERR_AllocateAmount,!1;const G=parseFloat(i);return isNaN(G)?(h.messagesTopUpAmount=s?.ERR_AllocateAmount,!1):G===0&&(!w.includes(".")||w==="0.00")?(h.messagesTopUpAmount="The field topUpAmount must be between 1 and 9999999999999.99.",!1):G===0&&w.includes(".")&&w.split(".")[1]?.length>2||w.includes(".")&&(w.split(".")[1]?.length||0)>2?(h.messagesTopUpAmount=s?.CRM_Datasource_ManageLeadDemoAccountSettings_ERR_Amount_decimal,!1):!0},"rule"),required:!0}},autoForceUpdate:{forceUpdate:X},element:t(i=>e.jsx("div",{className:"f_error_message",children:i}),"element")})),we=t(async()=>{try{const i=await jt(r?.StrategyDetail?.StrategyId);i?.result?.Status===k.SUCCESS?P(i?.result?.Data):P(null)}catch(i){console.error("error",i),P(null)}},"GetLegalDocumentUrl"),he=t(async()=>{try{const i=await Dt(r?.StrategyDetail?.StrategyId);i?.result?.Status===k.SUCCESS?j({data:Y(i?.result?.Data),loader:!1}):j({data:[],loader:!1})}catch(i){console.error("error",i),j({data:[],loader:!1})}},"GetAllFundSource"),Me=t(async()=>{try{const i=await Ot(2);i?.result?.Status===k.SUCCESS?v({data:Y(i?.result?.Data),loader:!1}):v({data:[],loader:!1})}catch(i){console.error("error",i),v({data:[],loader:!1})}},"GetLotAllocationMethod"),Fe=t(async()=>{try{const i=await Ut(rt.SocialTrading);i?.result?.Status===k.SUCCESS?n(i?.result?.Data):n(null)}catch(i){console.error("error",i),n(null)}},"GetExplanationDocument");o.useEffect(()=>{Me(),Fe()},[]),o.useEffect(()=>
1{r?.StrategyDetail?.StrategyId&&(he(),we())},[r?.StrategyDetail?.StrategyId]);const Xe=t(async i=>{g({amount:null,loader:!0}),_({loader:!0,data:null});const I=await zt(i);if(I?.result?.Status===k.SUCCESS){g({amount:I?.result?.Data,loader:!1}),f(w=>({...w,AllocateAmount:I?.result?.Data?.AccountDetail?.Balance||0}));let h={FundSource:I?.result?.Data?.WalletDetail?.WalletId,BaseCurrency:r?.StrategyDetail?.BaseCurrency,IsWallet:!0};try{_({loader:!0,data:null});const w=await Bt(h);w?.result?.Status===k.SUCCESS?_({loader:!1,data:w?.result?.Data}):_({loader:!1,data:null})}catch(w){console.error("Error fetching Data:",w)}}else g({amount:null,loader:!1}),A.error(I?.result?.Message)},"getWalletAccountDetails"),Oe=t(i=>{const I=parseInt(i.value);f({...a,LotAllocationMethodId:i});let h="";I==q.Multiplier_CopyTrading?h="1":(I==q.FIX_Lot_CopyTrading||I==q.Balance_CopyTrading||I==q.Equity_CopyTrading)&&(h="0.01"),f(w=>({...w,Multiplier:h}))},"handleLotAllocationMethodChange"),ee={change:t((i,I)=>{let h=i.target.value;h.includes(".")&&h.split(".")[1]?.length>2||f({...a,[I]:h})},"change"),changeCheckBox:t((i,I)=>{f({...a,[I]:i.target.checked}),I=="chkFollowStrategy"&&(i.target.checked?R(!1):R(!0))},"changeCheckBox"),selectChange:t((i,I)=>{if(i){const h=i?.label.match(/\(([^)]+)\)/),w=h?h[1]:"";let G={...i,currency:w};f({...a,[I]:G});let z=i?.value?.split(",")[0];Xe(z)}},"selectChange"),close:t(()=>{d()},"close"),openConfirmModal:t(i=>{i.preventDefault(),a?.chkFollowStrategy===!1&&R(!0),Q?.current?.allValid()&&a?.chkFollowStrategy?m({flag:!0,data:null}):(m({flag:!1,data:null}),Q?.current?.showMessages(),ye())},"openConfirmModal"),subscribeStrategies:t(async i=>{if(i.preventDefault(),a?.LotAllocationMethodId===q.FIX_Lot_CopyTrading&&(parseFloat(a?.Multiplier)<.01||parseFloat(a?.Multiplier)>100)){A.error(s?.CP_CopyTrading_StrategyDetails_ERR_Fixed_Allocation);return}if(a?.LotAllocationMethodId===q.Multiplier_CopyTrading&&(parseFloat(a?.Multiplier)<1||parseFloat(a?.Multiplier)>100)){A.error(s?.CP_CopyTrading_StrategyDetails_ERR_Multiplier_Allocation);return}if((a?.LotAllocationMethodId===q.Balance_CopyTrading||a?.LotAllocationMethodId===q.Equity_CopyTrading)&&(parseFloat(a?.Multiplier)<0||parseFloat(a?.Multiplier)>100)){A.error(s?.CP_CopyTrading_StrategyDetails_ERR_Balance_Allocation);return}if(a?.chkFollowStrategy===!1){A.error(s?.CP_Invest_AddCopyTradingStrategy_ERR_Termsandcondition_select),R(!0);return}if(D(!0),Q?.current?.allValid()&&a?.chkFollowStrategy){let I={StrategyId:r?.StrategyDetail?.StrategyId,SubscriberIPAddress:null,BaseCurrency:r?.StrategyDetail?.BaseCurrency,PerformanceFee:r?.StrategyDetail?.PerformanceFee,SubscriptionFeeType:r?.StrategyDetail?.SubscriptionFeeType,LotAllocationMethodId:a?.LotAllocationMethodId?.value,Multiplier:a?.Multiplier,IsInvestorCopy:a?.ShowInvestorCopycustomSwitch||r?.StrategyDetail?.IsInvestorCopy,ShowInvestorCopycustomSwitch:a?.ShowInvestorCopycustomSwitch,FundSourceAccountId:a?.FundSourceAccountId?.value?.split(",")[0],IsWallet:a?.FundSourceAccountId?.value?.split(",")[1]==="1",AllocateAmount:a?.AllocateAmount||0,chkFollowStrategy:a?.chkFollowStrategy};try{const h=await Pt(I,"203.0.113.1");h?.result?.Status===k.SUCCESS?(A.success(h?.result?.Message),d(),r?.StrategyDetail?.StrategyTypeId===Ae.SocialTrading?N(`${Te.COPY_TRADING}/${Te.COPY_SUBSCRIBED_STRATEGIES}`):N(`${Te.MANAGED_ACCOUNT}/${Te.SUBSCRIBED_STRATEGIES}`)):A.error(h?.result?.Message)}catch(h){A.error(h)}finally{D(!1)}}else D(!1),Q?.current?.showMessages(),ye()},"subscribeStrategies"),viewExplanationDocument:t((i,I)=>{window.ReactNativeWebView.postMessage(JSON.stringify({type:"OPEN_FILE_IN_MODAL",url:I}))},"viewExplanationDocument")},Ce=t(i=>s?.[lt?.find(I=>I.value===i)?.key],"getApprovalStatus"),Ue=o.useMemo(()=>{if(!u?.length)return"";let i=[...u],I;return E?I=i.map(h=>{switch(h.Key){case te.CopyTradingCopyTradeAgreement:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingCopyTradeAgreement">${s?.Enum_LegalDocumentType_CopyTradingCopyTradeAgreement}</a>`;case te.CopyTradingTermAndCondition:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingTermAndCondition">${s?.Enum_LegalDocumentType_CopyTradingTermAndCondition}</a>`;case te.CopyTradingPrivacyPolicy:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingPrivacyPolicy">${s?.Enum_LegalDocumentType_CopyTradingPrivacyPolicy}</a>`;case te.CopyTradingRiskDisclosureStatement:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingRiskDisclosureStatement">${s?.Enum_LegalDocumentType_CopyTradingRiskDisclosureStatement}</a>`;default:return`<a href="${h.Value}" target="_blank" data-key="TXT_TermAndCondition">${s?.TXT_TermAndCondition}</a>`}}
1).filter(Boolean):I=i.map(h=>{switch(h.Key){case te.CopyTradingCopyTradeAgreement:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingCopyTradeAgreement">${s?.Enum_LegalDocumentType_CopyTradingCopyTradeAgreement}</a>`;case te.CopyTradingTermAndCondition:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingTermAndCondition">${s?.Enum_LegalDocumentType_CopyTradingTermAndCondition}</a>`;case te.CopyTradingPrivacyPolicy:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingPrivacyPolicy">${s?.Enum_LegalDocumentType_CopyTradingPrivacyPolicy}</a>`;case te.CopyTradingRiskDisclosureStatement:return`<a href="${h.Value}" target="_blank" data-key="Enum_LegalDocumentType_CopyTradingRiskDisclosureStatement">${s?.Enum_LegalDocumentType_CopyTradingRiskDisclosureStatement}</a>`;default:return`<a href="${h.Value}" target="_blank" data-key="TXT_TermAndCondition">${s?.TXT_TermAndCondition}</a>`}}).filter(Boolean),I.reduce((h,w,G)=>{if(G===0)return w;const Ge=G===I.length-1?` ${s?.TXT_Generic_And} `:", ";return h+Ge+w},"")},[u,s]),Be=o.useMemo(()=>{var i=q.FIX_Lot_CopyTrading,I=q.Multiplier_CopyTrading,h=q.Balance_CopyTrading,w=q.Equity_CopyTrading;let G="";return I==a?.LotAllocationMethodId?.value?(G=s?.CP_CopyTrading_StrategyDetails_TXT_Multiplier_Allocation,f(z=>({...z,Multiplier:"1"}))):i==a?.LotAllocationMethodId?.value?(G=s?.CP_CopyTrading_StrategyDetails_TXT_FixedLot_Allocation,f(z=>({...z,Multiplier:"0.01"}))):h==a?.LotAllocationMethodId?.value?(G=s?.CP_CopyTrading_StrategyDetails_TXT_Balance_Allocation,f(z=>({...z,Multiplier:"0.01"}))):w==a?.LotAllocationMethodId?.value?(G=s?.CP_CopyTrading_StrategyDetails_TXT_Equity_Allocation,f(z=>({...z,Multiplier:"0.01"}))):(G=s?.CP_CopyTrading_StrategyDetails_TXT_Multiplier_Allocation,f(z=>({...z,Multiplier:"1"}))),G},[s,a?.LotAllocationMethodId]);return e.jsxs(L.Fragment,{children:[e.jsx(Ee,{className:"f_side-modal-tab-mobile-view",id:"ct-subscribe-sidepanel",open:p,modal:!1,position:"right",customScroll:!0,onClose:t(()=>ee.close(),"onClose"),closeOnOutsideClick:!1,closeOnDocumentClick:!1,closeOnEscape:!1,headerClassName:"f_one-line",header:e.jsxs("h4",{"data-key":"TXT_subscribeStrategy",children:[s?.TXT_subscribeStrategy," ",e.jsx("br",{})," ",e.jsx("span",{className:"f_font-small f_text-white f_mt-3 f_block f_one-line",children:r?.StrategyDetail?.StrategyName})]}),footer:e.jsxs("div",{className:"f_row f_justify-content-center f_strategy-add-btn",children:[e.jsx("div",{className:"f_col-auto",children:e.jsx(ne,{disabled:b,extraSmall:!0,name:s?.TXT_Generic_Cancel,"data-key":"TXT_Generic_Cancel",variant:"linear",onClick:t(()=>ee.close(),"onClick")})}),e.jsx("div",{className:"f_col-auto",children:e.jsx(ne,{disabled:b,isLoading:b,extraSmall:!0,name:s?.TXT_Subscribe,"data-key":"TXT_Subscribe",variant:"solid",onClick:t(i=>ee.openConfirmModal(i),"onClick")})})]}),children:e.jsx("div",{className:"f_h-full",children:e.jsxs("form",{className:"f_partial-withdrawal-content",children:[e.jsx("div",{className:"f_input-margin",children:e.jsxs("ul",{className:"f_summary-layout f_summary-layout--responsive-md",children:[e.jsx("li",{children:e.jsxs("div",{className:"f_row",children:[e.jsx("div",{className:"f_col-6",children:e.jsxs("div",{className:"f_summary-layout__content",children:[e.jsx("h5",{className:"f_summary-layout__title",children:r?.StrategyDetail?.BaseCurrency}),e.jsx("span",{className:"f_summary-layout__text","data-key":"TXT_BaseCurrency",children:s?.TXT_BaseCurrency})]})}),e.jsx("div",{className:"f_col-6",children:e.jsxs("div",{className:"f_summary-layout__content",children:[e.jsx("h5",{className:"f_summary-layout__title",children:J(parseFloat(r?.StrategyDetail?.SubscriptionMinimumDeposite),"","",!1,!1,2)}),e.jsx("span",{className:"f_summary-layout__text","data-key":"CP_Invest_MySubscription_FollowMAMStrategy_TXT_MinimumDeposit",children:s?.CP_Invest_MySubscription_FollowMAMStrategy_TXT_MinimumDeposit})]})})]})}),e.jsx("li",{children:e.jsxs("div",{className:"f_row",children:[e.jsx("div",{className:"f_col-6",children:e.jsxs("div",{className:"f_summary-layout__content",children:[e.jsx("div",{className:"f_input-margin",children:e.jsxs("div",{className:"f_common-gray-box f_align-center f_content-between f_no-gutters f_row",children:[e.jsx("div",{className:"f_col",children:e.jsxs("div",{className:"f_flex-align",children:[e.jsx("p",{className:"small f_mr-5","data-key":"TXT_Label_PerformanceFEE",children:s?.TXT_Label_PerformanceFEE}),r?.StrategyDetail?.InvestmentSettlementMethod!==null&&e.jsx(xe,{loader:S,captionTitle:Ce(r?.StrategyDetail?.InvestmentSettlementMethod),strategyData:[{Key:r?.StrategyDetail?.InvestmentSettlementMethod}]})]})}),e.jsx("div",{className:"f_col-auto f_text-right",children:e.jsxs("div",{className:"f_align-center f_inline-flex",children:[e.jsx(W,{className:"f_ml-5",name:"%",bgColor:C.lightGray,textColor:C.black,type:"linear",style:{width:"30px",justifyContent:"center"}}),e.jsx("p",{className:"f_ml-5 f_font-w-600 small",children:r?.StrategyDetail?.PerformanceFee?.toFixed(2)})]})})]})}),e.jsx("div",{className:"f_input-margin",children:e.jsxs("div",{className:"f_common-gray-box f_align-center f_content-between f_no-gutters f_row",children:[e.jsx("div",{className:"f_col",children:e.jsxs("div",{className:"f_flex-align",children:[e.jsx("p",{className:"small f_mr-5","data-key":"TXT_SubscriptionFee",children:s?.TXT_SubscriptionFee}),r?.StrategyDetail?.SubscriptionFeePeriodic&&e.jsx(xe,{loader:S,captionTitle:Ce(r?.StrategyDetail?.SubscriptionFeePeriodic),strategyData:[{Key:r?.StrategyDetail?.SubscriptionFeePeriodic}]})]})}),e.jsx("div",{className:"f_col-auto f_text-right",children:e.jsxs("div",{className:"f_align-center f_inline-flex",children:[e.jsx(W,{className:"f_ml-5",name:r?.StrategyDetail?.SubscriptionFeeType===1?r?.StrategyDetail?.BaseCurrency:r?.StrategyDetail?.SubscriptionFeeType===2?"%":"",bgColor:C.lightGray,textColor:C.black,type:"linear",style:{width:"30px",justifyContent:"center"}}),e.jsx("p",{className:"f_ml-5 f_font-w-600 small",children:r?.StrategyDetail?.SubscriptionFee?.toFixed(2)})]})})]})}),e.jsxs("div",{className:"f_input-margin",children:[e.jsx(O,{select:!0,label:"",selectValue:a?.LotAllocationMethodId,hasError:Q?.current?.message("LotAllocationMethodId",a?.LotAllocationMethodId,"required"),
1children:e.jsx(Z,{isLoading:y?.loader,isDisabled:!1,label:s?.TXT_LotAllocationMethod,"data-key":"TXT_LotAllocationMethod",options:y?.data||[],isSearchable:!0,name:"LotAllocationMethodId",value:a?.LotAllocationMethodId,onChange:t(i=>Oe(i),"onChange")})}),x?.Value&&e.jsx("p",{className:"f_mt-5",children:e.jsx("a",{href:x?.Value,target:"_blank",className:"f_font-small f_td-underline f_cp f_text-primery",children:s?.CP_ManagedAccount_AddStrategyUI_LBL_Explanation_Document})})]}),e.jsx("div",{className:"f_input-margin",children:e.jsx(O,{label:Be,oneLineLabel:!0,children:e.jsx("input",{type:"number",placeholder:" ",value:a?.Multiplier,onChange:t(i=>ee.change(i,"Multiplier"),"onChange"),name:"Multiplier",autoComplete:"off",onKeyDown:t(i=>["e","E","+","-"].includes(i.key)&&i.preventDefault(),"onKeyDown")})})}),e.jsx("div",{className:"f_input-margin",children:e.jsxs("div",{className:"f_flex f_align-center f_content-between",children:[e.jsxs("p",{"data-key":"CP_CopyTrading_IsInvestorCopy",children:[s?.CP_CopyTrading_IsInvestorCopy,": "]}),e.jsx("div",{className:"f_leaderboard_action-wrap f_flex f_align-center",children:e.jsx(ue,{label:"",id:"ShowInvestorCopycustomSwitch",htmlFor:"ShowInvestorCopycustomSwitch",checked:a?.ShowInvestorCopycustomSwitch,onChange:t(i=>ee.changeCheckBox(i,"ShowInvestorCopycustomSwitch"),"onChange")})})]})})]})}),e.jsx("div",{className:"f_col-6",children:e.jsx("div",{className:"f_summary-layout__content",children:e.jsxs("div",{children:[e.jsxs("h4",{className:"f_mb-10","data-key":"TXT_FundingDetails",children:[s?.TXT_FundingDetails,":"," "]}),e.jsxs("div",{className:"f_input-margin",children:[e.jsx(O,{select:!0,label:"",selectValue:a?.FundSourceAccountId,hasError:Q?.current?.message("FundSourceAccountId",a?.FundSourceAccountId,"required"),children:e.jsx(Z,{isLoading:F?.loader,isDisabled:!1,label:s?.TXT_FundSource,options:F?.data||[],isSearchable:!0,name:"FundSourceAccountId",value:a?.FundSourceAccountId,onChange:t(i=>ee.selectChange(i,"FundSourceAccountId"),"onChange")})}),e.jsxs("div",{className:"f_mt-5 f_mb-5 f_flex-align",children:[e.jsx("div",{className:"f_flex-1 f_flex-align",children:e.jsx("span",{className:"f_font-small f_td-underline f_cp f_text-primery",onClick:t(()=>K(!0),"onClick"),"data-key":"CP_Invest_MySubscription_AddTopupAmount_BTN_LinkAccount",children:s?.CP_Invest_MySubscription_AddTopupAmount_BTN_LinkAccount})}),e.jsxs("div",{children:[e.jsxs("span",{className:"f_font-small","data-key":"TXT_BALANCE",children:[s?.TXT_BALANCE,":",e.jsxs("strong",{className:"f_ml-5",children:[c?.amount?.WalletDetail?.BaseCurrency," ",$e(c?.amount?.AccountDetail?.Balance||0,2)]})]}),c?.loader&&e.jsx("span",{className:"f_loading-indicator f_ib f_ml-5",style:{width:"14px",height:"14px"}})]})]})]}),e.jsx("div",{className:"f_input-margin",children:e.jsx(O,{label:s?.CP_Invest_MySubscription_FollowMAMStrategy_TXT_AllocateAmount,"data-key":"CP_Invest_MySubscription_FollowMAMStrategy_TXT_AllocateAmount",oneLineLabel:!0,asterisk:!0,hasError:Q.current?.message("AllocateAmount",a?.AllocateAmount,"required"),children:e.jsx("input",{type:"text",placeholder:" ",name:"AllocateAmount",value:a?.AllocateAmount,onChange:t(i=>ee.change(i,"AllocateAmount"),"onChange"),autoComplete:"off",readOnly:!0,disabled:!0,onKeyDown:t(i=>["e","E","+","-"].includes(i.key)&&i.preventDefault(),"onKeyDown")})})}),e.jsx("div",{className:"f_common-gray-box f_input-margin",children:e.jsxs("div",{className:"f_flex-align",children:[e.jsx("p",{className:"f_mr-5","data-key":"TXT_ExchangeRate",children:s?.TXT_ExchangeRate}),M?.loader?e.jsx("span",{className:"f_loading-indicator f_ib f_ml-5",style:{width:"14px",height:"14px"}}):e.jsx("h5",{children:a?.FundSourceAccountId?.value?`${Ke(a?.AllocateAmount*M?.data?.ExchangeRate,2)} ${a?.FundSourceAccountId?.currency} (1 ${M?.data?.BaseCurrency} = ${M?.data?.ExchangeRate} ${M?.data?.Currency})`:"00"})]})})]})})})]})})]})}),e.jsxs("div",{className:"f_input-margin f_pt-10",children:[e.jsx(Re,{label:`${s?.CP_ManagedAccount_FollowCopyTradingStrategy_LBL_AgreeInvement} ${Ue}`,"data-key":"CP_ManagedAccount_FollowCopyTradingStrategy_LBL_AgreeInvement",id:"chkFollowStrategy",htmlFor:"chkFollowStrategy",checked:a?.chkF
1ollowStrategy,onChange:t(i=>ee.changeCheckBox(i,"chkFollowStrategy"),"onChange")}),_e&&e.jsx("p",{className:"f_error f_mt-5","data-key":"TXT_Please_select_Terms_and_Conditions",children:s?.TXT_Please_select_Terms_and_Conditions})]}),e.jsx("div",{className:"f_input-margin",children:e.jsx("p",{className:"f_text-danger f_mt-10","data-key":"TXT_capital_risk_lose",children:s?.TXT_capital_risk_lose})}),e.jsxs("div",{className:"f_round-checkmark-list-box f_input-margin",children:[e.jsxs("div",{className:"f_round-checkmark-list-box-header",children:[e.jsx("span",{className:"f_mr-5",children:e.jsx(pe,{size:"16",color:C.yellow})}),e.jsxs("h6",{className:"f_text-c","data-key":"TXT_Disclaimer",children:[s?.TXT_Disclaimer," :"]})]}),e.jsxs("ul",{className:"f_common-list f_round-checkmark-list",children:[e.jsx("li",{"data-key":"CP_CopyTrading_SubscribedStrategies_Desclaimer3",children:s?.CP_CopyTrading_SubscribedStrategies_Desclaimer3}),e.jsx("li",{"data-key":"CP_CopyTrading_SubscribedStrategies_Desclaimer1",children:s?.CP_CopyTrading_SubscribedStrategies_Desclaimer1}),e.jsx("li",{"data-key":"CP_CopyTrading_SubscribedStrategies_Desclaimer2",children:s?.CP_CopyTrading_SubscribedStrategies_Desclaimer2})]})]})]})})}),B&&e.jsx($t,{id:"ct-susbscribe-lta-sidepanel",modalFlag:B,handleClose:t(()=>K(!1),"handleClose"),linkAccountModule:"subscribe",refreshData:he}),T.flag&&e.jsx(me,{open:T.flag,className:"f_embed-videolink",maxWidth:"600px",modal:!1,loading:b,closeIcon:!0,icon:e.jsx(st,{size:"30",color:C.iconLightGray}),onClose:t(()=>m({flag:!1,data:null}),"onClose"),headingTitle:s?.SC_CopyTrading_Subscribed_Strategy_Title,description:e.jsx("div",{children:e.jsx("div",{"data-key":"SC_CopyTrading_Subscribed_Strategy_Password_Change_Note2",dangerouslySetInnerHTML:{__html:s?.SC_CopyTrading_Subscribed_Strategy_Password_Change_Note2}})}),closeBtnName:s?.TXT_Generic_Cancel,closeBtnClick:t(()=>m({flag:!1,data:null}),"closeBtnClick"),saveBtnName:s?.TXT_Generic_Confirm,saveBtnClick:t(i=>ee.subscribeStrategies(i),"saveBtnClick")})]})}),Pa=L.memo(()=>{const l=$()?.languageResources,p=H(),{subscribedstrategId:d}=le(),{userInfo:r}=V(R=>R?.memorize),{setHeaderTitle:S}=o.useContext(nt),[E,N]=o.useState(0),[s,b]=o.useState(null),[D,x]=o.useState(!1),[n,T]=o.useState(!1),[m,a]=o.useState(!1),[f,F]=o.useState(!1),[j,y]=o.useState(null),[v,c]=o.useState({loader:!0,data:null}),[g,M]=o.useState({loader:!0,data:null}),_=t(R=>{N(R)},"handleTabs");o.useEffect(()=>(S(g?.data?.StrategyDetail?.StrategyName||""),()=>{S("")}),[g]);const u=t(async()=>{p({type:"SET_CT_STRATEGY_DETAIL_LOADER",payload:!0});const X=await Et({StrategyId:d});X?.result?.Status===k.SUCCESS?(b(X?.result?.Data),p({type:"SET_CT_STRATEGY_DETAIL_LOADER",payload:!1})):(A.error(X?.result?.Message),p({type:"SET_CT_STRATEGY_DETAIL_LOADER",payload:!1}))},"getStrategyData");o.useEffect(()=>{u()},[]);const P=t(async()=>{const X=await Gt({StrategyId:d});X?.result?.Status===k.SUCCESS?y(X?.result?.Data):(A.error(X?.result?.Message),y(null))},"GetStrategyAccountDetail"),B=t(async()=>{const R={StrategyId:d,AccountId:j?.AccountId,UserId:0,AccountIds:"win",filter:"win"},X=await qt(R);X?.result?.Status===k.SUCCESS?c({loader:!1,data:X?.result?.Data}):(A.error(X?.result?.Message),c({loader:!1,data:null}))},"GetStrategyDescription"),K=t(async()=>{const R=await kt({StrategyId:d});R?.result?.Status===k.SUCCESS?M({loader:!1,data:R?.result?.Data}):(A.error(R?.result?.Message),M({loader:!1,data:null}))},"GetStrategyDetail");o.useEffect(()=>{d&&(P(),K())},[d]),o.useEffect(()=>{j?.AccountId&&B()},[j?.AccountId]);const _e={editStrategy:t(R=>{R.preventDefault(),x(!0)},"editStrategy"),subscribe:t(async R=>{R.preventDefault(),a(!0);try{const X=`IsDemo=false&CustomerProfileId=${ct.SubscribeCopyTrading}&AccountTypeId=${Ye.Social_Trading_Follower_Account}&IsFromCP=true`,Q=await Lt(X);Q?.result?.Status===k.SUCCESS?(a(!1),g?.data?.StrategyDetail?.UserId!=r?.UserId&&g?.data?.StrategyDetail?.PasswordProtected?F(!0):T(!0)):(A.error(Q?.result?.Message),a(!1))}catch(X){console.log("error",X),A.error(X.message||X),a(!1)}},"subscribe")};return e.jsxs(L.Fragment,{children:[e.jsx(St,{title:l?.TXTStrategiesDetail}),e.jsxs("div",{className:"f_cp_dashboard f_strategy-detail f_module-layout",children:[e.jsx("div",{className:"f_content-view f_border-radius-10",id:"ct-sd-header",children:e.jsxs("div",{className:"f_cp_dashboard_header",children:[e.jsx("div",{className:"f_flex-align",children:e.jsx("div",{className:"f_pr-20 f_flex-1-0 f_w-full",children:e.jsxs("div",{className:"f_account-number",children:[e.jsx("p",{className:"f_mb-3","data-key":"TXT_MasterACNo",children:l?.TXT_MasterACNo}),e.jsx("span",{className:"f_font-small",children:g?.data?.StrategyDetail?.AccountNumber})]})})}),e.jsxs("div",{className:"f_cp_header_btn f_mobile-button",children:[g?.data?.IsStrategyOwner&&g?.data?.StrategyDetail?.IsSuspend===!1&&e.jsx(ne,{hasTooltip:!0,className:"f_ekyc-btn f_inline-flex f_align-center f_mr-5",icon:e.jsx(ot,{className:"f_button-icon",size:"16",color:C.white}),name:l?.TXT_EditStrategy,"data-key":"TXT_EditStrategy",variant:"linear",onClick:t(R=>_e.editStrategy(R),"onClick"),extraSmall:!0}),e.jsx(ne,{hasTooltip:!0,className:"f_ekyc-btn f_inline-flex f_align-center f_mr-5",icon:e.jsx(it,{className:"f_button-icon",color:C.white}),name:l?.TXT_Subscribe,"data-key":"TXT_Subscribe",variant:"solid",isLoading:m,disabled:m,onClick:t(R=>_e.subscribe(R),"onClick"),extraSmall:!0})]})]})}),e.jsx("div",{className:"f_content-view f_mt-10 f_border-radius-10",id:"ct-sd-content",children:e.jsxs("div",{className:"f_px-15 f_pb-15",children:[g?.data?.IsStrategyOwner?e.jsx(e.Fragment,{children:e.jsxs(He,{className:"f_new-sub-body-mx-0",func:_,selectedTab:E,customScroll:!0,
1children:[e.jsxs(Qe,{children:[e.jsx("span",{"data-key":"TXT_InvestorsAC",children:l?.TXT_InvestorsAC}),e.jsx("span",{"data-key":"CP_Invest_StrategyDetail_TXT_ManagerOrders",children:l?.CP_Invest_StrategyDetail_TXT_ManagerOrders}),g?.data?.IsSubscriptionFundManagerLevel&&e.jsxs("span",{"data-key":"CP_CopyTrade_StrategyDetail_TXT_SubscriptionRequest",children:[l?.CP_CopyTrade_StrategyDetail_TXT_SubscriptionRequest,e.jsxs("strong",{className:"f_tabs-count",children:["(",g?.data?.TotalPendingSubscriptionRequest||0,")"]})]}),g?.data?.IsUnsubscriptionFundManagerLevel&&e.jsxs("span",{"data-key":"CP_CopyTrade_StrategyDetail_TXT_UnSubscriptionRequest",children:[l?.CP_CopyTrade_StrategyDetail_TXT_UnSubscriptionRequest,e.jsxs("strong",{className:"f_tabs-count",children:["(",g?.data?.TotalPendingUnSubscriptionRequest||0,")"]})]}),e.jsxs("span",{"data-key":"TXT_CP_TopupRequest",children:[l?.TXT_CP_TopupRequest," ",e.jsxs("strong",{className:"f_tabs-count",children:["(",g?.data?.TotalPendingTopupRequest||0,")"]})]}),e.jsxs("span",{"data-key":"TXT_PartialWithdrawalRequest",children:[l?.TXT_PartialWithdrawalRequest," ",e.jsxs("strong",{className:"f_tabs-count",children:["(",g?.data?.TotalPendingParti
1alWithdrawalRequest||0,")"]})]})]}),e.jsxs(Je,{className:"f_h-full",children:[e.jsx("div",{children:e.jsx(Ht,{strategyId:d})}),e.jsx("div",{children:e.jsx(Qt,{strategyData:s,accountId:s?.AccountId})}),g?.data?.IsSubscriptionFundManagerLevel&&e.jsx("div",{children:e.jsx(ea,{strategyId:d})}),g?.data?.IsUnsubscriptionFundManagerLevel&&e.jsx("div",{children:e.jsx(sa,{strategyId:d})}),e.jsx("div",{children:e.jsx(ta,{strategyId:d})}),e.jsx("div",{children:e.jsx(Jt,{strategyId:d})})]})]})}):e.jsx("div",{children:e.jsx("p",{className:"f_mt-15 f_text-danger","data-key":"TXTLeaderBoard_Detail_AlltheValuesShownhere",children:l?.TXTLeaderBoard_Detail_AlltheValuesShownhere})}),g?.data?.IsStrategyOwner&&e.jsxs("div",{className:"f_my-15 ",children:[e.jsx(ut,{loader:g?.loader,strategyData:g?.data}),e.jsx(_t,{loader:g?.loader,strategyData:g?.data,strategyAccountDetail:j}),e.jsx(ve,{loader:g?.loader,strategyData:g?.data,IsStrategyOwner:!0,upFrontFee:!1,managementFee:!1})]}),!g?.data?.IsStrategyOwner&&e.jsx("div",{className:"f_my-15 ",children:e.jsx(ve,{loader:g?.loader,strategyData:g?.data,IsStrategyOwner:!1,upFrontFee:!1,managementFee:!1})}),e.jsx(Tt,{description:g?.data?.StrategyDetail?.StrategyDescription}),e.jsxs("div",{className:"f_row f_publishedstrategy-detailview",children:[e.jsx(gt,{loader:v?.loader,strategyData:g?.data,chartData:v?.data}),e.jsx(mt,{loader:v?.loader,strategyData:g?.data,chartData:v?.data}),e.jsx(pt,{loader:v?.loader,strategyData:g?.data,chartData:v?.data})]})]})})]}),D&&e.jsx(ra,{modalFlag:D,handleClose:t(()=>x(!1),"handleClose")}),n&&e.jsx(la,{strategyData:g?.data,modalFlag:n,handleClose:t(()=>T(!1),"handleClose"),isWebview:window.ReactNativeWebView}),f&&e.jsx(yt,{modalFlag:f,handleClose:t(()=>{F(!1),a(!1)},"handleClose"),setSubscribeModalFlag:T})]})});export{Pa as default};
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.