(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[106],{5858:function(e,t,n){"use strict";n.d(t,{n:function(){return _}});var i=n(5893),r=n(4588),o=n(6010),s=n(7294),a=n(5619),c=n(4556),l=n(7071),u=n(1997),d=n(2864),p=n(7771),v=n(90),f=n.n(v);let _=e=>{let{containerRef:t,title:n,data:v,padding:_=0,gray:m}=e,b=(0,r.aF)("m"),[g,y]=(0,s.useState)(!0);(0,s.useEffect)(()=>{setTimeout(()=>{y(!1)},400)},[]);let{isDragged:x,isTouched:N,onMouseDown:L,onMouseMove:S,resetState:j}=(0,l.Q)(),w=e=>{e.preventDefault();let t=e.currentTarget,i=t.getAttribute("data-title"),r=t.getAttribute("data-url");(0,d.I)({eventCategory:"".concat((0,p.b)("журнал"),"_").concat(r),eventActionType:d.i.card,eventActionText:(0,p.b)("block ".concat(n)),eventLabel:(0,p.b)(null!=i?i:"")});let o=t.getAttribute("data-url");o&&!(x&&N)&&window.open(o,"_self")},[k,C]=(0,s.useState)(343-2*_);(0,c.y)(t,e=>{let t=e[0];k!==t.contentRect.width&&C(t.contentRect.width-2*_)});let[B,A]=(0,s.useState)(!1),E=h(v),O=E.reduce((e,t)=>{let n=e[e.length-1];return n.length<6?n.push(t):e.push([t]),e},[[]]);return b?(0,i.jsxs)("div",{className:(0,o.Z)(f().mobileWrapper,{[f().gray]:m}),children:[(0,i.jsx)("h2",{className:f().mobileTitle,children:n}),E.slice(0,B?E.length:3).map((e,t)=>(0,i.jsx)("a",{className:(0,o.Z)(f().post,{[f().pinned]:e.pinned&&0===t}),href:"/".concat(e.url),children:(0,i.jsxs)("div",{onMouseUpCapture:w,"data-url":"/".concat(e.url),"data-title":e.title,children:[(0,i.jsx)("div",{className:f().postTitle,children:e.title}),(0,i.jsx)("div",{className:f().postDate,children:(0,u.p6)(String(e.date_pub||e.public_date||e.update_time||e.publ_time),!0)}),(0,i.jsx)("div",{className:f().tag,children:"Важное"})]})},e.id)),!B&&E.length>3&&(0,i.jsx)(r.zx,{label:"Показать еще",variant:"secondary",onClick:()=>A(!0)})]}):(0,i.jsxs)("div",{className:f().wrapper,children:[(0,i.jsx)("div",{className:f().title,children:(0,i.jsx)("h2",{children:n})}),(0,i.jsx)(a.F,{onRightButtonClick:()=>{(0,d.I)({eventCategory:"".concat((0,p.b)("журнал"),"_").concat(location.pathname),eventActionType:d.i.slider,eventActionText:(0,p.b)("право block ".concat(n))})},onLeftButtonClick:()=>{(0,d.I)({eventCategory:"".concat((0,p.b)("журнал"),"_").concat(location.pathname),eventActionType:d.i.slider,eventActionText:(0,p.b)("лево block ".concat(n))})},width:k,height:b?354:416,spaceBetween:8,sliderPerView:1,hidePaginationControl:!b,classSliderWrapper:(0,o.Z)(f().slider,{[f().gray]:m,[f().loading]:g}),classSlide:f().slide,classNavigationLeftButton:f().sliderLeftButton,classNavigationRightButton:f().sliderRightButton,infiniteSlider:!0,children:O.map((e,t)=>(0,i.jsxs)("div",{className:f().sliderItem,onMouseDown:L,onMouseMove:S,onMouseLeave:j,onMouseUp:j,children:[(0,i.jsx)("div",{style:{height:"88px"}}),(0,i.jsx)("div",{className:f().grid,children:e.map((e,t)=>(0,i.jsx)("a",{className:(0,o.Z)(f().post,{[f().pinned]:e.pinned&&0===t}),href:"/".concat(e.url),children:(0,i.jsxs)("div",{onMouseUpCapture:w,"data-url":"/".concat(e.url),"data-title":e.title,children:[(0,i.jsx)("div",{className:f().postTitle,children:e.title}),(0,i.jsx)("div",{className:f().postDate,children:(0,u.p6)(String(e.date_pub||e.public_date||e.update_time||e.publ_time),!0)}),(0,i.jsx)("div",{className:f().tag,children:"Важное"})]})},e.id))})]},t))})]})},h=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),f=n(7771);let _=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,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),[h,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 j=!l&&!h;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:"Будем присылать только полезные статьи"})]}),j&&(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(!(_(e)||!e)),x(e)},onInput:()=>{let e=t>0?"_".concat(t):"";b(()=>{(0,p.l)({eventAction:"input_field_".concat((0,f.b)("электронная почта")).concat(e),eventLabel:"banner__".concat((0,f.b)(S)),event:"data-event",eventCategory:"".concat((0,f.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(!_(y)),_(y)&&(c(!0),(0,p.l)({eventAction:"click_button_".concat((0,f.b)("подписаться")).concat(t>0?"_".concat(t):""),eventLabel:"banner__".concat((0,f.b)(S)),event:"data-event",eventCategory:"".concat((0,f.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:"Подтвердите подписку по ссылке, отправленной на указанную электронную почту."}),h&&(0,i.jsx)("div",{className:m().error,dangerouslySetInnerHTML:{__html:h}})]}),(0,i.jsxs)("picture",{className:m().imgWrapper,children:[(0,i.jsx)("source",{media:"(max-width: 1023px)",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))}_(e,t,o,{once:!0}),"error"!==t&&"function"==typeof e.on&&_(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):f(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 f(e,t){for(var n=Array(t),i=0;i<t;++i)n[i]=e[i];return n}function _(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=f(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",postDate:"NavigatorSlider_postDate__VJJ9B",tag:"NavigatorSlider_tag__8XdHo",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"}}}]);