<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"use strict";(self.webpackChunkpaperpress_evolved=self.webpackChunkpaperpress_evolved||[]).push([[9816],{5549:(t,s,e)=&gt;{e.d(s,{A:()=&gt;n});var i=e(6942),o=e.n(i),r=e(4848);function n(t){const s=o()({"arrow-icon--left":t.left,"arrow-icon--right":t.right});return(0,r.jsx)("div",{className:s})}},694:(t,s,e)=&gt;{function i(t){var s,e;return t.children((e=null!==(s=t.dataSet)&amp;&amp;void 0!==s?s:{},Object.keys(e).reduce(((t,s)=&gt;{var i;return t[`data-${s.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}`]=(null!==(i=e[s])&amp;&amp;void 0!==i?i:"").toString(),t}),{})))}e.d(s,{A:()=&gt;i})},850:(t,s,e)=&gt;{e.d(s,{A:()=&gt;l});var i=e(6942),o=e.n(i),r=e(6540),n=e(4848);class a extends r.Component{constructor(){super(...arguments),this.state={loaded:!1},this.handleLoad=()=&gt;{this.setState({loaded:!0})}}render(){const t=o()({"r-img":!0,"r-img_shown":this.state.loaded});return(0,n.jsx)("div",{className:t,children:(0,n.jsx)("img",{src:this.props.src,srcSet:this.props.srcset,sizes:this.props.sizes,alt:this.props.alt,onLoad:this.handleLoad,className:`r-img--img ${this.props.className}`,loading:"lazy"})})}}a.defaultProps={className:""};const l=a},8816:(t,s,e)=&gt;{e.d(s,{A:()=&gt;g});var i=e(694),o=e(8381),r=e(5614),n=e(2849),a=e(4848);function l(t){var s;return(0,a.jsx)("div",{className:null!==(s=t.className)&amp;&amp;void 0!==s?s:"",children:(0,o.GP)((0,n.bp)(t.time),"dd MMMM yyyy",{locale:r.ru})})}var c=e(850),h=e(8801),d=e(3753),p=e(6002),m=e(6942),u=e.n(m),f=function(t,s){var e={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&amp;&amp;s.indexOf(i)&lt;0&amp;&amp;(e[i]=t[i]);if(null!=t&amp;&amp;"function"==typeof Object.getOwnPropertySymbols){var o=0;for(i=Object.getOwnPropertySymbols(t);o&lt;i.length;o++)s.indexOf(i[o])&lt;0&amp;&amp;Object.prototype.propertyIsEnumerable.call(t,i[o])&amp;&amp;(e[i[o]]=t[i[o]])}return e};function g(t){var{postData:s}=t,e=f(t,["postData"]);const o=u()({post:!0,"post--big":!e.forcedSmall&amp;&amp;s.forcedBig,[e.className]:e.className,[s.className]:s.className});return(0,a.jsx)(i.A,{dataSet:e.dataSet,children:t=&gt;(0,a.jsxs)("div",{className:o,"data-vr-contentbox":e.ioName,"data-vr-contentbox-url":s.link,...t,children:[s.image?(0,a.jsx)("div",{className:"post__img",children:(0,a.jsx)(h.A,{to:s.link,className:"js-track-text-widget-photo",children:(0,a.jsx)(c.A,{src:s.image.source,srcset:s.image.srcset,sizes:s.image.sizes})})}):null,(0,a.jsxs)("div",{className:"post__info",children:[!1!==e.withTag&amp;&amp;s.tag?(0,a.jsx)(d.A,{...s.tag,className:"post__tag",linkClassName:"js-track-text-widget-tag",ioName:e.ioName?`Ð¢ÐµÐ³ â€“ ${e.ioName}`:""}):null,s.time?(0,a.jsx)(l,{time:s.time,className:"post__date"}):null,!1!==e.withTag&amp;&amp;s.subtag?(0,a.jsx)(p.A,{...s.subtag,className:"post__subtag",linkClassName:"js-track-text-widget-subtag",ioName:e.ioName?`ÐŸÐ¾Ð´Ñ‚ÐµÐ³ â€“ ${e.ioName}`:""}):null,(0,a.jsxs)(h.A,{to:s.link,className:"post__bottom-link js-track-text-widget-title",children:[(0,a.jsx)("div",{className:"post__title","data-vr-headline":!0,children:s.title}),e.withDescription&amp;&amp;s.contents?(0,a.jsx)("div",{className:"post__description",dangerouslySetInnerHTML:{__html:s.contents}}):null,s.logo?(0,a.jsx)("img",{className:"post__logo",src:s.logo,width:"140",height:"15",loading:"lazy",alt:"logo"}):null]})]})]})})}},4469:(t,s,e)=&gt;{e.d(s,{Ay:()=&gt;j});var i=e(5549),o=e(9134),r=e(694);const n="left",a="right";var l=e(6942),c=e.n(l),h=e(4848);function d(t){function s(){t.onClick(t.direction)}const e=c()({[`scroller__button--${t.direction}`]:!0,[t.className]:t.className});return(0,h.jsx)(r.A,{dataSet:t.dataSet,children:r=&gt;(0,h.jsx)(o.A,{in:t.isShown,unmountOnExit:!0,children:(0,h.jsx)("div",{className:e,onClick:s,style:t.style?t.style:{},...r,children:(0,h.jsx)(i.A,{left:t.direction===n,right:t.direction===a})})})})}var p=e(9968),m=e(8142),u=e.n(m),f=e(5858),g=e.n(f),v=e(6540);class N extends v.Component{constructor(){var t;super(...arguments),this.state={scrollPosition:{[n]:0,[a]:0}},this.containerRef=null!==(t=this.props.containerRef)&amp;&amp;void 0!==t?t:(0,v.createRef)(),this.handleScroll=g()((()=&gt;{try{const t=(0,p.a)(this.containerRef),s={[n]:N.getValueLeft(t),[a]:N.getValueRight(t)};this.setState({scrollPosition:s}),this.props.onScrollPosition&amp;&amp;this.props.onScrollPosition(s[n],s[a])}catch(t){console.error(t)}}),100),this.handleButtonClick=t=&gt;{try{const s=(0,p.a)(this.containerRef),e=.01*this.props.itemWidth,i=t===a?Math.ceil((s.scrollLeft+e)/this.props.itemWidth)*this.props.itemWidth:Math.floor((s.scrollLeft-e)/this.props.itemWidth)*this.props.itemWidth;s.scrollTo({left:i,behavior:"smooth"})}catch(t){console.error(t)}}}static getValueLeft(t){return t.scrollLeft}static getValueRight(t){return t.scrollWidth-t.scrollLeft-t.offsetWidth}componentDidMount(){try{(0,p.a)(this.containerRef).addEventListener("scroll",this.handleScroll),this.handleScroll()}catch(t){console.error(t)}}componentWillUnmount(){try{(0,p.a)(this.containerRef).removeEventListener("scroll",this.handleScroll)}catch(t){console.error(t)}}componentDidUpdate(t){u()(t.children,this.props.children)||this.handleScroll()}isInitialDataLoaded(){return this.props.itemWidth&gt;0}isButtonShown(t){return this.isInitialDataLoaded()&amp;&amp;t&gt;=this.props.scrollButtonShownOffset}getChildren(){const t=v.Children.toArray(this.props.children);return t.length?t.map((t=&gt;"img"===t.type?(0,v.cloneElement)(t,{onLoad:this.handleScroll}):t)):this.props.noContentFallback}render(){return(0,h.jsxs)("div",{className:`scroller ${this.props.className}`,children:[(0,h.jsx)(d,{direction:n,isShown:this.isButtonShown(this.state.scrollPosition[n]),...this.props.buttonProps,...this.props.leftButtonProps,onClick:this.handleButtonClick}),(0,h.jsx)("div",{className:"scroller__container",dir:"ltr",ref:this.containerRef,children:this.getChildren()}),(0,h.jsx)(d,{direction:a,isShown:this.isButtonShown(this.state.scrollPosition[a]),...this.props.buttonProps,...this.props.rightButtonProps,onClick:this.handleButtonClick})]})}}N.defaultProps={scrollButtonShownOffset:100,className:""};const j=N},10:(t,s,e)=&gt;{e.r(s),e.d(s,{default:()=&gt;d});var i=e(6540),o=e(5858),r=e.n(o),n=e(8801),a=e(8816),l=e(4469),c=e(9968),h=e(4848);class d extends i.Component{constructor(){super(...arguments),this.state={itemWidth:300,buttonVerticalPosition:100},this.containerRef=(0,i.createRef)(),this.handleResize=r()((()=&gt;{this.calculateItemWidth(),this.calculateButtonVerticalPosition()}),200)}componentDidMount(){this.calculateItemWidth(),this.calculateButtonVerticalPosition(),window.addEventListener("resize",this.handleResize)}componentWillUnmount(){window.removeEventListener("resize",this.handleResize)}calculateItemWidth(){try{const t=(0,c.a)(this.containerRef),s=t.querySelector(".post-strip__item").offsetWidth+24;this.setState({itemWidth:s})}catch(t){console.error(t)}}calculateButtonVerticalPosition(){try{const t=(0,c.a)(this.containerRef).querySelector(".post__img").offsetWidth;this.setState({buttonVerticalPosition:Math.floor(.66*t*.5)})}catch(t){console.error(t)}}render(){const t={style:{top:this.state.buttonVerticalPosition},dataSet:{stripName:this.props.title}};return(0,h.jsxs)("div",{className:"post-strip","data-vr-zone":`ÐšÐ¾Ð»Ð±Ð°ÑÐ° "${this.props.title||""}"`,children:[(0,h.jsxs)("div",{className:"post-strip__title",children:[this.props.link?(0,h.jsx)(n.A,{to:this.props.link,className:"post-strip__link js-track-strip-title-click",children:this.props.title}):null,!this.props.link&amp;&amp;this.props.title]}),(0,h.jsx)(l.Ay,{containerRef:this.containerRef,itemWidth:this.state.itemWidth,className:"post-strip__body",buttonProps:t,leftButtonProps:{className:"js-track-strip-left-click"},rightButtonProps:{className:"js-track-strip-right-click"},children:this.props.posts.map(((t,s)=&gt;(0,h.jsx)(a.A,{postData:t,className:"post-strip__item js-track-strip-item-click",forcedSmall:!0,dataSet:{num:s+1},ioName:`Ð‘Ð»Ð¾Ðº ${s+1}`},t.id)))})]})}}},9968:(t,s,e)=&gt;{function i(t){if(null!==t.current)return t.current;throw new Error("ref is null")}e.d(s,{a:()=&gt;i})}}]);
//# sourceMappingURL=../sourcemaps/scripts/post-strip.9a984a3e9bfee75fc2a2.js.map</pre></body></html>