(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,73477,e=>{e.v({bestOffersWrapper:"BestOffersSection-module-scss-module__2HfRwq__bestOffersWrapper",shine:"BestOffersSection-module-scss-module__2HfRwq__shine"})},81911,e=>{e.v({author:"AuthorQuote-module-scss-module__CRcRmW__author",image:"AuthorQuote-module-scss-module__CRcRmW__image",name:"AuthorQuote-module-scss-module__CRcRmW__name",position:"AuthorQuote-module-scss-module__CRcRmW__position",quote:"AuthorQuote-module-scss-module__CRcRmW__quote",shine:"AuthorQuote-module-scss-module__CRcRmW__shine",wrapper:"AuthorQuote-module-scss-module__CRcRmW__wrapper"})},99008,e=>{e.v({fade:"AuthTooltip-module-scss-module__thXgRa__fade",mobilePopup:"AuthTooltip-module-scss-module__thXgRa__mobilePopup",shine:"AuthTooltip-module-scss-module__thXgRa__shine",text:"AuthTooltip-module-scss-module__thXgRa__text",tooltip:"AuthTooltip-module-scss-module__thXgRa__tooltip",wrapper:"AuthTooltip-module-scss-module__thXgRa__wrapper"})},20152,e=>{e.v({actionButton:"Sort-module-scss-module__U9h0XG__actionButton",icon:"Sort-module-scss-module__U9h0XG__icon",iconButton:"Sort-module-scss-module__U9h0XG__iconButton",iconInverted:"Sort-module-scss-module__U9h0XG__iconInverted",modal:"Sort-module-scss-module__U9h0XG__modal",modalButton:"Sort-module-scss-module__U9h0XG__modalButton",newSortRadioModal:"Sort-module-scss-module__U9h0XG__newSortRadioModal",shine:"Sort-module-scss-module__U9h0XG__shine",sortType:"Sort-module-scss-module__U9h0XG__sortType",sortTypeButton:"Sort-module-scss-module__U9h0XG__sortTypeButton",sortTypeDesktop:"Sort-module-scss-module__U9h0XG__sortTypeDesktop",sortTypeHead:"Sort-module-scss-module__U9h0XG__sortTypeHead",sortTypeRadio:"Sort-module-scss-module__U9h0XG__sortTypeRadio",sortTypeTooltip:"Sort-module-scss-module__U9h0XG__sortTypeTooltip",sortTypeTrigger:"Sort-module-scss-module__U9h0XG__sortTypeTrigger",text:"Sort-module-scss-module__U9h0XG__text",wrapper:"Sort-module-scss-module__U9h0XG__wrapper"})},1177,e=>{e.v({author:"Comments-module-scss-module__g4SbPG__author",caption:"Comments-module-scss-module__g4SbPG__caption",comment:"Comments-module-scss-module__g4SbPG__comment",commentBody:"Comments-module-scss-module__g4SbPG__commentBody",commentControls:"Comments-module-scss-module__g4SbPG__commentControls",commentHeaderText:"Comments-module-scss-module__g4SbPG__commentHeaderText",comments:"Comments-module-scss-module__g4SbPG__comments",date:"Comments-module-scss-module__g4SbPG__date",dislike:"Comments-module-scss-module__g4SbPG__dislike",form:"Comments-module-scss-module__g4SbPG__form",header:"Comments-module-scss-module__g4SbPG__header",input:"Comments-module-scss-module__g4SbPG__input",letter:"Comments-module-scss-module__g4SbPG__letter",more:"Comments-module-scss-module__g4SbPG__more",replyBtn:"Comments-module-scss-module__g4SbPG__replyBtn",shine:"Comments-module-scss-module__g4SbPG__shine",submitBtn:"Comments-module-scss-module__g4SbPG__submitBtn",submitBtnArrow:"Comments-module-scss-module__g4SbPG__submitBtnArrow",title:"Comments-module-scss-module__g4SbPG__title",unit:"Comments-module-scss-module__g4SbPG__unit",wrapper:"Comments-module-scss-module__g4SbPG__wrapper"})},20378,e=>{e.v({bgImage:"QrAd-module-scss-module__GKP0jG__bgImage",button:"QrAd-module-scss-module__GKP0jG__button",buttonMobile:"QrAd-module-scss-module__GKP0jG__buttonMobile",container:"QrAd-module-scss-module__GKP0jG__container",qr:"QrAd-module-scss-module__GKP0jG__qr",qrContainer:"QrAd-module-scss-module__GKP0jG__qrContainer",right:"QrAd-module-scss-module__GKP0jG__right",shine:"QrAd-module-scss-module__GKP0jG__shine",title:"QrAd-module-scss-module__GKP0jG__title",titleSmall:"QrAd-module-scss-module__GKP0jG__titleSmall"})},76357,39002,47865,e=>{"use strict";let t={src:e.i(24110).default,width:256,height:256,blurWidth:0,blurHeight:0};e.s(["default",0,t],76357);var s=e.i(43476),a=e.i(71645),l=e.i(2305);let o=e=>(0,s.jsx)("a",{...e});var n=e.i(20378);let r="Управляйте финансами через приложение Финуслуг",d="https://promo.finuslugi.ru/mobapp/",i=(0,a.memo)(({Link:e=o,text:t=r,className:a,BgImage:i,QrImage:u,isSmall:c,href:m=d,hideButtons:_})=>(0,s.jsxs)(e,{className:(0,l.default)(n.default.container,a),target:"_blank",href:m,children:[(0,s.jsx)("div",{className:(0,l.default)(n.default.title,c&&n.default.titleSmall),dangerouslySetInnerHTML:{__html:t}}),(0,s.jsxs)("div",{className:n.default.right,children:[u&&(0,s.jsx)("div",{className:n.default.qrContainer,children:(0,s.jsx)(u,{className:n.default.qr})}),!_&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:n.default.button,children:"Отсканируйте QR"}),(0,s.jsx)("div",{className:(0,l.default)(n.default.button,n.default.buttonMobile),children:"Подробнее"})]}),i&&(0,s.jsx)(i,{className:n.default.bgImage})]})]}));i.displayName="UiQrAd",e.s(["UiQrAd",0,i],39002),e.s([],47865)},75331,e=>{e.v({blockTitle:"ReadMore-module-scss-module__EHKVGa__blockTitle",card:"ReadMore-module-scss-module__EHKVGa__card",container:"ReadMore-module-scss-module__EHKVGa__container",icons:"ReadMore-module-scss-module__EHKVGa__icons",image:"ReadMore-module-scss-module__EHKVGa__image",imageWrapper:"ReadMore-module-scss-module__EHKVGa__imageWrapper",shine:"ReadMore-module-scss-module__EHKVGa__shine",title:"ReadMore-module-scss-module__EHKVGa__title",unit:"ReadMore-module-scss-module__EHKVGa__unit",wrapper:"ReadMore-module-scss-module__EHKVGa__wrapper"})},61167,e=>{e.v({hide:"YaAdFoxBanner-module-scss-module__mudSjG__hide",shine:"YaAdFoxBanner-module-scss-module__mudSjG__shine"})},13168,e=>{e.v({body:"InfoBlock-module-scss-module__0zS1UW__body",button:"InfoBlock-module-scss-module__0zS1UW__button",component:"InfoBlock-module-scss-module__0zS1UW__component",description:"InfoBlock-module-scss-module__0zS1UW__description",image:"InfoBlock-module-scss-module__0zS1UW__image",isOutside:"InfoBlock-module-scss-module__0zS1UW__isOutside",shine:"InfoBlock-module-scss-module__0zS1UW__shine",title:"InfoBlock-module-scss-module__0zS1UW__title"})},27464,e=>{e.v({"adfox-banner":"ContentBlocks-module-scss-module__iOSIeW__adfox-banner",annotation:"ContentBlocks-module-scss-module__iOSIeW__annotation",arrow:"ContentBlocks-module-scss-module__iOSIeW__arrow","arrow-left":"ContentBlocks-module-scss-module__iOSIeW__arrow-left","arrow-right":"ContentBlocks-module-scss-module__iOSIeW__arrow-right","block-link":"ContentBlocks-module-scss-module__iOSIeW__block-link","block-link-old":"ContentBlocks-module-scss-module__iOSIeW__block-link-old","blog-slider":"ContentBlocks-module-scss-module__iOSIeW__blog-slider","brain-banner":"ContentBlocks-module-scss-module__iOSIeW__brain-banner","card-banner":"ContentBlocks-module-scss-module__iOSIeW__card-banner","content-blocks":"ContentBlocks-module-scss-module__iOSIeW__content-blocks","content-image":"ContentBlocks-module-scss-module__iOSIeW__content-image","content-image-element":"ContentBlocks-module-scss-module__iOSIeW__content-image-element","content-slider-counter":"ContentBlocks-module-scss-module__iOSIeW__content-slider-counter","content-slider-list":"ContentBlocks-module-scss-module__iOSIeW__content-slider-list","content-slider-pager":"ContentBlocks-module-scss-module__iOSIeW__content-slider-pager","content-slider-wrapper":"ContentBlocks-module-scss-module__iOSIeW__content-slider-wrapper","content-table-wrapper":"ContentBlocks-module-scss-module__iOSIeW__content-table-wrapper",controls:"ContentBlocks-module-scss-module__iOSIeW__controls","credit-widget":"ContentBlocks-module-scss-module__iOSIeW__credit-widget",date:"ContentBlocks-module-scss-module__iOSIeW__date",disableContentBlocksStyles:"ContentBlocks-module-scss-module__iOSIeW__disableContentBlocksStyles","doc-file":"ContentBlocks-module-scss-module__iOSIeW__doc-file","doc-files":"ContentBlocks-module-scss-module__iOSIeW__doc-files","dossier-date-item":"ContentBlocks-module-scss-module__iOSIeW__dossier-date-item","feedback-widget":"ContentBlocks-module-scss-module__iOSIeW__feedback-widget","i-arrow-right":"ContentBlocks-module-scss-module__iOSIeW__i-arrow-right","i-chain":"ContentBlocks-module-scss-module__iOSIeW__i-chain","image-opened":"ContentBlocks-module-scss-module__iOSIeW__image-opened",infoBlock:"ContentBlocks-module-scss-module__iOSIeW__infoBlock","investor-banner":"ContentBlocks-module-scss-module__iOSIeW__investor-banner",keynote:"ContentBlocks-module-scss-module__iOSIeW__keynote","keynote-wrapper":"ContentBlocks-module-scss-module__iOSIeW__keynote-wrapper","list-with-counter":"ContentBlocks-module-scss-module__iOSIeW__list-with-counter","main-p":"ContentBlocks-module-scss-module__iOSIeW__main-p",notice:"ContentBlocks-module-scss-module__iOSIeW__notice",postAuthor:"ContentBlocks-module-scss-module__iOSIeW__postAuthor",qrAd:"ContentBlocks-module-scss-module__iOSIeW__qrAd",shine:"ContentBlocks-module-scss-module__iOSIeW__shine",short:"ContentBlocks-module-scss-module__iOSIeW__short","slider-item":"ContentBlocks-module-scss-module__iOSIeW__slider-item","text-styles":"ContentBlocks-module-scss-module__iOSIeW__text-styles","text-styles__small":"ContentBlocks-module-scss-module__iOSIeW__text-styles__small",warning:"ContentBlocks-module-scss-module__iOSIeW__warning"})},25581,29883,15825,29151,81230,64619,46660,50056,31484,75727,7326,8237,e=>{"use strict";var t,s,a=((t=a||{}).Company="company",t.CompanyInsurance="company_insurance",t.Finuslugi="finuslugi",t.Industry="industry",t.IndustryInsurance="industry_insurance",t),l=((s={}).Annotation="annotation",s.HTML="html",s.Header="header",s.Keynote="keynote",s.SubHeader="sub_header",s.DocumentFile="document-file",s);e.s(["ContentType",()=>l],25581);var o=e.i(43476),n=e.i(8810),r=e.i(67638),d=e.i(94246),i=e.i(73477);e.s(["BestOffersSection",0,({tab:e,category:t})=>{let s={...e,banner:void 0},a=(0,r.getEnvValue)(),l=["best-offers",s.productType];return t&&l.push(t),(0,o.jsx)("div",{className:i.default.bestOffersWrapper,children:(0,o.jsx)(n.BestOffers,{tabs:[s],baseUrl:a.NEXT_PUBLIC_BASE_URL,s3Assets:a.NEXT_PUBLIC_S3_ASSETS,dataLayerPush:d.dataLayerPush,singleProduct:!0,eventCategory:l.join("_"),theme:"gray"})})},"getBestOffersTab",0,(e,t)=>{if(Array.isArray(e))return e.find(e=>e.productType===t)}],29883),e.s([],15825);var u=e.i(71645),c=e.i(70703),m=e.i(57688),_=e.i(22016),h=e.i(62965),p=e.i(2305),f=e.i(43487),g=e.i(76357),b=e.i(81911);let x=({quote:e,name:t,position:s,img:a})=>e?(0,o.jsxs)("div",{className:(0,p.default)(b.default.wrapper,"disableContentBlocksStyles"),children:[t&&(0,o.jsxs)("div",{className:b.default.author,children:[a&&(0,o.jsx)("div",{className:b.default.image,children:(0,o.jsx)("img",{src:a,alt:"portrait"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:b.default.name,children:t}),(0,o.jsx)("div",{className:b.default.position,children:s})]})]}),(0,o.jsx)("div",{className:b.default.quote,children:e})]}):null;e.i(51966);var S=e.i(20039),v=e.i(12716),k=e.i(97209);let y=e=>"object"==typeof e&&null!==e,C=e=>{let t;return"string"!=typeof e?null:(t=e.trim().split(/\s+/))[0]?1===t.length?t[0]:t[1]||null:null},j=e=>{let t,s=(0,k.getSavedAccessToken)(),a=s?(e=>{try{let t=e.split(".")[1];if(!t)return null;let s=t.replace(/-/g,"+").replace(/_/g,"/"),a=s.padEnd(s.length+(4-s.length%4)%4,"="),l=atob(a),o=Uint8Array.from(l,e=>e.charCodeAt(0));return JSON.parse(new TextDecoder().decode(o))}catch{return null}})(s):null;if(!y(a))return e;let l=y(t=a.authz_attrs)?C(t.given_name):null;return l||C(a.given_name)||e};var A=e.i(11615),w=e.i(52918);let I=new Map,T=()=>{let e=window.location.href?.includes("state=")?"true":null;return(e=>{if(!e)return null;let t=e.includes("state=")?"true":null,{hash:s,search:a}=new URL(e,"https://www.finuslugi.ru"),l=new URLSearchParams(a).get("state");if(l)return l;let o=s.indexOf("?"),n=o>=0?s.slice(o+1):s.slice(1);return n&&new URLSearchParams(n).get("state")||t})(window.location.href)||e},B=async(e,t,s)=>{let a=[e,t,s].join("\n"),l=I.get(a);if(l)return l;let o=(0,A.exchangeCallbackToken)({tokenUrl:e,refreshToken:t,redirectUri:s,grantType:"refresh_token"}).then(e=>e.ok?((0,k.saveCallbackTokens)(e.data),e.data.access_token):(w.appCookie.removeItem("refresh_token"),null)).catch(()=>(w.appCookie.removeItem("refresh_token"),null)).finally(()=>{I.delete(a)});return I.set(a,o),o},N=async(e,t,s,a={})=>{let{ignoreCustomerIdCookie:l=!1}=a,o=l?null:w.appCookie.getItem("auth.gtm_customer_id");if(o)return o;if(!e)return null;let n=(0,k.getSavedAccessToken)();if(n)return n;let r=w.appCookie.getItem("refresh_token");return r&&t&&s?B(t,r,s):null},L=e=>{let t=window.cookieStore||null;if(!t)return()=>void 0;let s=t=>{let s;(!(s=[...t.changed||[],...t.deleted||[]]).length||s.some(e=>{let t;return"auth.gtm_customer_id"===(t=e.name)||"access_token"===t||"refresh_token"===t}))&&e()};return t.addEventListener("change",s),()=>{t.removeEventListener("change",s)}};e.s(["getCurrentAuthRedirectState",0,T,"getCurrentCommentAuthCookieUserId",0,N,"subscribeToCommentAuthCookieChange",0,L],29151);var O=e.i(5081),G=e.i(59260),E=e.i(231),W=e.i(37819);let R=["#5bce95","#ff696b","#c8df77","#ffb74d","#81d4fa","#aed581","#f06292","#4db6ac","#9575cd","#7986cb","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#81c784","#dce775","#fff176","#ffd54f","#ffb74d","#ff8a65"],U="unsent_comments",P="comments_should_send_after_auth",H=()=>E.appLocalStorage.getItem(U)||{},M=e=>!0===(E.appLocalStorage.getItem(P)||{})[String(e)];var D=e.i(24734),$=e.i(18524);let F=async()=>{try{let e=await $.CmsService.getLayoutData("LoginWidget");return e?.custom||null}catch{return null}};e.i(38886);var z=e.i(86969);e.i(75182);var X=e.i(64457),K=e.i(65018),q=e.i(79335),Q=e.i(99008);let V="Войдите, чтобы отправить комментарий",Y=({isOpen:e,onClose:t,postId:s})=>{let a=(0,K.useMedia)("lg"),l=window.location.href.split("#")[0],n=`${q.LK}?returnTo=${l}#comments${s}`;return!a&&e?(0,o.jsx)("div",{className:"disableContentBlocksStyles",children:(0,o.jsx)("div",{className:Q.default.wrapper,children:(0,o.jsxs)("div",{className:Q.default.tooltip,children:[(0,o.jsx)("div",{children:V}),(0,o.jsx)(v.Button,{as:"a",label:"Войти",href:n,target:"_self",onClick:()=>{(0,G.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:G.DataLayerActionType.button,eventActionText:(0,W.translit)("войти"),eventLabel:""})}})]})})}):(0,o.jsx)(z.Portal,{children:(0,o.jsx)("div",{className:"disableContentBlocksStyles",children:(0,o.jsxs)(X.UiMobilePopup,{className:Q.default.mobilePopup,isOpen:e,onClose:t,hasCloseButton:!1,children:[(0,o.jsx)("div",{className:Q.default.text,children:V}),(0,o.jsx)(v.Button,{as:"a",label:"Войти",href:n,target:"_self"})]})})})};var J=e.i(20152);let Z=[{label:"По дате",value:"date"},{label:"По популярности",value:"likes",shortLabel:"По лайкам"}],ee=({onChangeSort:e,isIncreaseSort:t})=>(0,o.jsxs)("div",{className:(0,p.default)(J.default.sortTypeHead),children:[(0,o.jsx)("button",{style:{marginLeft:"0px",marginRight:"8px"},className:(0,p.default)(J.default.sortTypeButton),onClick:e,children:t?(0,o.jsx)(h.IconFdsSortDescendingO,{size:22}):(0,o.jsx)(h.IconFdsSortAscendingO,{size:22})}),"Сортировать"]}),et=({isIncreaseSort:e,setIsIncreaseSort:t,sortType:s,setSortType:a,chipView:l,className:n})=>{let r=Z.find(e=>e.value===s),d=(0,u.useCallback)(()=>{t(e=>(E.appLocalStorage.setItem("comments_sort",JSON.stringify(!e)),!e))},[t]),i=(0,u.useCallback)(e=>{let t=Z.find(t=>t.value===e);t&&(E.appLocalStorage.setItem("comments_sort_type",JSON.stringify(t.value)),a(t.value))},[a]);return(0,o.jsxs)("div",{className:(0,p.default)(J.default.wrapper,n,{[J.default.chip]:l}),children:[(0,o.jsx)("button",{className:(0,p.default)(J.default.icon,J.default.iconButton),onClick:l?()=>null:d,children:e?(0,o.jsx)(h.IconFdsSortDescendingO,{size:24}):(0,o.jsx)(h.IconFdsSortAscendingO,{size:24})}),(0,o.jsxs)(v.Dropdown,{children:[(0,o.jsx)(v.DropdownTrigger,{children:(0,o.jsx)("div",{role:"button",className:(0,p.default)(J.default.text,J.default.actionButton),"data-qa":s,children:r?.shortLabel||r?.label||"Сортировка"})}),(0,o.jsxs)(v.DropdownContent,{children:[(0,o.jsx)(ee,{onChangeSort:d,isIncreaseSort:e}),(0,o.jsx)(v.DropdownDivider,{}),Z.map(e=>(0,o.jsx)("div",{"data-qa":`${e.value}_radio`,className:J.default.sortType,children:(0,o.jsx)(v.Checkbox,{onChange:()=>{i(e.value)},value:e.value===s,label:e.label})},e.value))]})]})]})};var es=e.i(1177);let ea="Гость",el=(0,c.default)(()=>e.A(55589).then(({AuthWidgetModal:e})=>e),{loadableGenerated:{modules:[35651]}}),eo=async({isCallbackPageEnabled:e,ignoreCustomerIdCookie:t,tokenUrl:s,redirectUri:a})=>{let l=await N(e,s,a,{ignoreCustomerIdCookie:t});return l||(e?null:E.appLocalStorage.getItemRaw("partialAuth")||T())},en=({env:e,postId:t,comments:s,inputRef:a})=>{let l=Array.isArray(s)?s:[],[n,r]=(0,u.useState)(""),[d,i]=(0,u.useState)([]),[c,m]=(0,u.useState)(3),[_,g]=(0,u.useState)(!1),[b,x]=(0,u.useState)(null),[k,y]=(0,u.useState)(!1),[C,A]=(0,u.useState)(!1),[w,I]=(0,u.useState)(!1),[T,B]=(0,u.useState)(!1),[N,$]=(0,u.useState)(!1),z=(0,u.useRef)(!1),[X,K]=(0,u.useState)(!1),[q,Q]=(0,u.useState)("date"),V="false"!==String(e.NEXT_PUBLIC_COMMENTS_AUTH_WIDGET_ENABLED),J="false"!==String(e.NEXT_PUBLIC_CALLBACK_PAGE_ENABLED),Z="false"!==String(e.NEXT_PUBLIC_COMMENTS_AUTH_HIDDEN_IFRAME_ENABLED),ee=`${e.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL}/token`,en=`${window.location.origin}/callback`,er=(({enabled:e,endpoint:t,redirectUri:s})=>{let a=(0,u.useRef)(null),l=(0,u.useRef)(null),o=(0,u.useCallback)(()=>{l.current&&(window.clearTimeout(l.current),l.current=null),a.current?.remove(),a.current=null},[]),n=(0,u.useCallback)(e=>{e?.target&&e.target!==a.current||(l.current&&window.clearTimeout(l.current),l.current=window.setTimeout(o,15e3))},[o]),r=(0,u.useCallback)(async()=>{if(e&&t&&s&&"u">typeof document&&document.body)try{let e=await F(),l=await (0,D.getHiddenSsoIframeUrl)(e,t,s),r=document.createElement("iframe");o(),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",n),r.addEventListener("error",n),a.current=r,r.src=l,document.body.appendChild(r)}catch{o()}},[e,t,s,o,n]);return(0,u.useEffect)(()=>o,[o]),r})({enabled:Z,endpoint:`${e.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL}/auth`,redirectUri:en});(0,u.useEffect)(()=>{let e=H()[String(t)]||"",s=M(t);r(e),B(s),K(!0===E.appLocalStorage.getItem("comments_sort")),Q(E.appLocalStorage.getItem("comments_sort_type")||"date"),eo({isCallbackPageEnabled:J,ignoreCustomerIdCookie:Z,tokenUrl:ee,redirectUri:en}).then(e=>{x(e)})},[en,ee,J,Z,t]);let ed=[...l].sort((e,t)=>X&&"likes"===q?new Date(t.date_created).getTime()-new Date(e.date_created).getTime():X||"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=ed.length-c,eu=(0,S.pluralize)(ei,"комментарий","комментария","комментариев"),ec=(0,u.useCallback)(()=>{let e;e=E.appLocalStorage.getItem(P)||{},delete e[String(t)],E.appLocalStorage.setItem(P,JSON.stringify(e)),B(!1)},[t]),em=(0,u.useCallback)(()=>{let e;(e=E.appLocalStorage.getItem(P)||{})[String(t)]=!0,E.appLocalStorage.setItem(P,JSON.stringify(e)),B(!0)},[t]),e_=(0,u.useCallback)(async()=>{let e=await eo({isCallbackPageEnabled:J,ignoreCustomerIdCookie:Z,tokenUrl:ee,redirectUri:en});e&&(x(e),A(!1),I(!1),B(M(t)))},[en,ee,J,Z,t]),eh=(0,u.useCallback)(async s=>{let a,l,o,d,u,c,m,_;if(!n)return!1;let h=j(ea);if(!await (0,f.submitPostComment)(e,t,s,h,n,"send"))return!1;let p={id:(0,O.generateUuid)(),comment:n,date_created:(l=(a=new Date).getFullYear(),o=String(a.getMonth()+1).padStart(2,"0"),d=String(a.getDate()).padStart(2,"0"),u=String(a.getHours()).padStart(2,"0"),c=String(a.getMinutes()).padStart(2,"0"),m=String(a.getSeconds()).padStart(2,"0"),`${l}-${o}-${d} ${u}:${c}:${m}`),user_name:h,post_id:String(t),user_id:s};return i(e=>[...e,p]),r(""),_=H(),delete _[String(t)],E.appLocalStorage.setItem(U,JSON.stringify(_)),ec(),!0},[ec,e,n,t]),ep=(0,u.useCallback)(async(s=b)=>{if(s&&n&&!z.current){z.current=!0,$(!0);try{let a=j(ea);if(await (0,f.submitPostComment)(e,t,s,a,n,"validate")){let e=await eh(s);g(!e),e||ec();return}g(!0),ec()}catch{return}finally{z.current=!1,$(!1)}}},[ec,b,e,eh,n,t]),ef=(0,u.useCallback)(()=>{A(!1),ec()},[ec]),eg=(0,u.useCallback)(()=>!!E.appLocalStorage.getItemRaw("comments_auth_callback_token_failed")&&(E.appLocalStorage.removeItem("comments_auth_callback_token_failed"),ef(),I(!0),!0),[ef]);(0,u.useEffect)(()=>{eg()||e_();let e=()=>{eg()||e_()},t=()=>{"visible"===document.visibilityState&&e()},s=L(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),s()}},[eg,e_]),(0,u.useEffect)(()=>{if(T&&b&&!z.current){if(!M(t))return void B(!1);if(!n)return void ec();ep(b)}},[ec,b,ep,n,t,T]);let eb=async()=>{if(!n)return;let e=await eo({isCallbackPageEnabled:J,ignoreCustomerIdCookie:Z,tokenUrl:ee,redirectUri:en});if(x(e),!e){er(),em(),I(!1),V?A(!0):y(!0),(0,G.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:G.DataLayerActionType.button,eventActionText:(0,W.translit)("войти"),eventLabel:""});return}await ep(e)};return(0,o.jsxs)("div",{id:`comments${t}`,className:es.default.wrapper,children:[(0,o.jsxs)("div",{className:es.default.header,children:[(0,o.jsxs)("div",{className:es.default.title,children:[(0,o.jsx)("label",{children:"Комментарии"}),(0,o.jsx)("span",{children:ed.length})]}),(0,o.jsx)(et,{isIncreaseSort:X,setIsIncreaseSort:K,sortType:q,setSortType:Q})]}),(0,o.jsxs)("div",{className:es.default.formBlock,children:[(0,o.jsxs)("div",{className:es.default.form,children:[(0,o.jsx)(v.InputBase,{ref:a,size:"l",className:es.default.input,label:"Написать комментарий",value:n,onClick:()=>{(0,G.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:G.DataLayerActionType.click_field,eventActionText:(0,W.translit)("написать комментарий"),eventLabel:""})},onChange:e=>{let s;r(e),_&&e&&g(!1),w&&I(!1),(s=H())[String(t)]=e,E.appLocalStorage.setItem(U,JSON.stringify(s))}}),(0,o.jsx)(v.Button,{className:es.default.submitBtn,size:"s",disabled:!n||N||!V&&k,onClick:eb,shape:"circle-icon",iconLeft:(0,o.jsx)(h.IconFdsArrowUpSmallO,{size:36})}),!V&&(0,o.jsx)(Y,{isOpen:k,onClose:()=>y(!1),postId:t})]}),_&&(0,o.jsxs)("div",{className:es.default.caption,children:["Не допускается использование ненормативной лексики. ",(0,o.jsx)("br",{}),"Отредактируйте комментарий и попробуйте снова."]}),!_&&w&&(0,o.jsx)("div",{className:es.default.caption,children:"Авторизация не удалась."}),!!d.length&&!_&&!w&&(0,o.jsxs)("div",{className:es.default.caption,children:["Спасибо, что оставили комментарий. ",(0,o.jsx)("br",{}),"После модерации вы сможете увидеть его на странице"]})]}),!!ed.length&&(0,o.jsx)("div",{className:es.default.comments,children:ed.slice(0,c).map(e=>{let t,s,a,l,n,r,d,i="1"===e.user_id?ea:e.user_id,u=e.user_name||ea;return(0,o.jsxs)("div",{className:es.default.comment,children:[(0,o.jsx)("div",{className:es.default.letter,style:{background:(t=Math.abs((e=>{let t=0;for(let s=0;s<e.length;s++)t=(t<<5)-t+e.charCodeAt(s)|0;return t})(String(i)))%R.length,R[t])},children:u.slice(0,1)}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:es.default.commentHeaderText,children:[(0,o.jsx)("div",{className:es.default.author,children:u}),(0,o.jsx)("div",{className:es.default.date,children:(a=(s=new Date(e.date_created)).getDate().toString(),l=(s.getMonth()+1).toString().padStart(2,"0"),n=s.getFullYear(),r=s.getHours().toString().padStart(2,"0"),d=s.getMinutes().toString().padStart(2,"0"),`${a}.${l}.${n}, ${r}:${d}`)})]}),(0,o.jsx)("div",{className:es.default.commentBody,children:e.comment}),(0,o.jsxs)("div",{className:es.default.commentControls,children:[(0,o.jsxs)("div",{className:es.default.unit,children:[(0,o.jsx)(h.IconFdsThumbUpO,{}),(0,o.jsx)("span",{children:"23"})]}),(0,o.jsxs)("div",{className:(0,p.default)(es.default.unit,es.default.dislike),children:[(0,o.jsx)(h.IconFdsThumbDownO,{}),(0,o.jsx)("span",{children:"23"})]}),(0,o.jsx)("div",{className:(0,p.default)(es.default.unit,es.default.replyBtn),children:"Ответить"})]})]})]},e.id)})}),c<ed.length&&(0,o.jsxs)("div",{className:es.default.more,onClick:()=>m(e=>e+ei),children:[`Еще ${ei} ${eu}`,(0,o.jsx)("span",{children:(0,o.jsx)(h.IconFdsChevronDownSmallO,{size:24})})]}),V&&C&&(0,o.jsx)(el,{env:e,isOpen:C,onClose:ef,postId:t,onAuthSuccess:e=>{e&&(x(e),A(!1),I(!1),B(M(t)))}})]})};e.i(47449);var er=e.i(53337);e.i(47865);var ed=e.i(39002),ei=e.i(45106),eu=e.i(12377);e.i(72745);var ec=e.i(46176),em=e.i(96934),e_=e.i(80453),eh=e.i(94341),ep=e.i(75331);let ef=({env:e,articles:t})=>t.length?(0,o.jsxs)("div",{className:(0,p.default)(ep.default.wrapper,"disableContentBlocksStyles"),children:[(0,o.jsx)("h2",{className:ep.default.blockTitle,children:"Читайте также"}),t.map(t=>(0,o.jsx)(eg,{env:e,data:t},t.id))]}):null,eg=({env:e,data:t})=>{let s=(0,ec.useLikes)(t?.url,t?.likes);return(0,o.jsxs)("a",{className:ep.default.card,href:`/${t?.url}`,target:"_self",children:[(0,o.jsx)("div",{className:ep.default.imageWrapper,children:(0,o.jsx)("div",{className:ep.default.image,style:t?.image?.file?{backgroundImage:`url(${(0,e_.getImageUrl)(t?.image?.file,"small",e.NEXT_PUBLIC_BASE_URL)})`}:{}})}),(0,o.jsxs)("div",{className:ep.default.container,children:[(0,o.jsx)("div",{className:ep.default.title,children:t?.title}),(0,o.jsxs)("div",{className:ep.default.icons,children:[!!s&&(0,o.jsxs)("div",{className:ep.default.unit,children:[(0,o.jsx)(m.default,{src:eu.default,alt:"likes",unoptimized:!0}),s]}),(0,o.jsxs)("div",{className:ep.default.unit,children:[(0,o.jsx)(m.default,{src:ei.default,alt:"views",unoptimized:!0}),(0,o.jsx)("span",{suppressHydrationWarning:!0,children:(0,eh.getPostViews)(t?.url||"",t?.views||0,0)})]}),(0,o.jsx)("div",{className:ep.default.unit,children:(0,o.jsx)("span",{children:(0,em.formatDate)(String(t?.public_date||t?.update_time||t?.publ_time),!0)})})]})]})]})};var eb=e.i(61167);let ex=({params:e,children:t,className:s,config:a})=>{let[l,n]=(0,u.useState)(!1),[r,d]=(0,u.useState)(""),i=(0,u.useRef)(null),c=(0,u.useRef)("");return(0,u.useEffect)(()=>{c.current&&a?.yaContextCb&&a?.Ya&&a.yaContextCb.push(()=>{a.Ya.adfoxCode.destroy(c.current)}),d((0,O.generateUuid)())},[a?.Ya,a?.yaContextCb,e.pp]),(0,u.useEffect)(()=>{if(c.current===r)return;if(!a)return void n(!0);let t=()=>{let e=i.current?.querySelector("iframe");e?e.style.height=`${e.contentWindow?.document.body.scrollHeight}px`:console.warn("ads blocked"),n(!e)};a.yaContextCb&&a.yaContextCb.push(()=>{a.Ya.adfoxCode.create({ownerId:a.ownerId,containerId:`adfox_${r}`,params:e,onRender:t})}),setTimeout(t,5e3),c.current=r},[r,a,e]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("div",{className:(0,p.default)(l&&eb.default.hide,s),ref:i,id:`adfox_${r}`},r),l&&t]})};e.s(["YaAdFoxBanner",0,ex],81230),e.s([],64619);let eS=()=>{let[e,t]=(0,u.useState)();return(0,u.useEffect)(()=>{window&&window.Ya&&window.yaContextCb&&t({ownerId:406293,Ya:window.Ya,yaContextCb:window.yaContextCb})},[]),e};e.s(["useAdFox",0,eS],46660),e.i(52919);var ev=e.i(65854),ek=e.i(82372),ey=e.i(88195);let eC={BUTTON:"withButton",FORM:"withForm"},ej=e=>e&&"createdAt"in e?{...e,image_mobile:e.imageMobile,type:eC[e.type],button_text:e.buttonText}:e,eA=async e=>{let t=await (0,ek.callApi)({url:`/api/v1/product-banners?page=0&limit=100&categoryNavigator=${e}`,options:{isMpScApi:!0}});return{data:{blocks:t?.data?.banners?.map(ej)||[]}}};e.i(59309);var ew=e.i(95782);let eI=["а-ля","без","безо","в","вне","во","для","до","за","и","из","из-за","из-под","изо","к","ко","меж","на","над","не","ниже","о","об","обо","от","ото","по","под","пред","предо","при","про","ради","с","со","у"],eT=e=>{if("string"!=typeof e)return"";let t=e.replace(/\s\s+/g," ");return eI.forEach(e=>{let s=RegExp(`\\s${e}\\s`,"g");t=t.replace(s,` ${e}\u00A0`)}),t=t.replace(/\s-\s/g," — ")};e.s(["applyTypographyRules",0,eT],50056);var eB=e.i(13168);let eN=({block:e,categoryId:t,isOutside:s})=>{let a=(0,r.getEnvValue)(),l=ej(e),[n,d]=(0,u.useState)(l),{asPath:i}=(0,ew.useRouter)();if((0,u.useEffect)(()=>{a&&!l&&t&&eA(t).then(e=>{if(e.data?.blocks&&e.data.blocks.length>0){let t=Math.floor(Math.random()*e.data.blocks.length);d(e.data.blocks[t])}})},[a,l,t]),!n||!n.title)return null;let{button_text:c,image:m,text:_,title:h,url:f,background:g}=n,{textColor:b,buttonColor:x}=n,S=g?{background:g}:void 0,k=b?{color:b}:S?{color:"var(--color-white)"}:void 0;return(0,o.jsxs)("div",{style:S,className:(0,p.default)(eB.default.component,{[eB.default.isOutside]:s},"disableContentBlocksStyles"),children:[(0,o.jsx)("picture",{className:eB.default.image,children:m&&(0,o.jsx)("img",{loading:"lazy",src:m,alt:h})}),(0,o.jsxs)("div",{className:eB.default.body,children:[h&&(0,o.jsx)("div",{style:k,className:eB.default.title,dangerouslySetInnerHTML:{__html:h}}),_&&(0,o.jsx)("div",{style:k,className:eB.default.description,dangerouslySetInnerHTML:{__html:eT(_)}}),(0,o.jsx)(v.Button,{target:"_blank",className:(0,p.default)(eB.default.button,`info-block-id-${n.id}`),variant:x||(S?"white":"primary"),as:"a",size:"s",onClick:e=>{e.preventDefault(),(0,G.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}__${a.NEXT_PUBLIC_BASE_URL}${i}`,eventActionType:G.DataLayerActionType.button,eventActionText:h||"",eventLabel:c||""}),window.open(f,"_blank")},href:f,children:c})]})]})};e.s(["InfoBlock",0,eN],31484),e.s([],75727);var eL=e.i(37993),eO=e.i(22664),eG=e.i(27464);let eE={src:e.i(15182).default,width:210,height:132,blurWidth:8,blurHeight:5,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAsElEQVR42gGlAFr/AAAAAAA1Nzwdr7DCbb610HN+jNhJrsb5tKm563YyN1kXAAAAAAA8PkQgxcfajs27zJGrs+M5uMTwRJWe0i2QnMJhAAAAAAAMDQ4Gg4aPQtHY6D7S3/VN1ePwZtrh9EC+z/iHAAEBAQApKi4VhIiSRM7W60e42vNzstXRquHj71WjqLc2AAICAgF6fYlAl5yqpcjM2XvI1PNMy9PwYbrB4zaWmqk632NSU6nGL64AAAAASUVORK5CYII="},eW=(0,c.default)(()=>e.A(55632).then(({TaxCalculator:e})=>e),{loadableGenerated:{modules:[36680]}}),eR=(0,c.default)(()=>e.A(26922).then(({NavigatorContentSlider:e})=>e),{loadableGenerated:{modules:[31518]}}),eU=(0,c.default)(()=>e.A(97322).then(({NavigatorVideo:e})=>e),{loadableGenerated:{modules:[15047]}}),eP=(0,c.default)(()=>e.A(95537).then(({CreditsOffers:e})=>e),{loadableGenerated:{modules:[58451]}}),eH=(0,c.default)(()=>e.A(84216).then(({DebitCardsOffers:e})=>e),{loadableGenerated:{modules:[44446]}}),eM=(0,c.default)(()=>e.A(28880).then(({DepositsOffers:e})=>e),{loadableGenerated:{modules:[4612]}}),eD=(0,c.default)(()=>e.A(67513).then(({OsagoOffers:e})=>e),{loadableGenerated:{modules:[48172]}}),e$=(0,c.default)(()=>e.A(91063).then(({OsagoWidget:e})=>e),{loadableGenerated:{modules:[5076]}}),eF=(0,c.default)(()=>e.A(62477).then(({Survey:e})=>e),{loadableGenerated:{modules:[29877]}}),ez={info_bl:!0,osago:!0,deposits:!0,savings:!0,premium:!0,credits:!0,debit_cards:!0,post_offer:!0};e.s(["ContentBlocks",0,({env:e,className:t,data:s,params:a,post:l,tags:n})=>{let r=eS(),{NEXT_PUBLIC_S3_ASSETS:d,NEXT_PUBLIC_BASE_URL:i}=e,c=(0,u.useRef)(null),b=(0,u.useRef)(null),S=()=>c.current?.focus(),v=l?.filter_ids?.[0]||null,k=e=>{e.target&&"innerText"in e.target&&"string"==typeof e.target.innerText&&(0,G.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:G.DataLayerActionType.link,eventActionText:(0,W.translit)(`${e.target.innerText} text_novost`),eventLabel:""})};if((0,u.useEffect)(()=>{let e=b.current;if(!e)return;e.querySelectorAll("a").forEach(e=>{e.classList.contains("button")||/button/i.test(e.className)||e.addEventListener("mousedown",k)});let t=b.current;return()=>{t?.querySelectorAll("a").forEach(e=>{e.removeEventListener("mousedown",k)})}},[]),!Array.isArray(s))return null;let y=()=>{(0,f.submitPostLike)(e,l?.url||"")},C=(()=>{let t,p=[],f=1,b=0,k=0,C=ez[s[s.length-1]?.type||""],j=!1;if(s.forEach((e,a)=>{"header"===e.type&&(3==++b&&(s[a-1]?.type==="banner"&&(t=s.splice(a-1,1)),s[a+1]?.type==="banner"&&(t=s.splice(a+1,1))),t&&4===b&&s.splice(a,0,t[0])),"info_bl"===e.type&&e.data?.block?.title&&k++,"widget_osago"===e.type&&(j=!0)}),s.forEach((t,s)=>{switch(t.type){case"banner":a&&p.push((0,o.jsx)(ex,{config:r,params:a},s));break;case"header":t.data?.text&&p.push((0,o.jsx)("h2",{id:`${l?.id}_content_header_${f}`,dangerouslySetInnerHTML:{__html:eT(t.data.text)}},s)),f++;break;case"sub_header":t.data?.text&&p.push((0,o.jsx)("h3",{dangerouslySetInnerHTML:{__html:eT(t.data.text)}},s));break;case"paragraph":t.data?.text&&p.push((0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:eT(t.data.text)}},s));break;case"link":t.data?.text&&p.push((0,o.jsx)("div",{className:eG.default["block-link"],children:(0,o.jsxs)("a",{target:"_blank",href:t.data.url,rel:"noreferrer",children:[t.data.text,(0,o.jsx)(h.IconFdsArrowUpRightSmallO,{size:20})]})},s));break;case"dossier":t.data?.text&&p.push((0,o.jsxs)("div",{className:eG.default["dossier-date-item"],children:[(0,o.jsx)("span",{className:eG.default.date,children:t.data.year}),(0,o.jsx)("div",{className:eG.default.text,dangerouslySetInnerHTML:{__html:eT(t.data.text)}})]},s));break;case"html":t.data?.html&&p.push((0,o.jsx)("div",{className:eG.default["html-block"],dangerouslySetInnerHTML:{__html:(0,eO.insertRelToHtmlText)(eT(t.data.html))}},s));break;case"annotation":t.data?.text&&p.push((0,o.jsx)("div",{className:eG.default.annotation,dangerouslySetInnerHTML:{__html:(0,eO.insertRelToHtmlText)(eT(t.data.text))}},s));break;case"company-annotation":t.data?.text&&p.push((0,o.jsx)("div",{className:eG.default["company-annotation"],dangerouslySetInnerHTML:{__html:eT(t.data.text)}},s));break;case"keynote":t.data?.text&&p.push((0,o.jsx)("div",{className:eG.default["keynote-wrapper"],children:(0,o.jsx)("p",{className:eG.default.keynote,dangerouslySetInnerHTML:{__html:eT(t.data.text)}})},s));break;case"document-file":p.push((0,o.jsxs)(_.default,{className:eG.default["doc-file"],href:function(e,t=""){return e?e.startsWith("http")?e:`${t}/doc/post_docs/${e}`:""}(t?.data?.file),target:"_blank",children:[(0,o.jsx)(h.IconFile,{size:22}),(0,o.jsx)("label",{className:eG.default["doc-title"],children:t?.data?.title}),(0,o.jsx)(h.IconFdsChevronRightO,{size:22})]},s));break;case"table":t.data&&p.push((0,o.jsxs)("div",{className:eG.default["content-table-wrapper"],children:[t.data.title?(0,o.jsx)("h4",{children:t.data.title}):"",(0,o.jsx)("div",{className:eG.default["content-table-content"],dangerouslySetInnerHTML:{__html:(0,eO.insertRelToHtmlText)(t.data.html||"")}})]},s));break;case"image":t.data&&p.push((0,o.jsx)(ev.ContentImage,{env:e,imageFile:t.data.imageFile,imageCaption:t.data.imageCaption,imageData:t.data.imageData,className:eG.default["content-image"],imageClassName:eG.default["content-image-element"]},s));break;case"info_bl":p.push((0,o.jsx)(eN,{block:t.data.block},s));break;case"incoming-tax-calculator":p.push((0,o.jsx)(eW,{className:"disableContentBlocksStyles",assets:{desktop:`${d}/mp-assets/widgets/IncomeTaxCalculator/bannerWidget.png`,mobile:`${d}/mp-assets/widgets/IncomeTaxCalculator/bannerWidget.png`},bannerButtonUrl:t.data.url??""},s));break;case"osago":p.push((0,o.jsx)(eD,{small:!0},s));break;case"widget_osago":l?.id&&p.push((0,o.jsx)(e$,{id:l.id},s));break;case"deposits":p.push((0,o.jsx)(eM,{},s));break;case"savings":p.push((0,o.jsx)(eM,{savings:!0},s));break;case"premium":p.push((0,o.jsx)(eM,{premium:!0},s));break;case"credits":p.push((0,o.jsx)(eP,{},s));break;case"debit_cards":p.push((0,o.jsx)(eH,{},s));break;case"post_quote":t.data?.quote&&p.push((0,o.jsx)(x,{name:t.data.auth,position:t.data.position,img:t.data.imageData,quote:eT(t.data.quote)},s));break;case"post_offer":t.data&&p.push((0,o.jsxs)(u.default.Fragment,{children:[(1===t.data.type||12===t.data.type||13===t.data.type)&&(0,o.jsx)(eM,{content:{amount:t.data.amount,term:t.data.term},savings:12===t.data.type,premium:13===t.data.type},"depositsOffers"),2===t.data.type&&(0,o.jsx)(eP,{content:{amount:t.data.amount,term:t.data.term}},"creditsOffers"),11===t.data.type&&(0,o.jsx)(eH,{},"debitCardsOffers"),9===t.data.type&&!j&&(0,o.jsx)(eD,{small:!0},"osagoOffers")]},s));break;case"post_author":t.data?.name&&p.push((0,o.jsxs)("a",{className:eG.default.postAuthor,href:`/navigator/author/${t.data.url}`,target:"_self",children:[t.data.imageData&&(0,o.jsx)(m.default,{src:(0,e_.getImageUrl)(t.data.imageData,"original",i),alt:"portrait",width:48,height:48,unoptimized:!0}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{children:t.data.name}),(0,o.jsx)("span",{children:t.data.position})]})]},s));break;case"warning":t.data?.title&&p.push((0,o.jsxs)("div",{className:eG.default.warning,children:[(0,o.jsx)(h.IconFdsExclamationTriangleO,{size:22}),(0,o.jsxs)("div",{children:[(0,o.jsx)("label",{children:t.data.title}),(0,o.jsx)("span",{dangerouslySetInnerHTML:{__html:eT(t.data.text)}})]})]},s));break;case"mobile_app_banner":p.push((0,o.jsx)(ed.UiQrAd,{className:eG.default.qrAd,QrImage:({className:e})=>(0,o.jsx)(m.default,{alt:"qr",unoptimized:!0,src:g.default,className:e}),BgImage:({className:e})=>(0,o.jsx)(m.default,{alt:"qr",unoptimized:!0,src:eE,className:e})},s));break;case"poll":{let a=(0,eL.getShortUrl)(l?.url);t.data&&p.push((0,o.jsx)(eF,{env:e,data:t.data,postId:a,stats:l?.polls?.[t.data.key||""]},s));break}case"read_more":var n;p.push((0,o.jsx)(ef,{env:e,articles:Array.isArray(n=t.data)?n:Array.isArray(n?.articles)&&"fullUrl"in(n?.articles[0]||{})?n.articles.map(e=>(0,ey.parsePost)(e)):[]},s));break;case"slider":p.push((0,o.jsx)(eR,{env:e,data:t.data},s));break;case"video":p.push((0,o.jsx)(eU,{url:t.data.url,text:t.data.text},s))}}),(l?.ads_banner||0===k&&v)&&p.push((0,o.jsx)(eN,{env:e,block:l?.ads_banner,categoryId:v},"add-extra-banner")),l&&p.push((0,o.jsx)(er.PostActions,{socProps:{title:l.title,url:`/${l.url}`},comments:String(l.comments?.length||0),focusCommentsInput:S,likes:String(l.likes||0),submitLike:y},"author")),l?.comments){let t=l.url;p.push((0,o.jsx)(en,{env:e,postId:t,comments:l.comments,inputRef:c},"comments"))}let A=l?.tag_ids?.[0],w=n?.find(e=>e.id===A)?.url;return C||j||"navigator/zastrahovat"!==w||p.push((0,o.jsx)(eD,{small:!0},"osago")),C||"navigator/nakopit-i-sohranit"!==w&&"navigator/analitika"!==w||p.push((0,o.jsx)(eM,{},"deposits")),C||"navigator/kredity"!==w||p.push((0,o.jsx)(eP,{},"credits")),C||"6"!==w||p.push((0,o.jsx)(eH,{},"debit cards")),p})();return(0,o.jsx)("div",{ref:b,className:(0,p.default)(eG.default["content-blocks"],"content-blocks",t),children:C})}],7326),e.s([],8237)},92229,e=>{e.v({footnoteAnchor:"Footnote-module-scss-module__R5THkW__footnoteAnchor",footnoteTop:"Footnote-module-scss-module__R5THkW__footnoteTop",popup:"Footnote-module-scss-module__R5THkW__popup",shine:"Footnote-module-scss-module__R5THkW__shine"})},45757,56547,e=>{"use strict";var t=e.i(43476),s=e.i(71645);e.i(38886);var a=e.i(86969);e.i(75182);var l=e.i(64457),o=e.i(65018),n=e.i(92229);let r=/<([^>]+)>$/,d=e=>{let t=(e=>{let t=e.getAttribute("href");if(!t)return null;let s=decodeURIComponent(t).match(r);return s?.[1]||null})(e);return t?(e.dataset.pseudoContent=t,e.classList.add(n.default.footnoteAnchor),t):(delete e.dataset.pseudoContent,e.classList.remove(n.default.footnoteAnchor),e.classList.remove(n.default.footnoteTop),null)},i=(e,t)=>{if(!t||!(e instanceof Element))return null;let s=e.closest("a[href]");if(!(s instanceof HTMLAnchorElement)||!t.contains(s))return null;let a=d(s);return a?{anchorElement:s,text:a}:null};e.s(["Footnote",0,({articleRef:e})=>{let r=(0,o.useMedia)("lg"),[u,c]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let t=e.current;if(!t)return;let s=()=>{t.querySelectorAll("a[href]").forEach(d)},a=e=>{let s=i(e.target,t);if(!s)return;let a=s.anchorElement.getBoundingClientRect();s.anchorElement.classList.toggle(n.default.footnoteTop,a.bottom>window.innerHeight/2)},l=e=>{let s=i(e.target,t);s&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),c(s.text))};s();let o=new MutationObserver(s);return o.observe(t,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["href"]}),t.addEventListener("mouseover",a),t.addEventListener("click",l,!0),()=>{o.disconnect(),t.removeEventListener("mouseover",a),t.removeEventListener("click",l,!0)}},[]),(0,t.jsx)(a.Portal,{children:(0,t.jsx)(l.UiMobilePopup,{className:n.default.popup,isOpen:r&&!!u,onClose:()=>c(null),children:u})})}],56547),e.s([],45757)},99228,e=>{"use strict";e.s(["calcAbsTop",0,e=>{let t=0;do t+=e.offsetTop;while(e=e.offsetParent)return t},"scrollAnimation",0,(e,t)=>{let s=document.documentElement.scrollTop||document.body.scrollTop;t&&(s=t.scrollTop);let a=e-110*!t,l=a>s?a-s:s-a,o=0!==Math.round(l/25)?Math.round(l/25):1,n=a>s?s+o:s-o,r=0;if(a===s)return void setTimeout("window.scrollTo(0, "+a+")",10);if(a>s){for(let e=s;e<a;e+=o)t?setTimeout(function(){t.scrollTop+=o},10*r):setTimeout("window.scrollTo(0, "+n+")",10*r),(n+=o)>a&&(n=a),r++;return}for(let e=s;e>a;e-=o)t?setTimeout(function(){t.scrollTop-=o},10*r):setTimeout("window.scrollTo(0, "+n+")",10*r),(n-=o)<a&&(n=a),r++}])}]);