(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,7809)),Promise.resolve().then(n.bind(n,9171)),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 L}});var i=n(2265),o=n(631),r=n(6093);let _={promobizness:!0,guruleads:!0,leadssu:!0,admitad:!0,agents:!0},a=e=>/^https:\/\//gi.test(e),l=e=>["",...e.replace(/^http(s)?:\/\//gi,"").replace(/\/$/,"").split(".").slice(-2)].join("."),s=()=>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 i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:365,o=e.NEXT_PUBLIC_BASE_URL||"",r=s()?"":"; domain=".concat(l(o)),_=new Date(new Date().getTime()+864e5*i).toUTCString();document.cookie="".concat(t,"=").concat(JSON.stringify(n),"; SameSite=Strict").concat(a(o)?"; Secure":"").concat(r,"; expires=").concat(_)},E=(e,t)=>{var n;let i="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(i?i.split("&"):[]).reduce((e,t)=>{let[n,i]=t.split("=");return n&&i?{...e,[n]:i}:e},{})},d=e=>E(e,"search");var v=n(3583);let P=(e,t)=>{let n=d(t);if(n&&n.aggregator_id){let t;let o={...n,create_date:new Date().toISOString()};try{var i;t=JSON.parse((null===(i=c())||void 0===i?void 0:i.cpa_click)||"")}catch(e){return}t=o;let r={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"};_[n.aggregator_id]&&(u(e,"cpa_click",t,30),(0,v.l)(r))}};var N=n(4743);let L=()=>{let{asPath:e,basePath:t}=(0,r.t)(),n="".concat(t).concat(e),_=(0,N.d)();return(0,i.useEffect)(()=>{"dev"!==_.NEXT_PUBLIC_VERSION&&(0,o.zK)()},[_.NEXT_PUBLIC_VERSION]),(0,i.useEffect)(()=>{window&&((0,v.y)(n),P(_,n))},[n]),null}},6076:function(e,t,n){"use strict";n.r(t),n.d(t,{Portal:function(){return _}});var i=n(7437),o=n(2265),r=n(4887);let _=e=>{let{children:t,id:n="portal-root"}=e,[_,a]=(0,o.useState)(null);return(0,o.useEffect)(()=>{var e,t,i;let o=null===(e=document)||void 0===e?void 0:e.getElementById(n);if(o)a(o);else{let e=null===(t=document)||void 0===t?void 0:t.createElement("div");return null===(i=document)||void 0===i||i.body.appendChild(e),a(e),()=>{var t;null===(t=document)||void 0===t||t.body.removeChild(e)}}},[]),(0,i.jsx)(i.Fragment,{children:_&&(0,r.createPortal)(t,_)})}},6093:function(e,t,n){"use strict";n.d(t,{t:function(){return o}});var i=n(9376);let o=()=>{let e=(0,i.useRouter)(),t=(0,i.usePathname)(),n=null!=t?t:"",o=window.location.search;return{asPath:"".concat(n).concat(o),basePath:"",pathname:n,push:(t,n,i)=>{if(null==i?void 0:i.shallow){window.history.pushState(null,"",t);return}e.push(t,{scroll:null==i?void 0:i.scroll})}}}},4743:function(e,t,n){"use strict";n.d(t,{d:function(){return _}});var i=n(257);let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i.env[e]||t},r=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return t?o(e,n):n},_=()=>{let e="dev"===o("NEXT_PUBLIC_VERSION");return{REVALIDATE_REQUEST_VALUE:o("REVALIDATE_REQUEST_VALUE","300"),NEXT_PUBLIC_GTM_ID:o("NEXT_PUBLIC_GTM_ID",""),NEXT_PUBLIC_MTM_URL:o("NEXT_PUBLIC_MTM_URL",""),NEXT_PUBLIC_MTM_ID:o("NEXT_PUBLIC_MTM_ID",""),ASSETS_BASE_URL:o("ASSETS_BASE_URL","https://assets.finuslugi.ru"),NEXT_PUBLIC_BASE_URL:o("NEXT_PUBLIC_BASE_URL","https://finuslugi.ru"),NEXT_PUBLIC_API_URL:o("NEXT_PUBLIC_API_URL","https://finuslugi.ru"),NEXT_PUBLIC_NEW_API_URL:o("NEXT_PUBLIC_NEW_API_URL","https://finuslugi.ru"),NEXT_PUBLIC_VERSION:o("NEXT_PUBLIC_VERSION",""),NEXT_PUBLIC_USER_NAME:r("NEXT_PUBLIC_USER_NAME",e,""),NEXT_PUBLIC_PASSWORD:r("NEXT_PUBLIC_PASSWORD",e,""),NEXT_PUBLIC_NEW_USER_NAME:r("NEXT_PUBLIC_NEW_USER_NAME",e,""),NEXT_PUBLIC_NEW_PASSWORD:r("NEXT_PUBLIC_NEW_PASSWORD",e,""),NEXT_PUBLIC_NEW_API_KEY:r("NEXT_PUBLIC_NEW_API_KEY",e,""),NODE_ENV:o("NODE_ENV",""),NEXT_PUBLIC_MP_SC_NAVIGATOR_URL:o("NEXT_PUBLIC_MP_SC_NAVIGATOR_URL",""),NEXT_PUBLIC_HEADLESS_CMS:r("NEXT_PUBLIC_HEADLESS_CMS",e,"http://mp-sc-api:8080"),NEXT_PUBLIC_PAGECONTENT_API:o("NEXT_PUBLIC_PAGECONTENT_API",""),NEXT_PUBLIC_USE_OLD_API:"false"!==String(o("NEXT_PUBLIC_USE_OLD_API")),NEXT_PUBLIC_MP_SC_REDIRECTS_API:o("NEXT_PUBLIC_MP_SC_REDIRECTS_API","")}}},3583:function(e,t,n){"use strict";n.d(t,{l:function(){return r},y:function(){return _}});var i=n(631);let o=[{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"}],r=(e,t)=>{let n=sessionStorage.getItem("pushedEvents"),o=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 r=o.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||!r){if(t){let t={...e};t.url=window.location.pathname,o.push(t),sessionStorage.setItem("pushedEvents",JSON.stringify(o))}(0,i.AB)(e)}},_=e=>{for(let t of o)if(e.indexOf(t.path)>=0){let n=e.match(/str_(\d+)/),i=Array.isArray(n)&&n[1]?Number(n[1]):1;setTimeout(()=>{r({event:"data-event",eventCategory:t.category,eventAction:"stay_15_seconds",eventLabel:e,eventValue:i})},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,8668,7381,2971,2117,1744],function(){return e(e.s=5966)}),_N_E=e.O()}]);