(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[106],{3415:function(e,t){"use strict";t.Z={src:"/service-navigator/_next/static/media/bookmark.ce53ddec.svg",height:24,width:24,blurWidth:0,blurHeight:0}},5858:function(e,t,n){"use strict";n.d(t,{n:function(){return g}});var i=n(5893),r=n(4588),o=n(6010),s=n(5675),a=n.n(s),c=n(7294),l=n(3415),u=n(5619),d=n(938),p=n(4556),v=n(7071),h=n(1997),f=n(2864),_=n(7771),m=n(90),b=n.n(m);let g=e=>{let{containerRef:t,title:n,data:s,padding:m=0,gray:g}=e,x=(0,d.G)("lg"),[N,L]=(0,c.useState)(!0);(0,c.useEffect)(()=>{setTimeout(()=>{L(!1)},400)},[]);let{isDragged:S,isTouched:k,onMouseDown:j,onMouseMove:w,resetState:C}=(0,v.Q)(),B=e=>{e.preventDefault();let t=e.currentTarget,i=t.getAttribute("data-title"),r=t.getAttribute("data-url");(0,f.I)({eventCategory:"".concat((0,_.b)("журнал"),"_").concat(r),eventActionType:f.i.card,eventActionText:(0,_.b)("block ".concat(n)),eventLabel:(0,_.b)(null!=i?i:"")});let o=t.getAttribute("data-url");o&&!(S&&k)&&window.open(o,"_self")},[E,A]=(0,c.useState)(343-2*m);(0,p.y)(t,e=>{let t=e[0];E!==t.contentRect.width&&A(t.contentRect.width-2*m)});let[O,T]=(0,c.useState)(!1),M=y(s),R=M.reduce((e,t)=>{let n=e[e.length-1];return n.length<6?n.push(t):e.push([t]),e},[[]]);return x?(0,i.jsxs)("div",{className:(0,o.Z)(b().mobileWrapper,{[b().gray]:g}),children:[(0,i.jsx)("h2",{className:b().mobileTitle,children:n}),M.slice(0,O?M.length:3).map((e,t)=>(0,i.jsx)("a",{className:(0,o.Z)(b().post,{[b().pinned]:e.pinned&&0===t}),href:"/".concat(e.url),children:(0,i.jsxs)("div",{onMouseUpCapture:B,"data-url":"/".concat(e.url),"data-title":e.title,children:[(0,i.jsx)("div",{className:b().postTitle,children:e.title}),(0,i.jsx)("div",{className:b().postDate,children:(0,h.p6)(String(e.date_pub||e.public_date||e.update_time||e.publ_time),!0)}),(0,i.jsx)("div",{className:b().bookmark,children:(0,i.jsx)(a(),{src:l.Z,alt:"bookmark",unoptimized:!0})})]})},e.id)),!O&&M.length>3&&(0,i.jsx)(r.zx,{label:"Показать еще",variant:"secondary",onClick:()=>T(!0)})]}):(0,i.jsxs)("div",{className:b().wrapper,children:[(0,i.jsx)("div",{className:b().title,children:(0,i.jsx)("h2",{children:n})}),(0,i.jsx)(u.F,{onRightButtonClick:()=>{(0,f.I)({eventCategory:"".concat((0,_.b)("журнал"),"_").concat(location.pathname),eventActionType:f.i.slider,eventActionText:(0,_.b)("право block ".concat(n))})},onLeftButtonClick:()=>{(0,f.I)({eventCategory:"".concat((0,_.b)("журнал"),"_").concat(location.pathname),eventActionType:f.i.slider,eventActionText:(0,_.b)("лево block ".concat(n))})},width:E,height:x?354:416,spaceBetween:8,sliderPerView:1,hidePaginationControl:!x,classSliderWrapper:(0,o.Z)(b().slider,{[b().gray]:g,[b().loading]:N}),classSlide:b().slide,classNavigationLeftButton:b().sliderLeftButton,classNavigationRightButton:b().sliderRightButton,infiniteSlider:!0,children:R.map((e,t)=>(0,i.jsxs)("div",{className:b().sliderItem,onMouseDown:j,onMouseMove:w,onMouseLeave:C,onMouseUp:C,children:[(0,i.jsx)("div",{style:{height:"88px"}}),(0,i.jsx)("div",{className:b().grid,children:e.map((e,t)=>(0,i.jsx)("a",{className:(0,o.Z)(b().post,{[b().pinned]:e.pinned&&0===t}),href:"/".concat(e.url),children:(0,i.jsxs)("div",{onMouseUpCapture:B,"data-url":"/".concat(e.url),"data-title":e.title,children:[(0,i.jsx)("div",{className:b().postTitle,children:e.title}),(0,i.jsx)("div",{className:b().postDate,children:(0,h.p6)(String(e.date_pub||e.public_date||e.update_time||e.publ_time),!0)}),(0,i.jsx)("div",{className:b().bookmark,children:(0,i.jsx)(a(),{src:l.Z,alt:"bookmark",unoptimized:!0})})]})},e.id))})]},t))})]})},y=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 i=n(5893),r=n(4588),o=n(5675),s=n.n(o),a=n(7294),c=n(5293),l=n.n(c);let u=new(l()).EventEmitter;var d=n(2039),p=n(5621),v=n(136),h=n(7771);let f=e=>!!e&&/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/.test(e);var _=n(6480),m=n.n(_);let b=(0,d.b)(2e3),g=e=>{let{index:t=0}=e,n=(0,a.useRef)(null),[o,c]=(0,a.useState)(!1),[l,d]=(0,a.useState)(!1),[_,g]=(0,a.useState)(""),[y,x]=(0,a.useState)(""),[N,L]=(0,a.useState)(!1),S="Подпишитесь на нас";(0,a.useEffect)(()=>{u.on("event.subscribe",()=>{n.current&&(n.current.scrollIntoView({behavior:"smooth",block:"center"}),n.current.focus({preventScroll:!0}))})},[]);let k=!l&&!_;return(0,i.jsxs)("div",{className:m().block,children:[(0,i.jsxs)("div",{className:m().content,children:[(0,i.jsxs)("div",{className:m().text,children:[(0,i.jsx)("div",{className:m().title,children:S}),(0,i.jsx)("div",{className:m().subtitle,children:"Будем присылать только полезные статьи"})]}),k&&(0,i.jsxs)("div",{className:m().form,children:[(0,i.jsx)(r.MA,{className:m().input,label:"Электронная почта",variant:"secondary",size:"s",value:y,onChange:e=>{N&&L(!(f(e)||!e)),x(e)},onInput:()=>{let e=t>0?"_".concat(t):"";b(()=>{(0,p.l)({eventAction:"input_field_".concat((0,h.b)("электронная почта")).concat(e),eventLabel:"banner__".concat((0,h.b)(S)),event:"data-event",eventCategory:"".concat((0,h.b)("журнал"),"_").concat(location.pathname),eventValue:""})})},state:N?"error":void 0,caption:N?"Неверный e-mail":void 0}),(0,i.jsx)(r.zx,{className:m().button,label:"Подписаться",size:"s",onClick:()=>{L(!f(y)),f(y)&&(c(!0),(0,p.l)({eventAction:"click_button_".concat((0,h.b)("подписаться")).concat(t>0?"_".concat(t):""),eventLabel:"banner__".concat((0,h.b)(S)),event:"data-event",eventCategory:"".concat((0,h.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?(v.A.setItem("subscribed","1"),d(!0)):g(409===e.status?'Кажется, вы уже подписаны на нашу рассылку. Если письма не приходят, рекомендуем обратиться в поддержу по телефону <span class="nowrap">8\xa0800\xa0505-32-32</span>.':401===e.status?"Неверный формат e-mail адреса":"Возникла ошибка, повторите попытку позднее")}).catch(()=>g("Возникла ошибка, повторите попытку позднее")))},disabled:N,pending:o})]}),l&&(0,i.jsx)("div",{className:m().success,children:"Подтвердите подписку по ссылке, отправленной на указанную электронную почту."}),_&&(0,i.jsx)("div",{className:m().error,dangerouslySetInnerHTML:{__html:_}})]}),(0,i.jsxs)("picture",{className:m().imgWrapper,children:[(0,i.jsx)("source",{media:"(max-width: 1279px)",srcSet:"/service-navigator/_next/static/media/subscribe-block-m.a67bc073.png"}),(0,i.jsx)(s(),{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,i=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 r=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(n,i){function r(n){e.removeListener(t,o),i(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",r),n([].slice.call(arguments))}f(e,t,o,{once:!0}),"error"!==t&&"function"==typeof e.on&&f(e,"error",r,{once:!0})})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=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?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,i){if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=i?[n,s]:[s,n]:i?s.unshift(n):s.push(n),(r=c(e))>0&&s.length>r&&!s.warned){s.warned=!0;var r,o,s,l=Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.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 d(e,t,n){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},r=u.bind(i);return r.listener=n,i.wrapFn=r,r}function p(e,t,n){var i=e._events;if(void 0===i)return[];var r=i[t];return void 0===r?[]:"function"==typeof r?n?[r.listener||r]:[r]:n?function(e){for(var t=Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(r):h(r,r.length)}function v(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 h(e,t){for(var n=Array(t),i=0;i<t;++i)n[i]=e[i];return n}function f(e,t,n,i){if("function"==typeof e.on)i.once?e.once(t,n):e.on(t,n);else if("function"==typeof e.addEventListener)e.addEventListener(t,function r(o){i.once&&e.removeEventListener(t,r),n(o)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||r(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.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},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||r(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},o.prototype.getMaxListeners=function(){return c(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var r="error"===e,o=this._events;if(void 0!==o)r=r&&void 0===o.error;else if(!r)return!1;if(r){if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var s,a=Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var c=o[e];if(void 0===c)return!1;if("function"==typeof c)i(c,this,t);else for(var l=c.length,u=h(c,l),n=0;n<l;++n)i(u[n],this,t);return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,d(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,d(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,i,r,o,s;if(a(t),void 0===(i=this._events)||void 0===(n=i[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(r=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,r=o;break}if(r<0)return this;0===r?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,r),1===n.length&&(i[e]=n[0]),void 0!==i.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,i;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 r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);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(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return p(this,e,!0)},o.prototype.rawListeners=function(e){return p(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):v.call(e,t)},o.prototype.listenerCount=v,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={exports:{}},s=!0;try{t[e](o,o.exports,i),s=!1}finally{s&&delete n[e]}return o.exports}i.ab="//";var r=i(864);e.exports=r}()},90:function(e){e.exports={title:"NavigatorSlider_title__Ad8QV",mobileTitle:"NavigatorSlider_mobileTitle__75fe1",wrapper:"NavigatorSlider_wrapper__O_CMe",slider:"NavigatorSlider_slider__xXEz_",loading:"NavigatorSlider_loading__SAJgX",slide:"NavigatorSlider_slide__UeRNC",sliderLeftButton:"NavigatorSlider_sliderLeftButton__C_5Yq",sliderRightButton:"NavigatorSlider_sliderRightButton__Yhe6u",sliderItem:"NavigatorSlider_sliderItem__diCHn",grid:"NavigatorSlider_grid__kZJ9_",post:"NavigatorSlider_post__e2qA_",postTitle:"NavigatorSlider_postTitle__vNOPz",pinned:"NavigatorSlider_pinned__D76eL",bookmark:"NavigatorSlider_bookmark__mQNEb",postDate:"NavigatorSlider_postDate__VJJ9B",mobileWrapper:"NavigatorSlider_mobileWrapper__vwg9A",gray:"NavigatorSlider_gray__U99ei",shine:"NavigatorSlider_shine__BgxUf"}},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"}}}]);