(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3052],{849:function(e,t,n){"use strict";n.d(t,{vM:function(){return i},iB:function(){return d},Wb:function(){return u},il:function(){return m},f6:function(){return s},CV:function(){return c}});var a=n(67455);function r(e,t){return(null==e?void 0:e.status)==="fulfilled"?e.value:t}var l=n(32478),o=n(6326);let i=async(e,t)=>{var n;let[l,i]=await Promise.allSettled([(0,a.t)({url:"/api/v2/posts/by-full-url?fullUrl=".concat(e,"&draft=false&showPlanned=false"),options:{isHeadlessCMS:!0}}),t?Promise.resolve(null):(0,a.t)({url:"/money_data/NavigatorDetailNocache.json?url=".concat(e)})]),s=r(l,null),c=r(i,null),d=(null==c?void 0:null===(n=c.data)||void 0===n?void 0:n.comments)||null;return{data:{article:{...(0,o.I)(null==s?void 0:s.data)||{},comments:d},tags:[],ctgs:[],actual_news:[],news_tags:[],towns_info:[],others:[]}}},s=async(e,t)=>{let n=null,r=(0,a.L)(e,{isHeadlessCMS:!0}),o=(0,l.O)(t);try{let e=await fetch("".concat(r,"/api/v1/counter/view/").concat(o),{method:"PUT"});if(!e.ok)throw Error("Error: ".concat(e.statusText));n=await e.json()}catch(e){console.error("Error:",e)}return null==n?void 0:n.views},c=async(e,t,n)=>{var r;let{data:l}=await (0,a.t)({url:"/api/v1/polls/votes",options:{isHeadlessCMS:!0},config:{method:"POST",body:JSON.stringify({contentUrl:e,pollKey:t,variantKey:n}),headers:{"Content-Type":"application/json"}}});return(0,o.u)(null==l?void 0:null===(r=l.result)||void 0===r?void 0:r.answers)},d=async(e,t)=>{let{data:n}=await (0,a.t)({url:"/api/v1/polls/results?contentUrl=".concat(e,"&pollKey=").concat(t),options:{isHeadlessCMS:!0}});return(0,o.u)(null==n?void 0:n.answers)},u=async(e,t,n,r,l,o)=>{let i=null,s=(0,a.L)(e,{});try{let e=await fetch("".concat(s,"/money_data/NavigatorComments.json"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:t,user_name:r,user_id:n,comment:l,secret:"g4$3in4d",type:o})});if(!e.ok)throw Error("Error: ".concat(e.statusText));i=await e.json()}catch(e){console.error("Error:",e)}return!!(null==i?void 0:i.success)},m=async(e,t)=>{let n=null,r=(0,a.L)(e,{isHeadlessCMS:!0}),o=(0,l.O)(t);try{let e=await fetch("".concat(r,"/api/v1/counter/like/INCREMENT/").concat(o),{method:"POST"});if(n=await e.json(),!e.ok||!(null==n?void 0:n.likes))throw Error("Error: ".concat(e.statusText))}catch(e){console.error("Error:",e)}return!!(null==n?void 0:n.likes)}},52266:function(e,t,n){"use strict";var a,r,l,o;n.d(t,{z:function(){return r}}),(l=a||(a={})).Company="company",l.CompanyInsurance="company_insurance",l.Finuslugi="finuslugi",l.Industry="industry",l.IndustryInsurance="industry_insurance",(o=r||(r={})).Annotation="annotation",o.HTML="html",o.Header="header",o.Keynote="keynote",o.SubHeader="sub_header",o.DocumentFile="document-file"},28045:function(e,t,n){"use strict";n.d(t,{y:function(){return d}});let a="authorization_code",r={access_token:"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxbDFyMEhYU0U4VFo1VkRsZFhKZ1JfdHBiaEtJclJWTTdtSnJVQnVCWm5rIn0.eyJleHAiOjE3NjQ3NTg0MzksImlhdCI6MTc2NDc1ODEzOSwiYXV0aF90aW1lIjoxNzY0NzU4MTM3LCJqdGkiOiJiMDdkNWVmZS03Y2U3LTQyZGItODlmYy04MjcxNTJiZDBkM2QiLCJpc3MiOiJodHRwczovL3Nzby1zdGFibGUuYmV0YS5tb2V4LmNvbS9hdXRoL3JlYWxtcy9jcmFtbC11bml2ZXJzYWwiLCJhdWQiOlsiZGZhX29pcyIsInRvdWNoY3JhbWxfcHVibGljIiwiYWNjb3VudCJdLCJzdWIiOiIzNjU1Nzg4Zi1hMjExLTQyNjYtODIxZS00M2FmZDE4N2JlZjciLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJ0b3VjaGNyYW1sX3B1YmxpYyIsIm5vbmNlIjoiVUFiakhyUXZiMnNsOHpQUHFLdnVXIiwic2lkIjoiMTNjNWY5ZGMtZjAzOC00NGM5LWI1ZmUtZDk0ZWZmNzYzOGMwIiwiYWxsb3dlZC1vcmlnaW5zIjpbIiIsImh0dHBzOi8vZGV2LXJjLWxrLmJldGEubW9leC5jb20vKiIsIioiXSwicmVhbG1fYWNjZXNzIjp7InJvbGVzIjpbImRlZmF1bHQtcm9sZXMtY3JhbWwtdW5pdmVyc2FsIiwib2ZmbGluZV9hY2Nlc3MiLCJ1bWFfYXV0aG9yaXphdGlvbiJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImFjY291bnQiOnsicm9sZXMiOlsibWFuYWdlLWFjY291bnQiLCJtYW5hZ2UtYWNjb3VudC1saW5rcyIsInZpZXctcHJvZmlsZSJdfX0sInNjb3BlIjoib3BlbmlkIGJhY2t3YXJkc19jb21wYXRpYmxlIGVtYWlsIHVuaXZlcnNhbF9jcmFtbF9wcmVmZXJyZWQgYXV0aHpfYXR0cnMgc3ViX2NyYW1sX2lkIHByb2ZpbGUgYXV0aF9wcm92aWRlciBhdXRoX2Zsb3ciLCJhdXRoel9hdHRycyI6eyJzdGF0dXMiOiJBQ1RJVkUiLCJpZGVudF9sdmwiOiJOT1RfSURFTlRJRklFRCIsImF1dGhfcHJvdmlkZXIiOiJwaG9uZSIsImF1dGhfZmxvdyI6InNpbXBsZSJ9LCJlbWFpbF92ZXJpZmllZCI6ZmFsc2UsImF1dGhfZmxvdyI6InNpbXBsZSIsInByZWZlcnJlZF91c2VybmFtZSI6Ijc0ODliNzQwLTViYTAtNGMzMS1hYWVmLTIxMDIyZDQxMWVhZSIsInNlc3Npb25fc3RhdGUiOiIxM2M1ZjlkYy1mMDM4LTQ0YzktYjVmZS1kOTRlZmY3NjM4YzAiLCJjdXN0b21lcl9pZCI6Ijc0ODliNzQwLTViYTAtNGMzMS1hYWVmLTIxMDIyZDQxMWVhZSIsImF1dGhfcHJvdmlkZXIiOiJwaG9uZSJ9.R3s8pdLr1eam9SuZAQ_kAMGZh7J8I1-WApZ287zip3Rxd1VFDhY3IblH-itDvBxS0cyTuSVi5f_B-YJztv05bDlRvRAYJ3bEKwdSQjk_8izolOZLvEWkQqohRHPXKfYg8vHmQ27BZcFe9CikANAH9w_tTkbBdOMEbiI4dznXvL92YGlzlyxsdMUvpeSYibjWA5dlIeWx4lj8FdEDBUSqBf6JdoOi9iclWb9qw9DCwlXlMAIy_Lbfdb2yMy9ZXybNL5uHN-32r3_klwyYRsy2LhXKebKyJIJaIgvdcrHMn9A_BeyEYfdPWsF_uKFoADi2Hcx2f7Bo_6mnJXXZ3Eld-A",expires_in:300,refresh_expires_in:1800,refresh_token:"eyJhbGciOiJIUzUxMiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJiODA5MTdmZi00OGIzLTRjMmMtYTc5YS1lOTkzODE4ZDZkNjYifQ.eyJleHAiOjE3NjQ3NTk5MzksImlhdCI6MTc2NDc1ODEzOSwianRpIjoiMmVhNTk2ZjgtNmJiMi00YWE4LTgwNWYtNzUwZDUwMjI3ZGExIiwiaXNzIjoiaHR0cHM6Ly9zc28tc3RhYmxlLmJldGEubW9leC5jb20vYXV0aC9yZWFsbXMvY3JhbWwtdW5pdmVyc2FsIiwiYXVkIjoiaHR0cHM6Ly9zc28tc3RhYmxlLmJldGEubW9leC5jb20vYXV0aC9yZWFsbXMvY3JhbWwtdW5pdmVyc2FsIiwic3ViIjoiMzY1NTc4OGYtYTIxMS00MjY2LTgyMWUtNDNhZmQxODdiZWY3IiwidHlwIjoiUmVmcmVzaCIsImF6cCI6InRvdWNoY3JhbWxfcHVibGljIiwibm9uY2UiOiJVQWJqSHJRdmIyc2w4elBQcUt2dVciLCJzaWQiOiIxM2M1ZjlkYy1mMDM4LTQ0YzktYjVmZS1kOTRlZmY3NjM4YzAiLCJzY29wZSI6Im9wZW5pZCBiYXNpYyBiYWNrd2FyZHNfY29tcGF0aWJsZSBlbWFpbCBjb25maWdfcmVxdWlyZV9ydW5fY3VzdG9tZXJfdmVyaWZpY2F0aW9ucyBjdXN0b21lcl9yZWNvcmRfc3RhdGUgYnJva2VyYWdlX2tleXNfd2ViIGVzaWFfb2lkIHVuaXZlcnNhbF9jcmFtbF9wcmVmZXJyZWQgYXV0aHpfYXR0cnMgcm9sZXMgc3ViX2NyYW1sX2lkIHByb2ZpbGUgd2ViLW9yaWdpbnMgYXV0aF9wcm92aWRlciBhdXRoX2Zsb3cifQ.mtkm-1NMff6Mzp5GHoSOXv2muBgTrl20f6vCPoa9PZLN2i35DEB4QrAG5SRR_qD3KCe6Df1yUOnGwoygG0vcZA",token_type:"Bearer",id_token:"eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJxbDFyMEhYU0U4VFo1VkRsZFhKZ1JfdHBiaEtJclJWTTdtSnJVQnVCWm5rIn0.eyJleHAiOjE3NjQ3NTg0MzksImlhdCI6MTc2NDc1ODEzOSwiYXV0aF90aW1lIjoxNzY0NzU4MTM3LCJqdGkiOiJiNzZiNDU0Yy0yNDdmLTRmNWEtYjMyOC1lZGExNDQwN2Y5YjMiLCJpc3MiOiJodHRwczovL3Nzby1zdGFibGUuYmV0YS5tb2V4LmNvbS9hdXRoL3JlYWxtcy9jcmFtbC11bml2ZXJzYWwiLCJhdWQiOiJ0b3VjaGNyYW1sX3B1YmxpYyIsInN1YiI6IjM2NTU3ODhmLWEyMTEtNDI2Ni04MjFlLTQzYWZkMTg3YmVmNyIsInR5cCI6IklEIiwiYXpwIjoidG91Y2hjcmFtbF9wdWJsaWMiLCJub25jZSI6IlVBYmpIclF2YjJzbDh6UFBxS3Z1VyIsInNpZCI6IjEzYzVmOWRjLWYwMzgtNDRjOS1iNWZlLWQ5NGVmZjc2MzhjMCIsImF0X2hhc2giOiJxOWdHVEc1UUNFakRRM2d6UWpCX1hRIiwiZW1haWxfdmVyaWZpZWQiOmZhbHNlLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiI3NDg5Yjc0MC01YmEwLTRjMzEtYWFlZi0yMTAyMmQ0MTFlYWUiLCJzZXNzaW9uX3N0YXRlIjoiMTNjNWY5ZGMtZjAzOC00NGM5LWI1ZmUtZDk0ZWZmNzYzOGMwIn0.UQBUtA7F3MBo1ax2IMZ2ok5ZjGo_Yp7F20vucJOhEldK7WCHfauHv96eYD7eKU6L0lmhbmFqF92MLIwN58b2ksd6Xy08RN3PmiMasIhblDiOx8Cd6W9VrbdnR5Uuf2Ff01m3zRhLK11K1rfM16nbW2mltnsCCacUBBpRKUONjUEw7NLWXzyxtcTHs6ZSPkgVFb8qLiaN2l3yCmkq-tDeRQt9N74SBIgGFeU91gK6Y9JKS2nV4QZ0AbISeR_PUoH96JH0_teCQnSRR704-ca9MdycWpNB5Yt6eo9IMKCpdXl6aBPLtlNlOXloAeqf3nrMsOXWxL5DjH8ySgHQ5S-xxg","not-before-policy":0,session_state:"13c5f9dc-f038-44c9-b5fe-d94eff7638c0",scope:"openid auth_provider auth_flow",customer_record_state:"created"},l=e=>"object"==typeof e&&null!==e,o=e=>!!l(e)&&"string"==typeof e.access_token&&"number"==typeof e.expires_in&&"number"==typeof e.refresh_expires_in&&"string"==typeof e.refresh_token&&"string"==typeof e.token_type,i=()=>"authDebug"===new URLSearchParams(window.location.search).get("mode"),s=async e=>{let t=await e.text();if(!t)return null;try{return JSON.parse(t)}catch(e){return t}},c=e=>{let{code:t,refreshToken:n,codeVerifier:r,grantType:l=a,redirectUri:o}=e,i=new URLSearchParams;return t&&i.set("code",t),n&&i.set("refresh_token",n),l===a&&r&&i.set("code_verifier",r),i.set("response_type","code"),i.set("grant_type",l),i.set("client_id","journal"),i.set("redirect_uri",o),i},d=async e=>{let{tokenUrl:t}=e;if(i())return{ok:!0,status:200,data:r};let n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:c(e)}),a=await s(n);return n.ok&&o(a)?{ok:!0,status:n.status,data:a}:{ok:!1,status:n.status,data:a}}},11095:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});var a=n(57437),r=n(2265),l=n(54365),o=n(4028),i=n(49286),s=n.n(i);let c=e=>{let{params:t,children:n,className:i,config:c}=e,[d,u]=(0,r.useState)(!1),[m,_]=(0,r.useState)(""),p=(0,r.useRef)(null),h=(0,r.useRef)("");return(0,r.useEffect)(()=>{h.current&&(null==c?void 0:c.yaContextCb)&&(null==c?void 0:c.Ya)&&c.yaContextCb.push(()=>{c.Ya.adfoxCode.destroy(h.current)}),_((0,o.R)())},[null==c?void 0:c.Ya,null==c?void 0:c.yaContextCb,t.pp]),(0,r.useEffect)(()=>{if(h.current===m)return;if(!c){u(!0);return}let e=()=>{var e,t;let n=null===(e=p.current)||void 0===e?void 0:e.querySelector("iframe");n?n.style.height="".concat(null===(t=n.contentWindow)||void 0===t?void 0:t.document.body.scrollHeight,"px"):console.warn("ads blocked"),u(!n)};c.yaContextCb&&c.yaContextCb.push(()=>{c.Ya.adfoxCode.create({ownerId:c.ownerId,containerId:"adfox_".concat(m),params:t,onRender:e})}),setTimeout(e,5e3),h.current=m},[m,c,t]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,l.Z)(d&&s().hide,i),ref:p,id:"adfox_".concat(m)},m),d&&n]})}},86031:function(e,t,n){"use strict";n.d(t,{e:function(){return c},v:function(){return d}});var a=n(57437),r=n(20660),l=n(46295),o=n(83583),i=n(4969),s=n.n(i);let c=e=>{let{tab:t,category:n}=e,i={...t,banner:void 0},c=(0,l.S)(),d=["best-offers",i.productType];return n&&d.push(n),(0,a.jsx)("div",{className:s().bestOffersWrapper,children:(0,a.jsx)(r.MJ,{tabs:[i],baseUrl:c.NEXT_PUBLIC_BASE_URL,s3Assets:c.NEXT_PUBLIC_S3_ASSETS,dataLayerPush:o.l,singleProduct:!0,eventCategory:d.join("_"),theme:"gray"})})},d=(e,t)=>{if(Array.isArray(e))return e.find(e=>e.productType===t)}},73104:function(e,t,n){"use strict";n.d(t,{E:function(){return r},z:function(){return o}});var a=n(6326);let r=e=>Array.isArray(e)?e:Array.isArray(null==e?void 0:e.articles)&&"fullUrl"in((null==e?void 0:e.articles[0])||{})?e.articles.map(e=>(0,a.I)(e)):[],l={BUTTON:"withButton",FORM:"withForm"},o=e=>e&&"createdAt"in e?{...e,image_mobile:e.imageMobile,type:l[e.type],button_text:e.buttonText}:e},89606:function(e,t,n){"use strict";n.d(t,{L:function(){return t4}});var a=n(57437),r=n(2265),l=n(33145),o=n(27648),i=n(80684),s=n(76306),c=n(54365),d=n(849),u=n(70526),m=n(14322),_=n.n(m);let p=e=>{let{quote:t,name:n,position:r,img:l}=e;return t?(0,a.jsxs)("div",{className:(0,c.Z)(_().wrapper,"disableContentBlocksStyles"),children:[n&&(0,a.jsxs)("div",{className:_().author,children:[l&&(0,a.jsx)("div",{className:_().image,children:(0,a.jsx)("img",{src:l,alt:"portrait"})}),(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:_().name,children:n}),(0,a.jsx)("div",{className:_().position,children:r})]})]}),(0,a.jsx)("div",{className:_().quote,children:t})]}):null};var h=n(35563),v=n(75461),f=n(54823);let g=e=>"object"==typeof e&&null!==e,b=e=>{try{let t=e.split(".")[1];if(!t)return null;let n=t.replace(/-/g,"+").replace(/_/g,"/"),a=n.padEnd(n.length+(4-n.length%4)%4,"="),r=atob(a),l=Uint8Array.from(r,e=>e.charCodeAt(0));return JSON.parse(new TextDecoder().decode(l))}catch(e){return null}},x=e=>{let t=e.trim().split(/\s+/);return t[0]?1===t.length?t[0]:t[1]||null:null},y=e=>"string"!=typeof e?null:x(e),A=e=>{let t=e.authz_attrs;return g(t)?y(t.given_name):null},C=e=>{let t=(0,f.Z)(),n=t?b(t):null;return g(n)&&(A(n)||y(n.given_name))||e};var I=n(62178),j=n(4028);let k=()=>{let e=new Date,t=e.getFullYear(),n=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),r=String(e.getHours()).padStart(2,"0"),l=String(e.getMinutes()).padStart(2,"0"),o=String(e.getSeconds()).padStart(2,"0");return"".concat(t,"-").concat(n,"-").concat(a," ").concat(r,":").concat(l,":").concat(o)};var N=n(85769),w=n(38856),S=n(27669);let T=e=>{let t=new Date(e),n=t.getDate().toString(),a=(t.getMonth()+1).toString().padStart(2,"0"),r=t.getFullYear(),l=t.getHours().toString().padStart(2,"0"),o=t.getMinutes().toString().padStart(2,"0");return"".concat(n,".").concat(a,".").concat(r,", ").concat(l,":").concat(o)},L=["#5bce95","#ff696b","#c8df77","#ffb74d","#81d4fa","#aed581","#f06292","#4db6ac","#9575cd","#7986cb","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#81c784","#dce775","#fff176","#ffd54f","#ffb74d","#ff8a65"],E=e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return t},B=e=>{let t=Math.abs(E(e))%L.length;return L[t]},M="unsent_comments",O="comments_should_send_after_auth",R=(e,t)=>{let n=Z();n[String(e)]=t,w.A.setItem(M,JSON.stringify(n))},W=e=>{let t=Z();delete t[String(e)],w.A.setItem(M,JSON.stringify(t))},Z=()=>w.A.getItem(M)||{},U=e=>{let t=w.A.getItem(O)||{};t[String(e)]=!0,w.A.setItem(O,JSON.stringify(t))},F=e=>!0===(w.A.getItem(O)||{})[String(e)],Y=e=>{let t=w.A.getItem(O)||{};delete t[String(e)],w.A.setItem(O,JSON.stringify(t))};var V=n(77337),J=n(7753);let D={theme:"light",view:"phone",linkTarget:"_self",primaryAuthProviders:["PHONE"],additionalAuthProviders:["TINKOFF","ALFA","SBER","MTS","SOVCOM","VTB"],primaryTextOverride:"Войти"},z={title:"Войдите по номеру телефона",description:"Чтобы оставить комментарий",availableAuthProviders:["PHONE","TINKOFF","ALFA","SBER","MTS","SOVCOM","VTB"],consents:[{key:"isPlatformRulesAccepted",title:{text:"Принимаете правила платформы",links:[]},value:!0,required:!0,hidden:!1},{key:"isProcessingPersonalDataAllowed",title:{text:"Подтверждаете актуальность персональных данных и соглашаетесь на их обработку в соответствии с политикой конфиденциальности",links:[]},value:!0,required:!0,hidden:!1},{key:"isPromotionSendAllowed",title:{text:"Соглашаетесь получать маркетинговую рассылку",links:[]},value:!0,required:!1,hidden:!1}]},X={endpoint:"https://sso-stable.beta.moex.com/auth/realms/craml-universal/protocol/openid-connect/auth",protocol:"oauth2",response_type:"code",response_mode:"query",client_id:"journal",scope:"openid+email+profile",code_challenge:"nsFRX3OPOyJ-YwsNJll07k1_xbGD5ByKGJA-Sl3ju1Q",code_challenge_method:"S256",nonce:"VXOi0Dxv.up2.uSbL9PCjeVtv9dYJhCg",state:{simple:!0,stateId:"Q_SOFRRbmY6qAhvO87JJa",fingerprintHash:"b7080a7c721d8d76781d64ba309e6521",phoneVerify:"true",cramlURL:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v5/customers",cramlProvidersURL:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v6/providers",cramlCustomersURL:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v5/customers",cramlPhoneVerificationUrl:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v6/phone-verifications/run",cramlConfirmOtpUrl:"http://craml-sys-customer-data.craml-rc.mpddev.moex.com/api/v6/customers/create-or-find-provider-customer-by-otp",otpURL:"http://mp-sys-notifier.mp-rc.mpddev.moex.com/api/v0/notifications"}},H=e=>{let t=new TextEncoder().encode(e),n="";return t.forEach(e=>{n+=String.fromCharCode(e)}),btoa(n)},P=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",a=w.A.getItemRaw("browserId"),r=w.a.getItemRaw("browserSessionId"),l={...X.state,...e,browserId:a,browserSessionId:r};return t?l.phone=n:(delete l.phone,delete l.phoneVerify),H(JSON.stringify(l))},G=(e,t,n)=>{let a=(0,V.Oh)(n),r=e.includes("?")?"&":"?";return"".concat(e).concat(r,"scope=").concat(t,"&").concat(a)},Q=async e=>{let{data:t={},endpoint:n,redirect_uri:a,phone:r="",scope:l,includePhoneInState:o,includeResponseMode:i=!0}=e,{codeChallenge:s,codeVerifier:c}=await (0,J.Sn)(),d=t||{},u=P(d.state||{},o,r);(0,J.Xp)(c);let{endpoint:m,scope:_,...p}={...X,...d,endpoint:n||d.endpoint||X.endpoint,redirect_uri:a,state:u,code_challenge:s,scope:l||d.scope||X.scope};return i?G(m,_,p):G(m,_,{client_id:p.client_id,redirect_uri:p.redirect_uri,response_mode:"fragment",response_type:p.response_type,prompt:"none",code_challenge:p.code_challenge,code_challenge_method:p.code_challenge_method})},q=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return Q({data:e,redirect_uri:t,phone:n,includePhoneInState:!0})},K=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return Q({data:e,endpoint:t,redirect_uri:n,scope:"openid",includePhoneInState:!1,includeResponseMode:!1})};var $=n(67455);let ee={getLayoutData:async e=>(await (0,$.t)({url:"/api/v1/layout/".concat(e),options:{isHeadlessCMS:!0}})).data||null,async getPageData(e,t){let n=new URLSearchParams({scLayoutName:e,scPageUrl:t}).toString();return(await (0,$.t)({url:"/api/v1/data/page-data?".concat(n),options:{isHeadlessCMS:!0}})).data||null},getPage:async e=>(await (0,$.t)({url:"/api/v1/sc-page/".concat(e),options:{isHeadlessCMS:!0}})).data||null},et=async()=>{try{let e=await ee.getLayoutData("LoginWidget");return(null==e?void 0:e.custom)||null}catch(e){return null}},en=e=>{let{enabled:t,endpoint:n,redirectUri:a}=e,l=(0,r.useRef)(null),o=(0,r.useRef)(null),i=(0,r.useCallback)(()=>{var e;o.current&&(window.clearTimeout(o.current),o.current=null),null===(e=l.current)||void 0===e||e.remove(),l.current=null},[]),s=(0,r.useCallback)(e=>{null!=e&&e.target&&e.target!==l.current||(o.current&&window.clearTimeout(o.current),o.current=window.setTimeout(i,15e3))},[i]),c=(0,r.useCallback)(async()=>{if(t&&n&&a&&"undefined"!=typeof document&&document.body)try{let e=await et(),t=await K(e,n,a),r=document.createElement("iframe");i(),r.hidden=!0,r.tabIndex=-1,r.setAttribute("aria-hidden","true"),r.style.display="none",r.style.width="0",r.style.height="0",r.style.border="0",r.addEventListener("load",s),r.addEventListener("error",s),l.current=r,r.src=t,document.body.appendChild(r)}catch(e){i()}},[t,n,a,i,s]);return(0,r.useEffect)(()=>i,[i]),c};var ea=n(13466),er=n(96350),el=n(2373),eo=n(42953),ei=n(43430),es=n.n(ei);let ec="Войдите, чтобы отправить комментарий",ed=e=>{let{isOpen:t,onClose:n,postId:r}=e,l=(0,el.G)("lg"),o=(0,window.location.href).split("#")[0],i="".concat(eo.LK,"?returnTo=").concat(o,"#comments").concat(r);return!l&&t?(0,a.jsx)("div",{className:"disableContentBlocksStyles",children:(0,a.jsx)("div",{className:es().wrapper,children:(0,a.jsxs)("div",{className:es().tooltip,children:[(0,a.jsx)("div",{children:ec}),(0,a.jsx)(v.zx,{as:"a",label:"Войти",href:i,target:"_self",onClick:()=>{(0,N.I)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventActionType:N.i.button,eventActionText:(0,S.b)("войти"),eventLabel:""})}})]})})}):(0,a.jsx)(ea.h,{children:(0,a.jsx)("div",{className:"disableContentBlocksStyles",children:(0,a.jsxs)(er.j,{className:es().mobilePopup,isOpen:t,onClose:n,hasCloseButton:!1,children:[(0,a.jsx)("div",{className:es().text,children:ec}),(0,a.jsx)(v.zx,{as:"a",label:"Войти",href:i,target:"_self"})]})})})};var eu=n(67356),em=n(7711),e_=n(83583);let ep=e=>e.replace(/\D/g,""),eh=()=>{let e=Array.from(document.querySelectorAll("input")).find(e=>ep(e.value).length>=11);return e?ep(e.value):""};var ev=n(56423),ef=n.n(ev);let eg="navigator-comments",eb="authDebug",ex=e=>{let t=new URL(e);return t.searchParams.set("mode",eb),t.searchParams.set("code","Qq12345"),t.toString()},ey=e=>{let{env:t,isOpen:n,onClose:l,postId:o}=e,i=(0,v.aF)("m"),[s,c]=(0,r.useState)(null),[d,u]=(0,r.useState)(null),[m,_]=(0,r.useState)(""),p="false"!==String(t.NEXT_PUBLIC_COMMENTS_AUTH_WIDGET_SSO_IFRAME_ENABLED),h="false"!==String(t.NEXT_PUBLIC_CALLBACK_PAGE_ENABLED),f=new URLSearchParams(window.location.search).get("mode")===eb,g=t.NEXT_PUBLIC_AUTH_WIDGET_CONFIG_KEY||"journal",b=t.NEXT_PUBLIC_AUTH_WIDGET_BASE_URL||"https://lk.finuslugi.ru",x=(0,window.location.href).split("#")[0],y="".concat(window.location.origin,"/callback"),A="".concat(x,"#comments").concat(o),{title:C,description:I,...j}=((null==s?void 0:s.title)?s:z)||{},k={requiredIdentLevel:"REMOTELY_IDENTIFIED",targetUri:A,fallbackUri:A},{getHref:N}=(0,em.K)({serverConfig:j,baseUrl:b,apiBaseUrl:t.NEXT_PUBLIC_AUTH_WIDGET_API_URL||"",entryPointId:eg,configKey:g,scenarioParams:k,config:D,isSilent:!0,autoFetch:!1}),w=(0,r.useCallback)(async()=>{if(!t.NEXT_PUBLIC_AUTH_WIDGET_API_URL){c(null);return}try{let e=await (0,eu.g)(t.NEXT_PUBLIC_AUTH_WIDGET_API_URL,g);c(e)}catch(e){c(null)}},[g,t.NEXT_PUBLIC_AUTH_WIDGET_API_URL]),S=(0,r.useCallback)(async()=>{try{let e=await ee.getLayoutData("LoginWidget"),t=null==e?void 0:e.custom;u(t||null)}catch(e){u(null)}},[]);(0,r.useEffect)(()=>{if(!n){_("");return}w(),S()},[n,w,S]);let T=async e=>{if("PHONE"===e){let e=eh();if(f){_(ex(y));return}let t=await q(d,h?y:A,e);if(!p){window.open(t,"_self");return}_(t);return}let t=N(e,{phone:eh()});window.open(t,D.linkTarget||"_self")},L=(0,a.jsx)("div",{className:ef().body,children:m?(0,a.jsx)("iframe",{className:ef().ssoFrame,src:m,title:C||"Авторизация"}):(0,a.jsx)(em.U,{className:ef().widget,serverConfig:j,baseUrl:b,s3AssetsUrl:"".concat(t.NEXT_PUBLIC_S3_ASSETS,"/mp-assets"),entryPointId:eg,configKey:g,scenarioParams:k,config:D,onAnalyticsEvent:e_.l,isSilent:!0,overrideLoginAction:T})});return(0,a.jsx)(ea.h,{children:i?(0,a.jsx)(er.j,{isOpen:n,onClose:l,title:C||"",subtitle:I||void 0,children:L}):(0,a.jsx)(v.u_,{open:n,onClose:l,size:"s",header:{title:C||"",subtitle:I||""},children:L})})};var eA=n(56005),eC=n.n(eA);let eI=[{label:"По дате",value:"date"},{label:"По популярности",value:"likes",shortLabel:"По лайкам"}],ej=e=>{let{onChangeSort:t,isIncreaseSort:n}=e;return(0,a.jsxs)("div",{className:(0,c.Z)(eC().sortTypeHead),children:[(0,a.jsx)("button",{style:{marginLeft:"0px",marginRight:"8px"},className:(0,c.Z)(eC().sortTypeButton),onClick:t,children:n?(0,a.jsx)(i.IconFdsSortDescendingO,{size:22}):(0,a.jsx)(i.IconFdsSortAscendingO,{size:22})}),"Сортировать"]})},ek=e=>{let{isIncreaseSort:t,setIsIncreaseSort:n,sortType:l,setSortType:o,chipView:s,className:d}=e,u=eI.find(e=>e.value===l),m=(0,r.useCallback)(()=>{n(e=>(w.A.setItem("comments_sort",JSON.stringify(!e)),!e))},[n]),_=(0,r.useCallback)(e=>{let t=eI.find(t=>t.value===e);t&&(w.A.setItem("comments_sort_type",JSON.stringify(t.value)),o(t.value))},[o]);return(0,a.jsxs)("div",{className:(0,c.Z)(eC().wrapper,d,{[eC().chip]:s}),children:[(0,a.jsx)("button",{className:(0,c.Z)(eC().icon,eC().iconButton),onClick:s?()=>null:m,children:t?(0,a.jsx)(i.IconFdsSortDescendingO,{size:24}):(0,a.jsx)(i.IconFdsSortAscendingO,{size:24})}),(0,a.jsxs)(v.Lt,{children:[(0,a.jsx)(v.WA,{children:(0,a.jsx)("div",{role:"button",className:(0,c.Z)(eC().text,eC().actionButton),"data-qa":l,children:(null==u?void 0:u.shortLabel)||(null==u?void 0:u.label)||"Сортировка"})}),(0,a.jsxs)(v.Nv,{children:[(0,a.jsx)(ej,{onChangeSort:m,isIncreaseSort:t}),(0,a.jsx)(v.YV,{}),eI.map(e=>(0,a.jsx)("div",{"data-qa":"".concat(e.value,"_radio"),className:eC().sortType,children:(0,a.jsx)(v.XZ,{onChange:()=>{_(e.value)},value:e.value===l,label:e.label})},e.value))]})]})]})};var eN=n(38626),ew=n.n(eN);let eS="Гость",eT=()=>w.A.getItemRaw("partialAuth")||(0,I.jz)(),eL=async e=>{let{isCallbackPageEnabled:t,ignoreCustomerIdCookie:n,tokenUrl:a,redirectUri:r}=e;return await (0,I.vY)(t,a,r,{ignoreCustomerIdCookie:n})||(t?null:eT())},eE=e=>{let{env:t,postId:n,comments:l,inputRef:o}=e,s=Array.isArray(l)?l:[],[u,m]=(0,r.useState)(""),[_,p]=(0,r.useState)([]),[f,g]=(0,r.useState)(3),[b,x]=(0,r.useState)(!1),[y,A]=(0,r.useState)(null),[L,E]=(0,r.useState)(!1),[M,O]=(0,r.useState)(!1),[V,J]=(0,r.useState)(!1),[D,z]=(0,r.useState)(!1),[X,H]=(0,r.useState)(!1),P=(0,r.useRef)(!1),[G,Q]=(0,r.useState)(!1),[q,K]=(0,r.useState)("date"),$="false"!==String(t.NEXT_PUBLIC_COMMENTS_AUTH_WIDGET_ENABLED),ee="false"!==String(t.NEXT_PUBLIC_CALLBACK_PAGE_ENABLED),et="false"!==String(t.NEXT_PUBLIC_COMMENTS_AUTH_HIDDEN_IFRAME_ENABLED),ea="".concat(t.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL,"/token"),er="".concat(window.location.origin,"/callback"),el=en({enabled:et,endpoint:"".concat(t.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL,"/auth"),redirectUri:er});(0,r.useEffect)(()=>{let e=Z()[String(n)]||"",t=F(n);m(e),z(t),Q(!0===w.A.getItem("comments_sort")),K(w.A.getItem("comments_sort_type")||"date"),eL({isCallbackPageEnabled:ee,ignoreCustomerIdCookie:et,tokenUrl:ea,redirectUri:er}).then(e=>{A(e)})},[er,ea,ee,et,n]);let eo=[...s].sort((e,t)=>G&&"likes"===q?new Date(t.date_created).getTime()-new Date(e.date_created).getTime():G||"likes"===q?new Date(e.date_created).getTime()-new Date(t.date_created).getTime():new Date(t.date_created).getTime()-new Date(e.date_created).getTime()),ei=eo.length-f,es=(0,h._6)(ei,"комментарий","комментария","комментариев"),ec=(0,r.useCallback)(()=>{Y(n),z(!1)},[n]),eu=(0,r.useCallback)(()=>{U(n),z(!0)},[n]),em=(0,r.useCallback)(async()=>{let e=await eL({isCallbackPageEnabled:ee,ignoreCustomerIdCookie:et,tokenUrl:ea,redirectUri:er});e&&(A(e),O(!1),J(!1),z(F(n)))},[er,ea,ee,et,n]),e_=(0,r.useCallback)(async e=>{if(!u)return!1;let a=C(eS);if(!await (0,d.Wb)(t,n,e,a,u,"send"))return!1;let r={id:(0,j.R)(),comment:u,date_created:k(),user_name:a,post_id:String(n),user_id:e};return p(e=>[...e,r]),m(""),W(n),ec(),!0},[ec,t,u,n]),ep=(0,r.useCallback)(async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:y;if(e&&u&&!P.current){P.current=!0,H(!0);try{let a=C(eS);if(await (0,d.Wb)(t,n,e,a,u,"validate")){let t=await e_(e);x(!t),t||ec();return}x(!0),ec()}catch(e){return}finally{P.current=!1,H(!1)}}},[ec,y,t,e_,u,n]),eh=()=>{eu(),J(!1),$?O(!0):E(!0),(0,N.I)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventActionType:N.i.button,eventActionText:(0,S.b)("войти"),eventLabel:""})},ev=(0,r.useCallback)(()=>{O(!1),ec()},[ec]),ef=(0,r.useCallback)(()=>!!w.A.getItemRaw("comments_auth_callback_token_failed")&&(w.A.removeItem("comments_auth_callback_token_failed"),ev(),J(!0),!0),[ev]);(0,r.useEffect)(()=>{ef()||em();let e=()=>{ef()||em()},t=()=>{"visible"===document.visibilityState&&e()},n=(0,I.rq)(e);return window.addEventListener("focus",e),window.addEventListener("storage",e),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",e),window.removeEventListener("storage",e),document.removeEventListener("visibilitychange",t),n()}},[ef,em]),(0,r.useEffect)(()=>{if(D&&y&&!P.current){if(!F(n)){z(!1);return}if(!u){ec();return}ep(y)}},[ec,y,ep,u,n,D]);let eg=async()=>{if(!u)return;let e=await eL({isCallbackPageEnabled:ee,ignoreCustomerIdCookie:et,tokenUrl:ea,redirectUri:er});if(A(e),!e){el(),eh();return}await ep(e)};return(0,a.jsxs)("div",{id:"comments".concat(n),className:ew().wrapper,children:[(0,a.jsxs)("div",{className:ew().header,children:[(0,a.jsxs)("div",{className:ew().title,children:[(0,a.jsx)("label",{children:"Комментарии"}),(0,a.jsx)("span",{children:eo.length})]}),(0,a.jsx)(ek,{isIncreaseSort:G,setIsIncreaseSort:Q,sortType:q,setSortType:K})]}),(0,a.jsxs)("div",{className:ew().formBlock,children:[(0,a.jsxs)("div",{className:ew().form,children:[(0,a.jsx)(v.MA,{ref:o,size:"l",className:ew().input,label:"Написать комментарий",value:u,onClick:()=>{(0,N.I)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventActionType:N.i.click_field,eventActionText:(0,S.b)("написать комментарий"),eventLabel:""})},onChange:e=>{m(e),b&&e&&x(!1),V&&J(!1),R(n,e)}}),(0,a.jsx)(v.zx,{className:ew().submitBtn,size:"s",disabled:!u||X||!$&&L,onClick:eg,shape:"circle-icon",iconLeft:(0,a.jsx)(i.IconFdsArrowUpSmallO,{size:36})}),!$&&(0,a.jsx)(ed,{isOpen:L,onClose:()=>E(!1),postId:n})]}),b&&(0,a.jsxs)("div",{className:ew().caption,children:["Не допускается использование ненормативной лексики. ",(0,a.jsx)("br",{}),"Отредактируйте комментарий и попробуйте снова."]}),!b&&V&&(0,a.jsx)("div",{className:ew().caption,children:"Авторизация не удалась."}),!!_.length&&!b&&!V&&(0,a.jsxs)("div",{className:ew().caption,children:["Спасибо, что оставили комментарий. ",(0,a.jsx)("br",{}),"После модерации вы сможете увидеть его на странице"]})]}),!!eo.length&&(0,a.jsx)("div",{className:ew().comments,children:eo.slice(0,f).map(e=>{let t="1"===e.user_id?eS:e.user_id,n=e.user_name||eS;return(0,a.jsxs)("div",{className:ew().comment,children:[(0,a.jsx)("div",{className:ew().letter,style:{background:B(String(t))},children:n.slice(0,1)}),(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:ew().commentHeaderText,children:[(0,a.jsx)("div",{className:ew().author,children:n}),(0,a.jsx)("div",{className:ew().date,children:T(e.date_created)})]}),(0,a.jsx)("div",{className:ew().commentBody,children:e.comment}),(0,a.jsxs)("div",{className:ew().commentControls,children:[(0,a.jsxs)("div",{className:ew().unit,children:[(0,a.jsx)(i.IconFdsThumbUpO,{}),(0,a.jsx)("span",{children:"23"})]}),(0,a.jsxs)("div",{className:(0,c.Z)(ew().unit,ew().dislike),children:[(0,a.jsx)(i.IconFdsThumbDownO,{}),(0,a.jsx)("span",{children:"23"})]}),(0,a.jsx)("div",{className:(0,c.Z)(ew().unit,ew().replyBtn),children:"Ответить"})]})]})]},e.id)})}),f<eo.length&&(0,a.jsxs)("div",{className:ew().more,onClick:()=>g(e=>e+ei),children:["Еще ".concat(ei," ").concat(es),(0,a.jsx)("span",{children:(0,a.jsx)(i.IconFdsChevronDownSmallO,{size:24})})]}),$&&(0,a.jsx)(ey,{env:t,isOpen:M,onClose:ev,postId:n,onAuthSuccess:e=>{e&&(A(e),O(!1),J(!1),z(F(n)))}})]})};var eB=n(1123),eM=n(62637),eO=n.n(eM);let eR=e=>{let{env:t,imageFile:n,imageData:l,imageCaption:o,className:i,disableZoom:s,imageClassName:d}=e,u=(0,el.G)("lg"),[m,_]=(0,r.useState)(!1),p=t.NEXT_PUBLIC_BASE_URL,h=l||"".concat(p,"/img/posts_content/large/").concat(n),v=()=>l?{mobile:l,desktop:l}:{mobile:"".concat(p,"/img/posts_content/small/").concat(n),desktop:"".concat(p,"/img/posts_content/large/").concat(n)};return n||l?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:(0,c.Z)(eO()["content-image"],i),onClick:()=>{!s&&u&&_(!0)},children:(0,a.jsx)(eB.t,{captionClassName:eO().caption,srcDesktop:v().desktop,srcMobile:v().mobile,caption:o,imageClassName:(0,c.Z)(eO().detailImage,d),className:eO().detailImageWrapper})}),(0,a.jsx)(ea.h,{children:m&&u&&(0,a.jsx)(eW,{src:h,onClose:()=>_(!1)})})]}):null},eW=e=>{let{src:t,onClose:n}=e,[o,s]=(0,r.useState)(1),[c,d]=(0,r.useState)(1),[u,m]=(0,r.useState)({x:0,y:0}),[_,p]=(0,r.useState)({x:0,y:0}),h=(0,r.useRef)(null),v=(0,r.useRef)(null),f=(0,r.useRef)(1),g=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=e=>{e.preventDefault()};return document.addEventListener("touchmove",e,{passive:!1}),()=>{document.body.style.overflow="",document.body.style.height="",document.removeEventListener("touchmove",e)}},[]),(0,r.useEffect)(()=>{if(g.current){var e;g.current=!1;let t=document.getElementById("imageModalContainerId");if(!t)return;let n=t.getBoundingClientRect(),a=n.x||0,r=n.height||0,l=-((n.y||0)/o*1)+window.innerHeight/o/2-r/o/2;m({x:-(a/o*1),y:l});let i=document.getElementById("imageModalCloseId");if(!i)return;let s=window.innerWidth/(null===(e=document.documentElement.getBoundingClientRect())||void 0===e?void 0:e.width),c=i.getBoundingClientRect(),u=c.width*s||0,_=c.x||0,h=c.y||0,v=-(_/s*1)+window.innerWidth/s-u/s-16/s;d(s),p({x:v,y:-(h/s*1)+58})}},[o]);let b=e=>{let[t,n]=[e[0],e[1]],a=t.clientX-n.clientX,r=t.clientY-n.clientY;return Math.sqrt(a*a+r*r)};return(0,a.jsxs)("div",{className:eO().imageModal,onTouchStart:e=>{if(e.preventDefault(),2===e.touches.length){let t=b(e.touches);h.current=t}1===e.touches.length&&(v.current={x:e.touches[0].clientX/o-u.x,y:e.touches[0].clientY/o-u.y})},onTouchMove:e=>{if(e.preventDefault(),2===e.touches.length&&null!==h.current){let t=o+(b(e.touches)-h.current)*5e-5;t<f.current?t=f.current:t>3&&(t=3),s(t)}1===e.touches.length&&null!==v.current&&m({x:e.touches[0].clientX/o-v.current.x,y:e.touches[0].clientY/o-v.current.y})},onTouchEnd:()=>{h.current=null,v.current=null},children:[(0,a.jsx)("div",{id:"imageModalCloseId",className:eO().close,onClick:n,style:{transform:"scale(".concat(c,") translate(").concat(_.x,"px, ").concat(_.y,"px)")},children:(0,a.jsx)(i.IconFdsCloseO,{size:22})}),(0,a.jsx)("div",{id:"imageModalContainerId",className:eO().imgContainer,style:{transform:"scale(".concat(o,") translate(").concat(u.x,"px, ").concat(u.y,"px)")},children:(0,a.jsx)(l.default,{src:t,width:0,height:0,alt:"detail image",unoptimized:!0,onLoadingComplete:()=>{let e=window.innerWidth,t=document.getElementById("imageModalContainerId");if(!t)return;let n=t.getBoundingClientRect().width||0,a=n>0?e/n:1;f.current=a,s(a),g.current=!0,document.body.style.overflow="hidden",document.body.style.height="100vh"}})})]})};var eZ=n(91870),eU=n.n(eZ);let eF=e=>{let{env:t,data:n={}}=e,l=(0,r.useRef)(null),o=(()=>{let e=[];for(let[t,a]of Object.entries(n))t.indexOf("imageFile_")>=0&&"string"==typeof a&&e.push(a);return e})();return(0,a.jsx)("div",{ref:l,className:(0,c.Z)(eU().wrapper,"disableContentBlocksStyles"),children:(0,a.jsx)(v.iR,{options:{spaceBetween:8},pagination:!0,className:(0,c.Z)(eU().slider),children:o.map((e,r)=>(0,a.jsx)(v.wI,{className:eU().slide,children:(0,a.jsx)("div",{className:eU().sliderItem,children:(0,a.jsx)(eR,{env:t,imageFile:e,imageCaption:n.imageCaption,disableZoom:!0})})},r))})})};var eY=n(66074),eV=n.n(eY);let eJ=e=>{let t=e.match(/^https?:\/\/(?:www\.)?vkvideo\.ru\/video-(-?\d+)_(\d+)/);if(t){let e=t[1],n=t[2];return"https://vkvideo.ru/video_ext.php?oid=-".concat(e,"&id=").concat(n,"&hd=2")}let n=e.match(/^https?:\/\/(?:www\.)?rutube\.ru\/video\/([a-zA-Z0-9]+)/);if(n){let e=n[1];return"https://rutube.ru/play/embed/".concat(e)}return e},eD=e=>{let{url:t,text:n}=e;return t?(0,a.jsxs)("div",{className:eV().wrapper,children:[(0,a.jsx)("iframe",{loading:"lazy",src:eJ(t),title:n,allowFullScreen:!0}),(0,a.jsx)("div",{className:eV().subtitle,children:n})]}):null};var ez=n(31019),eX=n(65843),eH=n(89980),eP=n(674),eG=n(78952),eQ=n(71938),eq=n(11197),eK=n(13745),e$=n(85900),e0=n.n(e$);let e1=e=>{let{env:t,articles:n}=e;return n.length?(0,a.jsxs)("div",{className:(0,c.Z)(e0().wrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h2",{className:e0().blockTitle,children:"Читайте также"}),n.map(e=>(0,a.jsx)(e2,{env:t,data:e},e.id))]}):null},e2=e=>{var t,n;let{env:r,data:o}=e,i=(0,eG.n)(null==o?void 0:o.url,null==o?void 0:o.likes);return(0,a.jsxs)("a",{className:e0().card,href:"/".concat(null==o?void 0:o.url),target:"_self",children:[(0,a.jsx)("div",{className:e0().imageWrapper,children:(0,a.jsx)("div",{className:e0().image,style:(null==o?void 0:null===(t=o.image)||void 0===t?void 0:t.file)?{backgroundImage:"url(".concat((0,eq.J)(null==o?void 0:null===(n=o.image)||void 0===n?void 0:n.file,"small",r.NEXT_PUBLIC_BASE_URL),")")}:{}})}),(0,a.jsxs)("div",{className:e0().container,children:[(0,a.jsx)("div",{className:e0().title,children:null==o?void 0:o.title}),(0,a.jsxs)("div",{className:e0().icons,children:[!!i&&(0,a.jsxs)("div",{className:e0().unit,children:[(0,a.jsx)(l.default,{src:eP.Z,alt:"likes",unoptimized:!0}),i]}),(0,a.jsxs)("div",{className:e0().unit,children:[(0,a.jsx)(l.default,{src:eH.Z,alt:"views",unoptimized:!0}),(0,a.jsx)("span",{suppressHydrationWarning:!0,children:(0,eK.V)((null==o?void 0:o.url)||"",(null==o?void 0:o.views)||0,0)})]}),(0,a.jsx)("div",{className:e0().unit,children:(0,a.jsx)("span",{children:(0,eQ.p6)(String((null==o?void 0:o.public_date)||(null==o?void 0:o.update_time)||(null==o?void 0:o.publ_time)),!0)})})]})]})]})};var e3=n(11095),e6=n(87918),e5=n(46295);let e9=(e,t)=>(0,$.t)({url:"/money_data/Credits.json?".concat(e),config:{signal:t}}),e4=(e,t)=>(t>0&&!Number.isInteger(e)&&!Number.isNaN(e)&&String(e).split(".")[1].length>t&&(e=+e.toFixed(t)),e),e7=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return e=e4(e,t),new Intl.NumberFormat("ru-RU").format(e)},e8=function(){let{type:e="text",unit:t,format:n,defaultValue:a="",maxLength:l=-1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[o,i]=(0,r.useState)(a),s=(0,r.useRef)(o),[c,d]=(0,r.useState)(!1),u=(0,r.useCallback)((t,n)=>{"function"==typeof t&&(t=t(s.current));let a=String(t);if(!(l>-1)||!(a.length>l)){if(["int","float"].includes(e)){if(isNaN(+t)||"int"===e&&a.includes(".")||a.includes(" "))return;a=String(""===t?"":+t)}s.current=a,i(a),null==n||n(a)}},[l,e]),m=(0,r.useMemo)(()=>({onChange:e=>{u(e)},onFocus:()=>d(!0),onBlur:()=>d(!1)}),[u]),_=(0,r.useMemo)(()=>{let a=o,r=null;switch("currency"===n&&["int","float"].includes(e)&&""!==o&&(a=e7(+o)),t){case"year":r=""===a?"":(0,h._6)(+o,"год","года","лет");break;case"day":r=""===a?"":(0,h._6)(+o,"день","дня","дней");break;default:r=""!==a&&t?t:""}return r&&["int","float"].includes(e)?"".concat(a," ").concat(r):a},[n,e,t,o]);return(0,r.useMemo)(()=>({events:m,value:o,formattedValue:_,isFocused:c,handleChange:u}),[m,_,u,c,o])},te=e=>(0,$.t)({url:"/money_data/Fk.json".concat(e?"?bic="+e:"")}),tt=e=>{let{children:t,observerEvent:n,hideEvent:l,threshold:o,...i}=e,s=(0,r.useRef)(null);return(0,r.useEffect)(()=>{n&&s.current&&tn(s.current,n,l,o)},[]),(0,a.jsx)("div",{...i,ref:s,children:t})},tn=function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e&&new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?t&&t():n&&n()})},{threshold:a}).observe(e)},ta=async(e,t,n)=>{let a=w.A.getItem("cached_requests")||{},r=a[e],l=Number(null==r?void 0:r.timestamp);if(!r||Date.now()-l>2592e6){let r=await t(...n);return a[e]={timestamp:String(Date.now()),data:r},w.A.setItem("cached_requests",JSON.stringify(a)),r}return r.data},tr=["sberbank","vtb","gazprombank","alfabank","mkb","rosselhozbank","sovcombank","rossijskij_kapital","rosbank","yandeks_bank"],tl=e=>{let{url:t}=e;return tr.includes(t)},to=e=>{let{url:t,logo_mob:n,logo:a,name:r}=e,l=n||a;return(null==l?void 0:l.includes("http"))?{id:t,src:l,name:r}:null},ti=e=>{let t=[],n=[];return[...e].sort(()=>.5-Math.random()).forEach(e=>{let a=to(e);if(!a)return;let r=tl(e);r&&t.length<4&&t.push(a),!r&&n.length<6&&n.push(a)}),n=n.slice(0,6-t.length),[...t,...n].sort(()=>.5-Math.random())};var ts=n(88189),tc=n.n(ts);let td=(0,r.memo)(e=>{let{className:t}=e,n=(0,el.G)("lg"),l=(0,r.useRef)(!1),[o,i]=(0,r.useState)([]),s=ti(o),d=n?s.slice(0,3):s;return(0,a.jsxs)(tt,{className:(0,c.Z)(tc().container,t),observerEvent:()=>{l.current||(l.current=!0,ta("/money_data/Fk.json",te,[]).then(e=>{var t;return i((null===(t=e.data)||void 0===t?void 0:t.banks)||[])}))},children:[d.map(e=>(0,a.jsx)("picture",{className:tc().item,children:(0,a.jsx)("img",{className:tc().img,src:e.src,alt:e.name,width:48,height:48})},e.id)),(0,a.jsxs)("div",{className:(0,c.Z)(tc().item,tc().itemNum),children:["+",o.length-s.length]})]})});td.displayName="LogosList";var tu=n(23296),tm=n.n(tu);let t_=e=>{let{children:t,className:n}=e;return(0,a.jsxs)("div",{className:(0,c.Z)(tm().offersWrapper,n),children:[t,(0,a.jsx)(td,{className:tm().logos})]})},tp=[{value:1,label:"1 месяц"},{value:2,label:"2 месяца"},{value:3,label:"3 месяца"},{value:4,label:"4 месяца"},{value:5,label:"5 месяцев"},{value:6,label:"6 месяцев"},{value:9,label:"9 месяцев"},{value:12,label:"1 год"},{value:18,label:"1,5 года"},{value:24,label:"2 года"},{value:36,label:"3 года"},{value:48,label:"4 года"},{value:60,label:"5 лет"}],th=[{value:"travels",label:"Путешествия"},{value:"refuellings",label:"Заправки"},{value:"trade_networks",label:"Торговые сети"},{value:"charity",label:"Благотворительность"},{value:"discount_program",label:"Дисконтная программа"},{value:"custom",label:"Другое"}],tv=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:300,t=null;return n=>{t&&clearInterval(t),t=setTimeout(n,e)}};var tf=n(8980),tg=n(53042),tb=n.n(tg);let tx=tv(750),ty=(e,t,n)=>()=>{(0,tf.D)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"credits_calculator_top_offers",eventValue:n})},tA=e=>{let{content:t={}}=e,n=(0,e5.S)().NEXT_PUBLIC_BASE_URL,[l,o]=(0,r.useState)(null),i=e8({defaultValue:()=>String(t.amount||3e5),format:"currency",type:"int",maxLength:20,unit:"₽"}),[s,d]=(0,r.useState)(t.term||3),u=(0,r.useRef)("");(0,r.useEffect)(()=>{i.handleChange(t.amount||3e5)},[t.amount]),(0,r.useEffect)(()=>{d(t.term||3)},[t.term]);let m=(()=>{let e=[],t=String(i.value||"").replace(/ /g,"");return t&&e.push("amount=".concat(t)),s&&e.push("period=".concat(s)),e.length?e.join("&"):""})(),_=e=>{e9("limit=1&currency=1".concat(e.length?"&"+e:"")).then(e=>{var t;o((null===(t=e.data)||void 0===t?void 0:t.credits_count)||null)})};(0,r.useEffect)(()=>{m!==u.current&&(tx(()=>_(m)),u.current=m)},[m]);let p="".concat(n,"/potrebitelskie_kredity")+(m.length?"?"+m:"")+"#creditsList",f="".concat(l||0," ").concat((0,h._6)(l||0,"предложение","предложения","предложений"));return(0,a.jsxs)(t_,{className:(0,c.Z)(tb().creditsOffersWrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h4",{children:"Кредиты"}),(0,a.jsxs)("div",{className:tb().inputs,children:[(0,a.jsx)(v.MA,{label:"Сумма",value:i.isFocused?i.value:i.formattedValue,variant:"secondary",...i.events}),(0,a.jsx)(v.Ph,{label:"Срок",options:tp,value:tp.find(e=>e.value===s)||tp[0],onChange:e=>d(+e.value),variant:"secondary"})]}),(0,a.jsx)(v.zx,{as:"a",className:tb().button,label:"Смотреть ".concat(f),variant:"primary",size:"s",href:p,onClick:ty(tf.i.button,"смотреть")})]})},tC=e=>(0,$.t)({url:"/money_data/CardData.json",config:{signal:e}}),tI=e=>(0,$.t)({url:"/money_data/DebitCards.json?".concat(e)}),tj=()=>(0,$.t)({url:"/money_data/Root.json"}),tk={id:0,name:"Вся Россия"},tN=[{id:1095,main:1,name:"Москва",name_p:"Москве",name_r:"Москвы",parentId:76,url:"moskva"},{id:1096,main:1,name:"Санкт-Петербург",name_p:"Санкт-Петербурге",name_r:"Санкт-Петербурга",parentId:77,url:"sankt-peterburg"},{id:720,main:1,name:"Новосибирск",name_p:"Новосибирске",name_r:"Новосибирска",parentId:53,url:"novosibirsk"},{id:894,main:1,name:"Екатеринбург",name_p:"Екатеринбурге",name_r:"Екатеринбурга",parentId:65,url:"ekaterinburg"},{id:691,main:1,name:"Нижний Новгород",name_p:"Нижнем Новгороде",name_r:"Нижнего Новгорода",parentId:51,url:"nizhniy_novgorod"}],tw=e=>{let[t,n]=(0,r.useState)(null),[a,l]=(0,r.useState)(null),o=w.A.getItem("user_town"),i=w.A.getItem("user_region"),s=w.A.getItem("auto_region"),c=w.A.getItem("auto_town"),d=(0,r.useMemo)(()=>{var e,t,n,a;let r=(null!==(t=null!==(e=o||i)&&void 0!==e?e:c||s)&&void 0!==t?t:tk).id,l=(null!==(a=null!==(n=o||i)&&void 0!==n?n:c||s)&&void 0!==a?a:tk).name;return{value:l+r,label:l}},[]),[u,m]=(0,r.useState)(d),_=(0,r.useMemo)(()=>e.map(e=>({...e,towns:e.towns.map(t=>({...t,parentId:e.id}))})),[e]),p=(0,r.useMemo)(()=>{let e=_.map(e=>{let{towns:t}=e;return t}).reduce((e,t)=>[...e,...t],[]).filter(e=>!tN.find(t=>t.name===e.name));return[...tN,...e]},[_]);return{regionValue:u,regionOptions:(0,r.useMemo)(()=>[tk,...p,..._].map(e=>({value:e.name+e.id,label:e.name,url:e.id})),[_,p]),handleRegionChange:(0,r.useCallback)(e=>{if(!e)return;m(e[0]);let t=null,a=null;if(tk.name!==e[0].label){var r,o,i;a=(t=null!==(r=p.find(t=>t.name===e[0].label))&&void 0!==r?r:null)?null!==(o=_.find(e=>e.id===Number(null==t?void 0:t.parentId)))&&void 0!==o?o:null:null!==(i=_.find(t=>t.name===e[0].label))&&void 0!==i?i:null}n(a),l(t)},[_,p]),selectedRegion:t,selectedTown:a}},tS=(e,t)=>{var n;let a=null!==(n=null==t?void 0:t.map(e=>+e))&&void 0!==n?n:[];return[...e].sort((e,t)=>{let n=a.includes(Number(e.id)),r=a.includes(Number(t.id));return!n&&r?1:n&&!r?-1:0}).map(e=>({value:e.id,label:e.name}))};var tT=n(87330),tL=n.n(tT);let tE=tv(750),tB=(e,t,n)=>()=>{(0,tf.D)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"debit_cards_calculator_top_offers",eventValue:n})},tM=()=>{let e=(0,e5.S)().NEXT_PUBLIC_BASE_URL,[t,n]=(0,r.useState)(null),[l,o]=(0,r.useState)(["trade_networks"]),[i,s]=(0,r.useState)(["21"]),[d,u]=(0,r.useState)([]),[m,_]=(0,r.useState)([]),{regionOptions:p,handleRegionChange:f,selectedRegion:g,selectedTown:b}=tw(m),[x,y]=(0,r.useState)([]),[A,C]=(0,r.useState)([]),[I,j]=(0,r.useState)(""),k=(0,r.useRef)(""),N=(()=>{let e=[];return l&&l.length&&e.push("discounts=".concat(l.join(","))),i&&i.length&&e.push("card_type=".concat(i.join(","))),d&&d.length&&e.push("bank=".concat(d.join(","))),g&&e.push("region=".concat(g.url)),b&&e.push("town=".concat(b.url)),e.length?e.join("&"):""})(),w=e=>{tI("limit=1".concat(e.length?"&"+e:"")).then(e=>{var t;n((null===(t=e.data)||void 0===t?void 0:t.debitCards_count)||null)})};(0,r.useEffect)(()=>{N!==k.current&&(tE(()=>w(N)),k.current=N)},[N]),(0,r.useEffect)(()=>{tj().then(e=>{var t,n;_((null===(t=e.data)||void 0===t?void 0:t.regions)||[]),y((null===(n=e.data)||void 0===n?void 0:n.companies)||[])}),tC().then(e=>{var t;C((null===(t=e.data)||void 0===t?void 0:t.card_types)||[])})},[]);let S="".concat(e,"/debetovye_karty")+(N.length?"?"+N:""),T="".concat(t||0," ").concat((0,h._6)(t||0,"предложение","предложения","предложений")),L=tS(x,d),E=[...A.map(e=>({value:String(e.id),label:e.title})),{value:"custom",label:"Другое"}];return(0,a.jsxs)(t_,{className:(0,c.Z)(tL().debitCardsOffersWrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h4",{children:"Дебетовые карты"}),(0,a.jsxs)("div",{className:tL().inputs,children:[(0,a.jsx)(v.Ph,{value:th.filter(e=>l.includes(e.value)),multiple:!0,onChange:e=>o((null==e?void 0:e.map(e=>{let{value:t}=e;return String(t)}))||[]),label:"Скидки и бонусы",options:th,variant:"secondary"}),(0,a.jsx)(v.Ph,{value:E.filter(e=>i.includes(e.value)),multiple:!0,onChange:e=>s((null==e?void 0:e.map(e=>String(e.value)))||[]),label:"Тип карты",options:E,variant:"secondary"}),(0,a.jsx)(v.Ph,{value:L.filter(e=>d.includes(Number(e.value))),multiple:!0,onChange:e=>u((null==e?void 0:e.map(e=>Number(e.value)))||[]),label:"Банки",options:L,variant:"secondary"}),(0,a.jsx)(v.kn,{variant:"secondary",label:"Мое местоположение",value:I,options:p.filter(e=>e.label.includes(I)),onChange:j,onSelect:e=>e?f([e]):null})]}),(0,a.jsx)(v.zx,{as:"a",className:tL().button,label:"Смотреть ".concat(T),variant:"primary",size:"s",href:S,onClick:tB(tf.i.button,"смотреть")})]})};var tO=n(55),tR=n.n(tO);let tW=e=>String(e||"").replace(/ /g,""),tZ=(e,t,n)=>()=>{(0,tf.D)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventAction:e,eventActionText:(0,S.b)(t),eventLabel:"",eventValue:n})},tU=e=>{let{content:t={},savings:n,premium:l}=e,o=(0,e5.S)().NEXT_PUBLIC_BASE_URL,i=e8({defaultValue:()=>String(t.amount||(l?3e6:3e5)),format:"currency",type:"int",maxLength:20,unit:"₽"}),[s,d]=(0,r.useState)(t.term||3),[u,m]=(0,r.useState)("");(0,r.useEffect)(()=>{i.handleChange(t.amount||(l?3e6:3e5))},[t.amount,l]),(0,r.useEffect)(()=>{d(t.term||3)},[t.term]),(0,r.useEffect)(()=>{if(l){let e=+i.value;if(e<3e6){m("Минимальная сумма - 3 000 000 ₽");return}if(e>15e6){m("Минимальная сумма - Максимальная сумма - 15 000 000 ₽");return}m("")}},[i.value,l]);let _="";n?_="/teg_nakopitelnye":l&&(_="/teg_premium");let p=(()=>{let e=[],t=tW(+i.value);t&&e.push("amount=".concat(t)),s&&e.push("period=".concat(s));let n=e.length?"?"+e.join("&"):"";return"".concat(o,"/vklady").concat(_).concat(n)+"#depositsList"})(),h="Вклады";return l?h="VIP Вклады":n&&(h="Накопительные счета"),(0,a.jsxs)(t_,{className:(0,c.Z)(tR().depositsOffersWrapper,"disableContentBlocksStyles"),children:[(0,a.jsx)("h4",{children:h}),(0,a.jsxs)("div",{className:tR().inputs,children:[(0,a.jsx)(v.MA,{label:"Сумма",value:i.isFocused?i.value:i.formattedValue,variant:"secondary",state:u?"error":void 0,caption:u,onClick:()=>{(0,tf.D)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventAction:tf.i.input_field,eventActionText:(0,S.b)("сумма вклады"),eventLabel:""})},...i.events}),(0,a.jsx)(v.Ph,{label:"Срок",options:tp,value:tp.find(e=>e.value===s)||tp[0],onChange:e=>{d(Number(e.value)),(0,tf.D)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventAction:tf.i.field,eventActionText:(0,S.b)("срок вклады"),eventLabel:""})},variant:"secondary"})]}),(0,a.jsx)(v.zx,{as:"a",className:tR().button,label:"Смотреть",variant:"primary",size:"s",disabled:!!u,href:p,onClick:tZ(tf.i.button,"смотреть вклады")})]})};var tF=n(14672),tY=n(78090),tV=n.n(tY);let tJ={auto:{src:"/service-navigator/_next/static/media/auto_bg.62092cf2.png",height:176,width:308,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAWlBMVEXt9vTk+vm95Ovz/PphepVzqMT7/PbU8/g/U3X6+vKzPlrU3d7SpayFqMHlvbaHTmjs//+AETQpLlTC0tehW3OqGjZgG0JRXHmfNVJDQV15KUzFFC+Ww9rXiZeTxCHTAAAACnRSTlP+/////s7//f7UkTL2gAAAAAlwSFlzAAALEwAACxMBAJqcGAAAADVJREFUeJxjYGNjY2BjYOZkYBRgZBJmYmdm4ObjEZHgkmVn4BfkEhOVlpJh4GURF5Lk4GAFACGeAeVPXusUAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:5},auto_m:{src:"/service-navigator/_next/static/media/auto_m_bg.fb85de91.png",height:120,width:295,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAAOVBMVEXx+fnT7O/Iq7JnPV50KUXj8fLx/v2DxN15bop1rMrB8fvY9PnGnayWyOC2OFOYTGdVJknMjplgYIPjhY66AAAACnRSTlPx/////vb/7v7zSgL2CAAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxjYGBjY2NkZGNg4GZkEuTn4+Fi4OTlYBZgEWIHAAfxALsDa3SrAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3},moto:{src:"/service-navigator/_next/static/media/moto_bg.81aba95e.png",height:176,width:308,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAUVBMVEU0R1/c5Ojw+vu94+7k7vDo9PbQ6/HF4uhMXndNg5h7JEC7tLqgJDl9V2KTW2TTuMBFfZFyqcCixtRHRltCWnVJaIBuGTHShI1zZHhNRlyTQFhfPRBEAAAACnRSTlP+////1P//+/7OUqvELgAAAAlwSFlzAAALEwAACxMBAJqcGAAAADRJREFUeJwFwYsCgBAQBMA97BF5Vor//9BmYGhESAdKfXeiQlM556ceNsd4rWHRw/0A7fgBH0EBnH6L3HAAAAAASUVORK5CYII=",blurWidth:8,blurHeight:5},moto_m:{src:"/service-navigator/_next/static/media/moto_m_bg.8d9fa85e.png",height:120,width:295,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAADCAMAAACZFr56AAAANlBMVEWr2up8dYfc9Ph7FC7Y5+vm9PZGSWHOzdTs9PaBtMRlM07h1Ne+ipe4uL3K5+yHtcSkRlPR8vigtK75AAAACnRSTlP5////7v///vPunZ1n8gAAAAlwSFlzAAALEwAACxMBAJqcGAAAACNJREFUeJxj4GBl5eZhZ2VhYGLiFWBmFORjYGBg5GJj4+cEAAkQAK3soqmKAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:3}},tD=(e,t,n)=>{(0,tf.D)({eventCategory:"main_top_offers_block",eventAction:e,eventActionText:t,eventLabel:"osago_calculator_top_offers",eventValue:n})},tz=[{value:"auto",label:"Автомобиль"},{value:"moto",label:"Мотоцикл"}],tX=e=>{let{kasko:t,small:n}=e,o=(0,e5.S)(),i=(0,el.G)("lg"),[s,d]=(0,r.useState)(!1),[u,m]=(0,r.useState)(""),_=(0,r.useRef)(null),p=e=>{tD(tf.i.button,e?"мото":"авто"),d(e),m(""),_.current&&_.current.focus()},h=e=>{e&&e.preventDefault();let n="".concat(o.NEXT_PUBLIC_BASE_URL).concat(eo.x9,"/step-car"),a="".concat(o.NEXT_PUBLIC_BASE_URL).concat(eo.qt,"/vehicle"),r=[];u&&r.push("license="+u.replaceAll(" ","")),s&&!t&&r.push("type=moto");let l=r.length?"".concat(r.join("&")):"";if(t)window.open("".concat(a,"?").concat(l),"_self");else{let e=(0,j.R)();tD(tf.i.button,"рассчитать",e),window.open("".concat(n,"?").concat(l),"_self")}};return(0,a.jsx)("div",{className:(0,c.Z)(tV().osagoOffersWrapper,"disableContentBlocksStyles",{[tV().small]:n}),children:(0,a.jsxs)("div",{className:tV().container,children:[(0,a.jsx)(l.default,{className:tV().img,src:tJ["".concat(s?"moto":"auto").concat(i?"_m":"")],alt:"фото",unoptimized:!0}),(0,a.jsxs)("div",{className:tV().content,children:[(0,a.jsxs)("div",{className:tV().title,children:["Онлайн калькулятор ",!i&&(t?"КАСКО":"ОСАГО")]}),(0,a.jsxs)("div",{className:tV().inputs,children:[!t&&(0,a.jsx)(v.Ph,{className:tV().select,size:"m",label:"Тип транспорта",options:tz,value:s?tz[1]:tz[0],onChange:e=>p("moto"===e.value),variant:"secondary"}),(0,a.jsx)("form",{className:tV().form,onSubmit:h,children:(0,a.jsx)(v.An,{label:"Госномер",size:"m",variant:"secondary",maskOpts:{mask:s?"0000 aa 00":"a 000 aa 00"},maskPlaceholder:s?"0000 aa 00":"a 000 aa 00",value:u||"",onChange:e=>m(e)})}),(0,a.jsxs)("p",{className:tV().noLicense,children:["У меня ",(0,a.jsx)("a",{onClick:e=>{e&&e.preventDefault(),tD(tf.i.link,"нет номера"),h()},children:"нет номера"})]})]}),(0,a.jsx)(v.zx,{className:tV().button,label:"Рассчитать",variant:"primary",size:"s",onClick:()=>{tD(tf.i.button,"рассчитать"),h()}})]})]})})};var tH=n(48667),tP=n(89267),tG=n.n(tP);let tQ=e=>{let{id:t}=e;return(0,a.jsxs)("div",{className:tG().wrapper,children:[(0,a.jsx)("div",{id:"frame-calculator_wrap_".concat(t),"data-draft-first-screen":"extended","data-bg":"#fff","data-id-frame":"75534965-d320-485f-ab98-e625d00a84fe","data-adv-p-id":"50fe7e8417230d96f318b7d5b3fba670"}),(0,a.jsx)(tH.default,{id:String(t),type:"text/javascript",strategy:"afterInteractive",src:"https://finuslugi.ru/osago/partners/main/iframe.bundle.iife.js?id=".concat(t)})]})};var tq=n(77002),tK=n.n(tq);let t$=e=>{var t;let{data:n,postId:l,stats:o}=e,[s,u]=(0,r.useState)(null),[m,_]=(0,r.useState)(!1),[p,h]=(0,r.useState)(o),f=Object.values(p||{}).reduce((e,t)=>e+(t.count||0),0);(0,r.useEffect)(()=>{let e=w.A.getItem("surveyVotes")||{},t=n.key?e[n.key]:null;t&&p&&u(t),t&&!p&&n.key&&(0,d.iB)(l,n.key).then(e=>{h(e),u(t)})},[n.key]);let g=e=>{var t;(0,N.I)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventActionType:N.i.list,eventActionText:(0,S.b)(null!==(t=n.title)&&void 0!==t?t:""),eventLabel:""});let a=e.currentTarget.getAttribute("data-id");if(!a||s||!n.key)return;(0,d.CV)(l,n.key,a).then(e=>{!p&&e&&h(e),u(a)});let r=w.A.getItem("surveyVotes")||{};r[n.key]=a,w.A.setItem("surveyVotes",JSON.stringify(r));let o=w.A.getItem("surveyVotesCount")||{};o[n.key]=f,w.A.setItem("surveyVotesCount",JSON.stringify(o)),p&&u(a)};return(0,a.jsxs)("div",{id:n.key,className:(0,c.Z)(tK().survey,"disableContentBlocksStyles"),children:[(0,a.jsxs)("div",{className:tK().left,children:[(0,a.jsxs)("div",{className:tK().text,children:[(0,a.jsx)("div",{className:tK().question,children:n.title}),(0,a.jsx)("label",{children:n.subtitle||"Проголосуйте"})]}),(0,a.jsxs)("div",{className:tK().buttonWrapper,onClick:()=>{let e=window.location.href.split("#")[0];navigator.clipboard.writeText("".concat(e,"#").concat(n.key)),_(!0),setTimeout(()=>_(!1),2e3)},children:[(0,a.jsx)(v.zx,{className:tK().buttonWrapperIcon,shape:"circle-icon",size:"s",iconLeft:(0,a.jsx)(i.IconFdsCopyO,{})}),m&&(0,a.jsx)("div",{className:tK().tooltip,children:"Ссылка скопирована"})]})]}),(0,a.jsx)("div",{className:(0,c.Z)(tK().options,{[tK().voted]:!!s}),children:null===(t=n.answers)||void 0===t?void 0:t.map(e=>{var t;let n=e.key===s,r=((null==p?void 0:null===(t=p[e.key])||void 0===t?void 0:t.count)||0)+0,l=s?Math.round(r/f*100):0;return(0,a.jsxs)("div",{className:(0,c.Z)(tK().option,{[tK().selected]:n}),"data-id":e.key,onClick:g,children:[(0,a.jsxs)("div",{children:[!!e.icon&&(0,a.jsx)("span",{children:e.icon}),(0,a.jsxs)("p",{children:[e.text,""]})]}),!!s&&(0,a.jsxs)("label",{children:[l,"%"]}),(0,a.jsx)("div",{className:tK().fill,style:{width:"".concat(l,"%")}})]},e.key)})}),!!s&&!1]})};var t0=n(67704),t1=n(32478),t2=n(89163),t3=n(73104),t6=n(34669),t5=n.n(t6),t9={src:"/service-navigator/_next/static/media/adv-apps.5ef11a39.png",height:132,width:210,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAP1BMVEX08vq0v+n/+/+2mrDK3PXm7Pnl3u9MaXHj5/zx+f+coKiSzL3ExttwdIKH1e7Pr7/K5t+vyfmdu/icvPj////+rJWWAAAAFXRSTlM3bx6lQxRWAC49hMqnwXxwaoGizwNh61ZuAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAMElEQVR4nAXBhwHAIAwEsQMMb5NCSfafFQnVNOxbP8p3cc8JCWyyUQ3eqzmKp0dzOxvZATbJf2l8AAAAAElFTkSuQmCC",blurWidth:8,blurHeight:5};let t4=e=>{var t;let{env:n,className:m,data:_,params:h,post:v,tags:f}=e,g=(0,e6.I)(),{NEXT_PUBLIC_S3_ASSETS:b,NEXT_PUBLIC_BASE_URL:x}=n,y=(0,r.useRef)(null),A=(0,r.useRef)(null),C=()=>{var e;return null===(e=y.current)||void 0===e?void 0:e.focus()},I=(null==v?void 0:null===(t=v.filter_ids)||void 0===t?void 0:t[0])||null,j=e=>{e.target&&"innerText"in e.target&&"string"==typeof e.target.innerText&&(0,N.I)({eventCategory:"".concat((0,S.b)("журнал"),"_").concat(location.pathname),eventActionType:N.i.link,eventActionText:(0,S.b)("".concat(e.target.innerText," text_novost")),eventLabel:""})};if((0,r.useEffect)(()=>{let e=A.current;if(!e)return;e.querySelectorAll("a").forEach(e=>{e.classList.contains("button")||/button/i.test(e.className)||e.addEventListener("mousedown",j)});let t=A.current;return()=>{null==t||t.querySelectorAll("a").forEach(e=>{e.removeEventListener("mousedown",j)})}},[]),!Array.isArray(_))return null;let k=()=>{(0,d.il)(n,(null==v?void 0:v.url)||"")},w=(()=>{var e,t,c,d;let m;let A=[],j=1,N=0,w=0,S=t7[(null===(e=_[_.length-1])||void 0===e?void 0:e.type)||""],T=!1;if(_.forEach((e,t)=>{var n,a,r,l;"header"===e.type&&(3==++N&&((null===(r=_[t-1])||void 0===r?void 0:r.type)==="banner"&&(m=_.splice(t-1,1)),(null===(l=_[t+1])||void 0===l?void 0:l.type)==="banner"&&(m=_.splice(t+1,1))),m&&4===N&&_.splice(t,0,m[0])),"info_bl"===e.type&&(null===(a=e.data)||void 0===a?void 0:null===(n=a.block)||void 0===n?void 0:n.title)&&w++,"widget_osago"===e.type&&(T=!0)}),_.forEach((e,t)=>{var c,d,m,_,f,y,C,I,k,N,w,S,L,E,B,M;switch(e.type){case"banner":h&&A.push((0,a.jsx)(e3.Z,{config:g,params:h},t));break;case"header":(null===(c=e.data)||void 0===c?void 0:c.text)&&A.push((0,a.jsx)("h2",{id:"".concat(null==v?void 0:v.id,"_content_header_").concat(j),dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}},t)),j++;break;case"sub_header":(null===(d=e.data)||void 0===d?void 0:d.text)&&A.push((0,a.jsx)("h3",{dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}},t));break;case"paragraph":(null===(m=e.data)||void 0===m?void 0:m.text)&&A.push((0,a.jsx)("div",{dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}},t));break;case"link":(null===(_=e.data)||void 0===_?void 0:_.text)&&A.push((0,a.jsx)("div",{className:t5()["block-link"],children:(0,a.jsxs)("a",{target:"_blank",href:e.data.url,rel:"noreferrer",children:[e.data.text,(0,a.jsx)(i.IconFdsArrowUpRightSmallO,{size:20})]})},t));break;case"dossier":(null===(f=e.data)||void 0===f?void 0:f.text)&&A.push((0,a.jsxs)("div",{className:t5()["dossier-date-item"],children:[(0,a.jsx)("span",{className:t5().date,children:e.data.year}),(0,a.jsx)("div",{className:t5().text,dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}})]},t));break;case"html":(null===(y=e.data)||void 0===y?void 0:y.html)&&A.push((0,a.jsx)("div",{className:t5()["html-block"],dangerouslySetInnerHTML:{__html:(0,t2.$)((0,t0.I)(e.data.html))}},t));break;case"annotation":(null===(C=e.data)||void 0===C?void 0:C.text)&&A.push((0,a.jsx)("div",{className:t5().annotation,dangerouslySetInnerHTML:{__html:(0,t2.$)((0,t0.I)(e.data.text))}},t));break;case"company-annotation":(null===(I=e.data)||void 0===I?void 0:I.text)&&A.push((0,a.jsx)("div",{className:t5()["company-annotation"],dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}},t));break;case"keynote":(null===(k=e.data)||void 0===k?void 0:k.text)&&A.push((0,a.jsx)("div",{className:t5()["keynote-wrapper"],children:(0,a.jsx)("p",{className:t5().keynote,dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}})},t));break;case"document-file":A.push((0,a.jsxs)(o.default,{className:t5()["doc-file"],href:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e?e.startsWith("http")?e:"".concat(t,"/doc/post_docs/").concat(e):""}(null==e?void 0:null===(N=e.data)||void 0===N?void 0:N.file),target:"_blank",children:[(0,a.jsx)(i.IconFile,{size:22}),(0,a.jsx)("label",{className:t5()["doc-title"],children:null==e?void 0:null===(w=e.data)||void 0===w?void 0:w.title}),(0,a.jsx)(i.IconFdsChevronRightO,{size:22})]},t));break;case"table":e.data&&A.push((0,a.jsxs)("div",{className:t5()["content-table-wrapper"],children:[e.data.title?(0,a.jsx)("h4",{children:e.data.title}):"",(0,a.jsx)("div",{className:t5()["content-table-content"],dangerouslySetInnerHTML:{__html:(0,t2.$)(e.data.html||"")}})]},t));break;case"image":e.data&&A.push((0,a.jsx)(eR,{env:n,imageFile:e.data.imageFile,imageCaption:e.data.imageCaption,imageData:e.data.imageData,className:t5()["content-image"],imageClassName:t5()["content-image-element"]},t));break;case"info_bl":A.push((0,a.jsx)(tF.U,{block:e.data.block},t));break;case"incoming-tax-calculator":A.push((0,a.jsx)(s.$,{className:"disableContentBlocksStyles",assets:{desktop:"".concat(b,"/mp-assets/widgets/IncomeTaxCalculator/bannerWidget.png"),mobile:"".concat(b,"/mp-assets/widgets/IncomeTaxCalculator/bannerWidget.png")},bannerButtonUrl:null!==(S=e.data.url)&&void 0!==S?S:""},t));break;case"osago":A.push((0,a.jsx)(tX,{small:!0},t));break;case"widget_osago":(null==v?void 0:v.id)&&A.push((0,a.jsx)(tQ,{id:v.id},t));break;case"deposits":A.push((0,a.jsx)(tU,{},t));break;case"savings":A.push((0,a.jsx)(tU,{savings:!0},t));break;case"premium":A.push((0,a.jsx)(tU,{premium:!0},t));break;case"credits":A.push((0,a.jsx)(tA,{},t));break;case"debit_cards":A.push((0,a.jsx)(tM,{},t));break;case"post_quote":(null===(L=e.data)||void 0===L?void 0:L.quote)&&A.push((0,a.jsx)(p,{name:e.data.auth,position:e.data.position,img:e.data.imageData,quote:(0,t0.I)(e.data.quote)},t));break;case"post_offer":e.data&&A.push((0,a.jsxs)(r.Fragment,{children:[(1===e.data.type||12===e.data.type||13===e.data.type)&&(0,a.jsx)(tU,{content:{amount:e.data.amount,term:e.data.term},savings:12===e.data.type,premium:13===e.data.type},"depositsOffers"),2===e.data.type&&(0,a.jsx)(tA,{content:{amount:e.data.amount,term:e.data.term}},"creditsOffers"),11===e.data.type&&(0,a.jsx)(tM,{},"debitCardsOffers"),9===e.data.type&&!T&&(0,a.jsx)(tX,{small:!0},"osagoOffers")]},t));break;case"post_author":(null===(E=e.data)||void 0===E?void 0:E.name)&&A.push((0,a.jsxs)("a",{className:t5().postAuthor,href:"/navigator/author/".concat(e.data.url),target:"_self",children:[e.data.imageData&&(0,a.jsx)(l.default,{src:(0,eq.J)(e.data.imageData,"original",x),alt:"portrait",width:48,height:48,unoptimized:!0}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{children:e.data.name}),(0,a.jsx)("span",{children:e.data.position})]})]},t));break;case"warning":(null===(B=e.data)||void 0===B?void 0:B.title)&&A.push((0,a.jsxs)("div",{className:t5().warning,children:[(0,a.jsx)(i.IconFdsExclamationTriangleO,{size:22}),(0,a.jsxs)("div",{children:[(0,a.jsx)("label",{children:e.data.title}),(0,a.jsx)("span",{dangerouslySetInnerHTML:{__html:(0,t0.I)(e.data.text)}})]})]},t));break;case"mobile_app_banner":A.push((0,a.jsx)(eX.P,{className:t5().qrAd,QrImage:e=>{let{className:t}=e;return(0,a.jsx)(l.default,{alt:"qr",unoptimized:!0,src:u.Z,className:t})},BgImage:e=>{let{className:t}=e;return(0,a.jsx)(l.default,{alt:"qr",unoptimized:!0,src:t9,className:t})}},t));break;case"poll":{let r=(0,t1.O)(null==v?void 0:v.url);e.data&&A.push((0,a.jsx)(t$,{env:n,data:e.data,postId:r,stats:null==v?void 0:null===(M=v.polls)||void 0===M?void 0:M[e.data.key||""]},t));break}case"read_more":A.push((0,a.jsx)(e1,{env:n,articles:(0,t3.E)(e.data)},t));break;case"slider":A.push((0,a.jsx)(eF,{env:n,data:e.data},t));break;case"video":A.push((0,a.jsx)(eD,{url:e.data.url,text:e.data.text},t))}}),((null==v?void 0:v.ads_banner)||0===w&&I)&&A.push((0,a.jsx)(tF.U,{env:n,block:null==v?void 0:v.ads_banner,categoryId:I},"add-extra-banner")),v&&A.push((0,a.jsx)(ez.t,{socProps:{title:v.title,url:"/".concat(v.url)},comments:String((null===(t=v.comments)||void 0===t?void 0:t.length)||0),focusCommentsInput:C,likes:String(v.likes||0),submitLike:k},"author")),null==v?void 0:v.comments){let e=v.url;A.push((0,a.jsx)(eE,{env:n,postId:e,comments:v.comments,inputRef:y},"comments"))}let L=null==v?void 0:null===(c=v.tag_ids)||void 0===c?void 0:c[0],E=null==f?void 0:null===(d=f.find(e=>e.id===L))||void 0===d?void 0:d.url;return S||T||"navigator/zastrahovat"!==E||A.push((0,a.jsx)(tX,{small:!0},"osago")),S||"navigator/nakopit-i-sohranit"!==E&&"navigator/analitika"!==E||A.push((0,a.jsx)(tU,{},"deposits")),S||"navigator/kredity"!==E||A.push((0,a.jsx)(tA,{},"credits")),S||"6"!==E||A.push((0,a.jsx)(tM,{},"debit cards")),A})();return(0,a.jsx)("div",{ref:A,className:(0,c.Z)(t5()["content-blocks"],"content-blocks",m),children:w})},t7={info_bl:!0,osago:!0,deposits:!0,savings:!0,premium:!0,credits:!0,debit_cards:!0,post_offer:!0}},65843:function(e,t,n){"use strict";n.d(t,{P:function(){return c}});var a=n(57437),r=n(2265),l=n(54365);let o=e=>(0,a.jsx)("a",{...e});var i=n(16109),s=n.n(i);let c=(0,r.memo)(e=>{let{Link:t=o,text:n="Управляйте финансами через приложение Финуслуг",className:r,BgImage:i,QrImage:c,isSmall:d,href:u="https://promo.finuslugi.ru/mobapp/",hideButtons:m}=e;return(0,a.jsxs)(t,{className:(0,l.Z)(s().container,r),target:"_blank",href:u,children:[(0,a.jsx)("div",{className:(0,l.Z)(s().title,d&&s().titleSmall),dangerouslySetInnerHTML:{__html:n}}),(0,a.jsxs)("div",{className:s().right,children:[c&&(0,a.jsx)("div",{className:s().qrContainer,children:(0,a.jsx)(c,{className:s().qr})}),!m&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:s().button,children:"Отсканируйте QR"}),(0,a.jsx)("div",{className:(0,l.Z)(s().button,s().buttonMobile),children:"Подробнее"})]}),i&&(0,a.jsx)(i,{className:s().bgImage})]})]})});c.displayName="UiQrAd"},87918:function(e,t,n){"use strict";n.d(t,{I:function(){return r}});var a=n(2265);let r=()=>{let[e,t]=(0,a.useState)();return(0,a.useEffect)(()=>{window&&window.Ya&&window.yaContextCb&&t({ownerId:406293,Ya:window.Ya,yaContextCb:window.yaContextCb})},[]),e}},2373:function(e,t,n){"use strict";n.d(t,{G:function(){return l}});var a=n(2265);let r={xl:"screen and (max-width: 1440px)",lg:"screen and (max-width: 1200px)",md:"screen and (max-width: 900px)",sm:"screen and (max-width: 600px)"},l=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"lg",t=(0,a.useRef)(null),[n,l]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{var n,a;!t.current&&window&&(t.current=null===(a=window)||void 0===a?void 0:a.matchMedia(r[e]||e));let o=()=>{l(!!t.current&&t.current.matches)};return o(),null===(n=t.current)||void 0===n||n.addEventListener("change",o),()=>{var e;return null===(e=t.current)||void 0===e?void 0:e.removeEventListener("change",o)}},[e]),n}},95257:function(e,t,n){"use strict";n.d(t,{w:function(){return p}});var a=n(57437),r=n(2265),l=n(13466),o=n(96350),i=n(2373),s=n(27702),c=n.n(s);let d=/<([^>]+)>$/,u=e=>{let t=e.getAttribute("href");if(!t)return null;let n=decodeURIComponent(t).match(d);return(null==n?void 0:n[1])||null},m=e=>{let t=u(e);return t?(e.dataset.pseudoContent=t,e.classList.add(c().footnoteAnchor),t):(delete e.dataset.pseudoContent,e.classList.remove(c().footnoteAnchor),e.classList.remove(c().footnoteTop),null)},_=(e,t)=>{if(!t||!(e instanceof Element))return null;let n=e.closest("a[href]");if(!(n instanceof HTMLAnchorElement)||!t.contains(n))return null;let a=m(n);return a?{anchorElement:n,text:a}:null},p=e=>{let{articleRef:t}=e,n=(0,i.G)("lg"),[s,d]=(0,r.useState)(null);return(0,r.useEffect)(()=>{let e=t.current;if(!e)return;let n=()=>{e.querySelectorAll("a[href]").forEach(m)},a=t=>{let n=_(t.target,e);if(!n)return;let a=n.anchorElement.getBoundingClientRect();n.anchorElement.classList.toggle(c().footnoteTop,a.bottom>window.innerHeight/2)},r=t=>{let n=_(t.target,e);n&&(t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),d(n.text))};n();let l=new MutationObserver(n);return l.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]}),e.addEventListener("mouseover",a),e.addEventListener("click",r,!0),()=>{l.disconnect(),e.removeEventListener("mouseover",a),e.removeEventListener("click",r,!0)}},[]),(0,a.jsx)(l.h,{children:(0,a.jsx)(o.j,{className:c().popup,isOpen:n&&!!s,onClose:()=>d(null),children:s})})}},14672:function(e,t,n){"use strict";n.d(t,{U:function(){return f}});var a=n(57437),r=n(2265),l=n(75461),o=n(46295),i=n(54365),s=n(67455),c=n(73104);let d=async e=>{var t,n;let a=await (0,s.t)({url:"/api/v1/product-banners?page=0&limit=100&categoryNavigator=".concat(e),options:{isHeadlessCMS:!0}});return{data:{blocks:(null==a?void 0:null===(n=a.data)||void 0===n?void 0:null===(t=n.banners)||void 0===t?void 0:t.map(c.z))||[]}}};var u=n(76093),m=n(67704),_=n(85769),p=n(27669),h=n(37071),v=n.n(h);let f=e=>{let{block:t,categoryId:n,isOutside:s}=e,h=(0,o.S)(),f=(0,c.z)(t),[g,b]=(0,r.useState)(f),{asPath:x}=(0,u.t)();if((0,r.useEffect)(()=>{h&&!f&&n&&d(n).then(e=>{var t;if((null===(t=e.data)||void 0===t?void 0:t.blocks)&&e.data.blocks.length>0){let t=Math.floor(Math.random()*e.data.blocks.length);b(e.data.blocks[t])}})},[h,f,n]),!g||!g.title)return null;let{button_text:y,image:A,text:C,title:I,url:j,background:k}=g,{textColor:N,buttonColor:w}=g,S=k?{background:k}:void 0,T=N?{color:N}:S?{color:"var(--color-white)"}:void 0;return(0,a.jsxs)("div",{style:S,className:(0,i.Z)(v().component,{[v().isOutside]:s},"disableContentBlocksStyles"),children:[(0,a.jsx)("picture",{className:v().image,children:A&&(0,a.jsx)("img",{loading:"lazy",src:A,alt:I})}),(0,a.jsxs)("div",{className:v().body,children:[I&&(0,a.jsx)("h4",{style:T,className:v().title,dangerouslySetInnerHTML:{__html:I}}),C&&(0,a.jsx)("div",{style:T,className:v().description,dangerouslySetInnerHTML:{__html:(0,m.I)(C)}}),(0,a.jsx)(l.zx,{target:"_blank",className:(0,i.Z)(v().button,"info-block-id-".concat(g.id)),variant:w||(S?"white":"primary"),as:"a",size:"s",onClick:e=>{e.preventDefault(),(0,_.I)({eventCategory:"".concat((0,p.b)("журнал"),"__").concat("".concat(h.NEXT_PUBLIC_BASE_URL).concat(x)),eventActionType:_.i.button,eventActionText:I||"",eventLabel:y||""}),window.open(j,"_blank")},href:j,children:y})]})]})}},1123:function(e,t,n){"use strict";n.d(t,{t:function(){return c}});var a=n(57437),r=n(54365),l=n(65449),o=n.n(l);let i=/%25([0-9A-Fa-f]{2})/g,s=e=>e.replace(i,"%$1"),c=e=>{let{srcDesktop:t,srcMobile:n,alt:l,caption:i,className:c,pictureClassName:d,captionClassName:u,imageClassName:m,isLazy:_=!0}=e,p=s(t),h=s(n);return(0,a.jsxs)("figure",{className:(0,r.Z)(o().figureWrapper,c),children:[(0,a.jsxs)("picture",{className:(0,r.Z)(o().pictureWrapper,d),children:[(0,a.jsx)("source",{media:"(max-width: 1279px)",srcSet:h}),(0,a.jsx)("img",{loading:_?"lazy":void 0,className:(0,r.Z)(o().image,m),src:p,fetchPriority:_?void 0:"high",decoding:_?void 0:"async",alt:null!=l?l:"detail image"})]}),!!i&&(0,a.jsx)("figcaption",{className:(0,r.Z)(o().caption,u),dangerouslySetInnerHTML:{__html:i}})]})}},67704:function(e,t,n){"use strict";n.d(t,{I:function(){return r}});let a=["а-ля","без","безо","в","вне","во","для","до","за","и","из","из-за","из-под","изо","к","ко","меж","на","над","не","ниже","о","об","обо","от","ото","по","под","пред","предо","при","про","ради","с","со","у"],r=e=>{if("string"!=typeof e)return"";let t=e.replace(/\s\s+/g," ");return a.forEach(e=>{let n=RegExp("\\s".concat(e,"\\s"),"g");t=t.replace(n," ".concat(e,"\xa0"))}),t=t.replace(/\s-\s/g," — ")}},62178:function(e,t,n){"use strict";n.d(t,{jz:function(){return u},rq:function(){return h},vY:function(){return p}});var a=n(28045),r=n(54823),l=n(88098);let o=new Map,i=e=>"auth.gtm_customer_id"===e||"access_token"===e||"refresh_token"===e,s=()=>window.cookieStore||null,c=e=>{let t=[...e.changed||[],...e.deleted||[]];return!t.length||t.some(e=>i(e.name))},d=e=>{if(!e)return null;let t=e.includes("state=")?"true":null,{hash:n,search:a}=new URL(e,"https://www.finuslugi.ru"),r=new URLSearchParams(a).get("state");if(r)return r;let l=n.indexOf("?"),o=l>=0?n.slice(l+1):n.slice(1);return o&&new URLSearchParams(o).get("state")||t},u=()=>{var e;let t=(null===(e=window.location.href)||void 0===e?void 0:e.includes("state="))?"true":null;return d(window.location.href)||t},m=(e,t,n)=>[e,t,n].join("\n"),_=async(e,t,n)=>{let i=m(e,t,n),s=o.get(i);if(s)return s;let c=(0,a.y)({tokenUrl:e,refreshToken:t,redirectUri:n,grantType:"refresh_token"}).then(e=>e.ok?((0,r.m)(e.data),e.data.access_token):(l.v.removeItem("refresh_token"),null)).catch(()=>(l.v.removeItem("refresh_token"),null)).finally(()=>{o.delete(i)});return o.set(i,c),c},p=async function(e,t,n){let a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{ignoreCustomerIdCookie:o=!1}=a,i=o?null:l.v.getItem("auth.gtm_customer_id");if(i)return i;if(!e)return null;let s=(0,r.Z)();if(s)return s;let c=l.v.getItem("refresh_token");return c&&t&&n?_(t,c,n):null},h=e=>{let t=s();if(!t)return()=>void 0;let n=t=>{c(t)&&e()};return t.addEventListener("change",n),()=>{t.removeEventListener("change",n)}}},54823:function(e,t,n){"use strict";n.d(t,{Z:function(){return d},m:function(){return u}});var a=n(88098),r=n(38856);let l="comments_auth_access_token",o=e=>"object"==typeof e&&null!==e&&"string"==typeof e.value&&"number"==typeof e.expiresAt,i=e=>{let t={expires:new Date(Date.now()+1e3*e),sameSite:"Strict"};return"https:"!==window.location.protocol?t:{...t,secure:!0}},s=(e,t)=>{let n={value:e,expiresAt:Date.now()+1e3*t};r.A.setItem(l,JSON.stringify(n))},c=()=>{let e=r.A.getItem(l);return o(e)?e.expiresAt>Date.now()?e.value:(r.A.removeItem(l),null):null},d=()=>a.v.getItem("access_token")||c(),u=e=>{let{access_token:t,expires_in:n,refresh_expires_in:o,refresh_token:c}=e,d=i(n),u=i(o);if(a.v.removeItem("access_token"),a.v.setItem("access_token",t,d),a.v.setItem("refresh_token",c,u),a.v.getItem("access_token")!==t){s(t,n);return}r.A.removeItem(l)}},88098:function(e,t,n){"use strict";n.d(t,{v:function(){return a}});let a={getItem:e=>{var t;let n=document.cookie.split(";").find(t=>t.split("=")[0].trim()===e);return n&&null!==(t=n.split("=")[1])&&void 0!==t?t:null},setItem:function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};(n={path:"/",...n}).expires instanceof Date&&(n.expires=n.expires.toUTCString());let a=encodeURIComponent(e)+"="+encodeURIComponent(t);for(let e in n){if(!n.hasOwnProperty(e))continue;a+="; "+e;let t=n[e];!0!==t&&(a+="="+t)}document.cookie=a},removeItem:e=>{a.setItem(e,"",{"max-age":-1})}}},4028:function(e,t,n){"use strict";n.d(t,{R:function(){return a}});let a=()=>{let e="";for(let t=0;t<36;t++)(8===t||13===t||18===t||23===t)&&(e+="-"),e+="0123456789abcdef"[Math.floor(16*Math.random())];return e}},32478:function(e,t,n){"use strict";n.d(t,{O:function(){return a}});let a=e=>{var t;if("string"!=typeof e)return"";let n=(null==e?void 0:null===(t=e.split("/"))||void 0===t?void 0:t.pop())||"";return(null==n?void 0:n.startsWith("stat_"))?null==n?void 0:n.replace("stat_",""):n}},89163:function(e,t,n){"use strict";n.d(t,{$:function(){return l}});var a=["finuslugi.ru","inguru.dev","moex.com"];let r=e=>e.includes("//")&&!a.find(t=>e&&e.indexOf(t)>=0),l=e=>e?e=e.replace(/href="(.*?)"/gi,(e,t)=>"".concat(e).concat(r(t)?' rel="nofollow"':"")):""},7753:function(e,t,n){"use strict";n.d(t,{$f:function(){return m},Sn:function(){return d},Xp:function(){return u},tC:function(){return _}});var a=n(38856);let r="code_verifier",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",o=()=>{var e;if(!(null===(e=globalThis.crypto)||void 0===e?void 0:e.subtle))throw Error("PKCE is not supported in this browser");return globalThis.crypto},i=e=>{let t="";return e.forEach(e=>{t+=String.fromCharCode(e)}),btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")},s=()=>{let e=new Uint8Array(96);o().getRandomValues(e);let t="";return e.forEach(e=>{t+=l.charAt(e%l.length)}),t},c=async e=>i(new Uint8Array(await o().subtle.digest("SHA-256",new TextEncoder().encode(e)))),d=async()=>{let e=s();return{codeChallenge:await c(e),codeVerifier:e}},u=e=>{a.a.setItem(r,e)},m=()=>a.a.getItemRaw(r),_=()=>{a.a.removeItem(r)}},22384:function(e,t,n){"use strict";n.d(t,{Q:function(){return r},n:function(){return a}});let a=e=>{let t=0;do t+=e.offsetTop;while(e=e.offsetParent);return t},r=(e,t)=>{let n=document.documentElement.scrollTop||document.body.scrollTop;t&&(n=t.scrollTop);let a=e-(t?0:110),r=a>n?a-n:n-a,l=0!==Math.round(r/25)?Math.round(r/25):1,o=a>n?n+l:n-l,i=0;if(a===n){setTimeout("window.scrollTo(0, "+a+")",10);return}if(a>n){for(let e=n;e<a;e+=l)t?setTimeout(function(){t.scrollTop+=l},10*i):setTimeout("window.scrollTo(0, "+o+")",10*i),(o+=l)>a&&(o=a),i++;return}for(let e=n;e>a;e-=l)t?setTimeout(function(){t.scrollTop-=l},10*i):setTimeout("window.scrollTo(0, "+o+")",10*i),(o-=l)<a&&(o=a),i++}},49286:function(e){e.exports={hide:"YaAdFoxBanner_hide__EEjEP",shine:"YaAdFoxBanner_shine__iTlkT"}},14322:function(e){e.exports={wrapper:"AuthorQuote_wrapper__SLBrO",author:"AuthorQuote_author__AGH8F",image:"AuthorQuote_image__EjA9T",name:"AuthorQuote_name__BvjVi",position:"AuthorQuote_position__7rxqU",quote:"AuthorQuote_quote__zZfVI",shine:"AuthorQuote_shine__OlPgH"}},4969:function(e){e.exports={bestOffersWrapper:"BestOffersSection_bestOffersWrapper__kCtNX",shine:"BestOffersSection_shine__pZs9p"}},43430:function(e){e.exports={mobilePopup:"AuthTooltip_mobilePopup__hFD__",text:"AuthTooltip_text__pR0vd",wrapper:"AuthTooltip_wrapper__h_ZtX",tooltip:"AuthTooltip_tooltip__DDsd8",fade:"AuthTooltip_fade__1Z2QQ",shine:"AuthTooltip_shine__4Vo5D"}},56423:function(e){e.exports={body:"AuthWidgetModal_body__CqSh6",message:"AuthWidgetModal_message__2O1ZS",error:"AuthWidgetModal_error__Vnr9n",errorBlock:"AuthWidgetModal_errorBlock__KdY6K",widget:"AuthWidgetModal_widget__nQYE3",ssoFrame:"AuthWidgetModal_ssoFrame__bikC3",shine:"AuthWidgetModal_shine__teWkO"}},38626:function(e){e.exports={header:"Comments_header__gN7GI",title:"Comments_title__uNAzb",wrapper:"Comments_wrapper__A4vgZ",form:"Comments_form__Ln6a6",submitBtn:"Comments_submitBtn__dlFBl",submitBtnArrow:"Comments_submitBtnArrow__ioDbB",input:"Comments_input__Tbpr7",caption:"Comments_caption__5A_1N",comments:"Comments_comments__lzYQp",comment:"Comments_comment__bQCOB",letter:"Comments_letter__xvxMA",commentHeaderText:"Comments_commentHeaderText__6T6MB",author:"Comments_author__mOR9V",date:"Comments_date__dA1OC",commentBody:"Comments_commentBody__Fs7vM",commentControls:"Comments_commentControls__i_EJ_",unit:"Comments_unit__7rivG",dislike:"Comments_dislike__JKkOa",replyBtn:"Comments_replyBtn__dbCtr",more:"Comments_more__5lJoz",shine:"Comments_shine__QkK99"}},56005:function(e){e.exports={actionButton:"Sort_actionButton__mA_YC",wrapper:"Sort_wrapper__fMwBU",text:"Sort_text__i1CZE",iconButton:"Sort_iconButton__fNt71",icon:"Sort_icon__tt2FF",iconInverted:"Sort_iconInverted__NcUGj",sortTypeDesktop:"Sort_sortTypeDesktop__xSWcV",modal:"Sort_modal__k6hw_",newSortRadioModal:"Sort_newSortRadioModal__3PqAC",modalButton:"Sort_modalButton__LX_aN",sortType:"Sort_sortType__L6A_Y",sortTypeRadio:"Sort_sortTypeRadio__bGZLF",sortTypeTooltip:"Sort_sortTypeTooltip__MBMuo",sortTypeTrigger:"Sort_sortTypeTrigger__GgLBr",sortTypeHead:"Sort_sortTypeHead__PLbkS",sortTypeButton:"Sort_sortTypeButton__z8Xwl",shine:"Sort_shine__g5_Ej"}},34669:function(e){e.exports={"content-blocks":"ContentBlocks_content-blocks__UHPWt","block-link":"ContentBlocks_block-link__FmhrM",postAuthor:"ContentBlocks_postAuthor__DYOwq",annotation:"ContentBlocks_annotation__BaHgh",short:"ContentBlocks_short__WSCor","main-p":"ContentBlocks_main-p__xvc18","content-slider-pager":"ContentBlocks_content-slider-pager__0Urm0","feedback-widget":"ContentBlocks_feedback-widget__TrGv4","credit-widget":"ContentBlocks_credit-widget__MF5oU","content-table-wrapper":"ContentBlocks_content-table-wrapper__n2ziJ","keynote-wrapper":"ContentBlocks_keynote-wrapper__iXmjB",keynote:"ContentBlocks_keynote__TEf7n","block-link-old":"ContentBlocks_block-link-old__jy8lK","i-chain":"ContentBlocks_i-chain__MoAPj","i-arrow-right":"ContentBlocks_i-arrow-right__Ewobt","doc-file":"ContentBlocks_doc-file__rrdSQ",notice:"ContentBlocks_notice__ZV_f9","brain-banner":"ContentBlocks_brain-banner__3IJGg","card-banner":"ContentBlocks_card-banner__TpV9C","adfox-banner":"ContentBlocks_adfox-banner__e8zy6","investor-banner":"ContentBlocks_investor-banner__VA0l_","content-image-element":"ContentBlocks_content-image-element__qb4r0","dossier-date-item":"ContentBlocks_dossier-date-item__2WNG6",date:"ContentBlocks_date__DJFOU",warning:"ContentBlocks_warning__1_0AC",qrAd:"ContentBlocks_qrAd__CNn_4",disableContentBlocksStyles:"ContentBlocks_disableContentBlocksStyles___ftB_","text-styles":"ContentBlocks_text-styles___ef64","list-with-counter":"ContentBlocks_list-with-counter__Y_bDN","text-styles__small":"ContentBlocks_text-styles__small__qn3OI","doc-files":"ContentBlocks_doc-files__iousF","image-opened":"ContentBlocks_image-opened__Xrfm_","blog-slider":"ContentBlocks_blog-slider__mmerK","content-slider-wrapper":"ContentBlocks_content-slider-wrapper__AXYsT","content-slider-list":"ContentBlocks_content-slider-list__6eTQD","slider-item":"ContentBlocks_slider-item__E1i_7","content-image":"ContentBlocks_content-image__hHQj0",controls:"ContentBlocks_controls__IjfUN",arrow:"ContentBlocks_arrow__fxY8d","arrow-left":"ContentBlocks_arrow-left__I4SIn","arrow-right":"ContentBlocks_arrow-right__gE4vH","content-slider-counter":"ContentBlocks_content-slider-counter__PNcmA",infoBlock:"ContentBlocks_infoBlock__W7TGe",shine:"ContentBlocks_shine__o_I30"}},91870:function(e){e.exports={wrapper:"NavigatorContentSlider_wrapper__hMB0j",slider:"NavigatorContentSlider_slider__J1Qbh",slide:"NavigatorContentSlider_slide__d7QFu",sliderItem:"NavigatorContentSlider_sliderItem__m8gH_",shine:"NavigatorContentSlider_shine__Aq15e"}},66074:function(e){e.exports={wrapper:"NavigatorVideo_wrapper__opzRH",subtitle:"NavigatorVideo_subtitle__vt6wU",shine:"NavigatorVideo_shine__o8IAA"}},16109:function(e){e.exports={container:"QrAd_container__g3Oa3",title:"QrAd_title__PFHpc",titleSmall:"QrAd_titleSmall__Zm4MT",right:"QrAd_right__iRaN5",qrContainer:"QrAd_qrContainer__LUtxs",qr:"QrAd_qr__RVXq6",button:"QrAd_button__9JaQt",buttonMobile:"QrAd_buttonMobile__ShMNU",bgImage:"QrAd_bgImage___2fWk",shine:"QrAd_shine__MdgE8"}},85900:function(e){e.exports={wrapper:"ReadMore_wrapper___V7KP",blockTitle:"ReadMore_blockTitle__Q3Ln8",card:"ReadMore_card__Vk446",image:"ReadMore_image__8SFlr",title:"ReadMore_title__ULVhH",imageWrapper:"ReadMore_imageWrapper__GV0EP",container:"ReadMore_container__1CFnm",icons:"ReadMore_icons__f5NTQ",unit:"ReadMore_unit__WhOXj",shine:"ReadMore_shine__YXqys"}},62637:function(e){e.exports={detailImageWrapper:"ContentImage_detailImageWrapper__osdk_",detailImage:"ContentImage_detailImage__2NEod",caption:"ContentImage_caption__uxGmQ",imageModal:"ContentImage_imageModal__ZbGpC",imgContainer:"ContentImage_imgContainer__On4J9",close:"ContentImage_close__A_tJ2",debug:"ContentImage_debug__SHXre",shine:"ContentImage_shine__Mm_bQ"}},53042:function(e){e.exports={inputs:"CreditsOffers_inputs__YAX4W",shine:"CreditsOffers_shine__7Q_Tf"}},87330:function(e){e.exports={inputs:"DebitCardsOffers_inputs__2D95k",shine:"DebitCardsOffers_shine__LwpkA"}},55:function(e){e.exports={inputs:"DepositsOffers_inputs__C11Pn",shine:"DepositsOffers_shine__Xmngp"}},27702:function(e){e.exports={footnoteAnchor:"Footnote_footnoteAnchor__tpida",footnoteTop:"Footnote_footnoteTop__uXhPB",popup:"Footnote_popup__LL896",shine:"Footnote_shine___HLYZ"}},37071:function(e){e.exports={component:"InfoBlock_component___FxHg",isOutside:"InfoBlock_isOutside__zZTnv",body:"InfoBlock_body__bjj_j",title:"InfoBlock_title__eoTH0",description:"InfoBlock_description__zlE3O",button:"InfoBlock_button__fySnQ",image:"InfoBlock_image__xQNU9",shine:"InfoBlock_shine__Eco9K"}},88189:function(e){e.exports={container:"LogosList_container__sRYPf",item:"LogosList_item__SJd2s",itemNum:"LogosList_itemNum__2HgpN",img:"LogosList_img__i_C92",shine:"LogosList_shine__NQIfD"}},23296:function(e){e.exports={offersWrapper:"OffersWrapper_offersWrapper__4CnQH",logos:"OffersWrapper_logos__SDMLV",shine:"OffersWrapper_shine__VV9XV"}},78090:function(e){e.exports={osagoOffersWrapper:"OsagoOffers_osagoOffersWrapper__Z2Pg0",container:"OsagoOffers_container__IhyF7",img:"OsagoOffers_img__RACxh",content:"OsagoOffers_content__VKRZ5",title:"OsagoOffers_title__ZrRsM",inputs:"OsagoOffers_inputs__LVqKN",select:"OsagoOffers_select__ArUky",form:"OsagoOffers_form__o6uSf",noLicense:"OsagoOffers_noLicense__7_dya",button:"OsagoOffers_button__ItOje",small:"OsagoOffers_small__bZ_aE",shine:"OsagoOffers_shine__bPk56"}},89267:function(e){e.exports={wrapper:"OsagoWidget_wrapper__uNsni",shine:"OsagoWidget_shine__sKG3H"}},65449:function(e){e.exports={pictureWrapper:"ResponsiveImage_pictureWrapper__Ito3k",figureWrapper:"ResponsiveImage_figureWrapper__smDJG",image:"ResponsiveImage_image__2HemD",caption:"ResponsiveImage_caption__SPzIK",shine:"ResponsiveImage_shine__2pd4V"}},77002:function(e){e.exports={question:"Survey_question__CFf04",survey:"Survey_survey__y4bSv",left:"Survey_left__0oisd",text:"Survey_text__r9eV6",buttonWrapper:"Survey_buttonWrapper__tIeSY",buttonWrapperIcon:"Survey_buttonWrapperIcon__I8ksT",tooltip:"Survey_tooltip__VTvYM",options:"Survey_options__VZrfg",voted:"Survey_voted__Nsfug",option:"Survey_option__w9_nz",fill:"Survey_fill__7fW16",selected:"Survey_selected__4xnra",allVotes:"Survey_allVotes__FY2S_",shine:"Survey_shine__y6tC6"}},70526:function(e,t){"use strict";t.Z={src:"/service-navigator/_next/static/media/app-qr.d8a71790.svg",height:256,width:256,blurWidth:0,blurHeight:0}}}]);