(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3330],{5537:function(t,e,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/calculator/mutual-funds",function(){return a(15372)}])},15372:function(t,e,a){"use strict";a.r(e);var n=a(85893),o=a(67294),s=a(94070),r=a(30841),l=a(2969),u=a(15015),i=a(86501),c=a(54020),h=a(48500),d=a(5929),m=a(15412),M=a(17647),D=a(9008),p=a.n(D),f=a(49626),w=a(11163);let y={schemaValue:"",mfId:"",fromDate:"",toDate:"",type:"",amount:""},Y=()=>{let t=(0,w.useRouter)(),{utm_source:e,utm_medium:a,utm_campaign:D,redir:Y}=t.query,g=(0,o.useCallback)(async t=>{let{search:e}=t,a=await u.Z.mutualFundsSearchSchema({query:e,page:1,page_length:100});return a.isDone&&Array.isArray(a.list)?a.list:[]},[]);(0,o.useEffect)(()=>{Y?fetch("".concat("https://1finance.co.in/magazine/wp-json","/influencer/v1/add"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({full_name:"".concat(Y).concat(null==window?void 0:window.location.pathname.replaceAll("/","-"))})}):(e||D||a)&&fetch("".concat("https://1finance.co.in/magazine/wp-json","/influencer/v1/add"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({full_name:"".concat(e?"".concat(e,"-"):"").concat(a?"".concat(a,"-"):"").concat(D||"").concat(null==window?void 0:window.location.pathname.replaceAll("/","-"))})})},[t.query]);let[j,C]=(0,o.useState)({}),[S,x]=(0,o.useState)(!1),[F,_]=(0,o.useState)(!1),[v,O]=(0,o.useState)(!1),[b,Z]=(0,o.useState)(y),[k,A]=(0,o.useState)(""),[T,I]=(0,o.useState)(!1),N=async()=>{O(!0);let t=await u.Z.mutualFundsCalc(b);O(!1),t.isDone?Object.keys(t.details).length&&(C(t.details),I(!0)):i.ZP.error(t.message)},P=()=>{C({}),setTimeout(()=>{I(!1)},600)},E=(t,e,a)=>{let n={Jan:1,Feb:2,Mar:3,Apr:4,May:5,Jun:6,Jul:7,Aug:8,Sept:9,Oct:10,Nov:11,Dec:12};return n[a]<=e&&n[a]>=t},z=t=>{let e=new Date;Z(a=>{if((t.type&&t.type!=a.type||t.mfId&&t.mfId!=a.mfId)&&(t=Object.assign(t,{startDateYear:a.startDateYear?a.startDateYear:"",startDateMonth:a.startDateMonth?a.startDateMonth:"",startMonth:a.startMonth?a.startMonth:"",endMonth:a.endMonth?a.endMonth:"",endDateMonth:a.endDateMonth?a.endDateMonth:"",endDateYear:a.endDateYear?a.endDateYear:"",amount:a.amount?a.amount:"",widthrawal:a.widthrawal?a.widthrawal:""})),t.startDateYear&&t.startDateYear!=a.startDateYear){let n=t.startDateYear===(0,h.s)(k)?(0,h.M)(k)+1:1,o=t.startDateYear===e.getFullYear()?e.getMonth()+1:12;t=Object.assign(t,{startDateMonth:a.startDateMonth?a.startDateMonth:"",startMonth:a.startMonth&&E(n,o,a.startMonth)?a.startMonth:"",endMonth:a.endMonth?a.endMonth:"",endDateMonth:a.endDateMonth?a.endDateMonth:"",endDateYear:a.endDateYear?a.endDateYear:""})}if(t.endDateYear&&t.endDateYear!=a.endDateYear){let s=a.startDateYear==t.endDateYear?a.startDateMonth:1,r=t.endDateYear===e.getFullYear()?e.getMonth()+1:12;t=Object.assign(t,{startDateMonth:a.startDateMonth?a.startDateMonth:"",startMonth:a.startMonth?a.startMonth:"",endMonth:a.endMonth&&a.startMonth&&E(s,r,a.endMonth)?a.endMonth:"",endDateMonth:a.endDateMonth?a.endDateMonth:""})}if((t.startDateYear&&t.startDateYear!=a.startDateYear||t.startDateMonth&&t.startDateMonth!=a.startDateMonth)&&(t=Object.assign(t,{endMonth:a.endMonth?a.endMonth:"",endDateMonth:a.endDateMonth?a.endDateMonth:"",widthrawal:a.widthrawal?a.widthrawal:""})),"Yes"==t.widthrawal){let l=new Date,u=l.getMonth();t={...t,endDateMonth:u+1,endDateYear:l.getFullYear(),endMonth:d.j.filter((t,e)=>e==u)}}return t.startDateYear&&a.endDateYear&&t.startDateYear>a.endDateYear&&"No"==a.widthrawal&&(t={...t,endDateYear:""}),{...a,...t}})},R=s.Z.content.commissionAnalyzer.mutualFunds;return(0,n.jsxs)(o.Fragment,{children:[(0,n.jsx)(p(),{children:(0,n.jsx)("link",{async:!0,rel:"stylesheet",href:"/styles/share-analyzer.css"})}),(0,n.jsx)(M.Z,{title:"Mutual Fund Commission Calculator | Commission on Mutual Funds | Investment Planning | 1 Finance",keywords:"Mutual Fund Commission Calculator, How to calculate commission on MFs & Insurance",description:"Find out how to calculate commission on Mutual funds and insurance. Commission Calculator is a tool to estimate the commission component of your premium on insurance plans and of your investments in mutual funds, based on the information you provide and the regulatory framework in place.",canonicalPath:"/calculator/mutual-funds"}),(0,n.jsx)(m.Z,{}),(0,n.jsxs)(r.Z,{headerClass:"header-dark",children:[Object.keys(j).length&&T?(0,n.jsx)(l.Zg,{title:b.schemaValue,onBack:P,details:{totalCommisionAmount:Number(j.commission),totalPremiumAmount:Number(j.valuation)},chartStyles:R.chart.styles,showAssumption(){_(!0)},showShares(){x(!0),(0,f.Z)({"gtm.text":"InsuranceMutualCalReportShared"})},chartPageInfo:s.Z.content.commissionAnalyzer.reportChart.mutualFund,GTMEXPLOREMORETOOLS:"InsuranceMutualExploreTools",GTMWHATSAPP:"InsuranceMutualCalWhatsappUs"}):(0,n.jsx)(l.XM,{isReportChartBackClicked:T,isLoading:v,mutualFundsSearch:g,content:R,onSubmit(){N(),(0,f.Z)({"gtm.text":"InsuranceMutualCalCalculated"})},values:b,setValuesFunc:z,setInceptMfDate:A,inceptMfDate:k}),(0,n.jsx)(c.Z,{open:F&&Boolean(R.assumption),onClose:()=>_(!1),children:(0,n.jsx)(l.ax,{assumptionList:R.assumptionList,content:R.assumption,onClose:()=>_(!1)})}),(0,n.jsx)(c.Z,{open:S,onClose(){},children:(0,n.jsx)(l.HF,{shareGroup:s.Z.content.commissionAnalyzer.reportChart.mutualFund.shareGroup,open:S,onClose:()=>x(!1)})})]})]})};e.default=Y},15412:function(t,e,a){"use strict";var n=a(85893),o=a(4298),s=a.n(o);let r=()=>(0,n.jsx)(s(),{src:"https://cdn.jsdelivr.net/npm/chart.js"});e.Z=r},54020:function(t,e,a){"use strict";var n=a(85893),o=a(67294),s=a(49212),r=a.n(s);let l=t=>{let{open:e,onClose:a,children:s}=t,[l,u]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{u(e)},[e]),l?(0,n.jsx)("div",{className:"".concat(r().modal," w-100vw h-100vh"),onClick(){u(!l),a()},children:s}):null};e.Z=l},49212:function(t){t.exports={modal:"modal_modal__TjRh1"}},4298:function(t,e,a){t.exports=a(63573)}},function(t){t.O(0,[296,4353,8225,6523,9870,1121,9260,3227,7812,841,4070,2475,1267,9774,2888,179],function(){return t(t.s=5537)}),_N_E=t.O()}]);