(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6285],{90199:function(e,t,n){"use strict";n.d(t,{Lp:function(){return m},VJ:function(){return _},X4:function(){return l},ID:function(){return c},iT:function(){return o},PT:function(){return r},qB:function(){return p},Cc:function(){return d},vI:function(){return u}});var a=n(24866),i=n(26719);let s=e=>e?Object.keys(e).filter(t=>e[t]).map(t=>"".concat(t,"=").concat(e[t])).join("&"):"",l=e=>{let t=s(e);return(0,i.t)("/money_data/Deposits.json".concat(t?"?".concat(t):""))},o=async e=>{var t;return null!==(t=(await (0,i.t)("/api/v1/products/by-product-ids",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}},{isMpSc:!0},!0)).data)&&void 0!==t?t:[]},r=async e=>{var t;let n=(0,a.xn)("/api/v1/products/tags",e);return null!==(t=(await (0,i.t)(n,null,{isMpSc:!0},!0)).data)&&void 0!==t?t:[]},u=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"active",t=arguments.length>1?arguments[1]:void 0,n=(0,a.jb)((0,a.xn)("/api/v1/deposits",e),null!=t?t:{});return(0,i.t)(n,null,{isNewApi:!0})},c=()=>{let e=(0,a.jb)("/api/v2/products/search",{productTypes:"DEPOSIT",filtersExpression:"#contentAttributes?.url != null  and T(java.util.Arrays).asList('REFERAL').contains(#contentAttributes?.integration?.integrationType.name())"});return(0,i.t)(e,{method:"GET"},{isProdCatApi:!0})},d=e=>{let t=(0,a.jb)("/api/v1/deposits/ids",{ids:e});return(0,i.t)(t,{method:"GET"},{isNewApi:!0})},m=e=>(0,i.t)("/api/v1/deposits/top/multi",{method:"POST",body:JSON.stringify(e)},{isNewApi:!0}),p=e=>(0,i.t)("/api/v1/deposits/no-auth/showcase",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}},{isNewApi:!0}),_=e=>(0,i.t)("/api/v1/deposits/active/income",{method:"POST",body:JSON.stringify(e),headers:{"Content-Type":"application/json"}},{isNewApi:!0})},53689:function(e,t,n){"use strict";n.d(t,{V:function(){return u}});var a=n(57437),i=n(34734),s={src:"/deposits/_next/static/media/detailed.37f1b990.svg",height:16,width:16,blurWidth:0,blurHeight:0},l=n(55004),o=n(85816),r=n.n(o);let u=e=>{let{className:t,text:n,tooltipText:o,theme:u="primary",tipIcon:c,onTooltipOpen:d}=e;return(0,a.jsx)("div",{className:(0,i.Z)(r().tag,{[r().tagPrimary]:"primary"===u,[r().tagSecondary]:"secondary"===u,[r().tagPink]:"pink"===u,[r().tagYellow]:"yellow"===u},t),children:o&&(0,a.jsx)(l.C,{className:r().detail,iconSrc:s,text:o,iconClassName:r().detailIcon,icon:c,onOpen:()=>null==d?void 0:d(n),children:(0,a.jsx)("span",{className:r().text,children:n})})})}},10414:function(e,t,n){"use strict";n.d(t,{F:function(){return a}});let a=30.416},24508:function(e,t,n){"use strict";n.d(t,{$k:function(){return i},k5:function(){return s},kJ:function(){return a}});let a=[{label:"Добавлять ко вкладу (капитализация)",value:"add"},{label:"Выплачивать",value:"dont_add"}],i=[{label:"В конце срока",value:"end"},{label:"Ежедневно",value:"daily"},{label:"Раз в месяц",value:"1"},{label:"Раз в квартал",value:"3"},{label:"Раз в полгода",value:"6"},{label:"Раз в год",value:"12"}],s=[{label:"Не предусмотрено",value:"0"},{label:"Раз в месяц",value:"1"},{label:"Раз в 2 месяца",value:"2"},{label:"Раз в квартал",value:"3"},{label:"Раз в 4 месяца",value:"4"},{label:"Раз в полгода",value:"6"},{label:"Раз в год",value:"12"}]},22567:function(e,t,n){"use strict";n.d(t,{n:function(){return i}});var a=n(24508);let i=e=>{var t;let n="end";return e.interest_payment.end&&(n="end"),e.interest_payment.annually&&(n="12"),e.interest_payment.half_year&&(n="6"),e.interest_payment.quarterly&&(n="3"),e.interest_payment.monthly&&(n="1"),e.interest_payment.daily&&(n="daily"),null!==(t=a.$k.find(e=>n===e.value))&&void 0!==t?t:a.$k[0]}},88316:function(e,t,n){"use strict";n.d(t,{n:function(){return W}});var a=n(57437);n(51593);var i=n(56034),s=n(7301),l=n(34734),o=n(2265),r=n(53689),u=n(90926),c=n(91895),d=n(24760),m=n(32833),p=n(34037),_=n.n(p);function h(e){let{loading:t}=e;return(0,a.jsxs)("div",{className:(0,l.Z)(_().skeletonContainer,t&&_().visible),children:[(0,a.jsx)(m.Od,{className:_().skeletonDate}),(0,a.jsx)(m.Od,{className:_().skeletonProfit})]})}var v=n(8792),f=n(55004),g=n(14073),y=n(69595),b=n.n(y);function x(e){let{rowCount:t,loading:n}=e;return(0,a.jsx)("div",{className:(0,l.Z)(b().skeletonContainer,n&&b().visible),children:Array.from(Array(t).keys()).map(e=>(0,a.jsx)(m.Od,{className:b().skeleton},e))})}var k=n(15774),D=n(16243),T=n(93880),j=n(1012),N=n.n(j);function C(e){var t;let{withNewMarkup:n,rate:i,effectiveRate:l,hideExternalLinks:r,profit:u,unit:c,extraInfo:d,isSavingAccount:m,salaryToggle:p,setSalaryToggle:_,discount:h,bonus:y,firstDepositBonusTitle:b,tipIcon:j,switchRate:C,onSwitchRate:A,isRateSwitched:w,eventCategory:P,productId:S,isCombo:I=!1,isLoading:O}=e,L=(0,o.useCallback)(()=>{A&&(A(!w),(0,D.lQ)({event:"data-event",eventAction:"click_button_perekluchit_stavku",eventCategory:P,eventLabel:S}))},[A,w,P,S]),E=(0,o.useCallback)(e=>()=>{(0,D.lQ)({event:"data-event",eventAction:"click_link_".concat((0,T.b)(e)),eventCategory:P,eventLabel:S})},[P,S]),B=(0,o.useMemo)(()=>{var e;let t=[{label:"Доход от банка",value:"".concat((0,k.Y4)(u,2)," ").concat(c)}];if((null===(e=d.algo)||void 0===e?void 0:e.id)==="mkb-nakop"&&t.push({label:"Открытие дебетовой карты",value:"Да",description:m&&null!=d.karta?d.karta.label:"Открывая счет, Вы соглашаетесь на оформление дебетовой карты банка"},{label:"Действие счета",value:"Бессрочно"},{label:"Зарплата или пенсия на карту МКБ",value:(0,a.jsx)(s.jw,{checked:p,className:N().singleToggle,onChange:()=>null==_?void 0:_(!p)}),description:(0,a.jsx)(a.Fragment,{children:"Процентная ставка применяется при условии зачисления заработной платы от юридических лиц и индивидуальных предпринимателей на картсчет Клиента, открытый в Банке или суммы пенсий от Фонда пенсионного и социального страхования Российской Федерации или иных органов (учреждений) на любой счет Клиента, открытый в Банке, поступивших в течение 60 календарных дней до каждой даты начисления процентов по счету."})}),i&&t.unshift({label:"Ставка",value:"".concat((0,k.Y4)(i,2),"%")}),l&&t.unshift({label:"Эффективная ставка",value:"".concat((0,k.Y4)(l,2),"%"),description:(0,a.jsxs)(a.Fragment,{children:["Иногда у вклада есть особенности — капитализация процентов, возможность пополнения или акция от банка. Дополнительные параметры меняют доход в большую или меньшую сторону, поэтому процент по эффективной ставке отличается от банковской. Он отражает доход корректнее."," ",!r&&(0,a.jsx)(v.default,{className:N().tooltipLink,target:"_self",onClick:E("Подробнее о том, как считать сложный процент"),href:"".concat(g._n,"/navigator/nakopit-i-sohranit/stat_chto_takoe_slozhnyj_procent_po_vkladu_i_kak_ego_poschitat?ysclid=lfmam3zaig67098551%22"),children:"Подробнее о том, как считать сложный процент"})]})}),h&&y){let e=I?"%":" ".concat(c);t.push({label:b?"Бонус за первый вклад":"Бонус от Финуслуг",value:"".concat((0,k.Y4)(y,2)).concat(e),description:null==h?void 0:h.description})}return t},[y,h,l,null===(t=d.algo)||void 0===t?void 0:t.id,d.karta,b,E,r,m,u,i,p,_,c,I]),M=!!C&&(null==C?void 0:C.difference)>0,R=M?"+".concat((0,k.Y4)(C.difference,1),"% к ставке"):null,Z=(0,o.useCallback)(e=>{(0,D.lQ)({eventAction:"click_question_".concat((0,T.b)(e)),eventCategory:P,eventLabel:S})},[P,S]);return(0,a.jsxs)("ul",{className:N().values,children:[(0,a.jsx)(x,{loading:O,rowCount:B.length}),B.map(e=>(0,a.jsxs)("li",{className:N().value,children:[(0,a.jsx)("div",{children:e.label}),e.description&&(0,a.jsx)(f.C,{text:e.description,className:N().detail,onOpen:()=>n&&Z(e.label),icon:j}),(0,a.jsx)("div",{className:N().valueDash}),(0,a.jsx)("div",{children:e.value})]},e.label)),M&&R&&(0,a.jsxs)("li",{className:N().value,children:[(0,a.jsx)("div",{children:R}),(0,a.jsx)(f.C,{text:"При сумме вклада от ".concat((0,k.Y4)(C.minAmount)," ₽"),className:N().detail,icon:j,onOpen:()=>n&&Z(R)}),(0,a.jsx)(s.jw,{onChange:L,checked:w,className:N().toggle,size:"small"})]})]})}var A=n(72255);let w=e=>{let{depositType:t,isHideButtons:n,isShowDepositTip:a,isSavingAccount:i}=e,s=t===u.P.isPlatformDeposit?"Как открыть вклад":"Где открыть вклад",l=t===u.P.isPlatformDeposit?"Как открыть накопительный счет":"Где открыть накопительный счет";return{helpButtonLabel:i?l:s,blockId:t===u.P.isPlatformDeposit?A.a6:A.VT,isShowMainButton:!n&&t===u.P.isPlatformDeposit||t===u.P.isLidgenDeposit,isShowHelpButton:t!==u.P.isArchiveDeposit&&a&&!n,isOfferText:t===u.P.isPlatformDeposit||t===u.P.isLidgenDeposit}};var P=n(36467),S=n(21822),I=n(56504),O=n(55160),L=n(54183),E=n(20703),B={src:"/deposits/_next/static/media/edit.c0611721.svg",height:16,width:16,blurWidth:0,blurHeight:0},M=n(82694),R=n(62984),Z=n(78386),K=n(95236),V=n(78840),F=n.n(V);function H(e){let{term:t,totalProfit:n,withChart:i,isChartOpen:s,isEditable:l=!0,endingDate:r,onEditButtonClick:u,onToggleChart:c}=e,d=(0,k.Y4)(n,2).split(","),m=(0,o.useMemo)(()=>r?(0,R.f)(r):function(e){let t=new Date;return(0,R.f)(M.Z.day(t,e))}(t),[r,t]);return(0,a.jsxs)("div",{className:F().head,children:[(0,a.jsxs)("h4",{className:F().title,children:["Накопите к ",m]}),(0,a.jsxs)("h5",{className:F().result,children:[(0,a.jsxs)("span",{className:F().resultText,children:[d[0],d[1]?(0,a.jsxs)(a.Fragment,{children:[",",(0,a.jsxs)("span",{className:F().resultTextFloat,children:[d[1]," ₽"]})]}):" ₽"]}),l&&(0,a.jsx)("button",{className:F().resultButton,onClick:u,children:(0,a.jsx)(E.default,{className:F().resultIcon,src:B,alt:"edit"})})]}),i&&(0,a.jsx)(Z.W,{onClick:c,className:F().chartButton,icon:s?K.d.arrowBack:K.d.chart,alt:"chart"})]})}var Y=n(54375),Q=n.n(Y);let U=(0,o.memo)(e=>{let{href:t,id:n,pageType:i,eventCategory:l,withNewMarkup:o,eventLabel:r}=e;return(0,a.jsx)(s.zx,{as:"a",className:Q().button,target:"_blank",href:t,size:"s",disabled:!t,onClick:()=>{(0,D.lQ)({event:"data-event",eventLabel:r,eventCategory:l,eventAction:o?"click_button_open_online":"open_in_bank_product",eventValue:null!=n?n:""})},children:i===u.P.isPlatformDeposit?"Открыть онлайн":"Перейти на сайт банка"})});U.displayName="MainButton";let z={highlights:null,title:null,description:null,variant:"secondary",primaryAuthProviders:["ALFA","SBER","TINKOFF","VTB","MTS","SOVCOM","PHONE"],additionalAuthProviders:[],extraAuthProviders:[],primaryTextOverride:"Открыть вклад"},W=(0,o.memo)(e=>{var t,n;let{onEdit:m,isMobile:p,rate:_,sum:v,term:f,tag:g,appUrl:y,discount:b,isRateSwitched:x,onSwitchRate:k,switchRate:j,isCapitalization:N,depositType:A,productId:E,unit:B,tags:M,isSavingAccount:R,extraInfo:Z,salaryToggle:K,setSalaryToggle:V,isShowDepositTip:F,isHideButtons:Y=!1,paymentFrequency:W,customActions:G,shortChipsList:J=!1,firstDepositBonusTitle:q=!1,scrollOffset:$,computeClassName:X,withChart:ee,tipIcon:et,tagIcon:en,customTagTitle:ea,hideExternalLinks:ei=!1,computeHeader:es,computeTag:el,eventCategory:eo,withNewMarkup:er,totalValues:eu,isEditable:ec=!0,isCombo:ed=!1,calculatedProfit:em,calculatedTotalProfit:ep,calculatedEffectiveRate:e_,calculatedBonus:eh,integrationType:ev,calculatedEndingDate:ef,isLoading:eg=!1}=e,[ey,eb]=(0,o.useState)(!1),ex=new Date;ex.setDate(ex.getDate()+f);let{total:ek,bonus:eD,effectiveRate:eT,profit:ej}=(0,I.Z)({depositSum:v,term:f,rate:_,isCapitalization:N,discount:A===u.P.isPlatformDeposit?b:null,period:d.Z.Day,paymentFrequency:W}),eN=em||ej,eC=ep||ek,eA=eh||eD,ew=function(e){let{integrationType:t}=e,{toggles:{FEATURE_TOGGLE_INTERNAL_REFERAL_LOGIN_ENABLED:n}}=(0,P.ND)(),a=(0,o.useMemo)(()=>(0,S.$1)(),[]),i=(null==a?void 0:a["auth.gtm_customer_id"])||null;return n&&"INTERNAL_REFERAL"===t&&!i}({integrationType:ev}),{helpButtonLabel:eP,blockId:eS,isShowMainButton:eI,isShowHelpButton:eO,isOfferText:eL}=w({depositType:A,isHideButtons:Y,isShowDepositTip:F,isSavingAccount:R}),eE=(0,o.useCallback)(()=>{(0,D.lQ)({event:"data-event",eventAction:er?"click_button_how_to_open":"click_button_".concat((0,T.b)(eP)),eventCategory:eo,eventLabel:E}),(0,s.ld)(eS,{offset:$,position:"top"})},[eS,eo,eP,E,$,er]),eB=(0,o.useCallback)(()=>{eb(e=>!e),(0,D.lQ)({event:"data-event",eventAction:"click_icon_diagramma",eventCategory:eo,eventLabel:E})},[eo,E]),eM=(0,o.useCallback)(()=>{m&&(m(),(0,D.lQ)({event:"data-event",eventAction:er?"click_pencil":"click_icon_redactirovanie",eventCategory:eo,eventLabel:E}))},[eo,m,E,er]),eR=(0,o.useCallback)(e=>{(0,D.lQ)({eventCategory:eo,eventLabel:E,eventAction:"click_chips_".concat((0,T.b)(e))})},[eo,E]),eZ=(0,o.useCallback)(()=>{var e;return g&&g.title?null!==(e=null==el?void 0:el(g))&&void 0!==e?e:(0,a.jsx)(r.V,{className:Q().tag,text:null!=ea?ea:g.title,tooltipText:g.description,tipIcon:en,onTooltipOpen:e=>er&&eR(e)}):null},[el,ea,eR,g,en,er]),{widgetConfig:eK,isWidgetDataLoading:eV}=(0,O.B)({disabled:!ew}),eF=(0,o.useCallback)(()=>{if(eI)return ew&&(eK||eV)?(0,a.jsx)(i.U,{baseUrl:c._S,s3AssetsUrl:c.S$,skeleton:(0,a.jsx)(s.zx,{pending:!0,className:Q().button,size:"s",label:"Открыть вклад",disabled:!0}),className:(0,l.Z)(Q().button,Q().loginWidget),serverConfig:eK?{...eK,consents:[],legalInfo:null}:void 0,config:z,query:{targetUri:y},isSilent:!0}):(0,a.jsx)(U,{href:y,id:E,pageType:A,eventCategory:eo,withNewMarkup:er,eventLabel:eu})},[eI,ew,eK,eV,y,E,A,eo,er,eu]);return(0,a.jsxs)(s.W2,{className:(0,l.Z)(Q().container,ey&&Q().containerChart,X),children:[null!==(n=null==es?void 0:es(eC,eM))&&void 0!==n?n:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(h,{loading:eg}),(0,a.jsx)(H,{term:f,totalProfit:eC,withChart:ee&&!ed,isChartOpen:ey,isEditable:ec,endingDate:ef,onEditButtonClick:eM,onToggleChart:eB})]}),(0,a.jsxs)("div",{className:Q().info,children:[(0,a.jsx)(L.H,{isMobile:p,className:(0,l.Z)(Q().chart,ey&&Q().chartVisible),sum:v,bonus:eD,profit:eN}),(0,a.jsxs)("div",{className:Q().tags,children:[!J&&(null==M?void 0:M.map(e=>{let{title:t,description:n}=e;return(0,a.jsx)(r.V,{className:Q().tag,text:t,tooltipText:n,theme:"pink",onTooltipOpen:eR},t)})),eZ(),!J&&(null===(t=Z.algo)||void 0===t?void 0:t.id)==="mkb-nakop"&&Z.algo.extraTag&&(0,a.jsx)(r.V,{className:Q().tag,...Z.algo.extraTag,onTooltipOpen:eR})]}),(0,a.jsx)(C,{withNewMarkup:er,rate:_,effectiveRate:e_||eT,hideExternalLinks:ei,profit:eN,unit:B,extraInfo:Z,isSavingAccount:R,salaryToggle:K,setSalaryToggle:V,discount:b,bonus:eA,firstDepositBonusTitle:q,tipIcon:et,switchRate:j,onSwitchRate:k,isRateSwitched:x,eventCategory:eo,productId:E,isCombo:ed,isLoading:eg}),null==G?void 0:G(f),eF(),eO&&(0,a.jsx)(s.zx,{onClick:eE,className:Q().button,size:"s",variant:"secondary",children:eP}),eL&&(0,a.jsx)("h3",{className:Q().disclaimer,children:"Предварительный расчет. Не является офертой"})]})]})});W.displayName="DepositDetailCompute"},58263:function(e,t,n){"use strict";n.r(t);var a=n(2265);t.default=(0,a.createContext)(void 0)},27406:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return l}});var a=n(57437),i=n(2265),s=n(58263);function l(e){let{children:t,siteConfig:n}=e,[l]=(0,i.useState)(n);return(0,a.jsx)(s.default.Provider,{value:l,children:t})}},36467:function(e,t,n){"use strict";n.d(t,{ZP:function(){return r.default},ND:function(){return o}}),(a=i||(i={})).Beeline="beeline",a.T2="t2",a.Megafon="megafon",i.Beeline,i.T2,i.Megafon,i.T2,i.Beeline,i.Megafon,i.T2,i.Beeline,i.Megafon;var a,i,s=n(2265),l=n(58263);function o(){let e=(0,s.useContext)(l.default);if(!e)throw Error("Site config was used out of context");return e}var r=n(27406)},82694:function(e,t,n){"use strict";var a=n(83595),i=n(24760);let s={[i.Z.Day]:(e,t)=>(0,a.I)(e,{days:t}),[i.Z.Month]:(e,t)=>(0,a.I)(e,{months:t}),[i.Z.Year]:(e,t)=>(0,a.I)(e,{years:t})};t.Z=s},56504:function(e,t,n){"use strict";n.d(t,{Z:function(){return _}});var a=n(44377),i=n(72697),s=n(83595),l=n(43807),o=n(19852),r=n(8592),u=n(10414),c=n(66653),d=n(24760),m=n(82694);function p(e){let{capitalization:t,paymentFrequency:n,dateStart:a,termByYears:i,amount:s,averageRate:l,termInDays:o}=e;if(t){let e=l/100;if(n===c.Z.OnceAMonth){let t=o/u.F,n=s*Math.pow(1+e/12,t)-s,a=n/s/t*1200;return{profit:n,effectiveRate:a}}if(n===c.Z.EveryDay){let t=i.reduce((t,n)=>t*Math.pow(1+e/n.daysInYear,n.daysInInterval),s)-s,n=t/s/o*(0,r.y)(a)*100;return{profit:t,effectiveRate:n}}}return{profit:i.reduce((e,t)=>e+l/100*s/t.daysInYear*t.daysInInterval,0),effectiveRate:l}}function _(e){let{depositSum:t,term:n,rate:u,isCapitalization:c=!1,discount:_,period:h,paymentFrequency:v,dateStart:f=new Date}=e,g=m.Z[h](f,n),y=h===d.Z.Day?n:(0,o.w)(g,f),b=function(e,t,n){let u=(0,a.k)({start:e,end:t});return u.reduce((a,c,d)=>{let m=0===d?e:c,p=d===u.length-1?t:(0,i.u)((0,s.I)(m,{days:n}),{start:m,end:(0,s.I)((0,l.w)(c),{days:1})}),_=(0,o.w)(p,m);return 0===_?a:[...a,{daysInYear:(0,r.y)(c),daysInInterval:_}]},[])}(f,g,y),x={amount:t,paymentFrequency:v,dateEnd:g,dateStart:f,capitalization:c,termByYears:b,termInDays:y,averageRate:u},{profit:k,effectiveRate:D}=p(x),{bonus:T,bonusRate:j}=function(e,t){if(!t)return{bonus:0,bonusRate:0};let n=t.rate;if("fixedBonusAmount"in t&&t.fixedBonusAmount)return{bonus:t.fixedBonusAmount,bonusRate:n};let{profit:a}=p({...e,averageRate:n,capitalization:!1});if(a<t.sum)return{bonus:a,bonusRate:n};let i=t.sum/a;return{bonus:t.sum,bonusRate:n*i}}(x,_);return{total:t+k+T,bonus:T,profit:k,effectiveRate:D,bonusRate:j}}},46749:function(e,t,n){"use strict";n.d(t,{p:function(){return i}});class a{get hasKeysExistsSome(){return[...this.amountKeys,...this.termsKeys].some(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}get hasKeysExistsEvery(){return[...this.amountKeys,...this.termsKeys].every(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}get hasAmountKeys(){return this.amountKeys.some(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}get hasTermsKeys(){return this.termsKeys.some(e=>Object.prototype.hasOwnProperty.call(this.promotion,e))}checkMinMax(e,t,n){return(!!n||!!t)&&(n&&!t?e<=n:!n&&t?e>=t:e>=t&&e<=n)}getDiscountByAmount(){return this.checkMinMax(this.currentAmount,this.minAmount,this.maxAmount)}getDiscountByTerms(){return this.checkMinMax(this.terms,this.minTermInDays,this.maxTermInDays)}constructor(e,t){var n,a,i,s;this.promotion=e,this.minAmount=null!==(n=e.minAmount)&&void 0!==n?n:0,this.maxAmount=null!==(a=e.maxAmount)&&void 0!==a?a:0,this.minTermInDays=null!==(i=e.minTermInDays)&&void 0!==i?i:0,this.maxTermInDays=null!==(s=e.maxTermInDays)&&void 0!==s?s:0,this.terms=t.terms,this.currentAmount=t.currentAmount,this.amountKeys=["minAmount","maxAmount"],this.termsKeys=["minTermInDays","maxTermInDays"]}}let i=e=>{let{currentAmount:t,finuslugiBonusAllowed:n,isPlusFiveBonus:i,isOldUser:s,terms:l,finuslugiBonusPromotion:o}=e;if(!n)return!1;if(i)return!0;if(!o||!s)return!1;let r=new a(o,{terms:l,currentAmount:+t});return!r.hasAmountKeys&&!r.hasTermsKeys||(r.terms&&r.currentAmount||!r.hasKeysExistsEvery?!!(r.terms&&r.hasKeysExistsSome&&r.getDiscountByTerms())&&!!(r.currentAmount&&r.hasKeysExistsSome&&r.getDiscountByAmount()):r.getDiscountByTerms()&&r.getDiscountByAmount())}},45706:function(e,t,n){"use strict";n.d(t,{_:function(){return i}});var a=n(508);function i(e){let{asPath:t,firstBaseUrl:n,productId:i,optionId:l,amount:o,durationValue:r,secondBaseUrl:u,passAggregatorId:c=!1,passCombo:d=!1}=e,{utm_campaign:m,utm_medium:p,utm_source:_,utm_term:h,aggregator_id:v}=(0,a.p)(t,"#"),{partner_id:f}=(0,a.p)(t,"?"),g=c?v:f;return{urlFirst:s(new URL("/add-product",n),{aggregatorId:null!=g?g:"moex-mp-new-sc",productId:i,optionId:l,amount:o,durationValue:r,utm_campaign:m,utm_medium:p,utm_source:_,utm_term:h,...d?{from:"combo"}:null}).toString(),urlSecond:u&&s(new URL(u),{amount:o,durationValue:r,utm_campaign:m,utm_medium:p,utm_source:_,utm_term:h,...d?{from:"combo"}:null}).toString()}}function s(e,t){let n=new URL(e);return Object.entries(t).forEach(e=>{let[t,a]=e;if(null!=a){if(Array.isArray(a))return a.forEach(e=>n.searchParams.append(t,String(e)));n.searchParams.set(t,String(a))}}),n}},77693:function(e,t,n){"use strict";n.d(t,{d:function(){return s}});var a=n(2265),i=n(47212);function s(e,t,n){let{disabled:s=!1,separateLoaders:l=!1,...o}=null!=n?n:{},r=(0,i.ZP)(s?null:e,t,{revalidateOnFocus:!1,...o}),{isLoading:u,isValidating:c}=r,d=u||c;return(0,a.useMemo)(()=>({...r,isLoading:l?u:d,isValidating:l?c:d}),[d,u,c,l,r])}},55160:function(e,t,n){"use strict";n.d(t,{B:function(){return l}});var a=n(59358),i=n(91895),s=n(77693);function l(e){let{disabled:t}=null!=e?e:{},{data:n,isLoading:l}=(0,s.d)("login-widget",()=>(0,a.g)(i.Yy,"deposit"),{disabled:t});return{widgetConfig:n,isWidgetDataLoading:l}}},85816: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"}},54375: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"}},78840: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"}},34037:function(e){e.exports={skeletonContainer:"HeaderSkeleton_skeletonContainer___dhhJ",visible:"HeaderSkeleton_visible__arkXP",skeletonProfit:"HeaderSkeleton_skeletonProfit__PGN7g",skeletonDate:"HeaderSkeleton_skeletonDate__QrnJO"}},69595:function(e){e.exports={skeletonContainer:"ProfitSkeleton_skeletonContainer__33exZ",visible:"ProfitSkeleton_visible__StSgI",skeleton:"ProfitSkeleton_skeleton___lU6r"}},1012:function(e){e.exports={values:"ValueList_values__mGunQ",value:"ValueList_value__RRvlg",valueDash:"ValueList_valueDash__mwitD",detail:"ValueList_detail__6tgWx",toggle:"ValueList_toggle__tin7w"}}}]);