(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8830],{26232:function(e,t,n){"use strict";function i(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}n.d(t,{Z:function(){return l}});var o=n(71002);function r(e,t){if(t.length<e)throw TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+t.length+" present")}function l(e,t){return r(2,arguments),function(e,t){r(2,arguments);var n=function(e){r(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===(0,o.Z)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):(("string"==typeof e||"[object String]"===t)&&"undefined"!=typeof console&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(Error().stack)),new Date(NaN))}(e),l=i(t);if(isNaN(l))return new Date(NaN);if(!l)return n;var s=n.getDate(),a=new Date(n.getTime());return(a.setMonth(n.getMonth()+l+1,0),s>=a.getDate())?a:(n.setFullYear(a.getFullYear(),a.getMonth(),s),n)}(e,-i(t))}},65848:function(e,t,n){"use strict";n.d(t,{O:function(){return a}});var i=n(85893),o=n(86010),r=n(67294),l=n(92403),s=n.n(l);let a=(0,r.memo)(e=>{let{className:t}=e;return(0,i.jsx)("div",{className:(0,o.Z)(s().skeleton,t)})});a.displayName="Skeleton"},71147:function(e,t,n){"use strict";n.d(t,{s:function(){return i}});let i=e=>{let t=String(e);return(e<11||e>20)&&["2","3","4"].includes(t[t.length-1])?"предложения":"1"===t[t.length-1]&&"1"!==t[t.length-2]?"предложение":"предложений"}},91886:function(e,t,n){"use strict";n.d(t,{Vv:function(){return l},rf:function(){return o},ys:function(){return r}});var i=n(67294);let o=(e,t)=>{let n=(0,i.useRef)(!1);(0,i.useEffect)(()=>{n.current?e():n.current=!0},t)};function r(e){let t=(0,i.useRef)(e);return t.current=e,t}let l=i.memo},77259:function(e,t,n){"use strict";n.d(t,{J:function(){return x}});var i,o,r,l,s=n(85893),a=n(59194),c=n(34588),f=n(79644),u=n(86010),_=n(25675),d=n.n(_),m=n(67294),p=n(94908),g={src:"/kredity/assets/_next/static/media/corner.2e0a9e26.svg",height:40,width:40,blurWidth:0,blurHeight:0},h=n(59123),v=n.n(h);(i=r||(r={})).button="button",i.detail="detail",i.compare="compare",i.favorites="favorites",i.share="share",(o=l||(l={})).detail="Подробнее",o.compare="Сравнить",o.favorites="Избранное",o.share="Поделиться";let x=e=>{let{icon:t,buttonText:n="Подробнее",buttonUrl:i,companyName:o,productName:l,productUrl:f,advantageAmountFrom:_,advantageBonus:h,advantageAmountTo:x,tags:N,advertising:k,className:j,expandButton:I,onDetailInfoClick:y,onExpandClick:B,onButtonClick:C,variant:w="primary"}=e,D=[_,h,x].filter(e=>"string"==typeof(null==e?void 0:e.text)?null==e?void 0:e.text.length:null==e?void 0:e.text),[Z,M]=(0,m.useState)(!1),S=(0,m.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),M(!0),null==B||B()},[B]),T=(0,m.useCallback)(function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return n=>{switch(t&&(n.preventDefault(),n.stopPropagation()),e){case r.detail:return null==y?void 0:y(r.detail);case r.button:return null==C?void 0:C(r.button)}}},[C,y]),W=!!I&&!Z,P=!!(null==k?void 0:k.length)&&(0,s.jsx)("div",{className:(0,u.Z)(v().advertising,{[v().noneMargin]:!W,[v().relative]:!W}),children:k});return(0,s.jsxs)("div",{className:(0,u.Z)(j,v().plate,v()["plate--".concat(w)]),onClick:()=>{window.open(i,"_blank")},children:[(0,s.jsxs)("div",{className:v().body,children:[(0,s.jsxs)("div",{className:v().left,children:[(0,s.jsxs)("div",{className:v().header,children:[(0,s.jsxs)("div",{className:v().titleWrapper,children:[(0,s.jsx)("div",{className:(0,u.Z)(v().logoIcon,{[v().noneCircle]:(null==t?void 0:t.type)==="rectangle"}),children:"element"in t?t.element:t}),(0,s.jsxs)("div",{className:v().title,children:[(0,s.jsx)("p",{className:v().productName,title:l,children:(0,s.jsx)(c.rU,{href:f,target:"_blank",children:l})}),(0,s.jsx)("p",{className:v().companyName,title:o,children:(0,s.jsx)("span",{children:o})})]})]}),!!(null==D?void 0:D.length)&&(0,s.jsx)("div",{className:v().advantagesList,children:D.map((e,t)=>(0,s.jsx)("div",{className:(0,u.Z)(v().advantageItem,{[v().longItem]:D.length<3}),children:(0,s.jsx)(p.S,{caption:e.caption,text:e.text,tooltipText:e.tooltipText})},t))}),(0,s.jsx)(b,{isMobile:!0,handleButtonClick:T})]}),(0,s.jsx)("div",{className:v().tagsList,children:N.map((e,t)=>(0,s.jsx)(c.Vp,{className:v().tag,label:e.label,variant:e.variant},t))})]}),(0,s.jsx)("div",{className:v().right,children:(0,s.jsxs)("div",{className:v().buttonsWrapper,children:[(0,s.jsxs)("div",{className:v().block,children:[(0,s.jsx)(b,{isMobile:!1,handleButtonClick:T}),(0,s.jsx)(c.zx,{rel:"nofollow",as:"a",size:"s",href:i,target:"_blank",className:(0,u.Z)(v().button,v().appButton),onClick:T(r.button,!1),children:n})]}),!W&&P]})})]}),(W||!!k)&&(0,s.jsxs)("div",{className:v().footer,children:[P,W&&(0,s.jsxs)("button",{className:v().expandButton,onClick:S,children:[I,(0,s.jsx)(a.IconFdsMoreO,{})]})]}),W&&(0,s.jsx)(d(),{className:v().cornerIcon,src:g,alt:""})]})},b=e=>{let{isMobile:t,handleButtonClick:n}=e;return(0,s.jsx)("button",{className:(0,u.Z)(v().button,v().iconButton,v().detailButton,{[v().mobile]:t,[v().desktop]:!t}),onClick:n(r.detail),children:(0,s.jsx)(f.ax,{name:"finuslugi:detail",className:(0,u.Z)(v().icon,v().detailIcon)})})}},94908:function(e,t,n){"use strict";n.d(t,{S:function(){return c}});var i=n(85893),o=n(59194),r=n(34588),l=n(86010),s=n(11982),a=n.n(s);function c(e){let{caption:t,text:n,tooltipText:s,className:c,Icon:f=o.IconFdsQuestionCircleO}=e;return(0,i.jsxs)("div",{style:{display:"flex",flexDirection:"column"},className:(0,l.Z)(a().wrapper,c),children:[(0,i.jsxs)("div",{className:a().titleWrapper,children:[(0,i.jsx)("span",{className:a().title,children:t}),void 0!==s&&(0,i.jsx)(r.u,{text:s,withoutTail:!0,position:"right",zIndex:200,children:(0,i.jsx)(f,{size:20,onClick:e=>null==e?void 0:e.stopPropagation()})})]}),(0,i.jsx)("span",{className:a().text,children:n})]})}},92403:function(e){e.exports={skeleton:"Skeleton_skeleton__QIS3q",move:"Skeleton_move__TZqyh"}},59123:function(e){e.exports={plate:"offer-list-item_plate__1l4Bc","plate--primary":"offer-list-item_plate--primary__JTA5a","plate--secondary":"offer-list-item_plate--secondary__tG_Xe",detailButton:"offer-list-item_detailButton__UE6yU",title:"offer-list-item_title__uXjFN",productName:"offer-list-item_productName__x1VU_",advantagesList:"offer-list-item_advantagesList__3kiVs",advantageItem:"offer-list-item_advantageItem__7UTNI",advantageItemCaption:"offer-list-item_advantageItemCaption__D5yGz",body:"offer-list-item_body__eDWM8",left:"offer-list-item_left__VI40X",right:"offer-list-item_right__83YGn",header:"offer-list-item_header__7bkId",tagsList:"offer-list-item_tagsList__hoJzG",tag:"offer-list-item_tag__97QiO",titleWrapper:"offer-list-item_titleWrapper__FruiX",logoIcon:"offer-list-item_logoIcon__IPZ5v",noneCircle:"offer-list-item_noneCircle__3ViHs",companyName:"offer-list-item_companyName__vt18w",iconClassName:"offer-list-item_iconClassName__ZqeRo",advantageItemTitle:"offer-list-item_advantageItemTitle__5bPNK",longItem:"offer-list-item_longItem__PrDkv",buttonsWrapper:"offer-list-item_buttonsWrapper__fl_EI",block:"offer-list-item_block__cE5xX",dopButtonsBlock:"offer-list-item_dopButtonsBlock__0g3kY",desktopBlock:"offer-list-item_desktopBlock__DXjEK",mobileBlock:"offer-list-item_mobileBlock__4Mkl_",dopButton:"offer-list-item_dopButton__phj42",dopIcon:"offer-list-item_dopIcon__d3Zl9",iconCompare:"offer-list-item_iconCompare__B7tXm",iconButton:"offer-list-item_iconButton__fiB2J",icon:"offer-list-item_icon__iPXC_",detailIcon:"offer-list-item_detailIcon__3Jof8",desktop:"offer-list-item_desktop__A5lI_",mobile:"offer-list-item_mobile__gQ2qP",appButton:"offer-list-item_appButton__yHQ7k",button:"offer-list-item_button__XDet1",footer:"offer-list-item_footer__fMs65",expandButton:"offer-list-item_expandButton__zxW8_",expandIcon:"offer-list-item_expandIcon___N9hv",advertising:"offer-list-item_advertising__muCIZ",noneMargin:"offer-list-item_noneMargin__bt9p6",relative:"offer-list-item_relative__lkN0q",cornerIcon:"offer-list-item_cornerIcon__zbStP"}},11982:function(e){e.exports={wrapper:"offer-info-block_wrapper__6BCk7",titleWrapper:"offer-info-block_titleWrapper__JZSTw",title:"offer-info-block_title__axudX",text:"offer-info-block_text__HHa_5"}},55063:function(e,t,n){"use strict";n.d(t,{Me:function(){return l},r:function(){return r},r3:function(){return o}});var i=n(37317);function o(e,t){if(!e||!t)return!1;let n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&(0,i.Zq)(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function r(e,t){let n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function l(e){return(null==e?void 0:e.ownerDocument)||document}}}]);