(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9446],{6897:(e,t,a)=>{"use strict";a.r(t),a.d(t,{__N_SSP:()=>nu,default:()=>nd});var n,l,r=a(37876),o=a(14232),s=a(74055);a(62862);var i=a(37397),c=a(30557),u=a(28131),d=a(48230),m=a.n(d),_=a(25972),p=a(20988),h=a(10027),v=a(83188),g=a(87162),f=a(5153),y=a(37105);let b=[{id:1,label:"Условия",name:f.o1.conditions},{id:2,label:"Требования",name:f.o1.requirements},{id:3,label:"Требуемые документы",name:f.o1.requirementsDocs},{id:4,label:"Выдача и погашение",name:f.o1.redemption}],x=y.h.IPOTEKA;var j=a(62728);let C=(0,o.memo)(e=>{var t,a;let{data:n,bank:l,pageUrl:s}=e,{tabsContent:i,tabsList:c}=(e=>{let{data:t}=e,a=(0,o.useMemo)(()=>(0,f.qZ)(t),[t]),n=(0,o.useMemo)(()=>b.filter(e=>a[e.name].some(e=>(0,j.a)(e.value))),[a]);return{tabsContent:a,tabsList:n}})({data:n});return(0,r.jsx)(v.H,{scrollBlockId:g.uB,pageUrl:s,seoText:(null==n?void 0:n.short_description)&&(null==n?void 0:n.short_description.length)>5?null==n?void 0:n.short_description:void 0,title:"Об ипотеке",offerUpdateData:null==n?void 0:n.m_updated_at,bank:{logoMobile:null==l?void 0:l.logo_mob,description:null==l?void 0:l.short_description,url:"/banki/".concat(null==l?void 0:l.url),name:null==l?void 0:l.name,creditRating:null==l?void 0:l.credit_rating,netAssetsPlace:null==l||null==(t=l.ratings)?void 0:t.net_assets_place,netProfitRating:null==l?void 0:l.net_profit_rating},tabsList:c,tabsContent:i,aboutCompanyLabel:"О банке",site:null!=(a=null==l?void 0:l.site.title)?a:void 0})});C.displayName="MortgageAbout";var A=a(26700),N=a(78131),k=a(14873),M=function(e){return e.LEAD="lead",e.MASS="mass",e}({}),w=a(41402),T=a.n(w);let P=e=>{let{url:t,isMobile:a,className:n}=e,l=(0,o.useMemo)(()=>[{id:3,image:N.A,text:"Перейдите на сайт банка,<br /> чтобы оформить заявку",buttonText:"Оформить на сайте банка",link:t},{id:4,image:A.A,text:M.LEAD?"Эту ипотеку нельзя открыть через Финуслуги":"Эту ипотеку сейчас нельзя открыть онлайн на Финуслугах",buttonText:"Выбрать другую ипотеку",link:"/".concat(y.h.IPOTEKA)}],[t]);return(0,r.jsx)("div",{className:T().container,children:(0,r.jsx)(k.N,{className:n,title:"Где оформить ипотеку",pageUrl:y.h.IPOTEKA,id:g.ov,isMobile:a,slides:l})})};var S=a(49995),L=a(54808),E=a(5219),I=a(56420),O=a(52841),R=a(63292),F=a(14082),D=a(53244),B=a(35415),W=a(31257),U=a(89064),q=a(87087),K=a(87057),V=a(79807),z=a(32266),H=a(32180),Y=a.n(H);let Z=e=>{let{calculator:t,data:a,isMobile:n}=e,[l,s]=(0,o.useState)(!1),[i,c]=(0,o.useState)(()=>!!t.matCapital),u=(0,o.useCallback)(()=>{s(e=>!e)},[]),d=(0,o.useCallback)(()=>{c(!0)},[]),m=(0,o.useCallback)(e=>{e&&((0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.filterCatalog,eventLabel:"Платеж",eventValue:null==e?void 0:e.label}),t.setPaymentType([e]))},[t]),_=(0,o.useMemo)(()=>{let e=t.periodMin===t.periodMax?t.periodMin-1:t.periodMin;return{value:Math.max(e,Math.min(t.period,t.periodMax)),max:t.periodMax,min:e,onChange:a=>{let n=Math.max(e,Math.min(null!=a?a:e,t.periodMax));t.periodMin!==t.periodMax&&t.setPeriod(n)},step:1,ticks:[{label:(0,B.Hb)(t.periodMin),value:t.periodMin},{label:(0,B.Hb)(t.periodMax),value:t.periodMax}],unit:[U.U9.ONE,U.U9.FEW,U.U9.MANY]}},[t]),h=(0,o.useMemo)(()=>({value:Math.max(t.propertyPriceMin,Math.min(t.propertyPrice,t.propertyPriceMax)),max:t.propertyPriceMax,min:t.propertyPriceMin,onChange:e=>{let a=Math.max(t.propertyPriceMin,Math.min(null!=e?e:t.propertyPriceMin,t.propertyPriceMax));t.propertyPriceMin!==t.propertyPriceMax&&t.handleChangePropertyPrice(a)},step:1e5,ticks:[{label:"".concat((0,V.um)(t.propertyPriceMin)," ₽"),value:t.propertyPriceMin},{label:"".concat((0,V.um)(t.propertyPriceMax)," ₽"),value:t.propertyPriceMax}],unit:"₽"}),[t]),v=(0,o.useMemo)(()=>{let e=t.firstPaymentRangeMin,a=Math.max(e,t.firstPaymentMax),n=Math.max(e,Math.min(t.firstPayment,a));return{key:"first-payment-".concat(e,"-").concat(a),value:n,max:a,min:e,onChange:n=>{let l=Math.max(e,Math.min(null!=n?n:e,a));t.handleChangeFirstPayment(l)},step:1e3,unit:"₽"}},[t]),f=(0,o.useMemo)(()=>"".concat((0,V.um)(t.firstPaymentMin)," ₽"),[t.firstPaymentMin]),b=(0,o.useMemo)(()=>"".concat((0,V.um)(Math.max(t.firstPaymentRangeMin,t.firstPaymentMax))," ₽"),[t.firstPaymentRangeMin,t.firstPaymentMax]),x=(0,o.useMemo)(()=>t.paymentTypeOptions.filter(e=>{var a;return e.value===(null==(a=t.paymentType[0])?void 0:a.value)}),[t.paymentTypeOptions,t.paymentType]),j=(0,o.useMemo)(()=>[{id:1,label:(0,B.l5)(t.period)},{id:2,label:"".concat((0,V.ZV)(t.propertyPrice)," ₽")}],[t.propertyPrice,t.period]),C=(0,o.useMemo)(()=>{var e;return(null==a||null==(e=a.rate_corrections)?void 0:e.filter(e=>e.rate).map(e=>({name:e.title,label:e.content,labelPosition:"left",checked:!!t.additionalParams[(0,q.y)(e.title)],onChange:(a,n)=>t.handleChangeAdditionalParams({key:(0,q.y)(e.title),value:n.target.checked&&e.rate||0})})))||[]},[t,a.rate_corrections]);return(0,r.jsx)(F.t,{isMobile:n,title:"Настройки ипотеки",pageUrl:y.h.IPOTEKA,infoLink:{isShow:!n,text:"Подробнее об ипотеке",idScrollBlock:g.uB,offPadding:!0,widthMaxContent:!0},items:[],chips:j,additionalItemsTitle:"Уменьшить ставку",additionalItems:C,isShowChips:n&&!!(null==j?void 0:j.length)&&!l,isExpandSettings:l,onToggleSettings:u,renderCustomItems:()=>{var e;return(0,r.jsxs)("div",{className:Y().fieldsWrapper,children:[(0,r.jsxs)("div",{className:Y().fieldWrapper,children:[(0,r.jsx)("label",{className:Y().label,children:"Стоимость недвижимости"}),(0,r.jsxs)("div",{className:Y().fieldValue,children:[(0,r.jsx)(p.Qr,{...h,className:(0,S.A)(Y().field,Y().fieldRange)}),(0,r.jsx)(z.A,{triggerClassName:Y().tooltip,content:"Впишите сюда стоимость жилья. Если деньги нужны вам не только на покупку недвижимости, но и на другие цели, выберите другой тип кредита"})]})]}),(0,r.jsxs)("div",{className:Y().fieldWrapper,children:[(0,r.jsx)("label",{className:Y().label,children:"Срок погашения"}),(0,r.jsx)(p.Qr,{..._,className:(0,S.A)(Y().field,Y().fieldRange)})]}),(0,r.jsxs)("div",{className:Y().fieldWrapper,children:[(0,r.jsx)("label",{className:Y().label,children:"Первый взнос"}),(0,r.jsxs)("div",{className:Y().firstPaymentRangeWrapper,children:[(0,r.jsx)(p.Qr,{...v,className:(0,S.A)(Y().field,Y().fieldRange)}),(0,r.jsxs)("div",{className:Y().firstPaymentLabels,children:[(0,r.jsx)("span",{className:Y().firstPaymentLabel,children:f}),(0,r.jsx)("span",{className:Y().firstPaymentLabel,children:b})]})]})]}),a.maternal_capital.has>0&&(0,r.jsxs)("div",{className:Y().collapseContainerWrapper,children:[(0,r.jsxs)("div",{className:(0,S.A)(Y().additionalItem,Y().additionalItemCollapsible,!i&&Y().collapsedContainer),children:[(0,r.jsxs)("div",{className:Y().additionalItemName,children:[(0,r.jsx)("span",{children:"Использовать материнский капитал"}),(0,r.jsx)(z.A,{content:"Государство выделяет деньги на поддержку семей с детьми. Эти деньги можно вложить в ипотеку"})]}),(0,r.jsx)(p.lM,{value:i,onChange:e=>c(e),className:Y().toggle})]}),i&&(0,r.jsxs)("div",{className:Y().collapseContainer,children:[(0,r.jsx)("div",{className:Y().fieldWrapper,children:(0,r.jsx)(K.F,{label:"Сумма сертификата",value:t.matCapital,onFocus:d,onChange:t.handleChangeMatCapital})}),(0,r.jsx)("div",{className:Y().fieldWrapper,children:(0,r.jsx)(K.F,{label:"Личные средства",value:t.personalFunds,onChange:t.handleChangePersonalFunds})})]})]}),t.paymentType&&t.paymentTypeOptions.length>1&&(0,r.jsxs)("div",{className:Y().fieldWrapper,children:[(0,r.jsx)("label",{className:Y().label,children:"Тип погашения"}),(0,r.jsx)(p.l6,{options:t.paymentTypeOptions,value:x,onChange:m,className:Y().field}),(0,r.jsx)(D.q,{className:Y().typeDescription,type:null==(e=t.paymentType[0])?void 0:e.value})]})]})}})};var G=a(47019),Q=a(54587),J=a.n(Q);let X={src:"/kredity/assets/_next/static/media/chain.2d44409a.svg",height:24,width:24,blurWidth:0,blurHeight:0};var $=a(86710),ee=a(3010),et=a(81202),ea=a(80010);let en=e=>{let t,a=new Date().getFullYear(),n=new Date().getMonth()+e,l=new Date().getDate(),r=n%12;t=n<=12?n:0===r?12:r;let o=a+(n<=12?0:n%12?Math.floor(n/12):Math.floor(n/12-1)),s=new Date(o,t+1,0).getDate();return{date:"".concat(l>s?s:l,".").concat(t<12?"0":"").concat(t,".").concat(o),year:o}},el=e=>{let{rate:t,periodWithMoth:a,defaultBalanceDebt:n,balanceDebtPrevMonth:l,month:r}=e,o=t/12/100,s=(0,ea.r)((1+o)**a,5),i=(0,ea.r)(n*o*s/(s-1),1),c=(0,ea.r)(l*o,1),u=(0,ea.r)(i-c,1),d=(0,ea.r)(l-u,1);return{...en(r),paymentPerMoth:i,interestRepayment:c,loanRepayment:u,balanceDebt:d}},er=e=>{let{rate:t,periodWithMoth:a,balanceDebtPrevMonth:n,month:l}=e,r=(0,ea.r)(t/12/100*n,1),o=(0,ea.r)(n/a,1),s=(0,ea.r)(r+o,1),i=(0,ea.r)(n-o,1);return{...en(l),paymentPerMoth:s,interestRepayment:r,loanRepayment:o,balanceDebt:i}},eo=(e,t)=>{let a=[];for(let l=1,r=0;l<e.periodWithMoth;l++,r++){var n;a.push(t({...e,balanceDebtPrevMonth:(null==(n=a[r-1])?void 0:n.balanceDebt)||e.defaultBalanceDebt,month:l}))}return a};var es=a(5552),ei=a(42256),ec=a.n(ei);let eu=e=>{let{elementList:t,isExpanded:a,...n}=e;return(0,r.jsxs)("div",{className:ec().container,children:[(0,r.jsx)("div",{className:(0,S.A)(ec().expandableContainer,a&&ec().expanded),children:t.map(e=>e)}),(0,r.jsx)(p.$n,{...n})]})},ed=e=>e.reduce((e,t)=>{let a=e.findIndex(e=>e.year===t.year);return -1===a?e.push({year:t.year,schedule:[t]}):e[a].schedule.push(t),e},[]),em=[{label:"Дата",key:"date"},{label:"Платеж",key:"paymentPerMoth"},{label:"Проценты",key:"interestRepayment"},{label:"Оплата долга",key:"loanRepayment"},{label:"Остаток долга",key:"balanceDebt"}],e_=["vk","tg","ok"];var ep=a(78240),eh=a.n(ep),ev=a(24945),eg=a(3458),ef=a(76082);let ey=e=>{let{children:t,className:a}=e;return(0,r.jsx)("div",{className:(0,S.A)(eh().field,a),children:t})},eb=e=>{let{isMobile:t,formatedData:a}=e;return(0,r.jsxs)("div",{className:(0,S.A)(eh().columnTotalParams,eh().rowTabel),children:[(0,r.jsx)(ey,{className:eh().fieldLargeText,children:t?"Итоговая выплата":"Итого"}),em.map(e=>"date"!==e.key&&(0,r.jsxs)(ey,{children:[t&&(0,r.jsx)("span",{children:e.label}),(0,r.jsxs)("span",{children:[" ",(0,ea.r)(a[e.key],1).toLocaleString("ru-RU",{useGrouping:!0}).replace(".",","),t&&" ₽"]})]},e.key))]})},ex=(0,o.forwardRef)((e,t)=>{let{data:a,isMobile:n}=e,l=a.reduce((e,t)=>(t.schedule.forEach(t=>{e.balanceDebt+=t.balanceDebt,e.interestRepayment+=t.interestRepayment,e.loanRepayment+=t.loanRepayment,e.paymentPerMoth+=t.paymentPerMoth}),e),{balanceDebt:0,interestRepayment:0,loanRepayment:0,paymentPerMoth:0}),o=e=>{let{it:t,index:a}=e;return(0,r.jsxs)(r.Fragment,{children:[!n&&(0!==a?(0,r.jsx)("h4",{className:eh().titleYearSchedule,children:t.year}):(0,r.jsx)("div",{})),t.schedule.map(e=>(0,r.jsx)("div",{className:(0,S.A)(eh().rowTabel,eh().bodyField),children:em.map((t,a)=>{let l,o=e[t.key];return l=0===a?o:o.toLocaleString("ru-RU",{useGrouping:!0}).replace(".",","),(0,r.jsxs)(ey,{children:[!!n&&"date"!==t.key&&(0,r.jsx)("span",{children:t.label+(n?"":", ₽")}),(0,r.jsx)("span",{className:eh().value,children:l})]},t.key)})},e.date))]})};return(0,r.jsxs)("div",{className:eh().tableSchedule,children:[!n&&(0,r.jsx)("div",{className:(0,S.A)(eh().columnTitles,eh().rowTabel),children:em.map(e=>(0,r.jsx)(ey,{children:e.label+("date"===e.key||n?"":", ₽")},e.key))}),(0,r.jsxs)("div",{ref:t,className:eh().contentSchedule,children:[a.map((e,t)=>(0,r.jsx)("div",{className:eh().yearSchedule,children:n?(0,r.jsx)(p.As,{id:"years",title:e.year.toString(),className:eh().yearAccordion,children:(0,r.jsx)(o,{it:e,index:t})}):(0,r.jsx)(o,{it:e,index:t})},e.year)),n&&(0,r.jsx)(eb,{isMobile:n,formatedData:l})]}),!n&&(0,r.jsx)(eb,{isMobile:n,formatedData:l})]})});ex.displayName="ScheduleTable";let ej=(0,o.forwardRef)((e,t)=>{let{isMobile:a,paymentScheduleParametrs:n,payments:l}=e,s=(0,o.useMemo)(()=>a?l:l.length>1?[...l,{label:"Оба платежа",value:"all"}]:l,[l,a]),[i,c]=(0,o.useState)(s[0].value),u=ed(eo(n,el)),d=ed(eo(n,er)),m=(0,o.useRef)(null),_=(0,o.useRef)(null);return(((e,t)=>(0,o.useLayoutEffect)(()=>{let a=e.current,n=t.current;if(null===a||null===n)throw Error("Dead code branch");let l=e=>{e.target!==a?a.scrollTop=n.scrollTop:n.scrollTop=a.scrollTop};return a.addEventListener("scroll",l),n.addEventListener("scroll",l),()=>{a.removeEventListener("scroll",l),n.removeEventListener("scroll",l)}},[e,t]))(m,_),(0,o.useImperativeHandle)(t,()=>({onScrollToBottomHandle(){let e;null==(e=et.w.annuity&&m.current?m.current:_.current)||e.scrollTo({top:e.scrollHeight,behavior:"smooth"})}}),[]),u&&d)?(0,r.jsxs)("div",{className:eh().schedulePaymentsWrapper,children:[l.length>1&&(0,r.jsx)("div",{className:eh().tabsContentWrapper,children:s.map(e=>(0,r.jsx)(p.$n,{variant:"secondary",size:a?"xs":"s",label:e.label,className:(0,S.A)(eh().button,{[eh().active]:i===e.value}),onClick:()=>c(e.value)},e.label))}),(0,r.jsxs)("div",{className:eh().tabelsWrapper,children:[[et.w.annuity,"all"].includes(i)&&(0,r.jsx)(ex,{ref:m,data:u,isMobile:a}),[et.w.differentiated,"all"].includes(i)&&(0,r.jsx)(ex,{ref:_,data:d,isMobile:a})]})]}):null});ej.displayName="PaymentScheduleModalContent";let eC=e=>{let{isMobile:t,url:a}=e,[n,l]=(0,o.useState)(!1),s=async e=>{try{(0,W._)({eventAction:W.y.button,eventActionText:e,eventCategory:x}),await navigator.clipboard.writeText(a),l(!0),setTimeout(()=>l(!1),2e3)}catch(e){console.error("Failed to copy uri: ",e)}};return(0,r.jsxs)(p.$n,{variant:"secondary",size:t?"s":"m",className:(0,S.A)(eh().copyButton,t&&eh().mobileActionButton),onClick:()=>s((0,q.y)("Скопировать ссылку")),children:[(0,r.jsx)(J(),{src:X,alt:"Чат",height:"24"}),!t&&(n?"Ссылка скопирована":"Скопировать ссылку")]})},eA=e=>{var t;let a=(0,es.sw)();(0,o.useEffect)(()=>{var t,a;e.bankName&&(null==(t=e.data)?void 0:t.id)&&e.isOpen&&(0,W._)({eventAction:W.y.popup,eventActionText:null==e?void 0:e.bankName,eventCategory:e.mainPageUrl,eventLabel:null==(a=e.data)?void 0:a.id})},[e.isOpen,e.mainPageUrl,e.bankName,null==(t=e.data)?void 0:t.id]);let n=e=>{let{socialNetwork:t}=e;switch(t){case"vk":return(0,r.jsx)(ef.A,{});case"tg":return(0,r.jsx)(eg.A,{});case"ok":return(0,r.jsx)(ev.A,{});default:return null}},l=t=>{let{socialNetwork:l,className:o}=t;return(0,r.jsx)("button",{onClick:()=>(t=>{var n;let l=e.url;if(a)return void navigator.share({url:l});switch(t){case"vk":let r;r=e.url,l="https://vk.com/share.php?url=".concat(encodeURIComponent(r));break;case"tg":let o;o=e.url,l="https://t.me/share/url?url=".concat(encodeURIComponent(o));break;case"ok":let s;s=e.url,l="https://connect.ok.ru/offer?url=".concat(encodeURIComponent(s))}null==(n=window.open(l,"_blank"))||n.focus(),(0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.button,eventActionText:"share",url:l})})(l),className:o,children:(0,r.jsx)(n,{socialNetwork:l})})},s=(0,r.jsxs)("div",{className:eh().footer,children:[(0,r.jsxs)("div",{className:eh().socialNetworkSection,children:[(0,r.jsx)("p",{className:eh().socialNetworkTitle,children:"Поделиться"}),(0,r.jsx)("div",{className:eh().socialNetworkButtonsWrapper,children:e_.map(e=>(0,r.jsx)(l,{socialNetwork:e,className:(0,S.A)(eh().action,eh().socialButton)},e))})]}),(0,r.jsx)(eC,{isMobile:a,url:e.url})]}),i=(0,o.useRef)(null),[c,u]=(0,o.useState)(!1),d=(0,r.jsxs)("div",{className:eh().mobileFooter,children:[(0,r.jsx)(p.$n,{className:eh().paymentSummaryButton,size:"normal",onClick:()=>{var e;return null==(e=i.current)?void 0:e.onScrollToBottomHandle()},children:"Итоговая выплата"}),(0,r.jsxs)("div",{children:[(0,r.jsx)(p.m_,{text:"Ссылка скопирована",children:(0,r.jsx)(r.Fragment,{children:t=>{let{show:n,hide:l}=t;return(0,r.jsx)("button",{onClick:()=>{n(),setTimeout(l,2e3)},children:(0,r.jsx)(eC,{isMobile:a,url:e.url})})}})}),(0,r.jsx)(eu,{className:eh().mobileActionButton,variant:"secondary",isExpanded:c,onClick:()=>{u(e=>!e)},elementList:e_.map(e=>(0,r.jsx)(l,{socialNetwork:e,className:eh().expandableSocialMediaButton},e)),children:(0,r.jsx)(J(),{src:$.A,alt:"Чат",height:"24"})})]})]});return(0,r.jsx)(ee.Z,{children:(0,r.jsx)(p.aF,{open:e.isOpen,onClose:e.onClose,footer:{children:a?d:s},header:{title:"График платежей"},children:(0,r.jsx)("div",{className:(0,S.A)(eh().container,e.payments.length<=1&&eh().withoutTabsContainer),children:(0,r.jsx)(ej,{ref:i,paymentScheduleParametrs:e.paymentScheduleParametrs,payments:e.payments,isMobile:a})})})})};var eN=a(89099),ek=a(75464),eM=a(21754),ew=a(53172),eT=a(88548),eP=a.n(eT);let eS="Оформить на сайте банка",eL="Где оформить ипотеку",eE=e=>{let{bank:t,data:a,isMobile:n}=e,l=(0,o.useRef)(null),s=(e=>{var t,a,n;let l=Number(null!=(t=e.period.from)?t:1),r=Number(e.period.to),s=Number(null!=(a=e.amount.from)?a:0),i=Number(null!=(n=e.amount.to)?n:1e8),c=((e,t)=>{let a=[];return e&&a.push({label:"Аннуитетный",value:et.w.annuity}),t&&a.push({label:"Дифференцированный",value:et.w.differentiated}),a})(!!e.repayment_procedure.annuity,!!e.repayment_procedure.differentiated),[u,d]=(0,o.useState)(r),[m,_]=(0,o.useState)({}),[p,h]=(0,o.useState)([c[0]]),{loanRateFrom:v,loanRateTo:g}=(0,o.useMemo)(()=>{let t=(m?Object.values(m):[]).reduce((e,t)=>e+t,0);return{loanRateFrom:Number(e.interest_rate.from)-t,loanRateTo:Number(e.interest_rate.to)-t}},[m,e.interest_rate.from,e.interest_rate.to]),{asPath:f}=(0,eN.useRouter)(),y=(0,o.useRef)(),b=s+(0,ea.r)(s*e.first_payment.from/(100-e.first_payment.from-1),1),x=Math.min(1e8,i+(0,ea.r)(i*e.first_payment.from/(100-e.first_payment.from),1)),j=Math.max(b,x),[C,A]=(0,o.useState)(j),N=(0,o.useCallback)(e=>Math.max(b,Math.min(e,1e8)),[1e8,b]),k=(0,o.useMemo)(()=>(0,ea.r)(b/100*(e.first_payment.from-1),1),[e.first_payment.from,b]),M=(0,o.useMemo)(()=>(0,ea.r)(x/100*e.first_payment.from,1),[e.first_payment.from,x]),[w,T]=(0,o.useState)(M),P=(0,o.useCallback)(t=>t>i?(0,ea.r)(t-i,1):x===t?M:b===t?k:(0,ea.r)(t/100*e.first_payment.from,1),[i,e.first_payment.from,M,k,x,b]),S=(0,o.useMemo)(()=>P(C),[P,C]),L=(0,o.useCallback)(t=>b===t?(0,ea.r)(b/100*e.first_payment.from,1):(0,ea.r)(t-s,1),[s,e.first_payment.from,b]),E=(0,o.useMemo)(()=>L(C),[L,C]),I=(0,o.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:C,a=P(t),n=L(t),l=Math.min(Math.max(e,a),n),r=Math.floor((n-k)/1e3),o=Math.min(Math.max(Math.ceil((l-k)/1e3),0),r);return(0,ea.r)(k+1e3*o,1)},[L,P,k,C]),O=(0,o.useMemo)(()=>I(w),[w,I]),[R,F]=(0,o.useState)(0),[D,B]=(0,o.useState)(0),W=(0,o.useMemo)(()=>(0,ea.r)(O/C*100,1),[O,C]),U=(0,o.useMemo)(()=>(0,ea.r)(b===C?C-E:C-O,1),[O,b,E,C]),K=(0,o.useMemo)(()=>"".concat(window.location.href.split("?")[0],"?propertyPrice=").concat((0,ea.r)(C,1),"&firstPayment=").concat((0,ea.r)(O,1)).concat(R>0?"&matCapital=".concat((0,ea.r)(R,1)):"").concat(D>0?"&personalFunds=".concat((0,ea.r)(D,1)):"","&period=").concat(u).concat(c.length>1?"&paymentType=".concat(p[0].value):"").concat(Object.keys(m).filter(e=>!!m[e]).length?"&additionalParams=".concat(encodeURIComponent(Object.entries(m).filter(e=>!!e.at(-1)).map(e=>e[0]).join(","))):""),[C,O,R,D,u,c.length,p,m]),V=(0,o.useMemo)(()=>{var t,a;let n=(null==(a=e.rate_corrections_first_payment)||null==(t=a.find(e=>{let t=O/(C/100);return e.rate_from<=t&&t<=e.rate_to}))?void 0:t.rate)||0;return e.interest_rate.from-Object.values(m).reduce((e,t)=>e+=t,0)-n},[e.rate_corrections_first_payment,e.interest_rate.from,m,C,O]),{paymentPerMoth:z}=(0,o.useMemo)(()=>{var e;return((null==(e=p[0])?void 0:e.value)===et.w.annuity?el:er)({rate:V,periodWithMoth:u,defaultBalanceDebt:U,balanceDebtPrevMonth:U,month:1})},[V,U,p,u]),{totalOverpayment:H,totalCost:Y}=(0,o.useMemo)(()=>((e,t,a)=>{let n=a*t;return{totalOverpayment:n-e,totalCost:n}})(U,u,z),[z,U,u]),Z=(0,o.useCallback)(e=>{let{key:t,value:a}=e;_(e=>({...e,[t]:a}))},[]),G=(0,o.useCallback)(e=>{let t=N(e),a=E-S,n=a>0?(O-S)/a:0,l=P(t),r=I(l+n*(L(t)-l),t);A(t),T(r),B(r-R)},[L,P,N,O,E,S,R,I]),Q=(0,o.useCallback)(e=>{let t=I(e);T(t),B(t-R)},[R,I]),J=(0,o.useCallback)(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=D+t;if(a>1e8-s)return;F(t);let n=C;a>E&&A(n=Math.min(a+Number(e.amount.from),1e8)),O<S&&A(n=(0,ea.r)(D/e.first_payment.from*100,1)),T(I(a,n))},[D,s,E,O,S,e.amount.from,e.first_payment.from,I,C]),X=(0,o.useCallback)(function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;y.current&&clearInterval(y.current);let a=(null!=R?R:0)+t;if(a>1e8-s)return;B(t);let n=C;a>E&&A(n=Math.min(a+Number(e.amount.from),1e8)),t<S&&A(n=(0,ea.r)((t<k?k:t/e.first_payment.from)*100,1)),T(I(a,n))},[R,s,k,E,S,e.amount.from,e.first_payment.from,I,C]);return(0,o.useEffect)(()=>{var t,a,n,o,s;let i=(0,ek.$)(f,"?"),u=Array.isArray(i.property_price)?i.property_price[0]:i.property_price,m=Array.isArray(i.first_payment)?i.first_payment[0]:i.first_payment,p=Number(Array.isArray(i.period)?i.period[0]:i.period),v=Number(i.matCapital);if(0===v||Number.isNaN(v)||F(v),i.additionalParams&&decodeURI(i.additionalParams.toString()).split("%2C").forEach(t=>{var a;let n=null==(a=e.rate_corrections)?void 0:a.find(e=>(0,q.y)(e.title)===t);n&&null!==n.rate&&_(e=>({...e,[t]:n.rate}))}),void 0!==u){let e=N(Number(u));A(e),T(t=>I(t,e))}if(void 0!==m){let e=void 0!==u?N(Number(u)):C;T(I(Number(m),e))}if(void 0!==i.firstPayment&&(""!==i.firstPayment||(null==(t=i.firstPayment)?void 0:t.length)!==0)){let e=void 0!==i.propertyPrice&&(""!==i.propertyPrice||(null==(s=i.propertyPrice)?void 0:s.length)!==0)?N(Number(i.propertyPrice.toString())):C;T(I(Number(i.firstPayment.toString()),e))}if(void 0!==i.personalFunds&&(""!==i.personalFunds||(null==(a=i.personalFunds)?void 0:a.length)!==0)){let e=Number(i.personalFunds.toString());Number.isNaN(e)||B(e)}if(void 0!==i.propertyPrice&&(""!==i.propertyPrice||(null==(n=i.propertyPrice)?void 0:n.length)!==0)){let e=N(Number(i.propertyPrice.toString()));T(t=>I(t,e)),A(e)}if(void 0!==i.paymentType&&(""!==i.paymentType||(null==(o=i.paymentType)?void 0:o.length)!==0)){let e=c.find(e=>e.value===i.paymentType);void 0!==e&&h([e])}return!Number.isNaN(p)&&p>=l&&p<=r&&d(p),()=>{let e=y.current;e&&clearTimeout(e)}},[]),(0,o.useMemo)(()=>({totalOverpayment:H,totalCost:Y,currectMonthlyPayment:z,firstPaymentPercent:W,calculatorQueryParamsInLink:K,mortgageCredit:U,personalFunds:D,matCapital:null!=R?R:0,currectInterestRate:V,firstPaymentMin:S,firstPaymentRangeMin:k,firstPaymentMax:E,propertyPriceMin:b,propertyPriceMax:1e8,propertyPrice:C,firstPayment:O,period:u,setPeriod:d,periodMin:l,periodMax:r,paymentTypeOptions:c,paymentType:p,setPaymentType:h,additionalParams:m,handleChangePropertyPrice:G,handleChangeAdditionalParams:Z,handleChangePersonalFunds:X,handleChangeMatCapital:J,handleChangeFirstPayment:Q,loanRateFrom:v,loanRateTo:g}),[H,Y,z,W,K,U,D,R,V,S,k,E,b,1e8,C,O,u,l,r,c,p,m,G,Z,X,J,Q,v,g])})(a),i=(0,o.useMemo)(()=>{var e;let t=(null==(e=a.application_term.custom_text)?void 0:e.from)!==void 0?(0,I.v)(a.application_term.custom_text.from):0,n=new Date;n.setDate(n.getDate()+t);let l=n.getDate(),r=n.getMonth()+1,o=n.getFullYear();return"Деньги у вас до ".concat(l," ").concat((0,eM.F)("".concat(r,"-").concat(l,"-").concat(o)))},[a.application_term.custom_text]),u=(0,o.useCallback)(()=>{l.current&&l.current.focus()},[]),d=(0,o.useMemo)(()=>{let e=[],t=a.full_price;t&&e.push({label:"ПСК",value:(0,c.o)(t),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n          Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,V.sP)(s.loanRateFrom,s.loanRateTo)}),e.push({label:"Первый взнос",value:"".concat((0,V.um)((0,ea.r)(s.firstPayment,1)),"&#160;₽")},{label:"Платеж в месяц",value:"".concat((0,V.um)(s.currectMonthlyPayment),"&#160;₽")},{label:"Налоговый вычет",value:"".concat((0,V.um)((0,ea.r)(((e,t)=>{let a=.13*e;return e<=2e6?a:(a=a>26e4?26e4:a)+(.13*t>39e4?39e4:.13*t)})(s.propertyPrice,s.totalOverpayment),1))," ₽")});let n=s.paymentType;if(n){var l;e.push({label:"Тип погашения",value:(null==(l=n[0])?void 0:l.value)===et.w.annuity?"Аннуитетный":"Дифференцированный"})}return e.push({label:"Переплата",value:"".concat((0,V.um)(s.totalOverpayment),"&#160;₽"),description:"Это сумма процентов, которые заемщик платит за пользование кредитом. Она может уменьшиться, если гасить кредит досрочно"},{label:"Итоговая выплата",value:"".concat((0,V.um)(s.totalCost),"&#160;₽")}),e},[s.currectMonthlyPayment,s.firstPayment,s.loanRateFrom,s.loanRateTo,s.paymentType,s.propertyPrice,s.totalCost,s.totalOverpayment,a.full_price]),[m,h]=(0,o.useState)(!1),v=(0,o.useCallback)(()=>{h(e=>!e)},[]),f=(0,o.useMemo)(()=>[m,v],[m,v]),b=void 0!==a.amount.from&&void 0!==a.amount.to&&+a.amount.to>+a.amount.from;return(0,r.jsxs)(G.v.Provider,{value:f,children:[(0,r.jsxs)(_.mc,{className:(0,S.A)(eP().container,eP().containerFull,{[eP().containerWithoutCalculator]:!b}),children:[(e=>{var l;return(0,r.jsx)(O.E,{url:a.url,bank:{logoMob:null==t?void 0:t.logo_mob,url:"/banki/".concat(null==t?void 0:t.url),name:null!=(l=null==t?void 0:t.name)?l:a.bank_name},pageUrl:y.h.IPOTEKA,title:a.title,isSmall:e,isMobile:n,tagTheme:"green",className:eP().promo})})(),b&&(0,r.jsxs)("div",{className:eP().left,children:[(0,r.jsx)(Z,{calculator:s,data:a,isMobile:n}),(0,r.jsx)(R.P,{text:"Все для ипотеки: страхуем недвижимость, жизнь, здоровье или все сразу",hideButtons:!0,hideQr:!0,isSmall:!0,className:eP().qrDesc})]}),(0,r.jsxs)("div",{className:(0,S.A)({[eP().right]:b}),children:[(0,r.jsx)(E.r,{captionTitle:i,pageUrl:y.h.IPOTEKA,onEdit:u,amount:s.mortgageCredit,repayment:s.totalOverpayment,disclaimer:"Предварительные условия. Не оферта",tag:a.online_application.commercial_desc,footerActions:(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(p.$n,{as:"a",target:"_blank",className:eP().button,href:a.online_application.url,onClick:()=>{(0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.link,eventActionText:eS})},children:eS}),(0,r.jsx)(p.$n,{as:"a",onClick:()=>{(0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.button,eventActionText:eL}),(0,ew.e)(g.ov,{offset:n?0:-100,position:"top"})},className:eP().button,variant:"secondary",children:eL}),(0,r.jsx)(L.e,{offPadding:!1,widthMaxContent:!1,text:"График платежей",iconColor:"light",mainPageUrl:y.h.IPOTEKA,className:eP().link,onClick:v})]}),valuesList:d,showChart:!0}),(0,r.jsx)(R.P,{text:"Все для ипотеки: страхуем недвижимость, жизнь, здоровье или все сразу",hideButtons:!0,hideQr:!0,isSmall:!0,className:eP().qrMobile})]})]}),(0,r.jsx)(eA,{data:a,bankName:null==t?void 0:t.name,isOpen:m,paymentScheduleParametrs:{rate:Number(s.currectInterestRate),periodWithMoth:Number(s.period),defaultBalanceDebt:s.mortgageCredit},onClose:v,payments:s.paymentTypeOptions,logo:null==t?void 0:t.logo_mob,url:s.calculatorQueryParamsInLink,mainPageUrl:y.h.IPOTEKA})]})};var eI=a(40419),eO=a(13394),eR=a(16891),eF=a(91063),eD=a(44694),eB=a(27526),eW=a.n(eB);let eU=(0,o.memo)(e=>{let{data:t,className:a,onDetailInfoClick:n,onClick:l}=e,s=[],i=(0,o.useRef)(null),c=(0,o.useRef)(!1),u=(0,o.useRef)(null),d={text:(0,V.ej)({from:t.amountFrom,to:t.amountTo},{currency:t.currency}),caption:"Сумма кредита"},m={text:"от ".concat((0,V.ZV)(t.payment),"%"),caption:"Первый взнос"};s.push({label:"Ипотека",variant:"green"}),s.push({label:t.typeText,variant:"primary"});let _=(0,o.useCallback)(e=>{let[a]=e;1===a.intersectionRatio&&!c.current&&((0,eF.o)({event:"data-event",eventAction:"show_in_catalog",eventCategory:y.h.IPOTEKA,eventLabel:t.id}),c.current=!0,i.current&&u.current&&i.current.unobserve(u.current))},[t.id]);return(0,o.useEffect)(()=>{i.current&&u.current&&i.current.unobserve(u.current),!c.current&&u.current&&(i.current=new IntersectionObserver(_,{root:null,threshold:[1]}),i.current.observe(u.current))},[_]),(0,r.jsx)("div",{ref:u,className:a,onClick:()=>{var e;return e="click_button_".concat((0,q.y)("Подать заявку")),void((0,eF.o)({event:"data-event",eventAction:e,eventCategory:y.h.IPOTEKA,eventLabel:t.id,eventValue:t.eventValue}),null==l||l(t))},children:(0,r.jsx)(eD.M,{icon:t.logo?(0,r.jsx)("div",{className:eW().logo,children:(0,r.jsx)(J(),{width:56,height:56,src:t.logo,alt:"logo"})}):(0,r.jsx)("div",{className:eW().placeholderLogo}),companyName:t.bankName,productName:t.title,productUrl:t.url,buttonUrl:t.url,tags:s,advantageAmountFrom:d,advantageAmountTo:m,onDetailInfoClick:()=>{n(t),(0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.button,eventActionText:"open_modal"})},className:eW().plate})})});eU.displayName="MortgageListItem";var eq=a(62576),eK=a(96759);let eV=e=>{var t,a,n,l;let{banks:r,mortgage:o,period:s}=e,i="/".concat(y.h.IPOTEKA,"/").concat(o.url),c=r.find(e=>+o.bank_id==+e.id),u="",d="";return 2===o.online_application.type?u="Открытие в банке":(u="Заявка через сайт банка",d="non_commercial"),{id:o.id,bankName:null!=(a=null==c?void 0:c.name)?a:o.bank_name,bankId:null!=(n=null==c?void 0:c.id)?n:"",logo:null!=(l=null==c?void 0:c.logo_mob)?l:"",title:o.title,url:i,legalName:(e=>{if(e)try{let t=JSON.parse(e);if(Array.isArray(t))return t[0].name;return t.name}catch(t){return e}return""})("string"==typeof(null==c?void 0:c.legal_entities)?JSON.parse(null==c?void 0:c.legal_entities)[0].name:null==c||null==(t=c.legal_entities)?void 0:t[0].name),isPermanentRegistation:1==+o.registration_address.permanent,period:s||+o.period.to,rate:+o.interest_rate.from,rateTo:+o.interest_rate.to,payment:+o.first_payment.from||0,currency:"₽",detailUrl:"/".concat(y.h.IPOTEKA,"/").concat(o.url),typeText:u,eventValue:d,notLoan:1===o.loan.not_required,incomeProof:0===o.income_proof.not_required,amountFrom:Number(o.amount.from),amountTo:Number(o.amount.to)}};var ez=a(33126),eH=a(92666),eY=a(12341),eZ=a.n(eY);let eG=(0,o.memo)(e=>{let{bank:t,banks:a,currentCardId:n,mortgagesList:l,mortgagesFinuslugiList:s,className:i,newContainer:c=!1}=e,{town:u}=(0,eH.z)(),[d,m]=(0,o.useState)(),p=(0,o.useCallback)(()=>{m(void 0)},[]),h=(0,o.useCallback)(e=>{(0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.link,eventActionText:e.title,eventLabel:e.id,url:e.url})},[]),v=(0,o.useMemo)(()=>{let e=l.length?l.filter(e=>e.id!==n):[];return(0,eK.q)({productList:e,anotherList:e,count:eq.gx})},[l,n]),g=(0,o.useMemo)(()=>{let e=s||[];return(0,eK.q)({productList:e,anotherList:e,count:eq.a0-v.length})},[v.length,s]),f=(0,o.useMemo)(()=>({bankList:v.map(e=>eV({banks:[t],mortgage:e})),finuslugiList:g.map(e=>eV({banks:a,mortgage:e}))}),[t,a,v,g]),b=(0,o.useCallback)(e=>{if(!e)return;let a=[v,g].reduce((e,t)=>[...e,...t],[]).find(t=>t.id===e.id);if(a)return{...a,site:{title:t.site.title,url:t.site.url},bankName:e.bankName,detailUrl:e.detailUrl,logo:e.logo,url:e.url}},[t.site.title,t.site.url,v,g]),x=(0,o.useCallback)(e=>{m(b(e)),e&&(0,W._)({eventCategory:y.h.IPOTEKA,eventAction:W.y.popup,eventActionText:e.title,eventLabel:e.id})},[b]),j="".concat((0,ez.UK)().mainBaseUrl,"/banki/").concat(t.url,"/ipoteka").concat((null==u?void 0:u.url.length)?"/reg_"+u.url:""),C=(0,r.jsx)(r.Fragment,{children:!!f.bankList.length&&(0,r.jsxs)("section",{className:eZ().offersListContainer,children:[(0,r.jsxs)("p",{className:eZ().listTitle,children:["Ипотека от ",t.name]}),f.bankList.map(e=>(0,r.jsx)(eU,{text:"Подать заявку",className:eZ().listItem,data:e,onDetailInfoClick:x,onClick:h},e.url)),(0,r.jsx)(eI.e,{offPadding:!0,text:"Bсе предложения от банка",href:j,target:"_blank",iconColor:"light",mainPageUrl:y.h.IPOTEKA})]})});return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("section",{className:(0,S.A)(eZ().container,i),children:[(0,r.jsx)("h3",{className:eZ().title,children:"Другие предложения"}),c?(0,r.jsx)(_.mc,{children:C}):(0,r.jsx)(eR.J,{children:C})]}),(0,r.jsx)(eO.u,{data:d,isOpen:!!d,onClose:p,mainPageUrl:y.h.IPOTEKA})]})});eG.displayName="MortgagesList";var eQ=a(36598),eJ=a(9837),eX=a(66460),e$=a(6980),e0=a(80490),e1=a(99275),e2=a(40431),e4=a.n(e2);function e3(e){var t;let{offer:a,journal:n,questions:l,description:s,banks:i,refererTag:c,offers:u,offersFinuslugi:d,support:v}=e,g=(0,es.sw)(),{region:f,town:b}=(0,eH.z)(),x=i.find(e=>+e.id===a.bank_id),j=(null==l?void 0:l.map(e=>({title:e.title,text:e.text.map(e=>e.data.html).join(""),plainText:e.text.map(e=>(0,eQ.NC)(e.data.html)).join("").trim()})))||[],A="Ипотека \xab".concat(a.title,"\xbb от ").concat(null!=(t=null==x?void 0:x.name_r)?t:""),N=(0,o.useMemo)(()=>{var e;let t=(null==b?void 0:b.name_p)||(null==f?void 0:f.name_p)?" в ".concat((null==b?void 0:b.name_p)||(null==f?void 0:f.name_p)):"",n="".concat((null==f?void 0:f.url)?"/reg_".concat(null==f?void 0:f.url):"").concat((null==b?void 0:b.url)?"/".concat(null==b?void 0:b.url):""),l=[{label:"Главная",href:"/"},{label:"Ипотеки".concat(t),href:"/".concat(y.h.IPOTEKA).concat(n)}];return c&&l.push({label:"".concat(c.name).concat(t),href:"/".concat(y.h.IPOTEKA,"/teg_").concat(c.url).concat(n)}),l.push({label:"".concat(null!=(e=null==x?void 0:x.name)?e:a.bank_name," Ипотека ").concat(a.title)}),l},[null==x?void 0:x.name,a.bank_name,a.title,c,null==f?void 0:f.name_p,null==f?void 0:f.url,null==b?void 0:b.name_p,null==b?void 0:b.url]);return(0,r.jsxs)("main",{className:e4().page,children:[(0,r.jsx)(h.I,{productId:String(a.id),title:A,description:s}),(0,r.jsx)(eX.t,{}),(0,r.jsx)(eJ.c,{questions:j}),(0,r.jsx)("div",{className:e4().navigationWrapper,children:(0,r.jsx)(_.mc,{children:(0,r.jsx)(p.BI,{className:e4().breadcrumbs,items:N})})}),(0,r.jsx)(eE,{bank:x,data:a,isMobile:g}),(0,r.jsx)(_.mc,{className:e4().about,children:(0,r.jsx)(C,{data:a,bank:x,pageUrl:y.h.IPOTEKA})}),(0,r.jsx)(P,{isMobile:g,url:a.online_application.url}),void 0!==x&&(0,r.jsx)(eG,{newContainer:!0,bank:x,banks:i,currentCardId:a.id,mortgagesList:u,mortgagesFinuslugiList:d}),(null==n?void 0:n.posts.length)>0&&(0,r.jsx)(_.mc,{children:(0,r.jsx)(e$.C,{posts:null==n?void 0:n.posts,eventCategory:y.h.IPOTEKA})}),(0,r.jsx)("div",{className:e4().supportSection,children:(0,r.jsx)(e0.E,{value:v})}),(0,r.jsx)("div",{className:e4().faqSection,children:(0,r.jsx)(e1.m,{isAllExpanded:!0,newContainer:!0,faqBlockTitle:"",Link:e=>(0,r.jsx)(m(),{...e}),dataLayerPush:eF.o,questions:j,eventCategory:"ipoteki_support_block",href:"".concat((0,ez.UK)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про ипотеку"})})]})}var e8=a(37071);a(81787);var e5=a(23857);function e6(e){let{layout:t,mortgage:a,journal:n,questions:l,description:o,banks:s,offers:i,offersFinuslugi:c,support:u}=e;return(0,r.jsx)(e5.P,{data:t,children:(0,r.jsx)(e3,{offer:a,journal:n,questions:l,description:o,banks:s,refererTag:null,offers:i,offersFinuslugi:c,support:u})})}a(7455),a(3067);let e7={offers:{list:(e,t,a,n,l,r)=>{let o;return(o="/money_data/Mortgages.json?".concat(Object.entries({...(e=>{var t,a,n,l;let r={};return void 0!==e.amount&&(r.amount=e.amount),void 0!==e.downpayment&&(r.first_payment=e.downpayment),void 0!==e.term&&(r.period=e.term),void 0!==e.property_type&&(r.property_type=e.property_type),void 0!==e.market&&(r.real_estate_market=null!=(t=({first:"primary",second:"secondary"})[e.market])?t:"primary"),void 0!==e.form&&(r.form=null!=(a=({cash:"cash",account:"to_account",third_party_bank_account:"to_custom_account"})[e.form])?a:"to_account"),void 0!==e.proof&&(r.income_proof=e.proof),void 0!==e.provision&&(r.loan=null!=(n=({not_required:"not_required",deposit:"pledge",guarantee:"guarantee",not_required_and_guarantee:"pledge,guarantee"})[e.provision])?n:""),e.banks&&e.banks.length>0&&(r.bank=e.banks.join(",")),void 0!==e.flags&&e.flags.includes("maternal_capital")&&(r.maternal_capital=1),r.sort=null!=(l=void 0!==e.sort?({rate:"rate",payment:"amount",downpayment:"firstPayment"})[e.sort]:void 0)?l:"rate",r.order=e.sortDir,r})(e),limit:t,page:a}).map(e=>{let[t,a]=e;return"".concat(t,"=").concat(encodeURIComponent(a))}).join("&"),"&tag=").concat(n).concat(void 0!==l?"&region=".concat(l).concat(void 0!==r?"&town=".concat(r):""):"","&archive=0"),(0,i.Q)(o).then(e=>{let{data:t,error:a}=e;return a?Promise.reject(a):t})).then(e=>{if(!e)return{title:"",subtitle:"",description:"",page:[],count:0,total_count:0};let{title:t,description:n,subtitle:l,mortgages_count:r,mortgages_total_count:o,mortgages:s,mortgages_online:i}=e;if(void 0!==a&&1!==a&&0===s.length&&0===i.length)throw new u.m_("Invalid mortgages page: ".concat(a));return{title:t,subtitle:l,description:n,page:i.concat(s).map(e=>({...e,full_price:(0,c.j)(e.full_price)})),count:r,total_count:o}})}}};var e9=a(50261),te=a(66451),tt=a.n(te);let ta=[{id:1,logo:{src:"/kredity/assets/_next/static/media/icon-1.adb0626c.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Займы</span>",value:"potrebitelskie_kredity/teg_bystro",isLink:!0},{id:2,logo:{src:"/kredity/assets/_next/static/media/icon-2.0c7d47df.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на любые цели</span>",value:"potrebitelskie_kredity?purpose=other",isLink:!0},{id:3,logo:{src:"/kredity/assets/_next/static/media/icon-3.b9b622cd.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на автомобиль</span>",value:"avtokredity",isLink:!0},{id:4,logo:{src:"/kredity/assets/_next/static/media/icon-4.15a4284d.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на лечение</span>",value:"potrebitelskie_kredity?purpose=treatment",isLink:!0},{id:5,logo:{src:"/kredity/assets/_next/static/media/icon-5.ee0778ef.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Кредит <br> на учебу</span>",value:"potrebitelskie_kredity?purpose=education",isLink:!0},{id:6,logo:{src:"/kredity/assets/_next/static/media/icon-6.bc466745.svg",height:60,width:158,blurWidth:0,blurHeight:0},title:"<span>Ипотека</span>",value:"mortgages",isLink:!1}],tn=(0,o.memo)(e=>{let{pageUrl:t}=e,{mainBaseUrl:a}=(0,ez.UK)(),n=(0,o.useCallback)((e,n)=>{var l;e.stopPropagation();let r=(0,q.y)(null!=(l=n.title)?l:"");(0,eF.o)({event:"data-event",eventAction:n.isLink?"click_link_".concat(r):"click_button_".concat(r),eventCategory:t}),n.isLink?window.open("".concat(a,"/").concat(n.value),"_blank"):window.scrollTo({top:0,behavior:"smooth"})},[a,t]);return(0,r.jsxs)(_.mc,{className:tt().container,children:[(0,r.jsx)("h2",{className:tt().title,children:"Каталог кредитов"}),(0,r.jsx)("div",{className:tt().cardsList,children:ta.map(e=>(0,r.jsxs)("div",{className:tt().card,onClick:t=>n(t,e),children:[(0,r.jsx)(J(),{className:tt().icon,width:158,height:60,alt:"banner-".concat(e.value),src:e.logo}),(0,r.jsx)("p",{className:tt().subTitle,dangerouslySetInnerHTML:{__html:e.title}})]},e.id))})]})}),tl="/ipoteka",tr="DEFAULT",to="reg_",ts="teg_",ti={RATE:"rate",AMOUNT:"amount",DOWNPAYMENT:"downpayment"};ti.RATE,ti.AMOUNT,ti.DOWNPAYMENT;var tc=a(36012),tu=a(18258),td=a(86700),tm=a.n(td);let t_=e=>{let{posts:t,regions:a,tags:n,questionsData:l,currentTag:o,region:s,town:i,support:c}=e,{query:u}=(0,eN.useRouter)(),d=function(e,t,a,n,l,o){let s=e.map(e=>({title:(0,e9.w)(e.title),text:(0,r.jsx)(eQ.eW,{data:(0,e9.j)(e).content})}));s.push(...(0,tu.N)(y.h.IPOTEKA,a,n,l,o,{nominativeCase:"Ипотека",genitiveCase:"ипотек"}));let i=t.reduce((e,t)=>{if(void 0===t.url_redirect){let a=(0,tc.AP)(t.url,t.name);e.push(a)}return e},[]);return s.push({title:"Виды ипотек",text:(0,r.jsx)(tc.oL,{children:i})}),s}(l,n.reduce((e,t)=>(t.url_redirect||e.push({...t,url:((e,t)=>{let a="teg_".concat(e.url_redirect||e.url);if(!t)return"".concat(a);let n=(Array.isArray(t)?t:[t]).filter(e=>!e.includes(ts));return"".concat([a,...n].join("/"))})(t,u.segments)}),e),[]),a,o,s,i);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:tm().faq_container,children:(0,r.jsx)(e1.m,{isAllExpanded:!0,newContainer:!0,Link:e=>(0,r.jsx)(m(),{...e}),dataLayerPush:eF.o,questions:d,eventCategory:"mortgages_support_block",href:"".concat((0,ez.UK)().mainBaseUrl,"/help"),checkAllText:"Читать все вопросы про ипотеку"})}),t.length>0&&(0,r.jsx)(e$.C,{eventCategory:tl,posts:t}),(0,r.jsx)(e0.E,{value:c}),(0,r.jsx)(tn,{pageUrl:tl})]})};var tp=a(24523),th=a(25904),tv=a(20912),tg=a(99542),tf=a.n(tg);function ty(e){let{chips:t,onChipClick:a,lastInFirstRowChipIndex:n,isMobile:l,isFirstRow:o,useLinkChips:s}=e,{asPath:i}=(0,eN.useRouter)(),{mainBaseUrl:c}=(0,ez.UK)(),u="".concat(c).concat(i),d=(e,t)=>{let{value:s,label:i,color:c}=e;return(0,r.jsx)("div",{className:(0,S.A)(tf().chip,tf()[c],{[tf().transparentChip]:o&&t>n},{[tf().hiddenChip]:!o&&l&&t<=n}),onClick:()=>a(s),children:i},s)};return(0,r.jsx)(r.Fragment,{children:t.map(s?(e,t)=>{let a=e.value,n=new URL(u);return n.searchParams.delete("property_type"),n.searchParams.append("property_type",e.value),(0,r.jsx)(m(),{className:tf().link,href:n.toString(),onClick:e=>e.preventDefault(),children:d(e,t)},a)}:d)})}var tb=a(27607),tx=a.n(tb);function tj(){return(tj=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}let tC=function(e){return o.createElement("svg",tj({xmlns:"http://www.w3.org/2000/svg",width:12,height:6,fill:"none",viewBox:"0 0 12 6"},e),n||(n=o.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"})))},tA=e=>{let{onChipClick:t,chips:a,className:n}=e,[l,s]=(0,o.useState)(!1),i=!(0,tv.K)("sm"),c=l?"Скрыть":"Ещё",[u,d,m,_]=((e,t)=>{let[a,n]=(0,o.useState)(e),[l,r]=(0,o.useState)(e),s=(0,o.useRef)(null),i=(0,o.useRef)(null);return(0,o.useEffect)(()=>{let e=s.current;if(null===e)throw Error("Dead code branch");let a=new ResizeObserver(e=>{let a=e[0];if(a){let{width:e}=a.contentRect,l=0,o=0,s=Array.from(a.target.children);for(let a=0;a<s.length;a++)if((l+=s[a].offsetWidth+12)<=e&&r(a),l<=(t?2*e:e))o=a;else{n(o);break}}});return a.observe(e),()=>{a.unobserve(e)}},[t,a,l]),[l,a,s,i]})(a.length,i);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{ref:m,className:(0,S.A)(tx().row,n,{[tx().open]:l}),children:[(0,r.jsx)(ty,{chips:a,onChipClick:t,lastInFirstRowChipIndex:u,isMobile:!1,useLinkChips:!0}),d<a.length-1&&(0,r.jsxs)("div",{ref:_,className:(0,S.A)(tx().toggle,{[tx().open]:l}),onClick:()=>{(0,W._)({eventAction:W.y.button,eventActionText:(0,q.y)(c)}),s(e=>!e)},children:[(0,r.jsx)(tC,{})," ",c]})]})})};var tN=a(58082),tk=a.n(tN);let tM=e=>{let{count:t,children:a,addon:n,chips:l,header:o,isLoading:s,onChipClick:i,onParamsClick:c,onShowClick:u,useLinkChips:d}=e,m=(0,r.jsx)(tA,{chips:l,onChipClick:i,useLinkChips:d});return(0,r.jsxs)("div",{className:tk().wrap,children:[o,(0,r.jsxs)("div",{className:tk().top_row,children:[(0,r.jsx)("div",{className:tk().top_row_content,children:a}),(0,r.jsxs)("div",{className:tk().top_row_buttons,children:[(0,r.jsx)(p.$n,{variant:"secondary",label:"Все параметры",pending:s,disabled:s,onClick:c,iconLeft:(0,r.jsx)(th.IconFdsParametersHorizontalO,{}),className:tk().params_button}),(0,r.jsx)(p.$n,{onClick:u,className:tk().show_button,pending:s,disabled:s,label:"Показать".concat(t?" ".concat(t):"")})]}),(0,r.jsx)("div",{className:tk().chips_row,children:m}),n&&(0,r.jsx)("div",{className:tk().addon,children:n})]})]})};tM.displayName="MainFilter";var tw=a(62835),tT=a(40818),tP=a(47052),tS=a(38200),tL=a(67129),tE=a.n(tL);function tI(){return(0,r.jsx)("iframe",{className:tE().widget,src:"https://realty.ya.ru/widgets/back-call-request"})}var tO=a(67347),tR=a(99448),tF=a.n(tR),tD=a(31070),tB=a.n(tD);let tW=e=>{let{currentTag:t,subtitle:a,className:n}=e,{handleToggleModal:l}=(0,s.u)(),i=(0,tP.Y)(),c=(0,es.sw)(),u=(0,tS.G)(),d=t?t.name:"Ипотека",{region:m,town:h}=(0,eH.z)(),v=(null==h?void 0:h.name_p)||(null==m?void 0:m.name_p),g=v?" в ".concat(v):"",f="".concat(m?"/".concat(to).concat(m.url):"").concat(h?"/".concat(h.url):""),{mainBaseUrl:y,isYandexRealty:b}=(0,ez.UK)(),x=((e,t,a,n,l)=>{let r='{"@type":"ListItem","position":1,"name":"Финуслуги","item":"'.concat(e,'"}'),o='{"@type":"ListItem","position":2,"name":"Ипотека'.concat(n,'","item":"').concat(e,"/\n      ").concat(tl).concat(l,'\n      "}'),s=',{"@type":"ListItem","position":3,"name":"&#128181 '.concat(a).concat(n,'","item":"').concat(e,"/").concat(tl).concat(t?"/".concat(ts).concat(t.url):"").concat(l,'"}'),i=t?s:"";return"{".concat('"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":['.concat(r),",").concat(o).concat(i,"]}")})(y,t,d,g,f),j=(0,o.useCallback)(()=>{(0,W._)({eventAction:W.y.link,eventActionText:(0,q.y)("Главная"),url:y})},[y]),C=(0,o.useCallback)(()=>{l(!0),(0,W._)({eventAction:W.y.popup,eventActionText:"".concat((0,q.y)("регион"),"_").concat(v)})},[v,l]);return(0,r.jsxs)("div",{className:(0,S.A)(n,tF().wrap,"bg-".concat(u)),children:[(0,r.jsx)(_.mc,{children:(0,r.jsxs)("div",{className:(0,S.A)(tF().breadcrumbs),children:[(0,r.jsx)(p.BI,{items:(()=>{let e=[{label:"Главная",href:"/"}];return t&&e.push({label:"Ипотека".concat(g),href:"".concat(tl).concat(f)}),e.push({label:"".concat(d).concat(t?"":g)}),e})(),isMobile:c,onClick:j}),(0,r.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:x}})]})}),b&&(0,r.jsx)(_.mc,{children:(0,r.jsx)(tI,{})}),(0,r.jsx)(_.mc,{children:(0,r.jsxs)("div",{className:tF().content,children:[(0,r.jsxs)("div",{className:tF().text,children:[(0,r.jsxs)("h1",{className:tF().title,children:[d," ",v&&(0,r.jsxs)(r.Fragment,{children:["в"," ",(0,r.jsx)("span",{onClick:C,className:tF().location,children:v})]})]}),(0,r.jsx)(tO.j,{tag:"p",className:tB().subtitle,children:a})]}),(0,r.jsx)("div",{className:tF().banner,children:(0,r.jsx)(tw.L,{config:i,params:tT.ZA})})]})})]})},tU=[{value:"not_required",label:"Не требуется"},{value:"ndfl",label:"Справка 2-НДФЛ"},{value:"bank_form",label:"Справка по форме банка"},{value:"custom_form",label:"Альтернативные формы"}],tq=[{value:"not_required",label:"Не требуется"},{value:"deposit",label:"Залог"},{value:"guarantee",label:"Поручительство"},{value:"not_required_and_guarantee",label:"Залог и поручительство"}],tK=[{value:"cash",label:"Наличными"},{value:"account",label:"На счет"},{value:"third_party_bank_account",label:"На счет в стороннем банке"}],tV=[{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:"Другое"}],tz=[{value:"first",label:"Первичный"},{value:"second",label:"Вторичный"}],tH=[{label:"По ставке",value:"rate",shortLabel:"Ставка"},{label:"По взносу",value:"downpayment",shortLabel:"Взнос"},{label:"По платежу",value:"payment",shortLabel:"Платеж"}],tY=[{label:"Семейная ипотека",value:"family"},{label:"Дальневосточная ипотека",value:"far_east"},{label:"Материнский капитал",value:"maternal_capital"}];var tZ=a(67221),tG=a(11404),tQ=a(3187);function tJ(){let{query:e,push:t}=(0,eN.useRouter)(),{amount:a,payment:n,downpayment:l,term:r,property_type:s,market:i,form:c,proof:u,banks:d,provision:m,flags:_,sort:p,sortDir:h,...v}=e,g=(0,o.useMemo)(()=>(function(e){let{amount:t,payment:a,downpayment:n,term:l,property_type:r,market:o,form:s,proof:i,banks:c,provision:u,flags:d,sort:m,sortDir:_}=e,p={};return"string"==typeof t&&(p.amount=Number(t)),"string"==typeof a&&(p.payment=Number(a)),"string"==typeof n&&(p.downpayment=Number(n)),"string"==typeof l&&(p.term=Number(l)),"string"==typeof r&&(p.property_type=r),"string"==typeof o&&(p.market=o),"string"==typeof s&&(p.form=s),"string"==typeof i&&(p.proof=i),"string"==typeof c&&(p.banks=(0,tQ.pi)(c)),"string"==typeof u&&(p.provision=u),"string"==typeof d&&(p.flags=(0,tQ.pi)(d)),"string"==typeof m?p.sort=m:p.sort="rate","string"==typeof _?p.sortDir=_:p.sortDir="asc",p})({amount:a,payment:n,downpayment:l,term:r,property_type:s,market:i,form:c,proof:u,banks:d,provision:m,flags:_,sort:p,sortDir:h}),[a,n,l,r,s,i,c,u,d,m,_,p,h]),f=(0,o.useRef)(v),y=(0,o.useRef)(g),b=(0,o.useRef)(t);return f.current=v,y.current=g,b.current=t,{filter:g,setFilter:(0,o.useCallback)(e=>{var t,a,n,l,r,o,s,i,c,u;if(t=y.current,a=e,t.amount===a.amount&&t.payment===a.payment&&t.downpayment===a.downpayment&&t.term===a.term&&t.property_type===a.property_type&&t.market===a.market&&t.form===a.form&&t.proof===a.proof&&(null==(n=t.banks)?void 0:n.length)===(null==(l=a.banks)?void 0:l.length)&&(null==(r=t.banks)?void 0:r.slice().sort().toString())===(null==(o=a.banks)?void 0:o.slice().sort().toString())&&t.provision===a.provision&&(null==(s=t.flags)?void 0:s.length)===(null==(i=a.flags)?void 0:i.length)&&(null==(c=t.flags)?void 0:c.slice().sort().toString())===(null==(u=a.flags)?void 0:u.slice().sort().toString())&&t.sort===a.sort&&t.sortDir===a.sortDir)return!1;let d={...function(e){let{amount:t,payment:a,downpayment:n,term:l,property_type:r,market:o,form:s,proof:i,banks:c,provision:u,flags:d,sort:m,sortDir:_}=e,p={};return void 0!==t&&(p.amount=String(t)),void 0!==a&&(p.payment=String(a)),void 0!==n&&(p.downpayment=String(n)),void 0!==l&&(p.term=String(l)),void 0!==r&&(p.property_type=r),void 0!==o&&(p.market=o),void 0!==s&&(p.form=s),void 0!==i&&(p.proof=i),void 0!==c&&(p.banks=(0,tQ.t9)(c)),void 0!==u&&(p.provision=u),void 0!==d&&(p.flags=(0,tQ.t9)(d)),void 0!==m&&(p.sort=m),void 0!==_&&(p.sortDir=_),p}(e),...f.current};return b.current({query:d},void 0,{shallow:!0}),!0},[])}}var tX=a(45712);let{useDebugValue:t$}=o,{useSyncExternalStoreWithSelector:t0}=tX,t1=e=>{let t,a=new Set,n=(e,n)=>{let l="function"==typeof e?e(t):e;if(!Object.is(l,t)){let e=t;t=(null!=n?n:"object"!=typeof l||null===l)?l:Object.assign({},t,l),a.forEach(a=>a(t,e))}},l=()=>t,r={setState:n,getState:l,getInitialState:()=>o,subscribe:e=>(a.add(e),()=>a.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."),a.clear()}},o=t=e(n,l,r);return r},t2=null,t4=e=>(function(e,t=e=>e,a){let n=t0(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,void 0);return t$(n),n})(t2=null!=t2?t2:(e=>e?t1(e):t1)(t=>{var a,n,l,r,o,s,i,c;return{subtitle:null!=(o=null==(a=e.mortgagesData)?void 0:a.subtitle)?o:"",offers:null!=(s=null==(n=e.mortgagesData)?void 0:n.page)?s:[],loading:!1,count:null!=(i=null==(l=e.mortgagesData)?void 0:l.count)?i:0,total_count:null!=(c=null==(r=e.mortgagesData)?void 0:r.total_count)?c:0,delayTimer:null,reload:async function(e,a,n,l,r){t({loading:!0});let{subtitle:o,page:s,count:i,total_count:c}=await e7.offers.list(e,a,1,r,n,l),u=null==t2?void 0:t2.getState().delayTimer;u&&clearTimeout(u),null==t2||t2.getState().delayUpdate(()=>{t({subtitle:o}),t({offers:s}),t({count:i}),t({total_count:c}),t({loading:!1})})},delayUpdate:function(e){let a=null==t2?void 0:t2.getState().delayTimer;a&&clearTimeout(a),t({delayTimer:setTimeout(e,1e3)})},load:async function(a,n,l,r,o){var s,i;t({loading:!0});let{subtitle:c,page:u,count:d,total_count:m}=await e7.offers.list(a,n,l,null!=(i=null==(s=e.currentTag)?void 0:s.url)?i:tr,r,o);null==t2||t2.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 t3=a(35987),t8=a(87768),t5=a(15462),t6=a(40090),t7=a(9640),t9=a(10741),ae=a.n(t9);let at=e=>{let{filter:t,banksOptions:a,onChange:n}=e;return(0,r.jsxs)("div",{className:ae().content,children:[(0,r.jsxs)("div",{className:ae().form,children:[(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(K.F,{label:"Сумма кредита",value:t.amount,onChange:e=>{n("amount",void 0!==e&&0!==e?Math.abs(e):void 0,"Сумма")}})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(K.F,{label:"Ежемесячный платеж до",value:t.payment,onChange:e=>{n("payment",void 0!==e&&0!==e?Math.abs(e):void 0,"Ежемесячный платеж до")}})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(K.F,{label:"Первый взнос",value:t.downpayment,onChange:e=>{n("downpayment",void 0!==e&&0!==e?Math.abs(e):void 0,"Первый взнос")}})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(p.YI,{label:"Срок",value:t.term,max:600,decimals:"never",unit:void 0!==t.term?(0,U.UB)(t.term):void 0,onChange:e=>{n("term",void 0!==e&&0!==e?Math.abs(e):void 0,"Срок")},withoutControls:!0})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(t7.l,{className:ae().select_fix,label:"Вид недвижимости",options:tV,value:t.property_type,onChange:e=>n("property_type",e,"Вид недвижимости")})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(t7.l,{className:ae().select_fix,label:"Рынок недвижимости",options:tz,value:t.market,onChange:e=>n("market",e,"Рынок недвижимости")})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(t7.l,{className:ae().select_fix,label:"Форма выдачи",options:tK,value:t.form,onChange:e=>n("form",e,"Форма выдачи")})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(t7.l,{className:ae().select_fix,label:"Подтверждение дохода",options:tU,value:t.proof,onChange:e=>n("proof",e,"Подтверждение дохода")})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(t6.L,{className:ae().select_fix,label:"Банки",options:a,values:t.banks,onChange:e=>n("banks",e,"Банки")})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(t7.l,{className:ae().select_fix,label:"Обеспечение",options:tq,value:t.provision,onChange:e=>n("provision",e,"Обеспечение")})})]}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsxs)("div",{className:ae().sort,children:[(0,r.jsx)("h3",{className:ae().sort_title,children:"Дополнительно"}),tY.map((e,a)=>{var l;return(0,r.jsx)("div",{className:ae().fieldWrapper,children:(0,r.jsx)(p.Sc,{className:ae().checkboxField,value:null==(l=t.flags)?void 0:l.includes(e.value),label:e.label,onChange:()=>{var a;return n("flags",(0,t5.L$)(null!=(a=t.flags)?a:[],e.value),"Дополнительно")}})},a)})]})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsx)(_.cG,{className:ae().separator})}),(0,r.jsx)("div",{className:(0,S.A)(ae().wrap),children:(0,r.jsxs)("div",{className:ae().sort,children:[(0,r.jsx)("h3",{className:ae().sort_title,children:"Сортировка"}),tH.map((e,a)=>(0,r.jsx)("div",{className:ae().sort_wrap,children:(0,r.jsx)(p.sx,{name:"radio",value:t.sort,label:e.label,checked:t.sort===e.value,className:ae().checkboxField,onChange:()=>n("sort",e.value,"Сортировка")})},a))]})})]})},aa=e=>{let{visible:t,filter:a,offersCount:n,banksOptions:l,onHide:o,onChange:s,onDrop:i,onShow:c}=e;return(0,r.jsx)(t8.K,{count:n,isOpen:t,isMobile:!1,pageUrl:y.h.IPOTEKA,title:"Все параметры",onCLickShow:()=>c(),onClose:o,onClickReset:()=>i(),children:(0,r.jsx)(at,{filter:a,onChange:s,banksOptions:l})})};var an=a(16904),al=a.n(an);let ar=(0,tp.O)(),ao=e=>{let{ssr:t}=e,{scrollSmooth:a}=(0,t3.Ll)(),{filter:n,setFilter:l}=tJ(),{visible:s,show:i,hide:c}=(0,tG.g)(),{subtitle:u,count:d}=t4({filter:n,mortgagesData:t.mortgagesData,currentTag:t.currentTag}),m=(0,o.useMemo)(()=>tV.map(e=>{let{value:t,label:a}=e;return{value:t,label:a,color:n.property_type===t?"black":"default"}}),[n.property_type]),p=(0,o.useCallback)(e=>{var t,a;(0,W._)({eventAction:W.y.filterCatalog,eventCategory:W.y.filterCatalog,eventLabel:"property_type",eventValue:(0,q.y)(null!=(a=null==(t=tV.find(t=>t.value===e))?void 0:t.label)?a:"")}),l({...n,property_type:e===n.property_type?"":e})},[n,l]),h=(0,o.useCallback)(()=>l({}),[l]),[v]=(0,tZ.e)(()=>(0,e8.C3)().then(e=>null!=e?e:[]),[]),f=(0,o.useMemo)(()=>(null!=v?v:[]).map(e=>({value:e.id,label:e.name})),[v]),y=()=>{(0,W._)({eventAction:W.y.button,eventActionText:(0,q.y)("показать")}),a({offset:-90})},b=(0,o.useCallback)(()=>{(0,W._)({eventAction:W.y.button,eventActionText:(0,q.y)("все параметры")}),i()},[i]),x=(e,t,a)=>{!function(e,t){ar(()=>(0,W._)({eventAction:W.y.filterCatalog,eventCategory:W.y.filterCatalog,eventLabel:(0,q.y)(e),eventValue:"string"==typeof t?t:JSON.stringify(t)}))}(a,t),l({...n,[e]:t})};return(0,r.jsxs)("div",{className:al().wrap,children:[(0,r.jsx)(tW,{subtitle:u,currentTag:t.currentTag}),(0,r.jsxs)(_.mc,{id:g.sn,children:[(0,r.jsxs)(tM,{count:d,onChipClick:p,chips:m,onParamsClick:b,onShowClick:y,children:[(0,r.jsx)(K.F,{label:"Сумма кредита",value:n.amount,onChange:e=>{x("amount",void 0!==e&&0!==e?Math.abs(e):void 0,"Сумма")}}),(0,r.jsx)(K.F,{label:"Ежемесячный платеж до",value:n.payment,onChange:e=>{x("payment",void 0!==e&&0!==e?Math.abs(e):void 0,"Ежемесячный платеж до")}})]}),(0,r.jsx)(aa,{offersCount:d,visible:s,filter:n,banksOptions:f,onChange:x,onHide:c,onDrop:h,onShow:()=>{c(),y()}})]})]})};var as=a(74356),ai=a(72809),ac=a(60650),au=a(18315),ad=a(12837),am=a(47245),a_=a.n(am);let ap=e=>{let{isOpen:t,url:a,data:n,onAllConditionsClick:l,onClose:s}=e,i=(0,o.useMemo)(()=>n?(e=>{let t={sectionTitle:"Условия ипотеки",body:[{label:"Сумма кредита",value:(0,V.jC)(e.amount.from,e.amount.to)}]},a=e.full_price;if(a){let n=e.interest_rate;t.body.push({label:"ПСК",value:(0,c.o)(a),description:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n          Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре."},{label:"Процентная ставка",value:(0,r.jsxs)("div",{children:[(0,V.sP)(Number(n.from),Number(n.to)),n.comment&&(0,r.jsx)("div",{className:a_().comment,dangerouslySetInnerHTML:{__html:n.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,ad.t)(e.loan)}),(e.period.from||e.period.to)&&t.body.push({label:"Срок погашения кредита",value:"".concat((0,V.Qd)(Number(e.period.from),Number(e.period.to))," мес.")}),(e.property_type.comment||e.property_type.text)&&t.body.push({label:"Вид недвижимости",value:(0,ad.t)(e.property_type)}),(e.real_estate_market.comment||e.real_estate_market.text)&&t.body.push({label:"Рынок недвижимости",value:(0,ad.t)(e.real_estate_market)}),(e.insurance.comment||e.insurance.text)&&t.body.push({label:"Страхование",value:(0,ad.t)(e.insurance)}),[t,{sectionTitle:"О банке",body:[{label:"Сайт",value:e.site.title}]}]})(n):[],[n]);return void 0===n||void 0===a?null:(0,r.jsx)(au.a,{isOpen:t,cancelButton:{title:"Все условия по ипотеке",onClick:l},submitButton:{title:"Оформить онлайн",url:a},onClose:s,bankName:n.bankName,dataPoints:i,pageUrl:y.h.IPOTEKA,offerUpdateData:n.m_updated_at})};var ah=a(43734),av=a.n(ah);let ag="DetailModalText",af=e=>{var t,a;let{data:n,isMobile:l=!1,onClose:s,mainPageUrl:i,onFlag:c}=e,[u,d]=(0,o.useState)(null),_=null!=(t=null==u?void 0:u.link)?t:"",h=null!=(a=null==_?void 0:_.includes("#"))&&a,v=(0,tQ.vh)(_),f=()=>{if(s(),u&&(0,eF.o)({event:"data-event",eventAction:"click_button_".concat((0,q.y)(u.modalButtonText)),eventCategory:i}),(null==u?void 0:u.filterFlags)&&c&&c(u.filterFlags),h){let e=_.split("#")[1];(0,ew.e)(e,{position:"top"})}_||(0,ew.e)(g.cA,{offset:l?0:-100,position:"top"})};return(0,o.useEffect)(()=>{n&&d(n)},[n]),(0,o.useEffect)(()=>{let e=document.querySelectorAll("#".concat(ag," > a")),t=e=>{e.target instanceof HTMLAnchorElement&&(0,W._)({eventAction:W.y.link,eventActionText:e.target.innerText,url:e.target.href})};return e.forEach(e=>{e.addEventListener("click",t)}),()=>{e.forEach(e=>{e.removeEventListener("click",t)})}}),(0,r.jsxs)("div",{className:av().content,children:[(0,r.jsx)("div",{className:av().logo,children:(null==u?void 0:u.logo)&&(0,r.jsx)(J(),{width:l?344:494,height:l?128:180,src:null==u?void 0:u.logo,alt:"logo"})}),(0,r.jsxs)("div",{className:av().body,children:[(0,r.jsx)("h3",{className:av().title,children:null==u?void 0:u.title}),(0,r.jsx)("p",{id:ag,className:av().text,dangerouslySetInnerHTML:{__html:u?u.modalText:""}})]}),v||h?(0,r.jsx)(p.$n,{as:"a",target:"_blank",href:h?void 0:_,size:"big",onClick:f,children:null==u?void 0:u.modalButtonText}):(0,r.jsx)(m(),{href:_,children:(0,r.jsx)(p.$n,{size:"big",onClick:f,children:null==u?void 0:u.modalButtonText})})]})},ay=e=>{let{data:t,isOpen:a,onClose:n,mainPageUrl:l,onFlag:o}=e,s=(0,es.sw)();return(0,r.jsx)(ee.Z,{children:(0,r.jsx)(p.aF,{open:a,onClose:n,header:{title:""},size:"l",children:(0,r.jsx)("div",{className:av().container,children:(0,r.jsx)(af,{data:t,isMobile:s,onClose:n,mainPageUrl:l,onFlag:o})})})})};var ab=a(46119),ax=a(31758),aj=a.n(ax);function aC(){return(aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e}).apply(null,arguments)}let aA=function(e){return o.createElement("svg",aC({xmlns:"http://www.w3.org/2000/svg",width:17,height:17,fill:"none",viewBox:"0 0 17 17"},e),l||(l=o.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"})))},aN={src:"/kredity/assets/_next/static/media/life-situations-1.a2fc9534.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAANlBMVEXOsISxuJvSvIjSSUbn3LXYr3/QjW316q/p1Ji+opLZvZaoPEDx7cuxc2fGTU66S1HLaF7r3p+cEv2jAAAACnRSTlP+/////////Pz4xwPQRQAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBnYmDlEGRn4OLh5WNmY2RhYGAR4OdmZeAEAAlXALLihgonAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},ak={src:"/kredity/assets/_next/static/media/life-situations-2.17787fd4.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAM1BMVEWvelPeum9/SjWVQTHNp2fjzIvw14fy45vVwIGvVDy1mnDowHPGfVuCQCivhWGoaUK9jlh/j3KTAAAACnRSTlP9////+P///Pr+jghZTQAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBjZWVnZWNn4GLk5+Nh4GZlYBDgZWLmZGQBAAkHAKZDFTImAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},aM={src:"/kredity/assets/_next/static/media/life-situations-3.1396f824.png",height:180,width:494,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAOVBMVEXWxXPMsInKh3PMPiqul1zRwZLd26bt5Jvf7LC5tWna4LDVvnDe1Z/Zx5OhPDm3LS7TsWhwOTXv2qEeoPlIAAAACnRSTlP9/////v///fz45qrS1AAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxjYGfnYWXl4eBgEOJl5ONn4mJjYOAWYBZkYeAEAAskAMzGoQhaAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},aw=(0,o.memo)(e=>{let{mainPageUrl:t,onFlag:a,isMobile:n}=e,[l,s]=(0,o.useState)(!1),[i,c]=(0,o.useState)(null),{onMouseDown:u,onMouseMove:d,resetState:m}=(0,ab.I)(),h=(0,o.useMemo)(()=>n?288:348,[n]),v=e=>e.preventDefault,f=(0,o.useCallback)(e=>{c(e),s(!0),(0,W._)({eventAction:W.y.popup,eventActionText:e.title})},[]),y=(0,o.useCallback)(()=>{var e;(0,W._)({eventAction:W.y.popdown,eventActionText:null!=(e=null==i?void 0:i.title)?e:""}),c(null),s(!1)},[null==i?void 0:i.title]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("section",{className:aj().section,id:g.ov,children:(0,r.jsxs)(_.mc,{children:[(0,r.jsx)("h2",{className:aj().title,children:"Как вам помочь?"}),(0,r.jsx)("div",{className:aj().sliderContainer,children:(0,r.jsx)(p.Ap,{options:{slidesPerView:n?1:3,spaceBetween:n?16:32,centeredSlides:n,autoplay:{delay:5e3}},wrapperClass:aj().sliderWrapper,pagination:n,children:(function(){let{mainBaseUrl:e}=(0,ez.zj)();return[{id:1,logo:aN,logoMobile:aN,title:"Льготная ипотека",modalText:"Найдем для вас предложения с пониженной ставкой — например, семейную ипотеку или ипотеку для ИТ-специалистов. Выберите льготную программу и подайте заявку на ипотечный кредит на Финуслугах",modalButtonText:"Выбрать ипотеку",link:"#".concat(g.cA),filterFlags:["3"]},{id:2,logo:ak,logoMobile:ak,title:"Рефинансирование кредита",modalText:"Хотите снизить ставку или уменьшить ежемесячный платеж по ипотеке? Покажем банки, в которые вы сможете перевести свой ипотечный кредит и получить более комфортные условия",modalButtonText:"Выбрать ипотеку",link:"/ipoteka/teg_refinansirovanie"},{id:3,logo:aM,logoMobile:aM,title:"Налоговый вычет за ипотеку",modalText:'Если вы работаете официально, государство может вернуть 13% налога. Это 650 000 ₽ — до 260 000 ₽ от стоимости недвижимости и до 390 000 ₽ за проценты по ипотеке. Больше о том, как оформить налоговый вычет — в <a href="'.concat(e,'/glossariy/imushchestvennyj_nalogovyj_vychet_pri_ipoteke" target="_blank" style="color: var(--color-purple-600)">инструкции</a> на Финуслугах'),modalButtonText:"Выбрать ипотеку",link:"#".concat(g.cA)}]})().map(e=>(0,r.jsxs)(p.DQ,{className:aj().card,onMouseDown:u,onMouseMove:d,onMouseLeave:m,onMouseUp:m,onClick:()=>f(e),onTouchStart:v,onTouchMove:v,onTouchEnd:v,children:[(0,r.jsx)("div",{className:aj().imgWrapper,children:(0,r.jsx)(J(),{width:h,height:128,alt:"banner"+e.id,src:n?e.logoMobile:e.logo})}),(0,r.jsxs)("div",{className:aj().cardBody,children:[(0,r.jsx)("p",{className:aj().subTitle,children:e.title}),(0,r.jsx)(p.$n,{shape:"circle-icon",className:aj().cardButton,iconLeft:(0,r.jsx)(aA,{className:aj().iconArrow})})]})]},e.id))})})]})}),(0,r.jsx)(ay,{mainPageUrl:t,data:i,isOpen:l,onClose:y,onFlag:a})]})});var aT=a(54767),aP=a(72278),aS=a(91423),aL=a.n(aS);let aE=e=>{let{icon:t,offer:a,onDetails:n,isMobile:l}=e,s=(0,o.useMemo)(()=>{let e=[],t=a.full_price;return t&&e.push({caption:"ПСК",tooltipText:"ПСК (полная стоимость кредита) — это процентная ставка, отражающая все ваши затраты по кредиту за год. ПСК включает не только проценты, но и сопутствующие платежи.\n        Информация на сайте носит справочный характер. Указанные значения ПСК получены из открытых источников. Актуальная и точная информация будет содержаться в вашем кредитном договоре.",text:(0,c.o)(t)}),e.push({caption:"Сумма",text:(0,V.ej)({from:Number(a.amount.from),to:Number(a.amount.to)},{currency:(0,aT.O)(a.currency_id).unit})},{caption:"Первый взнос",text:a.first_payment?"от ".concat(a.first_payment.from,"%"):""}),e},[a.full_price,a.amount.from,a.amount.to,a.currency_id,a.first_payment]);return(0,r.jsxs)("div",{className:aL().mortgage_info,children:[(0,r.jsxs)("div",{className:aL().bank_info,children:[(0,r.jsx)("div",{className:aL().icon,children:t}),(0,r.jsx)(aP.U,{caption:a.title,text:a.bank_name,className:(0,S.A)(aL().group,aL().title_group)}),l&&(0,r.jsx)("div",{className:aL().icon_button,onClick:n,children:(0,r.jsx)(th.IconFdsInfoCircleO,{})})]}),(0,r.jsx)("div",{className:aL().groups,children:s.map((e,t)=>e.text&&(0,r.jsx)(aP.U,{caption:e.caption,text:e.text,tooltipText:e.tooltipText,className:aL().group},t))})]})},aI=e=>{let{className:t,icon:a,offer:n,onDetails:l,onOpen:s,isMobile:i}=e,c=(0,o.useMemo)(()=>(e=>{let t=[];return 3===e.online_application.type?t.push({label:"Открытие онлайн на Финуслугах",variant:"purple"}):1===e.online_application.commercial?t.push({label:"Подача заявки на сайте банка",variant:"primary"}):t.push({label:"Открытие в банке",variant:"primary"}),t.push({label:1===e.income_proof.not_required?"Без справок":"Требуется подтверждение дохода",variant:"primary"}),t})(n),[n]),u=(0,o.useCallback)(e=>{e.stopPropagation(),null==l||l()},[l]),d=(0,r.jsx)("div",{className:aL().chips_row,children:c.map(e=>(0,r.jsx)("div",{children:(0,r.jsx)(p.vw,{label:e.label,variant:e.variant,className:aL().chip,rounded:!0})},e.label))});return(0,r.jsxs)("div",{className:(0,S.A)(t,aL().wrap),onClick:s,children:[(0,r.jsxs)("div",{className:aL().top_row,children:[(0,r.jsx)("div",{className:aL().top_row_content,children:(0,r.jsx)(aE,{icon:a,offer:n,onDetails:u,isMobile:i})}),(0,r.jsxs)("div",{className:aL().top_row_buttons,children:[!i&&(0,r.jsx)("div",{className:aL().icon_button,onClick:u,children:(0,r.jsx)(th.IconFdsInfoCircleO,{})}),i&&d,(0,r.jsx)(p.$n,{className:aL().show_button,size:"xs",label:"Оформить"})]})]}),!i&&d]})};var aO=a(14834),aR=a.n(aO);let aF=e=>{let{className:t,title:a,offers:n,onDetails:l,onOpen:s,isMobile:i}=e,c=(0,o.useCallback)(e=>{(0,W._)({eventAction:W.y.button,eventActionText:"information_".concat(e.bank_url),eventLabel:e.id}),(0,W._)({eventAction:W.y.popup,eventActionText:"information_".concat(e.bank_url),eventLabel:e.id}),l(e.id)},[l]),u=(0,o.useCallback)(e=>{(0,W._)({eventAction:W.y.link,eventActionText:(0,q.y)(e.title),url:"".concat(tl,"/").concat(e.bank_url)}),s(e)},[s]);return(0,r.jsxs)("div",{className:t,children:[(0,r.jsx)("p",{className:aR().listTitle,children:a}),(0,r.jsx)("div",{className:aR().list,children:n.map(e=>(0,r.jsx)(o.Fragment,{children:(0,r.jsx)(aI,{onDetails:()=>c(e),onOpen:()=>u(e),className:aR().card,icon:(0,r.jsx)(J(),{width:40,height:40,src:e.bank_logo_mob,alt:"logo"}),offer:e,isMobile:i})},e.id))})]})};var aD=a(88508),aB=a(28732),aW=a.n(aB);let aU=(0,o.memo)(e=>{let{chips:t,sort:a,sortOrder:n,onChangeSort:l,onChangeSortOrder:o,sortOptions:s,onClick:i,inView:c,filterRef:u,className:d,onClickChip:m}=e,_=(0,tv.K)("xs");return(0,r.jsx)("div",{ref:u,className:aW().filter,children:(0,r.jsx)(aD.x,{className:d,isNewSortRadios:!0,chips:t,isIncreaseSort:"asc"===n,onChangeIncreaseSort:e=>{let t=e?"asc":"desc";o(t),(0,W._)({eventAction:W.y.button,eventActionText:"sort_direction_".concat(t)})},sortTypeItems:s,sortTypeValue:null!=a?a:ti.RATE,onChangeSortType:e=>{var t;l(e),(0,W._)({eventAction:W.y.button,eventActionText:"sort_type_".concat(null==(t=tH.find(t=>t.value===e))?void 0:t.label)})},onClickParams:i,isMobile:!_,isFixed:c,onClickChip:m})})});aU.displayName="SmallFilter";var aq=a(8868),aK=a(41329),aV=a(54926),az=a(27964),aH=a(27116);let aY=(0,o.memo)(e=>{let t=function(e){let{name:t,description:a,offers:n,offersCount:l,url:r}=e,{mainBaseUrl:o}=(0,ez.UK)();if(0===n.length)return;let s=(0,aK.l)({url:"".concat(o).concat(tl).concat(r),priceCurrency:"RUB",offers:n,getLowPrice:e=>{let{amount:t}=e;return void 0!==t.from&&""!==t.from?Number(t.from):1e4},getHighPrice:e=>{let{amount:t}=e;return void 0!==t.to&&""!==t.to?Number(t.to):void 0},offerCount:l});return(0,az.Z)({name:t,description:a,image:"".concat(o).concat(aq.au),offers:s,aggregateRating:(0,aV.E)({ratingValue:4.7,reviewCount:1645,bestRating:5,worstRating:1})})}(e);return void 0===t?null:(0,r.jsx)(aH.S,{schema:t})});aY.displayName="MortgageOffersSchema";var aZ=a(5435),aG=a(95018),aQ=a(28502),aJ=a.n(aQ);let aX=e=>3===e.online_application.type,a$=e=>1===e.online_application.commercial,a0=e=>!aX(e)&&!a$(e),a1=e=>{var t,a,n,l;let{ssr:s}=e,i=(0,t3.yX)(),{query:c}=(0,eN.useRouter)(),[u,d]=(0,o.useState)(Number(c.page)||1),{filter:m,setFilter:p}=tJ(),{show:h}=(0,tG.g)(),v=(0,es.sw)(),[f,y]=(0,o.useState)(!1),b=(0,o.useRef)(null),x=(0,o.useRef)(()=>null),{offers:j,loading:C,reload:A,load:N,clear:k,count:M,total_count:w}=t4({...s,filter:m}),T=null!=(n=null==(t=s.currentTag)?void 0:t.url)?n:tr,{region:P,town:L}=(0,eH.z)(),E=(0,o.useRef)(!0);(0,o.useEffect)(()=>{E.current?E.current=!1:A(m,10,null==P?void 0:P.url,null==L?void 0:L.url,T)},[m,null==P?void 0:P.url,null==L?void 0:L.url,T,A]);let I=(0,o.useRef)(!0);(0,tZ.s)(()=>{I.current?I.current=!1:(k(),N(m,10,u,null==P?void 0:P.url,null==L?void 0:L.url))},[m],500);let O=(0,o.useCallback)(()=>{d(e=>{let t=e+1;return N(m,10,t,null==P?void 0:P.url,null==L?void 0:L.url),(0,W._)({eventAction:W.y.button,eventActionText:(0,q.y)("показать еще предложения")}),t})},[N,m,null==P?void 0:P.url,null==L?void 0:L.url]),R=(e=>[{label:"Сумма кредита: ".concat(e.amount?(0,t5.ZV)(e.amount):"от 1"," ₽"),id:"amount"},{label:"Платеж: ".concat(e.payment?"до ".concat((0,t5.ZV)(e.payment)," ₽ в мес"):"любой"),id:"payment"},{label:"Срок: ".concat(e.term?"".concat(String(e.term)," мес."):"любой"),id:"term"},{label:"Банки: ".concat(e.banks?String(e.banks.length):"любые"),id:"banks"}])(m),F=(0,o.useMemo)(()=>j.filter(aX),[j]),D=(0,o.useMemo)(()=>j.filter(a$),[j]),B=(0,o.useMemo)(()=>j.filter(a0),[j]),U=s.currentTag?s.currentTag.name:"Ипотека",K=(null==L?void 0:L.name_p)||(null==P?void 0:P.name_p),V=[...F,...D,...B],z="".concat((null==(a=s.currentTag)?void 0:a.url)?"/".concat(ts).concat(s.currentTag.url):"").concat(P?"/".concat(to).concat(P.url):"").concat(L?"/".concat(L.url):""),H=function(e){let[t,a]=(0,o.useState)(),n=(0,o.useMemo)(()=>{var a;return null!=(a=e.find(e=>e.id===t))?a:null},[t,e]),l=(0,o.useCallback)(()=>a(void 0),[]);return{data:n,visible:null!==t,show:a,hide:l}}(j),Y=(0,o.useMemo)(()=>{var e,t,a,n;if(!H.data)return;let l=s.banks.find(e=>{var t;return(null==(t=H.data)?void 0:t.bank_id)===+e.id});return{...H.data,site:{title:null!=(e=null==l?void 0:l.site.title)?e:null,url:null!=(t=null==l?void 0:l.site.url)?t:null},bankName:null!=(a=null==l?void 0:l.name)?a:H.data.bank_name,logo:null!=(n=null==l?void 0:l.logo_mob)?n:""}},[H.data,s.banks]),Z=(0,o.useCallback)(()=>{(0,W._)({eventAction:W.y.button,eventActionText:(0,q.y)("все параметры")}),h()},[h]),G=e=>1===e.online_application.commercial?e.online_application.url:"".concat(tl,"/").concat(e.url),Q=(0,o.useCallback)(e=>{window.open(G(e))},[]),J=(0,o.useCallback)(()=>{var e,t;(0,W._)({eventAction:W.y.popdown,eventActionText:"information_".concat(null==(e=H.data)?void 0:e.bank_name),eventLabel:null==(t=H.data)?void 0:t.id}),H.hide()},[H]),X=(0,o.useCallback)(()=>{var e,t;(0,W._)({eventAction:W.y.button,eventActionText:(0,q.y)("Все условия по ипотеке"),eventLabel:null==(e=H.data)?void 0:e.id}),(null==H||null==(t=H.data)?void 0:t.url)&&window.open("".concat(tl,"/").concat(H.data.url),"_blank")},[H]),$=H.data?G(H.data):void 0;(0,o.useEffect)(()=>(window.removeEventListener("scroll",x.current),x.current=()=>{if(!b.current)return;let{top:e}=b.current.getBoundingClientRect();y(e<=32)},window.addEventListener("scroll",x.current),()=>window.removeEventListener("scroll",x.current)),[]);let ee=(0,o.useCallback)(e=>{p({...m,sort:e})},[m,p]),et=(0,o.useCallback)(e=>{p({...m,sortDir:e})},[m,p]),ea=10*u<M;return(0,r.jsxs)("div",{className:aJ().wrap,children:[(0,r.jsx)(aw,{mainPageUrl:"#",onFlag:e=>{p({...m,flags:e})},isMobile:v}),(0,r.jsxs)("div",{id:g.cA,className:aJ().products_list_container,children:[j&&(0,r.jsxs)("h2",{className:aJ().title,children:["Найдено ",M," ",(0,r.jsx)("span",{className:aJ().titleHide,children:(0,ac.v)(M)})," ",M===w?"":"из ".concat(w)]}),(0,r.jsx)("div",{className:(0,S.A)(aJ().filter_wrapper,aJ().newLayout),children:(0,r.jsx)(aU,{chips:R,sort:m.sort||ti.RATE,sortOrder:m.sortDir||"asc",onChangeSort:ee,onChangeSortOrder:et,sortOptions:tH,onClick:Z,filterRef:b,inView:f,onClickChip:()=>{h()}})}),!C&&0===M&&(0,r.jsx)(_.mc,{children:(0,r.jsx)(ai.O,{onChangeParams:h})}),(0,r.jsxs)(_.mc,{as:"section",children:[(0,r.jsx)("div",{ref:i,children:j.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:aJ().offers_lists,children:[F.length>0&&(0,r.jsx)(aF,{onOpen:Q,onDetails:H.show,title:"Онлайн-ипотеки от Финуслуг",offers:F,isMobile:v}),D.length>0&&(0,r.jsx)(aF,{onOpen:Q,onDetails:H.show,title:"Предложения на Финуслугах",offers:D,isMobile:v}),B.length>0&&(0,r.jsx)(aF,{onOpen:Q,onDetails:H.show,title:"Предложения рынка кредитов",offers:B,isMobile:v})]}),(0,r.jsx)(aY,{name:"".concat(U).concat(K?" в ".concat(K):""),description:null!=(l=s.mortgagesData.description)?l:"",offers:V,offersCount:M,url:z}),ea&&(0,r.jsx)(aG.e,{page:u,onClick:O})]})}),C&&(0,r.jsx)("div",{className:aJ().placeholder,children:[,,,,,].fill(0).map((e,t)=>(0,r.jsx)(as.E,{},t))}),(0,r.jsx)(aZ.h,{tag:"p",className:aJ().subtitle,children:s.mortgagesData.subtitle})]}),(0,r.jsx)(ap,{data:Y,isOpen:H.visible,url:$,onClose:J,onAllConditionsClick:X})]})]})};var a2=a(48673),a4=a(12771),a3=a(73584);async function a8(e){let t=await (0,a4.zy)("Mortgages.json?".concat("url","=").concat(encodeURIComponent(e)));if(1!==t.length)throw new u.m_("Mortgages tag not found: ".concat(e));return function(e){let{url:t,name:a}=e;return{name:a,url:t}}(t[0])}new a3.AP(a8);var a5=a(23517),a6=a(2510);async function a7(){return(await (0,a4.zy)("Mortgages.json?tags&short=1")).mortgage_tags.reduce((e,t)=>(t.name!==a6.Z2&&e.set(t.url,function(e){let{name:t,url:a,url_redirect:n}=e,l={name:t,url:a},r=(0,a5.Y)(n);return void 0!==r&&(l.url_redirect=r),l}(t)),e),new Map)}new a3.B4(a7);var a9=a(24323),ne=a(58699);a(46215);var nt=a(162),na=a(64998);a(99514);var nn=a(79790);a(44860);var nl=a(35807),nr=a.n(nl);let no=[(0,r.jsx)(o.Fragment,{children:"Используйте фильтры для указания желаемых параметров: суммы, срока и формы выдачи"},0),(0,r.jsx)(o.Fragment,{children:"Изучите и выберите подходящее предложение"},1),(0,r.jsx)(o.Fragment,{children:"Перейдите к оформлению"},2),(0,r.jsx)(o.Fragment,{children:"Заполните анкету, дождитесь одобрения и получите деньги любым удобным для вас способом"},3)];function ns(e){var t,a,n,l;let{layout:s,regions:i,tags:c,tag:u,mortgagesData:d,posts:m,questionsData:_,banks:p,expertQuote:v,experts:g,support:f}=e,{region:y,town:b}=(0,eH.z)(),[x,j]=(0,o.useState)(null!=v?v:void 0),C=null!=g?g:void 0,{asPath:A}=(0,eN.useRouter)(),N=null!=(a=null==(t=A.split("/").find(e=>e.includes("teg_")))?void 0:t.slice(4))?a:"DEFAULT",k=null!=(n=c.find(e=>e.url===N))?n:void 0,M=(0,tQ.m)(A);return(0,a2.w5)(()=>{(0,nt.Zs)(M).then(j)},[M]),(0,r.jsxs)(e5.P,{data:s,children:[(0,r.jsx)(h.I,{title:d.title,description:d.description}),(0,r.jsx)(eX.t,{}),(0,r.jsx)(ao,{ssr:{mortgagesData:d,currentRegion:null!=(l=null==y?void 0:y.url)?l:"",currentTag:k}}),(0,r.jsx)(a1,{ssr:{mortgagesData:d,currentTag:k,banks:p}}),(0,r.jsx)(a9.I,{steps:no,variant:"secondary"}),void 0!==x&&(0,r.jsx)(na.V,{quote:x}),void 0!==C&&(0,r.jsx)("section",{className:nr().experts,children:(0,r.jsx)(eR.J,{children:(0,r.jsx)(nn.o,{heading:"Ипотека",experts:C})})}),(0,r.jsx)(ne.f,{type:"bank"}),(0,r.jsx)(t_,{currentTag:u,region:y,town:b,posts:m,questionsData:_,regions:i,tags:c?c.filter(e=>e.url!==N):[],support:f})]})}var ni=a(48523),nc=a(36612),nu=!0;let nd=(0,o.memo)(function(e){var t,a;return(0,r.jsx)(s.C,{children:e.isShowcase?(0,r.jsx)(ni.N,{region:null!=(t=e.region)?t:void 0,town:null!=(a=e.town)?a:void 0,children:(0,r.jsx)(ns,{...e})}):(0,r.jsx)(nc.K,{children:(0,r.jsx)(e6,{...e})})})})},9640:(e,t,a)=>{"use strict";a.d(t,{l:()=>r});var n=a(37876),l=a(20988);function r(e){var t;let{value:a,...r}=e,o=(t=a,r.options.find(e=>e.value===t));return(0,n.jsx)(l.l6,{...r,value:o,onChange:e=>{let t=null==e?void 0:e.value;r.onChange(t)}})}},10741:e=>{e.exports={content:"mortgages-filter-content_content__SnZqu",form:"mortgages-filter-content_form__Y3Me4",wrap:"mortgages-filter-content_wrap__ZundD",separator:"mortgages-filter-content_separator__4pj05",sort_title:"mortgages-filter-content_sort_title__4H6Ji",sort_wrap:"mortgages-filter-content_sort_wrap__xUbD8",sort_field:"mortgages-filter-content_sort_field__LwKrM",checkboxField:"mortgages-filter-content_checkboxField__8YkvP",footer:"mortgages-filter-content_footer__2q7g7",submit:"mortgages-filter-content_submit__NEcSP"}},11404:(e,t,a)=>{"use strict";a.d(t,{g:()=>l});var n=a(14232);function l(){let[e,t]=(0,n.useState)(!1);return{visible:e,show:(0,n.useCallback)(()=>t(!0),[]),hide:(0,n.useCallback)(()=>t(!1),[])}}},12341:e=>{e.exports={title:"MortgagesList_title__l06z9",offersListContainer:"MortgagesList_offersListContainer__ZgMuQ",listTitle:"MortgagesList_listTitle__skUIP",container:"MortgagesList_container__cgMaG",listItem:"MortgagesList_listItem__IZLd8"}},12837:(e,t,a)=>{"use strict";a.d(t,{t:()=>o});var n=a(37876),l=a(26685),r=a.n(l);function o(e){let{comment:t,text:a}=e;return void 0!==t&&void 0!==a?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:a}}),(0,n.jsx)("div",{className:r().commentText,dangerouslySetInnerHTML:{__html:t}})]}):void 0!==a?(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:a}}):void 0!==t?(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:t}}):void 0}},14834:e=>{e.exports={listTitle:"styles_listTitle__MeOax",list:"styles_list__bYSPt",card:"styles_card__HXa22",button_more_offers:"styles_button_more_offers__YXOO_"}},15462:(e,t,a)=>{"use strict";a.d(t,{L$:()=>n,ZV:()=>l});let n=(e,t)=>(null==e?void 0:e.includes(t))?e.filter(e=>e!==t):(e||[]).concat([t]),l=e=>r(e.toString().split("").reverse(),3).reverse().map(e=>e.reverse().join("")).join(" "),r=(e,t)=>{let a=[];for(let n=0;n<e.length;++n){let l=Math.floor(n/t);a[l]||(a[l]=[]),a[l].push(e[n])}return a}},16904:e=>{e.exports={wrap:"styles_wrap__d_QXg",content:"styles_content__y9L_W",page_title:"styles_page_title__Y8O0t"}},18315:(e,t,a)=>{"use strict";a.d(t,{a:()=>m});var n=a(37876),l=a(14232),r=a(20988),o=a(3010),s=a(74356),i=a(16416),c=a(32266),u=a(94289),d=a.n(u);let m=(0,l.memo)(e=>{let{isOpen:t,cancelButton:a,submitButton:u,onClose:m,bankName:_,dataPoints:p,offerUpdateData:h,pageUrl:v}=e,g=(0,n.jsxs)("div",{className:d().content,children:[p.map(e=>(0,n.jsxs)(l.Fragment,{children:[(0,n.jsx)("h2",{className:d().title,children:e.sectionTitle}),(0,n.jsx)("div",{className:d().list,children:e.body.length?e.body.map((e,t)=>(0,n.jsxs)("div",{className:d().field,children:[(0,n.jsxs)("div",{className:d().titleWrapper,children:[(0,n.jsx)("h3",{className:d().fieldTitle,children:null==e?void 0:e.label}),(null==e?void 0:e.description)&&(0,n.jsx)(c.A,{triggerClassName:d().icon,content:e.description})]}),(0,n.jsx)("div",{className:d().fieldContent,children:null==e?void 0:e.value})]},t)):Array.from({length:6},(e,t)=>(0,n.jsx)(s.E,{className:d().skeletonContent},t))})]},e.sectionTitle)),(0,n.jsx)(i.n,{className:d().actualDate,pageUrl:v,offerDate:h})]}),f=(0,n.jsxs)("div",{className:d().footer,children:[(0,n.jsx)(r.$n,{variant:"secondary",onClick:a.onClick,children:a.title}),(0,n.jsx)(r.$n,{rel:"nofollow",as:"a",href:u.url,onClick:u.onClick,children:u.title})]});return(0,n.jsx)(o.Z,{children:(0,n.jsx)(r.aF,{open:t,onClose:m,footer:{children:f},header:{title:null!=_?_:""},className:d().mobilePopup,size:"l",children:(0,n.jsx)("div",{className:d().container,children:g})})})});m.displayName="OfferInfoModal"},19852:(e,t,a)=>{"use strict";var n=a(14232),l=a(38806),r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=l.useSyncExternalStore,s=n.useRef,i=n.useEffect,c=n.useMemo,u=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,a,n,l){var d=s(null);if(null===d.current){var m={hasValue:!1,value:null};d.current=m}else m=d.current;var _=o(e,(d=c(function(){function e(e){if(!i){if(i=!0,o=e,e=n(e),void 0!==l&&m.hasValue){var t=m.value;if(l(t,e))return s=t}return s=e}if(t=s,r(o,e))return t;var a=n(e);return void 0!==l&&l(t,a)?t:(o=e,s=a)}var o,s,i=!1,c=void 0===a?null:a;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]},[t,a,n,l]))[0],d[1]);return i(function(){m.hasValue=!0,m.value=_},[_]),u(_),_}},24459:(e,t,a)=>{"use strict";var n=a(14232),l="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=n.useState,o=n.useEffect,s=n.useLayoutEffect,i=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!l(e,a)}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 a=t(),n=r({inst:{value:a,getSnapshot:t}}),l=n[0].inst,u=n[1];return s(function(){l.value=a,l.getSnapshot=t,c(l)&&u({inst:l})},[e,a,t]),o(function(){return c(l)&&u({inst:l}),e(function(){c(l)&&u({inst:l})})},[e]),i(a),a};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},24523:(e,t,a)=>{"use strict";a.d(t,{O:()=>n});let n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=null;return a=>{t&&clearInterval(t),t=setTimeout(a,e)}}},26685:e=>{e.exports={commentText:"offer-terms_commentText__S3vmq"}},27526:e=>{e.exports={logo:"MortgageListItem_logo__jaNvS",placeholderLogo:"MortgageListItem_placeholderLogo__QyaLT"}},27607:e=>{e.exports={row:"styles_row__dHTUh",open:"styles_open__GqvFI",firstRow:"styles_firstRow__is75c",toggle:"styles_toggle__2r_74"}},28502:e=>{e.exports={wrap:"styles_wrap___CLvg",filter_wrapper:"styles_filter_wrapper__5o6ZP",newLayout:"styles_newLayout__xY8R1",products_list_container:"styles_products_list_container__Opwa2",title:"styles_title__sj9KH",titleHide:"styles_titleHide__0VpmN",offers_lists:"styles_offers_lists__sXzjq",placeholder:"styles_placeholder__yy33F",subtitle:"styles_subtitle__jCooy"}},28732:e=>{e.exports={filter:"styles_filter__jrtk3"}},31070:e=>{e.exports={container:"styles_container__SqFUD",utpTags:"styles_utpTags__899sO",content:"styles_content__pxEzH",breadcrumbs:"styles_breadcrumbs__jH8EC",text:"styles_text__0SGL8",title:"styles_title__WaTv0",location:"styles_location__z_oKT",subtitle:"styles_subtitle__oSzuM",moreButton:"styles_moreButton___h8zi",banner:"styles_banner__6_J8S",background:"styles_background__KxgOM",newLayout:"styles_newLayout__iR_wy"}},31443:e=>{e.exports={notFoundWrapper:"CreditsNotFound_notFoundWrapper__QdXvJ",searchIcon:"CreditsNotFound_searchIcon__m8B3S",notFoundText:"CreditsNotFound_notFoundText__vZE_n",changeParamsButton:"CreditsNotFound_changeParamsButton__0_UOj"}},31758:e=>{e.exports={section:"styles_section__C_XdG",title:"styles_title__lnE9N",card:"styles_card__hTNw7",imgWrapper:"styles_imgWrapper__Ue6gi",cardBody:"styles_cardBody__r7l0F",subTitle:"styles_subTitle__ayqhw",cardButton:"styles_cardButton__xJxcm",iconArrow:"styles_iconArrow__q2lrn",sliderContainer:"styles_sliderContainer__ox24U"}},32180:e=>{e.exports={title:"MortgageCalculator_title__4voM_",container:"MortgageCalculator_container__obbIq",collapseArrow:"MortgageCalculator_collapseArrow__hRzZc",collapseArrowOpened:"MortgageCalculator_collapseArrowOpened__I21wK",fieldsContainer:"MortgageCalculator_fieldsContainer__w9LxI",field:"MortgageCalculator_field__oVB4u",fieldRange:"MortgageCalculator_fieldRange__sz28u",collapseContainerWrapper:"MortgageCalculator_collapseContainerWrapper__ghdFY",collapseContainer:"MortgageCalculator_collapseContainer__Q7_hC",fieldWrapper:"MortgageCalculator_fieldWrapper__BjPhj",tooltip:"MortgageCalculator_tooltip__KD02w",typeDescription:"MortgageCalculator_typeDescription__rfz_b",link:"MortgageCalculator_link__dOau3",chips:"MortgageCalculator_chips__MoApk",legend:"MortgageCalculator_legend__MgAJW",chipsForm:"MortgageCalculator_chipsForm__oVkqA",additionalItemsWrapper:"MortgageCalculator_additionalItemsWrapper__Fbp0i",additionalItemsTitle:"MortgageCalculator_additionalItemsTitle__i__HE",additionalItem:"MortgageCalculator_additionalItem__roEmt",divider:"MortgageCalculator_divider__3m4Vm",additionalItemName:"MortgageCalculator_additionalItemName__3Yczj",fieldsWrapper:"MortgageCalculator_fieldsWrapper__AQ_Rz",fieldValue:"MortgageCalculator_fieldValue__ZvdYe",label:"MortgageCalculator_label__k_Jz1",additionalItemCollapsible:"MortgageCalculator_additionalItemCollapsible__gjP85",collapsedContainer:"MortgageCalculator_collapsedContainer__qn0lC",toggle:"MortgageCalculator_toggle__4yNag",toggleInput:"MortgageCalculator_toggleInput__320VY",toggleTrack:"MortgageCalculator_toggleTrack___PN4n",toggleThumb:"MortgageCalculator_toggleThumb__JzFTQ",firstPaymentRangeWrapper:"MortgageCalculator_firstPaymentRangeWrapper__Fp1GW",firstPaymentLabels:"MortgageCalculator_firstPaymentLabels__Uclje",firstPaymentLabel:"MortgageCalculator_firstPaymentLabel__jcOTO"}},34850:(e,t,a)=>{"use strict";a.d(t,{NC:()=>l,cT:()=>n});let n={pp:"h",ps:"foam",p2:"hojk"},l="К сожалению, мы не нашли кредитов с такими параметрами"},35807:e=>{e.exports={experts:"mortgages-offers-page_experts__A4Sbb"}},38806:(e,t,a)=>{"use strict";e.exports=a(24459)},40090:(e,t,a)=>{"use strict";a.d(t,{L:()=>r});var n=a(37876),l=a(20988);function r(e){let{label:t,options:a,values:r,className:o,onChange:s}=e,i=null==r?void 0:r.reduce((e,t)=>{let n=a.find(e=>String(e.value)===String(t));return n&&e.push(n),e},[]);return(0,n.jsx)(l.l6,{className:o,label:t,options:a,value:null!=i?i:void 0,selectedValue:e=>e.length>1?"Выбрано (".concat(e.length,")"):e[0].label,onChange:e=>{s(e?e.map(e=>e.value):void 0)},multiple:!0})}},40431:e=>{e.exports={page:"MortgageDetail_page__sKQYA",breadcrumbs:"MortgageDetail_breadcrumbs__teCQy",faqSection:"MortgageDetail_faqSection__UW6NG",supportSection:"MortgageDetail_supportSection__05Wn6",about:"MortgageDetail_about___qTO0"}},41402:e=>{e.exports={container:"MortgageApplySteps_container__sxW1j"}},42256:e=>{e.exports={container:"fab-button_container__OxsQu",expandableContainer:"fab-button_expandableContainer__DaTzp",expanded:"fab-button_expanded__KfN3z"}},43734:e=>{e.exports={title:"DetailModal_title__byAo_",container:"DetailModal_container__0QySE",content:"DetailModal_content__wNrBy",logo:"DetailModal_logo__Y3Gfm",body:"DetailModal_body__OhBkH",text:"DetailModal_text__bzuql"}},45712:(e,t,a)=>{"use strict";e.exports=a(19852)},46119:(e,t,a)=>{"use strict";a.d(t,{I:()=>l});var n=a(14232);let l=()=>{let[e,t]=(0,n.useState)(!1),[a,l]=(0,n.useState)(!1),r=(0,n.useRef)({x:0,y:0}),o=(0,n.useCallback)(e=>{l(!0),r.current={x:e.screenX,y:e.screenY},r.current&&r.current.x===e.screenX&&r.current.y===e.screenY&&t(!1)},[]);return{isDragged:e,isTouched:a,onMouseDown:o,onMouseMove:(0,n.useCallback)(e=>{r.current&&r.current.x===e.screenX&&r.current.y===e.screenY||(t(!0),r.current={x:e.screenX,y:e.screenY})},[]),resetState:(0,n.useCallback)(()=>{t(!1),l(!1)},[])}}},47245:e=>{e.exports={mobilePopup:"styles_mobilePopup__qG2vn",container:"styles_container__o8xJL",title:"styles_title__u7Vww",content:"styles_content__5LJ6m",buttons:"styles_buttons__VE9L_",contentRow:"styles_contentRow__m3ok_",findConfigBlock:"styles_findConfigBlock__KOllm",footer:"styles_footer__kJQ4n",header:"styles_header__4RRDv",bankName:"styles_bankName__hzrqV",field:"styles_field__R6qky",titleWrapper:"styles_titleWrapper__Y4kn3",icon:"styles_icon__Cfzrb",fieldTitle:"styles_fieldTitle__koHjG",fieldContent:"styles_fieldContent__55SfP",comment:"styles_comment__DgBXq"}},54767:(e,t,a)=>{"use strict";a.d(t,{O:()=>n});let n=e=>{switch(e){case 2:case"2":case"USD":return{shortName:"долл.",unit:"$",name:"долларах",code:"USD",locale:"en",num:2};case 3:case"3":case"EUR":return{shortName:"евро",unit:"€",name:"евро",code:"EUR",locale:"en",num:3};case 4:case"4":case"CNY":return{shortName:"юань",unit:"\xa5",name:"юанях",code:"CNY",locale:"zh-CN",num:4};case 5:case"5":case"CHF":return{shortName:"франк",unit:"₣",name:"франках",code:"CHF",locale:"en",num:5};case 6:case"6":case"GBP":return{shortName:"фунт",unit:"\xa3",name:"фунтах",code:"GBP",locale:"en",num:6};case 7:case"7":case"JPY":return{shortName:"иена",unit:"\xa5",name:"иенах",code:"JPY",locale:"ja-JP",num:7};default:return{shortName:"руб.",unit:"₽",name:"рублях",code:"RUB",locale:"ru",num:1}}}},56685:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n={src:"/kredity/assets/_next/static/media/search.b3dc20e8.svg",height:192,width:212,blurWidth:0,blurHeight:0}},58082:e=>{e.exports={wrap:"styles_wrap__xmlYe",top_row:"styles_top_row__a2v4e",top_row_content:"styles_top_row_content__Y_c8l",top_row_buttons:"styles_top_row_buttons__X2LpS",action_button:"styles_action_button__4LW6f",show_button:"styles_show_button__Z61tW",chips_row:"styles_chips_row__WBMhp",addon:"styles_addon__kq2V5",params_button:"styles_params_button__Em2ZN"}},66451:e=>{e.exports={title:"MortgagesCreditsCatalog_title__3ALPZ",card:"MortgagesCreditsCatalog_card__v_YKX",subTitle:"MortgagesCreditsCatalog_subTitle__JnyUy",container:"MortgagesCreditsCatalog_container__5BmyA",cardsList:"MortgagesCreditsCatalog_cardsList__gHJUT",icon:"MortgagesCreditsCatalog_icon__S5VCn",link:"MortgagesCreditsCatalog_link__Bbro2"}},67129:e=>{e.exports={widget:"yandex-realty_widget__xtPmC"}},72809:(e,t,a)=>{"use strict";a.d(t,{O:()=>d});var n=a(37876),l=a(54587),r=a.n(l),o=a(20988),s=a(56685),i=a(34850),c=a(31443),u=a.n(c);let d=e=>{let{onChangeParams:t}=e;return(0,n.jsxs)("div",{className:u().notFoundWrapper,children:[(0,n.jsx)(r(),{className:u().infoIcon,src:s.A,alt:"?"}),(0,n.jsx)("p",{className:u().notFoundText,children:i.NC}),void 0!==t&&(0,n.jsx)(o.$n,{variant:"secondary",className:u().changeParamsButton,onClick:t,children:"Изменить параметры"})]})}},78131:(e,t,a)=>{"use strict";a.d(t,{A:()=>n});let n={src:"/kredity/assets/_next/static/media/banner-6.5d66df25.svg",height:230,width:256,blurWidth:0,blurHeight:0}},78240:e=>{e.exports={container:"PaymentScheduleModal_container__WjKOq",withoutTabsContainer:"PaymentScheduleModal_withoutTabsContainer__sL5TF",value:"PaymentScheduleModal_value__hb6Gt",content:"PaymentScheduleModal_content__ccBR7",buttons:"PaymentScheduleModal_buttons__t_rw3",schedulePaymentsWrapper:"PaymentScheduleModal_schedulePaymentsWrapper__vuMsP",tabsContentWrapper:"PaymentScheduleModal_tabsContentWrapper__SBdzq",button:"PaymentScheduleModal_button__XgN14",active:"PaymentScheduleModal_active__ghKAR",tabelsWrapper:"PaymentScheduleModal_tabelsWrapper__Vrtbe",tableSchedule:"PaymentScheduleModal_tableSchedule__9C31o",columnTitles:"PaymentScheduleModal_columnTitles__2Nev8",columnTotalParams:"PaymentScheduleModal_columnTotalParams__noafF",titleYearSchedule:"PaymentScheduleModal_titleYearSchedule__GDqLl",contentSchedule:"PaymentScheduleModal_contentSchedule__D3Ifo",rowTabel:"PaymentScheduleModal_rowTabel__cgkZo",bodyField:"PaymentScheduleModal_bodyField__si6mT",field:"PaymentScheduleModal_field__EmCax",fieldLargeText:"PaymentScheduleModal_fieldLargeText__V8hm7",copyButton:"PaymentScheduleModal_copyButton__Afvcu",socialNetworkSection:"PaymentScheduleModal_socialNetworkSection__tXKRk",socialNetworkTitle:"PaymentScheduleModal_socialNetworkTitle__kutAv",socialButton:"PaymentScheduleModal_socialButton__VLXdF",footer:"PaymentScheduleModal_footer__P_fi8",fullWidth:"PaymentScheduleModal_fullWidth__d7e6Q",yearAccordion:"PaymentScheduleModal_yearAccordion__vT35D",mobileFooter:"PaymentScheduleModal_mobileFooter__A_gys",mobileActionButton:"PaymentScheduleModal_mobileActionButton__0eHGc",paymentSummaryButton:"PaymentScheduleModal_paymentSummaryButton__nUjmZ",expandableSocialMediaButton:"PaymentScheduleModal_expandableSocialMediaButton__d1PP8"}},80020:(e,t,a)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/ipoteka/[[...segments]]",function(){return a(6897)}])},86700:e=>{e.exports={faq_container:"styles_faq_container__YZoO_"}},88548:e=>{e.exports={container:"MortgageInfo_container__sbkaS",containerFull:"MortgageInfo_containerFull__7m2O1",containerWithoutCalculator:"MortgageInfo_containerWithoutCalculator__0CoQ_",promo:"MortgageInfo_promo__7syHy",left:"MortgageInfo_left__5QAPk",right:"MortgageInfo_right__nwez0",qrDesc:"MortgageInfo_qrDesc__5dVqL",qrMobile:"MortgageInfo_qrMobile__W15cn",typeDescription:"MortgageInfo_typeDescription__bvIrV",legend:"MortgageInfo_legend__mTeDq",firstPaymentAddonAfter:"MortgageInfo_firstPaymentAddonAfter__bG4Wd"}},91423:e=>{e.exports={wrap:"styles_wrap__6TRS7",icon_button:"styles_icon_button__dK1LA",top_row:"styles_top_row__Uk7QJ",top_row_content:"styles_top_row_content__kk_4z",preposition:"styles_preposition__zJ_qc",top_row_buttons:"styles_top_row_buttons__KXpZP",show_button:"styles_show_button__VDLP9",chips_row:"styles_chips_row__k80AF",chip:"styles_chip__oznHA",mortgage_info:"styles_mortgage_info__jKRJE",bank_info:"styles_bank_info__UeeJT",icon:"styles_icon__Oug2a",groups:"styles_groups__LmVvB",group:"styles_group__5qWoM",title_group:"styles_title_group__lbYNP"}},94289:e=>{e.exports={title:"styles_title__b38Q2",mobilePopup:"styles_mobilePopup__G3e3Z",container:"styles_container__IGo0H",list:"styles_list__eSXKF",content:"styles_content__44gQX",buttons:"styles_buttons__co1FZ",contentRow:"styles_contentRow__VrBta",findConfigBlock:"styles_findConfigBlock__Mv4DU",footer:"styles_footer__hi3PE",field:"styles_field__u00Wg",titleWrapper:"styles_titleWrapper___05yj",icon:"styles_icon__38Wzs",fieldTitle:"styles_fieldTitle__03wac",fieldContent:"styles_fieldContent__OnBG0",comment:"styles_comment__gnX9Y",actualDate:"styles_actualDate__sl9Yc",skeletonContent:"styles_skeletonContent__8znd2"}},99448:e=>{e.exports={wrap:"styles_wrap__urJsb",content:"styles_content__gWWJg",text:"styles_text__bvQ2U",breadcrumbs:"styles_breadcrumbs__sV21c",title:"styles_title__pRY_s",location:"styles_location__Lr8si",subtitle:"styles_subtitle__rpqbj",moreButton:"styles_moreButton__YLOZP",banner:"styles_banner__H82c_"}},99542:e=>{e.exports={link:"styles_link__XzCzB",chip:"styles_chip__bgIDt",black:"styles_black__aacN4",transparentChip:"styles_transparentChip__4ZT35",hiddenChip:"styles_hiddenChip__COVhQ"}}},e=>{e.O(0,[7492,2224,8325,7404,4587,4981,5695,822,8231,5189,1653,167,5091,222,3795,636,6593,8792],()=>e(e.s=80020)),_N_E=e.O()}]);