(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2235],{76558:function(e,t,a){"use strict";a.d(t,{Y:function(){return c}});var l=a(57437),n=a(34734),i=a(20703),o=a(2265),r={src:"/deposits/_next/static/media/ASV-square.dfc8f22f.svg",height:24,width:24,blurWidth:0,blurHeight:0},s=a(67508),u=a.n(s);let c=(0,o.memo)(e=>{let{text:t,className:a,hideIcon:o=!1}=e;return(0,l.jsxs)("p",{className:(0,n.Z)(u().disclaimer,a),children:[!o&&(0,l.jsx)(i.default,{className:u().iconASV,src:r,alt:"Иконка АСВ"}),t]})});c.displayName="DepositDisclaimer"},21185:function(e,t,a){"use strict";a.d(t,{TE:function(){return c},S6:function(){return u}});var l=a(57425),n=a(10414),i=a(55961);let o=e=>{let t=Math.floor(e/12),a=e%12,l=[];return t&&l.push((0,i.PY)(t,["год","года","лет"])),a&&l.push("".concat(a," мес")),l.join(" ")||"0 мес"},r=e=>o(Math.round(e/n.F)),s=(e,t,a,l)=>e.filter(e=>{var n,i;let o=null!==(n=e.amount_from)&&void 0!==n?n:a,r=null!==(i=e.amount_to)&&void 0!==i?i:l;return t>=o&&t<=r}).sort((e,t)=>e.term_from-t.term_from),u=e=>{let t=String(e.rate).replace(".",",");return{tag:e.tag,id:e.term_from,value:e.term_from,label:"".concat(r(e.term_from)," - ").concat(t,"%"),rate:e.rate}},c=(e,t)=>{var a;let n=null===(a=e.interest_rate.rates)||void 0===a?void 0:a[0],i=(null==n?void 0:n.term_from)===(null==n?void 0:n.term_to),o=(0,l.j)(e.currency_id),r=Number(e.amount.from||o.from),c=Number(e.amount.to||o.to),d=s(e.interest_rate.rates,t,r,c),m=d.map(u),_=d.map(e=>e.term_to);return{minSum:r,maxSum:c,isFixedTerms:i,termChips:m,minTerm:Math.min(...d.map(e=>e.term_from)),maxTerm:Math.max(..._),terms:d}}},52235:function(e,t,a){"use strict";a.d(t,{O:function(){return er}});var l=a(57437),n=a(7301),i=a(34734),o=a(93574),r=a.n(o),s=a(20564),u=a(2265),c=a(61810),d=a(20703),m=a(88776),_=a(79976),p=a(54328),v=a(53881),f=a(16243),h=a(93880),g=a(11370),C=a(76558),x=a(29748),D=a.n(x);let b=(0,u.memo)(e=>{let{title:t,content:a,pageUrl:o,infoLink:r,chips:s,isMobile:x,isShowChips:b,isExpandSettings:N,onToggleSettings:y,isSavingAccount:S,titleClassName:k,calculatorClassName:j,chevronSrc:A=m.Z,withNewMarkup:T,eventCategory:M,productId:w}=e,F=(0,c.s4)(),P=e=>{(0,v.D)({eventCategory:o,eventAction:v.i.popup,eventActionText:e}),null==y||y()},I=(0,g.Z)(10),R=(0,u.useCallback)(()=>{r&&(T&&(0,f.lQ)({eventCategory:M,eventLabel:w,eventAction:"click_".concat((0,h.b)(r.text))}),(0,n.ld)(r.idScrollBlock,{offset:I,position:"top"}))},[M,r,w,I,T]);return(0,l.jsxs)(n.W2,{className:(0,i.Z)(D().container,j),children:[(0,l.jsxs)("button",{className:(0,i.Z)(D().title,S&&D().marginNone,k),"data-testid":"calculator-settings-button",onClick:()=>P(t),children:[t,(0,l.jsx)(d.default,{className:(0,i.Z)(D().collapseArrow,N&&D().collapseArrowOpened),src:A,alt:""})]}),(0,l.jsxs)(p.u,{className:(0,i.Z)(D().fieldsContainer,!F&&D().initialCollapsed),isOpen:N||!x,children:[(0,l.jsx)("div",{className:D().fieldsWrapper,children:a}),(0,l.jsx)(C.Y,{className:D().disclaimer,text:"Все ".concat(S?"счета":"вклады"," застрахованы в АСВ")})]}),r&&r.isShow&&(0,l.jsx)(_.j,{offPadding:r.offPadding,widthMaxContent:r.widthMaxContent,text:r.text,iconColor:"light",mainPageUrl:o,className:D().link,onClick:R,isCustomMarkup:T}),b&&!S&&(0,l.jsx)(n.ev,{className:(0,i.Z)(D().chips,!F&&D().initialChips),options:s,selected:s,multiple:!0,theme:"secondary",size:"medium"})]})});b.displayName="Calculator";var N=a(54417),y=a(74059),S=a(72040),k=a(99198),j=a.n(k);let A=(0,u.memo)(e=>{let{className:t,url:a,text:o,title:r}=e;return(0,l.jsxs)(n.W2,{className:(0,i.Z)(j().container,t),children:[(0,l.jsx)("h3",{className:j().title,dangerouslySetInnerHTML:{__html:r}}),(0,l.jsx)("h4",{className:j().text,dangerouslySetInnerHTML:{__html:o}}),(0,l.jsx)(n.zx,{as:"a",variant:"purple",href:"/".concat(a),onClick:()=>{(0,v.D)({eventCategory:a,eventAction:v.i.button,eventActionText:"Подобрать предложение",url:"".concat((0,s.OB)("NEXT_PUBLIC_BASE_URL"),"/").concat(a)})},className:j().button,children:"Подобрать предложения"})]})});A.displayName="ArchivePromo";var T=a(34426),M=a(90926),w=a(72255);let F=(e,t)=>{if(e.period){let t=Number(e.period);return isNaN(t)?91:Math.round(30.4375*t)}if(e.d_period){let t=Number(e.d_period);return isNaN(t)?91:t}return(null==t?void 0:t.id)==="mkb-nakop"?t.defaultTermDays:1};var P=a(26094),I=a(32833),R=a(26290),E=a(15774),V=a(947),L=a.n(V);let O=(e,t,a)=>{switch(e){case 0:return"до ".concat((0,E.Y4)(t.maximumSumSpending)," ₽");case a.length-1:return"от ".concat((0,E.Y4)(t.minimumSumSpending)," ₽");default:return"".concat((0,E.Y4)(t.minimumSumSpending)," ₽ - ").concat((0,E.Y4)(t.maximumSumSpending)," ₽")}},Z=e=>{let{data:t,handleMainRate:a}=e,[n,o]=(0,u.useState)(!0),[r,s]=(0,u.useState)(0),d=(0,u.useCallback)(e=>{s(Number(e))},[]),m=(0,u.useCallback)(e=>{o(e)},[]),_=t.filter(e=>e.bankInfluenceEvent===R.D1.SALARY_OR_PENSION)[0],p=t.filter(e=>e.bankInfluenceEvent===R.D1.SPENDING).sort((e,t)=>e.minimumSumSpending-t.minimumSumSpending).map((e,t,a)=>({label:O(t,e,a),valueMin:e.minimumSumSpending,valueMAx:e.maximumSumSpending,bonus:e.bonusPercentageValue,hint:e.influenceEventHintText})),v=p.map(e=>({id:e.bonus,label:e.label})),f=Math.max(...v.map(e=>e.id),0),h=(0,u.useMemo)(()=>n?_.bonusPercentageValue:0,[n,_.bonusPercentageValue]),g=(0,u.useMemo)(()=>{var e,t;return null!==(t=null===(e=p.find(e=>e.bonus===r))||void 0===e?void 0:e.hint)&&void 0!==t?t:""},[p,r]),C=(0,u.useMemo)(()=>r+h,[h,r]);return(0,u.useEffect)(()=>{s(f)},[f]),(0,u.useEffect)(()=>{a(C)},[a,C]),(0,l.jsxs)("div",{className:L().wrapper,children:[_&&(0,l.jsxs)("div",{className:L().item,children:[(0,l.jsx)("div",{className:L().label,children:(0,l.jsxs)(I.xv,{className:L().text,size:"16",children:["Зарплата на карту",(0,l.jsx)(c.kW,{dataId:"salary-toggle",className:L().hint,text:_.influenceEventHintText,children:(0,l.jsx)(P.IconFdsQuestionCircleO,{size:24,style:{color:"var(--color-gray-800)"}})})]})}),(0,l.jsx)("div",{className:L().splitter}),(0,l.jsx)("div",{className:L().controll,children:(0,l.jsx)(c.ZD,{value:n,style:{color:"var(--color-purple-600)"},flipped:!0,label:"+".concat((0,E.Y4)(_.bonusPercentageValue,2)," %"),onChange:m})})]}),p.length&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:(0,i.Z)(L().item,L().spending),children:[(0,l.jsxs)("div",{className:L().label,children:[(0,l.jsxs)(I.xv,{className:L().text,size:"16",children:["Траты по карте в месяц",(0,l.jsx)(c.kW,{className:L().hint,text:g,children:(0,l.jsx)(P.IconFdsQuestionCircleO,{size:24,style:{color:"#6C6D78"}})})]}),(0,l.jsx)("div",{className:L().spendingPercent,children:"+".concat((0,E.Y4)(r,2)," %")})]}),(0,l.jsx)(I.xv,{className:L().tip,size:"16",fontFamily:"primary",children:"От них зависит ставка по вкладу"})]}),(0,l.jsx)(c.cL,{value:r,className:L().chips,variant:"secondary",chips:v,onChipClick:d})]})]})};var B=a(45706),Y=a(92192),z=a(65169);let U=e=>{"Enter"===e.key&&e.currentTarget.blur()};var H=a(13107),Q=a(23845),q=a(8776),W=a(92488),G=a(24508),K=a(19897),J=a.n(K),X=a(22567);let $=e=>{let{data:t,currentRate:a,urlFirst:l,urlSecond:n}=e;return t.online_application.commercial&&t.online_application.url?t.online_application.url:(null==a?void 0:a.optionId)?l:n};var ee=a(55961);let et=(e,t,a)=>{if(void 0!==a){if(+a<e)return"Минимальная сумма - ".concat((0,E.Y4)(e)," ₽");if(+a>t)return"Максимальная сумма - ".concat((0,E.Y4)(t)," ₽")}},ea=(e,t,a)=>{if(void 0!==a){if(+a<e)return"Минимальный срок - ".concat((0,E.Y4)(e)," ").concat((0,ee._6)(e,"день","дня","дней"));if(+a>t)return"Максимальный срок - ".concat((0,E.Y4)(t)," ").concat((0,ee._6)(t,"день","дня","дней"))}};var el=a(21185);let en=(e,t,a)=>e<t?t:e>a?a:e,ei=(e,t)=>e.term_from<=t&&t<=e.term_to?0:t<e.term_from?Math.round(e.term_from-t):Math.round(t-e.term_to),eo=(e,t,a)=>{let l=a.filter(t=>{var a,l;return e>=(null!==(a=t.amount_from)&&void 0!==a?a:0)&&e<=(null!==(l=t.amount_to)&&void 0!==l?l:1/0)}).sort((e,a)=>ei(e,t)-ei(a,t))[0];return l&&(0,el.S6)(l)},er=e=>{var t,a,o,c,d,m,_;let{isMobile:p,data:v,depositType:C,onChangeData:x,discount:D,isOldUser:k,isPlusFiveBonus:j,company:P,extraInfo:I,isShowDepositTip:R,asModal:E=!1,className:V,titleClassName:L,initialAmount:O,initialTermInMonths:K,customActions:ee,shortChipsList:ei=!1,firstDepositBonusTitle:er=!1,pageUrl:es="vklady",isHidePromo:eu=!1,promoClassName:ec,calculatorClassName:ed,computeClassName:em,inputSize:e_="small",withChart:ep=!0,collapseChevronSrc:ev,tipIcon:ef,tagIcon:eh,customTagTitle:eg,hideShareLinks:eC=!1,hideExternalLinks:ex=!1,amountInputLabel:eD="",isPromoTag:eb=!0,computeHeader:eN,computeTag:ey,withNewMarkup:eS,eventCategory:ek}=e,{asPath:ej,hash:eA}=(0,H.P)(),[eT,eM]=(0,u.useState)(!1),ew=(0,u.useRef)(null),eF=(0,u.useRef)(null),eP=(0,u.useRef)(null),[eI,eR]=(0,u.useState)(!1),[eE,eV]=(0,u.useState)(null),[eL,eO]=(0,u.useState)(),[eZ,eB]=(0,u.useState)(()=>{var e,t;if((null===(e=I.algo)||void 0===e?void 0:e.id)!=="mkb-nakop")return;let{expenseChips:a,defaultExpenseChip:l}=I.algo;return null!==(t=a.find(e=>e.id===l))&&void 0!==t?t:a.at(-1)}),[eY,ez]=(0,u.useState)(()=>{var e;return(null===(e=I.algo)||void 0===e?void 0:e.id)==="mkb-nakop"&&I.algo.salaryToggleDefaultValue}),eU=(0,g.Z)(),eH=(0,Y.z)(v.currency_id),{events:eQ,value:eq,formattedValue:eW,isFocused:eG,handleChange:eK}=(0,Q.G)({type:"float",format:"currency",unit:eH.unit,defaultValue:String(v.amount.from),maxLength:20,maxFractionalLength:2}),{events:eJ,value:eX,formattedValue:e$,isFocused:e0,handleChange:e1}=(0,Q.G)({type:"int",unit:"day",maxLength:10,defaultValue:()=>{var e;return(null===(e=I.algo)||void 0===e?void 0:e.id)==="mkb-nakop"?String(I.algo.defaultTermDays):"1"}}),{isFixedTerms:e2,termChips:e4,minSum:e5,maxSum:e7,minTerm:e6,maxTerm:e3}=(0,u.useMemo)(()=>{var e;let t=(0,el.TE)(v,Number(eq));return(null===(e=I.algo)||void 0===e?void 0:e.id)==="mkb-nakop"&&(t.maxSum=I.algo.maxAmount,t.minSum=I.algo.minAmount),t},[v,I.algo,eq]),e9=C===M.P.isArchiveDeposit,e8=!I.algo&&e2&&eL?eL.value:eX,te=!!v.type.saving_account,tt=(0,u.useMemo)(()=>{let e=[];return e2&&eL&&!Array.isArray(eL)&&e.push(eL),!e2&&eX&&e.push({label:e$,id:"term"}),eq&&e.push({label:eW,id:"amount"}),e},[e2,eL,eW,eq,e$,eX]),ta=(0,u.useMemo)(()=>v.interest_rate.rates.find(e=>{var t;let a=0===e.amount_from||null===e.amount_from?e5:e.amount_from,l=null!==(t=e.amount_to)&&void 0!==t?t:e7;return+e8>=e.term_from&&(te||+e8<=e.term_to)&&+eq>=a&&+eq<=l}),[e8,v.interest_rate.rates,te,e7,e5,eq]),tl=(0,u.useMemo)(()=>{if(I.algo){if("mkb-nakop"===I.algo.id&&eZ)return eY?eZ.rateWithSalary:eZ.rate}else if(ta)return ta.rate;return 0},[ta,I.algo,eY,eZ]),tn=(0,u.useMemo)(()=>{var e;if(!(e2?null==eL?void 0:eL.value:eX))return;let t=v.interest_rate.rates.sort((e,t)=>{var a,l;return(null!==(a=e.amount_from)&&void 0!==a?a:e5)-(null!==(l=t.amount_from)&&void 0!==l?l:e7)}),a=null===(e=t.find(e=>(null==ta?void 0:ta.amount_from)&&e.amount_from&&e.amount_from>ta.amount_from))||void 0===e?void 0:e.amount_from;return t.find(e=>ta&&e.amount_from===a&&e.term_from===ta.term_from)},[ta,v,e2,e7,e5,eL,eX]),ti=(0,u.useMemo)(()=>ta&&eE&&ta.amount_from?{difference:ta.rate-eE.rate,minAmount:ta.amount_from}:tn&&ta&&tn.amount_from?{difference:tn.rate-ta.rate,minAmount:tn.amount_from}:void 0,[tn,ta,eE]),{urlFirst:to,urlSecond:tr}=(0,B._)({asPath:ej,productId:v.id,optionId:null==ta?void 0:ta.optionId,amount:+eq,durationValue:v.asSavingAccount?void 0:e8,firstBaseUrl:null!==(d=(0,s.OB)("NEXT_PUBLIC_MOEX_AD_URI"))&&void 0!==d?d:"",secondBaseUrl:null==ta?void 0:null===(t=ta.mp)||void 0===t?void 0:t.url}),ts=$({data:v,currentRate:ta,urlFirst:to,urlSecond:tr}),tu=et(e5,e7,eq),tc=tu||0===e3?void 0:ea(e6,e3,eX),td=(0,u.useCallback)(()=>{eV(null),eR(!1)},[]),tm=(0,u.useCallback)(e=>{eK(e.currentTarget.value.replace(",",".")),td()},[eK,td]),t_=(0,u.useCallback)(e=>{eJ.onChange(e),td()},[td,eJ]),tp=(0,u.useCallback)(()=>{var e;p&&ew.current&&(eM(!0),ew.current&&(0,n.ld)(ew.current,{offset:eU,position:"top",delay:300})),p||null===(e=eF.current)||void 0===e||e.focus()},[p,eU]),tv=(0,u.useCallback)(e=>{if(e&&!Array.isArray(e)){let t=(0,h.b)(e.label);(0,f.lQ)({event:"data-event",eventAction:eS?"click_srok_"+t:"click_button_".concat(t),eventCategory:eS?ek:es,eventLabel:v.id}),eO(e)}td()},[v.id,ek,es,td,eS]),tf=(0,u.useCallback)(e=>{e&&tn&&tn.amount_from?(ta&&eV(ta),eK(tn.amount_from),e2?eO((0,el.S6)(tn)):e1(tn.term_from),eR(!0)):e||((null==eE?void 0:eE.amount_from)&&(eK(eE.amount_from),e2?eO((0,el.S6)(eE)):e1(eE.term_from),eV(null)),eR(!1))},[tn,ta,eK,e1,e2,eE]);(0,u.useEffect)(()=>{if(r()(eP.current,eA))return;let e={amount:null!=O?O:String(e5),period:null!=K?K:null,d_period:0,...eA},t=F(e,I.algo),a=en(+e.amount,e5,e7);eK(a),eO(eo(a,t,v.interest_rate.rates)),e1(t),eP.current=eA},[v.interest_rate.rates,I.algo,eK,e1,eA,O,K,e7,e5]),(0,u.useEffect)(()=>{eP.current&&eO(e=>{let t=e4.find(t=>t.label===(null==e?void 0:e.label));if(t)return t;let a=e4.find(t=>t.value===(null==e?void 0:e.value));return null!=a?a:e4[0]})},[e4]),(0,u.useEffect)(()=>{eP.current&&isFinite(e6)&&e1(e=>+e>e3?e3:+e<e6?e6:e)},[e1,e3,e6]),(0,u.useEffect)(()=>{x({amount:+eq,term:+e8,optionId:null==ta?void 0:ta.optionId,appUrl:ts})},[ts,null==ta?void 0:ta.optionId,e8,x,eq]);let th=e=>{var t;return(0,l.jsx)(S.F,{data:{url:v.url,title:v.title,id:v.id},bank:{logoMob:null==P?void 0:P.logo_mob,url:null==P?void 0:P.url,name:null!==(t=null==P?void 0:P.name)&&void 0!==t?t:v.bank_name},pageUrl:T.N9.VKLADY,titlePromo:te?" Накопительный счёт":" Вклад",tagTheme:te?"blue":"orange",title:v.bank_name,archiveText:" Этот вклад уже нельзя открыть. Посмотрите свежие предложения на нашей витрине",isMobile:p,isArchive:e9,isSmall:e,className:(0,i.Z)(ec,!e9&&J().promo),withNewMarkup:eS,eventCategory:ek,hideShareLinks:eC,isTag:eb})},tg=(0,u.useCallback)(()=>{eS&&(0,f.lQ)({eventAction:"input_form_amount_"+eq,eventCategory:ek,eventLabel:String(v.id)}),eQ.onBlur()},[v.id,ek,eQ,eq,eS]),tC=(0,u.useCallback)(()=>{eS&&(0,f.lQ)({eventAction:"input_form_term_"+(0,h.b)(e$),eventCategory:ek,eventLabel:String(v.id)}),eJ.onBlur()},[v.id,ek,eJ,e$,eS]),[tx,tD]=(0,u.useState)(0),tb=(0,u.useCallback)(e=>{tD(e)},[]),tN=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(n.lF,{label:eD,className:(0,i.Z)(J().input,tu&&J().inputError),placeholder:"Сумма",value:eG?eq.replace(".",","):eW,innerRef:eF,message:tu,status:tu?"error":void 0,max:20,onChange:tm,onFocus:eQ.onFocus,onBlur:tg,onKeyDown:U,size:e_}),!I.algo&&(0,l.jsxs)(l.Fragment,{children:[e2&&(0,l.jsx)(n.ev,{options:e4,onChange:tv,selected:eL,theme:"secondary",size:"medium",className:J().chipsForm}),!e2&&(0,l.jsx)(n.lF,{placeholder:"Срок",value:e0?eX:e$,status:tc?"error":void 0,message:tc,disabled:!!tu,max:20,onChange:t_,onFocus:eJ.onFocus,onBlur:tC,onKeyDown:U,className:(0,i.Z)(J().input,tc&&J().inputError),size:e_}),v.floatingRateInformations&&(0,l.jsx)(Z,{data:v.floatingRateInformations,handleMainRate:tb})]}),(null===(_=I.algo)||void 0===_?void 0:_.id)==="mkb-nakop"&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:(0,i.Z)(J().input,J().inputRange),children:(0,l.jsx)(n.lF,{label:"Срок",value:"".concat(Math.round(+e8/30.4375)," мес"),onlyRange:!0,rangeProps:{values:[Math.round(+e8/30.4375)],min:1,max:36,step:1,legend:[1,36],onChange:e=>{let[t]=e;e1(Math.round(30.4375*t))},formatValue:e=>(0,l.jsxs)("span",{className:J().legend,children:[e," мес"]})},size:e_})}),(0,l.jsx)("div",{className:J().expenseHead,children:(0,l.jsx)(n.qQ,{keyValue:"expense",iconClassName:J().infoIcon,text:(0,l.jsx)(l.Fragment,{children:"При определении суммы операций учитываются суммы, списанные со счета карты с последнего дня предыдущего месяца по предпоследний день текущего месяца (включительно). Не учитываются операции из списка исключений по учету сумм операций по оплате товаров и услуг, с которыми можно ознакомиться в разделе \xabДокументы\xbb на сайте МКБ"}),children:"Траты по карте в месяц"})}),(0,l.jsx)("div",{className:J().expenseSub,children:"От них зависит ставка накопительного счета"}),(0,l.jsx)(n.ev,{options:I.algo.expenseChips,onChange:e=>{var t;eB(null!=e?e:null===(t=I.algo)||void 0===t?void 0:t.expenseChips[0])},selected:eZ,theme:"secondary",size:"medium",className:J().chipsForm})]})]}),ty=(0,u.useMemo)(()=>D&&(0,z.qL)(D,k)?D.promo_code:void 0,[D,k]),tS=(0,u.useMemo)(()=>(0,q.Z)(v.interest_payment),[v.interest_payment]),tk=(0,u.useMemo)(()=>"".concat(eq,"_").concat(e8,"_").concat(null==ta?void 0:ta.rate,"%_").concat((0,h.b)(v.title),"_").concat((0,h.b)(v.bank_name),"_").concat(v.id),[null==ta?void 0:ta.rate,e8,v.bank_name,v.id,v.title,eq]),tj=void 0===ta&&e9;return(0,l.jsxs)(y.t,{className:(0,i.Z)(J().container,!e9&&J().containerFull,V),children:[!e9&&!eu&&th(),(0,l.jsxs)("div",{className:J().left,ref:ew,children:[e9&&(0,l.jsx)(A,{title:"Вклад в архиве",url:T.N9.VKLADY,text:"Его уже нельзя открыть. Но мы можем подобрать для Вас другие предложения от разных банков"}),!e9&&(0,l.jsx)(b,{isMobile:!!p,title:"Настройки ".concat(te?"счета":"вклада"),pageUrl:es,infoLink:{isShow:!E,text:"Подробнее о ".concat(te?"счете":"вкладе"),idScrollBlock:w.p6,offPadding:!0,widthMaxContent:!0},isSavingAccount:te,chips:tt,isShowChips:p&&!!(null==tt?void 0:tt.length)&&!eT,isExpandSettings:eT,onToggleSettings:p?()=>{eM(e=>!e),(0,f.lQ)({event:"data-event",eventAction:eS?"click__button__params__nastroyki_vklada":"click_button_nastroyki_vklada",eventCategory:ek,eventLabel:v.id})}:void 0,content:tN,titleClassName:L,calculatorClassName:ed,chevronSrc:ev,withNewMarkup:eS,eventCategory:ek,productId:String(v.id)}),!E&&!tj&&(0,l.jsx)(N.h2,{href:null==D?void 0:D.link,isMobile:p,isPlusFiveBonus:j,isOldUser:k,className:(0,i.Z)(J().qrDesc,!k&&J().fivePercent),promoCode:ty,withNewMarkup:eS,eventCategory:ek})]}),(0,l.jsxs)("div",{className:J().right,children:[e9&&!eu&&th(!0),!tj&&(0,l.jsx)(W.n,{rate:tx+tl,sum:Number(eq),term:Number(e8),productId:null!==(m=null==ta?void 0:null===(a=ta.mp)||void 0===a?void 0:a.product_id)&&void 0!==m?m:v.id,tag:null==eL?void 0:eL.tag,isMobile:p,onEdit:tp,appUrl:null!=ts?ts:v.online_application.url,depositType:C,onSwitchRate:tf,isRateSwitched:eI,switchRate:ti,isCapitalization:(null===(o=v.interest_capitalization)||void 0===o?void 0:o.has)===1&&0===v.partial_withdrawal.has&&(null===(c=v.refill)||void 0===c?void 0:c.has)===0||te,refillSum:"",percentType:G.kJ[0].value,period:(0,X.n)(v).value,refillType:G.k5[0].value,unit:eH.unit,tags:v.tags,discount:D,isSavingAccount:te,extraInfo:I,salaryToggle:eY,setSalaryToggle:ez,isShowDepositTip:R,isHideButtons:E||!!ee,paymentFrequency:tS,customActions:ee,shortChipsList:ei,firstDepositBonusTitle:er,scrollOffset:eU,computeClassName:em,withChart:ep,tipIcon:ef,tagIcon:eh,customTagTitle:eg,hideExternalLinks:ex,computeHeader:eN,computeTag:ey,withNewMarkup:eS,eventCategory:ek,totalValues:tk})]}),tj&&(0,l.jsx)(N.h2,{href:null==D?void 0:D.link,isMobile:p,isPlusFiveBonus:j,isOldUser:k,className:(0,i.Z)(J().qrDesc,!k&&J().fivePercent,J().wide),promoCode:ty,withNewMarkup:eS,eventCategory:ek})]})}},23845:function(e,t,a){"use strict";a.d(t,{G:function(){return o}});var l=a(2265),n=a(15774),i=a(55961);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]:{},[u,c]=(0,l.useState)(o),d=(0,l.useRef)(u),[m,_]=(0,l.useState)(!1),p=(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,c(l),null==a||a(l)}},[s,r,e]),v=(0,l.useMemo)(()=>({onChange:e=>p(e.currentTarget.value),onFocus:()=>_(!0),onBlur:()=>_(!1)}),[p]),f=(0,l.useMemo)(()=>{let l=u;"currency"===a&&["int","float"].includes(e)&&""!==u&&(l=(0,n.Y4)(+u));let o=(()=>{if(""===l)return"";switch(t){case"year":return(0,i._6)(+u,"год","года","лет");case"day":return(0,i._6)(+u,"день","дня","дней");default:return t||""}})();return o&&["int","float"].includes(e)?"".concat(l," ").concat(o):l},[a,e,t,u]);return(0,l.useMemo)(()=>({events:v,value:u,formattedValue:f,isFocused:m,handleChange:p}),[v,f,p,m,u])}},29748: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"}},67508:function(e){e.exports={disclaimer:"DepositDisclaimer_disclaimer__pgXpL",iconASV:"DepositDisclaimer_iconASV__Ai2QW"}},99198:function(e){e.exports={title:"ArchivePromo_title__TJIJ7",container:"ArchivePromo_container__5L_r6",text:"ArchivePromo_text__nMo9K",button:"ArchivePromo_button__f_l5V"}},19897: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"}},947:function(e){e.exports={wrapper:"DepositFloatingRateTypeCard_wrapper__GJQK_",item:"DepositFloatingRateTypeCard_item__SEVk6",spending:"DepositFloatingRateTypeCard_spending__7kx35",label:"DepositFloatingRateTypeCard_label__bitWV",text:"DepositFloatingRateTypeCard_text__W4oqZ",splitter:"DepositFloatingRateTypeCard_splitter__Mv71D",tip:"DepositFloatingRateTypeCard_tip__VapND",hint:"DepositFloatingRateTypeCard_hint__TSTDI",spendingPercent:"DepositFloatingRateTypeCard_spendingPercent__xTmOs",chips:"DepositFloatingRateTypeCard_chips__QGw0T"}}}]);