(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2704],{5085:()=>{},8755:()=>{},24769:()=>{},43780:(e,t,a)=>{"use strict";a.d(t,{E:()=>o});var r=a(95155),i=a(29722),l=a(86253),s=a(83640);a(8755);let n=Object.freeze({text:(0,s.g)("text")});function o({as:e,className:t,style:a,children:s,size:c,weight:d,lineClamp:p,dataQa:h,dataId:u,...m}){return(0,r.jsx)(e||"span",{className:(0,i.A)(n.text,t),style:{...c&&{fontSize:`var(--font-size-${c})`,lineHeight:`var(--font-line-height-${c})`},...d&&{fontWeight:`var(--font-weight-${d})`},...p&&{WebkitLineClamp:p,lineClamp:p,...l.l},...a},...m,"data-id":u,"data-qa":h,children:s})}o.displayName="Text"},79253:(e,t,a)=>{"use strict";a.d(t,{D:()=>d});var r=a(95155),i=a(29722),l=a(86253),s=a(83640);a(95124);let n={display:"h1",hero:"h1",h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6"},o=(0,s.g)("heading"),c=Object.freeze({heading:o,states:Object.freeze({display:`${o}--display`,hero:`${o}--hero`,h1:`${o}--h1`,h2:`${o}--h2`,h3:`${o}--h3`,h4:`${o}--h4`,h5:`${o}--h5`,h6:`${o}--h6`})}),d=({as:e,children:t,weight:a,type:s,lineClamp:o,className:d,style:p,dataQa:h,dataId:u,...m})=>{var g;let _=e||n[s]||"div",v=/^h[1-6]$/.test(_),b=(null==(g=s.match(/\d+/))?void 0:g[0])||1;return(0,r.jsx)(_,{className:(0,i.A)(c.heading,c.states[s],d),style:{...a?{fontWeight:`var(--font-weight-${a})`}:void 0,...o?{WebkitLineClamp:o,lineClamp:o,...l.l}:void 0,...p},role:v?null:"heading","aria-level":v?null:b,...m,"data-id":u,"data-qa":h,children:t})};d.displayName="Heading"},89328:(e,t,a)=>{"use strict";let r;a.d(t,{g3:()=>ee}),a(24769);var i=a(95155),l=a(12115),s=a(66216),n=a(79253),o=a(43780),c=a(29722),d=a(92670),p=a(82726),h=a(1448),u=a(8260),m=a(57349),g=a(7596),_=a(24691),v=a(17194),b=a(51736),f=a(33715),y=a(24964),$=a(81143),x=a(55727),w=a(66627),j=a(17806),k=((r=k||{}).light="light",r.gray="gray",r);let C=(0,g.g)("best-offers-banner","sc"),N=Object.freeze({bestOffersBaner:C,wrapper:`${C}__wrapper`,wideWrapper:`${C}__wrapper--wide`,whiteWrapper:`${C}__wrapper--white`,content:`${C}__content`,header:`${C}__header`,title:`${C}__title`,subtitle:`${C}__subtitle`,icon:`${C}__icon`,iconBlack:`${C}__icon--black`,iconWhite:`${C}__icon--white`,image:`${C}__image`}),A=({title:e,image:t,url:a,description:r,backgroundColor:l,textColor:s,wide:n,theme:d,handleBannerDataLayerPush:p,className:h})=>{let u=d===k.gray,g={"--bg-base":(null==l?void 0:l.base)??(u?"var(--color-white)":"var(--color-gray-400)"),"--bg-hover":(null==l?void 0:l.hover)??"var(--color-gray-500)"};return(0,i.jsxs)("div",{className:(0,c.A)(N.wrapper,h,{[N.wideWrapper]:n}),style:g,onClick:()=>{p(),window.open(a,"_blank")},children:[(0,i.jsxs)("div",{className:N.content,children:[(0,i.jsxs)("div",{className:N.header,children:[(0,i.jsx)(o.E,{weight:"medium",size:"24",className:N.title,style:{color:s},children:e}),(0,i.jsx)("div",{className:(0,c.A)(N.icon,{[N.iconBlack]:u&&!(null!=s&&s.includes("color-white")),[N.iconWhite]:u&&!!(null!=s&&s.includes("color-white"))}),children:(0,i.jsx)(m.K,{size:32})})]}),r&&(0,i.jsx)(o.E,{size:"16",style:{color:s},children:r})]}),(null==t?void 0:t.url)&&(0,i.jsx)("picture",{className:N.image,children:(0,i.jsx)("img",{src:t.url,width:t.width??150,height:t.height??"auto",alt:`Баннер ${e}`,loading:"lazy"})})]})},T=(0,g.g)("offer-card","sc"),z=Object.freeze({offerCard:T,wrapper:`${T}__wrapper`,whiteWrapper:`${T}__wrapper--white`,bankInfo:`${T}__bankInfo`,units:`${T}__units`,unitsColumn:`${T}__units--column`,unit:`${T}__unit`,unitRow:`${T}__unit--row`,unitTitleWrapper:`${T}__unitTitleWrapper`,unitTitle:`${T}__unitTitle`,tooltipIcon:`${T}__tooltipIcon`,unitValue:`${T}__unitValue`,bottomBlock:`${T}__bottomBlock`,tags:`${T}__tags`,tag:`${T}__tag`,button:`${T}__button`,buttonRounded:`${T}__button--rounded`,buttonAdditional:`${T}__button--additional`}),L={display:"inline-block",lineHeight:0,backfaceVisibility:"hidden"},W={width:"1em",height:"1em",overflowClipMargin:"content-box",overflow:"hidden"},P=e=>l.createElement("svg",{width:24,height:24,fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},l.createElement("path",{d:"M13.328 2.869a1.444 1.444 0 00-2.65 0A694.174 694.174 0 008.47 7.85a648.96 648.96 0 00-5.196.656c-1.266.165-1.673 1.722-.823 2.553a641.289 641.289 0 003.856 3.748A704.06 704.06 0 005.29 20.22c-.214 1.16.995 2.24 2.15 1.572a650.04 650.04 0 004.562-2.66c1.504.887 3.346 1.956 4.564 2.66 1.154.667 2.363-.411 2.15-1.572a702.887 702.887 0 00-1.017-5.412 664.068 664.068 0 003.856-3.748c.85-.832.443-2.389-.824-2.553-1.383-.18-3.479-.45-5.195-.657a696.41 696.41 0 00-2.208-4.982z",clipRule:"evenodd",fill:"currentColor",fillRule:"evenodd"}));function O({className:e,style:t,boxSize:a,size:r,onClick:i}){return l.createElement("span",{className:e,style:{...L,...i&&{cursor:"pointer"},...r&&{fontSize:`${r}px`},...a&&{width:`${a}px`,height:`${a}px`,display:"inline-flex",alignItems:"center",justifyContent:"center"},...t},...i?{role:"button",tabIndex:"0",onClick:i}:{}},l.createElement(P,{viewBox:"0 0 24 24",style:W}))}O.displayName="IconFdsStarF";let I=({title:e,value:t,tooltip:a,textColor:r,unitsAsColumn:s,isTitleUnit:n})=>{let d;return(0,i.jsxs)("div",{className:(0,c.A)(z.unit,{[z.unitRow]:s}),children:[(0,i.jsxs)("div",{className:z.unitTitleWrapper,children:[(0,i.jsx)(o.E,{size:"14",className:z.unitTitle,children:e}),a&&(0,i.jsx)(f.m,{text:a,children:(0,i.jsx)(b.k,{className:z.tooltipIcon})})]}),(0,i.jsx)(o.E,{weight:"medium",size:n?"18":s?"16":"24",className:z.unitValue,style:{color:r},children:e.includes("Рейтинг")?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(O,{size:16,style:{color:"var(--color-orange-400)"}}),t]}):(d=t.split("₽")).map((e,t)=>(0,i.jsxs)(l.Fragment,{children:[e,t<d.length-1&&(0,i.jsx)(o.E,{weight:"regular",children:"₽"})]},`${e}-${t}`))})]})},B=({tags:e,isGrayTheme:t})=>{let a=t?"secondary":"primary";return(0,i.jsx)("div",{className:z.tags,children:e.sort((e,t)=>e.order-t.order).map(e=>(0,i.jsx)(y.v,{className:z.tag,label:e.label,variant:e.variant?e.variant:a,rounded:!0},e.label))})},E=({companyName:e,name:t,url:a,logo:r,units:l,tags:s,additionalButton:n,unitsAsColumn:o,dataLayerPush:p,eventCategory:h,productType:u,theme:m,buttonClassName:g,eventValueByUnitTitle:b})=>{let f=m===k.gray,y=a=>{(0,d.p)(p,u);let r={event:"data-event",eventCategory:h,eventAction:`click_button_${(0,v.t)(a)}_${u}`,eventLabel:(0,v.t)(`${e}_${t}`)};if(b){let e=l.find(e=>e.title.toLowerCase()===b.toLowerCase());e&&(r.eventValue=(0,v.t)(e.value))}p(r)};return(0,i.jsxs)("div",{className:(0,c.A)(z.wrapper,{[z.whiteWrapper]:f}),children:[(0,i.jsxs)("div",{className:z.bankInfo,children:[r&&(0,i.jsx)("img",{src:r,width:56,height:56,alt:`${e} logo`,loading:"lazy"}),(0,i.jsx)(I,{title:t,value:e,isTitleUnit:!0})]}),(0,i.jsx)("div",{className:(0,c.A)(z.units,{[z.unitsColumn]:o}),children:l.map(e=>(0,i.jsx)(I,{title:e.title,value:e.value,tooltip:e.tooltip,textColor:e.textColor,unitsAsColumn:o},`${e.title}-${e.value}`))}),(0,i.jsxs)("div",{className:z.bottomBlock,children:[s&&(0,i.jsx)(B,{tags:s,isGrayTheme:f}),n&&n.text.trim().length>0&&(0,i.jsx)(_.$,{as:"a",className:(0,c.A)(z.button,z.buttonRounded,z.buttonAdditional),size:"xs",label:n.text,href:null==n?void 0:n.url,variant:f?"secondary":"white",onClick:()=>y(n.text)}),(0,i.jsx)(_.$,{as:"a",className:(0,c.A)(z.button,g),size:"xs",label:"Подробнее",href:a,onClick:()=>y("podrobnee_o_kartochke_iz")})]})]})},S=(0,g.g)("offers-list","sc"),U=Object.freeze({offersList:S,wrapper:`${S}__wrapper`,sliderWrapper:`${S}__sliderWrapper`,offerItem:`${S}__offerItem`,compact:`${S}__offerItem--compact`,bannerItem:`${S}__bannerItem`}),D=({offers:e,banner:t,dataLayerPush:a,eventCategory:r,productType:l,theme:s,singleProduct:n})=>{let o=e.length<=2;return(0,i.jsxs)(u.A,{options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3e3,disableOnInteraction:!1}},breakpoints:{xl:{autoplay:!1}},className:U.sliderWrapper,pagination:!0,children:[e.slice(0,3).map(e=>(0,i.jsx)(u.D,{className:(0,c.A)(U.offerItem,{[U.compact]:n}),children:(0,i.jsx)(E,{...e,dataLayerPush:a,eventCategory:r,productType:l,theme:s})},e.id)),t&&(0,i.jsx)(u.D,{className:U.bannerItem,children:(0,i.jsx)(A,{...t,handleBannerDataLayerPush:()=>{(0,d.p)(a,l),a({event:"data-event",eventCategory:r,eventAction:"click_bnr_banner_top_predlozheniy",eventLabel:l})},wide:o,theme:s})})]},l)},R=(0,g.g)("osago-tab","sc"),q=Object.freeze({osagoTab:R,wrapper:`${R}__wrapper`,card:`${R}__card`,whiteCard:`${R}__card--white`,image:`${R}__image`,content:`${R}__content`,inputWrapper:`${R}__inputWrapper`,select:`${R}__select`,input:`${R}__input`,buttonLinkWrapper:`${R}__buttonLinkWrapper`,button:`${R}__button`,banner:`${R}__banner`}),V={kasko:{title:"Рассчет Каско за минуту",description:"Выберите лучшие условия для оформления полиса",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}},osago:{title:"ОСАГО с экономией до 78%",description:"Предварительная цена после ввода номера ТС",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}}},F=[{label:"Мотоцикл",value:"moto"},{label:"Автомобиль",value:"auto"}],G=Object.fromEntries(F.map(e=>[e.value,e])),H={auto:{mask:"a 000 aa 00",placeholder:"A 000 AA 00"},moto:{mask:"0000 aa 00",placeholder:"0000 AA 00"}},M="АВЕКМНОРСТУХ",K=RegExp(`[${M}]`,"i"),J=RegExp(`[^0-9${M}]`,"gi"),Q=({type:e,baseUrl:t,s3Assets:a,banner:r,dataLayerPush:s,eventCategory:p,theme:h})=>{let u="osago"===e,m=(0,j.oq)(t,"osago"),g=(0,j.oq)(m,"step-car"),b=(0,j.oq)(t,"kasko"),f=(0,j.oq)(b,"vehicle"),y=u?g:f,[C,N]=(0,l.useState)(""),[T,z]=(0,l.useState)("auto"),{mask:L,placeholder:W}=H[T],P=h===k.gray,O=`?${new URLSearchParams({type:u?T:"auto",license:C})}`,I=(0,j.oq)(y,O),B=r??{...V[e],url:u?m:b,image:a?{url:(0,j.oq)(a,`widgets/BestOffers/${u?"icon_osago":"icons_car"}.png`),width:204,height:160}:void 0},E=G[T].label,S=(t,a)=>{s({event:"data-event",eventCategory:p,eventAction:t,eventLabel:a??e})};return(0,i.jsxs)("div",{className:q.wrapper,children:[(0,i.jsxs)("div",{className:(0,c.A)(q.card,{[q.whiteCard]:P}),children:[a&&(0,i.jsx)("picture",{children:(0,i.jsx)("img",{src:`${a}/widgets/BestOffers/auto_bg.png`,alt:"Автомобиль",loading:"lazy",className:q.image})}),(0,i.jsxs)("div",{className:q.content,children:[(0,i.jsxs)(n.D,{as:"h3",type:"h3",children:["Онлайн калькулятор ",u?"ОСАГО":"Каско"]}),(0,i.jsxs)("div",{className:q.inputWrapper,children:[u&&(0,i.jsx)(w.l,{options:F,value:G[T],label:"Тип транспорта",variant:P?"primary":"secondary",className:q.select,onChange:e=>{N(""),z(e.value),S(`selector_item_${(0,v.t)(e.label)}`)}}),(0,i.jsx)($.U,{label:"Госномер",variant:P?"primary":"secondary",maskOpts:{mask:L,definitions:{a:K}},maskPlaceholder:W,value:C,className:q.input,onChange:(e,t)=>{N(t.replace(J,"").toUpperCase())},onClick:()=>S(`message_field_${(0,v.t)(E)}`),onBlur:()=>S(`on_message_field_${(0,v.t)(E)}`)}),(0,i.jsxs)(o.E,{children:["У меня"," ",(0,i.jsx)(x.N,{href:y,onClick:()=>{(0,d.p)(s),S("click_link_net_nomera",y)},children:"нет номера"})]})]}),(0,i.jsx)(_.$,{as:"a",href:I,size:"s",className:q.button,onClick:()=>{(0,d.p)(s),S(`click_button_rasschitat_${(0,v.t)(E)}`,I)},children:"Рассчитать"})]})]}),(0,i.jsx)("div",{className:q.banner,children:(0,i.jsx)(A,{...B,theme:h,handleBannerDataLayerPush:()=>{(0,d.p)(s),S("click_bnr_banner_top_predlozheniy")}})})]})},X=(0,g.g)("best-offers","sc"),Y=Object.freeze({bestOffers:X,graySection:`${X}--gray`,singleProduct:`${X}--singleProduct`,titleWrapper:`${X}__title-wrapper`,singleProductTitleWrapper:`${X}__title-wrapper--singleProduct`,title:`${X}__title`,singleProductTitle:`${X}__title--singleProduct`,chips:`${X}__chips`,warning:`${X}__warning`,allOffersLink:`${X}__allOffersLink`}),Z={вклады:"вкладам",облигации:"облигациям",кредиты:"кредитам",займы:"займам","Кредитные карты":"кредитным картам",каско:"каско",осаго:"ОСАГО","дебетовые карты":"дебетовым картам",ипотека:"ипотеке",автокредиты:"автокредитам"},ee=({tabs:e,baseUrl:t,s3Assets:a,eventCategory:r="best-offers",dataLayerPush:u,singleProduct:m=!1,theme:g=k.light,className:_,initialActiveChipId:v})=>{var b;let f,y=g===k.gray,$=Array.isArray(e)?e.filter(({banner:e,offers:t,productType:a})=>!!e||!!(null!=t&&t.length)||"osago"===a||"kasko"===a).map(e=>({...e,offers:Array.isArray(e.offers)?e.offers:[]})):[],x=$.map(e=>({url:e.productType,title:e.name})),w=(null==(b=x[0])?void 0:b.url)??"",[j,C]=(0,l.useState)(v??w),N=j&&$.some(e=>e.productType===j)?j:w,A=$.find(e=>e.productType===N)??$[0];if(!A)return null;let T=Z[A.name.toLowerCase()],z=T?`по ${T}`:A.name,L=("kasko"===(f=null==A?void 0:A.productType)||"osago"===f)&&t?(0,i.jsx)(Q,{type:A.productType,banner:A.banner,baseUrl:t,s3Assets:a,dataLayerPush:u,eventCategory:r,theme:g}):null;return(0,i.jsx)("section",{className:(0,c.A)(Y.bestOffers,_,{[Y.singleProduct]:m,[Y.graySection]:y}),children:(0,i.jsxs)(s.m,{children:[(0,i.jsx)("div",{className:(0,c.A)(Y.titleWrapper,m&&Y.singleProductTitleWrapper),children:(0,i.jsxs)(n.D,{as:"h2",type:m?"h2":"display",className:(0,c.A)(Y.title,m&&Y.singleProductTitle),children:["Лучшие предложения ",m?z:"сегодня"]})}),!m&&(0,i.jsx)(h.N,{items:x,maxNumberOfLines:2,activeChipId:N,variant:y?"white":"gray",className:Y.chips,onClick:e=>{(0,d.p)(u,e),C(e);let t=$.find(t=>t.productType===e);u({event:"data-event",eventCategory:r,eventAction:"click_chip_top_predlozheniy_vybor",eventLabel:null==t?void 0:t.productType})}}),(0,i.jsxs)("div",{children:[L??(0,i.jsx)(D,{offers:A.offers,banner:A.banner,dataLayerPush:u,eventCategory:r,productType:A.productType,theme:g,singleProduct:m}),A.hasWarning&&(0,i.jsx)(o.E,{as:"p",size:"16",className:Y.warning,children:A.warningCustomText??"Оценивайте свои финансовые возможности и риски. Изучите все условия кредита (займа)"})]}),A.checkAllUrl&&(0,i.jsx)(p.C,{href:A.checkAllUrl,onClick:()=>(0,d.p)(u,A.productType),event:{event:"data-event",eventCategory:r,eventAction:"link",eventLabel:`Показать все предложения ${A.productType}`},dataLayerPush:u,iconGrayBackground:!y,className:Y.allOffersLink,linkClassName:A.checkAllLinkClassName,children:"Показать все предложения"})]})})}},91501:(e,t,a)=>{"use strict";a.d(t,{g:()=>r});let r=()=>Date.now().toString()+Math.random().toString(36).slice(2,9)},95124:()=>{}}]);