(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1281],{82619:function(e,t,a){"use strict";a.d(t,{y:function(){return x}});var l=a(57437),n=a(75461),i=a(5426),o=a(54365),r=a(33145),s=a(2265),c=a(76670),u=a(81486),d=a(92449),_=a(75873),p=a(72151),f=a(31219),m=a(48034),v=a(80342),h=a(73927),g=a.n(h);let x=(0,s.memo)(e=>{let{title:t,content:a,pageUrl:h,infoLink:x,chips:D,isMobile:C,isShowChips:b,isExpandSettings:k,onToggleSettings:N,isSavingAccount:y,titleClassName:j,calculatorClassName:P,chevronSrc:A=c.Z,withNewMarkup:w,eventCategory:T,productId:S}=e,L=(0,n.s4)(),I=e=>{(0,_.D)({eventCategory:h,eventAction:_.i.popup,eventActionText:e}),null==N||N()},Z=(0,m.Z)(10),R=(0,s.useCallback)(()=>{x&&(w&&(0,p.lQ)({eventCategory:T,eventLabel:S,eventAction:"click_".concat((0,f.b)(x.text))}),(0,i.ld)(x.idScrollBlock,{offset:Z,position:"top"}))},[T,x,S,Z,w]);return(0,l.jsxs)(i.W2,{className:(0,o.Z)(g().container,P),children:[(0,l.jsxs)("button",{className:(0,o.Z)(g().title,y&&g().marginNone,j),"data-testid":"calculator-settings-button",onClick:()=>I(t),children:[t,(0,l.jsx)(r.default,{className:(0,o.Z)(g().collapseArrow,k&&g().collapseArrowOpened),src:A,alt:""})]}),(0,l.jsxs)(d.u,{className:(0,o.Z)(g().fieldsContainer,!L&&g().initialCollapsed),isOpen:k||!C,children:[(0,l.jsx)("div",{className:g().fieldsWrapper,children:a}),(0,l.jsx)(v.Y,{className:g().disclaimer,text:"Все ".concat(y?"счета":"вклады"," застрахованы в АСВ")})]}),x&&x.isShow&&(0,l.jsx)(u.j,{offPadding:x.offPadding,widthMaxContent:x.widthMaxContent,text:x.text,iconColor:"light",mainPageUrl:h,className:g().link,onClick:R,isCustomMarkup:w}),b&&!y&&(0,l.jsx)(i.ev,{className:(0,o.Z)(g().chips,!L&&g().initialChips),options:D,selected:D,multiple:!0,theme:"secondary",size:"medium"})]})});x.displayName="Calculator"},80342:function(e,t,a){"use strict";a.d(t,{Y:function(){return u}});var l=a(57437),n=a(54365),i=a(33145),o=a(2265),r=a(57291),s=a(82042),c=a.n(s);let u=(0,o.memo)(e=>{let{text:t,className:a,hideIcon:o=!1}=e;return(0,l.jsxs)("p",{className:(0,n.Z)(c().disclaimer,a),children:[!o&&(0,l.jsx)(i.default,{className:c().iconASV,src:r.Z,alt:"Иконка АСВ"}),t]})});u.displayName="DepositDisclaimer"},23468:function(e,t,a){"use strict";a.d(t,{M:function(){return d}});var l=a(57437),n=a(5426),i=a(54365),o=a(50666),r=a(2265),s=a(75873),c=a(33176),u=a.n(c);let d=(0,r.memo)(e=>{let{className:t,url:a,text:r,title:c}=e;return(0,l.jsxs)(n.W2,{className:(0,i.Z)(u().container,t),children:[(0,l.jsx)("h3",{className:u().title,dangerouslySetInnerHTML:{__html:c}}),(0,l.jsx)("h4",{className:u().text,dangerouslySetInnerHTML:{__html:r}}),(0,l.jsx)(n.zx,{as:"a",variant:"purple",href:"/".concat(a),onClick:()=>{(0,s.D)({eventCategory:a,eventAction:s.i.button,eventActionText:"Подобрать предложение",url:"".concat((0,o.env)("NEXT_PUBLIC_BASE_URL"),"/").concat(a)})},className:u().button,children:"Подобрать предложения"})]})});d.displayName="ArchivePromo"},21301:function(e,t,a){"use strict";a.d(t,{V:function(){return c}});var l=a(57437),n=a(54365),i=a(44587),o=a(11359),r=a(281),s=a.n(r);let c=e=>{let{className:t,text:a,tooltipText:r,theme:c="primary",tipIcon:u,onTooltipOpen:d}=e;return(0,l.jsx)("div",{className:(0,n.Z)(s().tag,{[s().tagPrimary]:"primary"===c,[s().tagSecondary]:"secondary"===c,[s().tagPink]:"pink"===c,[s().tagYellow]:"yellow"===c},t),children:r&&(0,l.jsx)(o.C,{className:s().detail,iconSrc:i.Z,text:r,iconClassName:s().detailIcon,icon:u,onOpen:()=>null==d?void 0:d(a),children:(0,l.jsx)("span",{className:s().text,children:a})})})}},72096:function(e,t,a){"use strict";a.d(t,{$k:function(){return n},k5:function(){return i},kJ:function(){return l}});let l=[{label:"Добавлять ко вкладу (капитализация)",value:"add"},{label:"Выплачивать",value:"dont_add"}],n=[{label:"В конце срока",value:"end"},{label:"Ежедневно",value:"daily"},{label:"Раз в месяц",value:"1"},{label:"Раз в квартал",value:"3"},{label:"Раз в полгода",value:"6"},{label:"Раз в год",value:"12"}],i=[{label:"Не предусмотрено",value:"0"},{label:"Раз в месяц",value:"1"},{label:"Раз в 2 месяца",value:"2"},{label:"Раз в квартал",value:"3"},{label:"Раз в 4 месяца",value:"4"},{label:"Раз в полгода",value:"6"},{label:"Раз в год",value:"12"}]},32523:function(e,t,a){"use strict";a.d(t,{n:function(){return G}});var l=a(57437);a(38068);var n=a(13801),i=a(5426),o=a(54365),r=a(2265),s=a(21301),c=a(69589),u=a(14862),d=a(44579),_=a(35563),p=a(32817),f=a.n(p);function m(e){let{loading:t}=e;return(0,l.jsxs)("div",{className:(0,o.Z)(f().skeletonContainer,t&&f().visible),children:[(0,l.jsx)(_.Od,{className:f().skeletonDate}),(0,l.jsx)(_.Od,{className:f().skeletonProfit})]})}var v=a(27648),h=a(11359),g=a(87566),x=a(23e3),D=a.n(x);function C(e){let{rowCount:t,loading:a}=e;return(0,l.jsx)("div",{className:(0,o.Z)(D().skeletonContainer,a&&D().visible),children:Array.from(Array(t).keys()).map(e=>(0,l.jsx)(_.Od,{className:D().skeleton},e))})}var b=a(70104),k=a(72151),N=a(31219),y=a(90297),j=a.n(y);function P(e){var t;let{withNewMarkup:a,rate:n,effectiveRate:o,hideExternalLinks:s,profit:c,unit:u,extraInfo:d,isSavingAccount:_,salaryToggle:p,setSalaryToggle:f,discount:m,bonus:x,firstDepositBonusTitle:D,tipIcon:y,switchRate:P,onSwitchRate:A,isRateSwitched:w,eventCategory:T,productId:S,isCombo:L=!1,isLoading:I}=e,Z=(0,r.useCallback)(()=>{A&&(A(!w),(0,k.lQ)({event:"data-event",eventAction:"click_button_perekluchit_stavku",eventCategory:T,eventLabel:S}))},[A,w,T,S]),R=(0,r.useCallback)(e=>()=>{(0,k.lQ)({event:"data-event",eventAction:"click_link_".concat((0,N.b)(e)),eventCategory:T,eventLabel:S})},[T,S]),O=(0,r.useMemo)(()=>{var e;let t=[{label:"Доход от банка",value:"".concat((0,b.Y4)(c,2)," ").concat(u)}];if((null===(e=d.algo)||void 0===e?void 0:e.id)==="mkb-nakop"&&t.push({label:"Открытие дебетовой карты",value:"Да",description:_&&null!=d.karta?d.karta.label:"Открывая счет, Вы соглашаетесь на оформление дебетовой карты банка"},{label:"Действие счета",value:"Бессрочно"},{label:"Зарплата или пенсия на карту МКБ",value:(0,l.jsx)(i.jw,{checked:p,className:j().singleToggle,onChange:()=>null==f?void 0:f(!p)}),description:(0,l.jsx)(l.Fragment,{children:"Процентная ставка применяется при условии зачисления заработной платы от юридических лиц и индивидуальных предпринимателей на картсчет Клиента, открытый в Банке или суммы пенсий от Фонда пенсионного и социального страхования Российской Федерации или иных органов (учреждений) на любой счет Клиента, открытый в Банке, поступивших в течение 60 календарных дней до каждой даты начисления процентов по счету."})}),n&&t.unshift({label:"Ставка",value:"".concat((0,b.Y4)(n,2),"%")}),o&&t.unshift({label:"Эффективная ставка",value:"".concat((0,b.Y4)(o,2),"%"),description:(0,l.jsxs)(l.Fragment,{children:["Иногда у вклада есть особенности — капитализация процентов, возможность пополнения или акция от банка. Дополнительные параметры меняют доход в большую или меньшую сторону, поэтому процент по эффективной ставке отличается от банковской. Он отражает доход корректнее."," ",!s&&(0,l.jsx)(v.default,{className:j().tooltipLink,target:"_self",onClick:R("Подробнее о том, как считать сложный процент"),href:"".concat(g._n,"/navigator/nakopit-i-sohranit/stat_chto_takoe_slozhnyj_procent_po_vkladu_i_kak_ego_poschitat?ysclid=lfmam3zaig67098551%22"),children:"Подробнее о том, как считать сложный процент"})]})}),m&&x){let e=L?"%":" ".concat(u);t.push({label:D?"Бонус за первый вклад":"Бонус от Финуслуг",value:"".concat((0,b.Y4)(x,2)).concat(e),description:(null==m?void 0:m.terms)?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("p",{children:null==m?void 0:m.terms}),m.link&&m.linkLabel&&(0,l.jsx)("a",{href:m.link,target:"_blank",children:m.linkLabel})]}):null})}return t},[x,m,o,null===(t=d.algo)||void 0===t?void 0:t.id,d.karta,D,R,s,_,c,n,p,f,u,L]),M=!!P&&(null==P?void 0:P.difference)>0,E=M?"+".concat((0,b.Y4)(P.difference,1),"% к ставке"):null,B=(0,r.useCallback)(e=>{(0,k.lQ)({eventAction:"click_question_".concat((0,N.b)(e)),eventCategory:T,eventLabel:S})},[T,S]);return(0,l.jsxs)("ul",{className:j().values,children:[(0,l.jsx)(C,{loading:I,rowCount:O.length}),O.map(e=>(0,l.jsxs)("li",{className:j().value,children:[(0,l.jsx)("div",{children:e.label}),e.description&&(0,l.jsx)(h.C,{text:e.description,className:j().detail,onOpen:()=>a&&B(e.label),icon:y}),(0,l.jsx)("div",{className:j().valueDash}),(0,l.jsx)("div",{children:e.value})]},e.label)),M&&E&&(0,l.jsxs)("li",{className:j().value,children:[(0,l.jsx)("div",{children:E}),(0,l.jsx)(h.C,{text:"При сумме вклада от ".concat((0,b.Y4)(P.minAmount)," ₽"),className:j().detail,icon:y,onOpen:()=>a&&B(E)}),(0,l.jsx)(i.jw,{onChange:Z,checked:w,className:j().toggle,size:"small"})]})]})}var A=a(37162);let w=e=>{let{depositType:t,isHideButtons:a,isShowDepositTip:l,isSavingAccount:n}=e,i=t===c.P.isPlatformDeposit?"Как открыть вклад":"Где открыть вклад",o=t===c.P.isPlatformDeposit?"Как открыть накопительный счет":"Где открыть накопительный счет";return{helpButtonLabel:n?o:i,blockId:t===c.P.isPlatformDeposit?A.a6:A.VT,isShowMainButton:!a&&t===c.P.isPlatformDeposit||t===c.P.isLidgenDeposit,isShowHelpButton:t!==c.P.isArchiveDeposit&&l&&!a,isOfferText:t===c.P.isPlatformDeposit||t===c.P.isLidgenDeposit}};var T=a(2674),S=a(53931),L=a(84948),I=a(32443),Z=a(50017),R=a(33145),O={src:"/deposits/_next/static/media/edit.c0611721.svg",height:16,width:16,blurWidth:0,blurHeight:0},M=a(45198),E=a(97291),B=a(35041),V=a(56924),F=a(28734),H=a.n(F);function Y(e){let{term:t,totalProfit:a,withChart:n,isChartOpen:i,isEditable:o=!0,endingDate:s,onEditButtonClick:c,onToggleChart:u}=e,d=(0,b.Y4)(a,2).split(","),_=(0,r.useMemo)(()=>s?(0,E.f)(s):function(e){let t=new Date;return(0,E.f)(M.Z.day(t,e))}(t),[s,t]);return(0,l.jsxs)("div",{className:H().head,children:[(0,l.jsxs)("h4",{className:H().title,children:["Накопите к ",_]}),(0,l.jsxs)("h5",{className:H().result,children:[(0,l.jsxs)("span",{className:H().resultText,children:[d[0],d[1]?(0,l.jsxs)(l.Fragment,{children:[",",(0,l.jsxs)("span",{className:H().resultTextFloat,children:[d[1]," ₽"]})]}):" ₽"]}),o&&(0,l.jsx)("button",{className:H().resultButton,onClick:c,children:(0,l.jsx)(R.default,{className:H().resultIcon,src:O,alt:"edit"})})]}),n&&(0,l.jsx)(B.W,{onClick:u,className:H().chartButton,icon:i?V.d.arrowBack:V.d.chart,alt:"chart"})]})}var U=a(56257),Q=a.n(U);let W=(0,r.memo)(e=>{let{href:t,id:a,pageType:n,eventCategory:o,withNewMarkup:r,eventLabel:s}=e;return(0,l.jsx)(i.zx,{as:"a",className:Q().button,target:"_blank",href:t,size:"s",disabled:!t,onClick:()=>{(0,k.lQ)({event:"data-event",eventLabel:s,eventCategory:o,eventAction:r?"click_button_open_online":"open_in_bank_product",eventValue:null!=a?a:""})},children:n===c.P.isPlatformDeposit?"Открыть онлайн":"Перейти на сайт банка"})});W.displayName="MainButton";let z={highlights:null,title:null,description:null,variant:"secondary",primaryAuthProviders:["ALFA","SBER","TINKOFF","VTB","MTS","SOVCOM","PHONE"],additionalAuthProviders:[],extraAuthProviders:[],primaryTextOverride:"Открыть вклад"},G=(0,r.memo)(e=>{var t,a;let{onEdit:c,isMobile:_,rate:p,sum:f,term:v,tag:h,appUrl:g,discount:x,isRateSwitched:D,onSwitchRate:C,switchRate:b,isCapitalization:y,depositType:j,productId:A,unit:R,tags:O,isSavingAccount:M,extraInfo:E,salaryToggle:B,setSalaryToggle:V,isShowDepositTip:F,isHideButtons:H=!1,paymentFrequency:U,customActions:G,shortChipsList:K=!1,firstDepositBonusTitle:q=!1,scrollOffset:J,computeClassName:X,withChart:$,tipIcon:ee,tagIcon:et,customTagTitle:ea,hideExternalLinks:el=!1,computeHeader:en,computeTag:ei,eventCategory:eo,withNewMarkup:er,totalValues:es,isEditable:ec=!0,isCombo:eu=!1,calculatedProfit:ed,calculatedTotalProfit:e_,calculatedEffectiveRate:ep,calculatedBonus:ef,integrationType:em,calculatedEndingDate:ev,isLoading:eh=!1}=e,[eg,ex]=(0,r.useState)(!1),eD=new Date;eD.setDate(eD.getDate()+v);let{total:eC,bonus:eb,effectiveRate:ek,profit:eN}=(0,L.Z)({depositSum:f,term:v,rate:p,isCapitalization:y,discount:x,period:d.Z.Day,paymentFrequency:U}),ey=ed||eN,ej=e_||eC,eP=ef||eb,eA=function(e){let{integrationType:t}=e,{toggles:{FEATURE_TOGGLE_INTERNAL_REFERAL_LOGIN_ENABLED:a}}=(0,T.ND)(),l=(0,r.useMemo)(()=>(0,S.$1)(),[]),n=(null==l?void 0:l["auth.gtm_customer_id"])||null;return a&&"INTERNAL_REFERAL"===t&&!n}({integrationType:em}),{helpButtonLabel:ew,blockId:eT,isShowMainButton:eS,isShowHelpButton:eL,isOfferText:eI}=w({depositType:j,isHideButtons:H,isShowDepositTip:F,isSavingAccount:M}),eZ=(0,r.useCallback)(()=>{(0,k.lQ)({event:"data-event",eventAction:er?"click_button_how_to_open":"click_button_".concat((0,N.b)(ew)),eventCategory:eo,eventLabel:A}),(0,i.ld)(eT,{offset:J,position:"top"})},[eT,eo,ew,A,J,er]),eR=(0,r.useCallback)(()=>{ex(e=>!e),(0,k.lQ)({event:"data-event",eventAction:"click_icon_diagramma",eventCategory:eo,eventLabel:A})},[eo,A]),eO=(0,r.useCallback)(()=>{c&&(c(),(0,k.lQ)({event:"data-event",eventAction:er?"click_pencil":"click_icon_redactirovanie",eventCategory:eo,eventLabel:A}))},[eo,c,A,er]),eM=(0,r.useCallback)(e=>{(0,k.lQ)({eventCategory:eo,eventLabel:A,eventAction:"click_chips_".concat((0,N.b)(e))})},[eo,A]),eE=(0,r.useCallback)(()=>{var e;return h&&h.title?null!==(e=null==ei?void 0:ei(h))&&void 0!==e?e:(0,l.jsx)(s.V,{className:Q().tag,text:null!=ea?ea:h.title,tooltipText:h.description,tipIcon:et,onTooltipOpen:e=>er&&eM(e)}):null},[ei,ea,eM,h,et,er]),{widgetConfig:eB,isWidgetDataLoading:eV}=(0,I.B)({disabled:!eA}),eF=(0,r.useCallback)(()=>{if(eS)return eA&&(eB||eV)?(0,l.jsx)(n.U,{entryPointId:"deposit-detail",baseUrl:u.m.LK_URL,s3AssetsUrl:u.m.ASSETS_URL,skeleton:(0,l.jsx)(i.zx,{pending:!0,className:Q().button,size:"s",label:"Открыть вклад",disabled:!0}),className:(0,o.Z)(Q().button,Q().loginWidget),serverConfig:eB?{...eB,consents:[],legalInfo:null}:void 0,config:z,scenarioParams:{targetUri:g},isSilent:!0}):(0,l.jsx)(W,{href:g,id:A,pageType:j,eventCategory:eo,withNewMarkup:er,eventLabel:es})},[eS,eA,eB,eV,g,A,j,eo,er,es]);return(0,l.jsxs)(i.W2,{className:(0,o.Z)(Q().container,eg&&Q().containerChart,X),children:[null!==(a=null==en?void 0:en(ej,eO))&&void 0!==a?a:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(m,{loading:eh}),(0,l.jsx)(Y,{term:v,totalProfit:ej,withChart:$&&!eu,isChartOpen:eg,isEditable:ec,endingDate:ev,onEditButtonClick:eO,onToggleChart:eR})]}),(0,l.jsxs)("div",{className:Q().info,children:[(0,l.jsx)(Z.H,{isMobile:_,className:(0,o.Z)(Q().chart,eg&&Q().chartVisible),sum:f,bonus:eb,profit:ey}),(0,l.jsxs)("div",{className:Q().tags,children:[!K&&(null==O?void 0:O.map(e=>{let{title:t,description:a}=e;return(0,l.jsx)(s.V,{className:Q().tag,text:t,tooltipText:a,theme:"pink",onTooltipOpen:eM},t)})),eE(),!K&&(null===(t=E.algo)||void 0===t?void 0:t.id)==="mkb-nakop"&&E.algo.extraTag&&(0,l.jsx)(s.V,{className:Q().tag,...E.algo.extraTag,onTooltipOpen:eM})]}),(0,l.jsx)(P,{withNewMarkup:er,rate:p,effectiveRate:ep||ek,hideExternalLinks:el,profit:ey,unit:R,extraInfo:E,isSavingAccount:M,salaryToggle:B,setSalaryToggle:V,discount:x,bonus:eP,firstDepositBonusTitle:q,tipIcon:ee,switchRate:b,onSwitchRate:C,isRateSwitched:D,eventCategory:eo,productId:A,isCombo:eu,isLoading:eh}),null==G?void 0:G(v),eF(),eL&&(0,l.jsx)(i.zx,{onClick:eZ,className:Q().button,size:"s",variant:"secondary",children:ew}),eI&&(0,l.jsx)("h3",{className:Q().disclaimer,children:"Предварительный расчет. Не является офертой"})]})]})});G.displayName="DepositDetailCompute"},75217:function(e,t,a){"use strict";var l=a(2265);t.default=(0,l.createContext)(void 0)},60341:function(e,t,a){"use strict";a.d(t,{default:function(){return o}});var l=a(57437),n=a(2265),i=a(75217);function o(e){let{children:t,siteConfig:a}=e,[o]=(0,n.useState)(a);return(0,l.jsx)(i.default.Provider,{value:o,children:t})}},2674:function(e,t,a){"use strict";a.d(t,{ZP:function(){return s.default},ND:function(){return r}}),(l=n||(n={})).Beeline="beeline",l.T2="t2",l.Megafon="megafon",n.Beeline,n.T2,n.Megafon,n.T2,n.Beeline,n.Megafon,n.T2,n.Beeline,n.Megafon;var l,n,i=a(2265),o=a(75217);function r(){let e=(0,i.useContext)(o.default);if(!e)throw Error("Site config was used out of context");return e}var s=a(60341)},45198:function(e,t,a){"use strict";var l=a(92668),n=a(44579);let i={[n.Z.Day]:(e,t)=>(0,l.I)(e,{days:t}),[n.Z.Month]:(e,t)=>(0,l.I)(e,{months:t}),[n.Z.Year]:(e,t)=>(0,l.I)(e,{years:t})};t.Z=i},84948:function(e,t,a){"use strict";a.d(t,{Z:function(){return m}});var l=a(69775),n=a(89981),i=a(92668),o=a(85873),r=a(53970),s=a(52603),c=a(91627),u=a(40309),d=a(44579),_=a(45198);function p(e){let{nPerYear:t,amount:a,rate:l,termInDays:n,isLadderDeposit:i,ladderEffectiveRate:o}=e;if(i&&o)return{profit:a*o/100*n/365,effectiveRate:o};let r=a*Math.pow(1+l/t,n/365*t)-a;return{profit:r,effectiveRate:(Math.pow(1+r/a,365/n)-1)*100}}function f(e){let{capitalization:t,paymentFrequency:a,dateStart:l,termByYears:n,amount:i,averageRate:o,termInDays:r,isLadderDeposit:d,ladderEffectiveRate:_}=e;if(t){let e=o/100;if(a===u.Z.EveryDay){let t=n.reduce((t,a)=>t*Math.pow(1+e/a.daysInYear,a.daysInInterval),i)-i,a=t/i/r*(0,s.y)(l)*100;return{profit:t,effectiveRate:a}}if(a===u.Z.Weekly)return p({nPerYear:52,daysPerPeriod:365.25/52,termInDays:r,amount:i,rate:e,isLadderDeposit:d,ladderEffectiveRate:_});if(a===u.Z.OnceAMonth||a===u.Z.InTheEnd)return p({nPerYear:12,daysPerPeriod:c.F,termInDays:r,amount:i,rate:e,isLadderDeposit:d,ladderEffectiveRate:_});if(a===u.Z.Quarterly)return p({nPerYear:4,daysPerPeriod:91.3125,termInDays:r,amount:i,rate:e,isLadderDeposit:d,ladderEffectiveRate:_});if(a===u.Z.Semiannually)return p({nPerYear:2,daysPerPeriod:182.625,termInDays:r,amount:i,rate:e,isLadderDeposit:d,ladderEffectiveRate:_});if(a===u.Z.Annually)return p({nPerYear:1,daysPerPeriod:365.25,termInDays:r,amount:i,rate:e,isLadderDeposit:d,ladderEffectiveRate:_})}return{profit:n.reduce((e,t)=>e+o/100*i/t.daysInYear*t.daysInInterval,0),effectiveRate:o}}function m(e){var t;let{depositSum:a,term:c,rate:u,isCapitalization:p=!1,discount:m,period:v,paymentFrequency:h,dateStart:g=new Date,isLadderDeposit:x,effectiveRate:D}=e,C=_.Z[v](g,c),b=v===d.Z.Day?c:(0,r.w)(C,g),k=function(e,t,a){let c=(0,l.k)({start:e,end:t});return c.reduce((l,u,d)=>{let _=0===d?e:u,p=d===c.length-1?t:(0,n.u)((0,i.I)(_,{days:a}),{start:_,end:(0,i.I)((0,o.w)(u),{days:1})}),f=(0,r.w)(p,_);return 0===f?l:[...l,{daysInYear:(0,s.y)(u),daysInInterval:f}]},[])}(g,C,b),N={amount:a,paymentFrequency:h,dateEnd:C,dateStart:g,capitalization:p,termByYears:k,termInDays:b,averageRate:u,isLadderDeposit:x,ladderEffectiveRate:D},{profit:y,effectiveRate:j}=f(N),{bonus:P,bonusRate:A}=function(e,t){if(!t||!t.rate)return{bonus:0,bonusRate:0};let a=t.rate;if("fixedBonusAmount"in t&&t.fixedBonusAmount)return{bonus:t.fixedBonusAmount,bonusRate:a};if(!t.sum)return{bonus:0,bonusRate:0};let{profit:l}=f({...e,averageRate:a,capitalization:!1});if(l<t.sum)return{bonus:l,bonusRate:a};let n=t.sum/l;return{bonus:t.sum,bonusRate:a*n}}(N,m);return{total:a+y+P,bonus:P,profit:y,effectiveRate:null!==(t=e.effectiveRate)&&void 0!==t?t:j,bonusRate:A,endOfTerm:C}}},39402:function(e,t,a){"use strict";a.d(t,{_:function(){return n}});var l=a(91220);function n(e){let{asPath:t,firstBaseUrl:a,productId:n,optionId:o,amount:r,durationValue:s,secondBaseUrl:c,passAggregatorId:u=!1,passCombo:d=!1}=e,{utm_campaign:_,utm_medium:p,utm_source:f,utm_term:m,aggregator_id:v}=(0,l.p)(t,"#"),{partner_id:h}=(0,l.p)(t,"?"),g=u?v:h;return{urlFirst:i(new URL("/add-product",a),{aggregatorId:null!=g?g:"moex-mp-new-sc",productId:n,optionId:o,amount:r,durationValue:s,utm_campaign:_,utm_medium:p,utm_source:f,utm_term:m,...d?{from:"combo"}:null}).toString(),urlSecond:c&&i(new URL(c),{amount:r,durationValue:s,utm_campaign:_,utm_medium:p,utm_source:f,utm_term:m,...d?{from:"combo"}:null}).toString()}}function i(e,t){let a=new URL(e);return Object.entries(t).forEach(e=>{let[t,l]=e;if(null!=l){if(Array.isArray(l))return l.forEach(e=>a.searchParams.append(t,String(e)));a.searchParams.set(t,String(l))}}),a}},39666:function(e,t,a){"use strict";a.d(t,{Y:function(){return l}});let l=e=>e.length?e[0].toUpperCase()+e.slice(1):""},23769:function(e,t,a){"use strict";a.d(t,{E:function(){return o}});var l=a(91627),n=a(36578);let i=e=>{let t=Math.floor(e/12),a=e%12,l=[];return t&&l.push((0,n.PY)(t,["год","года","лет"])),a&&l.push("".concat(a," мес")),l.join(" ")||"0 мес"},o=e=>i(Math.round(e/l.F))},2493:function(e,t,a){"use strict";a.d(t,{_:function(){return l}});let l=e=>{"Enter"===e.key&&e.currentTarget.blur()}},89911:function(e,t,a){"use strict";a.d(t,{d:function(){return o}});var l=a(75461),n=a(2265),i=a(2938);function o(e,t,a){let{disabled:o=!1,separateLoaders:r=!1,ssrLoader:s=!1,...c}=null!=a?a:{},u=(0,l.s4)(),d=(0,i.ZP)(o?null:e,t,{revalidateOnFocus:!1,...c}),{isLoading:_,isValidating:p}=d,f=_||!!s&&!u&&!o,m=f||p;return(0,n.useMemo)(()=>({...d,isLoading:r?f:m,isValidating:r?p:m}),[m,f,p,r,d])}},32443:function(e,t,a){"use strict";a.d(t,{B:function(){return o}});var l=a(67356),n=a(14862),i=a(89911);function o(e){let{disabled:t}=null!=e?e:{},{data:a,isLoading:o}=(0,i.d)("login-widget",()=>(0,l.g)(n.m.LK_API),{disabled:t});return{widgetConfig:a,isWidgetDataLoading:o}}},50487:function(e,t,a){"use strict";a.d(t,{G:function(){return o}});var l=a(2265),n=a(70104),i=a(36578);let o=function(){let{type:e="text",unit:t,format:a,defaultValue:o="",maxLength:r=-1,maxFractionalLength:s=-1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[c,u]=(0,l.useState)(o),d=(0,l.useRef)(c),[_,p]=(0,l.useState)(!1),f=(0,l.useCallback)((t,a)=>{"function"==typeof t&&(t=t(d.current));let l=String(t);if(!(r>-1)||!(l.length>r)){if(["int","float"].includes(e)){var n;if(isNaN(+t)||"int"===e&&l.includes(".")||"0"===l||l.includes(" ")||s>-1&&(null===(n=l.split(".")[1])||void 0===n?void 0:n.length)>s)return}d.current=l,u(l),null==a||a(l)}},[s,r,e]),m=(0,l.useMemo)(()=>({onChange:e=>f(e.currentTarget.value),onFocus:()=>p(!0),onBlur:()=>p(!1)}),[f]),v=(0,l.useMemo)(()=>{let l=c;"currency"===a&&["int","float"].includes(e)&&""!==c&&(l=(0,n.Y4)(+c));let o=(()=>{if(""===l)return"";switch(t){case"year":return(0,i._6)(+c,"год","года","лет");case"day":return(0,i._6)(+c,"день","дня","дней");default:return t||""}})();return o&&["int","float"].includes(e)?"".concat(l," ").concat(o):l},[a,e,t,c]);return(0,l.useMemo)(()=>({events:m,value:c,formattedValue:v,isFocused:_,handleChange:f}),[m,v,f,_,c])}},73927:function(e){e.exports={title:"Calculator_title__aC5Ud",container:"Calculator_container__vQuJ0",marginNone:"Calculator_marginNone__Hjy2l",collapseArrow:"Calculator_collapseArrow__Fm8Vk",collapseArrowOpened:"Calculator_collapseArrowOpened__Fbqar",fieldsContainer:"Calculator_fieldsContainer__5Rp05",initialCollapsed:"Calculator_initialCollapsed__GdleE",typeDescription:"Calculator_typeDescription__WHZqi",link:"Calculator_link__vCq4i",chips:"Calculator_chips__iGG5T",initialChips:"Calculator_initialChips__oiuSI",disclaimer:"Calculator_disclaimer__gr2ty"}},82042:function(e){e.exports={disclaimer:"DepositDisclaimer_disclaimer__pgXpL",iconASV:"DepositDisclaimer_iconASV__Ai2QW"}},33176:function(e){e.exports={title:"ArchivePromo_title__TJIJ7",container:"ArchivePromo_container__5L_r6",text:"ArchivePromo_text__nMo9K",button:"ArchivePromo_button__f_l5V"}},281:function(e){e.exports={tag:"Tag_tag__F7OOH",tagPrimary:"Tag_tagPrimary__avetL",tagSecondary:"Tag_tagSecondary__RMaKP",tagPink:"Tag_tagPink__YGm7U",tagYellow:"Tag_tagYellow__wh7Mz",text:"Tag_text__nOOMV",detail:"Tag_detail__xPW1b",detailIcon:"Tag_detailIcon__LNOTP"}},96024:function(e){e.exports={calculator:"DepositDetailCalculator_calculator__uCc_u",fieldsContainer:"DepositDetailCalculator_fieldsContainer__3ISJQ",input:"DepositDetailCalculator_input__lPHyT",inputError:"DepositDetailCalculator_inputError__9cOsR",inputRange:"DepositDetailCalculator_inputRange__eJR5n",chips:"DepositDetailCalculator_chips__mCKtS",legend:"DepositDetailCalculator_legend__GHEvN",chipsForm:"DepositDetailCalculator_chipsForm__UbRs_",collapseArrow:"DepositDetailCalculator_collapseArrow__zmlRp",collapseArrowOpened:"DepositDetailCalculator_collapseArrowOpened__DhduM",collapseArrowTitle:"DepositDetailCalculator_collapseArrowTitle__0v1_i",disclaimer:"DepositDetailCalculator_disclaimer___flSu",additionalButton:"DepositDetailCalculator_additionalButton__ViyCi",additionalContainer:"DepositDetailCalculator_additionalContainer__8sYDD",container:"DepositDetailCalculator_container__AXiy6",containerFull:"DepositDetailCalculator_containerFull__QUh5a",promo:"DepositDetailCalculator_promo__KDFX3",left:"DepositDetailCalculator_left__V9V0j",right:"DepositDetailCalculator_right__U4ABf",qrDesc:"DepositDetailCalculator_qrDesc__Fixg5",wide:"DepositDetailCalculator_wide__ItjPd",fivePercent:"DepositDetailCalculator_fivePercent__OgP8O",typeDescription:"DepositDetailCalculator_typeDescription__Nynxc",infoIcon:"DepositDetailCalculator_infoIcon__17O3e",expenseHead:"DepositDetailCalculator_expenseHead___7xlC",expenseSub:"DepositDetailCalculator_expenseSub__pnhPg"}},56257:function(e){e.exports={container:"DepositDetailCompute_container__wgV0n",containerChart:"DepositDetailCompute_containerChart__QUao0",info:"DepositDetailCompute_info___pqT7",tags:"DepositDetailCompute_tags__Le8d7",tag:"DepositDetailCompute_tag__DV451",button:"DepositDetailCompute_button__qK6jL",loginWidget:"DepositDetailCompute_loginWidget__3hRgV",detailIcon:"DepositDetailCompute_detailIcon__8lmnN",chart:"DepositDetailCompute_chart__S_HP1",chartVisible:"DepositDetailCompute_chartVisible__STX_r",tooltipLink:"DepositDetailCompute_tooltipLink__4gESn",buttonIcon:"DepositDetailCompute_buttonIcon__Zi3GE",disclaimer:"DepositDetailCompute_disclaimer__ZofBY",singleToggle:"DepositDetailCompute_singleToggle__tFiQ1"}},28734:function(e){e.exports={head:"Header_head__lMUs0",title:"Header_title__r4Wa_",result:"Header_result__SKeZv",resultText:"Header_resultText__UbYRQ",resultTextFloat:"Header_resultTextFloat__D5t0r",resultButton:"Header_resultButton__jXHD7",resultIcon:"Header_resultIcon__dJ1wD",chartButton:"Header_chartButton__AmKiY"}},32817:function(e){e.exports={skeletonContainer:"HeaderSkeleton_skeletonContainer___dhhJ",visible:"HeaderSkeleton_visible__arkXP",skeletonProfit:"HeaderSkeleton_skeletonProfit__PGN7g",skeletonDate:"HeaderSkeleton_skeletonDate__QrnJO"}},23e3:function(e){e.exports={skeletonContainer:"ProfitSkeleton_skeletonContainer__33exZ",visible:"ProfitSkeleton_visible__StSgI",skeleton:"ProfitSkeleton_skeleton___lU6r"}},90297:function(e){e.exports={values:"ValueList_values__mGunQ",value:"ValueList_value__RRvlg",valueDash:"ValueList_valueDash__mwitD",detail:"ValueList_detail__6tgWx",toggle:"ValueList_toggle__tin7w"}},57291:function(e,t){"use strict";t.Z={src:"/deposits/_next/static/media/ASV-square.38b9e507.svg",height:24,width:24,blurWidth:0,blurHeight:0}},44587:function(e,t){"use strict";t.Z={src:"/deposits/_next/static/media/detailed.37f1b990.svg",height:16,width:16,blurWidth:0,blurHeight:0}}}]);