"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[129],{129:function(t,n,e){e.r(n),e.d(n,{default:function(){return D}});var i=e(4111),r=e(1438),o=e(2951),a=e(4924),s=e(8029),l=e(6042),c=e(9396),u=e(9534),d=e(7297),p=e(5171),f=e(5893),h=e(3967),v=e.n(h),m=e(197),x=e(8252),g=e.n(x),y=e(3664),w=e(5152),Z=e.n(w),b=e(1664),j=e.n(b),M=e(5697),k=e.n(M),C=e(7294),P=e(8561),S=e(4141),E=e(2660),N=e(9599),T=e(2626),A=e(2718),G=e(7630);function W(){var t=(0,d.Z)(["\n\t// local vars for event-slider\n\t--event-slider-title: var(--color-text);\n\t--event-slider-title-hover: rgba(255, 255, 255, 0.8);\n\t--event-slider-title-bg: var(--color-primary);\n\t--event-slider-group: var(--color-text);\n\n\tdisplay: flex;\n\tflex-direction: column;\n\tmax-width: ",";\n\talign-self: ",";\n\tmargin: 0 0 1em 0;\n\twidth: 100%;\n\tposition: relative;\n\tz-index: 1;\n\tuser-select: none;\n\toverflow: hidden;\n\n\t@media (min-width: ",") { // tablet horizontal\n\t\toverflow: visible;\n\t}\n\n\t.swiper-container {\n\t\twidth: 100%;\n\t\toverflow: visible;\n\t\t.swiper-slide {\n\t\t\twidth: 12em;\n\t\t\tmargin: 1em;\n\t\t}\n\t}\n"]);return W=function(){return t},t}function O(){var t=(0,d.Z)(["\n\tdisplay: inline-block;\n\tline-height: 1.33;\n\tmargin: 0.5em 0 0 0;\n\ttransition: var(--site-transition);\n\ttransition-timing-function: ease-in;\n\ttransition-property: color, transform;\n\tposition: relative;\n\tfont-weight: normal;\n    z-index: 1;\n\t\n\t& > span {\n\t\tmax-height: 2.7em;\n\t\toverflow: hidden;\n\t\tdisplay: inline-block;\n\t\ttext-overflow: ellipsis;\n\t\twhite-space: nowrap;\n\t\tmax-width: 100%;\n\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\tcolor: var(--event-slider-title);\n\t}\n"]);return O=function(){return t},t}function I(){var t=(0,d.Z)(["\n\t\t&:hover,  &:focus {\n\t\t\t.event-poster {\n\t\t\t\ttransform: scale(1.1) translateY(-15px);\n\t\t\t\tbox-shadow: 0 0 100px -30px black;\n\t\t\t}\n\t\t}\n\t\t\n\t\t&:hover, &:focus {\n\t\t\tz-index: 10;\n\t\t}\n\t\t\n\t\ta:hover, a:focus {\n\t\t\ttext-decoration: none;\n\t\t}\n\t"]);return I=function(){return t},t}function z(){var t=(0,d.Z)(["\n\tdisplay: flex;\n\tflex-direction: column;\n\tcursor: pointer;\n\tposition: relative;\n\t\n\t","\n\t\n\t.event-poster {\n\t\ttransition: ease-in .1s;\n\t\ttransition-property: transform, box-shadow;\n\t\twidth: 100%\n\t}\n\t\n\t&.pushkinCard .event-tags-item[data-tag='\u043f\u0443\u0448\u043a\u0438\u043d\u0441\u043a\u0430\u044f \u043a\u0430\u0440\u0442\u0430'],\n\t&.premiere .event-tags-item[data-tag='\u043f\u0440\u0435\u043c\u044c\u0435\u0440\u0430'],\n\t&.preorder .event-tags-item[data-tag='\u043f\u0440\u0435\u0434\u043f\u0440\u043e\u0434\u0430\u0436\u0430'] ,\n\t&.soon .event-tags-item[data-tag='\u0441\u043a\u043e\u0440\u043e'] {\n\t\tdisplay: none;\n\t}\n"]);return z=function(){return t},t}function R(){var t=(0,d.Z)(["\n\tdisplay: flex;\n\n\t&.swiper-slide.swiper-slide {\n\t\twidth: 50px;\n\t\theight: 256px;\n\t\tjustify-content: flex-end;\n\t}\n\t\n\t& > div {\n\t\tposition: relative;\n\t\twidth: 0;\n\t\theight: 0;\n\t\ttransform: rotate(-90deg);\n\t\twhite-space: nowrap;\n\t\tjustify-content: flex-end;\n\n\t\t& > span {\n\t\t\tposition: absolute;\n\t\t\tfont-size: 1.8em;\n\t\t\tfont-weight: 800;\n\t\t\tcolor: rgba(255, 255, 255, 0.8);\n\t\t\tcolor: var(--event-slider-group);\n\t\t\topacity: 0.15;\n\t\t\tletter-spacing: -1px;\n\t\t\ttext-transform: uppercase;\n\t\t}\n\t}\n"]);return R=function(){return t},t}var _=Z()((function(){return Promise.all([e.e(5125),e.e(8152)]).then(e.bind(e,8152))}),{loadableGenerated:{webpack:function(){return[8152]}}}),D=function(t){(0,s.Z)(e,t);var n=(0,p.Z)(e);function e(){var t;return(0,r.Z)(this,e),t=n.apply(this,arguments),(0,a.Z)((0,i.Z)(t),"images",{}),(0,a.Z)((0,i.Z)(t),"filterEvents",(function(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"default",i=t.context.siteState.city;return"dateStart"===e?(0,y.X)(n.filter((function(t){return t.cities.includes(i)})),(function(t){return(0,m.Z)(t.info.dateStart,"dd.MM.yyyy",new Date)}),"asc"):(0,y.X)(n.filter((function(t){return t.cities.includes(i)})),[function(t){return t.weight},function(t){return t.showCountToday},function(t){return(0,m.Z)(t.info.dateStart,"dd.MM.yyyy",new Date)},function(t){return t.showCountDays}],["desc","desc","asc","desc"])})),(0,a.Z)((0,i.Z)(t),"renderEvent",(function(n,e,i){var r=t.context,o=r.siteState,a=r.isMobile,s=(0,T.default)(o,{pathname:n.href?"/events/".concat(n.href):""});return(0,f.jsxs)(X,{className:v()("group-event",i),isMobile:a,children:[(0,f.jsx)(A.Z,{withTags:!0,event:n,href:s||"/",playPosition:"center",ref:function(n){return n&&(t.images[i+e]=n.getImage())}}),(0,f.jsx)(U,{children:(0,f.jsx)(j(),{href:{pathname:"/",query:{event:n.href}},as:s||"/",children:(0,f.jsx)("span",{children:n.info.name})})}),(0,f.jsx)(G.Z,{event:n,isUseEllipsis:!0}),(0,f.jsx)(N.Z,{event:n.info})]},n.uuid)})),(0,a.Z)((0,i.Z)(t),"renderEventGroup",(function(n,e){var i=t.props.isShowTitle,r=Array.isArray(n)?t.filterEvents(n,"soon"===e?"date":"default"):[];return r.length?[i&&(0,f.jsx)(B,{className:"group-title",children:(0,f.jsx)(P.kC,{w:0,h:0,children:(0,f.jsx)("span",{children:E.xh[e]})})},e),r.map((function(n,i){return t.renderEvent(n,i,e)}))]:null})),t}return(0,o.Z)(e,[{key:"shouldComponentUpdate",value:function(t,n,e){return!g()(t,this.props)||!g()(e.siteState.tags,this.context.siteState.tags)||e.siteState.city!==this.context.siteState.city||e.siteState.facility!==this.context.siteState.facility||e.siteState.date!==this.context.siteState.date||e.isMobile!==this.context.isMobile}},{key:"render",value:function(){var t=this,n=this.props,e=n.groups,i=n.limitMaxWidth,r=n.className,o=n.navigation,a=n.afisha.slider,s=this.context.siteState.isMobile;return 0===Object.keys(a).length?null:(0,f.jsx)(q,{limitMaxWidth:i,className:v()("event-slider",r),children:(0,f.jsxs)(_,{freeMode:!0,slidesPerView:"auto",swiperRef:function(n){return n?t.swiper=n.swiper:{}},pagination:{},navigation:o?{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}:{},breakpointsInverse:!0,breakpoints:{720:{slidesPerGroup:3},1024:{slidesPerGroup:4},1440:{slidesPerGroup:5},1920:{slidesPerGroup:7}},on:{slideChange:function(){return Object.values(t.images||{}).map((function(t){return null===t||void 0===t?void 0:t.update()}))},transitionEnd:function(){return Object.values(t.images||{}).map((function(t){return null===t||void 0===t?void 0:t.update()}))}},children:[s?null:(0,f.jsx)(P.kC,{className:"start-placeholder",flex:"1 1 20px",w:20}),e.map((function(n){return t.renderEventGroup(a[n],n)})),s?(0,f.jsx)(P.kC,{className:"end-placeholder",flex:"1 1 0px",w:0}):(0,f.jsx)(P.kC,{className:"end-placeholder",flex:"1 1 50px",w:50})]})})}}]),e}(C.Component);(0,a.Z)(D,"propTypes",(0,c.Z)((0,l.Z)({},E.lG),{afisha:k().object})),(0,a.Z)(D,"defaultProps",{limitMaxWidth:!1,isShowTitle:!0,navigation:!1,groups:["preorder","premiere","pushkinCard","rental","soon"]}),(0,a.Z)(D,"contextTypes",{siteState:k().object,isMobile:k().bool});var q=(0,S.default)((function(t){t.limitMaxWidth;var n=(0,u.Z)(t,["limitMaxWidth"]);return(0,f.jsx)("div",(0,l.Z)({},n))})).withConfig({componentId:"sc-76fd9043-0"})(W(),(function(t){return t.limitMaxWidth?"var(--site-maxWidth)":"initial"}),(function(t){return t.limitMaxWidth?"center":"initial"}),(function(t){return t.theme.breakpoints[3]})),U=S.default.h4.withConfig({componentId:"sc-76fd9043-1"})(O()),X=(0,S.default)((function(t){t.isMobile;var n=(0,u.Z)(t,["isMobile"]);return(0,f.jsx)("div",(0,l.Z)({},n))})).withConfig({componentId:"sc-76fd9043-2"})(z(),(function(t){return!t.isMobile&&(0,S.css)(I())})),B=S.default.div.withConfig({componentId:"sc-76fd9043-3"})(R())},9599:function(t,n,e){e.d(n,{Z:function(){return f}});var i=e(1438),r=e(2951),o=e(4924),a=e(8029),s=e(5171),l=e(5893),c=e(5697),u=e.n(c),d=e(7294),p=e(2398),f=function(t){(0,a.Z)(e,t);var n=(0,s.Z)(e);function e(){return(0,i.Z)(this,e),n.apply(this,arguments)}return(0,r.Z)(e,[{key:"render",value:function(){var t=this.props.event,n=t.name,e=t.poster,i=t.ageRest,r=t.duration,o=t.year,a=t.description,s=t.genre,c=t.director,u=t.cast;return(0,l.jsxs)("div",{itemScope:!0,itemType:"http://schema.org/Movie",children:[n?(0,l.jsx)("meta",{itemProp:"name",content:n}):null,e?(0,l.jsx)("meta",{itemProp:"image",content:e}):null,i?(0,l.jsx)("meta",{itemProp:"contentRating",content:i}):null,r?(0,l.jsx)("meta",{itemProp:"duration",content:(0,p.Z)(r)}):null,o?(0,l.jsx)("meta",{itemProp:"dateCreated",content:o}):null,a?(0,l.jsx)("meta",{itemProp:"description",content:a}):null,Array.isArray(s)&&s.length>0&&s.map((function(t){return(0,l.jsx)("meta",{itemProp:"genre",content:t},t)})),Array.isArray(c)&&c.length>0&&c.map((function(t){return(0,l.jsx)("meta",{itemProp:"director",content:t},t)})),Array.isArray(u)&&u.length>0&&u.map((function(t){return(0,l.jsx)("meta",{itemProp:"actor",content:t},t)}))]})}}]),e}(d.PureComponent);(0,o.Z)(f,"propTypes",{event:u().shape({name:u().string.isRequired,image:u().string,contentRating:u().string,duration:u().oneOfType([u().number,u().string]),dateCreated:u().string,description:u().string,genre:u().arrayOf(u().string),director:u().arrayOf(u().string),actor:u().arrayOf(u().string)})}),(0,o.Z)(f,"defaultProps",{event:{}})},2398:function(t,n,e){var i=e(1721);n.Z=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1?arguments[1]:void 0,e=Math.floor(t/60),r=t%60;return["".concat(e," ").concat((0,i.Z)(e,"\u0447\u0430\u0441","\u0447\u0430\u0441\u0430","\u0447\u0430\u0441\u043e\u0432")),r&&"".concat(r," ").concat((0,i.Z)(r,"\u043c\u0438\u043d\u0443\u0442\u0430","\u043c\u0438\u043d\u0443\u0442\u044b","\u043c\u0438\u043d\u0443\u0442")),n&&" (+".concat(n," \u043c\u0438\u043d. \u0440\u043e\u043b\u0438\u043a\u0438)")].filter(Boolean).join(" ")}},1721:function(t,n){n.Z=function(t,n,e,i){var r=Math.abs(t);return(r%=100)>=5&&r<=20?i:1===(r%=10)?n:r>=2&&r<=4?e:i}}}]);