"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3389],{10855:function(e,t,a){a.d(t,{C:function(){return c}});var s=a(57437),r=a(80684),n=a(75461),i=a(61994);let l=(0,a(52074).g)("check-all","sc"),o=Object.freeze({wrapper:`${l}__wrapper`,link:`${l}__link`,icon:`${l}__icon`,iconGray:`${l}__icon--gray`}),c=({children:e,className:t,linkClassName:a,iconGrayBackground:l,Link:c,event:p,href:d,dataLayerPush:u})=>{let h=c??n.rU;return(0,s.jsx)("div",{className:(0,i.Z)(o.wrapper,t),onClick:()=>{p&&u(p)},children:(0,s.jsxs)(h,{className:(0,i.Z)(o.link,a),href:d,children:[e,(0,s.jsx)("span",{className:(0,i.Z)(o.icon,{[o.iconGray]:l}),children:(0,s.jsx)(r.IconFdsArrowUpRightSmallO,{size:24})})]})})}},20777:function(e,t,a){let s;a.d(t,{MJ:function(){return F}});var r=a(57437),n=a(2265),i=a(35563),l=a(75461),o=a(61994),c=a(10855),p=a(85241),d=a(80684),u=a(52074),h=a(31620),m=a(77337),_=((s=_||{}).light="light",s.gray="gray",s);let g=e=>"kasko"===e||"osago"===e,x=(0,u.g)("best-offers-banner","sc"),v=Object.freeze({bestOffersBaner:x,wrapper:`${x}__wrapper`,wideWrapper:`${x}__wrapper--wide`,whiteWrapper:`${x}__wrapper--white`,content:`${x}__content`,header:`${x}__header`,title:`${x}__title`,subtitle:`${x}__subtitle`,icon:`${x}__icon`,iconBlack:`${x}__icon--black`,iconWhite:`${x}__icon--white`,image:`${x}__image`}),b=({title:e,image:t,url:a,description:s,backgroundColor:n,textColor:l,wide:c,theme:p,handleBannerDataLayerPush:u,className:h})=>{let m=p===_.gray,g={"--bg-base":(null==n?void 0:n.base)??(m?"var(--color-white)":"var(--color-gray-400)"),"--bg-hover":(null==n?void 0:n.hover)??"var(--color-gray-500)"};return(0,r.jsxs)("div",{className:(0,o.Z)(v.wrapper,h,{[v.wideWrapper]:c}),style:g,onClick:()=>{u(),window.open(a,"_blank")},children:[(0,r.jsxs)("div",{className:v.content,children:[(0,r.jsxs)("div",{className:v.header,children:[(0,r.jsx)(i.xv,{weight:"medium",size:"24",className:v.title,style:{color:l},children:e}),(0,r.jsx)("div",{className:(0,o.Z)(v.icon,{[v.iconBlack]:m&&!(null!=l&&l.includes("color-white")),[v.iconWhite]:m&&!!(null!=l&&l.includes("color-white"))}),children:(0,r.jsx)(d.IconFdsArrowUpRightSmallO,{size:32})})]}),s&&(0,r.jsx)(i.xv,{size:"16",style:{color:l},children:s})]}),(null==t?void 0:t.url)&&(0,r.jsx)("picture",{className:v.image,children:(0,r.jsx)("img",{src:t.url,width:t.width??150,height:t.height??"auto",alt:`Баннер ${e}`,loading:"lazy"})})]})},j=(0,u.g)("offer-card","sc"),$=Object.freeze({offerCard:j,wrapper:`${j}__wrapper`,whiteWrapper:`${j}__wrapper--white`,bankInfo:`${j}__bankInfo`,units:`${j}__units`,unitsColumn:`${j}__units--column`,unit:`${j}__unit`,unitRow:`${j}__unit--row`,unitTitleWrapper:`${j}__unitTitleWrapper`,unitTitle:`${j}__unitTitle`,tooltipIcon:`${j}__tooltipIcon`,unitValue:`${j}__unitValue`,bottomBlock:`${j}__bottomBlock`,tags:`${j}__tags`,tag:`${j}__tag`,button:`${j}__button`,buttonRounded:`${j}__button--rounded`,buttonAdditional:`${j}__button--additional`}),f=e=>{let t=e.split("₽");return t.map((e,a)=>(0,r.jsxs)(n.Fragment,{children:[e,a<t.length-1&&(0,r.jsx)(i.xv,{fontFamily:"primary",weight:"regular",children:"₽"})]},`${e}-${a}`))},y=({title:e,value:t,tooltip:a,textColor:s,unitsAsColumn:n,isTitleUnit:c})=>(0,r.jsxs)("div",{className:(0,o.Z)($.unit,{[$.unitRow]:n}),children:[(0,r.jsxs)("div",{className:$.unitTitleWrapper,children:[(0,r.jsx)(i.xv,{size:"14",className:$.unitTitle,children:e}),a&&(0,r.jsx)(l.u,{text:a,children:(0,r.jsx)(d.IconFdsQuestionCircleO,{className:$.tooltipIcon})})]}),(0,r.jsx)(i.xv,{weight:"medium",size:c?"18":n?"16":"24",className:$.unitValue,style:{color:s},children:e.includes("Рейтинг")?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.IconFdsStarF,{size:16,style:{color:"var(--color-orange-400)"}}),t]}):f(t)})]}),w=({tags:e,isGrayTheme:t})=>{let a=t?"secondary":"primary";return(0,r.jsx)("div",{className:$.tags,children:e.sort((e,t)=>e.order-t.order).map(e=>(0,r.jsx)(l.Vp,{className:$.tag,label:e.label,variant:e.variant?e.variant:a,rounded:!0},e.label))})},k=({companyName:e,name:t,url:a,logo:s,units:n,tags:i,additionalButton:c,unitsAsColumn:p,dataLayerPush:d,eventCategory:u,productType:m,theme:g,buttonClassName:x,eventValueByUnitTitle:v})=>{let b=g===_.gray,j=a=>{let s={event:"data-event",eventCategory:u,eventAction:`click_button_${(0,h.t)(a)}_${m}`,eventLabel:(0,h.t)(`${e}_${t}`)};if(v){let e=n.find(e=>e.title.toLowerCase()===v.toLowerCase());e&&(s.eventValue=(0,h.t)(e.value))}d(s)};return(0,r.jsxs)("div",{className:(0,o.Z)($.wrapper,{[$.whiteWrapper]:b}),children:[(0,r.jsxs)("div",{className:$.bankInfo,children:[s&&(0,r.jsx)("img",{src:s,width:56,height:56,alt:`${e} logo`}),(0,r.jsx)(y,{title:t,value:e,isTitleUnit:!0})]}),(0,r.jsx)("div",{className:(0,o.Z)($.units,{[$.unitsColumn]:p}),children:n.map(e=>(0,r.jsx)(y,{title:e.title,value:e.value,tooltip:e.tooltip,textColor:e.textColor,unitsAsColumn:p},`${e.title}-${e.value}`))}),(0,r.jsxs)("div",{className:$.bottomBlock,children:[i&&(0,r.jsx)(w,{tags:i,isGrayTheme:b}),c&&c.text.trim().length>0&&(0,r.jsx)(l.zx,{as:"a",className:(0,o.Z)($.button,$.buttonRounded,$.buttonAdditional),size:"xs",label:c.text,href:null==c?void 0:c.url,variant:b?"secondary":"white",onClick:()=>j(c.text)}),(0,r.jsx)(l.zx,{as:"a",className:(0,o.Z)($.button,x),size:"xs",label:"Подробнее",href:a,onClick:()=>j("podrobnee_o_kartochke_iz")})]})]})},N=(0,u.g)("offers-list","sc"),C=Object.freeze({offersList:N,wrapper:`${N}__wrapper`,sliderWrapper:`${N}__sliderWrapper`,offerItem:`${N}__offerItem`,compact:`${N}__offerItem--compact`,bannerItem:`${N}__bannerItem`}),A=({offers:e,banner:t,dataLayerPush:a,eventCategory:s,productType:n,theme:i,singleProduct:c})=>{let p=e.length<=2;return(0,r.jsxs)(l.iR,{options:{slidesPerView:"auto",spaceBetween:0,autoplay:{delay:3e3,disableOnInteraction:!1}},breakpoints:{xl:{autoplay:!1}},className:C.sliderWrapper,pagination:!0,children:[e.slice(0,3).map(e=>(0,r.jsx)(l.wI,{className:(0,o.Z)(C.offerItem,{[C.compact]:c}),children:(0,r.jsx)(k,{...e,dataLayerPush:a,eventCategory:s,productType:n,theme:i})},e.id)),t&&(0,r.jsx)(l.wI,{className:C.bannerItem,children:(0,r.jsx)(b,{...t,handleBannerDataLayerPush:()=>{a({event:"data-event",eventCategory:s,eventAction:"click_bnr_banner_top_predlozheniy",eventLabel:n})},wide:p,theme:i})})]},n)},L=(0,u.g)("osago-tab","sc"),T=Object.freeze({osagoTab:L,wrapper:`${L}__wrapper`,card:`${L}__card`,whiteCard:`${L}__card--white`,image:`${L}__image`,content:`${L}__content`,inputWrapper:`${L}__inputWrapper`,select:`${L}__select`,input:`${L}__input`,buttonLinkWrapper:`${L}__buttonLinkWrapper`,button:`${L}__button`,banner:`${L}__banner`}),z={kasko:{title:"Рассчет Каско за минуту",description:"Выберите лучшие условия для оформления полиса",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}},osago:{title:"ОСАГО с экономией до 78%",description:"Предварительная цена после ввода номера ТС",backgroundColor:{base:"#f1f5ff",hover:"#a3ceec"}}},P=[{label:"Мотоцикл",value:"moto"},{label:"Автомобиль",value:"auto"}],W=Object.fromEntries(P.map(e=>[e.value,e])),O={auto:{mask:"a 000 aa 00",placeholder:"A 000 AA 00"},moto:{mask:"0000 aa 00",placeholder:"0000 AA 00"}},B="АВЕКМНОРСТУХ",I=RegExp(`[${B}]`,"i"),S=RegExp(`[^0-9${B}]`,"gi"),U=({type:e,baseUrl:t,s3Assets:a,banner:s,dataLayerPush:c,eventCategory:p,theme:d})=>{let u="osago"===e,g=(0,m.xn)(t,"osago"),x=(0,m.xn)(g,"step-car"),v=(0,m.xn)(t,"kasko"),j=(0,m.xn)(v,"vehicle"),$=u?x:j,[f,y]=(0,n.useState)(""),[w,k]=(0,n.useState)("auto"),{mask:N,placeholder:C}=O[w],A=d===_.gray,L=`?${new URLSearchParams({type:u?w:"auto",license:f})}`,B=(0,m.xn)($,L),U=s??{...z[e],url:u?g:v,image:a?{url:(0,m.xn)(a,`widgets/BestOffers/${u?"icon_osago":"icons_car"}.png`),width:204,height:160}:void 0},Z=W[w].label,E=(t,a)=>{c({event:"data-event",eventCategory:p,eventAction:t,eventLabel:a??e})};return(0,r.jsxs)("div",{className:T.wrapper,children:[(0,r.jsxs)("div",{className:(0,o.Z)(T.card,{[T.whiteCard]:A}),children:[a&&(0,r.jsx)("picture",{children:(0,r.jsx)("img",{src:`${a}/widgets/BestOffers/auto_bg.png`,alt:"Автомобиль",loading:"lazy",className:T.image})}),(0,r.jsxs)("div",{className:T.content,children:[(0,r.jsxs)(i.X6,{as:"h3",type:"h3",children:["Онлайн калькулятор ",u?"ОСАГО":"Каско"]}),(0,r.jsxs)("div",{className:T.inputWrapper,children:[u&&(0,r.jsx)(l.Ph,{options:P,value:W[w],label:"Тип транспорта",variant:A?"primary":"secondary",className:T.select,onChange:e=>{y(""),k(e.value),E(`selector_item_${(0,h.t)(e.label)}`)}}),(0,r.jsx)(l.An,{label:"Госномер",variant:A?"primary":"secondary",maskOpts:{mask:N,definitions:{a:I}},maskPlaceholder:C,value:f,className:T.input,onChange:(e,t)=>{y(t.replace(S,"").toUpperCase())},onClick:()=>E(`message_field_${(0,h.t)(Z)}`),onBlur:()=>E(`on_message_field_${(0,h.t)(Z)}`)}),(0,r.jsxs)(i.xv,{children:["У меня"," ",(0,r.jsx)(l.rU,{href:$,onClick:()=>{E("click_link_net_nomera",$)},children:"нет номера"})]})]}),(0,r.jsx)(l.zx,{as:"a",href:B,size:"s",className:T.button,onClick:()=>{E(`click_button_rasschitat_${(0,h.t)(Z)}`,B)},children:"Рассчитать"})]})]}),(0,r.jsx)("div",{className:T.banner,children:(0,r.jsx)(b,{...U,theme:d,handleBannerDataLayerPush:()=>{E("click_bnr_banner_top_predlozheniy")}})})]})},Z=(0,u.g)("best-offers","sc"),E=Object.freeze({bestOffers:Z,graySection:`${Z}--gray`,singleProduct:`${Z}--singleProduct`,title:`${Z}__title`,singleProductTitle:`${Z}__title--singleProduct`,chips:`${Z}__chips`,warning:`${Z}__warning`,allOffersLink:`${Z}__allOffersLink`}),R={вклады:"вкладам",облигации:"облигациям",кредиты:"кредитам",займы:"займам","Кредитные карты":"кредитным картам",каско:"каско",осаго:"ОСАГО","дебетовые карты":"дебетовым картам",ипотека:"ипотеке",автокредиты:"автокредитам"},F=({tabs:e,baseUrl:t,s3Assets:a,eventCategory:s="best-offers",dataLayerPush:d,singleProduct:u=!1,theme:h=_.light,className:m})=>{let x=h===_.gray,v=e.map(e=>({url:e.productType,title:e.name})),[b,j]=(0,n.useState)(v[0].url),$=e.find(e=>e.productType===b)??e[0],f=(0,l._m)("xl"),y=R[$.name.toLowerCase()],w=y?`по ${y}`:$.name,k=g(null==$?void 0:$.productType)&&t?(0,r.jsx)(U,{type:$.productType,banner:$.banner,baseUrl:t,s3Assets:a,dataLayerPush:d,eventCategory:s,theme:h}):null;return(0,r.jsx)("section",{className:(0,o.Z)(E.bestOffers,m,{[E.singleProduct]:u,[E.graySection]:x}),children:(0,r.jsxs)(i.W2,{children:[(0,r.jsxs)(i.X6,{as:"h2",type:u?"h2":"display",className:(0,o.Z)(E.title,!u&&(f?"mb-8":"mb-6"),u&&(0,o.Z)("mb-0",E.singleProductTitle)),children:["Лучшие предложения ",u?w:"сегодня"]}),!u&&(0,r.jsx)(p.N,{items:v,maxNumberOfLines:2,activeChipId:b,variant:x?"white":"gray",className:E.chips,onClick:t=>{j(t);let a=e.find(e=>e.productType===t);d({event:"data-event",eventCategory:s,eventAction:"click_chip_top_predlozheniy_vybor",eventLabel:null==a?void 0:a.productType})}}),(0,r.jsxs)("div",{children:[k??(0,r.jsx)(A,{offers:$.offers,banner:$.banner,dataLayerPush:d,eventCategory:s,productType:$.productType,theme:h,singleProduct:u}),$.hasWarning&&(0,r.jsx)(i.xv,{as:"p",size:"16",className:E.warning,children:$.warningCustomText??"Оценивайте свои финансовые возможности и риски. Изучите все условия кредита (займа)"})]}),$.checkAllUrl&&(0,r.jsx)(c.C,{href:$.checkAllUrl,event:{event:"data-event",eventCategory:s,eventAction:"link",eventLabel:`Показать все предложения ${$.productType}`},dataLayerPush:d,iconGrayBackground:!x,className:E.allOffersLink,linkClassName:$.checkAllLinkClassName,children:"Показать все предложения"})]})})}},17730:function(e,t,a){a.d(t,{B:function(){return j}});var s=a(57437),r=a(35563),n=a(61994),i=a(80684),l=a(75461),o=a(49750),c=a(52074),p=a(2265);let d=(0,c.g)("support","sc"),u=Object.freeze({support:d,title:`${d}__title`,cardsContainer:`${d}__cards-container`}),h="cb-support",m=(0,c.g)("support-app-card","sc"),_=Object.freeze({supportAppCard:m,textWrapper:`${m}__text-wrapper`,imageContainer:`${m}__image-container`,title:`${m}__title`,description:`${m}__description`,button:`${m}__button`,imageWrapper:`${m}__image-wrapper`,image:`${m}__image`}),g=({title:e,linkUrl:t,s3Assets:a,description:r})=>{let n=(0,l.aF)("s");return(0,s.jsxs)("div",{className:_.supportAppCard,onClick:()=>{n&&((0,o.h)({eventCategory:h,eventActionType:o.D.banner,eventActionText:e,eventLabel:t}),window.open(t,"_blank","noreferrer"))},children:[(0,s.jsx)(l.zx,{className:_.button,iconLeft:(0,s.jsx)(i.IconFdsArrowUpRightSmallO,{size:24}),shape:"circle-icon",size:"xs"}),(0,s.jsxs)("div",{className:_.textWrapper,children:[(0,s.jsx)("div",{className:_.title,children:e}),!!r&&(0,s.jsx)("div",{className:_.description,children:r})]}),(0,s.jsx)("div",{className:_.imageContainer,children:(0,s.jsxs)("picture",{className:_.imageWrapper,children:[(0,s.jsx)("source",{media:"(max-width: 767px)",srcSet:`${a}/mp-assets/widgets/SupportBlock/mobile-app.png 1x, ${a}/mp-assets/widgets/SupportBlock/mobile-app@2x.png 2x`}),(0,s.jsx)("img",{className:_.image,loading:"lazy",src:`${a}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg`,srcSet:`${a}/mp-assets/widgets/SupportBlock/qr-code-mobile-app.jpg 1x, ${a}/mp-assets/widgets/SupportBlock/qr-code-mobile-app@2x.jpg 2x`})]})})]})},x=(0,c.g)("support-phone-card","sc"),v=Object.freeze({supportPhoneCard:x,contacts:`${x}__contacts`,contactsExtra:`${x}__contacts-extra`,phone:`${x}__phone`,phonesExtra:`${x}__phones-extra`,phoneExtra:`${x}__phone-extra`,chat:`${x}__chat`,text:`${x}__text`,image:`${x}__image`}),b=({phones:e,phonesExtra:t,description:a,s3Assets:r})=>{let n=(0,p.useCallback)(()=>{var e,t,a;null==(a=null==(t=null==(e=null==window?void 0:window.supportWidget)?void 0:e.craftTalk)?void 0:t.open)||a.call(t),(0,o.h)({eventCategory:h,eventActionType:o.D.button,eventActionText:"messenger",eventLabel:"chat"})},[]),i=e=>{let t=e.replace(/[\s-]/g,"");(0,o.h)({eventCategory:h,eventActionType:o.D.link,eventActionText:"phone",eventLabel:t})};return(0,s.jsxs)("div",{className:v.supportPhoneCard,children:[(0,s.jsxs)("div",{className:v.contacts,children:[e.map(e=>(0,s.jsx)("a",{className:v.phone,href:e.href,onClick:()=>i(e.label),children:e.label},e.label)),(0,s.jsx)("span",{className:v.chat,onClick:n,children:"Онлайн чат"})]}),(null==t?void 0:t.length)>0&&(0,s.jsxs)("div",{className:v.contactsExtra,children:[(0,s.jsx)("p",{className:v.text,children:"Дополнительные телефоны"}),(0,s.jsx)("div",{className:v.phonesExtra,children:t.map(e=>(0,s.jsx)("a",{className:v.phoneExtra,href:e.href,onClick:()=>i(e.label),children:e.label},e.label))})]}),(0,s.jsx)("p",{className:v.text,children:a}),(0,s.jsx)("img",{className:v.image,src:`${r}/mp-assets/widgets/SupportBlock/bannerSupportGirl.png`})]})},j=({className:e,phoneCard:t,appCard:a,s3Assets:i})=>(0,s.jsx)("section",{className:(0,n.Z)(u.support,e),children:(0,s.jsxs)(r.W2,{children:[(0,s.jsx)(r.X6,{as:"h2",type:"display",weight:"bold",className:u.title,children:"Поддержка"}),(0,s.jsxs)("div",{className:u.cardsContainer,children:[(0,s.jsx)(b,{s3Assets:i,...t}),(0,s.jsx)(g,{s3Assets:i,...a})]})]})});j.displayName="Support"}}]);