(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4931],{10027:(t,e,n)=>{"use strict";n.d(e,{I:()=>l});var a=n(37876),r=n(77328),i=n.n(r),o=n(89099),s=n(33126),c=n(3187);function l(t){let{title:e,description:n,productId:r}=t,{basePath:l,mainBaseUrl:u}=(0,s.UK)(),{asPath:d}=(0,o.useRouter)(),m=(0,c.m)(d);return(0,a.jsxs)(i(),{children:[(0,a.jsx)("title",{children:e}),(0,a.jsx)("meta",{name:"description",content:n}),(0,a.jsx)("meta",{property:"og:title",content:e}),(0,a.jsx)("meta",{property:"og:description",content:n}),(0,a.jsx)("meta",{property:"og:site_name",content:"Финуслуги"}),(0,a.jsx)("meta",{property:"og:image",content:"".concat(l,"/icons/favicon-32x32.png")}),(0,a.jsx)("meta",{property:"og:type",content:"website"}),(0,a.jsx)("meta",{property:"og:url",content:"".concat(u).concat(m)}),(0,a.jsx)("link",{rel:"icon",href:"".concat(l,"/icons/favicon-32x32.png")}),(0,a.jsx)("link",{rel:"manifest",href:"".concat(l,"/manifest.json"),type:"application/manifest+json"}),(0,a.jsx)("link",{rel:"canonical",href:"".concat(u).concat(m)}),r&&(0,a.jsx)("script",{children:"dataLayer = [{\n            'view_product_id': '".concat(r,"'\n          }];")})]})}l.displayName="HeadMeta"},10280:(t,e,n)=>{"use strict";n.d(e,{A:()=>r});var a=n(12771);async function r(){return i.getOrUpdate()}let i=new(n(73584)).B(o);async function o(){return(await (0,a.aB)("data/page-data?scLayoutName=PageFooter&scPageUrl=homepage")).value}},12771:(t,e,n)=>{"use strict";n.d(e,{x6:()=>h,zy:()=>l,ZP:()=>c,pY:()=>m,aB:()=>d,QV:()=>u,Cw:()=>s});var a=n(33126);class r{start(){this.startTime=performance.now()}setStatus(t){this.status=t}observe(){if(!this.startTime)throw Error("Prometheus metric of outgoing request is not observed: startTime is not defined");!function(t,e,a,r){try{var i,o;null==(i=n.g.outgoingHTTPRequestHistogram)||i.labels(t,e,void 0!==a?String(a):"unknown").observe((o=r,performance.now()-o))}catch(t){console.warn("Prometheus metric of outgoing request is not observed:",t)}}(this.method,this.url,this.status,this.startTime)}constructor(t,e){this.method=t,this.url=e}}var i=n(3187),o=n(63273);function s(){return"".concat((0,a.zj)().basePath,"/api")}function c(t,e){return h("".concat("".concat((0,a.zj)().creditShowcaseApiUrl,"/api/v1"),"/").concat(t),e)}function l(t,e){return h("".concat("".concat((0,a.zj)().mainApiUrl,"/money_data"),"/").concat(t),e)}function u(t,e){return h("".concat("".concat((0,a.zj)().savingsApiUrl,"/api/v1"),"/").concat(t),e)}function d(t,e){return h("".concat("".concat((0,a.zj)().mpScApiUrl,"/api/v1"),"/").concat(t),e)}function m(t,e){return h("".concat(s(),"/").concat(t),e)}async function h(t,e){let n=await p(t,e);try{return JSON.parse(n)}catch(t){throw Error("Failed to parse JSON: ".concat(n),{cause:t})}}async function p(t,e){var n;(0,o.oc)()||console.debug("Fetch data: ".concat(t));let s={},c=(0,a.zj)().apiUsername,l=(0,a.zj)().apiPassword;c&&l&&(s.Authorization="Basic ".concat((0,o.WG)("".concat(c,":").concat(l))));let u=new r(null!=(n=null==e?void 0:e.method)?n:"GET",(0,i.m)(t));try{u.start();let n=await fetch(t,{...e,headers:{...s,...null==e?void 0:e.headers}});if(u.setStatus(n.status),!n.ok)throw Error("Response wasn't OK. The response status code is ".concat(n.status));return await n.text()}catch(e){throw Error("Failed to fetch data: ".concat(t),{cause:e})}finally{u.observe()}}},13394:(t,e,n)=>{"use strict";n.d(e,{u:()=>w});var a=n(37876),r=n(20988),i=n(49995),o=n(14232),s=n(3010),c=n(74356),l=n(37105),u=n(31257),d=n(16196),m=n(5153);let h=[{id:l.h.AUTOCREDIT,name:"автокредита",name_p:"автокредиту"},{id:l.h.KARTY,name:"карты",name_p:"карте"},{id:l.h.POTREBITELSKIE,name:"кредита",name_p:"кредиту"},{id:l.h.IPOTEKA,name:"ипотеки",name_p:"ипотеки"},{id:l.h.CALCULATOR,name:"калькулятора",name_p:"калькулятору"}];var p=n(87087),f=n(16416),v=n(83918),g=n.n(v);let _=t=>t.loading?(0,a.jsx)("div",{className:g().cards_list,children:Array.from({length:24},(t,e)=>(0,a.jsx)(c.E,{className:(0,i.A)(g().card,g().skeletonCard)},e))}):t?(0,a.jsxs)("div",{className:g().content,children:[!!t.paramsRows.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:g().listTitle,children:t.paramsTitle}),(0,a.jsx)("ul",{className:g().list,children:t.paramsRows})]}),!!t.termsRows.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:g().listTitle,children:t.termsTitle}),(0,a.jsx)("ul",{className:g().list,children:t.termsRows})]}),!!t.requirementsVehicleRows.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:g().listTitle,children:t.requirementsVehicleTitle}),(0,a.jsx)("ul",{className:g().list,children:t.requirementsVehicleRows})]}),!!t.companyRows.length&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h3",{className:g().listTitle,children:t.companyTitle}),(0,a.jsx)("ul",{className:g().list,children:t.companyRows})]}),(0,a.jsx)(f.n,{className:g().actualDate,pageUrl:t.mainPageUrl,offerDate:t.updateDate})]}):null,w=t=>{var e,n,i,c,f,v,w;let y="Все условия по ".concat(t.mainPageUrl===l.h.AUTOCREDIT?"автокредиту":t.mainPageUrl===l.h.KARTY?"карте":"кредиту"),x=(0,o.useMemo)(()=>(t=>{let e={paramsTitle:"",termsTitle:"",companyTitle:"",requirementsVehicleTitle:"",paramsRows:[],termsRows:[],companyRows:[],requirementsVehicleRows:[]};if(!t)return e;let{data:n,cardTypes:r,contactlessCardTypes:i,mainPageUrl:s}=t;if(!n)return e;let c=[],u=[],p=[],f=[];if(e.paramsTitle="Параметры ".concat(h.filter(t=>t.id===s)[0].name),e.termsTitle="Условия по ".concat(h.filter(t=>t.id===s)[0].name_p),e.requirementsVehicleTitle="Требования к ТС",e.companyTitle="О банке",l.h.AUTOCREDIT===s){let{params:t,terms:e,company:a,requirementsVehicle:r}=(0,m.v)(n);c=t,u=e,p=a,f=r}if(l.h.IPOTEKA===s){let{params:t,terms:e,company:a}=(0,m.tf)(n);c=t,u=e,p=a}if(l.h.KARTY===s&&r&&i){let{params:t,company:e}=(0,m.N9)(n,r,i);c=t,p=e}if([l.h.POTREBITELSKIE,l.h.CALCULATOR].includes(s)){let{params:t,terms:e,company:a}=(0,m.pw)(n);c=t,u=e,p=a}return e.paramsRows=c.map(t=>(0,a.jsx)(o.Fragment,{children:(0,a.jsx)(d.o,{...t})},t.label)),e.termsRows=u.map(t=>(0,a.jsx)(o.Fragment,{children:(0,a.jsx)(d.o,{...t})},t.label)),e.companyRows=p.map(t=>(0,a.jsx)(o.Fragment,{children:(0,a.jsx)(d.o,{...t})},t.label)),e.requirementsVehicleRows=f.map(t=>(0,a.jsx)(o.Fragment,{children:(0,a.jsx)(d.o,{...t})},t.label)),e})({data:t.data,cardTypes:t.cardTypes,contactlessCardTypes:t.contactlessCardTypes,mainPageUrl:t.mainPageUrl===l.h.CALCULATOR?l.h.POTREBITELSKIE:t.mainPageUrl}),[t.data,t.cardTypes,t.contactlessCardTypes,t.mainPageUrl]),T=e=>{var n;(0,u._)({eventAction:u.y.link,eventActionText:e,eventCategory:t.mainPageUrl,eventLabel:null==(n=t.data)?void 0:n.id})};(0,o.useEffect)(()=>{var e,n,a,r;(null==(e=t.data)?void 0:e.bankName)&&(null==(n=t.data)?void 0:n.id)&&t.isOpen&&(0,u._)({eventAction:u.y.popup,eventActionText:null==(a=t.data)?void 0:a.bankName,eventCategory:t.mainPageUrl,eventLabel:null==(r=t.data)?void 0:r.id})},[t.isOpen,t.mainPageUrl,null==(e=t.data)?void 0:e.bankName,null==(n=t.data)?void 0:n.id]);let j=(0,a.jsxs)("div",{className:g().buttons,children:[(0,a.jsx)(r.$n,{as:"a",onClick:()=>T(y),target:"_blank",href:null==(i=t.data)?void 0:i.detailUrl,variant:"secondary",className:g().button,children:"Все ".concat(null==x?void 0:x.termsTitle)}),(0,a.jsx)(r.$n,{as:"a",onClick:()=>T((0,p.y)("Подать заявку")),target:"_blank",href:null==(c=t.data)?void 0:c.url,className:g().button,children:"Подать заявку"})]});return(0,a.jsx)(s.Z,{children:(0,a.jsx)(r.aF,{className:g().mobilePopup,open:t.isOpen,onClose:t.onClose,footer:{children:j},header:{title:null!=(w=null==(f=t.data)?void 0:f.bankName)?w:""},size:"l",children:(0,a.jsx)("div",{className:g().container,children:(0,a.jsx)(_,{...x,loading:t.loading,mainPageUrl:t.mainPageUrl,updateDate:null==(v=t.data)?void 0:v.m_updated_at})})})})}},16891:(t,e,n)=>{"use strict";n.d(e,{J:()=>s});var a=n(37876),r=n(49995),i=n(53934),o=n.n(i);let s=t=>{let{children:e,className:n}=t;return(0,a.jsx)("div",{className:(0,r.A)(o().mainContainer,n),children:e})}},31257:(t,e,n)=>{"use strict";n.d(e,{_:()=>o,y:()=>i});var a=n(91063),r=n(87087),i=function(t){return t.link="link",t.button="button",t.popup="popup",t.popdown="popdown",t.filterCatalog="filter_catalog",t.utm="utm",t.banner="banner",t.noOffers="no_offers",t}({});let o=t=>{let{eventCategory:e,eventAction:n,eventActionText:i="",eventLabel:o,eventValue:s,url:c}=t,l="boolean"==typeof s?s?"on":"off":s,u="filter_catalog"!==n?/[а-я]/i.test(i.toLowerCase()):"string"!=typeof o||/[а-я]/i.test(o.toLowerCase()),d="filter_catalog"!==n?{event:"data-event",eventCategory:null!=e?e:"",eventAction:({link:"click_link_",button:"click_button_",popup:"show_pop_up_",popdown:"close_pop_up_",utm:"save_utm",banner:"click_banner",no_offers:"no_offers_to_show"})[n]+(0,r.y)(i.toLowerCase().replaceAll(" ","_")),eventLabel:o,eventValue:l,url:c}:{event:"data-event",eventAction:null!=e?e:"",eventCategory:n,eventLabel:"string"==typeof o?u?o:(0,r.y)(o):o,eventValue:l,url:c};(0,a.o)(d)}},37105:(t,e,n)=>{"use strict";n.d(e,{h:()=>a});var a=function(t){return t.POTREBITELSKIE="potrebitelskie_kredity",t.KARTY="kreditnye_karty",t.MICROZAJMY="mikrozajmy",t.AUTOCREDIT="avtokredity",t.IPOTEKA="ipoteka",t.CALCULATOR="kreditniy_kalkulyator",t}({})},53934:t=>{t.exports={mainContainer:"MainContainer_mainContainer__i0H2X"}},73422:t=>{t.exports={withoutLogo:"footer_withoutLogo__SigHo"}},73584:(t,e,n)=>{"use strict";n.d(e,{A:()=>r,B:()=>a});class a{getOrUpdate(t){var e;return null!=(e=this.get())?e:this.update(t)}get(){if(this.expires>Date.now())return this.value}update(t){let e=this.getValue(t);return this.value=e,this.expires=Date.now()+this.duration,e}constructor(t,e){this.expires=0,this.getValue=t,this.duration=null!=e?e:3e5}}class r{getOrUpdate(t,e){var n;return null!=(n=this.get(t))?n:this.update(t,e)}get(t){var e;if((null!=(e=this.expires.get(t))?e:0)>Date.now())return this.values.get(t)}update(t,e){this.clear();let n=this.getValue(e);return this.values.set(t,n),this.expires.set(t,Date.now()+this.duration),n}clear(){let t=Date.now();this.expires.forEach((e,n)=>{e<t&&(this.values.delete(n),this.expires.delete(n))})}constructor(t,e){this.values=new Map,this.expires=new Map,this.getValue=t,this.duration=null!=e?e:3e5}}},79807:(t,e,n)=>{"use strict";n.d(e,{Qd:()=>o,RB:()=>g,Vj:()=>f,ZV:()=>r,aB:()=>u,dk:()=>d,ej:()=>v,jC:()=>p,sP:()=>c,um:()=>_,up:()=>m,wf:()=>l});var a=n(89064);function r(t,e){return t.toLocaleString("ru-RU",e)}function i(t,e,n){return"".concat(r(t,n)," ‒ ").concat(r(e,n))}function o(t,e,n){if(t<e)return t>0?i(t,e,n):"до ".concat(r(e,n));if(t>e)return e>0?(console.warn("Invalid range format: from > to [".concat(t,", ").concat(e,"]")),i(e,t,n)):"от ".concat(r(t,n));if(t===e)return r(t,n);throw Error("Invalid range format: endpoints are not compared [".concat(t,", ").concat(e,"]"))}function s(t){return"".concat(t,"%")}function c(t,e,n){return s(o(t,e,n))}function l(t,e,n){return t>e&&s(i(e,t,n)),s(i(t,e,n))}function u(t,e,n){return t<e?"".concat(o(e,t,n)," ").concat((0,a.g3)(e)):t>e?"".concat(o(e,t,n)," ").concat((0,a.g3)(t)):"".concat(r(t,n)," ").concat((0,a.g3)(t))}function d(t){return t%1!=0}function m(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{withoutCurrency:n,withEmptyPennies:a,withCompact:r}=e,i=r&&Math.abs(t)>=1e6;return new Intl.NumberFormat("ru",{...n?{style:"decimal"}:{style:"currency",currency:"RUB"},...i&&{notation:"compact"},maximumFractionDigits:2,minimumFractionDigits:2*!!a}).format(t)}function h(t){return void 0===t||""===t?0:Number(t)}function p(t,e){return"".concat(o(h(t),h(e))," ₽")}function f(t,e){return"".concat(o(t,e)," ₽")}function v(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{currency:""};return t.to>0?function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{currency:""},n=_(t);return"до ".concat(n," ").concat(e.currency).trim()}(t.to,e):function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{currency:""},n=_(t);return"от ".concat(n," ").concat(e.currency).trim()}(t.from,e)}function g(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{currency:""};return"".concat(r(t)," ").concat(e.currency).trim()}function _(t){let e=String(t);if(e.length>6&&!e.includes(".")){let n=t/1e6;return e.length-String(n).length<2?r(t):"".concat(r(n)," млн")}return r(t)}},81078:(t,e,n)=>{"use strict";n.d(e,{w:()=>l});var a=n(37876),r=n(47429),i=n(49995),o=n(33126),s=n(73422),c=n.n(s);function l(t){let{className:e,data:n,variant:s,withoutLogo:l}=t,u=(0,o.UK)();return(0,a.jsx)("div",{className:(0,i.A)(e,{[c().withoutLogo]:l}),children:(0,a.jsx)(r.F,{data:n,showcaseUrl:u.mainBaseUrl,variant:s})})}},83918:t=>{t.exports={listTitle:"CreditsListModal_listTitle__hforG",container:"CreditsListModal_container__K77Ct",content:"CreditsListModal_content__Gz5jC",list:"CreditsListModal_list__ryMHP",valueText:"CreditsListModal_valueText__6AnBt",row:"CreditsListModal_row__OVccE",rowLabel:"CreditsListModal_rowLabel__9WsLq",rowValue:"CreditsListModal_rowValue__IGWF0",buttons:"CreditsListModal_buttons__l6SVm",button:"CreditsListModal_button__ZXh6N",actualDate:"CreditsListModal_actualDate__wpq5D",skeletonCard:"CreditsListModal_skeletonCard__xw5zQ",cards_list:"CreditsListModal_cards_list__bM3RU"}},87087:(t,e,n)=>{"use strict";n.d(e,{y:()=>r});let a={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"yo",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"h",ц:"c",ч:"ch",ш:"sh",щ:"sch",ъ:"",ы:"y",ь:"",э:"e",ю:"yu",я:"ya"},r=t=>t.replace(/[а-яё]/gi,t=>{let e=t.toLowerCase();if(e in a){let n=a[e];return e===t?n:n.charAt(0).toUpperCase()+n.slice(1)}return t})},89064:(t,e,n)=>{"use strict";n.d(e,{U9:()=>i,UB:()=>d,ZJ:()=>u,d2:()=>l,g3:()=>c,td:()=>s,vo:()=>m});var a=n(79807);let r=new Intl.PluralRules("ru-RU");var i=function(t){return t.ONE="месяц",t.FEW="месяца",t.MANY="месяцев",t}({});function o(t,e,n,a){return({one:e,few:n,many:a})[r.select(t)]}function s(t,e,n,r){return(0,a.dk)(t)?n:o(t,e,n,r)}function c(t){return s(t,"день","дня","дней")}function l(t){return"до ".concat(t," ").concat(u(t))}function u(t){var e,n;return e="дня",n="дней",(0,a.dk)(t)?e:o(t,e,n,n)}function d(t){return s(t,"месяц","месяца","месяцев")}function m(t){return s(t,"год","года","лет")}},91063:(t,e,n)=>{"use strict";n.d(e,{o:()=>r});var a=n(35656);function r(t){t.eventAction&&(t.eventAction=t.eventAction.toLowerCase().replaceAll(" ","_")),t.eventLabel&&"string"==typeof t.eventLabel&&(t.eventLabel=t.eventLabel.toLowerCase().replaceAll(" ","_")),(0,a.Fj)(t)}}}]);