(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{1251:function(e,t,n){"use strict";n.r(t);var i=n(5),s=n(7),o=n(6),r=n(8),a=n(9),c=n(73),l=n(0),u=n.n(l),p=n(162),d=(n(258),n(1252),function(e){function t(){var e,n;Object(i.a)(this,t);for(var s=arguments.length,a=new Array(s),l=0;l<s;l++)a[l]=arguments[l];return(n=Object(o.a)(this,(e=Object(r.a)(t)).call.apply(e,[this].concat(a)))).count=0,n.state={showNotices:!0},n.initializeSwiper=function(){var e=Object(c.a)(Object(c.a)(n));n.swiper=new p.a(".sys-bullet-screen-swiper-container",{allowTouchMove:!1,direction:"vertical",loop:!0,on:{init:function(){Array.from(this.slides).forEach(function(t){t.querySelector("span").addEventListener("transitionend",e.transitionEnd)})},slideChangeTransitionEnd:function(){e.slideHorizontal(this)},transitionEnd:function(){var e=this.slides[this.previousIndex].querySelector("span");e.style.transition="unset",e.style.transform="translate3d(0,0,0)"}}})},n.slideHorizontal=function(e){var t=e.slides[e.activeIndex],i=t.querySelector("span"),s=i.offsetWidth,o=t.clientWidth;s>o?(i.style.transition="transform ".concat(s/131.25,"s linear"),setTimeout(function(){i.style.transform="translate3d(".concat(-(s-o)-10,"px,0,0)")},1e3)):setTimeout(function(){++n.count,e&&!e.destroyed&&e.slideNext()},3e3)},n.transitionEnd=function(){var e=3*n.props.bullets.length;++n.count===e?setTimeout(function(){n.sysNotice.style.height="0px"},2e3):setTimeout(function(){n.swiper&&n.swiper.slideNext()},1e3)},n.removeSystemNotices=function(e){e.persist(),e.target===n.sysNotice&&n.setState({showNotices:!1})},n}return Object(a.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.initializeSwiper()}},{key:"componentWillUnmount",value:function(){this.swiper&&this.swiper.destroy()}},{key:"render",value:function(){var e=this,t=this.props.bullets;return this.state.showNotices&&u.a.createElement("div",{id:"system-bullet-screen",onTransitionEnd:this.removeSystemNotices,ref:function(t){return e.sysNotice=t}},u.a.createElement("img",{className:"avatar",src:"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/system-notice-icon.png",alt:""}),u.a.createElement("div",{className:"sys-bullet-screen-swiper-container"},u.a.createElement("ul",{className:"swiper-wrapper"},t&&t.length?t.map(function(e,t){return u.a.createElement("li",{className:"swiper-slide",key:t},u.a.createElement("span",null,e))}):null)))}}]),t}(l.Component));t.default=d},1252:function(e,t,n){}}]);
//# sourceMappingURL=system-notices.c321a320.chunk.js.map