(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{1236:function(e,t,n){"use strict";n.r(t);var s=n(4),i=n(7),o=n(5),r=n(8),a=n(9),c=n(74),l=n(0),u=n.n(l),p=n(160),d=(n(259),n(1237),function(e){function t(){var e,n;Object(s.a)(this,t);for(var i=arguments.length,a=new Array(i),l=0;l<i;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],s=t.querySelector("span"),i=s.offsetWidth,o=t.clientWidth;if(i>o)s.style.transition="transform ".concat(i/131.25,"s linear"),setTimeout(function(){s.style.transform="translate3d(".concat(-(i-o)-10,"px,0,0)")},1e3);else{var r=3*n.props.bullets.length;setTimeout(function(){++n.count===r&&(n.sysNotice.style.height="0px"),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(i.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},1237:function(e,t,n){}}]);
//# sourceMappingURL=system-notices.42c80af6.chunk.js.map