(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[679],{3335:function(e,t,n){"use strict";n.d(t,{n:function(){return w}});var r=n(5893),i=n(4588),s=n(6010),o=n(7057),a=n.n(o),c=n(3454),l=n(1997),u=n(2864),p=n(7771),v=n(8621),d=n.n(v);let _=e=>{let{post:t,isGray:n,isFirst:i}=e;return(0,r.jsx)("a",{className:(0,s.Z)(d().wrapper),href:"/".concat(t.url),children:(0,r.jsxs)("div",{className:(0,s.Z)(d().post,{[d().gray]:n,[d().pinned]:t.pinned&&i}),onMouseUpCapture:e=>{e.preventDefault();let t=e.currentTarget,n=t.getAttribute("data-title"),r=t.getAttribute("data-url");(0,u.I)({eventCategory:"".concat((0,p.b)("журнал"),"_").concat(r),eventActionType:u.i.card,eventActionText:(0,p.b)("block ".concat(c.title)),eventLabel:(0,p.b)(null!=n?n:"")})},"data-url":"/".concat(t.url),"data-title":t.title,children:[(0,r.jsx)("div",{className:d().title,children:t.title}),(0,r.jsx)("div",{className:d().date,children:(0,l.p6)(String(t.date_pub||t.public_date||t.update_time||t.publ_time),!0)}),(0,r.jsx)("div",{className:d().tag,children:"Важное"})]})})},f=e=>{let{posts:t,isGray:n}=e;return(0,r.jsx)("div",{className:a().wrapper,children:(0,r.jsx)("div",{className:a().grid,children:t.map((e,t)=>(0,r.jsx)(_,{isGray:n,post:e,isFirst:0===t},e.id))})})};var h=n(9194),m=n(6268),b=n.n(m);let g=e=>{let{dir:t,onClick:n,className:i}=e,o="left"===t?h.IconFdsChevronLeftO:h.IconFdsChevronRightO;return(0,r.jsx)("button",{onClick:n,className:(0,s.Z)(b().wrapper,i),children:(0,r.jsx)(o,{size:24})})};var y=n(7294),x=n(8283),N=n.n(x);let S=e=>{let{isGray:t,posts:n,className:o}=e,[a,c]=(0,y.useState)(!1);return(0,r.jsxs)("div",{className:(0,s.Z)(N().wrapper,o),children:[n.slice(0,a?n.length:3).map((e,n)=>(0,r.jsx)(_,{isFirst:0===n,post:e,isGray:t},e.id)),!a&&n.length>3&&(0,r.jsx)(i.zx,{label:"Показать еще",variant:"secondary",onClick:()=>c(!0)})]})};var j=n(90),L=n.n(j);let w=e=>{let{title:t,data:n,isGray:o,className:a}=e,c=e=>()=>{(0,u.I)({eventCategory:"".concat((0,p.b)("журнал"),"_").concat(location.pathname),eventActionType:u.i.slider,eventActionText:(0,p.b)("".concat(e," block ").concat(t))})},l=k(n),v=l.reduce((e,t)=>{let n=e[e.length-1];return n.length<6?n.push(t):e.push([t]),e},[[]]);return(0,r.jsxs)("div",{className:(0,s.Z)(L().wrapper,a),children:[(0,r.jsxs)("div",{className:L().titleWrapper,children:[(0,r.jsx)("h2",{className:L().title,children:t}),(0,r.jsxs)("div",{className:(0,s.Z)(L().navigation,L().hideOnMobile),children:[(0,r.jsx)(g,{onClick:c("лево"),dir:"left",className:"navigator-slider-button-prev"}),(0,r.jsx)(g,{onClick:c("право"),dir:"right",className:"navigator-slider-button-next"})]})]}),(0,r.jsx)(S,{className:L().hideOnDesktop,isGray:o,posts:l}),(0,r.jsx)(i.iR,{className:(0,s.Z)(L().slider,L().hideOnMobile),options:{loop:!0,navigation:{nextEl:".navigator-slider-button-next",prevEl:".navigator-slider-button-prev"}},children:v.map((e,t)=>(0,r.jsx)(i.wI,{children:(0,r.jsx)(f,{posts:e,isGray:o})},t))})]})},k=e=>{let t=e.findIndex(e=>e.pinned);return t>=0&&e.unshift(...e.splice(t,1)),e}},1324:function(e,t,n){"use strict";n.d(t,{f:function(){return g}});var r=n(5893),i=n(4588),s=n(5675),o=n.n(s),a=n(7294),c=n(5293),l=n.n(c);let u=new(l()).EventEmitter;var p=n(2039),v=n(5621),d=n(136),_=n(7771);let f=e=>!!e&&/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e);var h=n(6480),m=n.n(h);let b=(0,p.b)(2e3),g=e=>{let{index:t=0}=e,n=(0,a.useRef)(null),[s,c]=(0,a.useState)(!1),[l,p]=(0,a.useState)(!1),[h,g]=(0,a.useState)(""),[y,x]=(0,a.useState)(""),[N,S]=(0,a.useState)(!1),j="Подпишитесь на нас";(0,a.useEffect)(()=>{u.on("event.subscribe",()=>{n.current&&(n.current.scrollIntoView({behavior:"smooth",block:"center"}),n.current.focus({preventScroll:!0}))})},[]);let L=!l&&!h;return(0,r.jsxs)("div",{className:m().block,children:[(0,r.jsxs)("div",{className:m().content,children:[(0,r.jsxs)("div",{className:m().text,children:[(0,r.jsx)("div",{className:m().title,children:j}),(0,r.jsx)("div",{className:m().subtitle,children:"Будем присылать только полезные статьи"})]}),L&&(0,r.jsxs)("div",{className:m().form,children:[(0,r.jsx)(i.MA,{className:m().input,label:"Электронная почта",variant:"secondary",size:"s",value:y,onChange:e=>{N&&S(!(f(e)||!e)),x(e)},onInput:()=>{let e=t>0?"_".concat(t):"";b(()=>{(0,v.l)({eventAction:"input_field_".concat((0,_.b)("электронная почта")).concat(e),eventLabel:"banner__".concat((0,_.b)(j)),event:"data-event",eventCategory:"".concat((0,_.b)("журнал"),"_").concat(location.pathname),eventValue:""})})},state:N?"error":void 0,caption:N?"Неверный e-mail":void 0}),(0,r.jsx)(i.zx,{className:m().button,label:"Подписаться",size:"s",onClick:()=>{S(!f(y)),f(y)&&(c(!0),(0,v.l)({eventAction:"click_button_".concat((0,_.b)("подписаться")).concat(t>0?"_".concat(t):""),eventLabel:"banner__".concat((0,_.b)(j)),event:"data-event",eventCategory:"".concat((0,_.b)("журнал"),"_").concat(location.pathname),eventValue:""}),fetch("https://forms.dashamail.ru/subscribe.php?list_id=56713Embedded",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({merge_:y})}).then(e=>{!e||200===e.status||e.ok?(d.A.setItem("subscribed","1"),p(!0)):g(409===e.status?'Кажется, вы уже подписаны на нашу рассылку. Если письма не приходят, рекомендуем обратиться в поддержу по телефону <span class="nowrap">8\xa0800\xa0505-32-32</span>.':401===e.status?"Неверный формат e-mail адреса":"Возникла ошибка, повторите попытку позднее")}).catch(()=>g("Возникла ошибка, повторите попытку позднее")))},disabled:N,pending:s})]}),l&&(0,r.jsx)("div",{className:m().success,children:"Подтвердите подписку по ссылке, отправленной на указанную электронную почту."}),h&&(0,r.jsx)("div",{className:m().error,dangerouslySetInnerHTML:{__html:h}})]}),(0,r.jsxs)("picture",{className:m().imgWrapper,children:[(0,r.jsx)("source",{media:"(max-width: 1023px)",srcSet:"/service-navigator/_next/static/media/subscribe-block-m.a67bc073.png"}),(0,r.jsx)(o(),{loading:"lazy",fill:!0,unoptimized:!0,className:m().imageBackground,src:"/service-navigator/_next/static/media/subscribe-block.50ea0574.png",alt:"bg"})]})]})}},5293:function(e){!function(){"use strict";var t={864:function(e){var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(n,r){function i(n){e.removeListener(t,s),r(n)}function s(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}f(e,t,s,{once:!0}),"error"!==t&&"function"==typeof e.on&&f(e,"error",i,{once:!0})})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){if(a(n),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),s=e._events),o=s[t]),void 0===o)o=s[t]=n,++e._eventsCount;else if("function"==typeof o?o=s[t]=r?[n,o]:[o,n]:r?o.unshift(n):o.push(n),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var i,s,o,l=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=o.length,console&&console.warn&&console.warn(l)}return e}function u(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function p(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=u.bind(r);return i.listener=n,r.wrapFn=i,i}function v(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):_(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function _(e,t){for(var n=Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else if("function"==typeof e.addEventListener)e.addEventListener(t,function i(s){r.once&&e.removeEventListener(t,i),n(s)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return c(this)},s.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,s=this._events;if(void 0!==s)i=i&&void 0===s.error;else if(!i)return!1;if(i){if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var o,a=Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var c=s[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else for(var l=c.length,u=_(c,l),n=0;n<l;++n)r(u[n],this,t);return!0},s.prototype.addListener=function(e,t){return l(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return l(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,p(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,p(this,e,t)),this},s.prototype.removeListener=function(e,t){var n,r,i,s,o;if(a(t),void 0===(r=this._events)||void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,s=n.length-1;s>=0;s--)if(n[s]===t||n[s].listener===t){o=n[s].listener,i=s;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0==arguments.length){var i,s=Object.keys(n);for(r=0;r<s.length;++r)"removeListener"!==(i=s[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},s.prototype.listeners=function(e){return v(this,e,!0)},s.prototype.rawListeners=function(e){return v(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},s.prototype.listenerCount=d,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var s=n[e]={exports:{}},o=!0;try{t[e](s,s.exports,r),o=!1}finally{o&&delete n[e]}return s.exports}r.ab="//";var i=r(864);e.exports=i}()},90:function(e){e.exports={title:"NavigatorSlider_title__Ad8QV",wrapper:"NavigatorSlider_wrapper__O_CMe",titleWrapper:"NavigatorSlider_titleWrapper__boWZS",navigation:"NavigatorSlider_navigation__KpxJT",slider:"NavigatorSlider_slider__xXEz_",hideOnMobile:"NavigatorSlider_hideOnMobile__r9tt0",hideOnDesktop:"NavigatorSlider_hideOnDesktop__2gJhn",shine:"NavigatorSlider_shine__BgxUf"}},7057:function(e){e.exports={wrapper:"NavigatorSliderItem_wrapper__oSeeF",grid:"NavigatorSliderItem_grid__1R5L3",shine:"NavigatorSliderItem_shine__2lQGj"}},6268:function(e){e.exports={wrapper:"NavigatorSliderNav_wrapper__fQfv8",shine:"NavigatorSliderNav_shine__iEHnc"}},8621:function(e){e.exports={wrapper:"NavigatorSliderPost_wrapper__FVfJH",post:"NavigatorSliderPost_post__FTlTY",postTitle:"NavigatorSliderPost_postTitle__BmA5j",gray:"NavigatorSliderPost_gray__kwupw",pinned:"NavigatorSliderPost_pinned__rCSTc",title:"NavigatorSliderPost_title__2yItc",date:"NavigatorSliderPost_date__zh7yd",tag:"NavigatorSliderPost_tag__ipdx6",shine:"NavigatorSliderPost_shine__39wRJ"}},8283:function(e){e.exports={wrapper:"NavigatorSliderPostList_wrapper__oulye",shine:"NavigatorSliderPostList_shine__uslYQ"}},6480:function(e){e.exports={block:"SubscribeBlock_block__o4i6j",content:"SubscribeBlock_content__aQrE6",text:"SubscribeBlock_text__PLOHz",title:"SubscribeBlock_title__2onML",subtitle:"SubscribeBlock_subtitle__vV0nZ",error:"SubscribeBlock_error__rp_Am",success:"SubscribeBlock_success__QuXrU",form:"SubscribeBlock_form__6MH0i",input:"SubscribeBlock_input__aodcq",button:"SubscribeBlock_button__SICcv",imgWrapper:"SubscribeBlock_imgWrapper__8K0Bu",imageBackground:"SubscribeBlock_imageBackground__35n2j",shine:"SubscribeBlock_shine___SuWF"}}}]);