(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[585],{7195:function(e,t,a){"use strict";a.r(t),a.d(t,{NavigatorDetail:function(){return K}});var i=a(5893),r=a(9194),n=a(6535),l=a(4588),o=a(6010),s=a(1163),c=a(7294),d=a(4249),p=a(5e3),u=a(468),_=a(3055),v=a(7843),g=a(5352),h=a(7701),m=a(2307),f=a(4386),N=a(1309),x=a(8059),j=a(8114),b=a(7315),I=a(2027),D=a(3627);function w(e){let t=e.match(/^navigator\/([^/]+)\/.+$/);return t?t[1]:null}var y=a(6129),k=a(2864),C=a(2825),L=a(3161),T=a(7771),P=a(9574),S=a(4800),W=a(5131),A=a(1997),E=a(9298),M=a.n(E);let R=e=>{var t,a;let{post:n,BASE_URL:l,postViews:o}=e,s=(0,A.p6)(String(n.public_date||n.update_time||n.publ_date)),c=n.read_time||0;return(0,i.jsxs)("div",{className:M().wrapper,children:[(0,i.jsxs)("div",{className:M().info,children:[(0,i.jsx)("div",{className:M().unit,children:(0,i.jsx)("label",{children:s})}),!!c&&(0,i.jsxs)("div",{className:M().unit,children:[(0,i.jsx)(r.IconFdsClockO,{size:24}),(0,i.jsxs)("label",{children:[c," мин"]})]}),!!o&&(0,i.jsxs)("div",{className:M().unit,children:[(0,i.jsx)(r.IconFdsEyeO,{size:24}),(0,i.jsx)("label",{children:o})]})]}),!!(null==n?void 0:null===(t=n.author)||void 0===t?void 0:t.name)&&(null==n?void 0:null===(a=n.author)||void 0===a?void 0:a.url)&&(0,i.jsxs)("a",{className:M().author,href:"/navigator/author/".concat(null==n?void 0:n.author.url),target:"_self",children:[(null==n?void 0:n.author.photo)&&(0,i.jsx)("img",{className:M().image,src:"".concat(l,"/img/posts/original/").concat(null==n?void 0:n.author.photo),alt:n.author.name}),(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:M().name,children:n.author.name}),(0,i.jsx)("div",{className:M().position,children:n.author.position})]})]})]})};var H=a(2288),B=a(7311),F=a(2853);let z=async(e,t,a,i,r,n)=>{var l;let o=await (0,F.pW)(e,9,void 0,t,i?void 0:a,i?1:void 0),s=new Date;s.setDate(new Date().getDate()-30);let c=((null===(l=o.data)||void 0===l?void 0:l.articles)||[]).filter(e=>e.url!==n).map(e=>{let{url:t}=e;return t});return c.length||i?c:(r(),await z(e,1,"",!0,r,n))};var O=a(2888),U=a(2708),G=a.n(U);let K=e=>{var t,a,r,o,_,h,j,b;let{env:y,post:k,tags:C,description:T,isMobileApplication:P,extra:A,bestOffersBlock:E,bestOffersBlockPageData:M}=e,R=(0,N.I)(),{asPath:F}=(0,s.useRouter)(),[O,U]=(0,c.useState)(k),[K,X]=(0,c.useState)([]),Y=(0,c.useRef)([]),V=(0,c.useRef)(0),Z=(0,c.useRef)(!1),[Q,q]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let e=()=>{var e;let t=document.getElementById(null===(e=window.location.hash)||void 0===e?void 0:e.slice(1));t&&(0,L.Q)((0,L.n)(t)-32),history.replaceState(null,"",window.location.pathname+window.location.search)};return window.addEventListener("hashchange",e),window.location.hash?e():window.scrollTo(0,0),()=>{window.removeEventListener("hashchange",e)}},[]);let $=null===(t=O.tag_ids)||void 0===t?void 0:t.reduce((e,t)=>{let a=C.find(e=>{let{id:a}=e;return a===t}),i=F.replace("navigator-new/","navigator/"),r=i.includes((null==a?void 0:a.url)||"___");return a&&r&&e.unshift(a),a&&!r&&e.push(a),e},[]),ee=(null==$?void 0:$[0])||C[0],et=()=>{Z.current=!0,V.current=1},ea=async()=>{var e,t;Y.current.length||(V.current++,Y.current=await z(y,V.current,ee.url,Z.current,et,O.url));let a=Y.current.shift();if(!a){q(!0);return}let i=await (0,u.vM)(y,a),r=null===(e=i.data)||void 0===e?void 0:e.article;if((null==r?void 0:r.best_offers)&&M){let e=await (0,d.x)(y,M,r.best_offers),a=(null==e?void 0:null===(t=e.chips)||void 0===t?void 0:t[0])?(0,p.v)(e.chips[0]):null;a&&(r.bestOffersTab=a)}r.title?X(e=>[...e,r]):ea()},ei=(0,x.M)(ea,.5),er=(0,c.useMemo)(()=>{var e;return"Читать статью на тему “".concat(O.title.trimEnd(),"” онлайн на сайте.  Еще больше актуальных статей").concat(O.tag_ids&&O.tag_ids[0]?" по теме “".concat(null===(e=C[O.tag_ids[0]-1])||void 0===e?void 0:e.name,"” "):" ","в Журнале Финуслуги.")},[C,O]),en=(0,c.useMemo)(()=>""!==T?T:er,[T,er]),el=(()=>{switch(ee&&ee.url){case"navigator/investirovat":return{pp:"cfbl",ps:"foam",p2:"hpaj"};case"navigator/kredity":return{pp:"cfbj",ps:"foam",p2:"hpaj"};case"navigator/nakopit-i-sohranit":return{pp:"cfek",ps:"foam",p2:"hpaj"};case"navigator/zastrahovat":return{pp:"cfbk",ps:"foam",p2:"hpaj"};default:return{pp:"i",ps:"foam",p2:"hpaj"}}})(),eo=(0,D.z)({tag:{href:ee.url,label:ee.name},current:{label:O.title}}),es=(0,D.z)({includeBase:!1,tag:{href:ee.url,label:ee.name}}),ec=(0,I.z)(eo),ed=(0,I.z)(es),ep=JSON.stringify({"@context":"https://schema.org","@graph":[{"@type":"Article",name:O.title,headline:"".concat(O.title," - читайте на сайте Финуслуги"),description:en,url:"".concat(f._n,"/").concat(O.url),about:{"@type":"Thing",...O.tag_ids&&{name:null===(a=C[O.tag_ids[0]-1])||void 0===a?void 0:a.name,sameAs:"".concat(f._n,"/").concat(null===(r=C[O.tag_ids[0]-1])||void 0===r?void 0:r.url)}},mainEntityOfPage:{"@type":"WebPage","@id":"".concat(f._n,"/").concat(O.url)},dateCreated:O.public_date||O.publ_date,datePublished:O.public_date||O.publ_date,dateModified:O.update_time||O.public_date,thumbnailUrl:"".concat(f._n,"/img/posts/big/").concat(null==O?void 0:null===(o=O.image)||void 0===o?void 0:o.file),...O.author&&{author:{"@type":"Person",name:null===(_=O.author)||void 0===_?void 0:_.name,url:"".concat(f._n,"/navigator/author/").concat(null===(h=O.author)||void 0===h?void 0:h.url)}},...(null==O?void 0:O.publisher)&&{publisher:{"@type":O.publisher.type,name:O.publisher.name,url:"".concat(f._n),address:{"@type":"PostalAddress",name:O.publisher.address},logo:{"@type":"ImageObject",url:"".concat(f._n,"/icons/header_logo.svg"),width:168,height:42}}}},JSON.parse(ed)]}),{anons:eu,publ_date:e_}=O,ev=e_.split(" ")[0].split("-")[0],eg=(null==E?void 0:E.chips[0])?(0,p.v)(E.chips[0]):null;return(0,i.jsxs)("main",{ref:ei,className:G().page,children:[!A&&(0,i.jsx)(g.N,{env:y,title:O.seo_title||O.custom_title||O.title,description:O.seo_description||en,path:F,noindex:"Дарим 4000 рублей за первый вклад"===eu&&"2022"===ev,image:"img/posts/big/".concat(null==k?void 0:null===(j=k.image)||void 0===j?void 0:j.file),isDetailPage:!0}),(0,i.jsxs)(n.W2,{children:[!P&&!A&&(0,i.jsx)(l.Oo,{items:eo,style:{padding:"16px 0"}}),!P&&!A&&(0,i.jsx)(W.v5,{env:y,isMobile:!0,tags:C,selectedTag:null==ee?void 0:ee.url}),(0,i.jsxs)("div",{className:G().content,children:[(0,i.jsx)(S.F,{env:y,tags:C,selectedTag:null==ee?void 0:ee.url}),(0,i.jsxs)("div",{className:G().main,children:[(0,i.jsx)(J,{...e,onReach:ea,handleChangePost:e=>U(e)}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ep}}),(0,i.jsx)("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:ec}}),eg&&(0,i.jsx)(v.e,{category:null!==(b=w(k.url))&&void 0!==b?b:"",tab:eg}),!P&&(0,i.jsx)(m.Z,{config:R,params:el}),K.map(t=>{var a;let{bestOffersTab:r,...n}=t;return(0,i.jsxs)(c.Fragment,{children:[(0,i.jsx)(J,{extra:!0,handleChangePost:U,...e,onReach:ea,post:n,otherPosts:[]}),r&&(0,i.jsx)(v.e,{category:null!==(a=w(n.url))&&void 0!==a?a:"",tab:r})]},n.url)}),!Q&&(0,i.jsx)(J,{...e,post:H.Wn,otherPosts:[],extra:!0,skeleton:!0})]})]})]}),(0,i.jsx)(B.w,{articleRef:ei})]})},J=e=>{var t,a,n,l,d,p,v,g,m;let{env:f,post:N,tags:I,ctgs:D,isMobileApplication:w,extra:S,onReach:A,skeleton:E,handleChangePost:M}=e,{asPath:H,push:B}=(0,s.useRouter)(),[F,z]=(0,c.useState)(N.views||0),[U,K]=(0,c.useState)(!1),J=(0,x.M)(A,.5),X=(0,c.useRef)(!S),Y=(0,c.useRef)(!1),{overlayClassName:V,overlayStyles:Z}=(0,j.I)({wrapperRef:J}),Q=(null===(a=N.content)||void 0===a?void 0:null===(t=a.filter(e=>"header"===e.type))||void 0===t?void 0:t.map(e=>{var t;return null===(t=e.data)||void 0===t?void 0:t.text}))||[],q=(0,b.I)((0,C.$)(N.anons||(null===(d=N.content)||void 0===d?void 0:null===(l=d.find(e=>e.type===_.z.Annotation))||void 0===l?void 0:null===(n=l.data)||void 0===n?void 0:n.text)||"")),$=(null===(p=N.content)||void 0===p?void 0:p.filter(e=>!!N.anons||e.type!==_.z.Annotation))||[],ee=null===(v=N.tag_ids)||void 0===v?void 0:v.reduce((e,t)=>{let a=I.find(e=>{let{id:a}=e;return a===t}),i=H.replace("navigator-new/","navigator/"),r=i.includes((null==a?void 0:a.url)||"___");return a&&r&&e.unshift(a),a&&!r&&e.push(a),e},[]),et=(null==ee?void 0:ee[0])||I[0],ea=(()=>{switch(et&&et.url){case"navigator/investirovat":return{pp:"cfbl",ps:"foam",p2:"hpaj"};case"navigator/kredity":return{pp:"cfbj",ps:"foam",p2:"hpaj"};case"navigator/nakopit-i-sohranit":return{pp:"cfek",ps:"foam",p2:"hpaj"};case"navigator/zastrahovat":return{pp:"cfbk",ps:"foam",p2:"hpaj"};default:return{pp:"i",ps:"foam",p2:"hpaj"}}})(),ei=f.NEXT_PUBLIC_BASE_URL;(0,c.useEffect)(()=>{S||E||(Y.current=!0,(0,u.f6)(f,N.url).then(e=>{z((0,y.V)(N.url,e||N.views,1))}))},[]),(0,c.useEffect)(()=>{if(J.current&&!E){let e=J.current,t=()=>{if(!e||!J.current)return;let t=J.current.getBoundingClientRect(),a=t.top+window.scrollY,i=a+J.current.offsetHeight,r=window.scrollY+window.innerHeight/2,n=r>a&&r<i;!n||X.current||Y.current||(Y.current=!0,(0,u.f6)(f,N.url).then(e=>{z((0,y.V)(N.url,e||N.views,1))})),n&&!X.current&&(X.current=!0,M&&M(N),B("/".concat(N.url),void 0,{shallow:!0})),n||(X.current=!1)};return document.addEventListener("scroll",t),()=>{e&&document.removeEventListener("scroll",t)}}},[]);let er=e=>{let{index:t,post:a}=e;(0,k.I)({eventCategory:"".concat((0,T.b)("журнал"),"_").concat(location.pathname),eventActionType:k.i.link,eventActionText:(0,T.b)(a.title),eventLabel:""});let i=document.getElementById("".concat(a.id,"_content_header_").concat(t));i&&(0,L.Q)((0,L.n)(i)-32)},en=!w&&!!Q.length&&0!==N.show_content;return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("div",{ref:J,className:(0,o.Z)(G().article,{[G().app]:w,[G().skeleton]:E}),children:[(0,i.jsxs)("div",{className:G().articleContentWrapper,children:[!w&&(0,i.jsxs)("div",{className:G().topInfoWrapper,children:[(0,i.jsx)(W.Yx,{env:f,tag:et}),(0,i.jsxs)("div",{className:G().rightInfo,children:[(0,i.jsxs)("div",{className:G().share,onClick:()=>{(0,k.I)({eventCategory:"".concat((0,T.b)("журнал"),"_").concat(location.pathname),eventActionType:k.i.button,eventActionText:(0,T.b)("поделиться"),eventLabel:""}),K(e=>!e)},children:[(0,i.jsx)(r.IconFdsArrowForwardO,{size:24}),(0,i.jsx)("p",{className:"desktopOnly",children:"Поделиться"})]}),(0,i.jsx)(h.n,{className:(0,o.Z)(G().soc,{[G().show]:U}),title:N.title,url:"/".concat(N.url)})]})]}),(0,i.jsx)("h1",{dangerouslySetInnerHTML:{__html:(0,b.I)(N.title)}}),(0,i.jsx)("div",{className:G().anons,dangerouslySetInnerHTML:{__html:q}}),(0,i.jsx)(R,{post:N,BASE_URL:ei,postViews:F}),!!(null==N?void 0:null===(g=N.image)||void 0===g?void 0:g.file)&&(null==N?void 0:null===(m=N.image)||void 0===m?void 0:m.file)!=="."&&(0,i.jsx)(O.t,{isLazy:!1,srcDesktop:"".concat(ei,"/img/posts/big/").concat(N.image.file),srcMobile:"".concat(ei,"/img/posts/small/").concat(N.image.file),caption:N.cover_title,captionClassName:G().detailImageCaption,className:G().detailImageWrapper}),en&&(0,i.jsxs)("div",{className:G().contentTable,children:[(0,i.jsx)("label",{children:"Содержание статьи"}),(0,i.jsx)("div",{className:G().contentList,children:Q.map((e,t)=>(0,i.jsx)("div",{onClick:()=>er({index:t+1,post:N}),children:e},t))})]}),(0,i.jsx)(P.L,{env:f,data:$,params:ea,post:N,ctgs:D})]}),(0,i.jsx)("div",{className:V,style:{...Z,borderRadius:"20px"}})]})})}},2708:function(e){e.exports={contentTable:"NavigatorDetail_contentTable__KWjgZ",expertName:"NavigatorDetail_expertName__yLbfr",group:"NavigatorDetail_group__vb1OA",popularTitle:"NavigatorDetail_popularTitle__Feft2",popularItemCat:"NavigatorDetail_popularItemCat__traK5",popularItemTitle:"NavigatorDetail_popularItemTitle__L0HFY",article:"NavigatorDetail_article__1H_V4",skeleton:"NavigatorDetail_skeleton__vThIp",anons:"NavigatorDetail_anons__YKy3n",detailImageWrapper:"NavigatorDetail_detailImageWrapper__UWyrX",shine:"NavigatorDetail_shine__gQoSm",page:"NavigatorDetail_page__wU4Bs",content:"NavigatorDetail_content__3OnlR",main:"NavigatorDetail_main__GpWew",articleContentWrapper:"NavigatorDetail_articleContentWrapper__EfqF8",topInfoWrapper:"NavigatorDetail_topInfoWrapper__E1F9k",share:"NavigatorDetail_share__MzvJK",soc:"NavigatorDetail_soc__JTFnl",show:"NavigatorDetail_show__M8HgU",rightInfo:"NavigatorDetail_rightInfo__srdvn",articleBottomCard:"NavigatorDetail_articleBottomCard__xRPhV",catWrapper:"NavigatorDetail_catWrapper__18gpL",cat:"NavigatorDetail_cat__XQbDD",shareButton:"NavigatorDetail_shareButton__rTsxD",detailImageCaption:"NavigatorDetail_detailImageCaption__gkRYA",detailImage:"NavigatorDetail_detailImage__8q77t",detailImageM:"NavigatorDetail_detailImageM__3sJpR",contentList:"NavigatorDetail_contentList__K8JlZ",mobAppAd:"NavigatorDetail_mobAppAd__fihfG",expert:"NavigatorDetail_expert__rpM3K",expertPosition:"NavigatorDetail_expertPosition__AxXGB",shareWrapper:"NavigatorDetail_shareWrapper__weiO3",articleGridWrapper:"NavigatorDetail_articleGridWrapper__tdKxZ",fullInfoLink:"NavigatorDetail_fullInfoLink__2KvDF",popularContentWrapper:"NavigatorDetail_popularContentWrapper__HyLNV",slider:"NavigatorDetail_slider__doGWp",sliderLeftButton:"NavigatorDetail_sliderLeftButton__zcXcA",sliderRightButton:"NavigatorDetail_sliderRightButton__bIRrK",singleItem:"NavigatorDetail_singleItem__tUu90",popularItem:"NavigatorDetail_popularItem__2hyCD",popularItemImage:"NavigatorDetail_popularItemImage__GEEAk",popularItemContent:"NavigatorDetail_popularItemContent__D_aab",popularItemStatUnit:"NavigatorDetail_popularItemStatUnit__uIGqb",popularItemStat:"NavigatorDetail_popularItemStat__cd1qQ",popularItemStatLeft:"NavigatorDetail_popularItemStatLeft__SFtTF",stickySidebar:"NavigatorDetail_stickySidebar__M2MRx",sidebar:"NavigatorDetail_sidebar__4Mv5u"}},9298:function(e){e.exports={wrapper:"PostHeaderInfo_wrapper__iUNGo",info:"PostHeaderInfo_info__9xMwf",unit:"PostHeaderInfo_unit__spJLu",author:"PostHeaderInfo_author__lo1kv",image:"PostHeaderInfo_image__GCbNH",name:"PostHeaderInfo_name__P7sbO",position:"PostHeaderInfo_position__U6cYP",shine:"PostHeaderInfo_shine__FXTGX"}}}]);