(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(7670);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(7670),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(34348);var v=e.i(47611);e.i(881);var k=e.i(43748),S=e.i(62798),y=e.i(97209);let j=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},A=e=>{let t,s=(0,y.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(!j(a))return e;let l=j(t=a.authz_attrs)?C(t.given_name):null;return l||C(a.given_name)||e};var w=e.i(11615),I=e.i(52918);let T=new Map,N=()=>{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=T.get(a);if(l)return l;let o=(0,w.exchangeCallbackToken)({tokenUrl:e,refreshToken:t,redirectUri:s,grantType:"refresh_token"}).then(e=>e.ok?((0,y.saveCallbackTokens)(e.data),e.data.access_token):(I.appCookie.removeItem("refresh_token"),null)).catch(()=>(I.appCookie.removeItem("refresh_token"),null)).finally(()=>{T.delete(a)});return T.set(a,o),o},L=async(e,t,s,a={})=>{let{ignoreCustomerIdCookie:l=!1}=a,o=l?null:I.appCookie.getItem("auth.gtm_customer_id");if(o)return o;if(!e)return null;let n=(0,y.getSavedAccessToken)();if(n)return n;let r=I.appCookie.getItem("refresh_token");return r&&t&&s?B(t,r,s):null},O=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,N,"getCurrentCommentAuthCookieUserId",0,L,"subscribeToCommentAuthCookieChange",0,O],29151);var G=e.i(5081),E=e.i(59260),R=e.i(231),W=e.i(37819);let U=["#5bce95","#ff696b","#c8df77","#ffb74d","#81d4fa","#aed581","#f06292","#4db6ac","#9575cd","#7986cb","#64b5f6","#4fc3f7","#4dd0e1","#4db6ac","#81c784","#dce775","#fff176","#ffd54f","#ffb74d","#ff8a65"],P="unsent_comments",$="comments_should_send_after_auth",H=()=>R.appLocalStorage.getItem(P)||{},M=e=>!0===(R.appLocalStorage.getItem($)||{})[String(e)];var D=e.i(24734),F=e.i(18524);let z=async()=>{try{let e=await F.CmsService.getLayoutData("LoginWidget");return e?.custom||null}catch{return null}};e.i(38886);var X=e.i(86969);e.i(75182);var q=e.i(64457),K=e.i(65018),Q=e.i(79335),V=e.i(99008);let Y="Войдите, чтобы отправить комментарий",J=({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:V.default.wrapper,children:(0,o.jsxs)("div",{className:V.default.tooltip,children:[(0,o.jsx)("div",{children:Y}),(0,o.jsx)(v.Button,{as:"a",label:"Войти",href:n,target:"_self",onClick:()=>{(0,E.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:E.DataLayerActionType.button,eventActionText:(0,W.translit)("войти"),eventLabel:""})}})]})})}):(0,o.jsx)(X.Portal,{children:(0,o.jsx)("div",{className:"disableContentBlocksStyles",children:(0,o.jsxs)(q.UiMobilePopup,{className:V.default.mobilePopup,isOpen:e,onClose:t,hasCloseButton:!1,children:[(0,o.jsx)("div",{className:V.default.text,children:Y}),(0,o.jsx)(v.Button,{as:"a",label:"Войти",href:n,target:"_self"})]})})})};var Z=e.i(80844),ee=e.i(3315);e.i(89485);var et=e.i(22668),es=e.i(33329),ea=e.i(2404);let el=(0,e.i(54061).g)("checkbox"),eo=Object.freeze({checkbox:el,input:`${el}__input`,marker:`${el}__marker`,wrapper:`${el}__wrapper`,label:`${el}__label`,caption:`${el}__caption`,icon:`${el}__icon`,iconButton:`${el}__icon-button`,states:{error:`${el}--error`,disabled:`${el}--disabled`,inverted:`${el}--inverted`},sizes:{xs:`${el}--xs`,s:`${el}--s`,m:`${el}--m`},variants:{primary:`${el}--primary`,secondary:`${el}--secondary`}}),en=(0,u.forwardRef)(({value:e=!1,variant:t="primary",state:s="default",label:a,disabled:l=!1,caption:n,className:r,icon:d,withIcon:i=!1,size:c="m",style:m,inverted:_=!1,children:h,inputRef:f,dataQa:g,dataId:b,onChange:x,onIconClick:v,...k},S)=>{let[y,j]=(0,et.u)(!1,e),C=(0,u.useId)(),A=h||a;return(0,o.jsxs)("label",{ref:S,htmlFor:C,"data-marker-label":"",className:(0,p.default)(r,eo.checkbox,{[eo.states.inverted]:_,[eo.states.disabled]:l,[eo.states.error]:"error"===s,[eo.sizes[c]]:!0,[eo.variants[t]]:!0}),style:m,"data-id":b,"data-qa":g,children:[(0,o.jsx)("input",{id:C,ref:f,value:String(y),className:eo.input,type:"checkbox","aria-invalid":"error"===s,disabled:l,onChange:e=>{let t="string"==typeof y?!!y:!y;j(t),null==x||x(t,e)},...k}),(0,o.jsx)("span",{className:eo.marker,children:(0,o.jsx)(es.C,{type:"checkbox",checked:y,inverted:_,state:s,disabled:l})}),A&&(0,o.jsxs)("span",{className:eo.wrapper,children:[(0,o.jsx)("span",{className:(0,p.default)(eo.label),children:A}),n&&(0,o.jsx)(ee.C,{className:eo.caption,withoutIcon:!0,children:n})]}),i&&(0,o.jsx)("button",{type:"button",className:(0,p.default)(eo.iconButton),onClick:l?void 0:v,children:(0,o.jsx)(ea.P,{className:(0,p.default)(eo.icon),children:d?(0,o.jsx)(o.Fragment,{children:d}):(0,o.jsx)(Z.S,{})})})]})});en.displayName="Checkbox";var er=e.i(23179);e.i(47694);var ed=e.i(20152);let ei=[{label:"По дате",value:"date"},{label:"По популярности",value:"likes",shortLabel:"По лайкам"}],eu=({onChangeSort:e,isIncreaseSort:t})=>(0,o.jsxs)("div",{className:(0,p.default)(ed.default.sortTypeHead),children:[(0,o.jsx)("button",{style:{marginLeft:"0px",marginRight:"8px"},className:(0,p.default)(ed.default.sortTypeButton),onClick:e,children:t?(0,o.jsx)(h.IconFdsSortDescendingO,{size:22}):(0,o.jsx)(h.IconFdsSortAscendingO,{size:22})}),"Сортировать"]}),ec=({isIncreaseSort:e,setIsIncreaseSort:t,sortType:s,setSortType:a,chipView:l,className:n})=>{let r=ei.find(e=>e.value===s),d=(0,u.useCallback)(()=>{t(e=>(R.appLocalStorage.setItem("comments_sort",JSON.stringify(!e)),!e))},[t]),i=(0,u.useCallback)(e=>{let t=ei.find(t=>t.value===e);t&&(R.appLocalStorage.setItem("comments_sort_type",JSON.stringify(t.value)),a(t.value))},[a]);return(0,o.jsxs)("div",{className:(0,p.default)(ed.default.wrapper,n,{[ed.default.chip]:l}),children:[(0,o.jsx)("button",{className:(0,p.default)(ed.default.icon,ed.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)(er.D,{children:[(0,o.jsx)(er.h,{children:(0,o.jsx)("div",{role:"button",className:(0,p.default)(ed.default.text,ed.default.actionButton),"data-qa":s,children:r?.shortLabel||r?.label||"Сортировка"})}),(0,o.jsxs)(er.a,{children:[(0,o.jsx)(eu,{onChangeSort:d,isIncreaseSort:e}),(0,o.jsx)(er.c,{}),ei.map(e=>(0,o.jsx)("div",{"data-qa":`${e.value}_radio`,className:ed.default.sortType,children:(0,o.jsx)(en,{onChange:()=>{i(e.value)},value:e.value===s,label:e.label})},e.value))]})]})]})};var em=e.i(1177);let e_="Гость",eh=(0,c.default)(()=>e.A(55589).then(({AuthWidgetModal:e})=>e),{loadableGenerated:{modules:[35651]}}),ep=async({isCallbackPageEnabled:e,ignoreCustomerIdCookie:t,tokenUrl:s,redirectUri:a})=>{let l=await L(e,s,a,{ignoreCustomerIdCookie:t});return l||(e?null:R.appLocalStorage.getItemRaw("partialAuth")||N())},ef=({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),[y,j]=(0,u.useState)(!1),[C,w]=(0,u.useState)(!1),[I,T]=(0,u.useState)(!1),[N,B]=(0,u.useState)(!1),[L,F]=(0,u.useState)(!1),X=(0,u.useRef)(!1),[q,K]=(0,u.useState)(!1),[Q,V]=(0,u.useState)("date"),Y="false"!==String(e.NEXT_PUBLIC_COMMENTS_AUTH_WIDGET_ENABLED),Z="false"!==String(e.NEXT_PUBLIC_CALLBACK_PAGE_ENABLED),ee="false"!==String(e.NEXT_PUBLIC_COMMENTS_AUTH_HIDDEN_IFRAME_ENABLED),et=`${e.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL}/token`,es=`${window.location.origin}/callback`,ea=(({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 z(),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:ee,endpoint:`${e.NEXT_PUBLIC_AUTH_WIDGET_SSO_TOKEN_URL}/auth`,redirectUri:es});(0,u.useEffect)(()=>{let e=H()[String(t)]||"",s=M(t);r(e),B(s),K(!0===R.appLocalStorage.getItem("comments_sort")),V(R.appLocalStorage.getItem("comments_sort_type")||"date"),ep({isCallbackPageEnabled:Z,ignoreCustomerIdCookie:ee,tokenUrl:et,redirectUri:es}).then(e=>{x(e)})},[es,et,Z,ee,t]);let el=[...l].sort((e,t)=>q&&"likes"===Q?new Date(t.date_created).getTime()-new Date(e.date_created).getTime():q||"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()),eo=el.length-c,en=(0,S.pluralize)(eo,"комментарий","комментария","комментариев"),er=(0,u.useCallback)(()=>{let e;e=R.appLocalStorage.getItem($)||{},delete e[String(t)],R.appLocalStorage.setItem($,JSON.stringify(e)),B(!1)},[t]),ed=(0,u.useCallback)(()=>{let e;(e=R.appLocalStorage.getItem($)||{})[String(t)]=!0,R.appLocalStorage.setItem($,JSON.stringify(e)),B(!0)},[t]),ei=(0,u.useCallback)(async()=>{let e=await ep({isCallbackPageEnabled:Z,ignoreCustomerIdCookie:ee,tokenUrl:et,redirectUri:es});e&&(x(e),w(!1),T(!1),B(M(t)))},[es,et,Z,ee,t]),eu=(0,u.useCallback)(async s=>{let a,l,o,d,u,c,m,_;if(!n)return!1;let h=A(e_);if(!await (0,f.submitPostComment)(e,t,s,h,n,"send"))return!1;let p={id:(0,G.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)],R.appLocalStorage.setItem(P,JSON.stringify(_)),er(),!0},[er,e,n,t]),ef=(0,u.useCallback)(async(s=b)=>{if(s&&n&&!X.current){X.current=!0,F(!0);try{let a=A(e_);if(await (0,f.submitPostComment)(e,t,s,a,n,"validate")){let e=await eu(s);g(!e),e||er();return}g(!0),er()}catch{return}finally{X.current=!1,F(!1)}}},[er,b,e,eu,n,t]),eg=(0,u.useCallback)(()=>{w(!1),er()},[er]),eb=(0,u.useCallback)(()=>!!R.appLocalStorage.getItemRaw("comments_auth_callback_token_failed")&&(R.appLocalStorage.removeItem("comments_auth_callback_token_failed"),eg(),T(!0),!0),[eg]);(0,u.useEffect)(()=>{eb()||ei();let e=()=>{eb()||ei()},t=()=>{"visible"===document.visibilityState&&e()},s=O(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()}},[eb,ei]),(0,u.useEffect)(()=>{if(N&&b&&!X.current){if(!M(t))return void B(!1);if(!n)return void er();ef(b)}},[er,b,ef,n,t,N]);let ex=async()=>{if(!n)return;let e=await ep({isCallbackPageEnabled:Z,ignoreCustomerIdCookie:ee,tokenUrl:et,redirectUri:es});if(x(e),!e){ea(),ed(),T(!1),Y?w(!0):j(!0),(0,E.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:E.DataLayerActionType.button,eventActionText:(0,W.translit)("войти"),eventLabel:""});return}await ef(e)};return(0,o.jsxs)("div",{id:`comments${t}`,className:em.default.wrapper,children:[(0,o.jsxs)("div",{className:em.default.header,children:[(0,o.jsxs)("div",{className:em.default.title,children:[(0,o.jsx)("label",{children:"Комментарии"}),(0,o.jsx)("span",{children:el.length})]}),(0,o.jsx)(ec,{isIncreaseSort:q,setIsIncreaseSort:K,sortType:Q,setSortType:V})]}),(0,o.jsxs)("div",{className:em.default.formBlock,children:[(0,o.jsxs)("div",{className:em.default.form,children:[(0,o.jsx)(k.InputBase,{ref:a,size:"l",className:em.default.input,label:"Написать комментарий",value:n,onClick:()=>{(0,E.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:E.DataLayerActionType.click_field,eventActionText:(0,W.translit)("написать комментарий"),eventLabel:""})},onChange:e=>{let s;r(e),_&&e&&g(!1),I&&T(!1),(s=H())[String(t)]=e,R.appLocalStorage.setItem(P,JSON.stringify(s))}}),(0,o.jsx)(v.Button,{className:em.default.submitBtn,size:"s",disabled:!n||L||!Y&&y,onClick:ex,shape:"circle-icon",iconLeft:(0,o.jsx)(h.IconFdsArrowUpSmallO,{size:36})}),!Y&&(0,o.jsx)(J,{isOpen:y,onClose:()=>j(!1),postId:t})]}),_&&(0,o.jsxs)("div",{className:em.default.caption,children:["Не допускается использование ненормативной лексики. ",(0,o.jsx)("br",{}),"Отредактируйте комментарий и попробуйте снова."]}),!_&&I&&(0,o.jsx)("div",{className:em.default.caption,children:"Авторизация не удалась."}),!!d.length&&!_&&!I&&(0,o.jsxs)("div",{className:em.default.caption,children:["Спасибо, что оставили комментарий. ",(0,o.jsx)("br",{}),"После модерации вы сможете увидеть его на странице"]})]}),!!el.length&&(0,o.jsx)("div",{className:em.default.comments,children:el.slice(0,c).map(e=>{let t,s,a,l,n,r,d,i="1"===e.user_id?e_:e.user_id,u=e.user_name||e_;return(0,o.jsxs)("div",{className:em.default.comment,children:[(0,o.jsx)("div",{className:em.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)))%U.length,U[t])},children:u.slice(0,1)}),(0,o.jsxs)("div",{children:[(0,o.jsxs)("div",{className:em.default.commentHeaderText,children:[(0,o.jsx)("div",{className:em.default.author,children:u}),(0,o.jsx)("div",{className:em.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:em.default.commentBody,children:e.comment}),(0,o.jsxs)("div",{className:em.default.commentControls,children:[(0,o.jsxs)("div",{className:em.default.unit,children:[(0,o.jsx)(h.IconFdsThumbUpO,{}),(0,o.jsx)("span",{children:"23"})]}),(0,o.jsxs)("div",{className:(0,p.default)(em.default.unit,em.default.dislike),children:[(0,o.jsx)(h.IconFdsThumbDownO,{}),(0,o.jsx)("span",{children:"23"})]}),(0,o.jsx)("div",{className:(0,p.default)(em.default.unit,em.default.replyBtn),children:"Ответить"})]})]})]},e.id)})}),c<el.length&&(0,o.jsxs)("div",{className:em.default.more,onClick:()=>m(e=>e+eo),children:[`Еще ${eo} ${en}`,(0,o.jsx)("span",{children:(0,o.jsx)(h.IconFdsChevronDownSmallO,{size:24})})]}),Y&&C&&(0,o.jsx)(eh,{env:e,isOpen:C,onClose:eg,postId:t,onAuthSuccess:e=>{e&&(x(e),w(!1),T(!1),B(M(t)))}})]})};e.i(47449);var eg=e.i(53337);e.i(47865);var eb=e.i(39002),ex=e.i(45106),ev=e.i(12377);e.i(72745);var ek=e.i(46176),eS=e.i(96934),ey=e.i(80453),ej=e.i(94341),eC=e.i(75331);let eA=({env:e,articles:t})=>t.length?(0,o.jsxs)("div",{className:(0,p.default)(eC.default.wrapper,"disableContentBlocksStyles"),children:[(0,o.jsx)("h2",{className:eC.default.blockTitle,children:"Читайте также"}),t.map(t=>(0,o.jsx)(ew,{env:e,data:t},t.id))]}):null,ew=({env:e,data:t})=>{let s=(0,ek.useLikes)(t?.url,t?.likes);return(0,o.jsxs)("a",{className:eC.default.card,href:`/${t?.url}`,target:"_self",children:[(0,o.jsx)("div",{className:eC.default.imageWrapper,children:(0,o.jsx)("div",{className:eC.default.image,style:t?.image?.file?{backgroundImage:`url(${(0,ey.getImageUrl)(t?.image?.file,"small",e.NEXT_PUBLIC_BASE_URL)})`}:{}})}),(0,o.jsxs)("div",{className:eC.default.container,children:[(0,o.jsx)("div",{className:eC.default.title,children:t?.title}),(0,o.jsxs)("div",{className:eC.default.icons,children:[!!s&&(0,o.jsxs)("div",{className:eC.default.unit,children:[(0,o.jsx)(m.default,{src:ev.default,alt:"likes",unoptimized:!0}),s]}),(0,o.jsxs)("div",{className:eC.default.unit,children:[(0,o.jsx)(m.default,{src:ex.default,alt:"views",unoptimized:!0}),(0,o.jsx)("span",{suppressHydrationWarning:!0,children:(0,ej.getPostViews)(t?.url||"",t?.views||0,0)})]}),(0,o.jsx)("div",{className:eC.default.unit,children:(0,o.jsx)("span",{children:(0,eS.formatDate)(String(t?.public_date||t?.update_time||t?.publ_time),!0)})})]})]})]})};var eI=e.i(61167);let eT=({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,G.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&&eI.default.hide,s),ref:i,id:`adfox_${r}`},r),l&&t]})};e.s(["YaAdFoxBanner",0,eT],81230),e.s([],64619);let eN=()=>{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,eN],46660),e.i(52919);var eB=e.i(65854),eL=e.i(82372),eO=e.i(88195);let eG={BUTTON:"withButton",FORM:"withForm"},eE=e=>e&&"createdAt"in e?{...e,image_mobile:e.imageMobile,type:eG[e.type],button_text:e.buttonText}:e,eR=async e=>{let t=await (0,eL.callApi)({url:`/api/v1/product-banners?page=0&limit=100&categoryNavigator=${e}`,options:{isMpScApi:!0}});return{data:{blocks:t?.data?.banners?.map(eE)||[]}}};e.i(59309);var eW=e.i(95782);let eU=["а-ля","без","безо","в","вне","во","для","до","за","и","из","из-за","из-под","изо","к","ко","меж","на","над","не","ниже","о","об","обо","от","ото","по","под","пред","предо","при","про","ради","с","со","у"],eP=e=>{if("string"!=typeof e)return"";let t=e.replace(/\s\s+/g," ");return eU.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,eP],50056);var e$=e.i(13168);let eH=({block:e,categoryId:t,isOutside:s})=>{let a=(0,r.getEnvValue)(),l=eE(e),[n,d]=(0,u.useState)(l),{asPath:i}=(0,eW.useRouter)();if((0,u.useEffect)(()=>{a&&!l&&t&&eR(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,k=g?{background:g}:void 0,S=b?{color:b}:k?{color:"var(--color-white)"}:void 0;return(0,o.jsxs)("div",{style:k,className:(0,p.default)(e$.default.component,{[e$.default.isOutside]:s},"disableContentBlocksStyles"),children:[(0,o.jsx)("picture",{className:e$.default.image,children:m&&(0,o.jsx)("img",{loading:"lazy",src:m,alt:h})}),(0,o.jsxs)("div",{className:e$.default.body,children:[h&&(0,o.jsx)("div",{style:S,className:e$.default.title,dangerouslySetInnerHTML:{__html:h}}),_&&(0,o.jsx)("div",{style:S,className:e$.default.description,dangerouslySetInnerHTML:{__html:eP(_)}}),(0,o.jsx)(v.Button,{target:"_blank",className:(0,p.default)(e$.default.button,`info-block-id-${n.id}`),variant:x||(k?"white":"primary"),as:"a",size:"s",onClick:e=>{e.preventDefault(),(0,E.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}__${a.NEXT_PUBLIC_BASE_URL}${i}`,eventActionType:E.DataLayerActionType.button,eventActionText:h||"",eventLabel:c||""}),window.open(f,"_blank")},href:f,children:c})]})]})};e.s(["InfoBlock",0,eH],31484),e.s([],75727);var eM=e.i(37993),eD=e.i(24301),eF=e.i(27464);let ez={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="},eX=(0,c.default)(()=>e.A(55632).then(({TaxCalculator:e})=>e),{loadableGenerated:{modules:[36680]}}),eq=(0,c.default)(()=>e.A(26922).then(({NavigatorContentSlider:e})=>e),{loadableGenerated:{modules:[31518]}}),eK=(0,c.default)(()=>e.A(97322).then(({NavigatorVideo:e})=>e),{loadableGenerated:{modules:[15047]}}),eQ=(0,c.default)(()=>e.A(95537).then(({CreditsOffers:e})=>e),{loadableGenerated:{modules:[58451]}}),eV=(0,c.default)(()=>e.A(84216).then(({DebitCardsOffers:e})=>e),{loadableGenerated:{modules:[44446]}}),eY=(0,c.default)(()=>e.A(28880).then(({DepositsOffers:e})=>e),{loadableGenerated:{modules:[4612]}}),eJ=(0,c.default)(()=>e.A(67513).then(({OsagoOffers:e})=>e),{loadableGenerated:{modules:[48172]}}),eZ=(0,c.default)(()=>e.A(91063).then(({OsagoWidget:e})=>e),{loadableGenerated:{modules:[5076]}}),e0=(0,c.default)(()=>e.A(62477).then(({Survey:e})=>e),{loadableGenerated:{modules:[29877]}}),e1={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=eN(),{NEXT_PUBLIC_S3_ASSETS:d,NEXT_PUBLIC_BASE_URL:i}=e,c=(0,u.useRef)(null),b=(0,u.useRef)(null),v=()=>c.current?.focus(),k=l?.filter_ids?.[0]||null,S=e=>{e.target&&"innerText"in e.target&&"string"==typeof e.target.innerText&&(0,E.newHandelDataLayerPush)({eventCategory:`${(0,W.translit)("журнал")}_${location.pathname}`,eventActionType:E.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",S)});let t=b.current;return()=>{t?.querySelectorAll("a").forEach(e=>{e.removeEventListener("mousedown",S)})}},[]),!Array.isArray(s))return null;let y=()=>{(0,f.submitPostLike)(e,l?.url||"")},j=(()=>{let t,p=[],f=1,b=0,S=0,j=e1[s[s.length-1]?.type||""],C=!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&&S++,"widget_osago"===e.type&&(C=!0)}),s.forEach((t,s)=>{switch(t.type){case"banner":a&&p.push((0,o.jsx)(eT,{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:eP(t.data.text)}},s)),f++;break;case"sub_header":t.data?.text&&p.push((0,o.jsx)("h3",{dangerouslySetInnerHTML:{__html:eP(t.data.text)}},s));break;case"paragraph":t.data?.text&&p.push((0,o.jsx)("div",{dangerouslySetInnerHTML:{__html:eP(t.data.text)}},s));break;case"link":t.data?.text&&p.push((0,o.jsx)("div",{className:eF.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:eF.default["dossier-date-item"],children:[(0,o.jsx)("span",{className:eF.default.date,children:t.data.year}),(0,o.jsx)("div",{className:eF.default.text,dangerouslySetInnerHTML:{__html:eP(t.data.text)}})]},s));break;case"html":t.data?.html&&p.push((0,o.jsx)("div",{className:eF.default["html-block"],dangerouslySetInnerHTML:{__html:(0,eD.insertRelToHtmlText)(eP(t.data.html))}},s));break;case"annotation":t.data?.text&&p.push((0,o.jsx)("div",{className:eF.default.annotation,dangerouslySetInnerHTML:{__html:(0,eD.insertRelToHtmlText)(eP(t.data.text))}},s));break;case"company-annotation":t.data?.text&&p.push((0,o.jsx)("div",{className:eF.default["company-annotation"],dangerouslySetInnerHTML:{__html:eP(t.data.text)}},s));break;case"keynote":t.data?.text&&p.push((0,o.jsx)("div",{className:eF.default["keynote-wrapper"],children:(0,o.jsx)("p",{className:eF.default.keynote,dangerouslySetInnerHTML:{__html:eP(t.data.text)}})},s));break;case"document-file":p.push((0,o.jsxs)(_.default,{className:eF.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:eF.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:eF.default["content-table-wrapper"],children:[t.data.title?(0,o.jsx)("h4",{children:t.data.title}):"",(0,o.jsx)("div",{className:eF.default["content-table-content"],dangerouslySetInnerHTML:{__html:(0,eD.insertRelToHtmlText)(t.data.html||"")}})]},s));break;case"image":t.data&&p.push((0,o.jsx)(eB.ContentImage,{env:e,imageFile:t.data.imageFile,imageCaption:t.data.imageCaption,imageData:t.data.imageData,className:eF.default["content-image"],imageClassName:eF.default["content-image-element"]},s));break;case"info_bl":p.push((0,o.jsx)(eH,{block:t.data.block},s));break;case"incoming-tax-calculator":p.push((0,o.jsx)(eX,{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)(eJ,{small:!0},s));break;case"widget_osago":l?.id&&p.push((0,o.jsx)(eZ,{id:l.id},s));break;case"deposits":p.push((0,o.jsx)(eY,{},s));break;case"savings":p.push((0,o.jsx)(eY,{savings:!0},s));break;case"premium":p.push((0,o.jsx)(eY,{premium:!0},s));break;case"credits":p.push((0,o.jsx)(eQ,{},s));break;case"debit_cards":p.push((0,o.jsx)(eV,{},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:eP(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)(eY,{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)(eQ,{content:{amount:t.data.amount,term:t.data.term}},"creditsOffers"),11===t.data.type&&(0,o.jsx)(eV,{},"debitCardsOffers"),9===t.data.type&&!C&&(0,o.jsx)(eJ,{small:!0},"osagoOffers")]},s));break;case"post_author":t.data?.name&&p.push((0,o.jsxs)("a",{className:eF.default.postAuthor,href:`/navigator/author/${t.data.url}`,target:"_self",children:[t.data.imageData&&(0,o.jsx)(m.default,{src:(0,ey.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:eF.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:eP(t.data.text)}})]})]},s));break;case"mobile_app_banner":p.push((0,o.jsx)(eb.UiQrAd,{className:eF.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:ez,className:e})},s));break;case"poll":{let a=(0,eM.getShortUrl)(l?.url);t.data&&p.push((0,o.jsx)(e0,{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)(eA,{env:e,articles:Array.isArray(n=t.data)?n:Array.isArray(n?.articles)&&"fullUrl"in(n?.articles[0]||{})?n.articles.map(e=>(0,eO.parsePost)(e)):[]},s));break;case"slider":p.push((0,o.jsx)(eq,{env:e,data:t.data},s));break;case"video":p.push((0,o.jsx)(eK,{url:t.data.url,text:t.data.text},s))}}),(l?.ads_banner||0===S&&k)&&p.push((0,o.jsx)(eH,{env:e,block:l?.ads_banner,categoryId:k},"add-extra-banner")),l&&p.push((0,o.jsx)(eg.PostActions,{socProps:{title:l.title,url:`/${l.url}`},comments:String(l.comments?.length||0),focusCommentsInput:v,likes:String(l.likes||0),submitLike:y},"author")),l?.comments){let t=l.url;p.push((0,o.jsx)(ef,{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 j||C||"navigator/zastrahovat"!==w||p.push((0,o.jsx)(eJ,{small:!0},"osago")),j||"navigator/nakopit-i-sohranit"!==w&&"navigator/analitika"!==w||p.push((0,o.jsx)(eY,{},"deposits")),j||"navigator/kredity"!==w||p.push((0,o.jsx)(eQ,{},"credits")),j||"6"!==w||p.push((0,o.jsx)(eV,{},"debit cards")),p})();return(0,o.jsx)("div",{ref:b,className:(0,p.default)(eF.default["content-blocks"],"content-blocks",t),children:j})}],7326),e.s([],8237)},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++}])},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=(e=>{try{return decodeURIComponent(e)}catch{return e}})(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)}]);