(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88673,e=>{"use strict";var t,a=e.i(94246),l=e.i(37819),s=((t={}).link="link",t.button="button",t.popup="popup",t.popdown="popdown",t.filterCatalog="filter_catalog",t.utm="utm",t.banner="banner",t.input_field="input_field",t.field="field",t);e.s(["DataLayerActionType",()=>s,"handelDataLayerPush",0,({eventCategory:e,eventAction:t,eventActionText:s="",eventLabel:n,eventValue:i,url:r})=>{let u=i;"boolean"==typeof i&&(u=i?"on":"off");let o=!0;"filter_catalog"!==t?o=/[а-я]/i.test(s.toLowerCase()):"string"==typeof n&&(o=/[а-я]/i.test(n.toLowerCase()));let c="filter_catalog"!==t?{event:"data-event",eventCategory:e,eventAction:({link:"click_link_",button:"click_button_",popup:"show_pop_up_",popdown:"close_pop_up_",utm:"save_utm",banner:"click_banner_",input_field:"input_field_",field:"click_field_"})[t]+(0,l.translit)(s),eventLabel:n,eventValue:u,url:r}:{event:"data-event",eventAction:e,eventCategory:t,eventLabel:"string"!=typeof n||o?n:(0,l.translit)(n),eventValue:u,url:r};(0,a.dataLayerPush)(c)}])},51284,e=>{e.v({container:"LogosList-module-scss-module__OhiBXq__container",img:"LogosList-module-scss-module__OhiBXq__img",item:"LogosList-module-scss-module__OhiBXq__item",itemNum:"LogosList-module-scss-module__OhiBXq__itemNum",shine:"LogosList-module-scss-module__OhiBXq__shine"})},68466,e=>{e.v({logos:"OffersWrapper-module-scss-module__fDHQIG__logos",offersWrapper:"OffersWrapper-module-scss-module__fDHQIG__offersWrapper",shine:"OffersWrapper-module-scss-module__fDHQIG__shine",title:"OffersWrapper-module-scss-module__fDHQIG__title"})},32847,66035,25635,e=>{"use strict";var t=e.i(43476),a=e.i(2305),l=e.i(71645),s=e.i(82372);let n=e=>(0,s.callApi)({url:`/money_data/Fk.json${e?"?bic="+e:""}`}),i=({children:e,observerEvent:a,hideEvent:s,threshold:n,...i})=>{let u=(0,l.useRef)(null);return(0,l.useEffect)(()=>{a&&u.current&&r(u.current,a,s,n)},[]),(0,t.jsx)("div",{...i,ref:u,children:e})},r=(e,t,a,l=.5)=>{e&&new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?t&&t():a&&a()})},{threshold:l}).observe(e)};var u=e.i(65018),o=e.i(231);let c=async(e,t,a)=>{let l=o.appLocalStorage.getItem("cached_requests")||{},s=l[e],n=Number(s?.timestamp);if(!s||Date.now()-n>2592e6){let s=await t(...a);return l[e]={timestamp:String(Date.now()),data:s},o.appLocalStorage.setItem("cached_requests",JSON.stringify(l)),s}return s.data},d=["sberbank","vtb","gazprombank","alfabank","mkb","rosselhozbank","sovcombank","rossijskij_kapital","rosbank","yandeks_bank"];var f=e.i(51284);let p=(0,l.memo)(({className:e})=>{let s,r,o=(0,u.useMedia)("lg"),p=(0,l.useRef)(!1),[m,_]=(0,l.useState)([]),v=(s=[],r=[],[...m].sort(()=>.5-Math.random()).forEach(e=>{let t=(({url:e,logo_mob:t,logo:a,name:l})=>{let s=t||a;return s?.includes("http")?{id:e,src:s,name:l}:null})(e);if(!t)return;let a=(({url:e})=>d.includes(e))(e);a&&s.length<4&&s.push(t),!a&&r.length<6&&r.push(t)}),r=r.slice(0,6-s.length),[...s,...r].sort(()=>.5-Math.random())),b=o?v.slice(0,3):v;return(0,t.jsxs)(i,{className:(0,a.default)(f.default.container,e),observerEvent:()=>{p.current||(p.current=!0,c("/money_data/Fk.json",n,[]).then(e=>_(e.data?.banks||[])))},children:[b.map(e=>(0,t.jsx)("picture",{className:f.default.item,children:(0,t.jsx)("img",{className:f.default.img,src:e.src,alt:e.name,width:48,height:48})},e.id)),(0,t.jsxs)("div",{className:(0,a.default)(f.default.item,f.default.itemNum),children:["+",m.length-v.length]})]})});p.displayName="LogosList";var m=e.i(68466);e.s(["OffersWrapper",0,({children:e,className:l,title:s})=>(0,t.jsxs)("div",{className:(0,a.default)(m.default.offersWrapper,l),children:[(0,t.jsx)("div",{className:m.default.title,children:s}),e,(0,t.jsx)(p,{className:m.default.logos})]})],66035),e.s([],32847),e.s(["DEFAULT_PERIODS",0,[{value:1,label:"1 месяц"},{value:2,label:"2 месяца"},{value:3,label:"3 месяца"},{value:4,label:"4 месяца"},{value:5,label:"5 месяцев"},{value:6,label:"6 месяцев"},{value:9,label:"9 месяцев"},{value:12,label:"1 год"},{value:18,label:"1,5 года"},{value:24,label:"2 года"},{value:36,label:"3 года"},{value:48,label:"4 года"},{value:60,label:"5 лет"}],"DISCOUNT_OPTIONS",0,[{value:"travels",label:"Путешествия"},{value:"refuellings",label:"Заправки"},{value:"trade_networks",label:"Торговые сети"},{value:"charity",label:"Благотворительность"},{value:"discount_program",label:"Дисконтная программа"},{value:"custom",label:"Другое"}]],25635)},43101,e=>{"use strict";var t=e.i(71645);e.i(51966);var a=e.i(20039);e.s(["useInput",0,({type:e="text",unit:l,format:s,defaultValue:n="",maxLength:i=-1}={})=>{let[r,u]=(0,t.useState)(n),o=(0,t.useRef)(r),[c,d]=(0,t.useState)(!1),f=(0,t.useCallback)((t,a)=>{"function"==typeof t&&(t=t(o.current));let l=String(t);if(!(i>-1)||!(l.length>i)){if(["int","float"].includes(e)){if(isNaN(+t)||"int"===e&&l.includes(".")||l.includes(" "))return;l=String(""===t?"":+t)}o.current=l,u(l),a?.(l)}},[i,e]),p=(0,t.useMemo)(()=>({onChange:e=>{f(e)},onFocus:()=>d(!0),onBlur:()=>d(!1)}),[f]),m=(0,t.useMemo)(()=>{let t=r,n=null;switch("currency"===s&&["int","float"].includes(e)&&""!==r&&(t=((e,t=-1)=>{var a;return a=e,t>0&&!Number.isInteger(a)&&!Number.isNaN(a)&&String(a).split(".")[1].length>t&&(a=+a.toFixed(t)),e=a,new Intl.NumberFormat("ru-RU").format(e)})(+r)),l){case"year":n=""===t?"":(0,a.pluralize)(+r,"год","года","лет");break;case"day":n=""===t?"":(0,a.pluralize)(+r,"день","дня","дней");break;default:n=""!==t&&l?l:""}return n&&["int","float"].includes(e)?`${t} ${n}`:t},[s,e,l,r]);return(0,t.useMemo)(()=>({events:p,value:r,formattedValue:m,isFocused:c,handleChange:f}),[p,m,f,c,r])}],43101)},8083,e=>{e.v({inputs:"DepositsOffers-module-scss-module__EdYDRq__inputs",shine:"DepositsOffers-module-scss-module__EdYDRq__shine"})},93535,e=>{"use strict";var t=e.i(43476),a=e.i(71645),l=e.i(12716),s=e.i(67638),n=e.i(2305),i=e.i(43101);e.i(32847);var r=e.i(66035),u=e.i(25635),o=e.i(88673),c=e.i(37819),d=e.i(8083);let f=({content:e={},savings:f,premium:p})=>{let m,_,v,b,h=(0,s.getEnvValue)().NEXT_PUBLIC_BASE_URL,g=(0,i.useInput)({defaultValue:()=>String(e.amount||(p?3e6:3e5)),format:"currency",type:"int",maxLength:20,unit:"₽"}),[y,L]=(0,a.useState)(e.term||3),[k,D]=(0,a.useState)("");(0,a.useEffect)(()=>{g.handleChange(e.amount||(p?3e6:3e5))},[e.amount,p]),(0,a.useEffect)(()=>{L(e.term||3)},[e.term]),(0,a.useEffect)(()=>{if(p){let e=+g.value;if(e<3e6)return void D("Минимальная сумма - 3 000 000 ₽");if(e>15e6)return void D("Минимальная сумма - Максимальная сумма - 15 000 000 ₽");D("")}},[g.value,p]);let N="";f?N="/teg_nakopitelnye":p&&(N="/teg_premium");let O=(m=[],(_=String(+g.value||"").replace(/ /g,""))&&m.push(`amount=${_}`),y&&m.push(`period=${y}`),v=m.length?"?"+m.join("&"):"",`${h}/vklady${N}${v}#depositsList`),S="Вклады";return p?S="VIP Вклады":f&&(S="Накопительные счета"),(0,t.jsxs)(r.OffersWrapper,{className:(0,n.default)(d.default.depositsOffersWrapper,"disableContentBlocksStyles"),title:S,children:[(0,t.jsxs)("div",{className:d.default.inputs,children:[(0,t.jsx)(l.InputBase,{label:"Сумма",value:g.isFocused?g.value:g.formattedValue,variant:"secondary",state:k?"error":void 0,caption:k,onClick:()=>{(0,o.handelDataLayerPush)({eventCategory:`${(0,c.translit)("журнал")}_${location.pathname}`,eventAction:o.DataLayerActionType.input_field,eventActionText:(0,c.translit)("сумма вклады"),eventLabel:""})},...g.events}),(0,t.jsx)(l.Select,{label:"Срок",options:u.DEFAULT_PERIODS,value:u.DEFAULT_PERIODS.find(e=>e.value===y)||u.DEFAULT_PERIODS[0],onChange:e=>{L(Number(e.value)),(0,o.handelDataLayerPush)({eventCategory:`${(0,c.translit)("журнал")}_${location.pathname}`,eventAction:o.DataLayerActionType.field,eventActionText:(0,c.translit)("срок вклады"),eventLabel:""})},variant:"secondary"})]}),(0,t.jsx)(l.Button,{as:"a",className:d.default.button,label:"Смотреть",variant:"primary",size:"s",disabled:!!k,href:O,onClick:(b=o.DataLayerActionType.button,()=>{(0,o.handelDataLayerPush)({eventCategory:`${(0,c.translit)("журнал")}_${location.pathname}`,eventAction:b,eventActionText:(0,c.translit)("смотреть вклады"),eventLabel:"",eventValue:void 0})})})]})};e.s(["DepositsOffers",0,f],30567),e.s([],72905),e.i(72905),e.i(30567),e.s(["DepositsOffers",0,f],93535)},4612,e=>{e.n(e.i(93535))}]);