(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9446],{2180:(e,t,n)=>{"use strict";n.d(t,{Y:()=>l});var a=n(14232);function l(e){let[t,n]=(0,a.useState)(),l=(0,a.useMemo)(()=>{var n;return null!=(n=e.find(e=>e.id===t))?n:null},[t,e]),r=(0,a.useCallback)(()=>n(void 0),[]);return{data:l,visible:null!==t,show:n,hide:r}}},9640:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});var a=n(37876),l=n(20988);function r(e){var t;let{value:n,...r}=e,o=(t=n,r.options.find(e=>e.value===t));return(0,a.jsx)(l.l6,{...r,value:o,onChange:e=>{let t=null==e?void 0:e.value;r.onChange(t)}})}},10741:e=>{e.exports={content:"mortgages-filter-content_content__SnZqu",form:"mortgages-filter-content_form__Y3Me4",wrap:"mortgages-filter-content_wrap__ZundD",separator:"mortgages-filter-content_separator__4pj05",sort_title:"mortgages-filter-content_sort_title__4H6Ji",sort_wrap:"mortgages-filter-content_sort_wrap__xUbD8",sort_field:"mortgages-filter-content_sort_field__LwKrM",checkboxField:"mortgages-filter-content_checkboxField__8YkvP",footer:"mortgages-filter-content_footer__2q7g7",submit:"mortgages-filter-content_submit__NEcSP"}},11404:(e,t,n)=>{"use strict";n.d(t,{g:()=>l});var a=n(14232);function l(){let[e,t]=(0,a.useState)(!1);return{visible:e,show:(0,a.useCallback)(()=>t(!0),[]),hide:(0,a.useCallback)(()=>t(!1),[])}}},12341:e=>{e.exports={title:"MortgagesList_title__l06z9",offersListContainer:"MortgagesList_offersListContainer__ZgMuQ",listTitle:"MortgagesList_listTitle__skUIP",container:"MortgagesList_container__cgMaG",listItem:"MortgagesList_listItem__IZLd8"}},12837:(e,t,n)=>{"use strict";n.d(t,{t:()=>o});var a=n(37876),l=n(26685),r=n.n(l);function o(e){let{comment:t,text:n}=e;return n?t?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:n}}),(0,a.jsx)("div",{className:r().commentText,dangerouslySetInnerHTML:{__html:t}})]}):(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:n}}):(0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})}},14834:e=>{e.exports={listTitle:"styles_listTitle__MeOax",list:"styles_list__bYSPt",card:"styles_card__HXa22",button_more_offers:"styles_button_more_offers__YXOO_"}},15462:(e,t,n)=>{"use strict";n.d(t,{L$:()=>a,ZV:()=>l});let a=(e,t)=>(null==e?void 0:e.includes(t))?e.filter(e=>e!==t):(e||[]).concat([t]),l=e=>r(e.toString().split("").reverse(),3).reverse().map(e=>e.reverse().join("")).join(" "),r=(e,t)=>{let n=[];for(let a=0;a<e.length;++a){let l=Math.floor(a/t);n[l]||(n[l]=[]),n[l].push(e[a])}return n}},16904:e=>{e.exports={wrap:"styles_wrap__d_QXg",content:"styles_content__y9L_W",page_title:"styles_page_title__Y8O0t"}},18315:(e,t,n)=>{"use strict";n.d(t,{a:()=>m});var a=n(37876),l=n(20988),r=n(14232),o=n(3010),i=n(74356),s=n(16416),c=n(32266),u=n(94289),d=n.n(u);let m=(0,r.memo)(e=>{let{isOpen:t,cancelButton:n,submitButton:u,onClose:m,bankName:_,dataPoints:p,offerUpdateData:h,pageUrl:v}=e,g=(0,a.jsxs)("div",{className:d().content,children:[p.map(e=>(0,a.jsxs)(r.Fragment,{children:[(0,a.jsx)("h2",{className:d().title,children:e.sectionTitle}),(0,a.jsx)("div",{className:d().list,children:e.body.length?e.body.map((e,t)=>(0,a.jsxs)("div",{className:d().field,children:[(0,a.jsxs)("div",{className:d().titleWrapper,children:[(0,a.jsx)("h3",{className:d().fieldTitle,children:null==e?void 0:e.label}),(null==e?void 0:e.description)&&(0,a.jsx)(c.A,{triggerClassName:d().icon,content:e.description})]}),(0,a.jsx)("div",{className:d().fieldContent,children:null==e?void 0:e.value})]},t)):Array.from({length:6},(e,t)=>(0,a.jsx)(i.E,{className:d().skeletonContent},t))})]},e.sectionTitle)),(0,a.jsx)(s.n,{className:d().actualDate,pageUrl:v,offerDate:h})]}),y=(0,a.jsxs)("div",{className:d().footer,children:[(0,a.jsx)(l.$n,{variant:"secondary",onClick:n.onClick,children:n.title}),(0,a.jsx)(l.$n,{rel:"nofollow",as:"a",href:u.url,onClick:u.onClick,children:u.title})]});return(0,a.jsx)(o.Z,{children:(0,a.jsx)(l.aF,{open:t,onClose:m,footer:{children:y},header:{title:null!=_?_:""},className:d().mobilePopup,size:"l",children:(0,a.jsx)("div",{className:d().container,children:g})})})});m.displayName="OfferInfoModal"},19852:(e,t,n)=>{"use strict";var a=n(14232),l=n(38806),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=l.useSyncExternalStore,i=a.useRef,s=a.useEffect,c=a.useMemo,u=a.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,a,l){var d=i(null);if(null===d.current){var m={hasValue:!1,value:null};d.current=m}else m=d.current;var _=o(e,(d=c(function(){function e(e){if(!s){if(s=!0,o=e,e=a(e),void 0!==l&&m.hasValue){var t=m.value;if(l(t,e))return i=t}return i=e}if(t=i,r(o,e))return t;var n=a(e);return void 0!==l&&l(t,n)?t:(o=e,i=n)}var o,i,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,a,l]))[0],d[1]);return s(function(){m.hasValue=!0,m.value=_},[_]),u(_),_}},24459:(e,t,n)=>{"use strict";var a=n(14232),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=a.useState,o=a.useEffect,i=a.useLayoutEffect,s=a.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!l(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),a=r({inst:{value:n,getSnapshot:t}}),l=a[0].inst,u=a[1];return i(function(){l.value=n,l.getSnapshot=t,c(l)&&u({inst:l})},[e,n,t]),o(function(){return c(l)&&u({inst:l}),e(function(){c(l)&&u({inst:l})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==a.useSyncExternalStore?a.useSyncExternalStore:u},24523:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});let a=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=null;return n=>{t&&clearInterval(t),t=setTimeout(n,e)}}},26685:e=>{e.exports={commentText:"offer-terms_commentText__S3vmq"}},27526:e=>{e.exports={logo:"MortgageListItem_logo__jaNvS",placeholderLogo:"MortgageListItem_placeholderLogo__QyaLT"}},27607:e=>{e.exports={row:"styles_row__dHTUh",open:"styles_open__GqvFI",firstRow:"styles_firstRow__is75c",toggle:"styles_toggle__2r_74"}},27964:(e,t,n)=>{"use strict";function a(e){let{name:t,description:n,image:a,aggregateRating:l,offers:r}=e;return{"@context":"https://schema.org","@type":"Product",name:t,description:n,image:a,aggregateRating:l,offers:r}}n.d(t,{Z:()=>a})},28502:e=>{e.exports={wrap:"styles_wrap___CLvg",filter_wrapper:"styles_filter_wrapper__5o6ZP",newLayout:"styles_newLayout__xY8R1",products_list_container:"styles_products_list_container__Opwa2",title:"styles_title__sj9KH",titleHide:"styles_titleHide__0VpmN",offers_lists:"styles_offers_lists__sXzjq",placeholder:"styles_placeholder__yy33F",subtitle:"styles_subtitle__jCooy"}},28732:e=>{e.exports={filter:"styles_filter__jrtk3"}},31070:e=>{e.exports={container:"styles_container__SqFUD",utpTags:"styles_utpTags__899sO",content:"styles_content__pxEzH",breadcrumbs:"styles_breadcrumbs__jH8EC",text:"styles_text__0SGL8",title:"styles_title__WaTv0",location:"styles_location__z_oKT",subtitle:"styles_subtitle__oSzuM",moreButton:"styles_moreButton___h8zi",banner:"styles_banner__6_J8S",background:"styles_background__KxgOM",newLayout:"styles_newLayout__iR_wy"}},31443:e=>{e.exports={notFoundWrapper:"CreditsNotFound_notFoundWrapper__QdXvJ",searchIcon:"CreditsNotFound_searchIcon__m8B3S",notFoundText:"CreditsNotFound_notFoundText__vZE_n",changeParamsButton:"CreditsNotFound_changeParamsButton__0_UOj"}},31758:e=>{e.exports={section:"styles_section__C_XdG",title:"styles_title__lnE9N",card:"styles_card__hTNw7",imgWrapper:"styles_imgWrapper__Ue6gi",cardBody:"styles_cardBody__r7l0F",subTitle:"styles_subTitle__ayqhw",cardButton:"styles_cardButton__xJxcm",iconArrow:"styles_iconArrow__q2lrn",sliderContainer:"styles_sliderContainer__ox24U"}},33943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{__N_SSP:()=>an,default:()=>aa});var a,l,r=n(37876),o=n(5138),i=n(14232);n(62862);var s=n(37397),c=n(30557),u=(n(3067),n(25972)),d=n(20988),m=n(48230),_=n.n(m),p=n(97563),h=n(10027),v=n(83188),g=n(87162),y=n(5153),b=n(37105);let f=[{id:1,label:"Условия",name:y.o1.conditions},{id:2,label:"Требования",name:y.o1.requirements},{id:3,label:"Требуемые документы",name:y.o1.requirementsDocs},{id:4,label:"Выдача и погашение",name:y.o1.redemption}],x=b.h.IPOTEKA;var j=n(62728);let k=(0,i.memo)(e=>{var t,n;let{data:a,bank:l,pageUrl:o}=e,{tabsContent:s,tabsList:c}=(e=>{let{data:t}=e,n=(0,i.useMemo)(()=>(0,y.qZ)(t),[t]),a=(0,i.useMemo)(()=>f.filter(e=>n[e.name].some(e=>(0,j.a)(e.value))),[n]);return{tabsContent:n,tabsList:a}})({data:a});return(0,r.jsx)(v.H,{scrollBlockId:g.uB,pageUrl:o,seoText:(null==a?void 0:a.short_description)&&(null==a?void 0:a.short_description.length)>5?null==a?void 0:a.short_description:void 0,title:"Об ипотеке",offerUpdateData:null==a?void 0:a.m_updated_at,bank:{logoMobile:null==l?void 0:l.logo_mob,description:null==l?void 0:l.short_description,url:"/banki/".concat(null==l?void 0:l.url),name:null==l?void 0:l.name,creditRating:null==l?void 0:l.credit_rating,netAssetsPlace:null==l||null==(t=l.ratings)?void 0:t.net_assets_place,netProfitRating:null==l?void 0:l.net_profit_rating},tabsList:c,tabsContent:s,aboutCompanyLabel:"О банке",site:null!=(n=null==l?void 0:l.site.title)?n:void 0})});k.displayName="MortgageAbout";var A=n(26700),C=n(78131),N=n(14873),w=function(e){return e.LEAD="lead",e.MASS="mass",e}({}),T=n(41402),M=n.n(T);let S=e=>{let{url:t,isMobile:n,className:a}=e,l=(0,i.useMemo)(()=>[{id:3,image:C.A,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",buttonText:"Оформить на сайте банка",link:t},{id:4,image:A.A,text:w.LEAD?"Эту ипотеку нельзя открыть через Финуслуги":"Эту ипотеку сейчас нельзя открыть онлайн на Финуслугах",buttonText:"Выбрать другую ипотеку",link:"/".concat(b.h.IPOTEKA)}],[t]);return(0,r.jsx)("div",{className:M().container,children:(0,r.jsx)(N.N,{className:a,title:"Где оформить ипотеку",pageUrl:b.h.IPOTEKA,id:g.ov,isMobile:n,slides:l})})};var P=n(49995),L=n(14082),R=n(54808),E=n(5219),F=n(56420),I=n(53244),B=n(52841),O=n(63292),D=n(47019),U=n(54587),W=n.n(U);let q={src:"/kredity/assets/_next/static/media/chain.2d44409a.svg",height:24,width:24,blurWidth:0,blurHeight:0};var H=n(24945),K=n(86710),V=n(3458),Y=n(76082),z=n(3010),Z=n(81202),J=n(80010);let G=e=>{let t=new Date().getFullYear(),n=new Date().getMonth()+e,a=new Date().getDate(),l=n<=12?n:n%12||12,r=t+Math.floor(n<=12?0:n%12?n/12:n/12-1),o=new Date(r,l+1,0).getDate();return{date:"".concat(a>o?o:a,".").concat(l<12?"0":"").concat(l,".").concat(r),year:r}},Q=e=>{let{rate:t,periodWithMoth:n,defaultBalanceDebt:a,balanceDebtPrevMonth:l,month:r}=e,o=t/12/100,i=(0,J.r)((1+o)**n,5),s=(0,J.r)(a*o*i/(i-1),1),c=(0,J.r)(l*o,1),u=(0,J.r)(s-c,1),d=(0,J.r)(l-u,1);return{...G(r),paymentPerMoth:s,interestRepayment:c,loanRepayment:u,balanceDebt:d}},X=e=>{let{rate:t,periodWithMoth:n,balanceDebtPrevMonth:a,month:l}=e,r=(0,J.r)(t/12/100*a,1),o=(0,J.r)(a/n,1),i=(0,J.r)(r+o,1),s=(0,J.r)(a-o,1);return{...G(l),paymentPerMoth:i,interestRepayment:r,loanRepayment:o,balanceDebt:s}},$=(e,t)=>{let n=[];for(let l=1,r=0;l<e.periodWithMoth;l++,r++){var a;n.push(t({...e,balanceDebtPrevMonth:(null==(a=n[r-1])?void 0:a.balanceDebt)||e.defaultBalanceDebt,month:l}))}return n};var ee=n(31257),et=n(87087),en=n(5552),ea=n(42256),el=n.n(ea);let er=e=>{let{elementList:t,isExpanded:n,...a}=e;return(0,r.jsxs)("div",{className:el().container,children:[(0,r.jsx)("div",{className:(0,P.A)(el().expandableContainer,n&&el().expanded),children:t.map(e=>e)}),(0,r.jsx)(d.$n,{...a})]})},eo=e=>e.reduce((e,t)=>{let n=e.findIndex(e=>e.year===t.year);return -1===n?e.push({year:t.year,schedule:[t]}):e[n].schedule.push(t),e},[]),ei=[{label:"Дата",key:"date"},{label:"Платеж",key:"paymentPerMoth"},{label:"Проценты",key:"interestRepayment"},{label:"Оплата долга",key:"loanRepayment"},{label:"Остаток долга",key:"balanceDebt"}],es=["vk","tg","ok"];var ec=n(78240),eu=n.n(ec);let ed=e=>{let{children:t,className:n}=e;return(0,r.jsx)("div",{className:(0,P.A)(eu().field,n),children:t})},em=(0,i.forwardRef)((e,t)=>{let{data:n,isMobile:a}=e,l=n.reduce((e,t)=>(t.schedule.forEach(t=>{e.balanceDebt+=t.balanceDebt,e.interestRepayment+=t.interestRepayment,e.loanRepayment+=t.loanRepayment,e.paymentPerMoth+=t.paymentPerMoth}),e),{balanceDebt:0,interestRepayment:0,loanRepayment:0,paymentPerMoth:0}),o=()=>(0,r.jsxs)("div",{className:(0,P.A)(eu().columnTotalParams,eu().rowTabel),children:[(0,r.jsx)(ed,{className:eu().fieldLargeText,children:a?"Итоговая выплата":"Итого"}),ei.map(e=>"date"!==e.key&&(0,r.jsxs)(ed,{children:[a&&(0,r.jsx)("span",{children:e.label}),(0,r.jsxs)("span",{children:[" ",(0,J.r)(l[e.key],1).toLocaleString("ru-RU",{useGrouping:!0}).replace(".",","),a&&" ₽"]})]},e.key))]}),i=e=>{let{it:t,index:n}=e;return(0,r.jsxs)(r.Fragment,{children:[!a&&(0!=n?(0,r.jsx)("h4",{className:eu().titleYearSchedule,children:t.year}):(0,r.jsx)("div",{})),t.schedule.map(e=>(0,r.jsx)("div",{className:(0,P.A)(eu().rowTabel,eu().bodyField),children:ei.map((t,n)=>(0,r.jsxs)(ed,{children:[!!a&&"date"!==t.key&&(0,r.jsx)("span",{children:t.label+(a?"":", ₽")}),(0,r.jsx)("span",{className:eu().value,children:0===n?e[t.key]:e[t.key].toLocaleString("ru-RU",{useGrouping:!0}).replace(".",",")})]},t.key))},e.date))]})};return(0,r.jsxs)("div",{className:eu().tableSchedule,children:[!a&&(0,r.jsx)("div",{className:(0,P.A)(eu().columnTitles,eu().rowTabel),children:ei.map(e=>(0,r.jsx)(ed,{children:e.label+("date"===e.key||a?"":", ₽")},e.key))}),(0,r.jsxs)("div",{ref:t,className:eu().contentSchedule,children:[n.map((e,t)=>(0,r.jsx)("div",{className:eu().yearSchedule,children:a?(0,r.jsx)(d.As,{id:"years",title:e.year.toString(),className:eu().yearAccordion,children:(0,r.jsx)(i,{it:e,index:t})}):(0,r.jsx)(i,{it:e,index:t})},e.year)),a&&(0,r.jsx)(o,{})]}),!a&&(0,r.jsx)(o,{})]})});em.displayName="ScheduleTable";let e_=(0,i.forwardRef)((e,t)=>{let{isMobile:n,paymentScheduleParametrs:a,payments:l}=e,o=(0,i.useMemo)(()=>n?l:l.length>1?[...l,{label:"Оба платежа",value:"all"}]:l,[l,n]),[s,c]=(0,i.useState)(o[0].value),u=eo($(a,Q)),m=eo($(a,X)),_=(0,i.useRef)(null),p=(0,i.useRef)(null);return(((e,t)=>(0,i.useLayoutEffect)(()=>{let n=e.current,a=t.current;if(null===n||null===a)throw Error("Dead code branch");let l=e=>{e.target!==n?n.scrollTop=a.scrollTop:a.scrollTop=n.scrollTop};return n.addEventListener("scroll",l),a.addEventListener("scroll",l),()=>{n.removeEventListener("scroll",l),a.removeEventListener("scroll",l)}},[e,t]))(_,p),(0,i.useImperativeHandle)(t,()=>({onScrollToBottomHandle(){let e;null==(e=Z.w.annuity&&_.current?_.current:p.current)||e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}}),[]),u&&m)?(0,r.jsxs)("div",{className:eu().schedulePaymentsWrapper,children:[l.length>1&&(0,r.jsx)("div",{className:eu().tabsContentWrapper,children:o.map(e=>(0,r.jsx)(d.$n,{variant:"secondary",size:n?"xs":"s",label:e.label,className:(0,P.A)(eu().button,{[eu().active]:s===e.value}),onClick:()=>c(e.value)},e.label))}),(0,r.jsxs)("div",{className:eu().tabelsWrapper,children:[[Z.w.annuity,"all"].includes(s)&&(0,r.jsx)(em,{ref:_,data:u,isMobile:n}),[Z.w.differentiated,"all"].includes(s)&&(0,r.jsx)(em,{ref:p,data:m,isMobile:n})]})]}):null});e_.displayName="PaymentScheduleModalContent";let ep=e=>{let{isMobile:t,url:n}=e,[a,l]=(0,i.useState)(!1),o=async e=>{try{(0,ee._)({eventAction:ee.y.button,eventActionText:e,eventCategory:x}),await navigator.clipboard.writeText(n),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){console.error("Failed to copy uri: ",e)}};return(0,r.jsxs)(d.$n,{variant:"secondary",size:t?"s":"m",className:(0,P.A)(eu().copyButton,t&&eu().mobileActionButton),onClick:()=>o((0,et.y)("Скопировать ссылку")),children:[(0,r.jsx)(W(),{src:q,alt:"Чат",height:"24"}),!t&&(a?"Ссылка скопирована":"Скопировать ссылку")]})},eh=e=>{var t;let n=(0,en.sw)();(0,i.useEffect)(()=>{var t,n;e.bankName&&(null==(t=e.data)?void 0:t.id)&&e.isOpen&&(0,ee._)({eventAction:ee.y.popup,eventActionText:null==e?void 0:e.bankName,eventCategory:e.mainPageUrl,eventLabel:null==(n=e.data)?void 0:n.id})},[e.isOpen,e.mainPageUrl,e.bankName,null==(t=e.data)?void 0:t.id]);let a=e=>{let{socialNetwork:t}=e;switch(t){case"vk":return(0,r.jsx)(Y.A,{});case"tg":return(0,r.jsx)(V.A,{});case"ok":return(0,r.jsx)(H.A,{});default:return null}},l=t=>{let{socialNetwork:l,className:o}=t;return(0,r.jsx)("button",{onClick:()=>(t=>{var a;let l=e.url;if(n)return void navigator.share({url:l});switch(t){case"vk":let r;r=e.url,l="https://vk.com/share.php?url=".concat(encodeURIComponent(r));break;case"tg":let o;o=e.url,l="https://t.me/share/url?url=".concat(encodeURIComponent(o));break;case"ok":let i;i=e.url,l="https://connect.ok.ru/offer?url=".concat(encodeURIComponent(i))}null==(a=window.open(l,"_blank"))||a.focus(),(0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.button,eventActionText:"share",url:l})})(l),className:o,children:(0,r.jsx)(a,{socialNetwork:l})})},o=(0,r.jsxs)("div",{className:eu().footer,children:[(0,r.jsxs)("div",{className:eu().socialNetworkSection,children:[(0,r.jsx)("p",{className:eu().socialNetworkTitle,children:"Поделиться"}),(0,r.jsx)("div",{className:eu().socialNetworkButtonsWrapper,children:es.map(e=>(0,r.jsx)(l,{socialNetwork:e,className:(0,P.A)(eu().action,eu().socialButton)},e))})]}),(0,r.jsx)(ep,{isMobile:n,url:e.url})]}),s=(0,i.useRef)(null),[c,u]=(0,i.useState)(!1),m=(0,r.jsxs)("div",{className:eu().mobileFooter,children:[(0,r.jsx)(d.$n,{className:eu().paymentSummaryButton,size:"normal",onClick:()=>{var e;return null==(e=s.current)?void 0:e.onScrollToBottomHandle()},children:"Итоговая выплата"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(d.m_,{text:"Ссылка скопирована",children:(0,r.jsx)(r.Fragment,{children:t=>{let{show:a,hide:l}=t;return(0,r.jsx)("button",{onClick:()=>{a(),setTimeout(l,2e3)},children:(0,r.jsx)(ep,{isMobile:n,url:e.url})})}})}),(0,r.jsx)(er,{className:eu().mobileActionButton,variant:"secondary",isExpanded:c,onClick:()=>{u(e=>!e)},elementList:es.map(e=>(0,r.jsx)(l,{socialNetwork:e,className:eu().expandableSocialMediaButton},e)),children:(0,r.jsx)(W(),{src:K.A,alt:"Чат",height:"24"})})]})]});return(0,r.jsx)(z.Z,{children:(0,r.jsx)(d.aF,{open:e.isOpen,onClose:e.onClose,footer:{children:n?m:o},header:{title:"График платежей"},children:(0,r.jsx)("div",{className:(0,P.A)(eu().container,e.payments.length<=1&&eu().withoutTabsContainer),children:(0,r.jsx)(e_,{ref:s,paymentScheduleParametrs:e.paymentScheduleParametrs,payments:e.payments,isMobile:n})})})})};var ev=n(89099),eg=n(75464),ey=n(35415),eb=n(21754),ef=n(89064),ex=n(79807),ej=n(53172),ek=n(88548),eA=n.n(ek);let eC="Оформить на сайте банка",eN="Где оформить ипотеку",ew=e=>{var t,n;let{bank:a,data:l,isMobile:o}=e,[s,m]=(0,i.useState)(!1),_=(0,i.useRef)(null),p=(e=>{var t,n,a;let l=Number(null!=(t=e.period.from)?t:1),r=Number(e.period.to),o=Number(null!=(n=e.amount.from)?n:0),s=Number(null!=(a=e.amount.to)?a:1e8),c=((e,t)=>{let n=[];return e&&n.push({label:"Аннуитетный",value:Z.w.annuity}),t&&n.push({label:"Дифференцированный",value:Z.w.differentiated}),n})(!!e.repayment_procedure.annuity,!!e.repayment_procedure.differentiated),[u,d]=(0,i.useState)(r),[m,_]=(0,i.useState)({}),[p,h]=(0,i.useState)([c[0]]),{loanRateFrom:v,loanRateTo:g}=(0,i.useMemo)(()=>{let t=(m?Object.values(m):[]).reduce((e,t)=>e+t,0);return{loanRateFrom:Number(e.interest_rate.from)-t,loanRateTo:Number(e.interest_rate.to)-t}},[m,e.interest_rate.from,e.interest_rate.to]),{asPath:y}=(0,ev.useRouter)(),b=(0,i.useRef)(),f=o+(0,J.r)(o*e.first_payment.from/(100-e.first_payment.from-1),1),x=Math.min(1e8,s+(0,J.r)(s*e.first_payment.from/(100-e.first_payment.from),1)),j=Math.max(f,x),[k,A]=(0,i.useState)(j),C=(0,i.useMemo)(()=>(0,J.r)(f/100*(e.first_payment.from-1),1),[e.first_payment.from,f]),N=(0,i.useMemo)(()=>(0,J.r)(x/100*e.first_payment.from,1),[e.first_payment.from,x]),[w,T]=(0,i.useState)(N),M=(0,i.useCallback)(()=>k>s?(0,J.r)(k-s,1):x===k?N:f===k?C:(0,J.r)(k/100*e.first_payment.from,1),[k,s,x,f,e.first_payment.from,N,C]),[S,P]=(0,i.useState)(M()),L=(0,i.useCallback)(()=>{let t=0;return t=f===k?f/100*e.first_payment.from:k-o,(0,J.r)(t,1)},[o,e.first_payment.from,f,k]),[R,E]=(0,i.useState)(L()),[F,I]=(0,i.useState)(0),[B,O]=(0,i.useState)(()=>w),D=(0,i.useMemo)(()=>(0,J.r)(w/k*100,1),[w,k]),U=(0,i.useMemo)(()=>(0,J.r)(f===k?k-R:k-w,1),[f,w,R,k]),W=(0,i.useMemo)(()=>"".concat(window.location.href.split("?")[0],"?propertyPrice=").concat((0,J.r)(k,1),"&firstPayment=").concat((0,J.r)(w,1)).concat(F>0?"&matCapital=".concat((0,J.r)(F,1)):"").concat(+B>0?"&personalFunds=".concat((0,J.r)(B,1)):"","&period=").concat(u).concat(c.length>1?"&paymentType=".concat(p[0].value):"").concat(Object.keys(m).filter(e=>!!m[e]).length?"&additionalParams=".concat(encodeURIComponent(Object.entries(m).filter(e=>!!e.at(-1)).map(e=>e[0]).join(","))):""),[k,w,F,B,u,c.length,p,m]),q=(0,i.useMemo)(()=>{var t,n;let a=(null==(n=e.rate_corrections_first_payment)||null==(t=n.find(e=>{let t=w/(k/100);return e.rate_from<=t&&t<=e.rate_to}))?void 0:t.rate)||0;return e.interest_rate.from-Object.values(m).reduce((e,t)=>e+=t,0)-a},[e.rate_corrections_first_payment,e.interest_rate.from,m,k,w]),{paymentPerMoth:H}=(0,i.useMemo)(()=>{var e;return((null==(e=p[0])?void 0:e.value)===Z.w.annuity?Q:X)({rate:q,periodWithMoth:u,defaultBalanceDebt:U,balanceDebtPrevMonth:U,month:1})},[q,U,p,u]),{totalOverpayment:K,totalCost:V}=(0,i.useMemo)(()=>((e,t,n)=>{let a=n*t;return{totalOverpayment:a-e,totalCost:a}})(U,u,H),[H,U,u]),Y=(0,i.useCallback)(e=>{let{key:t,value:n}=e;_(e=>({...e,[t]:n}))},[]),z=(0,i.useCallback)(e=>{d(e),T(H)},[H]),G=(0,i.useCallback)(t=>{A(t);let n=0;T(n=t>s?t-s:t>f?t/100*e.first_payment.from:C),0===F&&O(Number(n)-F),E(L()),P(M())},[s,F,L,M,f,e.first_payment.from,C]),$=(0,i.useCallback)(e=>{T(e),O(e-F)},[F]),ee=(0,i.useCallback)(t=>{let n=B+(t=null!=t?t:0);if(!(n>1e8-o)){if(I(t),n>R){let t=n+Number(e.amount.from);A(t>1e8?1e8:t)}w<S&&A((0,J.r)(B/e.first_payment.from*100,1)),T(n)}},[B,o,R,w,S,e.amount.from,e.first_payment.from]),en=(0,i.useCallback)(t=>{t=null!=t?t:0,b.current&&clearInterval(b.current);let n=F+t;if(!(n>1e8-o)){if(O(t),t<C){b.current=setTimeout(()=>O(w),1e3);return}if(n>R){let t=n+Number(e.amount.from);A(t>1e8?1e8:t)}t<S&&A((0,J.r)(((null!=t?t:0)<C?C:(null!=t?t:0)/e.first_payment.from)*100,1)),T(n)}},[F,o,C,R,S,w,e.amount.from,e.first_payment.from]);return(0,i.useEffect)(()=>{var t,n,a,o;let i=(0,eg.$)(y,"?"),s=Array.isArray(i.property_price)?i.property_price[0]:i.property_price,u=Array.isArray(i.first_payment)?i.first_payment[0]:i.first_payment,m=Number(Array.isArray(i.period)?i.period[0]:i.period),p=Number(i.matCapital);if(0!==p&&I(p),i.additionalParams&&decodeURI(i.additionalParams.toString()).split("%2C").forEach(t=>{var n;let a=null==(n=e.rate_corrections)?void 0:n.find(e=>(0,et.y)(e.title)===t);a&&null!==a.rate&&_(e=>({...e,[t]:a.rate}))}),void 0!==s&&A(Number(s)),void 0!==u&&T(Number(u)),void 0!==i.firstPayment&&(""!==i.firstPayment||(null==(t=i.firstPayment)?void 0:t.length)!==0)&&T(Math.min(S,Math.min(Number(i.firstPayment.toString()),R))),void 0!==i.personalFunds&&(""!==i.personalFunds||(null==(n=i.personalFunds)?void 0:n.length)!==0)&&O(Number(i.personalFunds.toString())),void 0!==i.propertyPrice&&(""!==i.propertyPrice||(null==(a=i.propertyPrice)?void 0:a.length)!==0)){let t=Math.min(Number(i.propertyPrice.toString()),1e8);t-w>Number(e.amount.to)&&T(t-Number(e.amount.to)),A(t)}if(void 0!==i.paymentType&&(""!==i.paymentType||(null==(o=i.paymentType)?void 0:o.length)!==0)){let e=c.find(e=>e.value===i.paymentType);void 0!==e&&h([e])}return!Number.isNaN(m)&&m>=l&&m<=r&&d(m),()=>clearTimeout(b.current)},[]),(0,i.useMemo)(()=>({totalOverpayment:K,totalCost:V,currectMonthlyPayment:H,firstPaymentPercent:D,calculatorQueryParamsInLink:W,mortgageCredit:U,personalFunds:B,matCapital:F,currectInterestRate:q,firstPaymentMin:S,firstPaymentMax:R,propertyPriceMin:f,propertyPriceMax:1e8,propertyPrice:k,firstPayment:w,period:u,setPeriod:d,periodMin:l,periodMax:r,paymentTypeOptions:c,paymentType:p,setPaymentType:h,additionalParams:m,handleChangePropertyPrice:G,handleChangePeriod:z,handleChangeAdditionalParams:Y,handleChangePersonalFunds:en,handleChangeMatCapital:ee,handleChangeFirstPayment:$,loanRateFrom:v,loanRateTo:g}),[K,V,H,D,W,U,B,F,q,S,R,f,1e8,k,w,u,l,r,c,p,m,G,z,Y,en,ee,$,v,g])})(l),h=(0,i.useCallback)(()=>{m(e=>!e)},[]),v=(0,i.useMemo)(()=>({value:p.period,max:p.periodMax,min:p.periodMin===p.periodMax?p.periodMin-1:p.periodMin,onChange:e=>{e=null!=e?e:p.periodMin,p.periodMin!==p.periodMax&&p.setPeriod(e)},step:1,ticks:[{label:(0,ey.Hb)(p.periodMin),value:p.periodMin},{label:(0,ey.Hb)(p.periodMax),value:p.periodMax}],unit:[ef.U9.ONE,ef.U9.FEW,ef.U9.MANY]}),[p]),y=(0,i.useMemo)(()=>({value:p.propertyPrice,max:p.propertyPriceMax,min:p.propertyPriceMin,onChange:e=>{e=null!=e?e:p.propertyPriceMin,p.propertyPriceMin!==p.propertyPriceMax&&p.handleChangePropertyPrice(e)},step:1e5,ticks:[{label:"".concat((0,ex.um)(p.propertyPriceMin)," ₽"),value:p.propertyPriceMin},{label:"".concat((0,ex.um)(p.propertyPriceMax)," ₽"),value:p.propertyPriceMax}],unit:"₽"}),[p]),f=(0,i.useMemo)(()=>({value:p.firstPayment,max:p.firstPaymentMax,min:p.firstPaymentMin,onChange:e=>{e=null!=e?e:p.firstPaymentMin,p.firstPaymentMin!==p.firstPaymentMax&&p.handleChangeFirstPayment(e)},step:1e3,ticks:[{label:"".concat((0,ex.um)(p.firstPaymentMin)," ₽"),value:p.firstPaymentMin},{label:"".concat((0,ex.um)(p.firstPaymentMax)," ₽"),value:p.firstPaymentMax}],unit:"₽"}),[p]),x=(0,i.useMemo)(()=>p.paymentTypeOptions.filter(e=>{var t;return e.value===(null==(t=p.paymentType[0])?void 0:t.value)}),[p.paymentTypeOptions,p.paymentType]),j=(0,i.useMemo)(()=>{var e;let t=(null==(e=l.application_term.custom_text)?void 0:e.from)!==void 0?(0,F.v)(l.application_term.custom_text.from):0,n=new Date;n.setDate(n.getDate()+t);let a=n.getDate(),r=n.getMonth()+1,o=n.getFullYear();return"Деньги у вас до ".concat(a," ").concat((0,eb.F)("".concat(r,"-").concat(a,"-").concat(o)))},[null==(t=l.application_term.custom_text)?void 0:t.from]),k=(0,i.useCallback)(()=>{_.current&&_.current.focus()},[]),A=(0,i.useCallback)(e=>{e&&((0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.filterCatalog,eventLabel:"Платеж",eventValue:null==e?void 0:e.label}),p.setPaymentType([e]))},[p]),C=(0,i.useMemo)(()=>[{id:1,label:(0,ey.l5)(p.period)},{id:2,label:"".concat((0,ex.ZV)(p.propertyPrice)," ₽")}],[p.propertyPrice,p.period]),N=(0,i.useMemo)(()=>{let e=[],t=l.full_price;t&&e.push({label:"ПСК",value:(0,c.o)(t),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n          Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,ex.sP)(p.loanRateFrom,p.loanRateTo)}),e.push({label:"Первый взнос",value:"".concat((0,ex.um)((0,J.r)(p.firstPayment,1)),"&#160;₽")},{label:"Платеж в месяц",value:"".concat((0,ex.um)(p.currectMonthlyPayment),"&#160;₽")},{label:"Налоговый вычет",value:"".concat((0,ex.um)((0,J.r)(((e,t)=>{let n=.13*e;return e<=2e6?n:(n=n>26e4?26e4:n)+(.13*t>39e4?39e4:.13*t)})(p.propertyPrice,p.totalOverpayment),1))," ₽")});let n=p.paymentType;if(n){var a;e.push({label:"Тип погашения",value:(null==(a=n[0])?void 0:a.value)===Z.w.annuity?"Аннуитетный":"Дифференцированный"})}return e.push({label:"Переплата",value:"".concat((0,ex.um)(p.totalOverpayment),"&#160;₽"),description:"Это сумма процентов, которые заемщик платит за пользование кредитом. Она может уменьшиться, если гасить кредит досрочно"},{label:"Итоговая выплата",value:"".concat((0,ex.um)(p.totalCost),"&#160;₽")}),e},[p.currectMonthlyPayment,p.firstPayment,p.loanRateFrom,p.loanRateTo,p.paymentType,p.propertyPrice,p.totalCost,p.totalOverpayment,l.full_price]),w=(0,i.useMemo)(()=>{var e;return(null==l||null==(e=l.rate_corrections)?void 0:e.filter(e=>e.rate).map(e=>({name:e.title,label:e.content,labelPosition:"left",checked:!!p.additionalParams[(0,et.y)(e.title)],onChange:(t,n)=>p.handleChangeAdditionalParams({key:(0,et.y)(e.title),value:n.target.checked&&e.rate||0})})))||[]},[p,null==l?void 0:l.rate_corrections]),[T,M]=(0,i.useState)(!1),S=(0,i.useCallback)(()=>{M(e=>!e)},[]),[U,W]=(0,i.useState)(!1);(0,i.useEffect)(()=>{W(!!p.matCapital)},[p.matCapital]);let q=(0,i.useCallback)(()=>{W(!0)},[]),H=(0,i.useMemo)(()=>[T,S],[T,S]),K=void 0!==l.amount.from&&void 0!==l.amount.to&&+l.amount.to>+l.amount.from;return(0,r.jsxs)(D.v.Provider,{value:H,children:[(0,r.jsxs)(u.mc,{className:(0,P.A)(eA().container,eA().containerFull,{[eA().containerWithoutCalculator]:!K}),children:[(e=>{var t;return(0,r.jsx)(B.E,{url:l.url,bank:{logoMob:null==a?void 0:a.logo_mob,url:"/banki/".concat(null==a?void 0:a.url),name:null!=(t=null==a?void 0:a.name)?t:l.bank_name},pageUrl:b.h.IPOTEKA,title:l.title,isSmall:e,isMobile:o,tagTheme:"green",className:eA().promo})})(),K&&(0,r.jsxs)("div",{className:eA().left,children:[(0,r.jsx)(L.t,{isMobile:o,title:"Настройки ипотеки",pageUrl:b.h.IPOTEKA,infoLink:{isShow:!o,text:"Подробнее об ипотеке",idScrollBlock:g.uB,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"inputRange",desription:"Впишите сюда стоимость жилья. Если деньги нужны вам не только на покупку недвижимости, но и на другие цели, выберите другой тип кредита",props:{label:"Стоимость недвижимости",...y}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",...v}}]},{elements:[{type:"inputRange",props:{label:"Первый взнос",...f}}]},l.maternal_capital.has>0?{isCollapsedElements:U,titleElements:"Использовать материнский капитал",onToggle:e=>{W(e)},elements:[{type:"moneyInput",props:{label:"Сумма сертификата",value:p.matCapital,onFocus:q,onChange:p.handleChangeMatCapital}},{type:"moneyInput",props:{label:"Личные средства",value:p.personalFunds,onChange:p.handleChangePersonalFunds}}]}:null,{elements:[{type:"divider",isHidden:!U||!p.paymentType||p.paymentTypeOptions.length<=1}]},{elements:[{type:"select",isHidden:!p.paymentType||p.paymentTypeOptions.length<=1,desription:(0,r.jsx)(I.q,{className:eA().typeDescription,type:null==(n=p.paymentType[0])?void 0:n.value}),props:{label:"Тип погашения",options:p.paymentTypeOptions,onChange:A,value:x}}]}],chips:C,additionalItemsTitle:"Уменьшить ставку",additionalItems:w,isShowChips:o&&!!(null==C?void 0:C.length)&&!s,isExpandSettings:s,onToggleSettings:h}),(0,r.jsx)(O.P,{text:"Все для ипотеки: страхуем недвижимость, жизнь, здоровье или все сразу",hideButtons:!0,hideQr:!0,isSmall:!0,className:eA().qrDesc})]}),(0,r.jsxs)("div",{className:(0,P.A)({[eA().right]:K}),children:[(0,r.jsx)(E.r,{captionTitle:j,pageUrl:b.h.IPOTEKA,onEdit:k,amount:p.mortgageCredit,repayment:p.totalOverpayment,disclaimer:"Предварительные условия. Не оферта",tag:l.online_application.commercial_desc,footerActions:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.$n,{as:"a",target:"_blank",className:eA().button,href:l.online_application.url,onClick:()=>{(0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.link,eventActionText:eC})},children:eC}),(0,r.jsx)(d.$n,{as:"a",onClick:()=>{(0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.button,eventActionText:eN}),(0,ej.e)(g.ov,{offset:o?0:-100,position:"top"})},className:eA().button,variant:"secondary",children:eN}),(0,r.jsx)(R.e,{offPadding:!1,widthMaxContent:!1,text:"График платежей",iconColor:"light",mainPageUrl:b.h.IPOTEKA,className:eA().link,onClick:S})]}),valuesList:N,showChart:!0}),(0,r.jsx)(O.P,{text:"Все для ипотеки: страхуем недвижимость, жизнь, здоровье или все сразу",hideButtons:!0,hideQr:!0,isSmall:!0,className:eA().qrMobile})]})]}),(0,r.jsx)(eh,{data:l,bankName:null==a?void 0:a.name,isOpen:T,paymentScheduleParametrs:{rate:Number(p.currectInterestRate),periodWithMoth:Number(p.period),defaultBalanceDebt:p.mortgageCredit},onClose:S,payments:p.paymentTypeOptions,logo:null==a?void 0:a.logo_mob,url:p.calculatorQueryParamsInLink,mainPageUrl:b.h.IPOTEKA})]})};var eT=n(40419),eM=n(13394),eS=n(16891),eP=n(91063),eL=n(44694),eR=n(27526),eE=n.n(eR);let eF=(0,i.memo)(e=>{let{data:t,className:n,onDetailInfoClick:a,onClick:l}=e,o=[],s=(0,i.useRef)(null),c=(0,i.useRef)(!1),u=(0,i.useRef)(null),d={text:(0,ex.ej)({from:t.amountFrom,to:t.amountTo},{currency:t.currency}),caption:"Сумма кредита"},m={text:"от ".concat((0,ex.ZV)(t.payment),"%"),caption:"Первый взнос"};o.push({label:"Ипотека",variant:"green"}),o.push({label:t.typeText,variant:"primary"});let _=(0,i.useCallback)(e=>{let[n]=e;1===n.intersectionRatio&&!c.current&&((0,eP.o)({event:"data-event",eventAction:"show_in_catalog",eventCategory:b.h.IPOTEKA,eventLabel:t.id}),c.current=!0,s.current&&u.current&&s.current.unobserve(u.current))},[t.id]);return(0,i.useEffect)(()=>{s.current&&u.current&&s.current.unobserve(u.current),!c.current&&u.current&&(s.current=new IntersectionObserver(_,{root:null,threshold:[1]}),s.current.observe(u.current))},[_]),(0,r.jsx)("div",{ref:u,className:n,onClick:()=>{var e;return e="click_button_".concat((0,et.y)("Подать заявку")),void((0,eP.o)({event:"data-event",eventAction:e,eventCategory:b.h.IPOTEKA,eventLabel:t.id,eventValue:t.eventValue}),null==l||l(t))},children:(0,r.jsx)(eL.M,{icon:t.logo?(0,r.jsx)("div",{className:eE().logo,children:(0,r.jsx)(W(),{width:56,height:56,src:t.logo,alt:"logo"})}):(0,r.jsx)("div",{className:eE().placeholderLogo}),companyName:t.bankName,productName:t.title,productUrl:t.url,buttonUrl:t.url,tags:o,advantageAmountFrom:d,advantageAmountTo:m,onDetailInfoClick:()=>{a(t),(0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.button,eventActionText:"open_modal"})},className:eE().plate})})});eF.displayName="MortgageListItem";var eI=n(62576),eB=n(96759);let eO=e=>{var t,n,a,l;let{banks:r,mortgage:o,period:i}=e,s="/".concat(b.h.IPOTEKA,"/").concat(o.url),c=r.find(e=>+o.bank_id==+e.id),u="",d="";return 2===o.online_application.type?u="Открытие в банке":(u="Заявка через сайт банка",d="non_commercial"),{id:o.id,bankName:null!=(n=null==c?void 0:c.name)?n:o.bank_name,bankId:null!=(a=null==c?void 0:c.id)?a:"",logo:null!=(l=null==c?void 0:c.logo_mob)?l:"",title:o.title,url:s,legalName:(e=>{if(e)try{let t=JSON.parse(e);if(Array.isArray(t))return t[0].name;return t.name}catch(t){return e}return""})("string"==typeof(null==c?void 0:c.legal_entities)?JSON.parse(null==c?void 0:c.legal_entities)[0].name:null==c||null==(t=c.legal_entities)?void 0:t[0].name),isPermanentRegistation:1==+o.registration_address.permanent,period:i||+o.period.to,rate:+o.interest_rate.from,rateTo:+o.interest_rate.to,payment:+o.first_payment.from||0,currency:"₽",detailUrl:"/".concat(b.h.IPOTEKA,"/").concat(o.url),typeText:u,eventValue:d,notLoan:1===o.loan.not_required,incomeProof:0===o.income_proof.not_required,amountFrom:Number(o.amount.from),amountTo:Number(o.amount.to)}};var eD=n(33126),eU=n(92666),eW=n(12341),eq=n.n(eW);let eH=(0,i.memo)(e=>{let{bank:t,banks:n,currentCardId:a,mortgagesList:l,mortgagesFinuslugiList:o,className:s,newContainer:c=!1}=e,{town:d}=(0,eU.z)(),[m,_]=(0,i.useState)(),p=(0,i.useCallback)(()=>{_(void 0)},[]),h=(0,i.useCallback)(e=>{(0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),v=(0,i.useMemo)(()=>{let e=l.length?l.filter(e=>e.id!==a):[];return(0,eB.q)({productList:e,anotherList:e,count:eI.gx})},[l,a]),g=(0,i.useMemo)(()=>{let e=o||[];return(0,eB.q)({productList:e,anotherList:e,count:eI.a0-v.length})},[v.length,o]),y=(0,i.useMemo)(()=>({bankList:v.map(e=>eO({banks:[t],mortgage:e})),finuslugiList:g.map(e=>eO({banks:n,mortgage:e}))}),[t,n,v,g]),f=(0,i.useCallback)(e=>{if(!e)return;let n=[v,g].reduce((e,t)=>[...e,...t],[]).find(t=>t.id===e.id);if(n)return{...n,site:{title:t.site.title,url:t.site.url},bankName:e.bankName,detailUrl:e.detailUrl,logo:e.logo,url:e.url}},[t.site.title,t.site.url,v,g]),x=(0,i.useCallback)(e=>{_(f(e)),e&&(0,ee._)({eventCategory:b.h.IPOTEKA,eventAction:ee.y.popup,eventActionText:e.title,eventLabel:e.id})},[f]),j="".concat((0,eD.UK)().mainBaseUrl,"/banki/").concat(t.url,"/ipoteka").concat((null==d?void 0:d.url.length)?"/reg_"+d.url:""),k=(0,r.jsx)(r.Fragment,{children:!!y.bankList.length&&(0,r.jsxs)("section",{className:eq().offersListContainer,children:[(0,r.jsxs)("p",{className:eq().listTitle,children:["Ипотека от ",t.name]}),y.bankList.map(e=>(0,r.jsx)(eF,{text:"Подать заявку",className:eq().listItem,data:e,onDetailInfoClick:x,onClick:h},e.url)),(0,r.jsx)(eT.e,{offPadding:!0,text:"Bсе предложения от банка",href:j,target:"_blank",iconColor:"light",mainPageUrl:b.h.IPOTEKA})]})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:(0,P.A)(eq().container,s),children:[(0,r.jsx)("h3",{className:eq().title,children:"Другие предложения"}),c?(0,r.jsx)(u.mc,{children:k}):(0,r.jsx)(eS.J,{children:k})]}),(0,r.jsx)(eM.u,{data:m,isOpen:!!m,onClose:p,mainPageUrl:b.h.IPOTEKA})]})});eH.displayName="MortgagesList";var eK=n(9837),eV=n(66460),eY=n(6980),ez=n(80490),eZ=n(99275),eJ=n(40431),eG=n.n(eJ);function eQ(e){var t;let{offer:n,journal:a,questions:l,description:o,banks:s,refererTag:c,offers:m,offersFinuslugi:v,support:g}=e,y=(0,en.sw)(),{region:f,town:x}=(0,eU.z)(),j=s.find(e=>+e.id===n.bank_id),A=(null==l?void 0:l.map(e=>({title:e.title,text:e.text.map(e=>e.data.html).join(""),plainText:e.text.map(e=>(0,p.NC)(e.data.html)).join("").trim()})))||[],C="Ипотека \xab".concat(n.title,"\xbb от ").concat(null!=(t=null==j?void 0:j.name_r)?t:""),N=(0,i.useMemo)(()=>{var e;let t=(null==x?void 0:x.name_p)||(null==f?void 0:f.name_p)?" в ".concat((null==x?void 0:x.name_p)||(null==f?void 0:f.name_p)):"",a="".concat((null==f?void 0:f.url)?"/reg_".concat(null==f?void 0:f.url):"").concat((null==x?void 0:x.url)?"/".concat(null==x?void 0:x.url):""),l=[{label:"Главная",href:"/"},{label:"Ипотеки".concat(t),href:"/".concat(b.h.IPOTEKA).concat(a)}];return c&&l.push({label:"".concat(c.name).concat(t),href:"/".concat(b.h.IPOTEKA,"/teg_").concat(c.url).concat(a)}),l.push({label:"".concat(null!=(e=null==j?void 0:j.name)?e:n.bank_name," Ипотека ").concat(n.title)}),l},[null==j?void 0:j.name,n.bank_name,n.title,c,null==f?void 0:f.name_p,null==f?void 0:f.url,null==x?void 0:x.name_p,null==x?void 0:x.url]);return(0,r.jsxs)("main",{className:eG().page,children:[(0,r.jsx)(h.I,{productId:String(n.id),title:C,description:o}),(0,r.jsx)(eV.t,{}),(0,r.jsx)(eK.c,{questions:A}),(0,r.jsx)("div",{className:eG().navigationWrapper,children:(0,r.jsx)(u.mc,{children:(0,r.jsx)(d.BI,{className:eG().breadcrumbs,items:N})})}),(0,r.jsx)(ew,{bank:j,data:n,isMobile:y}),(0,r.jsx)(u.mc,{className:eG().about,children:(0,r.jsx)(k,{data:n,bank:j,pageUrl:b.h.IPOTEKA})}),(0,r.jsx)(S,{isMobile:y,url:n.online_application.url}),void 0!==j&&(0,r.jsx)(eH,{newContainer:!0,bank:j,banks:s,currentCardId:n.id,mortgagesList:m,mortgagesFinuslugiList:v}),(null==a?void 0:a.posts.length)>0&&(0,r.jsx)(u.mc,{children:(0,r.jsx)(eY.C,{posts:null==a?void 0:a.posts,eventCategory:b.h.IPOTEKA})}),(0,r.jsx)("div",{className:eG().supportSection,children:(0,r.jsx)(ez.E,{value:g})}),(0,r.jsx)("div",{className:eG().faqSection,children:(0,r.jsx)(eZ.m,{isAllExpanded:!0,newContainer:!0,faqBlockTitle:"",Link:e=>(0,r.jsx)(_(),{...e}),dataLayerPush:eP.o,questions:A,eventCategory:"ipoteki_support_block",href:"".concat((0,eD.UK)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про ипотеку"})})]})}var eX=n(37071);n(81787);var e$=n(23857);function e0(e){let{layout:t,mortgage:n,journal:a,questions:l,description:o,banks:i,offers:s,offersFinuslugi:c,support:u}=e;return(0,r.jsx)(e$.P,{data:t,children:(0,r.jsx)(eQ,{offer:n,journal:a,questions:l,description:o,banks:i,refererTag:null,offers:s,offersFinuslugi:c,support:u})})}n(7455);var e1=n(28131);let e2={offers:{list:(e,t,n,a,l,r)=>{let o;return(o="/money_data/Mortgages.json?".concat(Object.entries({...(e=>{var t,n,a,l;let r={};return void 0!==e.amount&&(r.amount=e.amount),void 0!==e.downpayment&&(r.first_payment=e.downpayment),void 0!==e.term&&(r.period=e.term),void 0!==e.property_type&&(r.property_type=e.property_type),void 0!==e.market&&(r.real_estate_market=null!=(t=({first:"primary",second:"secondary"})[e.market])?t:"primary"),void 0!==e.form&&(r.form=null!=(n=({cash:"cash",account:"to_account",third_party_bank_account:"to_custom_account"})[e.form])?n:"to_account"),void 0!==e.proof&&(r.income_proof=e.proof),void 0!==e.provision&&(r.loan=null!=(a=({not_required:"not_required",deposit:"pledge",guarantee:"guarantee",not_required_and_guarantee:"pledge,guarantee"})[e.provision])?a:""),e.banks&&e.banks.length>0&&(r.bank=e.banks.join(",")),void 0!==e.flags&&e.flags.includes("maternal_capital")&&(r.maternal_capital=1),r.sort=null!=(l=void 0!==e.sort?({rate:"rate",payment:"amount",downpayment:"firstPayment"})[e.sort]:void 0)?l:"rate",r.order=e.sortDir,r})(e),limit:t,page:n}).map(e=>{let[t,n]=e;return"".concat(t,"=").concat(encodeURIComponent(n))}).join("&"),"&tag=").concat(a).concat(void 0!==l?"&region=".concat(l).concat(void 0!==r?"&town=".concat(r):""):"","&archive=0"),(0,s.Q)(o).then(e=>{let{data:t,error:n}=e;return n?Promise.reject(n):t})).then(e=>{if(!e)return{title:"",subtitle:"",description:"",page:[],count:0,total_count:0};let{title:t,description:a,subtitle:l,mortgages_count:r,mortgages_total_count:o,mortgages:i,mortgages_online:s}=e;if(void 0!==n&&1!==n&&0===i.length&&0===s.length)throw new e1.m_("Invalid mortgages page: ".concat(n));return{title:t,subtitle:l,description:a,page:s.concat(i).map(e=>({...e,full_price:(0,c.j)(e.full_price)})),count:r,total_count:o}})}}};n(88310);let e4="/ipoteka",e3="DEFAULT",e8="reg_",e5="teg_",e6={RATE:"rate",AMOUNT:"amount",DOWNPAYMENT:"downpayment"};e6.RATE,e6.AMOUNT,e6.DOWNPAYMENT,n(7482);var e7=n(50261),e9=n(66451),te=n.n(e9);let tt=[{id:1,logo:{src:"/kredity/assets/_next/static/media/icon-1.adb0626c.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Займы</span>",value:"potrebitelskie_kredity/teg_bystro",isLink:!0},{id:2,logo:{src:"/kredity/assets/_next/static/media/icon-2.0c7d47df.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на любые цели</span>",value:"potrebitelskie_kredity?purpose=other",isLink:!0},{id:3,logo:{src:"/kredity/assets/_next/static/media/icon-3.b9b622cd.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на автомобиль</span>",value:"avtokredity",isLink:!0},{id:4,logo:{src:"/kredity/assets/_next/static/media/icon-4.15a4284d.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на лечение</span>",value:"potrebitelskie_kredity?purpose=treatment",isLink:!0},{id:5,logo:{src:"/kredity/assets/_next/static/media/icon-5.ee0778ef.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на учебу</span>",value:"potrebitelskie_kredity?purpose=education",isLink:!0},{id:6,logo:{src:"/kredity/assets/_next/static/media/icon-6.bc466745.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Ипотека</span>",value:"mortgages",isLink:!1}],tn=(0,i.memo)(e=>{let{pageUrl:t}=e,{mainBaseUrl:n}=(0,eD.UK)(),a=(0,i.useCallback)((e,a)=>{var l;e.stopPropagation();let r=(0,et.y)(null!=(l=a.title)?l:"");(0,eP.o)({event:"data-event",eventAction:a.isLink?"click_link_".concat(r):"click_button_".concat(r),eventCategory:t}),a.isLink?window.open("".concat(n,"/").concat(a.value),"_blank"):window.scrollTo({top:0,behavior:"smooth"})},[n,t]);return(0,r.jsxs)(u.mc,{className:te().container,children:[(0,r.jsx)("h2",{className:te().title,children:"Каталог кредитов"}),(0,r.jsx)("div",{className:te().cardsList,children:tt.map(e=>(0,r.jsxs)("div",{className:te().card,onClick:t=>a(t,e),children:[(0,r.jsx)(W(),{className:te().icon,width:158,height:60,alt:"banner-".concat(e.value),src:e.logo}),(0,r.jsx)("p",{className:te().subTitle,dangerouslySetInnerHTML:{__html:e.title}})]},e.id))})]})});var ta=n(36012),tl=n(18258),tr=n(86700),to=n.n(tr);let ti=e=>{let{posts:t,regions:n,tags:a,questionsData:l,currentTag:o,region:i,town:s,support:c}=e,{query:u}=(0,ev.useRouter)(),d=function(e,t,n,a,l,o){let i=e.map(e=>({title:(0,e7.w)(e.title),text:(0,r.jsx)(p.eW,{data:(0,e7.j)(e).content})}));i.push(...(0,tl.N)(b.h.IPOTEKA,n,a,l,o,{nominativeCase:"Ипотека",genitiveCase:"ипотек"}));let s=t.reduce((e,t)=>{if(void 0===t.url_redirect){let n=(0,ta.AP)(t.url,t.name);e.push(n)}return e},[]);return i.push({title:"Виды ипотек",text:(0,r.jsx)(ta.oL,{children:s})}),i}(l,a.reduce((e,t)=>(t.url_redirect||e.push({...t,url:((e,t)=>{let n="teg_".concat(e.url_redirect||e.url);if(!t)return"".concat(n);let a=(Array.isArray(t)?t:[t]).filter(e=>!e.includes(e5));return"".concat([n,...a].join("/"))})(t,u.segments)}),e),[]),n,o,i,s);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:to().faq_container,children:(0,r.jsx)(eZ.m,{isAllExpanded:!0,newContainer:!0,Link:e=>(0,r.jsx)(_(),{...e}),dataLayerPush:eP.o,questions:d,eventCategory:"mortgages_support_block",href:"".concat((0,eD.UK)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про ипотеку"})}),t.length>0&&(0,r.jsx)(eY.C,{eventCategory:e4,posts:t}),(0,r.jsx)(ez.E,{value:c}),(0,r.jsx)(tn,{pageUrl:e4})]})};var ts=n(24523),tc=n(25904),tu=n(20912),td=n(99542),tm=n.n(td);function t_(e){let{chips:t,onChipClick:n,lastInFirstRowChipIndex:a,isMobile:l,isFirstRow:o,useLinkChips:i}=e,{asPath:s}=(0,ev.useRouter)(),{mainBaseUrl:c}=(0,eD.UK)(),u="".concat(c).concat(s),d=(e,t)=>{let{value:i,label:s,color:c}=e;return(0,r.jsx)("div",{className:(0,P.A)(tm().chip,tm()[c],{[tm().transparentChip]:o&&t>a},{[tm().hiddenChip]:!o&&l&&t<=a}),onClick:()=>n(i),children:s},i)};return(0,r.jsx)(r.Fragment,{children:t.map(i?(e,t)=>{let n=e.value,a=new URL(u);return a.searchParams.delete("property_type"),a.searchParams.append("property_type",e.value),(0,r.jsx)(_(),{className:tm().link,href:a.toString(),onClick:e=>e.preventDefault(),children:d(e,t)},n)}:d)})}var tp=n(27607),th=n.n(tp);function tv(){return(tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}let tg=function(e){return i.createElement("svg",tv({xmlns:"http://www.w3.org/2000/svg",width:12,height:6,fill:"none",viewBox:"0 0 12 6"},e),a||(a=i.createElement("path",{fill:"#fff",d:"M11.663.28a1.25 1.25 0 0 0-.802-.28c-.301 0-.59.1-.803.28l-4.086 3.4-4.03-3.4A1.25 1.25 0 0 0 1.139 0C.84 0 .55.1.337.28a1 1 0 0 0-.25.312.83.83 0 0 0 0 .739 1 1 0 0 0 .25.312l4.826 4.073q.161.136.37.21a1.32 1.32 0 0 0 .876 0 1.2 1.2 0 0 0 .37-.21l4.884-4.073a1 1 0 0 0 .25-.312.83.83 0 0 0 0-.74 1 1 0 0 0-.25-.312"})))},ty=e=>{let{onChipClick:t,chips:n,className:a}=e,[l,o]=(0,i.useState)(!1),s=!(0,tu.K)("sm"),c=l?"Скрыть":"Ещё",[u,d,m,_]=((e,t)=>{let[n,a]=(0,i.useState)(e),[l,r]=(0,i.useState)(e),o=(0,i.useRef)(null),s=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=o.current;if(null===e)throw Error("Dead code branch");let n=new ResizeObserver(e=>{let n=e[0];if(n){let{width:e}=n.contentRect,l=0,o=0,i=Array.from(n.target.children);for(let n=0;n<i.length;n++)if((l+=i[n].offsetWidth+12)<=e&&r(n),l<=(t?2*e:e))o=n;else{a(o);break}}});return n.observe(e),()=>{n.unobserve(e)}},[t,n,l]),[l,n,o,s]})(n.length,s);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{ref:m,className:(0,P.A)(th().row,a,{[th().open]:l}),children:[(0,r.jsx)(t_,{chips:n,onChipClick:t,lastInFirstRowChipIndex:u,isMobile:!1,useLinkChips:!0}),d<n.length-1&&(0,r.jsxs)("div",{ref:_,className:(0,P.A)(th().toggle,{[th().open]:l}),onClick:()=>{(0,ee._)({eventAction:ee.y.button,eventActionText:(0,et.y)(c)}),o(e=>!e)},children:[(0,r.jsx)(tg,{})," ",c]})]})})};var tb=n(58082),tf=n.n(tb);let tx=e=>{let{count:t,children:n,addon:a,chips:l,header:o,isLoading:i,onChipClick:s,onParamsClick:c,onShowClick:u,useLinkChips:m}=e,_=(0,r.jsx)(ty,{chips:l,onChipClick:s,useLinkChips:m});return(0,r.jsxs)("div",{className:tf().wrap,children:[o,(0,r.jsxs)("div",{className:tf().top_row,children:[(0,r.jsx)("div",{className:tf().top_row_content,children:n}),(0,r.jsxs)("div",{className:tf().top_row_buttons,children:[(0,r.jsx)(d.$n,{variant:"secondary",label:"Все параметры",pending:i,disabled:i,onClick:c,iconLeft:(0,r.jsx)(tc.IconFdsParametersHorizontalO,{}),className:tf().params_button}),(0,r.jsx)(d.$n,{onClick:u,className:tf().show_button,pending:i,disabled:i,label:"Показать".concat(t?" ".concat(t):"")})]}),(0,r.jsx)("div",{className:tf().chips_row,children:_}),a&&(0,r.jsx)("div",{className:tf().addon,children:a})]})]})};tx.displayName="MainFilter";var tj=n(87057),tk=n(62835),tA=n(40818),tC=n(47052),tN=n(38200),tw=n(31070),tT=n.n(tw),tM=n(67129),tS=n.n(tM);function tP(){return(0,r.jsx)("iframe",{className:tS().widget,src:"https://realty.ya.ru/widgets/back-call-request"})}var tL=n(67347),tR=n(99448),tE=n.n(tR);let tF=e=>{let{currentTag:t,subtitle:n,className:a}=e,{handleToggleModal:l}=(0,o.u)(),s=(0,tC.Y)(),c=(0,en.sw)(),m=(0,tN.G)(),_=t?t.name:"Ипотека",{region:p,town:h}=(0,eU.z)(),v=(null==h?void 0:h.name_p)||(null==p?void 0:p.name_p),g=v?" в ".concat(v):"",y="".concat(p?"/".concat(e8).concat(p.url):"").concat(h?"/".concat(h.url):""),{mainBaseUrl:b,isYandexRealty:f}=(0,eD.UK)(),x=((e,t,n,a,l)=>{let r='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(e,'"}'),o='{"@type":"ListItem","position":2,"name":"Ипотека'.concat(a,'","item":"').concat(e,"/\n      ").concat(e4).concat(l,'\n      "}'),i=t?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(n).concat(a,'","item":"').concat(e,"/").concat(e4).concat(t?"/".concat(e5).concat(t.url):"").concat(l,'"}'):"";return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(r),",").concat(o).concat(i,"]}")})(b,t,_,g,y),j=(0,i.useCallback)(()=>{(0,ee._)({eventAction:ee.y.link,eventActionText:(0,et.y)("Главная"),url:b})},[b]),k=(0,i.useCallback)(()=>{l(!0),(0,ee._)({eventAction:ee.y.popup,eventActionText:"".concat((0,et.y)("регион"),"_").concat(v)})},[v,l]);return(0,r.jsxs)("div",{className:(0,P.A)(a,tE().wrap,"bg-".concat(m)),children:[(0,r.jsx)(u.mc,{children:(0,r.jsxs)("div",{className:(0,P.A)(tE().breadcrumbs),children:[(0,r.jsx)(d.BI,{items:(()=>{let e=[{label:"Главная",href:"/"}];return t&&e.push({label:"Ипотека".concat(g),href:"".concat(e4).concat(y)}),e.push({label:"".concat(_).concat(t?"":g)}),e})(),isMobile:c,onClick:j}),(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:x}})]})}),f&&(0,r.jsx)(u.mc,{children:(0,r.jsx)(tP,{})}),(0,r.jsx)(u.mc,{children:(0,r.jsxs)("div",{className:tE().content,children:[(0,r.jsxs)("div",{className:tE().text,children:[(0,r.jsxs)("h1",{className:tE().title,children:[_," ",v&&(0,r.jsxs)(r.Fragment,{children:["в"," ",(0,r.jsx)("span",{onClick:k,className:tE().location,children:v})]})]}),(0,r.jsx)(tL.j,{tag:"p",className:tT().subtitle,children:n})]}),(0,r.jsx)("div",{className:tE().banner,children:(0,r.jsx)(tk.L,{config:s,params:tA.ZA})})]})})]})},tI=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}],tB=[{value:"not_required",label:"Не требуется"},{value:"deposit",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"not_required_and_guarantee",label:"Залог и поручительство"}],tO=[{value:"cash",label:"Наличными"},{value:"account",label:"На счет"},{value:"third_party_bank_account",label:"На счет в стороннем банке"}],tD=[{value:"flat",label:"Квартира"},{value:"townhouse",label:"Таунхаус"},{value:"vacation_home",label:"Загородный дом или коттедж"},{value:"room",label:"Комната или доля"},{value:"apartment",label:"Апартаменты"},{value:"commerce_estate",label:"Коммерческая недвижимость"},{value:"garage",label:"Гараж"},{value:"other",label:"Другое"}],tU=[{value:"first",label:"Первичный"},{value:"second",label:"Вторичный"}],tW=[{label:"По ставке",value:"rate",shortLabel:"Ставка"},{label:"По взносу",value:"downpayment",shortLabel:"Взнос"},{label:"По платежу",value:"payment",shortLabel:"Платеж"}],tq=[{label:"Семейная ипотека",value:"family"},{label:"Дальневосточная ипотека",value:"far_east"},{label:"Материнский капитал",value:"maternal_capital"}];var tH=n(67221),tK=n(11404),tV=n(3187);function tY(){let{query:e,push:t}=(0,ev.useRouter)(),{amount:n,payment:a,downpayment:l,term:r,property_type:o,market:s,form:c,proof:u,banks:d,provision:m,flags:_,sort:p,sortDir:h,...v}=e,g=(0,i.useMemo)(()=>(function(e){let{amount:t,payment:n,downpayment:a,term:l,property_type:r,market:o,form:i,proof:s,banks:c,provision:u,flags:d,sort:m,sortDir:_}=e,p={};return"string"==typeof t&&(p.amount=Number(t)),"string"==typeof n&&(p.payment=Number(n)),"string"==typeof a&&(p.downpayment=Number(a)),"string"==typeof l&&(p.term=Number(l)),"string"==typeof r&&(p.property_type=r),"string"==typeof o&&(p.market=o),"string"==typeof i&&(p.form=i),"string"==typeof s&&(p.proof=s),"string"==typeof c&&(p.banks=(0,tV.pi)(c)),"string"==typeof u&&(p.provision=u),"string"==typeof d&&(p.flags=(0,tV.pi)(d)),"string"==typeof m?p.sort=m:p.sort="rate","string"==typeof _?p.sortDir=_:p.sortDir="asc",p})({amount:n,payment:a,downpayment:l,term:r,property_type:o,market:s,form:c,proof:u,banks:d,provision:m,flags:_,sort:p,sortDir:h}),[n,a,l,r,o,s,c,u,d,m,_,p,h]),y=(0,i.useRef)(v),b=(0,i.useRef)(g),f=(0,i.useRef)(t);return y.current=v,b.current=g,f.current=t,{filter:g,setFilter:(0,i.useCallback)(e=>{var t,n,a,l,r,o,i,s,c,u;if(t=b.current,n=e,t.amount===n.amount&&t.payment===n.payment&&t.downpayment===n.downpayment&&t.term===n.term&&t.property_type===n.property_type&&t.market===n.market&&t.form===n.form&&t.proof===n.proof&&(null==(a=t.banks)?void 0:a.length)===(null==(l=n.banks)?void 0:l.length)&&(null==(r=t.banks)?void 0:r.slice().sort().toString())===(null==(o=n.banks)?void 0:o.slice().sort().toString())&&t.provision===n.provision&&(null==(i=t.flags)?void 0:i.length)===(null==(s=n.flags)?void 0:s.length)&&(null==(c=t.flags)?void 0:c.slice().sort().toString())===(null==(u=n.flags)?void 0:u.slice().sort().toString())&&t.sort===n.sort&&t.sortDir===n.sortDir)return!1;let d={...function(e){let{amount:t,payment:n,downpayment:a,term:l,property_type:r,market:o,form:i,proof:s,banks:c,provision:u,flags:d,sort:m,sortDir:_}=e,p={};return void 0!==t&&(p.amount=String(t)),void 0!==n&&(p.payment=String(n)),void 0!==a&&(p.downpayment=String(a)),void 0!==l&&(p.term=String(l)),void 0!==r&&(p.property_type=r),void 0!==o&&(p.market=o),void 0!==i&&(p.form=i),void 0!==s&&(p.proof=s),void 0!==c&&(p.banks=(0,tV.t9)(c)),void 0!==u&&(p.provision=u),void 0!==d&&(p.flags=(0,tV.t9)(d)),void 0!==m&&(p.sort=m),void 0!==_&&(p.sortDir=_),p}(e),...y.current};return f.current({query:d},void 0,{shallow:!0}),!0},[])}}var tz=n(45712);let{useDebugValue:tZ}=i,{useSyncExternalStoreWithSelector:tJ}=tz,tG=e=>{let t,n=new Set,a=(e,a)=>{let l="function"==typeof e?e(t):e;if(!Object.is(l,t)){let e=t;t=(null!=a?a:"object"!=typeof l||null===l)?l:Object.assign({},t,l),n.forEach(n=>n(t,e))}},l=()=>t,r={setState:a,getState:l,getInitialState:()=>o,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},o=t=e(a,l,r);return r},tQ=null,tX=e=>(function(e,t=e=>e,n){let a=tJ(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,void 0);return tZ(a),a})(tQ=null!=tQ?tQ:(e=>e?tG(e):tG)(t=>{var n,a,l,r,o,i,s,c;return{subtitle:null!=(o=null==(n=e.mortgagesData)?void 0:n.subtitle)?o:"",offers:null!=(i=null==(a=e.mortgagesData)?void 0:a.page)?i:[],loading:!1,count:null!=(s=null==(l=e.mortgagesData)?void 0:l.count)?s:0,total_count:null!=(c=null==(r=e.mortgagesData)?void 0:r.total_count)?c:0,delayTimer:null,reload:async function(e,n,a,l,r){t({loading:!0});let{subtitle:o,page:i,count:s,total_count:c}=await e2.offers.list(e,n,1,r,a,l),u=null==tQ?void 0:tQ.getState().delayTimer;u&&clearTimeout(u),null==tQ||tQ.getState().delayUpdate(()=>{t({subtitle:o}),t({offers:i}),t({count:s}),t({total_count:c}),t({loading:!1})})},delayUpdate:function(e){let n=null==tQ?void 0:tQ.getState().delayTimer;n&&clearTimeout(n),t({delayTimer:setTimeout(e,1e3)})},load:async function(n,a,l,r,o){var i,s;t({loading:!0});let{subtitle:c,page:u,count:d,total_count:m}=await e2.offers.list(n,a,l,null!=(s=null==(i=e.currentTag)?void 0:i.url)?s:e3,r,o);null==tQ||tQ.getState().delayUpdate(()=>{t({subtitle:c}),t(e=>{let{offers:t}=e;return{offers:t.concat(u)}}),t({count:d}),t({total_count:m}),t({loading:!1})})},clear:()=>{t({subtitle:"",offers:[],count:0,total_count:0,loading:!1})}}}));var t$=n(35987),t0=n(87768),t1=n(15462),t2=n(40090),t4=n(9640),t3=n(10741),t8=n.n(t3);let t5=e=>{let{filter:t,banksOptions:n,onChange:a}=e;return(0,r.jsxs)("div",{className:t8().content,children:[(0,r.jsxs)("div",{className:t8().form,children:[(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(tj.F,{label:"Сумма кредита",value:t.amount,onChange:e=>{a("amount",void 0!==e&&0!==e?Math.abs(e):void 0,"Сумма")}})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(tj.F,{label:"Ежемесячный платеж до",value:t.payment,onChange:e=>{a("payment",void 0!==e&&0!==e?Math.abs(e):void 0,"Ежемесячный платеж до")}})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(tj.F,{label:"Первый взнос",value:t.downpayment,onChange:e=>{a("downpayment",void 0!==e&&0!==e?Math.abs(e):void 0,"Первый взнос")}})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(d.YI,{label:"Срок",value:t.term,max:600,decimals:"never",unit:void 0!==t.term?(0,ef.UB)(t.term):void 0,onChange:e=>{a("term",void 0!==e&&0!==e?Math.abs(e):void 0,"Срок")},withoutControls:!0})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(t4.l,{className:t8().select_fix,label:"Вид недвижимости",options:tD,value:t.property_type,onChange:e=>a("property_type",e,"Вид недвижимости")})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(t4.l,{className:t8().select_fix,label:"Рынок недвижимости",options:tU,value:t.market,onChange:e=>a("market",e,"Рынок недвижимости")})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(t4.l,{className:t8().select_fix,label:"Форма выдачи",options:tO,value:t.form,onChange:e=>a("form",e,"Форма выдачи")})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(t4.l,{className:t8().select_fix,label:"Подтверждение дохода",options:tI,value:t.proof,onChange:e=>a("proof",e,"Подтверждение дохода")})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(t2.L,{className:t8().select_fix,label:"Банки",options:n,values:t.banks,onChange:e=>a("banks",e,"Банки")})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(t4.l,{className:t8().select_fix,label:"Обеспечение",options:tB,value:t.provision,onChange:e=>a("provision",e,"Обеспечение")})})]}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsxs)("div",{className:t8().sort,children:[(0,r.jsx)("h3",{className:t8().sort_title,children:"Дополнительно"}),tq.map((e,n)=>{var l;return(0,r.jsx)("div",{className:t8().fieldWrapper,children:(0,r.jsx)(d.Sc,{className:t8().checkboxField,value:null==(l=t.flags)?void 0:l.includes(e.value),label:e.label,onChange:()=>{var n;return a("flags",(0,t1.L$)(null!=(n=t.flags)?n:[],e.value),"Дополнительно")}})},n)})]})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsx)(u.cG,{className:t8().separator})}),(0,r.jsx)("div",{className:(0,P.A)(t8().wrap),children:(0,r.jsxs)("div",{className:t8().sort,children:[(0,r.jsx)("h3",{className:t8().sort_title,children:"Сортировка"}),tW.map((e,n)=>(0,r.jsx)("div",{className:t8().sort_wrap,children:(0,r.jsx)(d.sx,{name:"radio",value:t.sort,label:e.label,checked:t.sort===e.value,className:t8().checkboxField,onChange:()=>a("sort",e.value,"Сортировка")})},n))]})})]})},t6=e=>{let{visible:t,filter:n,offersCount:a,banksOptions:l,onHide:o,onChange:i,onDrop:s,onShow:c}=e;return(0,r.jsx)(t0.K,{count:a,isOpen:t,isMobile:!1,pageUrl:b.h.IPOTEKA,title:"Все параметры",onCLickShow:()=>c(),onClose:o,onClickReset:()=>s(),children:(0,r.jsx)(t5,{filter:n,onChange:i,banksOptions:l})})};var t7=n(16904),t9=n.n(t7);let ne=(0,ts.O)(),nt=e=>{let{ssr:t}=e,{scrollSmooth:n}=(0,t$.Ll)(),{filter:a,setFilter:l}=tY(),{visible:o,show:s,hide:c}=(0,tK.g)(),{subtitle:d,count:m}=tX({filter:a,mortgagesData:t.mortgagesData,currentTag:t.currentTag}),_=(0,i.useMemo)(()=>tD.map(e=>{let{value:t,label:n}=e;return{value:t,label:n,color:a.property_type===t?"black":"default"}}),[a.property_type]),p=(0,i.useCallback)(e=>{var t,n;(0,ee._)({eventAction:ee.y.filterCatalog,eventCategory:ee.y.filterCatalog,eventLabel:"property_type",eventValue:(0,et.y)(null!=(n=null==(t=tD.find(t=>t.value===e))?void 0:t.label)?n:"")}),l({...a,property_type:e===a.property_type?"":e})},[a,l]),h=(0,i.useCallback)(()=>l({}),[l]),[v]=(0,tH.e)(()=>(0,eX.C3)().then(e=>null!=e?e:[]),[]),y=(0,i.useMemo)(()=>(null!=v?v:[]).map(e=>({value:e.id,label:e.name})),[v]),b=()=>{(0,ee._)({eventAction:ee.y.button,eventActionText:(0,et.y)("показать")}),n({offset:-90})},f=(0,i.useCallback)(()=>{(0,ee._)({eventAction:ee.y.button,eventActionText:(0,et.y)("все параметры")}),s()},[s]),x=(e,t,n)=>{!function(e,t){ne(()=>(0,ee._)({eventAction:ee.y.filterCatalog,eventCategory:ee.y.filterCatalog,eventLabel:(0,et.y)(e),eventValue:"string"==typeof t?t:JSON.stringify(t)}))}(n,t),l({...a,[e]:t})};return(0,r.jsxs)("div",{className:t9().wrap,children:[(0,r.jsx)(tF,{subtitle:d,currentTag:t.currentTag}),(0,r.jsxs)(u.mc,{id:g.sn,children:[(0,r.jsxs)(tx,{count:m,onChipClick:p,chips:_,onParamsClick:f,onShowClick:b,children:[(0,r.jsx)(tj.F,{label:"Сумма кредита",value:a.amount,onChange:e=>{x("amount",void 0!==e&&0!==e?Math.abs(e):void 0,"Сумма")}}),(0,r.jsx)(tj.F,{label:"Ежемесячный платеж до",value:a.payment,onChange:e=>{x("payment",void 0!==e&&0!==e?Math.abs(e):void 0,"Ежемесячный платеж до")}})]}),(0,r.jsx)(t6,{offersCount:m,visible:o,filter:a,banksOptions:y,onChange:x,onHide:c,onDrop:h,onShow:()=>{c(),b()}})]})]})};var nn=n(74356),na=n(72809),nl=n(60650),nr=n(2180),no=n(18315),ni=n(12837),ns=n(47245),nc=n.n(ns);let nu=e=>{let{isOpen:t,url:n,data:a,onAllConditionsClick:l,onClose:o}=e,s=(0,i.useMemo)(()=>a?(e=>{let t={sectionTitle:"Условия ипотеки",body:[{label:"Сумма кредита",value:(0,ex.jC)(e.amount.from,e.amount.to)}]},n=e.full_price;if(n){let a=e.interest_rate;t.body.push({label:"ПСК",value:(0,c.o)(n),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n          Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,r.jsxs)("div",{children:[(0,ex.sP)(Number(a.from),Number(a.to)),a.comment&&(0,r.jsx)("div",{className:nc().comment,dangerouslySetInnerHTML:{__html:a.comment}})]})})}return void 0!==e.first_payment.from&&t.body.push({label:"Минимальный первый взнос",value:"от ".concat(e.first_payment.from,"%")}),(e.loan.not_required||e.loan.comment||e.loan.text)&&t.body.push({label:"Обеспечение",value:e.loan.not_required?"Не требуется":(0,ni.t)(e.loan)}),(e.period.from||e.period.to)&&t.body.push({label:"Срок погашения кредита",value:"".concat((0,ex.Qd)(Number(e.period.from),Number(e.period.to))," мес.")}),(e.property_type.comment||e.property_type.text)&&t.body.push({label:"Вид недвижимости",value:(0,ni.t)(e.property_type)}),(e.real_estate_market.comment||e.real_estate_market.text)&&t.body.push({label:"Рынок недвижимости",value:(0,ni.t)(e.real_estate_market)}),(e.insurance.comment||e.insurance.text)&&t.body.push({label:"Страхование",value:(0,ni.t)(e.insurance)}),[t,{sectionTitle:"О банке",body:[{label:"Сайт",value:e.site.title}]}]})(a):[],[a]);return void 0===a||void 0===n?null:(0,r.jsx)(no.a,{isOpen:t,cancelButton:{title:"Все условия по ипотеке",onClick:l},submitButton:{title:"Оформить онлайн",url:n},onClose:o,bankName:a.bankName,dataPoints:s,pageUrl:b.h.IPOTEKA,offerUpdateData:a.m_updated_at})};function nd(){return(nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}let nm=function(e){return i.createElement("svg",nd({xmlns:"http://www.w3.org/2000/svg",width:17,height:17,fill:"none",viewBox:"0 0 17 17"},e),l||(l=i.createElement("path",{fill:"#525BBB",stroke:"#525BBB",strokeWidth:.654,d:"M10.498 6.982 4.073 11.48l-.382-.545 6.426-4.499.642-.45-.772-.14-3.06-.553.085-.5 4.793.867-.822 4.793-.5-.09.524-3.06.133-.772z"})))};var n_=n(43734),np=n.n(n_);let nh="DetailModalText",nv=e=>{var t,n;let{data:a,isMobile:l=!1,onClose:o,mainPageUrl:s,onFlag:c}=e,[u,m]=(0,i.useState)(null),p=null!=(t=null==u?void 0:u.link)?t:"",h=null!=(n=null==p?void 0:p.includes("#"))&&n,v=(0,tV.vh)(p),y=()=>{if(o(),u&&(0,eP.o)({event:"data-event",eventAction:"click_button_".concat((0,et.y)(u.modalButtonText)),eventCategory:s}),(null==u?void 0:u.filterFlags)&&c&&c(u.filterFlags),h){let e=p.split("#")[1];(0,ej.e)(e,{position:"top"})}p||(0,ej.e)(g.cA,{offset:l?0:-100,position:"top"})};return(0,i.useEffect)(()=>{a&&m(a)},[a]),(0,i.useEffect)(()=>{let e=document.querySelectorAll("#".concat(nh," > a")),t=e=>{e.target instanceof HTMLAnchorElement&&(0,ee._)({eventAction:ee.y.link,eventActionText:e.target.innerText,url:e.target.href})};return e.forEach(e=>{e.addEventListener("click",t)}),()=>{e.forEach(e=>{e.removeEventListener("click",t)})}}),(0,r.jsxs)("div",{className:np().content,children:[(0,r.jsx)("div",{className:np().logo,children:(null==u?void 0:u.logo)&&(0,r.jsx)(W(),{width:l?344:494,height:l?128:180,src:null==u?void 0:u.logo,alt:"logo"})}),(0,r.jsxs)("div",{className:np().body,children:[(0,r.jsx)("h3",{className:np().title,children:null==u?void 0:u.title}),(0,r.jsx)("p",{id:nh,className:np().text,dangerouslySetInnerHTML:{__html:u?u.modalText:""}})]}),v||h?(0,r.jsx)(d.$n,{as:"a",target:"_blank",href:h?void 0:p,size:"big",onClick:y,children:null==u?void 0:u.modalButtonText}):(0,r.jsx)(_(),{href:p,children:(0,r.jsx)(d.$n,{size:"big",onClick:y,children:null==u?void 0:u.modalButtonText})})]})},ng=e=>{let{data:t,isOpen:n,onClose:a,mainPageUrl:l,onFlag:o}=e,i=(0,en.sw)();return(0,r.jsx)(z.Z,{children:(0,r.jsx)(d.aF,{open:n,onClose:a,header:{title:""},size:"l",children:(0,r.jsx)("div",{className:np().container,children:(0,r.jsx)(nv,{data:t,isMobile:i,onClose:a,mainPageUrl:l,onFlag:o})})})})},ny={src:"/kredity/assets/_next/static/media/life-situations-1.a2fc9534.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAANlBMVEXOsISxuJvSvIjSSUbn3LXYr3/QjW316q/p1Ji+opLZvZaoPEDx7cuxc2fGTU66S1HLaF7r3p+cEv2jAAAACnRSTlP+/////////Pz4xwPQRQAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBnYmDlEGRn4OLh5WNmY2RhYGAR4OdmZeAEAAlXALLihgonAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},nb={src:"/kredity/assets/_next/static/media/life-situations-2.17787fd4.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAM1BMVEWvelPeum9/SjWVQTHNp2fjzIvw14fy45vVwIGvVDy1mnDowHPGfVuCQCivhWGoaUK9jlh/j3KTAAAACnRSTlP9////+P///Pr+jghZTQAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBjZWVnZWNn4GLk5+Nh4GZlYBDgZWLmZGQBAAkHAKZDFTImAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},nf={src:"/kredity/assets/_next/static/media/life-situations-3.1396f824.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAOVBMVEXWxXPMsInKh3PMPiqul1zRwZLd26bt5Jvf7LC5tWna4LDVvnDe1Z/Zx5OhPDm3LS7TsWhwOTXv2qEeoPlIAAAACnRSTlP9/////v///fz45qrS1AAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxjYGfnYWXl4eBgEOJl5ONn4mJjYOAWYBZkYeAEAAskAMzGoQhaAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3};var nx=n(31758),nj=n.n(nx);let nk=(0,i.memo)(e=>{let{mainPageUrl:t,onFlag:n,isMobile:a}=e,[l,o]=(0,i.useState)(!1),[s,c]=(0,i.useState)(null),{onMouseDown:m,onMouseMove:_,resetState:p}=(()=>{let[e,t]=(0,i.useState)(!1),[n,a]=(0,i.useState)(!1),l=(0,i.useRef)({x:0,y:0}),r=(0,i.useCallback)(e=>{a(!0),l.current={x:e.screenX,y:e.screenY},l.current&&l.current.x===e.screenX&&l.current.y===e.screenY&&t(!1)},[]);return{isDragged:e,isTouched:n,onMouseDown:r,onMouseMove:(0,i.useCallback)(e=>{l.current&&l.current.x===e.screenX&&l.current.y===e.screenY||(t(!0),l.current={x:e.screenX,y:e.screenY})},[]),resetState:(0,i.useCallback)(()=>{t(!1),a(!1)},[])}})(),h=(0,i.useMemo)(()=>a?288:348,[a]),v=e=>e.preventDefault,y=(0,i.useCallback)(e=>{c(e),o(!0),(0,ee._)({eventAction:ee.y.popup,eventActionText:e.title})},[]),b=(0,i.useCallback)(()=>{var e;(0,ee._)({eventAction:ee.y.popdown,eventActionText:null!=(e=null==s?void 0:s.title)?e:""}),c(null),o(!1)},[null==s?void 0:s.title]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("section",{className:nj().section,id:g.ov,children:(0,r.jsxs)(u.mc,{children:[(0,r.jsx)("h2",{className:nj().title,children:"Как вам помочь?"}),(0,r.jsx)("div",{className:nj().sliderContainer,children:(0,r.jsx)(d.Ap,{options:{slidesPerView:a?1:3,spaceBetween:a?16:32,centeredSlides:a,autoplay:{delay:5e3}},wrapperClass:nj().sliderWrapper,pagination:a,children:(function(){let{mainBaseUrl:e}=(0,eD.zj)();return[{id:1,logo:ny,logoMobile:ny,title:"Льготная ипотека",modalText:"Найдем для вас предложения с пониженной ставкой — например, семейную ипотеку или ипотеку для ИТ-специалистов. Выберите льготную программу и подайте заявку на ипотечный кредит на Финуслугах",modalButtonText:"Выбрать ипотеку",link:"#".concat(g.cA),filterFlags:["3"]},{id:2,logo:nb,logoMobile:nb,title:"Рефинансирование кредита",modalText:"Хотите снизить ставку или уменьшить ежемесячный платеж по ипотеке? Покажем банки, в которые вы сможете перевести свой ипотечный кредит и получить более комфортные условия",modalButtonText:"Выбрать ипотеку",link:"/ipoteka/teg_refinansirovanie"},{id:3,logo:nf,logoMobile:nf,title:"Налоговый вычет за ипотеку",modalText:'Если вы работаете официально, государство может вернуть 13% налога. Это 650 000 ₽ — до 260 000 ₽ от стоимости недвижимости и до 390 000 ₽ за проценты по ипотеке. Больше о том, как оформить налоговый вычет — в <a href="'.concat(e,'/glossariy/imushchestvennyj_nalogovyj_vychet_pri_ipoteke" target="_blank" style="color: var(--color-purple-600)">инструкции</a> на Финуслугах'),modalButtonText:"Выбрать ипотеку",link:"#".concat(g.cA)}]})().map(e=>(0,r.jsxs)(d.DQ,{className:nj().card,onMouseDown:m,onMouseMove:_,onMouseLeave:p,onMouseUp:p,onClick:()=>y(e),onTouchStart:v,onTouchMove:v,onTouchEnd:v,children:[(0,r.jsx)("div",{className:nj().imgWrapper,children:(0,r.jsx)(W(),{width:h,height:128,alt:"banner"+e.id,src:a?e.logoMobile:e.logo})}),(0,r.jsxs)("div",{className:nj().cardBody,children:[(0,r.jsx)("p",{className:nj().subTitle,children:e.title}),(0,r.jsx)(d.$n,{shape:"circle-icon",className:nj().cardButton,iconLeft:(0,r.jsx)(nm,{className:nj().iconArrow})})]})]},e.id))})})]})}),(0,r.jsx)(ng,{mainPageUrl:t,data:s,isOpen:l,onClose:b,onFlag:n})]})});var nA=n(54767),nC=n(72278),nN=n(91423),nw=n.n(nN);let nT=e=>{let{icon:t,offer:n,onDetails:a,isMobile:l}=e,o=(0,i.useMemo)(()=>{let e=[],t=n.full_price;return t&&e.push({caption:"ПСК",tooltipText:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.",text:(0,c.o)(t)}),e.push({caption:"Сумма",text:(0,ex.ej)({from:Number(n.amount.from),to:Number(n.amount.to)},{currency:(0,nA.O)(n.currency_id).unit})},{caption:"Первый взнос",text:n.first_payment?"от ".concat(n.first_payment.from,"%"):""}),e},[n.full_price,n.amount.from,n.amount.to,n.currency_id,n.first_payment]);return(0,r.jsxs)("div",{className:nw().mortgage_info,children:[(0,r.jsxs)("div",{className:nw().bank_info,children:[(0,r.jsx)("div",{className:nw().icon,children:t}),(0,r.jsx)(nC.U,{caption:n.title,text:n.bank_name,className:(0,P.A)(nw().group,nw().title_group)}),l&&(0,r.jsx)("div",{className:nw().icon_button,onClick:a,children:(0,r.jsx)(tc.IconFdsInfoCircleO,{})})]}),(0,r.jsx)("div",{className:nw().groups,children:o.map((e,t)=>e.text&&(0,r.jsx)(nC.U,{caption:e.caption,text:e.text,tooltipText:e.tooltipText,className:nw().group},t))})]})},nM=e=>{let{className:t,icon:n,offer:a,onDetails:l,onOpen:o,isMobile:s}=e,c=(0,i.useMemo)(()=>(e=>{let t=[];return 3===e.online_application.type?t.push({label:"Открытие онлайн на Финуслугах",variant:"purple"}):1===e.online_application.commercial?t.push({label:"Подача заявки на сайте банка",variant:"primary"}):t.push({label:"Открытие в банке",variant:"primary"}),t.push({label:1===e.income_proof.not_required?"Без справок":"Требуется подтверждение дохода",variant:"primary"}),t})(a),[a]),u=(0,i.useCallback)(e=>{e.stopPropagation(),null==l||l()},[l]),m=(0,r.jsx)("div",{className:nw().chips_row,children:c.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(d.vw,{label:e.label,variant:e.variant,className:nw().chip,rounded:!0})},e.label))});return(0,r.jsxs)("div",{className:(0,P.A)(t,nw().wrap),onClick:o,children:[(0,r.jsxs)("div",{className:nw().top_row,children:[(0,r.jsx)("div",{className:nw().top_row_content,children:(0,r.jsx)(nT,{icon:n,offer:a,onDetails:u,isMobile:s})}),(0,r.jsxs)("div",{className:nw().top_row_buttons,children:[!s&&(0,r.jsx)("div",{className:nw().icon_button,onClick:u,children:(0,r.jsx)(tc.IconFdsInfoCircleO,{})}),s&&m,(0,r.jsx)(d.$n,{className:nw().show_button,size:"xs",label:"Оформить"})]})]}),!s&&m]})};var nS=n(14834),nP=n.n(nS);let nL=e=>{let{className:t,title:n,offers:a,onDetails:l,onOpen:o,isMobile:s}=e,c=(0,i.useCallback)(e=>{(0,ee._)({eventAction:ee.y.button,eventActionText:"information_".concat(e.bank_url),eventLabel:e.id}),(0,ee._)({eventAction:ee.y.popup,eventActionText:"information_".concat(e.bank_url),eventLabel:e.id}),l(e.id)},[l]),u=(0,i.useCallback)(e=>{(0,ee._)({eventAction:ee.y.link,eventActionText:(0,et.y)(e.title),url:"".concat(e4,"/").concat(e.bank_url)}),o(e)},[o]);return(0,r.jsxs)("div",{className:t,children:[(0,r.jsx)("p",{className:nP().listTitle,children:n}),(0,r.jsx)("div",{className:nP().list,children:a.map(e=>(0,r.jsx)(i.Fragment,{children:(0,r.jsx)(nM,{onDetails:()=>c(e),onOpen:()=>u(e),className:nP().card,icon:(0,r.jsx)(W(),{width:40,height:40,src:e.bank_logo_mob,alt:"logo"}),offer:e,isMobile:s})},e.id))})]})};var nR=n(88508),nE=n(28732),nF=n.n(nE);let nI=(0,i.memo)(e=>{let{chips:t,sort:n,sortOrder:a,onChangeSort:l,onChangeSortOrder:o,sortOptions:i,onClick:s,inView:c,filterRef:u,className:d,onClickChip:m}=e,_=(0,tu.K)("xs");return(0,r.jsx)("div",{ref:u,className:nF().filter,children:(0,r.jsx)(nR.x,{className:d,isNewSortRadios:!0,chips:t,isIncreaseSort:"asc"===a,onChangeIncreaseSort:e=>{let t=e?"asc":"desc";o(t),(0,ee._)({eventAction:ee.y.button,eventActionText:"sort_direction_".concat(t)})},sortTypeItems:i,sortTypeValue:null!=n?n:e6.RATE,onChangeSortType:e=>{var t;l(e),(0,ee._)({eventAction:ee.y.button,eventActionText:"sort_type_".concat(null==(t=tW.find(t=>t.value===e))?void 0:t.label)})},onClickParams:s,isMobile:!_,isFixed:c,onClickChip:m})})});nI.displayName="SmallFilter";var nB=n(8868),nO=n(41329),nD=n(54926),nU=n(27964),nW=n(27116);let nq=(0,i.memo)(e=>{let t=function(e){let{name:t,description:n,offers:a,offersCount:l,url:r}=e,{mainBaseUrl:o}=(0,eD.UK)();if(0===a.length)return;let i=(0,nO.l)({url:"".concat(o).concat(e4).concat(r),priceCurrency:"RUB",offers:a,getLowPrice:e=>{let{amount:t}=e;return void 0!==t.from&&""!==t.from?Number(t.from):1e4},getHighPrice:e=>{let{amount:t}=e;return void 0!==t.to&&""!==t.to?Number(t.to):void 0},offerCount:l});return(0,nU.Z)({name:t,description:n,image:"".concat(o).concat(nB.au),offers:i,aggregateRating:(0,nD.E)({ratingValue:4.7,reviewCount:1645,bestRating:5,worstRating:1})})}(e);return void 0===t?null:(0,r.jsx)(nW.S,{schema:t})});nq.displayName="MortgageOffersSchema";var nH=n(5435),nK=n(95018),nV=n(28502),nY=n.n(nV);let nz=e=>3===e.online_application.type,nZ=e=>1===e.online_application.commercial,nJ=e=>!nz(e)&&!nZ(e),nG=e=>{var t,n,a,l;let{ssr:o}=e,s=(0,t$.yX)(),{query:c}=(0,ev.useRouter)(),[d,m]=(0,i.useState)(Number(c.page)||1),{filter:_,setFilter:p}=tY(),{show:h}=(0,tK.g)(),v=(0,en.sw)(),[y,b]=(0,i.useState)(!1),f=(0,i.useRef)(null),x=(0,i.useRef)(()=>null),{offers:j,loading:k,reload:A,load:C,clear:N,count:w,total_count:T}=tX({...o,filter:_}),M=null!=(a=null==(t=o.currentTag)?void 0:t.url)?a:e3,{region:S,town:L}=(0,eU.z)(),R=(0,i.useRef)(!0);(0,i.useEffect)(()=>{R.current?R.current=!1:A(_,10,null==S?void 0:S.url,null==L?void 0:L.url,M)},[_,null==S?void 0:S.url,null==L?void 0:L.url,M,A]);let E=(0,i.useRef)(!0);(0,tH.s)(()=>{E.current?E.current=!1:(N(),C(_,10,d,null==S?void 0:S.url,null==L?void 0:L.url))},[_],500);let F=(0,i.useCallback)(()=>{m(e=>{let t=e+1;return C(_,10,t,null==S?void 0:S.url,null==L?void 0:L.url),(0,ee._)({eventAction:ee.y.button,eventActionText:(0,et.y)("показать еще предложения")}),t})},[C,_,null==S?void 0:S.url,null==L?void 0:L.url]),I=(e=>[{label:"Сумма кредита: ".concat(e.amount?(0,t1.ZV)(e.amount):"от 1"," ₽"),id:"amount"},{label:"Платеж: ".concat(e.payment?"до ".concat((0,t1.ZV)(e.payment)," ₽ в мес"):"любой"),id:"payment"},{label:"Срок: ".concat(e.term?"".concat(String(e.term)," мес."):"любой"),id:"term"},{label:"Банки: ".concat(e.banks?String(e.banks.length):"любые"),id:"banks"}])(_),B=(0,i.useMemo)(()=>j.filter(nz),[j]),O=(0,i.useMemo)(()=>j.filter(nZ),[j]),D=(0,i.useMemo)(()=>j.filter(nJ),[j]),U=o.currentTag?o.currentTag.name:"Ипотека",W=(null==L?void 0:L.name_p)||(null==S?void 0:S.name_p),q=[...B,...O,...D],H="".concat((null==(n=o.currentTag)?void 0:n.url)?"/".concat(e5).concat(o.currentTag.url):"").concat(S?"/".concat(e8).concat(S.url):"").concat(L?"/".concat(L.url):""),K=(0,nr.Y)(j),V=(0,i.useMemo)(()=>{var e,t,n,a;if(!K.data)return;let l=o.banks.find(e=>{var t;return(null==(t=K.data)?void 0:t.bank_id)===+e.id});return{...K.data,site:{title:null!=(e=null==l?void 0:l.site.title)?e:null,url:null!=(t=null==l?void 0:l.site.url)?t:null},bankName:null!=(n=null==l?void 0:l.name)?n:K.data.bank_name,logo:null!=(a=null==l?void 0:l.logo_mob)?a:""}},[K.data,o.banks]),Y=(0,i.useCallback)(()=>{(0,ee._)({eventAction:ee.y.button,eventActionText:(0,et.y)("все параметры")}),h()},[h]),z=e=>1===e.online_application.commercial?e.online_application.url:"".concat(e4,"/").concat(e.url),Z=(0,i.useCallback)(e=>{window.open(z(e))},[]),J=(0,i.useCallback)(()=>{var e,t;(0,ee._)({eventAction:ee.y.popdown,eventActionText:"information_".concat(null==(e=K.data)?void 0:e.bank_name),eventLabel:null==(t=K.data)?void 0:t.id}),K.hide()},[K]),G=(0,i.useCallback)(()=>{var e,t;(0,ee._)({eventAction:ee.y.button,eventActionText:(0,et.y)("Все условия по ипотеке"),eventLabel:null==(e=K.data)?void 0:e.id}),(null==K||null==(t=K.data)?void 0:t.url)&&window.open("".concat(e4,"/").concat(K.data.url),"_blank")},[K]),Q=K.data?z(K.data):void 0;(0,i.useEffect)(()=>(window.removeEventListener("scroll",x.current),x.current=()=>{if(!f.current)return;let{top:e}=f.current.getBoundingClientRect();b(e<=32)},window.addEventListener("scroll",x.current),()=>window.removeEventListener("scroll",x.current)),[]);let X=(0,i.useCallback)(e=>{p({..._,sort:e})},[_,p]),$=(0,i.useCallback)(e=>{p({..._,sortDir:e})},[_,p]),ea=10*d<w;return(0,r.jsxs)("div",{className:nY().wrap,children:[(0,r.jsx)(nk,{mainPageUrl:"#",onFlag:e=>{p({..._,flags:e})},isMobile:v}),(0,r.jsxs)("div",{id:g.cA,className:nY().products_list_container,children:[j&&(0,r.jsxs)("h2",{className:nY().title,children:["Найдено ",w," ",(0,r.jsx)("span",{className:nY().titleHide,children:(0,nl.v)(w)})," ",w===T?"":"из ".concat(T)]}),(0,r.jsx)("div",{className:(0,P.A)(nY().filter_wrapper,nY().newLayout),children:(0,r.jsx)(nI,{chips:I,sort:_.sort||e6.RATE,sortOrder:_.sortDir||"asc",onChangeSort:X,onChangeSortOrder:$,sortOptions:tW,onClick:Y,filterRef:f,inView:y,onClickChip:()=>{h()}})}),!k&&0===w&&(0,r.jsx)(u.mc,{children:(0,r.jsx)(na.O,{onChangeParams:h})}),(0,r.jsxs)(u.mc,{as:"section",children:[(0,r.jsx)("div",{ref:s,children:j.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:nY().offers_lists,children:[B.length>0&&(0,r.jsx)(nL,{onOpen:Z,onDetails:K.show,title:"Онлайн-ипотеки от Финуслуг",offers:B,isMobile:v}),O.length>0&&(0,r.jsx)(nL,{onOpen:Z,onDetails:K.show,title:"Предложения на Финуслугах",offers:O,isMobile:v}),D.length>0&&(0,r.jsx)(nL,{onOpen:Z,onDetails:K.show,title:"Предложения рынка кредитов",offers:D,isMobile:v})]}),(0,r.jsx)(nq,{name:"".concat(U).concat(W?" в ".concat(W):""),description:null!=(l=o.mortgagesData.description)?l:"",offers:q,offersCount:w,url:H}),ea&&(0,r.jsx)(nK.e,{page:d,onClick:F})]})}),k&&(0,r.jsx)("div",{className:nY().placeholder,children:[,,,,,].fill(0).map((e,t)=>(0,r.jsx)(nn.E,{},t))}),(0,r.jsx)(nH.h,{tag:"p",className:nY().subtitle,children:o.mortgagesData.subtitle})]}),(0,r.jsx)(nu,{data:V,isOpen:K.visible,url:Q,onClose:J,onAllConditionsClick:G})]})]})};var nQ=n(48673),nX=n(12771),n$=n(73584);async function n0(e){let t=await (0,nX.zy)("Mortgages.json?".concat("url","=").concat(encodeURIComponent(e)));if(1!==t.length)throw new e1.m_("Mortgages tag not found: ".concat(e));return function(e){let{url:t,name:n}=e;return{name:n,url:t}}(t[0])}new n$.A(n0);var n1=n(23517),n2=n(2510);async function n4(){return(await (0,nX.zy)("Mortgages.json?tags&short=1")).mortgage_tags.reduce((e,t)=>(t.name!==n2.Z2&&e.set(t.url,function(e){let{name:t,url:n,url_redirect:a}=e,l={name:t,url:n},r=(0,n1.Y)(a);return void 0!==r&&(l.url_redirect=r),l}(t)),e),new Map)}new n$.B(n4);var n3=n(24323),n8=n(58699);n(46215);var n5=n(162),n6=n(64998);n(7705);let n7=[(0,r.jsx)(i.Fragment,{children:"Используйте фильтры для указания желаемых параметров: суммы, срока и формы выдачи"},0),(0,r.jsx)(i.Fragment,{children:"Изучите и выберите подходящее предложение"},1),(0,r.jsx)(i.Fragment,{children:"Перейдите к оформлению"},2),(0,r.jsx)(i.Fragment,{children:"Заполните анкету, дождитесь одобрения и получите деньги любым удобным для вас способом"},3)];function n9(e){var t,n,a,l;let{layout:o,regions:s,tags:c,tag:u,mortgagesData:d,posts:m,questionsData:_,banks:p,expertQuote:v,support:g}=e,{region:y,town:b}=(0,eU.z)(),[f,x]=(0,i.useState)(null!=v?v:void 0),{asPath:j}=(0,ev.useRouter)(),k=null!=(n=null==(t=j.split("/").find(e=>e.includes("teg_")))?void 0:t.slice(4))?n:"DEFAULT",A=null!=(a=c.find(e=>e.url===k))?a:void 0,C=(0,tV.m)(j);return(0,nQ.w5)(()=>{(0,n5.Zs)(C).then(x)},[C]),(0,r.jsxs)(e$.P,{data:o,withLocationConfirm:!0,children:[(0,r.jsx)(h.I,{title:d.title,description:d.description}),(0,r.jsx)(eV.t,{}),(0,r.jsx)(nt,{ssr:{mortgagesData:d,currentRegion:null!=(l=null==y?void 0:y.url)?l:"",currentTag:A}}),(0,r.jsx)(nG,{ssr:{mortgagesData:d,currentTag:A,banks:p}}),(0,r.jsx)(n3.I,{steps:n7,variant:"secondary"}),void 0!==f&&(0,r.jsx)(n6.V,{quote:f}),(0,r.jsx)(n8.f,{type:"bank"}),(0,r.jsx)(ti,{currentTag:u,region:y,town:b,posts:m,questionsData:_,regions:s,tags:c?c.filter(e=>e.url!==k):[],support:g}),!1]})}var ae=n(48523),at=n(36612),an=!0;let aa=(0,i.memo)(function(e){var t,n;return(0,r.jsx)(o.C,{children:e.isShowcase?(0,r.jsx)(ae.N,{region:null!=(t=e.region)?t:void 0,town:null!=(n=e.town)?n:void 0,children:(0,r.jsx)(n9,{...e})}):(0,r.jsx)(at.K,{children:(0,r.jsx)(e0,{...e})})})})},34850:(e,t,n)=>{"use strict";n.d(t,{NC:()=>l,cT:()=>a});let a={pp:"h",ps:"foam",p2:"hojk"},l="К сожалению, мы не нашли кредитов с такими параметрами"},38806:(e,t,n)=>{"use strict";e.exports=n(24459)},40090:(e,t,n)=>{"use strict";n.d(t,{L:()=>r});var a=n(37876),l=n(20988);function r(e){let{label:t,options:n,values:r,className:o,onChange:i}=e,s=null==r?void 0:r.reduce((e,t)=>{let a=n.find(e=>String(e.value)===String(t));return a&&e.push(a),e},[]);return(0,a.jsx)(l.l6,{className:o,label:t,options:n,value:null!=s?s:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,onChange:e=>{i(e?e.map(e=>e.value):void 0)},multiple:!0})}},40431:e=>{e.exports={page:"MortgageDetail_page__sKQYA",breadcrumbs:"MortgageDetail_breadcrumbs__teCQy",faqSection:"MortgageDetail_faqSection__UW6NG",supportSection:"MortgageDetail_supportSection__05Wn6",about:"MortgageDetail_about___qTO0"}},41329:(e,t,n)=>{"use strict";function a(e){let{url:t,priceCurrency:n,offers:a,getLowPrice:l,getHighPrice:r,offerCount:o}=e,{lowPrice:i,highPrice:s}=function(e,t,n){let a=e.reduce((e,a)=>{e.lowPrice=Math.min(e.lowPrice,t(a));let l=n(a);return void 0!==l&&(e.highPrice=Math.max(e.highPrice,l)),e},{lowPrice:1/0,highPrice:-1/0});return{...Number.isFinite(a.lowPrice)&&{lowPrice:a.lowPrice},...Number.isFinite(a.highPrice)&&{highPrice:a.highPrice}}}(a,l,r);return{"@type":"AggregateOffer",url:t,priceCurrency:n,lowPrice:i,highPrice:s,offerCount:o}}n.d(t,{l:()=>a})},41402:e=>{e.exports={container:"MortgageApplySteps_container__sxW1j"}},42256:e=>{e.exports={container:"fab-button_container__OxsQu",expandableContainer:"fab-button_expandableContainer__DaTzp",expanded:"fab-button_expanded__KfN3z"}},43734:e=>{e.exports={title:"DetailModal_title__byAo_",container:"DetailModal_container__0QySE",content:"DetailModal_content__wNrBy",logo:"DetailModal_logo__Y3Gfm",body:"DetailModal_body__OhBkH",text:"DetailModal_text__bzuql"}},43736:e=>{e.exports={sortTypeContainer:"SortRadios_sortTypeContainer__8lU5M",newSortRadioSortTypeContainer:"SortRadios_newSortRadioSortTypeContainer__xY7lM",divider:"SortRadios_divider__P8JRR",sortType:"SortRadios_sortType__Ad5sp",sortTypeRadio:"SortRadios_sortTypeRadio__jVmAH",sortTypeTooltip:"SortRadios_sortTypeTooltip__JJNbc",sortTypeTrigger:"SortRadios_sortTypeTrigger__BgRzq",sortTypeHead:"SortRadios_sortTypeHead__VdaJc",newSortRadioSortTypeHead:"SortRadios_newSortRadioSortTypeHead__xKHHj",sortTypeButton:"SortRadios_sortTypeButton__UY3Mp",newSortRadioSortTypeButton:"SortRadios_newSortRadioSortTypeButton__wpRlC"}},45712:(e,t,n)=>{"use strict";e.exports=n(19852)},47245:e=>{e.exports={mobilePopup:"styles_mobilePopup__qG2vn",container:"styles_container__o8xJL",title:"styles_title__u7Vww",content:"styles_content__5LJ6m",buttons:"styles_buttons__VE9L_",contentRow:"styles_contentRow__m3ok_",findConfigBlock:"styles_findConfigBlock__KOllm",footer:"styles_footer__kJQ4n",header:"styles_header__4RRDv",bankName:"styles_bankName__hzrqV",field:"styles_field__R6qky",titleWrapper:"styles_titleWrapper__Y4kn3",icon:"styles_icon__Cfzrb",fieldTitle:"styles_fieldTitle__koHjG",fieldContent:"styles_fieldContent__55SfP",comment:"styles_comment__DgBXq"}},54767:(e,t,n)=>{"use strict";n.d(t,{O:()=>a});let a=e=>{switch(e){case 2:case"2":case"USD":return{shortName:"долл.",unit:"$",name:"долларах",code:"USD",locale:"en",num:2};case 3:case"3":case"EUR":return{shortName:"евро",unit:"€",name:"евро",code:"EUR",locale:"en",num:3};case 4:case"4":case"CNY":return{shortName:"юань",unit:"\xa5",name:"юанях",code:"CNY",locale:"zh-CN",num:4};case 5:case"5":case"CHF":return{shortName:"франк",unit:"₣",name:"франках",code:"CHF",locale:"en",num:5};case 6:case"6":case"GBP":return{shortName:"фунт",unit:"\xa3",name:"фунтах",code:"GBP",locale:"en",num:6};case 7:case"7":case"JPY":return{shortName:"иена",unit:"\xa5",name:"иенах",code:"JPY",locale:"ja-JP",num:7};default:return{shortName:"руб.",unit:"₽",name:"рублях",code:"RUB",locale:"ru",num:1}}}},54926:(e,t,n)=>{"use strict";function a(e){let{ratingValue:t,reviewCount:n,bestRating:a,worstRating:l}=e;return{"@type":"AggregateRating",ratingValue:t,reviewCount:n,bestRating:a,worstRating:l}}n.d(t,{E:()=>a})},56420:(e,t,n)=>{"use strict";n.d(t,{v:()=>a});let a=e=>{let t=Number(e.split(" ")[0]);return e&&!Number.isNaN(t)?t:0}},56685:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});let a={src:"/kredity/assets/_next/static/media/search.b3dc20e8.svg",height:192,width:212,blurWidth:0,blurHeight:0}},58082:e=>{e.exports={wrap:"styles_wrap__xmlYe",top_row:"styles_top_row__a2v4e",top_row_content:"styles_top_row_content__Y_c8l",top_row_buttons:"styles_top_row_buttons__X2LpS",action_button:"styles_action_button__4LW6f",show_button:"styles_show_button__Z61tW",chips_row:"styles_chips_row__WBMhp",addon:"styles_addon__kq2V5",params_button:"styles_params_button__Em2ZN"}},63396:e=>{e.exports={filter:"ListFilter_filter__VuF60",newSortRadiosFilter:"ListFilter_newSortRadiosFilter__kKfmj",sortTypeDesktop:"ListFilter_sortTypeDesktop__5LQyN",container:"ListFilter_container__nvtCN",modal:"ListFilter_modal__3ZmvQ",newSortRadioModal:"ListFilter_newSortRadioModal__vNMpD",modalButton:"ListFilter_modalButton__d5V_n",chipsContainer:"ListFilter_chipsContainer__tfgri",actionsWrapper:"ListFilter_actionsWrapper__m04h1",action:"ListFilter_action__WggMr",actionText:"ListFilter_actionText__11VOZ",iconButton:"ListFilter_iconButton__9o3Q7",actionButton:"ListFilter_actionButton__I4ohH",icon:"ListFilter_icon__RsoyT",iconInverted:"ListFilter_iconInverted__1MkEe",stuck:"ListFilter_stuck___Ya2T",mainContainer:"ListFilter_mainContainer__Lb5um",chipsContainerClosed:"ListFilter_chipsContainerClosed__TNa0t"}},66451:e=>{e.exports={title:"MortgagesCreditsCatalog_title__3ALPZ",card:"MortgagesCreditsCatalog_card__v_YKX",subTitle:"MortgagesCreditsCatalog_subTitle__JnyUy",container:"MortgagesCreditsCatalog_container__5BmyA",cardsList:"MortgagesCreditsCatalog_cardsList__gHJUT",icon:"MortgagesCreditsCatalog_icon__S5VCn",link:"MortgagesCreditsCatalog_link__Bbro2"}},67129:e=>{e.exports={widget:"yandex-realty_widget__xtPmC"}},67221:(e,t,n)=>{"use strict";n.d(t,{e:()=>r,s:()=>l});var a=n(14232);let l=(e,t,n)=>{(0,a.useEffect)(()=>{let t=setTimeout(()=>{e()},n);return()=>{clearTimeout(t)}},t)},r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,[l,r]=(0,a.useState)(n),[o,i]=(0,a.useState)(!1),[s,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{i(!0),e().then(r).catch(c).then(()=>{i(!1)})},t),[l,o,s]}},72809:(e,t,n)=>{"use strict";n.d(t,{O:()=>d});var a=n(37876),l=n(20988),r=n(54587),o=n.n(r),i=n(56685),s=n(34850),c=n(31443),u=n.n(c);let d=e=>{let{onChangeParams:t}=e;return(0,a.jsxs)("div",{className:u().notFoundWrapper,children:[(0,a.jsx)(o(),{className:u().infoIcon,src:i.A,alt:"?"}),(0,a.jsx)("p",{className:u().notFoundText,children:s.NC}),void 0!==t&&(0,a.jsx)(l.$n,{variant:"secondary",className:u().changeParamsButton,onClick:t,children:"Изменить параметры"})]})}},78131:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});let a={src:"/kredity/assets/_next/static/media/banner-6.5d66df25.svg",height:230,width:256,blurWidth:0,blurHeight:0}},78240:e=>{e.exports={container:"PaymentScheduleModal_container__WjKOq",withoutTabsContainer:"PaymentScheduleModal_withoutTabsContainer__sL5TF",value:"PaymentScheduleModal_value__hb6Gt",content:"PaymentScheduleModal_content__ccBR7",buttons:"PaymentScheduleModal_buttons__t_rw3",schedulePaymentsWrapper:"PaymentScheduleModal_schedulePaymentsWrapper__vuMsP",tabsContentWrapper:"PaymentScheduleModal_tabsContentWrapper__SBdzq",button:"PaymentScheduleModal_button__XgN14",active:"PaymentScheduleModal_active__ghKAR",tabelsWrapper:"PaymentScheduleModal_tabelsWrapper__Vrtbe",tableSchedule:"PaymentScheduleModal_tableSchedule__9C31o",columnTitles:"PaymentScheduleModal_columnTitles__2Nev8",columnTotalParams:"PaymentScheduleModal_columnTotalParams__noafF",titleYearSchedule:"PaymentScheduleModal_titleYearSchedule__GDqLl",contentSchedule:"PaymentScheduleModal_contentSchedule__D3Ifo",rowTabel:"PaymentScheduleModal_rowTabel__cgkZo",bodyField:"PaymentScheduleModal_bodyField__si6mT",field:"PaymentScheduleModal_field__EmCax",fieldLargeText:"PaymentScheduleModal_fieldLargeText__V8hm7",copyButton:"PaymentScheduleModal_copyButton__Afvcu",socialNetworkSection:"PaymentScheduleModal_socialNetworkSection__tXKRk",socialNetworkTitle:"PaymentScheduleModal_socialNetworkTitle__kutAv",socialButton:"PaymentScheduleModal_socialButton__VLXdF",footer:"PaymentScheduleModal_footer__P_fi8",fullWidth:"PaymentScheduleModal_fullWidth__d7e6Q",yearAccordion:"PaymentScheduleModal_yearAccordion__vT35D",mobileFooter:"PaymentScheduleModal_mobileFooter__A_gys",mobileActionButton:"PaymentScheduleModal_mobileActionButton__0eHGc",paymentSummaryButton:"PaymentScheduleModal_paymentSummaryButton__nUjmZ",expandableSocialMediaButton:"PaymentScheduleModal_expandableSocialMediaButton__d1PP8"}},80010:(e,t,n)=>{"use strict";n.d(t,{r:()=>a});let a=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e)},80020:(e,t,n)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ipoteka/[[...segments]]",function(){return n(33943)}])},82734:e=>{e.exports={wrap:"Dropdown_wrap__22_5K",newSortRadioWrap:"Dropdown_newSortRadioWrap__N83gl",content:"Dropdown_content__zkeB8"}},86700:e=>{e.exports={faq_container:"styles_faq_container__YZoO_"}},88310:e=>{e.exports={buttons:"LikeItBlock_buttons__9c8gY",likeItBlockWrapper:"LikeItBlock_likeItBlockWrapper__wl2iN",blockTitle:"LikeItBlock_blockTitle__7H0Mr",thumbsUp:"LikeItBlock_thumbsUp__XKiOR",button:"LikeItBlock_button__eW0nI",darkIcon:"LikeItBlock_darkIcon__zY5Hd",dislikeButton:"LikeItBlock_dislikeButton__CwEwu"}},88508:(e,t,n)=>{"use strict";n.d(t,{x:()=>A});var a,l,r=n(37876),o=n(20988),i=n(49995),s=n(14232),c=n(19497);function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}let d=function(e){return s.createElement("svg",u({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),a||(a=s.createElement("path",{fill:"#1F242E",fillRule:"evenodd",d:"M2 5a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1M2 12c0-.552.482-1 1.077-1h11.846c.595 0 1.077.448 1.077 1s-.482 1-1.077 1H3.077C2.482 13 2 12.552 2 12M2 19c0-.552.5-1 1-1h6c.5 0 1 .448 1 1s-.352 1-1 1H3c-.5 0-1-.448-1-1",clipRule:"evenodd"})))};var m=n(82734),_=n.n(m);let p=e=>{let{content:t,children:n,disabled:a,isNewSortRadios:l}=e,[o,c]=(0,s.useState)(!1),u=(0,s.useCallback)(()=>c(!0),[c]),d=(0,s.useCallback)(()=>c(!1),[c]);return(0,r.jsxs)("div",{className:(0,i.A)(_().wrap,l&&_().newSortRadioWrap),onClick:u,ref:(e=>{let t=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let n=n=>{var a;let{target:l}=n;l instanceof HTMLElement&&!(null==(a=t.current)?void 0:a.contains(l))&&e()};return window.addEventListener("click",n),()=>{window.removeEventListener("click",n)}},[e]),t})(d),children:[n,o&&!a&&(0,r.jsx)("div",{className:_().content,children:t})]})};function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)({}).hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(null,arguments)}let v=function(e){return s.createElement("svg",h({xmlns:"http://www.w3.org/2000/svg",width:24,height:24,fill:"none",viewBox:"0 0 24 24"},e),l||(l=s.createElement("path",{fill:"#000",d:"M12 11a1 1 0 0 0-1 1v4a1 1 0 0 0 2 0v-4a1 1 0 0 0-1-1m.38-3.92a1 1 0 0 0-.76 0 1 1 0 0 0-.33.21 1.2 1.2 0 0 0-.21.33 1 1 0 0 0 .21 1.09q.147.133.33.21A1 1 0 0 0 13 8a1.05 1.05 0 0 0-.29-.71 1 1 0 0 0-.33-.21M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20m0 18a8 8 0 1 1 0-16.001A8 8 0 0 1 12 20"})))};var g=n(43736),y=n.n(g);let b=e=>{let{isNewSortRadios:t,isMobile:n,onChangeSort:a,isIncreaseSort:l}=e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("p",{className:(0,i.A)(y().sortTypeHead,t&&y().newSortRadioSortTypeHead),children:[(0,r.jsx)("button",{style:{marginLeft:"0px",marginRight:n?"0px":"8px"},className:(0,i.A)(y().sortTypeButton,t&&y().newSortRadioSortTypeButton),onClick:a,children:(0,r.jsx)(d,{className:(0,i.A)(!l&&y().iconInverted)})}),"Сортировать"]}),t&&(0,r.jsx)("div",{className:y().divider})]})},f=(0,s.memo)(e=>{let{isMobile:t,onChangeSort:n,isIncreaseSort:a,onChangeSortType:l,sortTypeItems:s,sortTypeValue:c,isNewSortRadios:u}=e;return(0,r.jsxs)(r.Fragment,{children:[!u&&t&&(0,r.jsx)(b,{onChangeSort:n,isMobile:t,isIncreaseSort:a,isNewSortRadios:u}),(0,r.jsxs)("div",{className:(0,i.A)(y().sortTypeContainer,u&&y().newSortRadioSortTypeContainer),onClick:e=>e.stopPropagation(),children:[u&&(0,r.jsx)(b,{onChangeSort:n,isMobile:t,isIncreaseSort:a,isNewSortRadios:u}),s.map(e=>(0,r.jsxs)("div",{"data-qa":"".concat(e.value,"_radio"),className:y().sortType,children:[u?(0,r.jsx)(o.sx,{name:e.value,value:c,checked:e.value===c,label:e.label,onChange:()=>l(e.value)}):(0,r.jsx)(o.sx,{name:e.value,label:e.label,checked:e.value===c,className:y().sortTypeRadio,value:e.value,onChange:()=>l(e.value)}),e.description&&(0,r.jsx)(o.m_,{text:e.description,className:(0,i.A)(y().sortTypeButton,u&&y().newSortRadioSortTypeButton),children:(0,r.jsx)(v,{})})]},e.value))]})]})});f.displayName="SortRadios";var x=n(16891),j=n(63396),k=n.n(j);let A=(0,s.memo)(e=>{let{chips:t,onClickParams:n,isIncreaseSort:a,onChangeIncreaseSort:l,sortTypeItems:u,sortTypeValue:m,onChangeSortType:_,isMobile:h,isFixed:v,portalId:g,onClickChip:y,className:b,onClickSortType:j,isNewSortRadios:A}=e,C=(0,s.useCallback)(()=>null==l?void 0:l(!a),[a,l]),N=(0,r.jsx)("div",{style:{padding:"8px",borderRadius:A?"20px":"8px",background:"white"},className:(0,i.A)(!h&&A&&k().sortTypeDesktop),children:(0,r.jsx)(f,{isMobile:h,isIncreaseSort:a,onChangeSort:C,onChangeSortType:_,sortTypeItems:u,sortTypeValue:m,isNewSortRadios:A,portalId:g})}),w=u.find(e=>e.value===m);return(0,r.jsx)("div",{className:(0,i.A)(k().filter,A&&k().newSortRadiosFilter,v&&k().stuck,b),children:(0,r.jsx)(x.J,{className:k().mainContainer,children:(0,r.jsxs)("div",{className:k().container,children:[(0,r.jsx)(o.C4,{className:k().chipsContainer,chips:t,value:t.map(e=>e.id),multiple:!0,activeVariant:"secondary",onChipClick:y}),(0,r.jsxs)("div",{className:k().actionsWrapper,children:[(0,r.jsxs)("button",{className:(0,i.A)(k().action,k().actionButton),onClick:n,children:[(0,r.jsx)(c.A,{className:k().icon}),(0,r.jsx)("span",{className:k().actionText,children:"Все параметры"})]}),(0,r.jsxs)("div",{className:k().action,children:[(0,r.jsx)("button",{className:(0,i.A)(k().icon,k().iconButton,!a&&k().iconInverted),onClick:C,children:(0,r.jsx)(d,{})}),(0,r.jsx)(p,{content:N,disabled:h,isNewSortRadios:A,children:(0,r.jsx)("button",{onClick:j,className:(0,i.A)(k().actionText,k().actionButton),"data-qa":"".concat(m,"_order"),children:(null==w?void 0:w.shortLabel)||(null==w?void 0:w.label)||"Сортировка"})})]})]})]})})})});A.displayName="ListFilter"},88548:e=>{e.exports={container:"MortgageInfo_container__sbkaS",containerFull:"MortgageInfo_containerFull__7m2O1",containerWithoutCalculator:"MortgageInfo_containerWithoutCalculator__0CoQ_",promo:"MortgageInfo_promo__7syHy",left:"MortgageInfo_left__5QAPk",right:"MortgageInfo_right__nwez0",qrDesc:"MortgageInfo_qrDesc__5dVqL",qrMobile:"MortgageInfo_qrMobile__W15cn",typeDescription:"MortgageInfo_typeDescription__bvIrV",legend:"MortgageInfo_legend__mTeDq",firstPaymentAddonAfter:"MortgageInfo_firstPaymentAddonAfter__bG4Wd"}},91423:e=>{e.exports={wrap:"styles_wrap__6TRS7",icon_button:"styles_icon_button__dK1LA",top_row:"styles_top_row__Uk7QJ",top_row_content:"styles_top_row_content__kk_4z",preposition:"styles_preposition__zJ_qc",top_row_buttons:"styles_top_row_buttons__KXpZP",show_button:"styles_show_button__VDLP9",chips_row:"styles_chips_row__k80AF",chip:"styles_chip__oznHA",mortgage_info:"styles_mortgage_info__jKRJE",bank_info:"styles_bank_info__UeeJT",icon:"styles_icon__Oug2a",groups:"styles_groups__LmVvB",group:"styles_group__5qWoM",title_group:"styles_title_group__lbYNP"}},94289:e=>{e.exports={title:"styles_title__b38Q2",mobilePopup:"styles_mobilePopup__G3e3Z",container:"styles_container__IGo0H",list:"styles_list__eSXKF",content:"styles_content__44gQX",buttons:"styles_buttons__co1FZ",contentRow:"styles_contentRow__VrBta",findConfigBlock:"styles_findConfigBlock__Mv4DU",footer:"styles_footer__hi3PE",field:"styles_field__u00Wg",titleWrapper:"styles_titleWrapper___05yj",icon:"styles_icon__38Wzs",fieldTitle:"styles_fieldTitle__03wac",fieldContent:"styles_fieldContent__OnBG0",comment:"styles_comment__gnX9Y",actualDate:"styles_actualDate__sl9Yc",skeletonContent:"styles_skeletonContent__8znd2"}},99448:e=>{e.exports={wrap:"styles_wrap__urJsb",content:"styles_content__gWWJg",text:"styles_text__bvQ2U",breadcrumbs:"styles_breadcrumbs__sV21c",title:"styles_title__pRY_s",location:"styles_location__Lr8si",subtitle:"styles_subtitle__rpqbj",moreButton:"styles_moreButton__YLOZP",banner:"styles_banner__H82c_"}},99542:e=>{e.exports={link:"styles_link__XzCzB",chip:"styles_chip__bgIDt",black:"styles_black__aacN4",transparentChip:"styles_transparentChip__4ZT35",hiddenChip:"styles_hiddenChip__COVhQ"}}},e=>{e.O(0,[7492,2224,8325,2970,4587,1758,5695,7586,4743,9544,9903,7279,636,6593,8792],()=>e(e.s=80020)),_N_E=e.O()}]);