(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3185],{5966:function(e,t,n){Promise.resolve().then(n.t.bind(n,6153,23)),Promise.resolve().then(n.t.bind(n,7565,23)),Promise.resolve().then(n.t.bind(n,6583,23)),Promise.resolve().then(n.t.bind(n,6034,23)),Promise.resolve().then(n.bind(n,6715)),Promise.resolve().then(n.bind(n,1046)),Promise.resolve().then(n.bind(n,4789)),Promise.resolve().then(n.t.bind(n,8003,23)),Promise.resolve().then(n.bind(n,1523)),Promise.resolve().then(n.bind(n,49)),Promise.resolve().then(n.t.bind(n,3308,23)),Promise.resolve().then(n.bind(n,3345)),Promise.resolve().then(n.t.bind(n,7538,23)),Promise.resolve().then(n.bind(n,6076))},3345:function(e,t,n){"use strict";n.r(t),n.d(t,{ClientInitializer:function(){return S}});var _=n(631),i=n(2265),o=n(6093);let r={promobizness:!0,guruleads:!0,leadssu:!0,admitad:!0,agents:!0},a=e=>/^https:\/\//gi.test(e),s=e=>["",...e.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join("."),l=()=>window.location.host.indexOf("localhost")>=0,c=()=>{if(document.cookie)return Object.fromEntries(document.cookie.split("; ").map(e=>e.split("=")))},u=function(e,t,n){let _=arguments.length>3&&void 0!==arguments[3]?arguments[3]:365,i=e.NEXT_PUBLIC_BASE_URL||"",o=l()?"":"; domain=".concat(s(i)),r=new Date(new Date().getTime()+864e5*_).toUTCString();document.cookie="".concat(t,"=").concat(JSON.stringify(n),"; SameSite=Strict").concat(a(i)?"; Secure":"").concat(o,"; expires=").concat(r)},E=(e,t)=>{var n;let _="hash"===t?null==e?void 0:null===(n=e.split("#")[1])||void 0===n?void 0:n.split("?")[0]:null==e?void 0:e.split("?")[1];return(_?_.split("&"):[]).reduce((e,t)=>{let[n,_]=t.split("=");return n&&_?{...e,[n]:_}:e},{})},d=e=>E(e,"search");var v=n(3583);let L=(e,t)=>{let n=d(t);if(n&&n.aggregator_id){let t;let i={...n,create_date:new Date().toISOString()};try{var _;t=JSON.parse((null===(_=c())||void 0===_?void 0:_.cpa_click)||"")}catch(e){return}t=i;let o={event:"data-event",eventCategory:n.aggregator_id,eventAction:"CPA_click",eventLabel:window.location.pathname,eventValue:n.utm_term||n.click_id,utm_source:n.utm_source,utm_campaign:n.utm_campaign,utm_medium:"affiliate"};r[n.aggregator_id]&&(u(e,"cpa_click",t,30),(0,v.l)(o))}};var P=n(4743);let S=()=>{let{asPath:e,basePath:t}=(0,o.t)(),n="".concat(t).concat(e),r=(0,P.d)();return(0,i.useEffect)(()=>{"dev"!==r.NEXT_PUBLIC_VERSION&&(0,_.zK)()},[r.NEXT_PUBLIC_VERSION]),(0,i.useEffect)(()=>{window&&((0,v.y)(n),L(r,n))},[n]),null}},6076:function(e,t,n){"use strict";n.r(t),n.d(t,{Portal:function(){return r}});var _=n(7437),i=n(2265),o=n(4887);let r=e=>{let{children:t,id:n="portal-root"}=e,[r,a]=(0,i.useState)(null);return(0,i.useEffect)(()=>{var e,t,_;let i=null===(e=document)||void 0===e?void 0:e.getElementById(n);if(i)a(i);else{let e=null===(t=document)||void 0===t?void 0:t.createElement("div");return null===(_=document)||void 0===_||_.body.appendChild(e),a(e),()=>{var t;null===(t=document)||void 0===t||t.body.removeChild(e)}}},[]),(0,_.jsx)(_.Fragment,{children:r&&(0,o.createPortal)(t,r)})}},6093:function(e,t,n){"use strict";n.d(t,{t:function(){return i}});var _=n(9376);let i=()=>{let e=(0,_.useRouter)(),t=(0,_.usePathname)(),n=null!=t?t:"",i=window.location.search;return{asPath:"".concat(n).concat(i),basePath:"",pathname:n,push:(t,n,_)=>{if(null==_?void 0:_.shallow){window.history.pushState(null,"",t);return}e.push(t,{scroll:null==_?void 0:_.scroll})}}}},4743:function(e,t,n){"use strict";n.d(t,{d:function(){return r}});var _=n(257);let i=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return _.env[e]||t},o=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t?i(e,n):n},r=()=>{let e="dev"===i("NEXT_PUBLIC_VERSION");return{REVALIDATE_REQUEST_VALUE:i("REVALIDATE_REQUEST_VALUE","300"),NEXT_PUBLIC_GTM_ID:i("NEXT_PUBLIC_GTM_ID",""),NEXT_PUBLIC_MTM_URL:i("NEXT_PUBLIC_MTM_URL",""),NEXT_PUBLIC_MTM_ID:i("NEXT_PUBLIC_MTM_ID",""),ASSETS_BASE_URL:i("ASSETS_BASE_URL","https://assets.finuslugi.ru"),NEXT_PUBLIC_BASE_URL:i("NEXT_PUBLIC_BASE_URL","https://finuslugi.ru"),NEXT_PUBLIC_API_URL:i("NEXT_PUBLIC_API_URL","https://finuslugi.ru"),NEXT_PUBLIC_NEW_API_URL:i("NEXT_PUBLIC_NEW_API_URL","https://finuslugi.ru"),NEXT_PUBLIC_VERSION:i("NEXT_PUBLIC_VERSION",""),NEXT_PUBLIC_USER_NAME:o("NEXT_PUBLIC_USER_NAME",e,""),NEXT_PUBLIC_PASSWORD:o("NEXT_PUBLIC_PASSWORD",e,""),NEXT_PUBLIC_NEW_USER_NAME:o("NEXT_PUBLIC_NEW_USER_NAME",e,""),NEXT_PUBLIC_NEW_PASSWORD:o("NEXT_PUBLIC_NEW_PASSWORD",e,""),NEXT_PUBLIC_NEW_API_KEY:o("NEXT_PUBLIC_NEW_API_KEY",e,""),NODE_ENV:i("NODE_ENV",""),NEXT_PUBLIC_COMMON_BLOCKS_SERVICE_URL:i("NEXT_PUBLIC_COMMON_BLOCKS_SERVICE_URL","https://finuslugi.ru/sc"),NEXT_PUBLIC_MP_SC_NAVIGATOR_URL:i("NEXT_PUBLIC_MP_SC_NAVIGATOR_URL",""),COMMON_BLOCKS_SERVICE_USER_NAME:o("COMMON_BLOCKS_SERVICE_USER_NAME",e,""),COMMON_BLOCKS_SERVICE_USER_PASSWORD:o("COMMON_BLOCKS_SERVICE_USER_PASSWORD",e,""),NEXT_PUBLIC_HEADLESS_CMS:o("NEXT_PUBLIC_HEADLESS_CMS",e,"https://finuslugi.ru/sc"),NEXT_PUBLIC_USE_OLD_API:"false"!==String(i("NEXT_PUBLIC_USE_OLD_API")),NEXT_PUBLIC_MP_SC_REDIRECTS_API:i("NEXT_PUBLIC_MP_SC_REDIRECTS_API","")}}},3583:function(e,t,n){"use strict";n.d(t,{l:function(){return o},y:function(){return r}});var _=n(631);let i=[{path:"banki",category:"service_bank"},{path:"strahovanie_kompanija",category:"service_sk"},{path:"adresa_sk",category:"service_sk"},{path:"adresa_mfo",category:"service_mfo"},{path:"adresa",category:"service_bank"},{path:"mfo",category:"service_mfo"},{path:"navigator",category:"service_navigator"},{path:"stat_",category:"service_navigator"}],o=(e,t)=>{let n=sessionStorage.getItem("pushedEvents"),i=n?JSON.parse(n):[];e.event||(e.event="data-event"),"string"==typeof e.eventAction&&(e.eventAction=e.eventAction.toLowerCase().replaceAll(" ","_")),"string"==typeof e.eventLabel&&(e.eventLabel=e.eventLabel.toLowerCase().replaceAll(" ","_"));let o=i.find(n=>n.eventCategory===e.eventCategory&&n.eventAction===e.eventAction&&n.eventLabel===e.eventLabel&&("all"===t||"url"===t&&window.location.pathname===n.url));if(!t||!o){if(t){let t={...e};t.url=window.location.pathname,i.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(i))}(0,_.AB)(e)}},r=e=>{for(let t of i)if(e.indexOf(t.path)>=0){let n=e.match(/str_(\d+)/),_=Array.isArray(n)&&n[1]?Number(n[1]):1;setTimeout(()=>{o({event:"data-event",eventCategory:t.category,eventAction:"stay_15_seconds",eventLabel:e,eventValue:_})},15e3);return}}},3308:function(){},7538:function(e){e.exports={layout:"Layout_layout__AU2d9",noPadding:"Layout_noPadding__miMf4",navigator:"Layout_navigator__bztF_",shine:"Layout_shine__IVDaQ"}}},function(e){e.O(0,[2280,729,4570,4875,6939,3544,5501,207,7339,8453,5064,9682,2971,2117,1744],function(){return e(e.s=5966)}),_N_E=e.O()}]);