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