(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,88673,e=>{"use strict";var t,a=e.i(94246),s=e.i(37819),l=((t={}).link="link",t.button="button",t.popup="popup",t.popdown="popdown",t.filterCatalog="filter_catalog",t.utm="utm",t.banner="banner",t.input_field="input_field",t.field="field",t);e.s(["DataLayerActionType",()=>l,"handelDataLayerPush",0,({eventCategory:e,eventAction:t,eventActionText:l="",eventLabel:o,eventValue:i,url:n})=>{let r=i;"boolean"==typeof i&&(r=i?"on":"off");let A=!0;"filter_catalog"!==t?A=/[а-я]/i.test(l.toLowerCase()):"string"==typeof o&&(A=/[а-я]/i.test(o.toLowerCase()));let u="filter_catalog"!==t?{event:"data-event",eventCategory:e,eventAction:({link:"click_link_",button:"click_button_",popup:"show_pop_up_",popdown:"close_pop_up_",utm:"save_utm",banner:"click_banner_",input_field:"input_field_",field:"click_field_"})[t]+(0,s.translit)(l),eventLabel:o,eventValue:r,url:n}:{event:"data-event",eventAction:e,eventCategory:t,eventLabel:"string"!=typeof o||A?o:(0,s.translit)(o),eventValue:r,url:n};(0,a.dataLayerPush)(u)}])},4409,e=>{e.q("/service-navigator/_next/static/media/auto_bg.3bcy_fak13l1y.png")},56824,e=>{e.q("/service-navigator/_next/static/media/auto_m_bg.0806tg1y_sd72.png")},56470,e=>{e.q("/service-navigator/_next/static/media/moto_bg.3mmqc_0i8radi.png")},74411,e=>{e.q("/service-navigator/_next/static/media/moto_m_bg.04-jv7--tcyej.png")},91814,e=>{e.v({button:"OsagoOffers-module-scss-module__mhI6hW__button",container:"OsagoOffers-module-scss-module__mhI6hW__container",content:"OsagoOffers-module-scss-module__mhI6hW__content",form:"OsagoOffers-module-scss-module__mhI6hW__form",img:"OsagoOffers-module-scss-module__mhI6hW__img",inputs:"OsagoOffers-module-scss-module__mhI6hW__inputs",noLicense:"OsagoOffers-module-scss-module__mhI6hW__noLicense",osagoOffersWrapper:"OsagoOffers-module-scss-module__mhI6hW__osagoOffersWrapper",select:"OsagoOffers-module-scss-module__mhI6hW__select",shine:"OsagoOffers-module-scss-module__mhI6hW__shine",small:"OsagoOffers-module-scss-module__mhI6hW__small",title:"OsagoOffers-module-scss-module__mhI6hW__title"})},97065,e=>{"use strict";var t=e.i(43476),a=e.i(71645),s=e.i(57688),l=e.i(12716),o=e.i(67638),i=e.i(2305),n=e.i(65018),r=e.i(79335),A=e.i(5081),u=e.i(88673),f=e.i(91814);let d={auto:{src:e.i(4409).default,width:308,height:176,blurWidth:8,blurHeight:5,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAsElEQVR42gGlAFr/AO3w7PP4+/X/+Pv1//H49P/r9vP/8fj1/+X09P/s8OrzAOz39v/q9/X/7Pf0/9Ho6v+/0tn/zNTb/9Hn7f/p9/X/ANTs8f/UzMz/2rS0/7yFlP+eS2X/rUpk/8t3if/Q2OH/AKvE1P+FSWX/mDZU/4gzVP9+IUL/syE7/44sTP+Oobn/AJnC1fN6j6n/aHKN/0dFZv8+M1T/Ukto/0JKbf9jjqvzvNJ5PIMTGR8AAAAASUVORK5CYII="},auto_m:{src:e.i(56824).default,width:295,height:120,blurWidth:8,blurHeight:3,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAYAAACuyE5IAAAAbklEQVR42gFjAJz/AOrz9fjx+vn/8Pn1/+v18v/S4uX/2OLm/+Xy8v/n8e/4ANDt9f/Q6vH/xbK5/8aQm/+fWXH/t1Bo/7+crf++4+7/AHeqx/iWw9r/fXuV/3BPbf9SMFP/bjpX/2Npif+EudH43sFK9HdNcQUAAAAASUVORK5CYII="},moto:{src:e.i(56470).default,width:308,height:176,blurWidth:8,blurHeight:5,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAsElEQVR42gGlAFr/AOTq6/Pt8/T/6/L0/+ft8P/X0db/3Ofr/+Tv8f/b5efzAOPy9f/i8fT/19DW/9Cpr/+vWmz/pIaV/9rj5//Y6+//ANfv9P/O4OX/qZGY/6JLWf+GJj7/ckpf/7LK1f/I5u3/AMDl8P+pusb/dklY/4MnQv9TMUz/TEZb/4Odrv+x2OL/AHmrwPN1nrT/T1ly/09je/9CWHD/PERd/0x4jP9UhZjzAmp2ycGRhFAAAAAASUVORK5CYII="},moto_m:{src:e.i(74411).default,width:295,height:120,blurWidth:8,blurHeight:3,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAYAAACuyE5IAAAAbklEQVR42gFjAJz/AOXv8fjo8/X/4+vu/9vM0P++k6D/zcvS/9/t8P/T5Of4ANbv9f/T6/H/urS6/6FYZv+BMEf/h3yN/8Th6f/A3+b/AK3Y6Pio0uL/fHiJ/2pBW/9PQlz/UFlv/4Swv/9+r7/4UjBKBeU1M2MAAAAASUVORK5CYII="}},c=(e,t,a)=>{(0,u.handelDataLayerPush)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"osago_calculator_top_offers",eventValue:a})},_=[{value:"auto",label:"Автомобиль"},{value:"moto",label:"Мотоцикл"}],m=({kasko:e,small:m})=>{let g=(0,o.getEnvValue)(),p=(0,n.useMedia)("lg"),[h,v]=(0,a.useState)(!1),[b,O]=(0,a.useState)(""),y=(0,a.useRef)(null),U=t=>{t&&t.preventDefault();let a=`${g.NEXT_PUBLIC_BASE_URL}${r.OSAGO_URL}/step-car`,s=`${g.NEXT_PUBLIC_BASE_URL}${r.KASKO_URL}/vehicle`,l=[];b&&l.push("license="+b.replaceAll(" ","")),h&&!e&&l.push("type=moto");let o=l.length?`${l.join("&")}`:"";if(e)window.open(`${s}?${o}`,"_self");else{let e=(0,A.generateUuid)();c(u.DataLayerActionType.button,"рассчитать",e),window.open(`${a}?${o}`,"_self")}};return(0,t.jsx)("div",{className:(0,i.default)(f.default.osagoOffersWrapper,"disableContentBlocksStyles",{[f.default.small]:m}),children:(0,t.jsxs)("div",{className:f.default.container,children:[(0,t.jsx)(s.default,{className:f.default.img,src:d[`${h?"moto":"auto"}${p?"_m":""}`],alt:"фото",unoptimized:!0}),(0,t.jsxs)("div",{className:f.default.content,children:[(0,t.jsxs)("div",{className:f.default.title,children:["Онлайн калькулятор ",!p&&(e?"КАСКО":"ОСАГО")]}),(0,t.jsxs)("div",{className:f.default.inputs,children:[!e&&(0,t.jsx)(l.Select,{className:f.default.select,size:"m",label:"Тип транспорта",options:_,value:h?_[1]:_[0],onChange:e=>{var t;return t="moto"===e.value,void(c(u.DataLayerActionType.button,t?"мото":"авто"),v(t),O(""),y.current&&y.current.focus())},variant:"secondary"}),(0,t.jsx)("form",{className:f.default.form,onSubmit:U,children:(0,t.jsx)(l.InputMasked,{label:"Госномер",size:"m",variant:"secondary",maskOpts:{mask:h?"0000 aa 00[0]":"a 000 aa 00[0]"},maskPlaceholder:h?"0000 aa 000":"a 000 aa 000",value:b||"",onChange:e=>O(e)})}),(0,t.jsxs)("p",{className:f.default.noLicense,children:["У меня ",(0,t.jsx)("a",{onClick:e=>{e&&e.preventDefault(),c(u.DataLayerActionType.link,"нет номера"),U()},children:"нет номера"})]})]}),(0,t.jsx)(l.Button,{className:f.default.button,label:"Рассчитать",variant:"primary",size:"s",onClick:()=>{c(u.DataLayerActionType.button,"рассчитать"),U()}})]})]})})};e.s(["OsagoOffers",0,m],86624),e.s([],49488),e.i(49488),e.i(86624),e.s(["OsagoOffers",0,m],97065)},48172,e=>{e.n(e.i(97065))}]);