(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7821],{75609:function(e,t,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/ipoteka/[[...segments]]",function(){return n(68910)}])},77910:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/banner-6.5d66df25.svg",height:230,width:256,blurWidth:0,blurHeight:0}},47860:function(e,t){"use strict";t.Z={src:"/kredity/assets/_next/static/media/search.b3dc20e8.svg",height:192,width:212,blurWidth:0,blurHeight:0}},48766:function(e,t,n){"use strict";n.d(t,{B:function(){return l}});let l=e=>{let t=Number(e.split(" ")[0]);return e&&!Number.isNaN(t)?t:0}},26024:function(e,t,n){"use strict";n.d(t,{a:function(){return m}});var l=n(85893),a=n(86010),o=n(41664),r=n.n(o),i=n(67294),s=n(17950),c=n(84053),u=n(41294),d=n.n(u);let m=(0,i.memo)(e=>{let{type:t,className:n}=e;return({[s.T.annuity]:(0,l.jsxs)("p",{className:(0,a.Z)(d().typeDescription,n),children:["Тип погашения, при котором ваш обязательный платеж банку остается неизменным в течение всего срока кредита. Подробнее о типах платежей"," ",(0,l.jsx)(r(),{target:"_blank",href:"".concat((0,c.ZR)().mainBaseUrl,"/navigator/kredity/stat_chto_vybrat_annuitetnye_ili_differencirovannye_platezhi?ysclid=lm0hhclslg385431421"),children:"написали здесь"})]}),[s.T.differentiated]:(0,l.jsxs)("p",{className:(0,a.Z)(d().typeDescription,n),children:["Тип погашения, при котором ваш обязательный платеж банку остается неизменным в течение всего срока кредита. Подробнее о типах платежей"," ",(0,l.jsx)(r(),{target:"_blank",href:"".concat((0,c.ZR)().mainBaseUrl,"/navigator/kredity/stat_chto_vybrat_annuitetnye_ili_differencirovannye_platezhi?ysclid=lm0hhclslg385431421"),children:"написали здесь"})]})})[t]});m.displayName="CreditPaymentDescription"},48743:function(e,t,n){"use strict";n.d(t,{$:function(){return _}});var l=n(85893),a=n(79644),o=n(67294),r=n(56790),i=n(65848),s=n(46463),c=n(54228),u=n(87907),d=n(98028),m=n(45446),p=n.n(m);let _=(0,o.memo)(e=>{let{isOpen:t,cancelButton:n,submitButton:m,onClose:_,bankName:v,bankLogo:h,dataPoints:f,offerType:g,offerUpdateData:b,pageUrl:y}=e,x=(0,c.S0)(),j=(0,l.jsxs)("div",{className:p().content,children:[f.map(e=>(0,l.jsxs)(o.Fragment,{children:[(0,l.jsx)("h2",{className:p().title,children:e.sectionTitle}),(0,l.jsx)("div",{className:p().list,children:e.body.length?e.body.map((e,t)=>(0,l.jsxs)("div",{className:p().field,children:[(0,l.jsxs)("div",{className:p().titleWrapper,children:[(0,l.jsx)("h3",{className:p().fieldTitle,children:null==e?void 0:e.label}),(null==e?void 0:e.description)&&(0,l.jsx)(d.J,{triggerClassName:p().icon,content:e.description})]}),(0,l.jsx)("div",{className:p().fieldContent,children:null==e?void 0:e.value})]},t)):Array.from({length:6},(e,t)=>(0,l.jsx)(i.O,{className:p().skeletonContent},t))})]},e.sectionTitle)),(0,l.jsx)(u.j,{className:p().actualDate,offerType:g,pageUrl:y,offerDate:b})]}),N=(0,l.jsxs)("div",{className:p().footer,children:[(0,l.jsx)(a.zx,{variant:"secondary",onClick:n.onClick,children:n.title}),(0,l.jsx)(a.zx,{rel:"nofollow",as:"a",href:m.url,onClick:m.onClick,children:m.title})]}),k=v?(0,l.jsxs)("div",{className:p().header,children:[(0,l.jsx)(s.D,{className:p().logo,size:50,url:h,alt:v}),(0,l.jsx)("p",{className:p().bankName,children:v})]}):null;return(0,l.jsx)(r.h,{children:x?(0,l.jsx)(a.jr,{isOpen:t,onClose:_,footer:N,className:p().mobilePopup,contentClassName:p().container,children:j}):(0,l.jsx)(a.dy,{title:k||void 0,rowTitle:!0,titleAlign:"left",className:p().drawer,contentClassName:p().container,isOpen:t,onClose:_,footer:N,children:j})})});_.displayName="OfferInfoModal"},45117:function(e,t,n){"use strict";n.d(t,{$m:function(){return c},BM:function(){return r},DW:function(){return u},MC:function(){return a},P3:function(){return s},Wk:function(){return o},gB:function(){return _},g_:function(){return d},qd:function(){return m},vw:function(){return i},zT:function(){return p}});var l=n(73897);let a="Ежемесячный платеж до",o="Сумма кредита",r=20,i=[{value:0,label:"Не имеет значения"},{value:1,label:"1 месяц"},{value:2,label:"2 месяца"},{value:3,label:"3 месяца"},{value:4,label:"4 месяца"},{value:5,label:"5 месяцев"},{value:6,label:"6 месяцев"},{value:9,label:"9 месяцев"},{value:12,label:"1 год"},{value:18,label:"1,5 года"},{value:24,label:"2 года"},{value:36,label:"3 года"},{value:48,label:"4 года"},{value:60,label:"5 лет"}],s={pp:"edzc",ps:"foam",p2:"hojk"},c=[{label:"По популярности",field:"order"},{label:"По ставке",field:"rate"},{label:"По платежу",field:"payment"}];l.u.POTREBITELSKIE;let u=[{value:"null",label:"Не имеет значения"},{value:"refinancing",label:"Рефинансирование"},{value:"education",label:"На образование"},{value:"treatment",label:"На лечение"},{value:"travels",label:"На путешествия"},{value:"repairs",label:"На ремонт"},{value:"other",label:"Просто деньги"}],d=[{value:"employee_for_hire",label:"Работник по найму"},{value:"soldier",label:"Военнослужащий"},{value:"pensioner",label:"Пенсионер"},{value:"individual_entrepreneur",label:"Индивидуальный предприниматель"},{value:"civil_servant",label:"Госслужащий"},{value:"student",label:"Студент"},{value:"budgetary",label:"Бюджетник"},{value:"personal_farm_owner",label:"Владелец личного подсобного хозяйства"},{value:"nothing",label:"Иное"}],m=[{value:"not_required",label:"Не требуется"},{value:"pledge",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"full",label:"Залог и поручительство"}],p=[{value:"to_account",label:"На счет в вашем банке"},{value:"to_custom_account",label:"На счет в стороннем банке"},{value:"to_card",label:"На карту"},{value:"cash",label:"Наличными"}],_=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}]},84859:function(e,t,n){"use strict";n.d(t,{D3:function(){return a},em:function(){return l}});let l={pp:"h",ps:"foam",p2:"hojk"},a="К сожалению, мы не нашли кредитов с такими параметрами"},64101:function(e,t,n){"use strict";n.d(t,{t:function(){return d}});var l=n(85893),a=n(79644),o=n(25675),r=n.n(o),i=n(47860),s=n(84859),c=n(19762),u=n.n(c);let d=e=>{let{onChangeParams:t}=e;return(0,l.jsxs)("div",{className:u().notFoundWrapper,children:[(0,l.jsx)(r(),{className:u().infoIcon,src:i.Z,alt:"?"}),(0,l.jsx)("p",{className:u().notFoundText,children:s.D3}),void 0!==t&&(0,l.jsx)(a.zx,{variant:"secondary",className:u().changeParamsButton,onClick:t,children:"Изменить параметры"})]})}},65618:function(e,t,n){"use strict";n.d(t,{b:function(){return l}});let l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=null;return n=>{t&&clearInterval(t),t=setTimeout(n,e)}}},44727:function(e,t,n){"use strict";function l(e){return"object"==typeof e&&null!==e?!!(e.comment||e.text):!!e}function a(e){return"number"==typeof e||(Array.isArray(e)?e.some(e=>l(e)):l(e))}n.d(t,{B:function(){return a}})},37220:function(e,t,n){"use strict";n.d(t,{z:function(){return l}});let l=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e)},23937:function(e,t,n){"use strict";n.d(t,{P:function(){return a}});var l=n(67294);function a(e){let[t,n]=(0,l.useState)(),a=(0,l.useMemo)(()=>{var n;return null!==(n=e.find(e=>e.id===t))&&void 0!==n?n:null},[t,e]),o=(0,l.useCallback)(()=>n(void 0),[]);return{data:a,visible:null!==t,show:n,hide:o}}},40374:function(e,t,n){"use strict";n.d(t,{N:function(){return s}});var l=n(85893),a=n(79644),o=n(54228),r=n(21437),i=n.n(r);let s=e=>{let{visible:t,onHide:n,children:r,footer:s}=e,c=(0,o.S0)();return(0,l.jsx)(a.h_,{children:c?(0,l.jsx)(a.jr,{isOpen:t,onClose:n,footer:s,className:i().mobilePopup,contentClassName:i().container,children:r}):(0,l.jsx)(a.dy,{title:(0,l.jsx)("div",{}),rowTitle:!0,titleAlign:"left",className:i().drawer,contentClassName:i().container,isOpen:t,onClose:n,footer:s,children:r})})}},86992:function(e,t,n){"use strict";n.d(t,{P:function(){return s}});var l=n(85893),a=n(79644),o=n(67294),r=n(86986);let i=e=>({parse:(e,t)=>{let n=parseInt(e.replace(/ /g,""),10)||null,l=t.target.selectionStart||0,a=l-e.split("").slice(0,l).filter(e=>" "===e).length,o=String(n).length-a;return{value:n,selection:o}},format:(t,n)=>{let{value:l,selection:a}=t;if(!l)return"";let o=(0,r.uf)(l),i=Math.max(0,o.length-a-Math.floor(a/3));return setTimeout(()=>{n&&document.activeElement===n&&(n.selectionStart=i,n.selectionEnd=i)},0),o+e}}),s=e=>{let{label:t,value:n,onChange:s,rightIcon:c=null,withoutPlaceholder:u,...d}=e,[m,p]=(0,o.useState)(!1),_=(0,o.useMemo)(()=>i(" ₽"),[]),v=(0,o.useMemo)(()=>i(""),[]),h=(0,o.useMemo)(()=>m?v:_,[m,_,v]);return(0,l.jsx)(a.vy,{mask:h,value:n,onChange:s,placeholder:n?(0,r.uf)(n)+" ₽":u?void 0:t,label:t,onFocus:()=>p(!0),onBlur:()=>p(!1),rightIcon:c,style:{width:"100%"},...d})}},30292:function(e,t,n){"use strict";n.d(t,{G:function(){return o},b:function(){return a}});var l=n(67294);let a=(e,t,n)=>{(0,l.useEffect)(()=>{let t=setTimeout(()=>{e()},n);return()=>{clearTimeout(t)}},t)},o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,[a,o]=(0,l.useState)(n),[r,i]=(0,l.useState)(!1),[s,c]=(0,l.useState)(null);return(0,l.useEffect)(()=>{i(!0),e().then(o).catch(c).then(()=>{i(!1)})},t),[a,r,s]}},97318:function(e,t,n){"use strict";n.d(t,{e:function(){return a}});var l=n(67294);function a(){let[e,t]=(0,l.useState)(!1);return{visible:e,show:(0,l.useCallback)(()=>t(!0),[]),hide:(0,l.useCallback)(()=>t(!1),[])}}},63716:function(e,t,n){"use strict";n.d(t,{p:function(){return a}});let l=["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"],a=e=>{let t=new Date(e),n=t.getDate(),a=l[t.getMonth()],o=t.getFullYear(),r=new Date().getFullYear()===o;return"".concat(n," ").concat(a," ").concat(r?"":o)}},86986:function(e,t,n){"use strict";n.d(t,{ZN:function(){return l},uf:function(){return a}});let l=(e,t)=>(null==e?void 0:e.includes(t))?e.filter(e=>e!==t):(e||[]).concat([t]),a=e=>o(e.toString().split("").reverse(),3).reverse().map(e=>e.reverse().join("")).join(" "),o=(e,t)=>{let n=[];for(let l=0;l<e.length;++l){let a=Math.floor(l/t);n[a]||(n[a]=[]),n[a].push(e[l])}return n}},28052:function(e,t,n){"use strict";n.d(t,{m:function(){return r}});var l=n(85893),a=n(45179),o=n.n(a);function r(e){let{comment:t,text:n}=e;return n?t?(0,l.jsxs)("div",{children:[(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:n}}),(0,l.jsx)("div",{className:o().commentText,dangerouslySetInnerHTML:{__html:t}})]}):(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:n}}):(0,l.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})}},49215:function(e,t,n){"use strict";n.d(t,{i:function(){return o}});var l=n(85893),a=n(79644);function o(e){let{label:t,options:n,values:o,className:r,search:i,onChange:s}=e,c=null==o?void 0:o.reduce((e,t)=>{let l=n.find(e=>String(e.value)===String(t));return l&&e.push(l),e},[]);return(0,l.jsx)(a.HU,{className:r,label:t,options:n,value:null!=c?c:null,search:i,onChange:e=>{s(e?e.map(e=>e.value):void 0)},multiple:!0})}},31531:function(e,t,n){"use strict";n.d(t,{P:function(){return o}});var l=n(85893),a=n(34588);function o(e){let{value:t,...n}=e,o=n.options.find(e=>e.value===t);return(0,l.jsx)(a.Ph,{...n,value:o,onChange:e=>{let t=null==e?void 0:e.value;n.onChange(t)}})}},68910:function(e,t,n){"use strict";n.r(t),n.d(t,{__N_SSP:function(){return lv},default:function(){return lh}});var l,a,o=n(85893),r=n(80138),i=n(67294);n(93188);var s=n(89577),c=n(98670),u=n(79644),d=n(25675),m=n.n(d),p=n(41664),_=n.n(p),v=n(44895),h=n(73172),f=n(77868),g=n(84444),b=n(54663),y=n(72335),x=n(26576),j=n(73897);let N=[{id:1,label:"Условия",name:x.i9.conditions},{id:2,label:"Требования",name:x.i9.requirements},{id:3,label:"Требуемые документы",name:x.i9.requirementsDocs},{id:4,label:"Выдача и погашение",name:x.i9.redemption}],k=j.u.IPOTEKA,C=e=>"https://vk.com/share.php?url=".concat(encodeURIComponent(e)),A=e=>"https://t.me/share/url?url=".concat(encodeURIComponent(e)),w=e=>"https://connect.ok.ru/offer?url=".concat(encodeURIComponent(e));var T=n(44727);let M=e=>{let{data:t}=e,n=(0,i.useMemo)(()=>(0,x.sg)(t),[t]),l=(0,i.useMemo)(()=>N.filter(e=>n[e.name].some(e=>(0,T.B)(e.value))),[n]);return{tabsContent:n,tabsList:l}},P=(0,i.memo)(e=>{var t,n;let{data:l,bank:a,offerType:r,pageUrl:i}=e,{tabsContent:s,tabsList:c}=M({data:l});return(0,o.jsx)(y.z,{scrollBlockId:b.q6,pageUrl:i,seoText:(null==l?void 0:l.short_description)&&(null==l?void 0:l.short_description.length)>5?null==l?void 0:l.short_description:void 0,title:"Об ипотеке",offerType:r,offerUpdateData:null==l?void 0:l.m_updated_at,bank:{logoMobile:null==a?void 0:a.logo_mob,description:null==a?void 0:a.short_description,url:"/banki/".concat(null==a?void 0:a.url),name:null==a?void 0:a.name,creditRating:null==a?void 0:a.credit_rating,netAssetsPlace:null==a?void 0:null===(t=a.ratings)||void 0===t?void 0:t.net_assets_place,netProfitRating:null==a?void 0:a.net_profit_rating},tabsList:c,tabsContent:s,aboutCompanyLabel:"О банке",site:null!==(n=null==a?void 0:a.site.title)&&void 0!==n?n:void 0})});P.displayName="MortgageAbout";var S=n(17722),L=n(77910),D=n(64062),E=n(72564),O=n(57063),R=n.n(O);let B=e=>{let{url:t,isMobile:n,className:l}=e,a=(0,i.useMemo)(()=>[{id:3,image:L.Z,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",buttonText:"Оформить на сайте банка",link:t},{id:4,image:S.Z,text:E.n.LEAD?"Эту ипотеку нельзя открыть через Финуслуги":"Эту ипотеку сейчас нельзя открыть онлайн на Финуслугах",buttonText:"Выбрать другую ипотеку",link:"/".concat(j.u.IPOTEKA)}],[t]);return(0,o.jsx)("div",{className:R().container,children:(0,o.jsx)(D.B,{className:l,title:"Где оформить ипотеку",isDependsOnWidth:!1,pageUrl:j.u.IPOTEKA,id:b.VT,isMobile:n,slides:a})})};var I=n(86010),F=n(77019),z=n(24443),W=n(82264),Z=n(20760),U=n(48766),q=n(26024),V=n(43944),H=n(33859);let K=(e,t)=>{let n=.13*e;return e<=2e6?n:(n=n>26e4?26e4:n)+(.13*t>39e4?39e4:.13*t)};var Y=n(27929),G={src:"/kredity/assets/_next/static/media/chain.2d44409a.svg",height:24,width:24,blurWidth:0,blurHeight:0},J=n(16021),Q=n(60207),X=n(74552),$=n(89221),ee=n(56790);let et=(e,t)=>(0,i.useLayoutEffect)(()=>{let n=e.current,l=t.current;if(null===n||null===l)throw Error("Dead code branch");let a=e=>{e.target!==n?n.scrollTop=l.scrollTop:l.scrollTop=n.scrollTop};return n.addEventListener("scroll",a),l.addEventListener("scroll",a),()=>{n.removeEventListener("scroll",a),l.removeEventListener("scroll",a)}},[e,t]);var en=n(17950);let el=(e,t)=>new Date(e,t+1,0).getDate();var ea=n(37220);let eo=e=>{let t=new Date().getFullYear(),n=new Date().getMonth()+e,l=new Date().getDate(),a=n<=12?n:n%12||12,o=t+Math.floor(n<=12?0:n%12?n/12:n/12-1),r=el(o,a);return{date:"".concat(l>r?r:l,".").concat(a<12?"0":"").concat(a,".").concat(o),year:o}},er=e=>{let{rate:t,periodWithMoth:n,defaultBalanceDebt:l,balanceDebtPrevMonth:a,month:o}=e,r=t/12/100,i=(0,ea.z)((1+r)**n,5),s=(0,ea.z)(l*r*i/(i-1),1),c=(0,ea.z)(a*r,1),u=(0,ea.z)(s-c,1),d=(0,ea.z)(a-u,1);return{...eo(o),paymentPerMoth:s,interestRepayment:c,loanRepayment:u,balanceDebt:d}},ei=e=>{let{rate:t,periodWithMoth:n,balanceDebtPrevMonth:l,month:a}=e,o=(0,ea.z)(t/12/100*l,1),r=(0,ea.z)(l/n,1),i=(0,ea.z)(o+r,1),s=(0,ea.z)(l-r,1);return{...eo(a),paymentPerMoth:i,interestRepayment:o,loanRepayment:r,balanceDebt:s}},es=(e,t)=>{let n=[];for(let a=1,o=0;a<e.periodWithMoth;a++,o++){var l;n.push(t({...e,balanceDebtPrevMonth:(null===(l=n[o-1])||void 0===l?void 0:l.balanceDebt)||e.defaultBalanceDebt,month:a}))}return n},ec=e=>es(e,er),eu=e=>es(e,ei),ed=(e,t,n)=>{let l=n*t;return{totalOverpayment:l-e,totalCost:l}},em=(e,t)=>{let n=[];return e&&n.push({label:"Аннуитетный",value:en.T.annuity}),t&&n.push({label:"Дифференцированный",value:en.T.differentiated}),n};var ep=n(39918),e_=n(40741),ev=n(54228),eh=n(36921),ef=n.n(eh);let eg=e=>{let{elementList:t,isExpanded:n,...l}=e;return(0,o.jsxs)("div",{className:ef().container,children:[(0,o.jsx)("div",{className:(0,I.Z)(ef().expandableContainer,n&&ef().expanded),children:t.map(e=>e)}),(0,o.jsx)(u.zx,{...l})]})},eb=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},[]),ey=[{label:"Дата",key:"date"},{label:"Платеж",key:"paymentPerMoth"},{label:"Проценты",key:"interestRepayment"},{label:"Оплата долга",key:"loanRepayment"},{label:"Остаток долга",key:"balanceDebt"}],ex=["vk","tg","ok"];var ej=n(90593),eN=n.n(ej);let ek=e=>{let{children:t,className:n}=e;return(0,o.jsx)("div",{className:(0,I.Z)(eN().field,n),children:t})},eC=(0,i.forwardRef)((e,t)=>{let{data:n,isMobile:l}=e,a=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}),[r,s]=(0,i.useState)({[new Date().getFullYear()]:!0}),c=(e,t)=>{s(n=>({...n,[t]:e}))},d=()=>(0,o.jsxs)("div",{className:(0,I.Z)(eN().columnTotalParams,eN().rowTabel),children:[(0,o.jsx)(ek,{className:eN().fieldLargeText,children:l?"Итоговая выплата":"Итого"}),ey.map(e=>"date"!==e.key&&(0,o.jsxs)(ek,{children:[l&&(0,o.jsx)("span",{children:e.label}),(0,o.jsxs)("span",{children:[" ",(0,ea.z)(a[e.key],1).toLocaleString("ru-RU",{useGrouping:!0}).replace(".",","),l&&" ₽"]})]},e.key))]}),m=e=>{let{it:t,index:n}=e;return(0,o.jsxs)(o.Fragment,{children:[!l&&(0!=n?(0,o.jsx)("h4",{className:eN().titleYearSchedule,children:t.year}):(0,o.jsx)("div",{})),t.schedule.map(e=>(0,o.jsx)("div",{className:(0,I.Z)(eN().rowTabel,eN().bodyField),children:ey.map((t,n)=>(0,o.jsxs)(ek,{children:[!!l&&"date"!==t.key&&(0,o.jsx)("span",{children:t.label+(l?"":", ₽")}),(0,o.jsx)("span",{className:eN().value,children:0===n?e[t.key]:e[t.key].toLocaleString("ru-RU",{useGrouping:!0}).replace(".",",")})]},t.key))},e.date))]})};return(0,o.jsxs)("div",{className:eN().tableSchedule,children:[!l&&(0,o.jsx)("div",{className:(0,I.Z)(eN().columnTitles,eN().rowTabel),children:ey.map(e=>(0,o.jsx)(ek,{children:e.label+("date"===e.key||l?"":", ₽")},e.key))}),(0,o.jsxs)("div",{ref:t,className:eN().contentSchedule,children:[n.map((e,t)=>(0,o.jsx)("div",{className:eN().yearSchedule,children:l?(0,o.jsx)(u.dG,{title:e.year.toString(),opened:!!r[e.year],onChangeOpened:t=>c(t,e.year),className:eN().yearAccordion,children:(0,o.jsx)(m,{it:e,index:t})}):(0,o.jsx)(m,{it:e,index:t})},e.year)),l&&(0,o.jsx)(d,{})]}),!l&&(0,o.jsx)(d,{})]})});eC.displayName="ScheduleTable";let eA=(0,i.forwardRef)((e,t)=>{let{isMobile:n,paymentScheduleParametrs:l,payments:a}=e,r=(0,i.useMemo)(()=>n?a:a.length>1?[...a,{label:"Оба платежа",value:"all"}]:a,[a,n]),[s,c]=(0,i.useState)(r[0].value),d=eb(ec(l)),m=eb(eu(l)),p=(0,i.useRef)(null),_=(0,i.useRef)(null);return(et(p,_),(0,i.useImperativeHandle)(t,()=>({onScrollToBottomHandle(){let e;null==(e=en.T.annuity&&p.current?p.current:_.current)||e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}}),[]),d&&m)?(0,o.jsxs)("div",{className:eN().schedulePaymentsWrapper,children:[a.length>1&&(0,o.jsx)("div",{className:eN().tabsContentWrapper,children:r.map(e=>(0,o.jsx)(u.zx,{variant:"secondary",size:n?"xs":"s",label:e.label,className:(0,I.Z)(eN().button,{[eN().active]:s===e.value}),onClick:()=>c(e.value)},e.label))}),(0,o.jsxs)("div",{className:eN().tabelsWrapper,children:[[en.T.annuity,"all"].includes(s)&&(0,o.jsx)(eC,{ref:p,data:d,isMobile:n}),[en.T.differentiated,"all"].includes(s)&&(0,o.jsx)(eC,{ref:_,data:m,isMobile:n})]})]}):null});eA.displayName="PaymentScheduleModalContent";let ew=e=>{let{isMobile:t,url:n}=e,[l,a]=(0,i.useState)(!1),r=e=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:e,eventCategory:k})},s=async e=>{try{r(e),await navigator.clipboard.writeText(n),a(!0),setTimeout(()=>a(!1),2e3)}catch(e){console.error("Failed to copy uri: ",e)}};return(0,o.jsxs)(u.zx,{variant:"secondary",size:t?"s":"m",className:(0,I.Z)(eN().copyButton,t&&eN().mobileActionButton),onClick:()=>s((0,e_.b)("Скопировать ссылку")),children:[(0,o.jsx)(m(),{src:G,alt:"Чат",height:"24"}),!t&&(l?"Ссылка скопирована":"Скопировать ссылку")]})},eT=e=>{var t;let n=(0,ev.S0)();(0,i.useEffect)(()=>{var t,n;e.bankName&&(null===(t=e.data)||void 0===t?void 0:t.id)&&e.isOpen&&(0,ep.D)({eventAction:ep.i.popup,eventActionText:null==e?void 0:e.bankName,eventCategory:e.mainPageUrl,eventLabel:null===(n=e.data)||void 0===n?void 0:n.id})},[e.isOpen,e.mainPageUrl,e.bankName,null===(t=e.data)||void 0===t?void 0:t.id]);let l=t=>{var l;let a=e.url;if(n){navigator.share({url:a});return}switch(t){case"vk":a=C(e.url);break;case"tg":a=A(e.url);break;case"ok":a=w(e.url)}null===(l=window.open(a,"_blank"))||void 0===l||l.focus(),(0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.button,eventActionText:"share",url:a})},a=e=>{let{socialNetwork:t}=e;switch(t){case"vk":return(0,o.jsx)($.Z,{});case"tg":return(0,o.jsx)(X.Z,{});case"ok":return(0,o.jsx)(J.Z,{});default:return null}},r=e=>{let{socialNetwork:t,className:n}=e;return(0,o.jsx)("button",{onClick:()=>l(t),className:n,children:(0,o.jsx)(a,{socialNetwork:t})})},s=(e,t)=>{e(),setTimeout(t,2e3)},c=(0,o.jsxs)("div",{className:eN().footer,children:[(0,o.jsxs)("div",{className:eN().socialNetworkSection,children:[(0,o.jsx)("p",{className:eN().socialNetworkTitle,children:"Поделиться"}),(0,o.jsx)("div",{className:eN().socialNetworkButtonsWrapper,children:ex.map(e=>(0,o.jsx)(r,{socialNetwork:e,className:(0,I.Z)(eN().action,eN().socialButton)},e))})]}),(0,o.jsx)(ew,{isMobile:n,url:e.url})]}),d=(0,i.useRef)(null),[p,_]=(0,i.useState)(!1),v=(0,o.jsxs)("div",{className:eN().mobileFooter,children:[(0,o.jsx)(u.zx,{className:eN().paymentSummaryButton,size:"normal",onClick:()=>{var e;return null===(e=d.current)||void 0===e?void 0:e.onScrollToBottomHandle()},children:"Итоговая выплата"}),(0,o.jsxs)("div",{children:[(0,o.jsx)(u._0,{text:"Ссылка скопирована",children:t=>{let{show:l,hide:a}=t;return(0,o.jsx)("button",{onClick:()=>s(l,a),children:(0,o.jsx)(ew,{isMobile:n,url:e.url})})}}),(0,o.jsx)(eg,{className:eN().mobileActionButton,variant:"secondary",isExpanded:p,onClick:()=>{_(e=>!e)},elementList:ex.map(e=>(0,o.jsx)(r,{socialNetwork:e,className:eN().expandableSocialMediaButton},e)),children:(0,o.jsx)(m(),{src:Q.Z,alt:"Чат",height:"24"})})]})]});return(0,o.jsx)(ee.h,{children:n?(0,o.jsx)(u.jr,{className:eN().mobilePopup,contentClassName:(0,I.Z)(eN().container,e.payments.length<=1&&eN().withoutTabsContainer),isOpen:e.isOpen,onClose:e.onClose,footer:v,withDisabledScroll:!0,children:(0,o.jsx)(eA,{ref:d,paymentScheduleParametrs:e.paymentScheduleParametrs,payments:e.payments,isMobile:n})}):(0,o.jsx)(u.dy,{title:(0,o.jsxs)("div",{className:eN().title,children:[e.logo&&(0,o.jsx)("div",{className:eN().logoContainer,children:(0,o.jsx)(m(),{className:eN().logo,width:50,height:50,src:e.logo,alt:"logo"})})," ","График платежей"]}),rowTitle:!0,titleAlign:"left",className:eN().drawer,contentClassName:eN().container,isOpen:e.isOpen,onClose:e.onClose,footer:c,withDisabledScroll:!0,children:(0,o.jsx)(eA,{paymentScheduleParametrs:e.paymentScheduleParametrs,payments:e.payments,isMobile:n})})})};var eM=n(11163),eP=n(82080),eS=n(1998);let eL=e=>{var t;let n=Number(null!==(t=e.period.from)&&void 0!==t?t:1),l=Number(e.period.to),a=em(!!e.repayment_procedure.annuity,!!e.repayment_procedure.differentiated),[o,r]=(0,i.useState)(l),[s,c]=(0,i.useState)({}),[u,d]=(0,i.useState)([a[0]]),{loanRateFrom:m,loanRateTo:p}=(0,i.useMemo)(()=>{let t=(s?Object.values(s):[]).reduce((e,t)=>e+t,0);return{loanRateFrom:Number(e.interest_rate.from)-t,loanRateTo:Number(e.interest_rate.to)-t}},[s,e.interest_rate.from,e.interest_rate.to]),{asPath:_}=(0,eM.useRouter)(),v=(0,i.useRef)(),h=+e.amount.from+(0,ea.z)(+e.amount.from*+e.first_payment.from/(100-+e.first_payment.from-1),1),f=Math.min(1e8,+e.amount.to+(0,ea.z)(+e.amount.to*+e.first_payment.from/(100-+e.first_payment.from),1)),g=(0,eS.G)({defaultValue:String(f),format:"currency",type:"float",maxLength:20,unit:"₽"}),b=(0,i.useMemo)(()=>(0,ea.z)(h/100*(+e.first_payment.from-1),1),[e.first_payment.from,h]),y=(0,i.useMemo)(()=>(0,ea.z)(f/100*+e.first_payment.from,1),[e.first_payment.from,f]),x=(0,eS.G)({defaultValue:String(y),format:"currency",type:"float",maxLength:20,unit:"₽"}),j=(0,i.useMemo)(()=>+g.value>+e.amount.to?(0,ea.z)(+g.value-+e.amount.to,1):f===+g.value?y:h===+g.value?b:(0,ea.z)(+g.value/100*+e.first_payment.from,1),[g.value,e.amount.to,e.first_payment.from,f,h,y,b]),N=(0,i.useMemo)(()=>{let t=0;return t=h===+g.value?h/100*+e.first_payment.from:+g.value-+e.amount.from,(0,ea.z)(t,1)},[e.amount.from,e.first_payment.from,h,g.value]),k=(0,eS.G)({defaultValue:"0",format:"currency",type:"float",maxLength:7,unit:"₽"}),C=(0,eS.G)({defaultValue:String(x.value),format:"currency",type:"float",maxLength:9,unit:"₽"}),A=(0,i.useMemo)(()=>(0,ea.z)(Number(x.value)/Number(g.value)*100,1),[x.value,g.value]),w=(0,i.useMemo)(()=>(0,ea.z)(h===+g.value?+g.value-N:+g.value-+x.value,1),[h,x,N,g.value]),T=(0,i.useMemo)(()=>"".concat(window.location.href.split("?")[0],"?propertyPrice=").concat((0,ea.z)(+g.value,1),"&firstPayment=").concat((0,ea.z)(+x.value,1)).concat(+k.value>0?"&matCapital=".concat((0,ea.z)(+k.value,1)):"").concat(+C.value>0?"&personalFunds=".concat((0,ea.z)(+C.value,1)):"","&period=").concat(o).concat(a.length>1?"&paymentType=".concat(u[0].value):"").concat(Object.keys(s).filter(e=>!!s[e]).length?"&additionalParams=".concat(encodeURIComponent(Object.entries(s).filter(e=>!!e.at(-1)).map(e=>e[0]).join(","))):""),[g.value,x.value,k.value,C.value,o,a.length,u,s]),M=(0,i.useMemo)(()=>{var t,n;let l=(null===(n=e.rate_corrections_first_payment)||void 0===n?void 0:null===(t=n.find(e=>{let t=+x.value/(+g.value/100);return e.rate_from<=t&&t<=e.rate_to}))||void 0===t?void 0:t.rate)||0;return+e.interest_rate.from-Object.values(s).reduce((e,t)=>e+=t,0)-l},[e.rate_corrections_first_payment,e.interest_rate.from,s,g.value,x.value]),{paymentPerMoth:P}=(0,i.useMemo)(()=>{var e;return((null===(e=u[0])||void 0===e?void 0:e.value)===en.T.annuity?er:ei)({rate:M,periodWithMoth:o,defaultBalanceDebt:w,balanceDebtPrevMonth:w,month:1})},[M,w,u,o]),{totalOverpayment:S,totalCost:L}=(0,i.useMemo)(()=>ed(w,o,P),[P,w,o]),D=(0,i.useCallback)(e=>{let{key:t,value:n}=e;c(e=>({...e,[t]:n}))},[]),E=(0,i.useCallback)(e=>{r(e),x.handleChange(P)},[x,P]),O=(0,i.useCallback)(t=>{g.handleChange(t,t=>{let n=0;n=+t>+e.amount.to?+t-+e.amount.to:+t>h?+t/100*+e.first_payment.from:b,x.handleChange(n,e=>{0===Number(k.value)&&C.handleChange(Number(e)-Number(k.value))})})},[g,e.amount.to,e.first_payment.from,x,h,b,k.value,C]),R=(0,i.useCallback)(e=>{x.handleChange(e,e=>{C.handleChange(Number(e)-Number(k.value))})},[x,C,k.value]),B=(0,i.useCallback)(t=>{let n=t.currentTarget.value,l=Number(C.value)+Number(t.currentTarget.value);l>1e8-+e.amount.from||k.handleChange(n,()=>{if(l>N){let t=l+Number(e.amount.from);g.handleChange(t>1e8?1e8:t)}Number(x.value)<j&&g.handleChange((0,ea.z)(Number(C.value)/+e.first_payment.from*100,1)),x.handleChange(l)})},[C.value,e.amount.from,e.first_payment.from,k,N,x,j,g]),I=(0,i.useCallback)(t=>{v.current&&clearInterval(v.current);let n=t.currentTarget.value,l=Number(k.value)+Number(t.currentTarget.value);l>1e8-+e.amount.from||C.handleChange(n,t=>{if(Number(t)<b){v.current=setTimeout(()=>C.handleChange(x.value),1e3);return}if(l>N){let t=l+Number(e.amount.from);g.handleChange(t>1e8?1e8:t)}Number(t)<j&&g.handleChange((0,ea.z)((Number(t)<b?b:Number(t)/+e.first_payment.from)*100,1)),x.handleChange(l)})},[k.value,e.amount.from,e.first_payment.from,C,N,j,x,g,b]);return(0,i.useEffect)(()=>{let t=(0,eP.p)(_,"?"),o=Array.isArray(t.property_price)?t.property_price[0]:t.property_price,i=Array.isArray(t.first_payment)?t.first_payment[0]:t.first_payment,s=Number(Array.isArray(t.period)?t.period[0]:t.period),u=Number(t.matCapital);if(u&&k.handleChange(u),t.additionalParams&&decodeURI(t.additionalParams.toString()).split("%2C").forEach(t=>{var n;let l=null===(n=e.rate_corrections)||void 0===n?void 0:n.find(e=>(0,e_.b)(e.title)===t);l&&null!==l.rate&&c(e=>({...e,[t]:l.rate}))}),g.handleChange(o),x.handleChange(i),t.firstPayment&&x.handleChange(Math.min(j,Math.min(Number(t.firstPayment.toString()),N))),t.personalFunds&&C.handleChange(t.personalFunds.toString()),t.propertyPrice){let n=Math.min(Number(t.propertyPrice.toString()),1e8);n-Number(x.value)>Number(e.amount.to)&&x.handleChange(n-Number(e.amount.to)),g.handleChange(n)}if(t.paymentType){let e=a.find(e=>e.value===t.paymentType);e&&d([e])}return!Number.isNaN(s)&&s>=n&&s<=l&&r(s),()=>clearTimeout(v.current)},[]),(0,i.useMemo)(()=>({totalOverpayment:S,totalCost:L,currectMonthlyPayment:P,firstPaymentPercent:A,calculatorQueryParamsInLink:T,mortgageCredit:w,personalFunds:C,matCapital:k,currectInterestRate:M,firstPaymentMin:j,firstPaymentMax:N,propertyPriceMin:h,propertyPriceMax:1e8,propertyPrice:g,firstPayment:x,period:o,setPeriod:r,periodMin:n,periodMax:l,paymentTypeOptions:a,paymentType:u,setPaymentType:d,additionalParams:s,handleChangePropertyPrice:O,handleChangePeriod:E,handleChangeAdditionalParams:D,handleChangePersonalFunds:I,handleChangeMatCapital:B,handleChangeFirstPayment:R,loanRateFrom:m,loanRateTo:p}),[S,L,P,A,T,w,C,k,M,j,N,h,1e8,g,x,o,n,l,a,u,s,O,E,D,I,B,R,m,p])};var eD=n(41262),eE=n(66566),eO=n(94466),eR=n(960),eB=n.n(eR);let eI="Оформить на сайте банка",eF="Где оформить ипотеку",ez=e=>{var t,n,l,a;let{bank:r,data:s,isMobile:c}=e,[d,m]=(0,i.useState)(!1),p=(0,i.useRef)(null),_=eL(s),v=(0,i.useCallback)(()=>{m(e=>!e)},[]),h=(0,i.useMemo)(()=>({values:[_.period],max:_.periodMax,min:_.periodMin===_.periodMax?_.periodMin-1:_.periodMin,onChange:e=>{_.periodMin!==_.periodMax&&_.setPeriod(e[0])},step:1,legend:[_.periodMin,_.periodMax],formatValue:e=>(0,o.jsx)("span",{className:eB().legend,children:(0,eD.S_)(e)})}),[_]),f=(0,i.useMemo)(()=>({values:[+_.propertyPrice.value],max:_.propertyPriceMax,min:_.propertyPriceMin,onChange:e=>{_.propertyPriceMin!==_.propertyPriceMax&&_.handleChangePropertyPrice(e[0])},step:1e5,legend:[_.propertyPriceMin,_.propertyPriceMax],formatValue:e=>(0,o.jsx)("span",{className:eB().legend,children:e>1e6?"".concat((0,eO.D$)(e)," ₽"):"".concat((0,eO.uf)(e)," ₽")})}),[_]),g=(0,i.useMemo)(()=>({values:[+_.firstPayment.value<_.firstPaymentMin?_.firstPaymentMin:+_.firstPayment.value],max:_.firstPaymentMax,min:_.firstPaymentMin,onChange:e=>{_.firstPaymentMin!==_.firstPaymentMax&&_.handleChangeFirstPayment(e[0])},step:1e3,legend:[_.firstPaymentMin,_.firstPaymentMax],formatValue:e=>(0,o.jsx)("span",{className:eB().legend,children:e>1e6?(0,eO.D$)(e):"".concat((0,eO.uf)(e)," ₽")})}),[_]),y=(0,i.useMemo)(()=>_.paymentTypeOptions.filter(e=>{var t;return e.value===(null===(t=_.paymentType[0])||void 0===t?void 0:t.value)}),[_.paymentTypeOptions,_.paymentType]),x=(0,i.useMemo)(()=>{var e;let t=(null===(e=s.application_term.custom_text)||void 0===e?void 0:e.from)!==void 0?(0,U.B)(s.application_term.custom_text.from):0,n=new Date;n.setDate(n.getDate()+t);let l=n.getDate(),a=n.getMonth()+1,o=n.getFullYear();return"Деньги у вас до ".concat(l," ").concat((0,eE.$)("".concat(a,"-").concat(l,"-").concat(o)))},[null===(t=s.application_term.custom_text)||void 0===t?void 0:t.from]),N=(0,i.useCallback)(()=>{p.current&&p.current.focus()},[]),k=(0,i.useCallback)(()=>{_.propertyPrice.events.onFocus(),m(!0)},[_.propertyPrice.events]),C=(0,i.useCallback)(e=>{e&&((0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.filterCatalog,eventLabel:"Платеж",eventValue:e.map(e=>e.label).join(",")}),_.setPaymentType([{...e[0],value:e[0].value}]))},[_]),A=(0,i.useMemo)(()=>[{id:1,label:(0,eD.S_)(_.period)},{id:2,label:"".concat((0,eO.uf)(+_.propertyPrice.value)," ₽")}],[_.propertyPrice.value,_.period]),w=(0,i.useMemo)(()=>{let e=[],t=s.full_price;t&&e.push({label:c?"ПСК":"Полная стоимость кредита",value:(0,F.W)({from:Number(t.from),to:Number(t.to)}),description:c?"Полная стоимость кредита":void 0},{label:"Процентная ставка",value:(0,eO.sz)(_.loanRateFrom,_.loanRateTo)});let n=Number(_.firstPayment.value);e.push({label:"Первый взнос",value:"".concat((0,eO.D$)((0,ea.z)(n,1)),"&#160;₽")},{label:"Платеж в месяц",value:"".concat((0,eO.D$)(_.currectMonthlyPayment),"&#160;₽")},{label:"Налоговый вычет",value:"".concat((0,eO.D$)((0,ea.z)(K(+_.propertyPrice.value,_.totalOverpayment),1))," ₽")});let l=_.paymentType;if(l){var a;e.push({label:"Тип погашения",value:(null===(a=l[0])||void 0===a?void 0:a.value)===en.T.annuity?"Аннуитетный":"Дифференцированный"})}return e.push({label:"Переплата",value:"".concat((0,eO.D$)(_.totalOverpayment),"&#160;₽"),description:"Это сумма процентов, которые заемщик платит за пользование кредитом. Она может уменьшиться, если гасить кредит досрочно"},{label:"Итоговая выплата",value:"".concat((0,eO.D$)(_.totalCost),"&#160;₽")}),e},[_.currectMonthlyPayment,_.firstPayment.value,_.loanRateFrom,_.loanRateTo,_.paymentType,_.propertyPrice.value,_.totalCost,_.totalOverpayment,s.full_price,c]),T=(0,i.useMemo)(()=>{var e;return(null==s?void 0:null===(e=s.rate_corrections)||void 0===e?void 0:e.filter(e=>e.rate).map(e=>({name:e.title,label:e.content,labelPosition:"left",checked:!!_.additionalParams[(0,e_.b)(e.title)],onChange:t=>_.handleChangeAdditionalParams({key:(0,e_.b)(e.title),value:t.target.checked&&e.rate||0})})))||[]},[_,null==s?void 0:s.rate_corrections]),[M,P]=(0,i.useState)(!1),S=(0,i.useCallback)(()=>{P(e=>!e)},[]),[L,D]=(0,i.useState)(!1);(0,i.useEffect)(()=>{D(!!+_.matCapital.value)},[_.matCapital.value]);let E=(0,i.useCallback)(()=>{_.matCapital.events.onFocus(),D(!0)},[_.matCapital.events]),O=(0,i.useMemo)(()=>[M,S],[M,S]),R=+s.amount.to>+s.amount.from;return(0,o.jsxs)(Y.U.Provider,{value:O,children:[(0,o.jsxs)(u.W2,{className:(0,I.Z)(eB().container,eB().containerFull,{[eB().containerWithoutCalculator]:!R}),children:[(0,o.jsx)(V.F,{url:s.url,bank:{logoMob:null==r?void 0:r.logo_mob,url:"/banki/".concat(null==r?void 0:r.url),name:null!==(a=null==r?void 0:r.name)&&void 0!==a?a:s.bank_name},pageUrl:j.u.IPOTEKA,title:s.title,isSmall:l,isMobile:c,tagTheme:"green",className:eB().promo}),R&&(0,o.jsxs)("div",{className:eB().left,children:[(0,o.jsx)(z.y,{isMobile:c,title:"Настройки ипотеки",pageUrl:j.u.IPOTEKA,infoLink:{isShow:!c,text:"Подробнее об ипотеке",idScrollBlock:b.q6,offPadding:!0,widthMaxContent:!0},items:[{elements:[{type:"inputRange",desription:"Впишите сюда стоимость жилья. Если деньги нужны вам не только на покупку недвижимости, но и на другие цели, выберите другой тип кредита",props:{label:"Стоимость недвижимости",innerRef:p,rangeProps:f,value:_.propertyPrice.isFocused?_.propertyPrice.value:_.propertyPrice.formattedValue,..._.propertyPrice.events,onFocus:k}}]},{elements:[{type:"inputRange",props:{label:"Срок погашения",rangeProps:h,value:(0,eD.S_)(_.period)}}]},{elements:[{type:"inputRange",props:{label:"Первый взнос",addonAfter:(0,o.jsxs)("span",{className:eB().firstPaymentAddonAfter,children:[_.firstPaymentPercent,"%"]}),rangeProps:g,value:_.firstPayment.isFocused?_.firstPayment.value:_.firstPayment.formattedValue,..._.firstPayment.events}}]},s.maternal_capital.has>0?{isCollapsedElements:L,titleElements:"Использовать материнский капитал",onToggle:e=>{D(e)},elements:[{type:"input",props:{label:"Сумма сертификата",value:_.matCapital.isFocused?_.matCapital.value:_.matCapital.formattedValue,..._.matCapital.events,onFocus:E,onChange:_.handleChangeMatCapital}},{type:"input",props:{label:"Личные средства",value:_.personalFunds.isFocused?_.personalFunds.value:_.personalFunds.formattedValue,..._.personalFunds.events,onChange:_.handleChangePersonalFunds}}]}:null,{elements:[{type:"divider",isHidden:!L||!_.paymentType||_.paymentTypeOptions.length<=1}]},{elements:[{type:"select",isHidden:!_.paymentType||_.paymentTypeOptions.length<=1,desription:(0,o.jsx)(q.a,{className:eB().typeDescription,type:null===(n=_.paymentType[0])||void 0===n?void 0:n.value}),props:{label:"Тип погашения",options:_.paymentTypeOptions,onChange:C,value:y}}]}],chips:A,additionalItemsTitle:"Уменьшить ставку",additionalItems:T,isShowChips:c&&!!(null==A?void 0:A.length)&&!d,isExpandSettings:d,onToggleSettings:v}),(0,o.jsx)(H.S,{text:"Все для ипотеки: страхуем недвижимость, жизнь, здоровье или все сразу",hideButtons:!0,hideQr:!0,isSmall:!0,className:eB().qrDesc})]}),(0,o.jsxs)("div",{className:(0,I.Z)({[eB().right]:R}),children:[(0,o.jsx)(Z.y,{captionTitle:x,pageUrl:j.u.IPOTEKA,onEdit:N,amount:_.mortgageCredit,repayment:_.totalOverpayment,disclaimer:"Предварительные условия. Не оферта",tag:s.online_application.commercial_desc,footerActions:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(u.zx,{as:"a",target:"_blank",className:eB().button,href:s.online_application.url,onClick:()=>{(0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.link,eventActionText:eI})},children:eI}),(0,o.jsx)(u.zx,{as:"a",onClick:()=>{(0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.button,eventActionText:eF}),(0,u.ld)(b.VT,{offset:c?0:-100,position:"top"})},className:eB().button,variant:"secondary",children:eF}),(0,o.jsx)(W.j,{offPadding:!1,widthMaxContent:!1,text:"График платежей",iconColor:"light",mainPageUrl:j.u.IPOTEKA,className:eB().link,onClick:S})]}),valuesList:w,showChart:!0}),(0,o.jsx)(H.S,{text:"Все для ипотеки: страхуем недвижимость, жизнь, здоровье или все сразу",hideButtons:!0,hideQr:!0,isSmall:!0,className:eB().qrMobile})]})]}),(0,o.jsx)(eT,{data:s,bankName:null==r?void 0:r.name,isOpen:M,paymentScheduleParametrs:{rate:Number(_.currectInterestRate),periodWithMoth:Number(_.period),defaultBalanceDebt:_.mortgageCredit},onClose:S,payments:_.paymentTypeOptions,logo:null==r?void 0:r.logo_mob,url:_.calculatorQueryParamsInLink,mainPageUrl:j.u.IPOTEKA})]})};var eW=n(13442),eZ=n(84135),eU=n(19438),eq=n(65737),eV=n(11083),eH=n(10317),eK=n.n(eH);let eY=(0,i.memo)(e=>{let{data:t,className:n,onDetailInfoClick:l,onClick:a}=e,r=[],s=(0,i.useRef)(null),c=(0,i.useRef)(!1),u=(0,i.useRef)(null),d={text:(0,eO.dN)({from:t.amountFrom,to:t.amountTo}),caption:"Сумма кредита"},p={text:"от ".concat((0,eO.uf)(t.payment),"%"),caption:"Первый взнос"};r.push({text:"Ипотека",backGround:"green"}),r.push({text:t.typeText,backGround:"white"});let _=e=>{(0,eq.l)({event:"data-event",eventAction:e,eventCategory:j.u.IPOTEKA,eventLabel:t.id,eventValue:t.eventValue}),null==a||a(t)},v=(0,i.useCallback)(e=>{let[n]=e;1===n.intersectionRatio&&!c.current&&((0,eq.l)({event:"data-event",eventAction:"show_in_catalog",eventCategory:j.u.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(v,{root:null,threshold:[1]}),s.current.observe(u.current))},[v]),r.map(e=>{e.text=" ".concat(e.text," ")}),(0,o.jsx)("div",{ref:u,className:n,onClick:()=>_("click_button_".concat((0,e_.b)("Подать заявку"))),children:(0,o.jsx)(eV.J,{icon:t.logo?(0,o.jsx)("div",{className:eK().logo,children:(0,o.jsx)(m(),{width:56,height:56,src:t.logo,alt:"logo"})}):(0,o.jsx)("div",{className:eK().placeholderLogo}),companyName:t.bankName,productName:t.title,productUrl:t.url,buttonUrl:t.url,tags:r,advantageAmountFrom:d,advantageAmountTo:p,onDetailInfoClick:()=>{l(t),(0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.button,eventActionText:"open_modal"})},className:eK().plate})})});eY.displayName="MortgageListItem";var eG=n(89504),eJ=n(32244);let eQ=e=>{var t,n,l,a;let{banks:o,mortgage:r,period:i}=e,s="/".concat(j.u.IPOTEKA,"/").concat(r.url),c=o.find(e=>+r.bank_id==+e.id),u="",d="";return 2===r.online_application.type?u="Открытие в банке":(u="Заявка через сайт банка",d="non_commercial"),{id:r.id,bankName:null!==(n=null==c?void 0:c.name)&&void 0!==n?n:r.bank_name,bankId:null!==(l=null==c?void 0:c.id)&&void 0!==l?l:"",logo:null!==(a=null==c?void 0:c.logo_mob)&&void 0!==a?a:"",title:r.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?void 0:null===(t=c.legal_entities)||void 0===t?void 0:t[0].name),isPermanentRegistation:1==+r.registration_address.permanent,period:i||+r.period.to,rate:+r.interest_rate.from,rateTo:+r.interest_rate.to,payment:+r.first_payment.from||0,currency:"₽",detailUrl:"/".concat(j.u.IPOTEKA,"/").concat(r.url),typeText:u,eventValue:d,notLoan:1===r.loan.not_required,incomeProof:0===r.income_proof.not_required,amountFrom:Number(r.amount.from),amountTo:Number(r.amount.to)}};var eX=n(84053),e$=n(94347),e0=n(65844),e1=n.n(e0);let e2=(0,i.memo)(e=>{let{bank:t,banks:n,currentCardId:l,mortgagesList:a,mortgagesFinuslugiList:r,className:s,newContainer:c=!1}=e,{town:d}=(0,e$.T)(),[m,p]=(0,i.useState)(),_=(0,i.useCallback)(()=>{p(void 0)},[]),v=(0,i.useCallback)(e=>{(0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),h=(0,i.useMemo)(()=>{let e=a.length?a.filter(e=>e.id!==l):[];return(0,eJ.$)({productList:e,anotherList:e,count:eG.NU})},[a,l]),f=(0,i.useMemo)(()=>{let e=r||[];return(0,eJ.$)({productList:e,anotherList:e,count:eG.wo-h.length})},[h.length,r]),g=(0,i.useMemo)(()=>({bankList:h.map(e=>eQ({banks:[t],mortgage:e})),finuslugiList:f.map(e=>eQ({banks:n,mortgage:e}))}),[t,n,h,f]),b=(0,i.useCallback)(e=>{if(!e)return;let n=[h,f].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,h,f]),y=(0,i.useCallback)(e=>{p(b(e)),e&&(0,ep.D)({eventCategory:j.u.IPOTEKA,eventAction:ep.i.popup,eventActionText:e.title,eventLabel:e.id})},[b]),x="".concat((0,eX.ZR)().mainBaseUrl,"/banki/").concat(t.url,"/ipoteka").concat((null==d?void 0:d.url.length)?"/reg_"+d.url:""),N=(0,o.jsx)(o.Fragment,{children:!!g.bankList.length&&(0,o.jsxs)("section",{className:e1().offersListContainer,children:[(0,o.jsxs)("p",{className:e1().listTitle,children:["Ипотека от ",t.name]}),g.bankList.map(e=>(0,o.jsx)(eY,{text:"Подать заявку",className:e1().listItem,data:e,onDetailInfoClick:y,onClick:v},e.url)),(0,o.jsx)(eW.j,{offPadding:!0,text:"Bсе предложения от банка",href:x,target:"_blank",iconColor:"light",mainPageUrl:j.u.IPOTEKA})]})});return g.finuslugiList.length&&(e1().offersListContainer,e1().listTitle,g.finuslugiList.map(e=>(0,o.jsx)(eY,{text:"Подать заявку",className:e1().listItem,data:e,onClick:v,onDetailInfoClick:y},e.url)),eW.j,j.u.IPOTEKA,j.u.IPOTEKA),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("section",{className:(0,I.Z)(e1().container,s),children:[(0,o.jsx)("h3",{className:e1().title,children:"Другие предложения"}),c?(0,o.jsx)(u.W2,{children:N}):(0,o.jsx)(eU.t,{children:N})]}),(0,o.jsx)(eZ.h,{data:m,isOpen:!!m,onClose:_,mainPageUrl:j.u.IPOTEKA,offerType:E.n.LEAD})]})});e2.displayName="MortgagesList";var e4=n(51469),e3=n(71276),e6=n(44215),e8=n(89519),e5=n(79380),e9=n.n(e5);function e7(e){var t,n;let{offer:l,journal:a,questions:r,description:i,banks:s,refererTag:c,offers:d,offersFinuslugi:p}=e,y=(0,ev.S0)(),{region:x,town:N}=(0,e$.T)(),k=s.find(e=>+e.id===l.bank_id),C=(null==r?void 0:r.map(e=>({title:e.title,text:e.text.map(e=>e.data.html).join(""),plainText:e.text.map(e=>(0,h.MK)(e.data.html)).join("").trim()})))||[],A="Ипотека \xab".concat(l.title,"\xbb от ").concat(null!==(t=null==k?void 0:k.name_r)&&void 0!==t?t:""),w=(()=>{let e=(null==N?void 0:N.name_p)||(null==x?void 0:x.name_p)?" в ".concat((null==N?void 0:N.name_p)||(null==x?void 0:x.name_p)):"",t="".concat((null==x?void 0:x.url)?"/reg_".concat(null==x?void 0:x.url):"").concat((null==N?void 0:N.url)?"/".concat(null==N?void 0:N.url):""),n=[{name:"Ипотеки".concat(e),url:"/".concat(j.u.IPOTEKA).concat(t)}];return c&&n.push({name:"".concat(c.name).concat(e),url:"/".concat(j.u.IPOTEKA,"/teg_").concat(c.url).concat(t)}),n})();return(0,o.jsxs)("main",{className:e9().page,children:[(0,o.jsx)(g.N,{productId:String(l.id),title:A,description:i}),(0,o.jsx)(e3.o,{}),(0,o.jsx)(e4.g,{questions:C}),(0,o.jsx)("div",{className:e9().navigationWrapper,children:(0,o.jsx)(u.W2,{children:(0,o.jsx)(u.Oo,{path:w,current:"".concat(null!==(n=null==k?void 0:k.name)&&void 0!==n?n:l.bank_name," Ипотека ").concat(l.title)})})}),(0,o.jsx)(ez,{bank:k,data:l,isMobile:y}),(0,o.jsx)(u.W2,{className:e9().about,children:(0,o.jsx)(P,{data:l,bank:k,offerType:E.n.LEAD,pageUrl:j.u.IPOTEKA})}),(0,o.jsx)(B,{isMobile:y,url:l.online_application.url}),void 0!==k&&(0,o.jsx)(e2,{newContainer:!0,bank:k,banks:s,currentCardId:l.id,mortgagesList:d,mortgagesFinuslugiList:p}),a&&(0,o.jsx)(u.W2,{children:(0,o.jsx)(f.S,{posts:a.posts,categories:a.ctgs,pageUrl:j.u.IPOTEKA})}),(0,o.jsxs)("div",{className:e9().supportSection,children:[(0,o.jsx)(e8.O,{newContainer:!0,idSupport:b.Je,hasDarkCardBackGround:!0,Image:e=>(0,o.jsx)(m(),{...e,width:555,height:344,src:v.Z,alt:"фоновое изображение"}),dataLayerPush:eq.l,eventEmitter:()=>window.supportWidget.craftTalk.open()}),(0,o.jsx)(e6.B,{isAllExpanded:!0,newContainer:!0,faqBlockTitle:"",Link:e=>(0,o.jsx)(_(),{...e}),dataLayerPush:eq.l,questions:C,eventCategory:"ipoteki_support_block",href:"".concat((0,eX.ZR)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про ипотеку"})]})]})}n(96202);var te=n(37171);function tt(e){let{layout:t,mortgage:n,journal:l,questions:a,description:r,banks:i,offers:s,offersFinuslugi:c}=e;return(0,o.jsx)(te.A,{data:t,children:(0,o.jsx)(e7,{offer:n,journal:l,questions:a,description:r,banks:i,refererTag:null,offers:s,offersFinuslugi:c})})}n(89945),n(60007);let tn=e=>(0,c.D)(e).then(e=>{let{data:t,error:n}=e;return n?Promise.reject(n):t}),tl=e=>Object.entries(e).map(e=>{let[t,n]=e;return"".concat(t,"=").concat(encodeURIComponent(n))}).join("&"),ta=e=>{var t,n,l,a,o;let r={amount:null!==(t=e.amount)&&void 0!==t?t:0};return 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!==(n=({first:"primary",second:"secondary"})[e.market])&&void 0!==n?n:"primary"),void 0!==e.form&&(r.form=null!==(l=({cash:"cash",account:"to_account",third_party_bank_account:"to_custom_account"})[e.form])&&void 0!==l?l:"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])&&void 0!==a?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!==(o=void 0!==e.sort?({rate:"rate",payment:"amount",downpayment:"firstPayment"})[e.sort]:void 0)&&void 0!==o?o:"rate",r.order=e.sortDir,r},to={offers:{list:(e,t,n,l,a,o)=>tn("/money_data/Mortgages.json?".concat(tl({...ta(e),limit:t,page:n}),"&tag=").concat(l).concat(void 0!==a?"&region=".concat(a).concat(void 0!==o?"&town=".concat(o):""):"","&archive=0")).then(e=>{if(!e)return{title:"",subtitle:"",description:"",page:[],count:0,total_count:0};let{title:t,description:n,subtitle:l,mortgages_count:a,mortgages_total_count:o,mortgages:r,mortgages_online:i}=e;return{title:t,subtitle:l,description:n,page:i.concat(r).map(e=>({...e,full_price:(0,F.b)(e.full_price)})),count:a,total_count:o}})}};n(6604);let tr="/ipoteka",ti="DEFAULT",ts="reg_",tc="teg_",tu={RATE:"rate",AMOUNT:"amount",DOWNPAYMENT:"downpayment"};tu.RATE,tu.AMOUNT,tu.DOWNPAYMENT;var td=n(93259),tm=n(83953),tp=n.n(tm);let t_=[{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}];var tv=(0,i.memo)(e=>{let{pageUrl:t}=e,{mainBaseUrl:n}=(0,eX.ZR)(),l=(0,i.useCallback)((e,l)=>{var a;e.stopPropagation();let o=(0,e_.b)(null!==(a=l.title)&&void 0!==a?a:"");(0,eq.l)({event:"data-event",eventAction:l.isLink?"click_link_".concat(o):"click_button_".concat(o),eventCategory:t}),l.isLink?window.open("".concat(n,"/").concat(l.value),"_blank"):window.scrollTo({top:0,behavior:"smooth"})},[n,t]);return(0,o.jsxs)(u.W2,{className:tp().container,children:[(0,o.jsx)("h2",{className:tp().title,children:"Каталог кредитов"}),(0,o.jsx)("div",{className:tp().cardsList,children:t_.map(e=>(0,o.jsxs)("div",{className:tp().card,onClick:t=>l(t,e),children:[(0,o.jsx)(m(),{className:tp().icon,width:158,height:60,alt:"banner-".concat(e.value),src:e.logo}),(0,o.jsx)("p",{className:tp().subTitle,dangerouslySetInnerHTML:{__html:e.title}})]},e.id))})]})}),th=n(94020),tf=n(68203),tg=n(63716),tb=n(77350),ty=n.n(tb),tx=(0,i.memo)(e=>{let{pageUrl:t,posts:n,categories:l}=e,a=!(0,th.V)("xl"),{isDragged:r,isTouched:s,onMouseDown:c,onMouseMove:d,resetState:p}=(0,tf.Q)(),_=(e,n,l)=>{(0,ep.D)({eventCategory:t,eventAction:ep.i.link,eventActionText:l,eventLabel:n,url:e}),window.open(e,"_blank")},{mainBaseUrl:v}=(0,eX.ZR)(),h=e=>()=>((0,ep.D)({eventAction:ep.i.link,eventActionText:(0,e_.b)(e.title),url:"information_".concat(e.url)}),!(r&&s)&&_("".concat(v,"/").concat(e.url),e.id,e.title)),f=(0,i.useMemo)(()=>a?300:336,[a]);return(0,o.jsx)(u.Fp,{width:f,height:a?280:316,spaceBetween:a?16:24,sliderPerView:a?1:4,hideNavigationControl:a,overflowVisible:a,classSliderWrapper:ty().sliderWrapper,classNavigationLeftButton:ty().controlLeft,classNavigationRightButton:ty().controlRight,children:n.map(e=>{let t=null==l?void 0:l.find(t=>t.id===e.ctg);return(0,o.jsxs)("div",{className:ty().bannerCard,onMouseDown:c,onMouseMove:d,onMouseLeave:p,onMouseUp:p,onMouseUpCapture:h(e),children:[e.img&&(0,o.jsx)("div",{className:ty().cardHead,children:(0,o.jsx)(m(),{unoptimized:!0,className:ty().image,width:f,height:a?140:160,alt:"иконка",src:"".concat(v,"/img/posts/small/").concat(e.img.file)})}),(0,o.jsxs)("div",{className:ty().cardBody,children:[t&&(0,o.jsx)("div",{className:ty().categories,children:(0,o.jsx)("div",{className:ty().category,children:t.name},t.id)}),(0,o.jsx)("p",{className:ty().text,children:e.title}),e.publ_date&&(0,o.jsx)("p",{className:ty().publ_date,children:(0,tg.p)(e.publ_date)})]})]},e.id)})})}),tj=n(42316),tN=n.n(tj),tk=e=>{let{posts:t,categories:n,pageUrl:l}=e,{mainBaseUrl:a}=(0,eX.ZR)();return t.length?(0,o.jsx)("section",{className:tN().section,children:(0,o.jsxs)(u.W2,{children:[(0,o.jsx)("h2",{className:tN().title,children:"Журнал Финуслуги"}),(0,o.jsx)("div",{className:tN().sliderContainer,children:(0,o.jsx)(tx,{posts:t,categories:n,pageUrl:l})}),(0,o.jsx)(eW.j,{offPadding:!0,text:"Смотреть все новости",href:"".concat(a,"/navigator/kredity"),mainPageUrl:l,iconColor:"white"})]})}):null},tC=n(93890),tA=n(91500),tw=n(81923),tT=n.n(tw);let tM=(e,t)=>{let n="teg_".concat(e.url_redirect||e.url);if(!t)return"".concat(n);let l=(Array.isArray(t)?t:[t]).filter(e=>!e.includes(tc));return"".concat([n,...l].join("/"))},tP=e=>{let{posts:t,postsCategories:n,regions:l,tags:a,questionsData:r,currentTag:i,region:s,town:c}=e,{query:u}=(0,eM.useRouter)(),d=function(e,t,n,l,a,r){let i=e.map(e=>({title:(0,td.Q)(e.title),text:(0,o.jsx)(h.Ln,{data:(0,td.W)(e).content})}));i.push(...(0,tA.a)(j.u.IPOTEKA,n,l,a,r,{nominativeCase:"Ипотека",genitiveCase:"ипотек"}));let s=t.reduce((e,t)=>{if(!1===t.url_redirect){let n=(0,tC.q9)(t.url,t.name);e.push(n)}return e},[]);return i.push({title:"Виды ипотек",text:(0,o.jsx)(tC.oP,{children:s})}),i}(r,a.reduce((e,t)=>(t.url_redirect||e.push({...t,url:tM(t,u.segments)}),e),[]),l,i,s,c);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:tT().faq_container,children:(0,o.jsx)(e6.B,{isAllExpanded:!0,newContainer:!0,Link:e=>(0,o.jsx)(_(),{...e}),dataLayerPush:eq.l,questions:d,eventCategory:"mortgages_support_block",href:"".concat((0,eX.ZR)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про ипотеку"})}),(0,o.jsx)(tk,{pageUrl:tr,posts:t,categories:n}),(0,o.jsx)("div",{className:tT().supportWrapper,children:(0,o.jsx)(e8.O,{newContainer:!0,idSupport:b.Je,hasDarkCardBackGround:!0,Image:e=>(0,o.jsx)(m(),{...e,width:555,height:344,src:v.Z,alt:"Фоновое изображение"}),dataLayerPush:eq.l,eventEmitter:()=>window.supportWidget.craftTalk.open()})}),(0,o.jsx)(tv,{pageUrl:tr})]})};var tS=n(65618),tL=n(38421),tD=n.n(tL);function tE(e){let{chips:t,onChipClick:n,lastInFirstRowChipIndex:l,isMobile:a,isFirstRow:r,useLinkChips:i}=e,{asPath:s}=(0,eM.useRouter)(),{mainBaseUrl:c}=(0,eX.ZR)(),u="".concat(c).concat(s),d=(e,t)=>{let{value:i,label:s,color:c}=e;return(0,o.jsx)("div",{className:(0,I.Z)(tD().chip,tD()[c],{[tD().transparentChip]:r&&t>l},{[tD().hiddenChip]:!r&&a&&t<=l}),onClick:()=>n(i),children:s},i)};return(0,o.jsx)(o.Fragment,{children:t.map(i?(e,t)=>{let n=e.value,l=new URL(u);return l.searchParams.delete("property_type"),l.searchParams.append("property_type",e.value),(0,o.jsx)(_(),{className:tD().link,href:l.toString(),onClick:e=>e.preventDefault(),children:d(e,t)},n)}:d)})}let tO=(e,t)=>{let[n,l]=(0,i.useState)(e),[a,o]=(0,i.useState)(e),r=(0,i.useRef)(null),s=(0,i.useRef)(null);return(0,i.useEffect)(()=>{let e=r.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,a=0,r=0,i=Array.from(n.target.children);for(let n=0;n<i.length;n++)if((a+=i[n].offsetWidth+12)<=e&&o(n),a<=(t?2*e:e))r=n;else{l(r);break}}});return n.observe(e),()=>{n.unobserve(e)}},[t,n,a]),[a,n,r,s]};var tR=n(65607),tB=n.n(tR);function tI(){return(tI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}var tF=function(e){return i.createElement("svg",tI({xmlns:"http://www.w3.org/2000/svg",width:12,height:6,fill:"none",viewBox:"0 0 12 6"},e),l||(l=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"})))};let tz=e=>{let{onChipClick:t,chips:n,className:l}=e,[a,r]=(0,i.useState)(!1),s=!(0,th.V)("sm"),c=a?"Скрыть":"Ещё",[u,d,m,p]=tO(n.length,s);return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{ref:m,className:(0,I.Z)(tB().row,l,{[tB().open]:a}),children:[(0,o.jsx)(tE,{chips:n,onChipClick:t,lastInFirstRowChipIndex:u,isMobile:!1,useLinkChips:!0}),d<n.length-1&&(0,o.jsxs)("div",{ref:p,className:(0,I.Z)(tB().toggle,{[tB().open]:a}),onClick:()=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)(c)}),r(e=>!e)},children:[(0,o.jsx)(tF,{})," ",c]})]})})};var tW=n(46588),tZ=n.n(tW);let tU=e=>{let{count:t,children:n,addon:l,chips:a,header:r,isLoading:i,onChipClick:s,onParamsClick:c,onShowClick:d,useLinkChips:m}=e,p=(0,o.jsx)(tz,{chips:a,onChipClick:s,useLinkChips:m});return(0,o.jsxs)("div",{className:tZ().wrap,children:[r,(0,o.jsxs)("div",{className:tZ().top_row,children:[(0,o.jsx)("div",{className:tZ().top_row_content,children:n}),(0,o.jsxs)("div",{className:tZ().top_row_buttons,children:[(0,o.jsx)(u.zx,{size:"s",variant:"secondary",label:"Все параметры",pending:i,disabled:i,onClick:c,iconLeft:(0,o.jsx)(u.ax,{name:"agents:filter"}),className:tZ().params_button}),(0,o.jsx)(u.zx,{size:"s",onClick:d,className:tZ().show_button,pending:i,disabled:i,label:"Показать".concat(t?" ".concat(t):"")})]}),(0,o.jsx)("div",{className:tZ().chips_row,children:p}),l&&(0,o.jsx)("div",{className:tZ().addon,children:l})]})]})};tU.displayName="MainFilter";var tq=n(40374),tV=n(86992);let tH=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}],tK=[{value:"not_required",label:"Не требуется"},{value:"deposit",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"not_required_and_guarantee",label:"Залог и поручительство"}],tY=[{value:"cash",label:"Наличными"},{value:"account",label:"На счет"},{value:"third_party_bank_account",label:"На счет в стороннем банке"}],tG=[{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:"Другое"}],tJ=[{value:"first",label:"Первичный"},{value:"second",label:"Вторичный"}],tQ=[{label:"По ставке",value:"rate",shortLabel:"Ставка"},{label:"По взносу",value:"downpayment",shortLabel:"Взнос"},{label:"По платежу",value:"payment",shortLabel:"Платеж"}],tX=[{label:"Семейная ипотека",value:"family"},{label:"Дальневосточная ипотека",value:"far_east"},{label:"Материнский капитал",value:"maternal_capital"}];var t$=n(86986),t0=n(49215),t1=n(31531),t2=n(57167),t4=n.n(t2);let t3="Сбросить параметры",t6=e=>{var t,n,l,a;let{visible:r,filter:s,offersCount:c,fieldRefs:d,activeField:m,banksOptions:p,onHide:_,onChange:v,onDrop:h,onShow:f}=e,g=(0,i.useMemo)(()=>"Показать ".concat(c>0?c:""),[c]),b=(0,i.useCallback)(()=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)(t3)}),h()},[h]),y=(0,i.useCallback)(()=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)(g)}),f()},[f,g]),x="banks"===m;(0,i.useEffect)(()=>{var e;let t=m?null===(e=d[m])||void 0===e?void 0:e.current:void 0;t&&!x&&t.focus()},[m,x,d]);let j=(0,o.jsxs)("div",{className:t4().footer,children:[(0,o.jsx)(u.zx,{variant:"secondary",onClick:b,children:t3}),(0,o.jsx)(u.zx,{className:t4().submit,onClick:y,children:g})]});return(0,o.jsxs)(tq.N,{visible:r,onHide:_,footer:j,children:[(0,o.jsx)("div",{className:t4().heading,children:"Все параметры"}),(0,o.jsxs)("div",{className:t4().form,children:[(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(tV.P,{size:"s",label:"Сумма кредита",value:null!==(t=s.amount)&&void 0!==t?t:null,className:t4().field,innerRef:d.amount,onChange:e=>v("amount",null!=e?e:void 0,"Сумма")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(tV.P,{size:"s",label:"Ежемесячный платеж до",value:null!==(n=s.payment)&&void 0!==n?n:null,className:t4().field,innerRef:d.payment,onChange:e=>v("payment",null!=e?e:void 0,"Ежемесячный платеж до")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(tV.P,{size:"s",label:"Первый взнос",value:null!==(l=s.downpayment)&&void 0!==l?l:null,className:t4().field,onChange:e=>v("downpayment",null!=e?e:void 0,"Первый взнос")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(tV.P,{size:"s",label:"Срок",value:null!==(a=s.term)&&void 0!==a?a:null,className:t4().field,innerRef:d.term,onChange:e=>v("term",null!=e?e:void 0,"Срок")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(t1.P,{className:(0,I.Z)(t4().field,t4().select_fix),label:"Вид недвижимости",options:tG,value:s.property_type,onChange:e=>v("property_type",e,"Вид недвижимости")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(t1.P,{className:(0,I.Z)(t4().field,t4().select_fix),label:"Рынок недвижимости",options:tJ,value:s.market,onChange:e=>v("market",e,"Рынок недвижимости")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(t1.P,{className:(0,I.Z)(t4().field,t4().select_fix),label:"Форма выдачи",options:tY,value:s.form,onChange:e=>v("form",e,"Форма выдачи")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(t1.P,{className:(0,I.Z)(t4().field,t4().select_fix),label:"Подтверждение дохода",options:tH,value:s.proof,onChange:e=>v("proof",e,"Подтверждение дохода")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(t0.i,{className:(0,I.Z)(t4().field,t4().select_fix),label:"Банки",options:p,values:s.banks,onChange:e=>v("banks",e,"Банки"),search:!0})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap,t4().half),children:(0,o.jsx)(t1.P,{className:(0,I.Z)(t4().field,t4().select_fix),label:"Обеспечение",options:tK,value:s.provision,onChange:e=>v("provision",e,"Обеспечение")})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap),children:(0,o.jsxs)("div",{className:t4().sort,children:[(0,o.jsx)("h3",{className:t4().sort_title,children:"Дополнительно"}),tX.map((e,t)=>{var n;return(0,o.jsx)("div",{className:t4().fieldWrapper,children:(0,o.jsx)(u.XZ,{className:t4().checkboxField,value:null===(n=s.flags)||void 0===n?void 0:n.includes(e.value),label:e.label,onChange:()=>{var t;return v("flags",(0,t$.ZN)(null!==(t=s.flags)&&void 0!==t?t:[],e.value),"Дополнительно")}})},t)})]})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap),children:(0,o.jsx)(u.DZ,{className:t4().separator})}),(0,o.jsx)("div",{className:(0,I.Z)(t4().wrap),children:(0,o.jsxs)("div",{className:t4().sort,children:[(0,o.jsx)("h3",{className:t4().sort_title,children:"Сортировка"}),tQ.map((e,t)=>(0,o.jsx)("div",{className:t4().sort_wrap,children:(0,o.jsx)(u.Y8,{name:"radio",value:s.sort,label:e.label,checked:s.sort===e.value,className:t4().checkboxField,onChange:()=>v("sort",e.value,"Сортировка")})},t))]})})]})]})};var t8=n(91646),t5=n(45117),t9=n(23259),t7=n(30942),ne=n(12271),nt=n.n(ne),nn=n(41696),nl=n.n(nn);function na(){return(0,o.jsx)("iframe",{className:nl().widget,src:"https://realty.ya.ru/widgets/back-call-request"})}var no=n(21308),nr=n(94370),ni=n.n(nr);let ns=(e,t,n,l,a)=>{let o='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(e,'"}'),r='{"@type":"ListItem","position":2,"name":"Ипотека'.concat(l,'","item":"').concat(e,"/\n      ").concat(tr).concat(a,'\n      "}'),i=t?',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(n).concat(l,'","item":"').concat(e,"/").concat(tr).concat(t?"/".concat(tc).concat(t.url):"").concat(a,'"}'):"";return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(o),",").concat(r).concat(i,"]}")},nc=e=>{let{currentTag:t,subtitle:n,className:l}=e,{handleToggleModal:a}=(0,r.ar)(),s=(0,t9.I)(),c=(0,ev.S0)(),d=(0,t7.U)(),m=t?t.name:"Ипотека",{region:p,town:_}=(0,e$.T)(),v=(null==_?void 0:_.name_p)||(null==p?void 0:p.name_p),h=v?" в ".concat(v):"",f="".concat(p?"/".concat(ts).concat(p.url):"").concat(_?"/".concat(_.url):""),g=t?[{name:"Ипотека".concat(h),url:"".concat(tr).concat(f)}]:[],{mainBaseUrl:b,isYandexRealty:y}=(0,eX.ZR)(),x=ns(b,t,m,h,f),j=(0,i.useCallback)(()=>{(0,ep.D)({eventAction:ep.i.link,eventActionText:(0,e_.b)("Главная"),url:b})},[b]),N=(0,i.useCallback)(()=>{a(!0),(0,ep.D)({eventAction:ep.i.popup,eventActionText:"".concat((0,e_.b)("регион"),"_").concat(v)})},[v,a]);return(0,o.jsxs)("div",{className:(0,I.Z)(l,ni().wrap,"bg-".concat(d)),children:[(0,o.jsx)(u.W2,{children:(0,o.jsxs)("div",{className:(0,I.Z)(ni().breadcrumbs),children:[(0,o.jsx)(u.Oo,{path:g,current:"".concat(m).concat(t?"":h),isMobile:c,onClick:j}),(0,o.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:x}})]})}),y&&(0,o.jsx)(u.W2,{children:(0,o.jsx)(na,{})}),(0,o.jsx)(u.W2,{children:(0,o.jsxs)("div",{className:ni().content,children:[(0,o.jsxs)("div",{className:ni().text,children:[(0,o.jsxs)("h1",{className:ni().title,children:[m," ",v&&(0,o.jsxs)(o.Fragment,{children:["в"," ",(0,o.jsx)("span",{onClick:N,className:ni().location,children:v})]})]}),(0,o.jsx)(no.N,{tag:"p",className:nt().subtitle,children:n})]}),(0,o.jsx)("div",{className:ni().banner,children:(0,o.jsx)(t8.Z,{config:s,params:t5.P3})})]})})]})};var nu=n(30292),nd=n(97318),nm=n(12261);function np(){let{query:e,push:t}=(0,eM.useRouter)(),{amount:n,payment:l,downpayment:a,term:o,property_type:r,market:s,form:c,proof:u,banks:d,provision:m,flags:p,sort:_,sortDir:v,...h}=e,f=(0,i.useMemo)(()=>(function(e){let{amount:t,payment:n,downpayment:l,term:a,property_type:o,market:r,form:i,proof:s,banks:c,provision:u,flags:d,sort:m,sortDir:p}=e,_={};return"string"==typeof t&&(_.amount=Number(t)),"string"==typeof n&&(_.payment=Number(n)),"string"==typeof l&&(_.downpayment=Number(l)),"string"==typeof a&&(_.term=Number(a)),"string"==typeof o&&(_.property_type=o),"string"==typeof r&&(_.market=r),"string"==typeof i&&(_.form=i),"string"==typeof s&&(_.proof=s),"string"==typeof c&&(_.banks=(0,nm.SP)(c)),"string"==typeof u&&(_.provision=u),"string"==typeof d&&(_.flags=(0,nm.SP)(d)),"string"==typeof m?_.sort=m:_.sort="rate","string"==typeof p?_.sortDir=p:_.sortDir="asc",_})({amount:n,payment:l,downpayment:a,term:o,property_type:r,market:s,form:c,proof:u,banks:d,provision:m,flags:p,sort:_,sortDir:v}),[n,l,a,o,r,s,c,u,d,m,p,_,v]),g=(0,i.useRef)(h),b=(0,i.useRef)(f),y=(0,i.useRef)(t);return g.current=h,b.current=f,y.current=t,{filter:f,setFilter:(0,i.useCallback)(e=>{var t,n,l,a,o,r,i,s,c;if((t=b.current).amount===e.amount&&t.payment===e.payment&&t.downpayment===e.downpayment&&t.term===e.term&&t.property_type===e.property_type&&t.market===e.market&&t.form===e.form&&t.proof===e.proof&&(null===(n=t.banks)||void 0===n?void 0:n.length)===(null===(l=e.banks)||void 0===l?void 0:l.length)&&(null===(a=t.banks)||void 0===a?void 0:a.slice().sort().toString())===(null===(o=e.banks)||void 0===o?void 0:o.slice().sort().toString())&&t.provision===e.provision&&(null===(r=t.flags)||void 0===r?void 0:r.length)===(null===(i=e.flags)||void 0===i?void 0:i.length)&&(null===(s=t.flags)||void 0===s?void 0:s.slice().sort().toString())===(null===(c=e.flags)||void 0===c?void 0:c.slice().sort().toString())&&t.sort===e.sort&&t.sortDir===e.sortDir)return!1;let u={...function(e){let{amount:t,payment:n,downpayment:l,term:a,property_type:o,market:r,form:i,proof:s,banks:c,provision:u,flags:d,sort:m,sortDir:p}=e,_={};return void 0!==t&&(_.amount=String(t)),void 0!==n&&(_.payment=String(n)),void 0!==l&&(_.downpayment=String(l)),void 0!==a&&(_.term=String(a)),void 0!==o&&(_.property_type=o),void 0!==r&&(_.market=r),void 0!==i&&(_.form=i),void 0!==s&&(_.proof=s),void 0!==c&&(_.banks=(0,nm.ln)(c)),void 0!==u&&(_.provision=u),void 0!==d&&(_.flags=(0,nm.ln)(d)),void 0!==m&&(_.sort=m),void 0!==p&&(_.sortDir=p),_}(e),...g.current};return y.current({query:u},void 0,{shallow:!0}),!0},[])}}let n_=()=>{let[e,t]=(0,i.useState)(null);return[e,(0,i.useCallback)(e=>{t(e)},[])]};var nv=n(52798);let{useDebugValue:nh}=i,{useSyncExternalStoreWithSelector:nf}=nv,ng=e=>e,nb=e=>{let t;let n=new Set,l=(e,l)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=l?l:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,o={setState:l,getState:a,getInitialState:()=>r,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()}},r=t=e(l,a,o);return o},ny=e=>e?nb(e):nb,nx=null,nj=e=>(function(e,t=ng,n){let l=nf(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,void 0);return nh(l),l})(nx=null!=nx?nx:ny(t=>{var n,l,a,o,r,i,s,c;return{subtitle:null!==(r=null===(n=e.mortgagesData)||void 0===n?void 0:n.subtitle)&&void 0!==r?r:"",offers:null!==(i=null===(l=e.mortgagesData)||void 0===l?void 0:l.page)&&void 0!==i?i:[],loading:!1,count:null!==(s=null===(a=e.mortgagesData)||void 0===a?void 0:a.count)&&void 0!==s?s:0,total_count:null!==(c=null===(o=e.mortgagesData)||void 0===o?void 0:o.total_count)&&void 0!==c?c:0,delayTimer:null,reload:async function(e,n,l,a,o){t({loading:!0});let{subtitle:r,page:i,count:s,total_count:c}=await to.offers.list(e,n,1,o,l,a),u=null==nx?void 0:nx.getState().delayTimer;u&&clearTimeout(u),null==nx||nx.getState().delayUpdate(()=>{t({subtitle:r}),t({offers:i}),t({count:s}),t({total_count:c}),t({loading:!1})})},delayUpdate:function(e){let n=null==nx?void 0:nx.getState().delayTimer;n&&clearTimeout(n),t({delayTimer:setTimeout(e,1e3)})},load:async function(n,l,a,o,r){var i,s;t({loading:!0});let{subtitle:c,page:u,count:d,total_count:m}=await to.offers.list(n,l,a,null!==(s=null===(i=e.currentTag)||void 0===i?void 0:i.url)&&void 0!==s?s:ti,o,r);null==nx||nx.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 nN=n(75340),nk=n(9469),nC=n.n(nk);let nA=(0,tS.b)(),nw=e=>{var t,n;let{ssr:l,activeFilterModalField:a,changeActiveFilterModalField:r}=e,{scrollSmooth:c}=(0,nN.vO)(),{filter:d,setFilter:m}=np(),{visible:p,show:_,hide:v}=(0,nd.e)(),{subtitle:h,count:f}=nj({filter:d,mortgagesData:l.mortgagesData,currentTag:l.currentTag}),g=(0,i.useMemo)(()=>tG.map(e=>{let{value:t,label:n}=e;return{value:t,label:n,color:d.property_type===t?"black":"default"}}),[d.property_type]),y=(0,i.useCallback)(e=>{var t,n;(0,ep.D)({eventAction:ep.i.filterCatalog,eventCategory:ep.i.filterCatalog,eventLabel:"property_type",eventValue:(0,e_.b)(null!==(n=null===(t=tG.find(t=>t.value===e))||void 0===t?void 0:t.label)&&void 0!==n?n:"")}),m({...d,property_type:e===d.property_type?"":e})},[d,m]),x=(0,i.useCallback)(()=>m({}),[m]),[j]=(0,nu.G)(()=>(0,s.$)().then(e=>null!=e?e:[]),[]),N=(0,i.useMemo)(()=>(null!=j?j:[]).map(e=>({value:e.id,label:e.name})),[j]),k={amount:(0,i.useRef)(null),payment:(0,i.useRef)(null),term:(0,i.useRef)(null)},C=()=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)("показать")}),c({offset:-90})},A=(0,i.useCallback)(()=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)("все параметры")}),_()},[_]),w=(e,t,n)=>{nA(()=>(0,ep.D)({eventAction:ep.i.filterCatalog,eventCategory:ep.i.filterCatalog,eventLabel:(0,e_.b)(n),eventValue:"string"==typeof t?t:JSON.stringify(t)})),m({...d,[e]:t})};return(0,o.jsxs)("div",{className:nC().wrap,children:[(0,o.jsx)(nc,{subtitle:h,currentTag:l.currentTag}),(0,o.jsxs)(u.W2,{id:b.of,children:[(0,o.jsxs)(tU,{count:f,onChipClick:y,chips:g,onParamsClick:A,onShowClick:C,children:[(0,o.jsx)(tV.P,{size:"s",label:"Сумма кредита",value:null!==(t=d.amount)&&void 0!==t?t:null,className:nC().field,onChange:e=>w("amount",null!=e?e:void 0,"Сумма")}),(0,o.jsx)(tV.P,{size:"s",label:"Ежемесячный платеж до",value:null!==(n=d.payment)&&void 0!==n?n:null,className:nC().field,onChange:e=>w("payment",null!=e?e:void 0,"Ежемесячный платеж до")})]}),(0,o.jsx)(t6,{offersCount:f,visible:p,filter:d,activeField:a,fieldRefs:k,banksOptions:N,onChange:w,onHide:()=>{v(),r(null)},onDrop:x,onShow:()=>{v(),C()}})]})]})};var nT=n(65848),nM=n(423),nP=n(64101),nS=n(71147),nL=n(23937),nD=n(48743),nE=n(28052),nO=n(92047),nR=n.n(nO);let nB=e=>{let t={sectionTitle:"Условия ипотеки",body:[{label:"Сумма кредита",value:(0,eO.qO)(Number(e.amount.from),Number(e.amount.to))}]},n=e.full_price;if(n){let l=e.interest_rate;t.body.push({label:"Полная стоимость кредита",value:(0,eO.sz)(Number(n.from),Number(n.to),{minimumFractionDigits:3})},{label:"Процентная ставка",value:(0,o.jsxs)("div",{children:[(0,eO.sz)(Number(l.from),Number(l.to)),l.comment&&(0,o.jsx)("div",{className:nR().comment,dangerouslySetInnerHTML:{__html:l.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,nE.m)(e.loan)}),(e.period.from||e.period.to)&&t.body.push({label:"Срок погашения кредита",value:"".concat((0,eO.z1)(Number(e.period.from),Number(e.period.to))," мес.")}),(e.property_type.comment||e.property_type.text)&&t.body.push({label:"Вид недвижимости",value:(0,nE.m)(e.property_type)}),(e.real_estate_market.comment||e.real_estate_market.text)&&t.body.push({label:"Рынок недвижимости",value:(0,nE.m)(e.real_estate_market)}),(e.insurance.comment||e.insurance.text)&&t.body.push({label:"Страхование",value:(0,nE.m)(e.insurance)}),[t,{sectionTitle:"О банке",body:[{label:"Сайт",value:e.site.title}]}]},nI=e=>{let{isOpen:t,url:n,data:l,onAllConditionsClick:a,onClose:r}=e,s=(0,i.useMemo)(()=>l?nB(l):[],[l]);return void 0===l||void 0===n?null:(0,o.jsx)(nD.$,{isOpen:t,cancelButton:{title:"Все условия по ипотеке",onClick:a},submitButton:{title:"Оформить онлайн",url:n},onClose:r,bankName:l.bankName,bankLogo:l.logo,dataPoints:s,pageUrl:j.u.IPOTEKA,offerType:E.n.LEAD,offerUpdateData:l.m_updated_at})};function nF(){return(nF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)({}).hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e}).apply(null,arguments)}var nz=function(e){return i.createElement("svg",nF({xmlns:"http://www.w3.org/2000/svg",width:17,height:17,fill:"none",viewBox:"0 0 17 17"},e),a||(a=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"})))},nW=n(8760),nZ=n.n(nW);let nU="DetailModalText",nq=e=>{var t,n;let{data:l,isMobile:a=!1,onClose:r,mainPageUrl:s,onFlag:c}=e,[d,p]=(0,i.useState)(null),v=null!==(t=null==d?void 0:d.link)&&void 0!==t?t:"",h=null!==(n=null==v?void 0:v.includes("#"))&&void 0!==n&&n,f=(0,nm.sD)(v),g=()=>{if(r(),d&&(0,eq.l)({event:"data-event",eventAction:"click_button_".concat((0,e_.b)(d.modalButtonText)),eventCategory:s}),(null==d?void 0:d.filterFlags)&&c&&c(d.filterFlags),h){let e=v.split("#")[1];(0,u.ld)(e,{position:"top"})}v||(0,u.ld)(b.Tm,{offset:a?0:-100,position:"top"})};return(0,i.useEffect)(()=>{l&&p(l)},[l]),(0,i.useEffect)(()=>{let e=document.querySelectorAll("#".concat(nU," > a")),t=e=>{e.target instanceof HTMLAnchorElement&&(0,ep.D)({eventAction:ep.i.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,o.jsxs)("div",{className:nZ().content,children:[(0,o.jsx)("div",{className:nZ().logo,children:(null==d?void 0:d.logo)&&(0,o.jsx)(m(),{width:a?344:494,height:a?128:180,src:null==d?void 0:d.logo,alt:"logo"})}),(0,o.jsxs)("div",{className:nZ().body,children:[(0,o.jsx)("h3",{className:nZ().title,children:null==d?void 0:d.title}),(0,o.jsx)("p",{id:nU,className:nZ().text,dangerouslySetInnerHTML:{__html:d?d.modalText:""}})]}),f||h?(0,o.jsx)(u.zx,{as:"a",target:"_blank",href:h?void 0:v,size:"big",onClick:g,children:null==d?void 0:d.modalButtonText}):(0,o.jsx)(_(),{href:v,children:(0,o.jsx)(u.zx,{size:"big",onClick:g,children:null==d?void 0:d.modalButtonText})})]})},nV=e=>{let{data:t,isOpen:n,onClose:l,mainPageUrl:a,onFlag:r}=e,i=(0,ev.S0)();return(0,o.jsx)(ee.h,{children:i?(0,o.jsx)(u.jr,{className:nZ().mobilePopup,contentClassName:nZ().container,isOpen:n,onClose:l,children:(0,o.jsx)(nq,{data:t,isMobile:!0,onClose:l,mainPageUrl:a,onFlag:r})}):(0,o.jsx)(u.dy,{contentClassName:nZ().container,isOpen:n,onClose:l,children:(0,o.jsx)(nq,{data:t,onClose:l,mainPageUrl:a,onFlag:r})})})};var nH={src:"/kredity/assets/_next/static/media/life-situations-1.a2fc9534.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAANlBMVEXOsISxuJvSvIjSSUbn3LXYr3/QjW316q/p1Ji+opPZvZaoPEDx7cvLaF7GTU66S1Gxc2fr3p/BBhVOAAAACnRSTlP+/////////Pz4xwPQRQAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBnYmDlEGRn4OIR4GNmY2RhYGDh5edmZeAEAAlyALLYLvsDAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},nK={src:"/kredity/assets/_next/static/media/life-situations-2.17787fd4.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAOVBMVEWuglmBRS/fum+9jljhz4SvVDznzpDy45vVwIHNp2jv14aVQTHx14eydVTHfVuoaULowHPfxYm2mnCYFRyUAAAACnRSTlP9/////v7//Pr4jFI21QAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4OBhE2Rn4WJnEGLiZ+DjFWBjYGBmZORmZeIEAAtCALyiN1LOAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},nY={src:"/kredity/assets/_next/static/media/life-situations-3.1396f824.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAOVBMVEXWxXPMsInKh3LMPiqul1zRwZLd26bt5Jvf7LC5tWna4LDVvnDe1Z/Zx5OhPDnv2qG3LS5wOTXUsWgOjSmWAAAACnRSTlP9/////v///fz45qrS1AAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxjYGfnYWXl4eBg4Odl5BNg4mJjYOAWYhZkYeAEAAsKAMzpr/83AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},nG=n(20676),nJ=n.n(nG),nQ=(0,i.memo)(e=>{let{mainPageUrl:t,onFlag:n,isMobile:l}=e,[a,r]=(0,i.useState)(!1),[s,c]=(0,i.useState)(null),{isDragged:d,isTouched:p,onMouseDown:_,onMouseMove:v,resetState:h}=(0,tf.Q)(),f=(0,i.useMemo)(()=>l?288:348,[l]),g=e=>e.preventDefault,y=(0,i.useCallback)(e=>{c(e),r(!0),(0,ep.D)({eventAction:ep.i.popup,eventActionText:e.title})},[]),x=(0,i.useCallback)(()=>{var e;(0,ep.D)({eventAction:ep.i.popdown,eventActionText:null!==(e=null==s?void 0:s.title)&&void 0!==e?e:""}),c(null),r(!1)},[null==s?void 0:s.title]);return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("section",{className:nJ().section,id:b.VT,children:(0,o.jsxs)(u.W2,{children:[(0,o.jsx)("h2",{className:nJ().title,children:"Как вам помочь?"}),(0,o.jsx)(u.Fp,{isDependsOnWidth:!1,width:f,height:l?208:240,spaceBetween:l?16:32,sliderPerView:l?1:4,hideNavigationControl:!0,overflowVisible:l,infiniteSlider:l,autoPlayTime:5e3,classSlider:nJ().slider,classSliderList:nJ().sliderList,classSlide:nJ().slide,children:(function(){let{mainBaseUrl:e}=(0,eX.iE)();return[{id:1,logo:nH,logoMobile:nH,title:"Льготная ипотека",modalText:"Найдем для вас предложения с пониженной ставкой — например, семейную ипотеку или ипотеку для ИТ-специалистов. Выберите льготную программу и подайте заявку на ипотечный кредит на Финуслугах",modalButtonText:"Выбрать ипотеку",link:"#".concat(b.Tm),filterFlags:["3"]},{id:2,logo:nK,logoMobile:nK,title:"Рефинансирование кредита",modalText:"Хотите снизить ставку или уменьшить ежемесячный платеж по ипотеке? Покажем банки, в которые вы сможете перевести свой ипотечный кредит и получить более комфортные условия",modalButtonText:"Выбрать ипотеку",link:"/ipoteka/teg_refinansirovanie"},{id:3,logo:nY,logoMobile:nY,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(b.Tm)}]})().map(e=>(0,o.jsxs)("div",{className:nJ().card,onMouseDown:_,onMouseMove:v,onMouseLeave:h,onMouseUp:h,onMouseUpCapture:()=>!(d&&p)&&y(e),onTouchStart:g,onTouchMove:g,onTouchEnd:g,children:[(0,o.jsx)("div",{className:nJ().imgWrapper,children:(0,o.jsx)(m(),{width:f,height:128,alt:"banner"+e.id,src:l?e.logoMobile:e.logo})}),(0,o.jsxs)("div",{className:nJ().cardBody,children:[(0,o.jsx)("p",{className:nJ().subTitle,children:e.title}),(0,o.jsx)(u.zx,{shape:"circle-icon",className:nJ().cardButton,iconLeft:(0,o.jsx)(nz,{className:nJ().iconArrow})})]})]},e.id))})]})}),(0,o.jsx)(nV,{mainPageUrl:t,data:s,isOpen:a,onClose:x,onFlag:n})]})}),nX=n(94908),n$=n(45939),n0=n.n(n$);let n1=e=>{let t=[];return 3===e.online_application.type?t.push({text:"Открытие онлайн на Финуслугах",color:"purple"}):1===e.online_application.commercial?t.push({text:"Подача заявки на сайте банка",color:"white"}):t.push({text:"Открытие в банке",color:"white"}),t.push({text:1===e.income_proof.not_required?"Без справок":"Требуется подтверждение дохода",color:"white"}),t},n2=e=>{let{icon:t,offer:n}=e,l=(0,i.useMemo)(()=>{let e=[],t=n.full_price;return t&&e.push({caption:"ПСК",tooltipText:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.",text:(0,F.W)(t)}),e.push({caption:"Сумма",text:(0,eO.dN)({from:Number(n.amount.from),to:Number(n.amount.to)},{currency:"₽"})},{caption:"Первый взнос",text:n.first_payment?"от ".concat(n.first_payment.from,"%"):""}),e},[n.first_payment,n.full_price,n.amount]);return(0,o.jsxs)("div",{className:n0().mortgage_info,children:[(0,o.jsxs)("div",{className:n0().bank_info,children:[(0,o.jsx)("div",{className:n0().icon,children:t}),(0,o.jsx)(nX.S,{caption:n.title,text:n.bank_name,className:(0,I.Z)(n0().group,n0().title_group)})]}),(0,o.jsx)("div",{className:n0().groups,children:l.map((e,t)=>e.text&&(0,o.jsx)(nX.S,{caption:e.caption,text:e.text,tooltipText:e.tooltipText,className:n0().group},t))})]})};var n4=e=>{let{className:t,icon:n,offer:l,onDetails:a,onOpen:r,isMobile:s}=e,c=(0,i.useMemo)(()=>n1(l),[l]),d=(0,i.useCallback)(e=>{e.stopPropagation(),null==a||a()},[a]),m=(0,o.jsx)("div",{className:n0().chips_row,children:c.map(e=>(0,o.jsx)("div",{children:(0,o.jsx)(u.$,{text:e.text,color:e.color,className:n0().chip})},e.text))});return(0,o.jsxs)("div",{className:(0,I.Z)(t,n0().wrap),onClick:r,children:[(0,o.jsxs)("div",{className:n0().top_row,children:[(0,o.jsx)("div",{className:n0().top_row_content,children:(0,o.jsx)(n2,{icon:n,offer:l})}),(0,o.jsxs)("div",{className:n0().top_row_buttons,children:[(0,o.jsx)("div",{className:n0().icon_button,onClick:d,children:(0,o.jsx)(u.ax,{className:n0().icon_detail,name:"finuslugi:detail"})}),s&&m,(0,o.jsx)(u.zx,{className:n0().show_button,size:"xs",label:"Подробнее"})]})]}),!s&&m]})},n3=n(29535),n6=n.n(n3);let n8=e=>{let{className:t,title:n,offers:l,onDetails:a,onOpen:r,isMobile:s}=e,c=(0,i.useCallback)(e=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:"information_".concat(e.bank_url),eventLabel:e.id}),(0,ep.D)({eventAction:ep.i.popup,eventActionText:"information_".concat(e.bank_url),eventLabel:e.id}),a(e.id)},[a]),u=(0,i.useCallback)(e=>{(0,ep.D)({eventAction:ep.i.link,eventActionText:(0,e_.b)(e.title),url:"".concat(tr,"/").concat(e.bank_url)}),r(e)},[r]);return(0,o.jsxs)("div",{className:t,children:[(0,o.jsx)("p",{className:n6().listTitle,children:n}),(0,o.jsx)("div",{className:n6().list,children:l.map(e=>(0,o.jsx)(i.Fragment,{children:(0,o.jsx)(n4,{onDetails:()=>c(e),onOpen:()=>u(e),className:n6().card,icon:(0,o.jsx)(m(),{width:40,height:40,src:e.bank_logo_mob,alt:"logo"}),offer:e,isMobile:s})},e.id))})]})};var n5=n(92941),n9=n.n(n5);let n7=(0,i.memo)(e=>{let{chips:t,sort:n,sortOrder:l,onChangeSort:a,onChangeSortOrder:r,sortOptions:i,onClick:s,inView:c,filterRef:d,className:m,onClickChip:p}=e,_=(0,th.V)("xs");return(0,o.jsx)("div",{ref:d,className:n9().filter,children:(0,o.jsx)(u.p,{className:m,isNewSortRadios:!0,chips:t,isIncreaseSort:"asc"===l,onChangeIncreaseSort:e=>{let t=e?"asc":"desc";r(t),(0,ep.D)({eventAction:ep.i.button,eventActionText:"sort_direction_".concat(t)})},sortTypeItems:i,sortTypeValue:null!=n?n:tu.RATE,onChangeSortType:e=>{var t;a(e),(0,ep.D)({eventAction:ep.i.button,eventActionText:"sort_type_".concat(null===(t=tQ.find(t=>t.value===e))||void 0===t?void 0:t.label)})},onClickParams:s,isMobile:!_,isFixed:c,onClickChip:p})})});n7.displayName="SmallFilter";var le=n(29023),lt=n(88060),ln=n(6207),ll=n.n(ln);let la=e=>[{label:"Сумма кредита: ".concat(e.amount?(0,t$.uf)(e.amount):"от 1"," ₽"),id:"amount"},{label:"Платеж: ".concat(e.payment?"до ".concat((0,t$.uf)(e.payment)," ₽ в мес"):"любой"),id:"payment"},{label:"Срок: ".concat(e.term?"".concat(String(e.term)," мес."):"любой"),id:"term"},{label:"Банки: ".concat(e.banks?String(e.banks.length):"любые"),id:"banks"}],lo=e=>3===e.online_application.type,lr=e=>1===e.online_application.commercial,li=e=>!lo(e)&&!lr(e),ls=e=>{var t,n;let{ssr:l,changeActiveFilterModalField:a}=e,r=(0,nN.lJ)(),{query:s}=(0,eM.useRouter)(),[c,d]=(0,i.useState)(Number(s.page)||1),{filter:m,setFilter:p}=np(),{show:_}=(0,nd.e)(),v=(0,ev.S0)(),[h,f]=(0,i.useState)(!1),g=(0,i.useRef)(null),y=(0,i.useRef)(()=>null),{offers:x,loading:j,reload:N,load:k,clear:C,count:A,total_count:w}=nj({...l,filter:m}),T=null!==(n=null===(t=l.currentTag)||void 0===t?void 0:t.url)&&void 0!==n?n:ti,{region:M,town:P}=(0,e$.T)(),S="".concat(M?"/".concat(ts).concat(M.url):"").concat(P?"/".concat(P.url):""),L=(0,i.useRef)(!0);(0,i.useEffect)(()=>{L.current?L.current=!1:N(m,10,null==M?void 0:M.url,null==P?void 0:P.url,T)},[m,null==M?void 0:M.url,null==P?void 0:P.url,T,N]);let D=(0,i.useRef)(!0);(0,nu.b)(()=>{D.current?D.current=!1:(C(),k(m,10,c,null==M?void 0:M.url,null==P?void 0:P.url))},[m],500);let E=(0,i.useCallback)(()=>{d(e=>{let t=e+1;return k(m,10,t,null==M?void 0:M.url,null==P?void 0:P.url),(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)("показать еще предложения")}),t})},[k,m,null==M?void 0:M.url,null==P?void 0:P.url]),O=la(m),R=(0,i.useMemo)(()=>x.filter(lo),[x]),B=(0,i.useMemo)(()=>x.filter(lr),[x]),F=(0,i.useMemo)(()=>x.filter(li),[x]),z=l.currentTag?l.currentTag.name:"Ипотека",W=(null==P?void 0:P.name_p)||(null==M?void 0:M.name_p),Z=W?" в ".concat(W):"",{mainBaseUrl:U}=(0,eX.ZR)(),q=(0,nL.P)(x),V=(0,i.useMemo)(()=>{var e,t,n,a;if(!q.data)return;let o=l.banks.find(e=>{var t;return(null===(t=q.data)||void 0===t?void 0:t.bank_id)===+e.id});return{...q.data,site:{title:null!==(e=null==o?void 0:o.site.title)&&void 0!==e?e:null,url:null!==(t=null==o?void 0:o.site.url)&&void 0!==t?t:null},bankName:null!==(n=null==o?void 0:o.name)&&void 0!==n?n:q.data.bank_name,logo:null!==(a=null==o?void 0:o.logo_mob)&&void 0!==a?a:""}},[q.data,l.banks]),H=(0,i.useCallback)(()=>{(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)("все параметры")}),_()},[_]),K=e=>1===e.online_application.commercial?e.online_application.url:"".concat(tr,"/").concat(e.url),Y=(0,i.useCallback)(e=>{window.open(K(e))},[]),G=(0,i.useCallback)(()=>{var e,t;(0,ep.D)({eventAction:ep.i.popdown,eventActionText:"information_".concat(null===(e=q.data)||void 0===e?void 0:e.bank_name),eventLabel:null===(t=q.data)||void 0===t?void 0:t.id}),q.hide()},[q]),J=(0,i.useCallback)(()=>{var e,t;(0,ep.D)({eventAction:ep.i.button,eventActionText:(0,e_.b)("Все условия по ипотеке"),eventLabel:null===(e=q.data)||void 0===e?void 0:e.id}),(null==q?void 0:null===(t=q.data)||void 0===t?void 0:t.url)&&window.open("".concat(tr,"/").concat(q.data.url),"_blank")},[q]),Q=q.data?K(q.data):void 0;(0,i.useEffect)(()=>(window.removeEventListener("scroll",y.current),y.current=()=>{if(!g.current)return;let{top:e}=g.current.getBoundingClientRect();f(e<=32)},window.addEventListener("scroll",y.current),()=>window.removeEventListener("scroll",y.current)),[]);let X=(0,i.useCallback)(e=>{p({...m,sort:e})},[m,p]),$=(0,i.useCallback)(e=>{p({...m,sortDir:e})},[m,p]),ee=10*c<A;return(0,o.jsxs)("div",{className:ll().wrap,children:[(0,o.jsx)(nQ,{mainPageUrl:"#",onFlag:e=>{p({...m,flags:e})},isMobile:v}),(0,o.jsxs)("div",{id:b.Tm,className:ll().products_list_container,children:[x&&(0,o.jsxs)("h2",{className:ll().title,children:["Найдено ",A," ",(0,o.jsx)("span",{className:ll().titleHide,children:(0,nS.s)(A)})," ",A===w?"":"из ".concat(w)]}),(0,o.jsx)("div",{className:(0,I.Z)(ll().filter_wrapper,ll().newLayout),children:(0,o.jsx)(n7,{chips:O,sort:m.sort||tu.RATE,sortOrder:m.sortDir||"asc",onChangeSort:X,onChangeSortOrder:$,sortOptions:tQ,onClick:H,filterRef:g,inView:h,onClickChip:e=>{a(e.id),_()}})}),!j&&0===A&&(0,o.jsx)(u.W2,{children:(0,o.jsx)(nP.t,{onChangeParams:_})}),(0,o.jsxs)(u.W2,{as:"section",children:[(0,o.jsx)("div",{ref:r,children:x.length>0&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("div",{className:ll().offers_lists,children:[R.length>0&&(0,o.jsx)(n8,{onOpen:Y,onDetails:q.show,title:"Онлайн-ипотеки от Финуслуг",offers:R,isMobile:v}),B.length>0&&(0,o.jsx)(n8,{onOpen:Y,onDetails:q.show,title:"Предложения на Финуслугах",offers:B,isMobile:v}),F.length>0&&(0,o.jsx)(n8,{onOpen:Y,onDetails:q.show,title:"Предложения рынка кредитов",offers:F,isMobile:v})]}),(0,o.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:(()=>{var e,t,n;let a=1/0,o=0,r=[...R,...B,...F];r.forEach(e=>{let{amount:t}=e;t&&(a=Math.min(a,Number(t.from)),o=Math.max(o,Number(t.to)))});let i=null!==(t=(0,u.zC)(null===(e=r[0])||void 0===e?void 0:e.currency_id).code)&&void 0!==t?t:"RUB",s='"offers":{"@type":"AggregateOffer","url":"'.concat(U).concat(tr).concat(l.currentTag?"/".concat(tc).concat(l.currentTag.url):"").concat(S,'","priceCurrency":"').concat(i,'","lowPrice":"').concat((0,t$.uf)(a!=1/0?a:0),'","highPrice":"').concat((0,t$.uf)(o),'"}');return'{"@context":"https://schema.org","@type":"Product","name":"'.concat(z).concat(Z,'","image":"').concat(U).concat(nM.oQ,'","description":"').concat(null!==(n=l.mortgagesData.description)&&void 0!==n?n:"",'",').concat(s,"}")})()}}),ee&&(0,o.jsx)(lt.f,{page:c,onClick:E})]})}),j&&(0,o.jsx)("div",{className:ll().placeholder,children:[,,,,,].fill(0).map((e,t)=>(0,o.jsx)(nT.O,{},t))}),(0,o.jsx)(le.i,{tag:"p",className:ll().subtitle,children:l.mortgagesData.subtitle})]}),(0,o.jsx)(nI,{data:V,isOpen:q.visible,url:Q,onClose:G,onAllConditionsClick:J})]})]})};n(53850);var lc=n(91886);n(35388);var lu=n(7336),ld=n(67801);function lm(e){var t,n,l,a;let{layout:r,regions:s,tags:c,tag:u,mortgagesData:d,posts:m,questionsData:p,banks:_,expertQuote:v}=e,{region:h,town:f}=(0,e$.T)(),[b,y]=n_(),[x,j]=(0,i.useState)(null!=v?v:void 0),{asPath:N}=(0,eM.useRouter)(),k=null!==(n=null===(t=N.split("/").find(e=>e.includes("teg_")))||void 0===t?void 0:t.slice(4))&&void 0!==n?n:"DEFAULT",C=null!==(l=c.find(e=>e.url===k))&&void 0!==l?l:void 0,A=(0,nm.iN)(N);return(0,lc.r)(()=>{(0,lu.b)(A).then(j)},[A]),(0,o.jsxs)(te.A,{data:r,withLocationConfirm:!0,children:[(0,o.jsx)(g.N,{title:d.title,description:d.description}),(0,o.jsx)(e3.o,{}),(0,o.jsx)(nw,{ssr:{mortgagesData:d,currentRegion:null!==(a=null==h?void 0:h.url)&&void 0!==a?a:"",currentTag:C},activeFilterModalField:b,changeActiveFilterModalField:y}),(0,o.jsx)(ls,{ssr:{mortgagesData:d,currentTag:C,banks:_},changeActiveFilterModalField:y}),void 0!==x&&(0,o.jsx)(ld.c,{quote:x}),(0,o.jsx)(tP,{currentTag:u,region:h,town:f,posts:m,questionsData:p,regions:s,tags:c?c.filter(e=>e.url!==k):[]}),!1]})}n(44735),n(27714);var lp=n(28254),l_=n(80330),lv=!0,lh=(0,i.memo)(function(e){var t,n;return(0,o.jsx)(r.sM,{children:e.isShowcase?(0,o.jsx)(lp.p,{region:null!==(t=e.region)&&void 0!==t?t:void 0,town:null!==(n=e.town)&&void 0!==n?n:void 0,children:(0,o.jsx)(lm,{...e})}):(0,o.jsx)(l_.M,{children:(0,o.jsx)(tt,{...e})})})})},41294:function(e){e.exports={typeDescription:"CreditPaymentDescription_typeDescription__ksshX"}},8760:function(e){e.exports={title:"DetailModal_title__HNdB3",container:"DetailModal_container__5i13N",mobilePopup:"DetailModal_mobilePopup__lTf_k",content:"DetailModal_content__w8zaZ",logo:"DetailModal_logo__fmdnp",body:"DetailModal_body__dsbx7",text:"DetailModal_text__yxQEk"}},6604:function(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"}},10317:function(e){e.exports={logo:"MortgageListItem_logo__jaNvS",placeholderLogo:"MortgageListItem_placeholderLogo__QyaLT"}},45446:function(e){e.exports={title:"styles_title__b38Q2",mobilePopup:"styles_mobilePopup__G3e3Z",container:"styles_container__IGo0H",drawer:"styles_drawer__Tw66r",list:"styles_list__eSXKF",content:"styles_content__44gQX",buttons:"styles_buttons__co1FZ",contentRow:"styles_contentRow__VrBta",findConfigBlock:"styles_findConfigBlock__Mv4DU",footer:"styles_footer__hi3PE",header:"styles_header__vRF_L",bankName:"styles_bankName__U_3j4",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"}},19762:function(e){e.exports={notFoundWrapper:"CreditsNotFound_notFoundWrapper__QdXvJ",searchIcon:"CreditsNotFound_searchIcon__m8B3S",notFoundText:"CreditsNotFound_notFoundText__vZE_n",changeParamsButton:"CreditsNotFound_changeParamsButton__0_UOj"}},79380:function(e){e.exports={page:"MortgageDetail_page__sKQYA",supportSection:"MortgageDetail_supportSection__05Wn6",about:"MortgageDetail_about___qTO0"}},57063:function(e){e.exports={container:"MortgageApplySteps_container__sxW1j"}},960:function(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"}},65844:function(e){e.exports={title:"MortgagesList_title__l06z9",offersListContainer:"MortgagesList_offersListContainer__ZgMuQ",listTitle:"MortgagesList_listTitle__skUIP",container:"MortgagesList_container__cgMaG",listItem:"MortgagesList_listItem__IZLd8"}},90593:function(e){e.exports={container:"PaymentScheduleModal_container__WjKOq",withoutTabsContainer:"PaymentScheduleModal_withoutTabsContainer__sL5TF",value:"PaymentScheduleModal_value__hb6Gt",drawer:"PaymentScheduleModal_drawer__HeX7X",mobilePopup:"PaymentScheduleModal_mobilePopup__9r0D_",title:"PaymentScheduleModal_title__aWdpM",logo:"PaymentScheduleModal_logo__6hQvM",logoContainer:"PaymentScheduleModal_logoContainer__k71KX",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"}},12271:function(e){e.exports={content:"styles_content__pxEzH",text:"styles_text__0SGL8",breadcrumbs:"styles_breadcrumbs__jH8EC",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"}},38421:function(e){e.exports={link:"styles_link__XzCzB",chip:"styles_chip__bgIDt",black:"styles_black__aacN4",transparentChip:"styles_transparentChip__4ZT35",hiddenChip:"styles_hiddenChip__COVhQ"}},65607:function(e){e.exports={row:"styles_row__dHTUh",open:"styles_open__GqvFI",firstRow:"styles_firstRow__is75c",toggle:"styles_toggle__2r_74"}},57167:function(e){e.exports={mobilePopup:"styles_mobilePopup__IgKC0",container:"styles_container__z9_3y",drawer:"styles_drawer__H_96G",title:"styles_title__lAHXo",form:"styles_form__MeVkg",wrap:"styles_wrap__5SseV",half:"styles_half__YzJYA",field:"styles_field__SymN8",separator:"styles_separator__OP2pa",sort_title:"styles_sort_title__AIICK",sort_wrap:"styles_sort_wrap__t9xsY",sort_field:"styles_sort_field__eJEIr",checkboxField:"styles_checkboxField__BEvZa",heading:"styles_heading__stczP",footer:"styles_footer__9qQTK",submit:"styles_submit__n1m30"}},46588:function(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"}},21437:function(e){e.exports={mobilePopup:"styles_mobilePopup__3EKKw",container:"styles_container__d3Umv",drawer:"styles_drawer__M1_8q"}},45939:function(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",icon_detail:"styles_icon_detail__N2gt9",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"}},83953:function(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"}},92047:function(e){e.exports={mobilePopup:"styles_mobilePopup__qG2vn",container:"styles_container__o8xJL",drawer:"styles_drawer__gCFQW",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"}},77350:function(e){e.exports={controlLeft:"styles_controlLeft__zsGWP",controlRight:"styles_controlRight__S96BH",sliderWrapper:"styles_sliderWrapper__RjvdU",bannerCard:"styles_bannerCard__Psj5B",cardHead:"styles_cardHead__uO6Wh",image:"styles_image__t9YIp",cardBody:"styles_cardBody__JUrBo",categories:"styles_categories__rHZX3",category:"styles_category__1Qjld",text:"styles_text__x1urR",publ_date:"styles_publ_date__NUDd5"}},42316:function(e){e.exports={title:"styles_title__gEi2U",section:"styles_section__69r2O",tabsFilter:"styles_tabsFilter__gVzhr",sliderContainer:"styles_sliderContainer__Z9lbj"}},20676:function(e){e.exports={section:"styles_section__C_XdG",title:"styles_title__lnE9N",slider:"styles_slider__K0tB1",slide:"styles_slide__MhuRF",sliderList:"styles_sliderList___gtLu",card:"styles_card__hTNw7",imgWrapper:"styles_imgWrapper__Ue6gi",cardBody:"styles_cardBody__r7l0F",subTitle:"styles_subTitle__ayqhw",cardButton:"styles_cardButton__xJxcm",iconArrow:"styles_iconArrow__q2lrn"}},29535:function(e){e.exports={listTitle:"styles_listTitle__MeOax",list:"styles_list__bYSPt",card:"styles_card__HXa22",button_more_offers:"styles_button_more_offers__YXOO_"}},94370:function(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_"}},92941:function(e){e.exports={filter:"styles_filter__jrtk3"}},81923:function(e){e.exports={faq_container:"styles_faq_container__YZoO_"}},9469:function(e){e.exports={wrap:"styles_wrap__d_QXg",content:"styles_content__y9L_W",page_title:"styles_page_title__Y8O0t"}},6207:function(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"}},41696:function(e){e.exports={widget:"yandex-realty_widget__xtPmC"}},45179:function(e){e.exports={commentText:"offer-terms_commentText__S3vmq"}},36921:function(e){e.exports={container:"fab-button_container__OxsQu",expandableContainer:"fab-button_expandableContainer__DaTzp",expanded:"fab-button_expanded__KfN3z"}},53250:function(e,t,n){"use strict";var l=n(67294),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=l.useState,r=l.useEffect,i=l.useLayoutEffect,s=l.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!a(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(),l=o({inst:{value:n,getSnapshot:t}}),a=l[0].inst,u=l[1];return i(function(){a.value=n,a.getSnapshot=t,c(a)&&u({inst:a})},[e,n,t]),r(function(){return c(a)&&u({inst:a}),e(function(){c(a)&&u({inst:a})})},[e]),s(n),n};t.useSyncExternalStore=void 0!==l.useSyncExternalStore?l.useSyncExternalStore:u},50139:function(e,t,n){"use strict";var l=n(67294),a=n(61688),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=a.useSyncExternalStore,i=l.useRef,s=l.useEffect,c=l.useMemo,u=l.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,l,a){var d=i(null);if(null===d.current){var m={hasValue:!1,value:null};d.current=m}else m=d.current;var p=r(e,(d=c(function(){function e(e){if(!s){if(s=!0,r=e,e=l(e),void 0!==a&&m.hasValue){var t=m.value;if(a(t,e))return i=t}return i=e}if(t=i,o(r,e))return t;var n=l(e);return void 0!==a&&a(t,n)?t:(r=e,i=n)}var r,i,s=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,n,l,a]))[0],d[1]);return s(function(){m.hasValue=!0,m.value=p},[p]),u(p),p}},61688:function(e,t,n){"use strict";e.exports=n(53250)},52798:function(e,t,n){"use strict";e.exports=n(50139)}},function(e){e.O(0,[2730,3888,6832,5249,2935,5204,4466,1974,7462,6249,8276,7232,534,7153,2888,9774,179],function(){return e(e.s=75609)}),_N_E=e.O()}]);