xgplayer 2.32.3 → 2.32.6-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
- window.PlayerControls=window.PlayerControls||{},window.PlayerControls.danmu=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=i,t.hasClass=s,t.addClass=l,t.removeClass=u,t.toggleClass=c,t.findDom=d,t.padStart=p,t.format=f,t.event=h,t.typeOf=g,t.deepCopy=y,t.getBgImage=m,t.copyDom=v,t._setInterval=x,t._clearInterval=b,t.createImgBtn=w,t.isWeiXin=k,t.isUc=_,t.computeWatchDur=O,t.offInDestroy=E,t.on=j,t.once=C,t.getBuffered2=z,t.checkIsBrowser=M,t.setStyle=L,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var r,a=n(3),o=(r=a)&&r.__esModule?r:{default:r};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(e);return a.className=r,a.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e?o&&a.setAttribute(r,o):a.setAttribute(r,o)})),a}function s(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function l(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):s(e,t)||(e.className+=" "+t))}function u(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):s(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function c(e,t){e&&t.split(/\s+/g).forEach((function(t){s(e,t)?u(e,t):l(e,t)}))}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function p(e,t,n){for(var r=String(n),a=t>>0,o=Math.ceil(a/r.length),i=[],s=String(e);o--;)i.push(r);return i.join("").substring(0,a-s.length)+s}function f(e){if(window.isNaN(e))return"";var t=p(Math.floor(e/3600),2,0),n=p(Math.floor((e-3600*t)/60),2,0),r=p(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")}function h(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function g(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===g(t)&&"Object"===g(e))return Object.keys(t).forEach((function(n){"Object"!==g(t[n])||t[n]instanceof Node?"Array"===g(t[n])?e[n]="Array"===g(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function m(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function v(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function x(e,t,n,r){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),r))}function b(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function w(e,t,n,r){var a=i("xg-"+e,"",{},"xgplayer-"+e+"-img");if(a.style.backgroundImage='url("'+t+'")',n&&r){var o=void 0,s=void 0,l=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&r.indexOf(e)>-1)||(o=Number(n.slice(0,n.indexOf(e)).trim()),s=Number(r.slice(0,r.indexOf(e)).trim()),l=e,!1)})),a.style.width=""+o+l,a.style.height=""+s+l,a.style.backgroundSize=""+o+l+" "+s+l,a.style.margin="start"===e?"-"+s/2+l+" auto auto -"+o/2+l:"auto 5px auto 5px"}return a}function k(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function O(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;n<e.length;n++)if(!(!e[n].end||e[n].begin<0||e[n].end<0||e[n].end<e[n].begin))if(t.length<1)t.push({begin:e[n].begin,end:e[n].end});else for(var r=0;r<t.length;r++){var a=e[n].begin,o=e[n].end;if(o<t[r].begin){t.splice(r,0,{begin:a,end:o});break}if(!(a>t[r].end)){var i=t[r].begin,s=t[r].end;t[r].begin=Math.min(a,i),t[r].end=Math.max(o,s);break}if(r>t.length-2){t.push({begin:a,end:o});break}}for(var l=0,u=0;u<t.length;u++)l+=t[u].end-t[u].begin;return l}function E(e,t,n,r){e.once(r,(function a(){e.off(t,n),e.off(r,a)}))}function j(e,t,n,r){if(r)e.on(t,n),E(e,t,n,r);else{e.on(t,(function r(a){n(a),e.off(t,r)}))}}function C(e,t,n,r){if(r)e.once(t,n),E(e,t,n,r);else{e.once(t,(function r(a){n(a),e.off(t,r)}))}}function z(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});n.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var a=[];if(t)for(var i=0;i<n.length;i++){var s=a.length;if(s){var l=a[s-1].end;n[i].start-l<t?n[i].end>l&&(a[s-1].end=n[i].end):a.push(n[i])}else a.push(n[i])}else a=n;return new o.default(a)}function M(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function L(e,t,n){var r=e.style;try{r[t]=n}catch(e){r.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:i,hasClass:s,addClass:l,removeClass:u,toggleClass:c,findDom:d,padStart:p,format:f,event:h,typeOf:g,deepCopy:y,getBgImage:m,copyDom:v,setInterval:x,clearInterval:b,createImgBtn:w,isWeiXin:k,isUc:_,computeWatchDur:O,offInDestroy:E,on:j,once:C,getBuffered2:z,checkIsBrowser:M,setStyle:L}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(2)),a=o(n(4));function o(e){return e&&e.__esModule?e:{default:e}}t.default={name:"danmu",method:function(){r.default.method.call(this),a.default.method.call(this)}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"danmu",method:function(){var e=this;e.on("initDefaultDanmu",(function(t){var n=e.root.querySelector("xg-danmu");if((0,r.addClass)(n,"xgplayer-has-danmu"),!e.config.danmu.closeDefaultBtn){var a=function(){t.start()},o=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.pause()},i=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.play()},s=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&(t.stop(),t.start())};e.danmuBtn=(0,r.copyDom)(t.bulletBtn.createSwitch(!0)),e.controls.appendChild(e.danmuBtn),["click","touchend"].forEach((function(o){e.danmuBtn.addEventListener(o,(function(o){o.preventDefault(),o.stopPropagation(),(0,r.toggleClass)(e.danmuBtn,"danmu-switch-active"),(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")?(e.emit("danmuBtnOn"),(0,r.addClass)(n,"xgplayer-has-danmu"),e.once("timeupdate",a)):(e.emit("danmuBtnOff"),(0,r.removeClass)(n,"xgplayer-has-danmu"),t.stop())}))})),e.onElementClick&&n.addEventListener("click",(function(t){e.onElementClick(t,n)}),!1),e.onElementDblclick&&n.addEventListener("dblclick",(function(t){e.onElementDblclick(t,n)}),!1),e.on("pause",o),e.on("play",i),e.on("seeked",s),e.once("destroy",(function t(){e.off("timeupdate",a),e.off("pause",o),e.off("play",i),e.off("seeked",s),e.off("destroy",t)}))}}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bufferedList=t}return r(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=i(n(5)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}n(7);t.default={name:"s_danmu",method:function(){var e=this,t=e.root;if(e.config.danmu){var n=(0,r.createDom)("xg-danmu","",{},"xgplayer-danmu");e.once("ready",(function(){t.appendChild(n)}));var i=(0,r.deepCopy)({container:n,player:e.video,comments:[],area:{start:0,end:1}},e.config.danmu),s=void 0;e.config.danmu.panel&&(s=(0,r.createDom)("xg-panel",'<xg-panel-icon class="xgplayer-panel-icon">\n '+o.default+'\n </xg-panel-icon>\n <xg-panel-slider class="xgplayer-panel-slider">\n <xg-hidemode class="xgplayer-hidemode">\n <p class="xgplayer-hidemode-font">屏蔽类型</p>\n <ul class="xgplayer-hidemode-radio">\n <li class="xgplayer-hidemode-scroll" id="false">滚动</li><li class="xgplayer-hidemode-top" id="false">顶部</li><li class="xgplayer-hidemode-bottom" id="false">底部</li><li class="xgplayer-hidemode-color" id="false">色彩</li>\n </ul>\n </xg-hidemode>\n <xg-transparency class="xgplayer-transparency">\n <span>不透明度</span>\n <input class="xgplayer-transparency-line xgplayer-transparency-color xgplayer-transparency-bar xgplayer-transparency-gradient" type="range" min="0" max="100" step="0.1" value="50"></input>\n </xg-transparency>\n <xg-showarea class="xgplayer-showarea">\n <div class="xgplayer-showarea-name">显示区域</div>\n <div class="xgplayer-showarea-control">\n <div class="xgplayer-showarea-control-up">\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-onequarters">1/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-twoquarters selected-color">1/2</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-threequarters">3/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-full">1</span>\n </div>\n <div class="xgplayer-showarea-control-down">\n <div class="xgplayer-showarea-control-down-dots">\n <span class="xgplayer-showarea-onequarters-dot"></span>\n <span class="xgplayer-showarea-twoquarters-dot"></span>\n <span class="xgplayer-showarea-threequarters-dot"></span>\n <span class="xgplayer-showarea-full-dot"></span>\n </div>\n <input class="xgplayer-showarea-line xgplayer-showarea-color xgplayer-showarea-bar xgplayer-gradient" type="range" min="1" max="4" step="1" value="1">\n </div>\n </div>\n </xg-showarea>\n <xg-danmuspeed class="xgplayer-danmuspeed">\n <div class="xgplayer-danmuspeed-name">弹幕速度</div>\n <div class="xgplayer-danmuspeed-control">\n <div class="xgplayer-danmuspeed-control-up">\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-small">慢</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-middle selected-color">中</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-large">快</span>\n </div>\n <div class="xgplayer-danmuspeed-control-down">\n <div class="xgplayer-danmuspeed-control-down-dots">\n <span class="xgplayer-danmuspeed-small-dot"></span>\n <span class="xgplayer-danmuspeed-middle-dot"></span>\n <span class="xgplayer-danmuspeed-large-dot"></span>\n </div>\n <input class="xgplayer-danmuspeed-line xgplayer-danmuspeed-color xgplayer-danmuspeed-bar xgplayer-gradient" type="range" min="50" max="150" step="50" value="100">\n </div>\n </div>\n </xg-danmuspeed>\n <xg-danmufont class="xgplayer-danmufont">\n <div class="xgplayer-danmufont-name">字体大小</div>\n <div class="xgplayer-danmufont-control">\n <div class="xgplayer-danmufont-control-up">\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-small">小</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-middle">中</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-large selected-color">大</span>\n </div>\n <div class="xgplayer-danmufont-control-down">\n <div class="xgplayer-danmufont-control-down-dots">\n <span class="xgplayer-danmufont-small-dot"></span>\n <span class="xgplayer-danmufont-middle-dot"></span>\n <span class="xgplayer-danmufont-large-dot"></span>\n </div>\n <input class="xgplayer-danmufont-line xgplayer-danmufont-color xgplayer-danmufont-bar xgplayer-gradient" type="range" min="20" max="30" step="5" value="25">\n </div>\n </div>\n </xg-danmufont>\n </xg-panel-slider>',{tabindex:7},"xgplayer-panel"),e.once("ready",(function(){e.controls.appendChild(s)}))),e.once("complete",(function(){var t=new a.default(i);if(e.emit("initDefaultDanmu",t),e.danmu=t,e.config.danmu.panel){var n=s.querySelector(".xgplayer-panel-slider"),o=void 0;["mouseenter","touchend","click"].forEach((function(e){s.addEventListener(e,(function(e){e.preventDefault(),e.stopPropagation(),(0,r.addClass)(n,"xgplayer-panel-active"),s.focus(),o=!0}))})),s.addEventListener("mouseleave",(function(e){e.preventDefault(),e.stopPropagation(),(0,r.removeClass)(n,"xgplayer-panel-active"),o=!1})),n.addEventListener("mouseleave",(function(e){e.preventDefault(),e.stopPropagation(),!1===o&&(0,r.removeClass)(n,"xgplayer-panel-active")}));var l=e.config.danmu,u={scroll:s.querySelector(".xgplayer-hidemode-scroll"),top:s.querySelector(".xgplayer-hidemode-top"),bottom:s.querySelector(".xgplayer-hidemode-bottom"),color:s.querySelector(".xgplayer-hidemode-color")},c=function(t){var n=t;["touchend","click"].forEach((function(t){u[n].addEventListener(t,(function(t){"true"!==u[n].getAttribute("id")?(u[n].style.color="#f85959",u[n].setAttribute("id","true"),e.danmu.hide(n)):(u[n].style.color="#aaa",u[n].setAttribute("id","false"),e.danmu.show(n))}))}))};for(var d in u)c(d);var p=s.querySelector(".xgplayer-transparency-line"),f=s.querySelector(".xgplayer-transparency-gradient"),h=50;if(f.style.background="linear-gradient(to right, #f85959 0%, #f85959 "+h+"%, #aaa "+h+"%, #aaa)",p.addEventListener("input",(function(e){e.preventDefault(),e.stopPropagation(),h=e.target.value,f.style.background="linear-gradient(to right, #f85959 0%, #f85959 "+h+"%, #aaa "+h+"%, #aaa)",l.comments.forEach((function(e){e.style.opacity=h/100}))})),s.querySelector(".xgplayer-showarea-line").addEventListener("input",(function(t){t.preventDefault(),t.stopPropagation();var n=t.target.value;e.danmu.config.area.end=n/100,e.config.danmu.area.end=n/100,e.danmu.bulletBtn.main.channel.resize()})),s.querySelector(".xgplayer-danmuspeed-line").addEventListener("input",(function(e){e.preventDefault(),e.stopPropagation();var t=e.target.value;l.comments.forEach((function(e){e.duration=100*(200-t)}))})),s.querySelector(".xgplayer-danmufont-line").addEventListener("input",(function(e){e.preventDefault(),e.stopPropagation();var t=e.target.value;l.comments.forEach((function(e){e.style.fontSize=t+"px"}))})),navigator.userAgent.indexOf("Firefox")>-1)for(var g=0;g<n.querySelectorAll("input").length;g++)n.querySelectorAll("input")[g].style.marginTop="10px"}}))}}},e.exports=t.default},function(e,t,n){
2
- /*! Built @Thu, 23 Feb 2023 07:24:27 GMT */
3
- window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=4)}([function(e,t,n){"use strict";function r(e,t){return e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function a(e,t){e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):r(e,t)||(e.className+=" "+t)}function o(e,t){e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):r(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}))}function i(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}Object.defineProperty(t,"__esModule",{value:!0}),t.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(e);return a.className=r,a.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e?o&&a.setAttribute(r,o):a.setAttribute(r,o)})),a},t.hasClass=r,t.addClass=a,t.removeClass=o,t.toggleClass=function(e,t){t.split(/\s+/g).forEach((function(t){r(e,t)?o(e,t):a(e,t)}))},t.findDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){t.startsWith("#")&&(n=e.getElementById(t.slice(1)))}return n},t.deepCopy=function e(t,n){if("Object"===i(n)&&"Object"===i(t))return Object.keys(n).forEach((function(r){"Object"!==i(n[r])||n[r]instanceof Node?"Array"===i(n[r])?t[r]="Array"===i(t[r])?t[r].concat(n[r]):n[r]:t[r]=n[r]:t[r]?e(t[r],n[r]):t[r]=n[r]})),t},t.typeOf=i,t.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},t.attachEventListener=function(e,t,n,r){r?(e.on(t,n),function(e,t,n,r){e.once(r,(function a(){e.off(t,n),e.off(r,a)}))}(e,t,n,r)):e.on(t,(function r(a){n(a),e.off(t,r)}))},t.styleUtil=function(e,t,n){var r=e.style;try{r[t]=n}catch(e){r.setProperty(t,n)}},t.styleCSSText=function(e,t){var n=e.style;try{n.cssText=t}catch(e){}},t.isNumber=function(e){return"number"==typeof e&&!Number.isNaN(e)},t.throttle=function(e,t){var n=this,r=0;return function(){for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];clearTimeout(r),r=setTimeout((function(){return e.apply(n,o)}),t)}},t.hasOwnProperty=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(r=n(26))&&r.__esModule?r:{default:r},i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,[{key:"setLogger",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.logger=new o.default(e+".js")}}]),e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(18)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=(r=n(5))&&r.__esModule?r:{default:r};n(34),t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DanmuJs=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=d(n(6)),o=n(25),i=d(n(1)),s=d(n(27)),l=d(n(32)),u=n(33),c=n(0);function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=t.DanmuJs=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=n;r.setLogger("danmu"),r.logger&&r.logger.info("danmu.js version: "+o.version);var i=r.config={overlap:!1,area:{start:0,end:1,lines:void 0},live:!1,comments:[],direction:"r2l",needResizeObserver:!1,dropStaleComments:!1,channelSize:void 0,maxCommentsLength:void 0,bulletOffset:void 0,interval:2e3,highScorePriority:!0};if((0,c.deepCopy)(i,e),(0,a.default)(r),r.hideArr=[],r.domObj=new l.default,r.freezeId=null,i.comments.forEach((function(e){e.duration=e.duration?e.duration:5e3,e.mode||(e.mode="scroll")})),r.container=i.container&&1===i.container.nodeType?i.container:null,!r.container)return r.emit("error","container id can't be empty"),p(n,!1);if(i.containerStyle){var u=i.containerStyle;Object.keys(u).forEach((function(e){r.container.style[e]=u[e]}))}return r.live=i.live,r.player=i.player,r.direction=i.direction,(0,c.addClass)(r.container,"danmu"),r.bulletBtn=new s.default(r),r.main=r.bulletBtn.main,r.isReady=!0,r.emit("ready"),n.logger&&n.logger.info("ready"),n.addResizeObserver(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"addResizeObserver",value:function(){var e=this;this.config.needResizeObserver&&(0,u.addObserver)(this.container,(function(){e.logger&&e.logger.info("needResizeObserver"),e.resize()}))}},{key:"start",value:function(){this.logger&&this.logger.info("start"),this.main.start()}},{key:"pause",value:function(){this.logger&&this.logger.info("pause"),this.main.pause()}},{key:"play",value:function(){this.logger&&this.logger.info("play"),this.main.play()}},{key:"stop",value:function(){this.logger&&this.logger.info("stop"),this.main.stop()}},{key:"clear",value:function(){this.logger&&this.logger.info("clear"),this.main.clear()}},{key:"destroy",value:function(){for(var e in(0,u.unObserver)(this.container),this.logger&&this.logger.info("destroy"),this.stop(),this.bulletBtn.destroy(),this.domObj.destroy(),this)delete this[e];this.emit("destroy")}},{key:"sendComment",value:function(e){this.logger&&this.logger.info("sendComment: "+(e.txt||"[DOM Element]"));var t=this.main;e.duration||(e.duration=15e3),e&&e.id&&e.duration&&(e.el||e.txt)&&(e.duration=e.duration?e.duration:5e3,e.style||(e.style={opacity:void 0,fontSize:void 0}),e.style&&(this.opacity&&this.opacity!==e.style.opacity&&(e.style.opacity=this.opacity),this.fontSize&&this.fontSize!==e.style.fontSize&&(e.style.fontSize=this.fontSize)),e.prior||e.realTime?(t.data.unshift(e),e.realTime&&(t.readData(),t.dataHandle())):t.data.push(e),t.keepPoolWatermark())}},{key:"setCommentID",value:function(e,t){var n=this;this.logger&&this.logger.info("setCommentID: oldID "+e+" newID "+t),e&&t&&(this.main.data.some((function(n){return n.id===e&&(n.id=t,!0)})),this.main.queue.some((function(r){return r.id===e&&(r.id=t,r.pauseMove(),"paused"!==n.main.status&&r.startMove(),!0)})))}},{key:"setCommentDuration",value:function(e,t){var n=this;this.logger&&this.logger.info("setCommentDuration: id "+e+" duration "+t),e&&t&&(t=t||5e3,this.main.data.some((function(n){return n.id===e&&(n.duration=t,!0)})),this.main.queue.some((function(r){return r.id===e&&(r.duration=t,r.pauseMove(),"paused"!==n.main.status&&r.startMove(),!0)})))}},{key:"setCommentLike",value:function(e,t){this.logger&&this.logger.info("setCommentLike: id "+e+" like "+t),e&&t&&(this.main.data.some((function(n){return n.id===e&&(n.like=t,!0)})),this.main.queue.some((function(n){return n.id===e&&(n.pauseMove(),n.setLikeDom(t.el,t.style),"paused"!==n.danmu.main.status&&n.startMove(),!0)})))}},{key:"restartComment",value:function(e){if(this.logger&&this.logger.info("restartComment: id "+e),e){var t=this.main;if(this._releaseCtrl(e),"closed"===t.status)return;t.queue.some((function(n){return n.id===e&&("paused"!==t.status?n.startMove(!0):n.status="paused",!0)}))}}},{key:"_releaseCtrl",value:function(e){this.freezeId&&e===this.freezeId&&(this.mouseControl=!1,this.freezeId=null)}},{key:"_freezeCtrl",value:function(e){this.mouseControl=!0,this.freezeId=e}},{key:"freezeComment",value:function(e){this.logger&&this.logger.info("freezeComment: id "+e),e&&(this._freezeCtrl(e),this.main.queue.some((function(t){return t.id===e&&(t.status="forcedPause",t.pauseMove(),t.el&&t.el.style&&(0,c.styleUtil)(t.el,"zIndex",10),!0)})))}},{key:"removeComment",value:function(e){if(this.logger&&this.logger.info("removeComment: id "+e),e){var t=this;t._releaseCtrl(e),t.main.queue.some((function(t){return t.id===e&&(t.remove(),!0)})),t.main.data=t.main.data.filter((function(n){var r=n.id!==e;return r||t.main.dataElHandle([n]),r}))}}},{key:"updateComments",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.logger&&this.logger.info("updateComments: "+e.length+", isClear "+t);var n=this.main;"boolean"==typeof t&&t&&(n.dataElHandle(n.data),n.data=[]),n.data=n.data.concat(e),n.sortData(),n.keepPoolWatermark()}},{key:"setAllDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll",t=this,n=arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.logger&&this.logger.info("setAllDuration: mode "+e+" duration "+n+" force "+r),n&&(n=n||5e3,r&&(this.main.forceDuration=n),this.main.data.forEach((function(t){e===t.mode&&(t.duration=n)})),this.main.queue.forEach((function(r){e===r.mode&&(r.duration=n,r.pauseMove(),"paused"!==t.main.status&&r.startMove())})))}},{key:"setPlayRate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll",n=arguments[1];this.logger&&this.logger.info("setPlayRate: "+n),(0,c.isNumber)(n)&&n>0&&(this.main.playRate=n,this.main.queue.forEach((function(n){t===n.mode&&(n.pauseMove(),"paused"!==e.main.status&&n.startMove())})))}},{key:"setOpacity",value:function(e){this.logger&&this.logger.info("setOpacity: opacity "+e),this.container.style.opacity=e}},{key:"setFontSize",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{reflow:!0};this.logger&&this.logger.info("setFontSize: size "+e+" channelSize "+t),this.fontSize=e+"px",e&&(this.main.data.forEach((function(e){e.style&&(e.style.fontSize=n.fontSize)})),this.main.queue.forEach((function(e){e.options.style||(e.options.style={}),e.options.style.fontSize=n.fontSize,e.setFontSize(n.fontSize),t&&(e.top=e.channel_id[0]*t,e.topInit())}))),t&&(this.config.channelSize=t,r.reflow&&this.main.channel.resizeSync())}},{key:"setArea",value:function(e){this.logger&&this.logger.info("setArea: area "+e),this.config.area=e,!1!==e.reflow&&this.main.channel.resizeSync()}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";this.logger&&this.logger.info("hide: mode "+e),this.hideArr.indexOf(e)<0&&this.hideArr.push(e);var t=this.main.queue.filter((function(t){return e===t.mode||"color"===e&&t.color}));t.forEach((function(e){return e.remove()}))}},{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";this.logger&&this.logger.info("show: mode "+e);var t=this.hideArr.indexOf(e);t>-1&&this.hideArr.splice(t,1)}},{key:"setDirection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"r2l";this.logger&&this.logger.info("setDirection: direction "+e),this.emit("changeDirection",e)}},{key:"resize",value:function(){this.logger&&this.logger.info("resize"),this.emit("channel_resize")}},{key:"status",get:function(){return this.main.status}},{key:"state",get:function(){var e=this.main;return{status:e.status,comments:e.data,bullets:e.queue,displayArea:e.channel.getRealOccupyArea()}}},{key:"containerPos",get:function(){return this.main.channel.containerPos}}]),t}(i.default);t.default=f},function(e,t,n){"use strict";var r,a,o,i,s,l,u,c=n(7),d=n(24),p=Function.prototype.apply,f=Function.prototype.call,h=Object.create,g=Object.defineProperty,y=Object.defineProperties,m=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};a=function(e,t){var n,a;return d(t),a=this,r.call(this,e,n=function(){o.call(a,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},s={on:r=function(e,t){var n;return d(t),m.call(this,"__ee__")?n=this.__ee__:(n=v.value=h(null),g(this,"__ee__",v),v.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:a,off:o=function(e,t){var n,r,a,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(o=0;a=r[o];++o)a!==t&&a.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:i=function(e){var t,n,r,a,o;if(m.call(this,"__ee__")&&(a=this.__ee__[e]))if("object"==typeof a){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(a=a.slice(),t=0;r=a[t];++t)p.call(r,this,o)}else switch(arguments.length){case 1:f.call(a,this);break;case 2:f.call(a,this,arguments[1]);break;case 3:f.call(a,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];p.call(a,this,o)}}},l={on:c(r),once:c(a),off:c(o),emit:c(i)},u=y({},l),e.exports=t=function(e){return null==e?h(u):y(Object(e),l)},t.methods=s},function(e,t,n){"use strict";var r=n(3),a=n(8),o=n(12),i=n(20),s=n(21);(e.exports=function(e,t){var n,a,l,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],r(e)?(n=s.call(e,"c"),a=s.call(e,"e"),l=s.call(e,"w")):(n=l=!0,a=!1),c={value:t,configurable:n,enumerable:a,writable:l},u?o(i(u),c):c}).gs=function(e,t,n){var l,u,c,d;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],r(t)?a(t)?r(n)?a(n)||(c=n,n=void 0):n=void 0:(c=t,t=n=void 0):t=void 0,r(e)?(l=s.call(e,"c"),u=s.call(e,"e")):(l=!0,u=!1),d={get:t,set:n,configurable:l,enumerable:u},c?o(i(c),d):d}},function(e,t,n){"use strict";var r=n(9),a=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!a.test(o.call(e))}},function(e,t,n){"use strict";var r=n(10);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(3),a={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(a,typeof e)}},function(e,t,n){"use strict";e.exports=n(13)()?Object.assign:n(14)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(15),a=n(19),o=Math.max;e.exports=function(e,t){var n,i,s,l=o(arguments.length,2);for(e=Object(a(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},i=1;i<l;++i)r(t=arguments[i]).forEach(s);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(16)()?Object.keys:n(17)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(2),a=Object.keys;e.exports=function(e){return a(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(2),a=Array.prototype.forEach,o=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return a.call(arguments,(function(e){r(e)&&i(Object(e),t)})),t}},function(e,t,n){"use strict";e.exports=n(22)()?String.prototype.contains:n(23)},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&!0===r.contains("dwa")&&!1===r.contains("foo")}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e){e.exports=JSON.parse('{"version":"1.1.8"}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a="undefined"!=typeof window&&window.location.href.indexOf("danmu-debug")>-1,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.constructorName=t||""}return r(e,[{key:"info",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];a&&(t=console).log.apply(t,["[Danmu Log]["+this.constructorName+"]",e].concat(r))}}]),e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(1)),o=s(n(28)),i=n(0);function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.setLogger("control"),n.danmu=e,n.main=new o.default(e),e.config.defaultOff||n.main.start(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"createSwitch",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.logger&&this.logger.info("createSwitch"),this.switchBtn=(0,i.createDom)("dk-switch",'<span class="txt">弹</span>',{},"danmu-switch "+(e?"danmu-switch-active":"")),this.switchBtn}},{key:"destroy",value:function(){for(var e in this.logger&&this.logger.info("destroy"),this.main.destroy(),this)i.hasOwnProperty.call(this,e)&&delete this[e]}}]),t}(a.default);t.default=l,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=l(n(1)),o=l(n(29)),i=l(n(30)),s=n(0);function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.setLogger("main"),n.danmu=e,n.container=e.container,n.channel=new i.default(e),n.data=[].concat(e.config.comments),n.playedData=[],n.queue=[],n.timer=null,n.playRate=1,n.retryStatus="normal",n.interval=e.config.interval,n._status="idle",(0,s.attachEventListener)(e,"bullet_remove",n.updateQueue.bind(n),"destroy"),(0,s.attachEventListener)(e,"changeDirection",(function(e){n.danmu.direction=e}),"destroy"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_cancelDataHandleTimer",value:function(){this.handleId&&(clearTimeout(this.handleId),this.handleId=null),this.handleTimer&&(clearTimeout(this.handleTimer),this.handleTimer=null)}},{key:"destroy",value:function(){for(var e in this.logger&&this.logger.info("destroy"),this._cancelDataHandleTimer(),this.channel.destroy(),this.dataElHandle(this.data),this.data=[],this)delete this[e]}},{key:"updateQueue",value:function(e){this.logger&&this.logger.info("updateQueue");var t=this;t.queue.some((function(n,r){return n.id===e.bullet.id&&(t.queue.splice(r,1),!0)})),t.data.some((function(t){return t.id===e.bullet.id&&(t.attached_=!1,!0)}))}},{key:"init",value:function(){var e=this;e.retryStatus="normal",e.sortData(),function t(){"closed"!==e._status||"stop"!==e.retryStatus?("playing"===e._status&&(e.readData(),e.dataHandle()),"stop"===e.retryStatus&&"paused"!==e._status||(e.handleTimer=setTimeout((function(){e.handleId=requestAnimationFrame((function(){t()}))}),250))):e._cancelDataHandleTimer()}()}},{key:"start",value:function(){this.logger&&this.logger.info("start"),"playing"!==this._status&&(this._status="playing",this.queue=[],this.container.innerHTML="",this.channel.reset(),this.init())}},{key:"stop",value:function(){this.logger&&this.logger.info("stop"),"closed"!==this._status&&(this._status="closed",this.retryStatus="stop",this.queue=[],this.container.innerHTML="",this.channel.reset())}},{key:"clear",value:function(){this.logger&&this.logger.info("clear"),this.channel.reset(),this.dataElHandle(this.data),this.data=[],this.queue=[],this.container.innerHTML=""}},{key:"play",value:function(){var e=this;if("closed"!==this._status){this.logger&&this.logger.info("play"),this._status="playing";var t=this.channel.channels;t&&t.length>0&&["scroll","top","bottom"].forEach((function(n){e.queue.forEach((function(e){e.startMove(),e.resized=!0}));for(var r=0;r<t.length;r++)t[r].queue[n].forEach((function(e){e.resized=!1}))}))}else this.logger&&this.logger.info("play ignored")}},{key:"pause",value:function(){if("closed"!==this._status){this.logger&&this.logger.info("pause"),this._status="paused";var e=this.channel.channels;e&&e.length>0&&this.queue.forEach((function(e){e.pauseMove()}))}else this.logger&&this.logger.info("pause ignored")}},{key:"dataHandle",value:function(){"paused"!==this._status&&"closed"!==this._status&&this.queue.length&&this.queue.forEach((function(e){"waiting"===e.status&&e.startMove()}))}},{key:"readData",value:function(){var e=this.danmu,t=this.interval,n=this.channel,r=e.player,a=void 0,i=void 0;if(e.isReady){if(r){var l=r.currentTime?Math.floor(1e3*r.currentTime):0;i=this.data.filter((function(n){return!n.start&&e.hideArr.indexOf(n.mode)<0&&(!n.color||e.hideArr.indexOf("color")<0)&&(n.start=l),!n.attached_&&e.hideArr.indexOf(n.mode)<0&&(!n.color||e.hideArr.indexOf("color")<0)&&n.start-t<=l&&l<=n.start+t})),e.config.highScorePriority&&i.sort((function(e,t){return t.prior&&!e.prior||(t.score||-1)-(e.score||-1)})),e.live&&(this.dataElHandle(this.data),this.data=[])}else 0===(i=this.data.splice(0,1)).length&&(i=this.playedData.splice(0,1));if(i.length>0){n.updatePos();var u=2;e:for(var c,d=0;d<i.length;d++)if(c=i[d],this.forceDuration&&this.forceDuration!==c.duration&&(c.duration=this.forceDuration),(a=new o.default(e,c))&&!a.bulletCreateFail)if(a.attach(),c.attached_=!0,n.addBullet(a).result)this.queue.push(a),a.topInit(),u=2;else{for(var p in a.detach(),a)s.hasOwnProperty.call(a,p)&&delete a[p];if(a=null,c.attached_=!1,c.noDiscard&&(c.prior?this.data.unshift(c):this.data.push(c)),0===u)break e;u--}else{if(0===u)break e;u--}}}}},{key:"sortData",value:function(){this.data.sort((function(e,t){return(e.start||-1)-(t.start||-1)}))}},{key:"keepPoolWatermark",value:function(){var e=this.danmu,t=e.config,n=e.player,r=this.data,a=[],o=0;if("number"==typeof t.maxCommentsLength&&r.length>t.maxCommentsLength){o=r.length-t.maxCommentsLength;for(var i,s=0;s<o;s++)(i=r[s]).prior&&!i.attached_&&a.push(r[s])}else if(t.dropStaleComments&&n&&n.currentTime){var l=Math.floor(1e3*n.currentTime)-t.interval;if(l>0)for(var u,c=0;c<r.length;c++)if((u=r[c]).prior&&!u.attached_&&a.push(r[c]),u.start>l){o=c;break}}o>0&&(this.dataElHandle(r,0,o),r.splice(0,o),this.data=a.concat(r))}},{key:"dataElHandle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments[2];if(Number.isNaN(n))n=e.length;else if(n>e.length)throw"dataElHandle invalid range: "+t+"-"+n;for(var r=t;r<n;r++){var a=e[r];if(a&&"function"==typeof a.onElDestroy)try{a.onElDestroy(a),a.onElDestroy=null}catch(e){console.error("danmu onElDestroy fail:",e)}}}},{key:"status",get:function(){return this._status}}]),t}(a.default);t.default=u,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bullet=void 0;var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(r=n(1))&&r.__esModule?r:{default:r},i=n(0);function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var l=t.Bullet=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),a=r,o=void 0,l="",u=n.style||{};if(r.setLogger("bullet"),r.danmu=e,r.options=n,r.duration=n.duration,r.id=n.id,r.container=e.container,r.start=n.start,r.prior=n.prior,r.realTime=n.realTime,r.color=n.color,r.bookChannelId=n.bookChannelId,r.direction=e.direction,r.reuseDOM=!0,r.domObj=e.domObj,n.el&&1===n.el.nodeType){if(n.el.parentNode)return s(r,{bulletCreateFail:!0});if(e.config.disableCopyDOM||n.disableCopyDOM)r.reuseDOM=!1,o=n.el;else{var c=(0,i.copyDom)(n.el);n.eventListeners&&n.eventListeners.length>0&&n.eventListeners.forEach((function(e){c.addEventListener(e.event,e.listener,e.useCapture||!1)})),(o=r.domObj.use()).childNodes.length>0&&(o.innerHTML=""),o.textContent&&(o.textContent=""),o.appendChild(c)}}else(o=r.domObj.use()).textContent=n.txt;r.onChangeDirection=function(e){a.direction=e},r.danmu.on("changeDirection",r.onChangeDirection);var d=void 0;if((0,i.isNumber)(e.config.bulletOffset)&&e.config.bulletOffset>=0)d=e.config.bulletOffset;else{var p=e.containerPos;d=p.width/10>100?100:p.width/10}var f=n.realTime?0:Math.floor(Math.random()*d),h=r.updateOffset(f,!0);return u.left=h,Object.keys(u).forEach((function(e){l+=e+":"+u[e]+";"})),(0,i.styleCSSText)(o,l),"top"===n.mode||"bottom"===n.mode?r.mode=n.mode:r.mode="scroll",r.el=o,n.like&&n.like.el&&r.setLikeDom(n.like.el,n.like.style),r.status="waiting",r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"updateOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.random=e;var n=this.danmu.containerPos.width+e+"px";return t||(0,i.styleUtil)(this.el,"left",this.danmu.containerPos.width+e+"px"),n}},{key:"attach",value:function(){var e=this.el;this.container.contains(e)||this.container.appendChild(e),this.elPos=e.getBoundingClientRect(),"b2t"===this.direction?(this.width=this.elPos.height,this.height=this.elPos.width):(this.width=this.elPos.width,this.height=this.elPos.height),this.moveV&&(this.duration=(this.danmu.containerPos.width+this.random+this.width)/this.moveV*1e3),this.danmu.config&&(this.danmu.config.mouseControl&&(this.mouseoverFunWrapper=this.mouseoverFun.bind(this),e.addEventListener("mouseover",this.mouseoverFunWrapper,!1)),this.danmu.config.mouseEnterControl&&(this.mouseEnterFunWrapper=this.mouseoverFun.bind(this),e.addEventListener("mouseenter",this.mouseEnterFunWrapper,!1))),this._onTransitionEnd=this._onTransitionEnd.bind(this),e.addEventListener("transitionend",this._onTransitionEnd,!1)}},{key:"detach",value:function(){var e=this.el;if(e){var t=this.danmu.config;t&&(t.mouseControl&&e.removeEventListener("mouseover",this.mouseoverFunWrapper,!1),t.mouseEnterControl&&e.removeEventListener("mouseenter",this.mouseEnterFunWrapper,!1)),e.removeEventListener("transitionend",this._onTransitionEnd,!1),this.reuseDOM?this.domObj.unused(e):e.parentNode&&e.parentNode.removeChild(e),this.el=null}this.elPos=void 0,this.danmu.off("changeDirection",this.onChangeDirection)}},{key:"mouseoverFun",value:function(e){this.danmu&&this.danmu.mouseControl&&this.danmu.config.mouseControlPause||"waiting"===this.status||"end"===this.status||this.danmu&&this.danmu.emit("bullet_hover",{bullet:this,event:e})}},{key:"_onTransitionEnd",value:function(){this.status="end",this.remove(!1)}},{key:"topInit",value:function(){this.logger&&this.logger.info("topInit #"+(this.options.txt||"[DOM Element]")+"#"),"b2t"===this.direction?((0,i.styleUtil)(this.el,"transformOrigin","left top"),(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY("+this.danmu.containerPos.height+"px) translateZ(0px) rotate(90deg)"),(0,i.styleUtil)(this.el,"transition","transform 0s linear 0s")):(0,i.styleUtil)(this.el,"top",this.top+"px")}},{key:"pauseMove",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this;if("paused"!==t.status&&("forcedPause"!==t.status&&(this.status="paused"),t._moveV=void 0,this.el))if("scroll"===this.mode){var n=t.danmu.containerPos;if(e){var r=((new Date).getTime()-t.moveTime)/1e3,a=r*this.moveV,o=0;o=t.moveMoreS-a>=0?"b2t"===this.direction?(t.moveMoreS-a)/t.moveContainerHeight*n.height:(t.moveMoreS-a)/t.moveContainerWidth*n.width:t.moveMoreS-a,"b2t"===this.direction?(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY("+o+"px) translateZ(0px) rotate(90deg)"):(0,i.styleUtil)(this.el,"left",o+"px")}else"b2t"===this.direction?(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY("+(this.el.getBoundingClientRect().top-n.top)+"px) translateZ(0px) rotate(90deg)"):(0,i.styleUtil)(this.el,"left",this.el.getBoundingClientRect().left-n.left+"px");"b2t"===this.direction||(0,i.styleUtil)(this.el,"transform","translateX(0px) translateY(0px) translateZ(0px)"),(0,i.styleUtil)(this.el,"transition","transform 0s linear 0s")}else this.pastDuration&&this.startTime?this.pastDuration=this.pastDuration+(new Date).getTime()-this.startTime:this.pastDuration=1}},{key:"startMove",value:function(e){if(this.hasMove||(this.danmu.emit("bullet_start",this),this.hasMove=!0),("forcedPause"!==this.status||e)&&this.el&&"start"!==this.status)if(this.status="start",(0,i.styleUtil)(this.el,"backface-visibility","hidden"),(0,i.styleUtil)(this.el,"perspective","500em"),"scroll"===this.mode){var t=this.danmu.containerPos;if("b2t"===this.direction){var n=(this.el.getBoundingClientRect().bottom-t.top)/this.moveV;(0,i.styleUtil)(this.el,"transition","transform "+n+"s linear 0s"),(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY(-"+this.height+"px) translateZ(0px) rotate(90deg)"),this.moveTime=(new Date).getTime(),this.moveMoreS=this.el.getBoundingClientRect().top-t.top,this.moveContainerHeight=t.height}else{if(!this.el)return;var r=this.el.getBoundingClientRect(),a=r.right-t.left,o=a/this.moveV;r.right>t.left?((0,i.styleUtil)(this.el,"transition","transform "+o+"s linear 0s"),(0,i.styleUtil)(this.el,"transform","translateX(-"+a+"px) translateY(0px) translateZ(0px)"),this.moveTime=(new Date).getTime(),this.moveMoreS=r.left-t.left,this.moveContainerWidth=t.width):(this.status="end",this.remove())}}else{var s=(new Date).getTime(),l=(this.startTime&&s-this.startTime>this.duration?s-this.startTime:this.duration)/1e3;(0,i.styleUtil)(this.el,"left","50%"),(0,i.styleUtil)(this.el,"margin","0 0 0 -"+this.width/2+"px"),(0,i.styleUtil)(this.el,"visibility","hidden"),(0,i.styleUtil)(this.el,"transition","visibility "+l+"s 0s"),this.pastDuration||(this.pastDuration=1),this.startTime=s}}},{key:"remove",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.logger&&this.logger.info("remove #"+(this.options.txt||"[DOM Element]")+"#");var t=this;e&&t.pauseMove(),t.el&&t.el.parentNode&&(t.detach(),this.options.el&&1===this.options.el.nodeType&&this.danmu.config.disableCopyDOM&&(0,i.styleUtil)(this.options.el,"transform","none"),t.danmu.emit("bullet_remove",{bullet:t}))}},{key:"setFontSize",value:function(e){this.el&&(this.el.style.fontSize=e)}},{key:"setLikeDom",value:function(e,t){if(e&&(Object.keys(t).forEach((function(n){e.style[n]=t[n]})),e.className="danmu-like",this.el)){var n=this.el.querySelector(".danmu-like");n&&this.el.removeChild(n),this.el.innerHTML=""+this.el.innerHTML+e.outerHTML}return e}},{key:"moveV",get:function(){var e=this._moveV;if(!e){if(this.options.moveV)e=this.options.moveV;else if(this.elPos){var t=this.danmu.containerPos;e=("b2t"===this.direction?t.height+this.height:t.width+this.width)/this.duration*1e3}e&&(e*=this.danmu.main.playRate,this._moveV=e)}return e}}]),t}(o.default);t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(r=n(1))&&r.__esModule?r:{default:r},i=n(0),s=n(31),l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=n;return r.setLogger("channel"),r.danmu=e,r.width=0,r.height=0,r.reset(!0),r.direction=e.direction,r.channels=[],r.updatePos(),(0,i.attachEventListener)(n.danmu,"bullet_remove",(function(e){r.removeBullet(e.bullet)}),"destroy"),(0,i.attachEventListener)(n.danmu,"changeDirection",(function(e){r.direction=e}),"destroy"),(0,i.attachEventListener)(n.danmu,"channel_resize",(function(){r.resize()}),"destroy"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"destroy",value:function(){for(var e in this.logger&&this.logger.info("destroy"),this.channels.splice(0,this.channels.length),this._cancelResizeTimer(),this)i.hasOwnProperty.call(this,e)&&delete this[e]}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger&&this.logger.info("reset");var t=this,n=t.danmu,r=n.container,a=n.bulletBtn;function o(){var e=r.getBoundingClientRect();t.width=e.width,t.height=e.height,t.resetId&&(cancelAnimationFrame(t.resetId),t.resetId=null);var n=t._initChannels(),a=n.channelSize,o=n.channelCount,i=n.channels;t.channelCount=o,t.channels=i,"b2t"===t.direction?t.channelWidth=a:t.channelHeight=a}t.container=r,a&&a.main&&a.main.queue.forEach((function(e){e.remove()})),t.channels&&t.channels.length>0&&["scroll","top","bottom"].forEach((function(e){for(var n=0;n<t.channels.length;n++)t.channels[n].queue[e].forEach((function(e){e.remove()}))})),a&&a.main&&a.main.data&&a.main.data.forEach((function(e){e.attached_=!1})),e?this.resetId=requestAnimationFrame(o):o()}},{key:"getRealOccupyArea",value:function(){return{width:this.width,height:this.height}}},{key:"updatePos",value:function(){var e=this.container.getBoundingClientRect();this.containerPos=e,this.containerWidth=e.width,this.containerHeight=e.height,this.containerTop=e.top,this.containerBottom=e.bottom,this.containerLeft=e.left,this.containerRight=e.right}},{key:"addBullet",value:function(e){var t=this,n=this.danmu,r=this.channels,a=void 0,o=void 0,i=void 0;if("b2t"===t.direction?(o=this.channelWidth,i=Math.ceil(e.width/o)):(a=this.channelHeight,i=Math.ceil(e.height/a)),i>r.length)return{result:!1,message:"exceed channels.length, occupy="+i+",channelsSize="+r.length};for(var s=!0,l=void 0,u=-1,c=0,d=r.length;c<d;c++)if(r[c].queue[e.mode].some((function(t){return t.id===e.id})))return{result:!1,message:"exited, channelOrder="+c+",danmu_id="+e.id};if("scroll"===e.mode)for(var p=0,f=r.length-i;p<=f;p++){s=!0;for(var h=p;h<p+i;h++){if((l=r[h]).operating.scroll){s=!1;break}if(l.bookId.scroll&&l.bookId.scroll!==e.id){s=!1;break}l.operating.scroll=!0;var g=l.queue.scroll[0];if(g){var y=g.el.getBoundingClientRect();if("b2t"===t.direction){if(y.bottom>=t.containerPos.bottom){s=!1,l.operating.scroll=!1;break}}else if(y.right>=t.containerPos.right){s=!1,l.operating.scroll=!1;break}var m=void 0,v=g.moveV,x=void 0,b=e.moveV,w=void 0;if("b2t"===t.direction?(x=(m=y.bottom-t.containerTop)/v,w=t.containerHeight+e.random-m):(x=(m=y.right-t.containerLeft)/v,w=t.containerWidth+e.random-m),b>v){var k=w/(b-v);if(n.config.bOffset||(n.config.bOffset=0),x+n.config.bOffset>=k){var _=x*b-t.containerPos.width;_>0&&e.updateOffset(_+(1+Math.ceil(5*Math.random())))}}}l.operating.scroll=!1}if(s){u=p;break}}else if("top"===e.mode)for(var O=0,E=r.length-i;O<=E;O++){s=!0;for(var j=O;j<O+i;j++){if(j>Math.floor(r.length/2)){s=!1;break}if((l=r[j]).operating[e.mode]){s=!1;break}if((l.bookId[e.mode]||e.prior)&&l.bookId[e.mode]!==e.id){s=!1;break}if(l.operating[e.mode]=!0,l.queue[e.mode].length>0){s=!1,l.operating[e.mode]=!1;break}l.operating[e.mode]=!1}if(s){u=O;break}}else if("bottom"===e.mode)for(var C=r.length-i;C>=0;C--){s=!0;for(var z=C;z<C+i;z++){if(z<=Math.floor(r.length/2)){s=!1;break}if((l=r[z]).operating[e.mode]){s=!1;break}if((l.bookId[e.mode]||e.prior)&&l.bookId[e.mode]!==e.id){s=!1;break}if(l.operating[e.mode]=!0,l.queue[e.mode].length>0){s=!1,l.operating[e.mode]=!1;break}l.operating[e.mode]=!1}if(s){u=C;break}}if(-1!==u){for(var M=u,L=u+i;M<L;M++)(l=r[M]).operating[e.mode]=!0,l.queue[e.mode].unshift(e),e.prior&&(delete l.bookId[e.mode],t.logger&&t.logger.info(M+"号轨道恢复正常使用")),l.operating[e.mode]=!1;return e.prior&&(t.logger&&t.logger.info(e.id+"号优先弹幕运行完毕"),delete e.bookChannelId,n.player&&n.bulletBtn.main.data.some((function(t){return t.id===e.id&&(delete t.bookChannelId,!0)}))),e.channel_id=[u,i],e.el.setAttribute("data-line-index",u+1),"b2t"===t.direction?(e.top=u*o,t.danmu.config.area&&t.danmu.config.area.start&&(e.top+=t.containerWidth*t.danmu.config.area.start)):(e.top=u*a,t.danmu.config.area&&t.danmu.config.area.start&&(e.top+=t.containerHeight*t.danmu.config.area.start)),{result:e,message:"success"}}if(e.options.realTime){var S=0,P=-1,T=null;if(t.danmu.bulletBtn.main.queue.forEach((function(e,n){!e.prior&&!e.options.realTime&&e.el&&e.el.getBoundingClientRect().left>t.containerPos.right&&e.start>=S&&(S=e.start,P=n,T=e)})),T){T.remove(),t.removeBullet(T),t.danmu.bulletBtn.main.queue.splice(P,1),e.channel_id=T.channel_id;for(var D=T.channel_id[0],I=T.channel_id[0]+T.channel_id[1];D<I;D++)(l=r[D]).operating[e.mode]=!0,l.queue[e.mode].unshift(e),e.prior&&delete l.bookId[e.mode],l.operating[e.mode]=!1;return e.top=T.top,t.danmu.config.area&&t.danmu.config.area.start&&(e.top+=t.containerHeight*t.danmu.config.area.start),{result:e,message:"success"}}}if(e.prior)if(e.bookChannelId||t.danmu.live)n.player&&n.bulletBtn.main.data.some((function(n){return n.id===e.id&&(t.logger&&t.logger.info(e.id+"号优先弹幕将于2秒后再次请求注册"),n.start+=2e3,!0)}));else{u=-1;for(var A=0,q=r.length-i;A<=q;A++){s=!0;for(var R=A;R<A+i;R++)if(r[R].bookId[e.mode]){s=!1;break}if(s){u=A;break}}if(-1!==u){for(var B=u;B<u+i;B++)r[B].bookId[e.mode]=e.id,t.logger&&t.logger.info(B+"号轨道被"+e.id+"号优先弹幕预定");n.player&&n.bulletBtn.main.data.some((function(n){return n.id===e.id&&(t.logger&&t.logger.info(e.id+"号优先弹幕将于2秒后再次请求注册"),n.start+=2e3,n.bookChannelId=[u,i],t.logger&&t.logger.info(e.id+"号优先弹幕预定了"+u+"~"+(u+i-1)+"号轨道"),!0)}))}}return{result:!1,message:"no surplus will right"}}},{key:"removeBullet",value:function(e){this.logger&&this.logger.info("removeBullet "+(e.options.txt||"[DOM Element]"));for(var t=this.channels,n=e.channel_id,r=void 0,a=n[0],o=n[0]+n[1];a<o;a++)if(r=t[a]){r.operating[e.mode]=!0;var i=-1;r.queue[e.mode].some((function(t,n){return t.id===e.id&&(i=n,!0)})),i>-1&&r.queue[e.mode].splice(i,1),r.operating[e.mode]=!1}e.options.loop&&this.danmu.bulletBtn.main.playedData.push(e.options)}},{key:"resizeSync",value:function(){this.resize(!0)}},{key:"_initChannels",value:function(){var e=this.danmu.config,t=e.channelSize||(/mobile/gi.test(navigator.userAgent)?10:12),n=void 0;if(e.area){var r=e.area,a=r.lines,o=r.start,l=r.end;if((0,s.validAreaLineRule)(a))n=a,"b2t"===this.direction?this.width=n*t:this.height=n*t;else if(o>=0&&l>=o){var u=l-o;"b2t"===this.direction?this.width=Math.floor(this.width*u):this.height=Math.floor(this.height*u)}}(0,i.isNumber)(n)||(n="b2t"===this.direction?Math.floor(this.width/t):Math.floor(this.height/t));for(var c=[],d=0;d<n;d++)c[d]={id:d,queue:{scroll:[],top:[],bottom:[]},operating:{scroll:!1,top:!1,bottom:!1},bookId:{}};return{channelSize:t,channelCount:n,channels:c}}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger&&this.logger.info("resize");var t=this;function n(e,t){e[t]={id:t,queue:{scroll:[],top:[],bottom:[]},operating:{scroll:!1,top:!1,bottom:!1},bookId:{}}}function r(e,r){function a(n){["scroll","top"].forEach((function(r){t.channels[n].queue[r].forEach((function(t){t.el&&e[n].queue[r].push(t)}))}))}function o(n){t.channels[n].queue.bottom.forEach((function(a){if(a.el&&(e[n+e.length-t.channels.length].queue.bottom.push(a),a.channel_id[0]+a.channel_id[1]-1===n)){var o=[].concat(a.channel_id);a.channel_id=[o[0]-t.channels.length+e.length,o[1]],a.top=a.channel_id[0]*r,t.danmu.config.area&&t.danmu.config.area.start&&(a.top+=t.containerHeight*t.danmu.config.area.start),a.topInit()}}))}for(var i=0;i<t.channels.length;i++)n(e,i),a(i),o(i);for(var s=function(t){["scroll","top","bottom"].forEach((function(n){e[t].queue[n].forEach((function(e){e.resized=!1}))}))},l=0;l<e.length;l++)s(l);t.channels=e,"b2t"===t.direction?t.channelWidth=r:t.channelHeight=r}function a(e,r){for(var a=["scroll","top","bottom"],o=function(o){n(e,o),a.forEach((function(n){if("top"===n&&o>Math.floor(e.length/2));else if("bottom"===n&&o<=Math.floor(e.length/2));else{var a="bottom"===n?o-e.length+t.channels.length:o;t.channels[a].queue[n].forEach((function(i,s){if(i.el){if(e[o].queue[n].push(i),"bottom"===n&&i.channel_id[0]+i.channel_id[1]-1===a){var l=[].concat(i.channel_id);i.channel_id=[l[0]-t.channels.length+e.length,l[1]],i.top=i.channel_id[0]*r,t.danmu.config.area&&t.danmu.config.area.start&&(i.top+=t.containerHeight*t.danmu.config.area.start),i.topInit()}t.channels[a].queue[n].splice(s,1)}}))}}))},i=0;i<e.length;i++)o(i);var s=function(t){a.forEach((function(n){e[t].queue[n].forEach((function(e){e.resized=!1}))}))};for(i=0;i<e.length;i++)s(i);t.channels=e,"b2t"===t.direction?t.channelWidth=r:t.channelHeight=r}function o(){var e=t.danmu,n=e.container,o=e.bulletBtn;t.container=n,t.updatePos(),t._cancelResizeTimer(),o.main.data&&o.main.data.forEach((function(e){e.bookChannelId&&(delete e.bookChannelId,t.logger&&t.logger.info("resize导致"+e.id+"号优先弹幕预定取消"))})),t.logger&&t.logger.info("resize导致所有轨道恢复正常使用"),t.width=t.containerWidth,t.height=t.containerHeight;var i=t._initChannels(),s=i.channelSize,l=i.channels;t.channels&&(t.channels.length<=l.length?r(l,s):a(l,s)),t.resizing=!1}t.resizing||(t.resizing=!0,e?o():(this._cancelResizeTimer(),this.resizeId=requestAnimationFrame(o)))}},{key:"_cancelResizeTimer",value:function(){this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=null)}}]),t}(o.default);t.default=l,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validAreaLineRule=function(e){return"number"==typeof e&&e>=0&&Number.isInteger(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t={initDOM:function(){return document.createElement("div")},initSize:10},this.init(t)}return r(e,[{key:"init",value:function(e){this.idleList=[],this.usingList=[],this._id=0,this.options=e,this._expand(e.initSize)}},{key:"use",value:function(){this.idleList.length||this._expand(1);var e=this.idleList.shift();return this.usingList.push(e),e}},{key:"unused",value:function(e){var t=this.usingList.indexOf(e);t<0||(this.usingList.splice(t,1),e.style.opacity=0,this.idleList.push(e))}},{key:"_expand",value:function(e){for(var t=0;t<e;t++)this.idleList.push(this.options.initDOM(this._id++))}},{key:"destroy",value:function(){for(var e=0;e<this.idleList.length;e++)this.idleList[e].innerHTML="",this.idleList[e].textcontent="",this.clearElementStyle(this.idleList[e]);for(var t=0;t<this.usingList.length;t++)this.usingList[t].innerHTML="",this.usingList[t].textcontent="",this.clearElementStyle(this.usingList[t]);for(var n in this)a.hasOwnProperty.call(this,n)&&delete this[n]}},{key:"clearElementStyle",value:function(e){var t="undefined"!=typeof window?window.navigator.userAgent:null;t&&(t.indexOf("MSIE ")>-1||t.indexOf("Trident/")>-1?(0,a.styleUtil)(e,"transform","none"):e.setAttribute("style",""))}}]),e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyObserver=t.unObserver=t.addObserver=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=new(function(){function e(){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__handlers=[],window.ResizeObserver)try{this.observer=new window.ResizeObserver((0,a.throttle)((function(e){t.__trigger(e)}),100))}catch(e){}}return r(e,[{key:"addObserver",value:function(e,t){if(this.observer){this.observer&&this.observer.observe(e);for(var n=this.__handlers,r=-1,a=0;a<n.length;a++)n[a]&&e===n[a].target&&(r=a);r>-1?this.__handlers[r].handler.push(t):this.__handlers.push({target:e,handler:[t]})}}},{key:"unObserver",value:function(e){var t=-1;this.__handlers.map((function(n,r){e===n.target&&(t=r)})),this.observer&&this.observer.unobserve(e),t>-1&&this.__handlers.splice(t,1)}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){t[n].handler&&t[n].handler.map((function(e){try{e()}catch(e){console.error(e)}}));break}}},{key:"__trigger",value:function(e){var t=this;e.map((function(e){t.__runHandler(e.target)}))}}]),e}());t.addObserver=function(e,t){o.addObserver(e,t)},t.unObserver=function(e,t){o.unObserver(e,t)},t.destroyObserver=function(e,t){o.destroyObserver(e,t)}},function(e,t,n){var r=n(35);"string"==typeof r&&(r=[[e.i,r,""]]),n(37)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(36)(!1)).push([e.i,".danmu{overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.danmu>*{position:absolute;white-space:nowrap}.danmu-switch{width:32px;height:20px;border-radius:100px;background-color:#ccc;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;cursor:pointer;position:relative;text-align:center;margin:10px auto}.danmu-switch.danmu-switch-active{padding-left:12px;background-color:#f85959}.danmu-switch span.txt{width:20px;height:20px;line-height:20px;text-align:center;display:block;border-radius:100px;background-color:#fff;-webkit-box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);font-family:PingFangSC;font-size:10px;font-weight:500;color:#f44336}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",a=e[3];if(!a)return r;if(t&&"function"==typeof btoa){var o=(n=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),i=a.sources.map((function(e){return"/*# sourceURL="+a.sourceRoot+e+" */"}));return[r].concat(i).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(r[o]=!0)}for(a=0;a<e.length;a++){var i=e[a];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),t.push(i))}},t}},function(e,t,n){var r,a,o={},i=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,d=[],p=n(38);function f(e,t){for(var n=0;n<e.length;n++){var r=e[n],a=o[r.id];if(a){a.refs++;for(var i=0;i<a.parts.length;i++)a.parts[i](r.parts[i]);for(;i<r.parts.length;i++)a.parts.push(x(r.parts[i],t))}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(x(r.parts[i],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function h(e,t){for(var n=[],r={},a=0;a<e.length;a++){var o=e[a],i=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[i]?r[i].parts.push(s):n.push(r[i]={id:i,parts:[s]})}return n}function g(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,a)}}function y(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),v(t,e.attrs),g(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,r,a,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var i=c++;n=u||(u=m(t)),r=k.bind(null,n,i,!1),a=k.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),g(e,t),t}(t),r=O.bind(null,n,t),a=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=_.bind(null,n),a=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],a=0;a<n.length;a++){var i=n[a];(s=o[i.id]).refs--,r.push(s)}for(e&&f(h(e,t),t),a=0;a<r.length;a++){var s;if(0===(s=r[a]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete o[s.id]}}}};var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function k(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function _(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function O(e,t,n){var r=n.css,a=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||o)&&(r=p(r)),a&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var i=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}}])},function(e,t,n){"use strict";n.r(t),t.default='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40">\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M36.5,18.73a1.19,1.19,0,0,0,1-1.14V16.33a1.2,1.2,0,0,0-1-1.13l-.61-.08a1.75,1.75,0,0,1-1.3-.86l-.21-.36-.2-.36A1.72,1.72,0,0,1,34,12l.23-.58a1.18,1.18,0,0,0-.5-1.42l-1.1-.62a1.18,1.18,0,0,0-1.47.3l-.39.51a1.82,1.82,0,0,1-1.41.72c-.44,0-1.88-.27-2.22-.7l-.39-.49a1.18,1.18,0,0,0-1.48-.28l-1.09.64a1.19,1.19,0,0,0-.47,1.43l.25.59a1.87,1.87,0,0,1-.08,1.58c-.26.37-1.17,1.5-1.71,1.58l-.63.09a1.19,1.19,0,0,0-1,1.14l0,1.27a1.17,1.17,0,0,0,1,1.12l.61.08a1.74,1.74,0,0,1,1.3.87l.21.36.2.35A1.69,1.69,0,0,1,24,22.08l-.23.59a1.19,1.19,0,0,0,.5,1.42l1.1.62a1.19,1.19,0,0,0,1.48-.31l.38-.5a1.83,1.83,0,0,1,1.41-.72c.44,0,1.88.25,2.22.69l.39.49a1.18,1.18,0,0,0,1.48.28L33.86,24a1.19,1.19,0,0,0,.47-1.43L34.09,22a1.84,1.84,0,0,1,.07-1.58c.26-.37,1.17-1.5,1.72-1.58ZM31,18.94a2.76,2.76,0,0,1-4.65-1.2A2.71,2.71,0,0,1,27,15.13a2.76,2.76,0,0,1,4.64,1.2A2.7,2.7,0,0,1,31,18.94Z"/>\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M32,0H3.59A3.59,3.59,0,0,0,0,3.59v17A3.59,3.59,0,0,0,3.59,24.2H19.72a12.59,12.59,0,0,1-.81-1.2A11.73,11.73,0,0,1,35.54,7.28V3.59A3.59,3.59,0,0,0,32,0ZM13,14.18H4.29a1.52,1.52,0,0,1,0-3H13a1.52,1.52,0,0,1,0,3ZM16.45,8H4.29a1.51,1.51,0,0,1,0-3H16.45a1.51,1.51,0,1,1,0,3Z"/>\n</svg>\n'},function(e,t,n){var r=n(8);"string"==typeof r&&(r=[[e.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(10)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(9)(!1)).push([e.i,".xgplayer-skin-default .danmu-switch{-webkit-order:6;-moz-box-ordinal-group:7;order:6;z-index:26}.xgplayer-skin-default .xgplayer-danmu{display:none;position:absolute;top:0;left:0;right:0;height:100%;overflow:hidden;z-index:9;outline:none;pointer-events:none}.xgplayer-skin-default .xgplayer-danmu>*{position:absolute;white-space:nowrap;z-index:9;pointer-events:auto}.xgplayer-skin-default .xgplayer-danmu.xgplayer-has-danmu{display:block}.xgplayer-skin-default .xgplayer-panel{outline:none;-webkit-order:7;-moz-box-ordinal-group:8;order:7;width:40px;height:40px;display:inline-block;position:relative;font-family:PingFangSC-Regular;font-size:13px;color:hsla(0,0%,100%,.8);z-index:36}.xgplayer-skin-default .xgplayer-panel .xgplayer-panel-icon{cursor:pointer;position:absolute;margin-left:5px;top:10px}.xgplayer-skin-default .xgplayer-panel-active{display:block!important;bottom:30px}.xgplayer-skin-default .xgplayer-panel-slider{z-index:36;display:none;position:absolute;width:230px;height:230px;background:rgba(0,0,0,.54);border-radius:1px;padding:10px 20px;outline:none;left:-115px;bottom:40px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode{padding-bottom:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode-radio li{display:inline;list-style:none;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode ul{display:-webkit-flex;display:-moz-box;display:flex;-webkit-justify-content:space-around;justify-content:space-around}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode li{margin:0 12px;font-size:11px;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode-font{margin-bottom:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency{display:block;margin-top:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-moz-range-progress{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border-radius:4px;background:linear-gradient(90deg,#f85959,#f85959 100%,#aaa)}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea{display:block;margin-top:8px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-threequarters,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-twoquarters{margin-left:-6px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-full{margin-right:3px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-full-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-onequarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-threequarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-twoquarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-zero-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed{display:block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-large-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-middle-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-small-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont{display:block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-large-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-middle-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-small-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),o=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(o).concat([a]).join("\n")}var i;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(r[o]=!0)}for(a=0;a<e.length;a++){var i=e[a];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),t.push(i))}},t}},function(e,t,n){var r,a,o={},i=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,d=[],p=n(11);function f(e,t){for(var n=0;n<e.length;n++){var r=e[n],a=o[r.id];if(a){a.refs++;for(var i=0;i<a.parts.length;i++)a.parts[i](r.parts[i]);for(;i<r.parts.length;i++)a.parts.push(x(r.parts[i],t))}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(x(r.parts[i],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function h(e,t){for(var n=[],r={},a=0;a<e.length;a++){var o=e[a],i=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[i]?r[i].parts.push(s):n.push(r[i]={id:i,parts:[s]})}return n}function g(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,a)}}function y(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function m(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),g(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,r,a,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var i=c++;n=u||(u=m(t)),r=k.bind(null,n,i,!1),a=k.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),g(e,t),t}(t),r=O.bind(null,n,t),a=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=_.bind(null,n),a=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],a=0;a<n.length;a++){var i=n[a];(s=o[i.id]).refs--,r.push(s)}e&&f(h(e,t),t);for(a=0;a<r.length;a++){var s;if(0===(s=r[a]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete o[s.id]}}}};var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function k(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function _(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function O(e,t,n){var r=n.css,a=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||o)&&(r=p(r)),a&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var i=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}}]);
1
+ window.PlayerControls=window.PlayerControls||{},window.PlayerControls.danmu=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.util=t.PresentationMode=void 0,t.createDom=i,t.hasClass=s,t.addClass=l,t.removeClass=u,t.toggleClass=c,t.findDom=d,t.padStart=p,t.format=f,t.event=h,t.typeOf=g,t.deepCopy=y,t.getBgImage=m,t.copyDom=v,t._setInterval=x,t._clearInterval=b,t.createImgBtn=w,t.isWeiXin=k,t.isUc=_,t.computeWatchDur=O,t.offInDestroy=E,t.on=C,t.once=j,t.getBuffered2=z,t.checkIsBrowser=M,t.setStyle=S,t.checkWebkitSetPresentationMode=function(e){return"function"==typeof e.webkitSetPresentationMode};var r,a=n(3),o=(r=a)&&r.__esModule?r:{default:r};function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(e);return a.className=r,a.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e?o&&a.setAttribute(r,o):a.setAttribute(r,o)})),a}function s(e,t){return!!e&&(e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className&&!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)")))}function l(e,t){e&&(e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):s(e,t)||(e.className+=" "+t))}function u(e,t){e&&(e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):s(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")})))}function c(e,t){e&&t.split(/\s+/g).forEach((function(t){s(e,t)?u(e,t):l(e,t)}))}function d(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){0===t.indexOf("#")&&(n=e.getElementById(t.slice(1)))}return n}function p(e,t,n){for(var r=String(n),a=t>>0,o=Math.ceil(a/r.length),i=[],s=String(e);o--;)i.push(r);return i.join("").substring(0,a-s.length)+s}function f(e){if(window.isNaN(e))return"";var t=p(Math.floor(e/3600),2,0),n=p(Math.floor((e-3600*t)/60),2,0),r=p(Math.floor(e-3600*t-60*n),2,0);return("00"===t?[n,r]:[t,n,r]).join(":")}function h(e){if(e.touches){var t=e.touches[0]||e.changedTouches[0];e.clientX=t.clientX||0,e.clientY=t.clientY||0,e.offsetX=t.pageX-t.target.offsetLeft,e.offsetY=t.pageY-t.target.offsetTop}e._target=e.target||e.srcElement}function g(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}function y(e,t){if("Object"===g(t)&&"Object"===g(e))return Object.keys(t).forEach((function(n){"Object"!==g(t[n])||t[n]instanceof Node?"Array"===g(t[n])?e[n]="Array"===g(e[n])?e[n].concat(t[n]):t[n]:e[n]=t[n]:e[n]?y(e[n],t[n]):e[n]=t[n]})),e}function m(e){var t=(e.currentStyle||window.getComputedStyle(e,null)).backgroundImage;if(!t||"none"===t)return"";var n=document.createElement("a");return n.href=t.replace(/url\("|"\)/g,""),n.href}function v(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""}function x(e,t,n,r){e._interval[t]||(e._interval[t]=setInterval(n.bind(e),r))}function b(e,t){clearInterval(e._interval[t]),e._interval[t]=null}function w(e,t,n,r){var a=i("xg-"+e,"",{},"xgplayer-"+e+"-img");if(a.style.backgroundImage='url("'+t+'")',n&&r){var o=void 0,s=void 0,l=void 0;["px","rem","em","pt","dp","vw","vh","vm","%"].every((function(e){return!(n.indexOf(e)>-1&&r.indexOf(e)>-1)||(o=Number(n.slice(0,n.indexOf(e)).trim()),s=Number(r.slice(0,r.indexOf(e)).trim()),l=e,!1)})),a.style.width=""+o+l,a.style.height=""+s+l,a.style.backgroundSize=""+o+l+" "+s+l,a.style.margin="start"===e?"-"+s/2+l+" auto auto -"+o/2+l:"auto 5px auto 5px"}return a}function k(){return window.navigator.userAgent.toLowerCase().indexOf("micromessenger")>-1}function _(){return window.navigator.userAgent.toLowerCase().indexOf("ucbrowser")>-1}function O(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=[],n=0;n<e.length;n++)if(!(!e[n].end||e[n].begin<0||e[n].end<0||e[n].end<e[n].begin))if(t.length<1)t.push({begin:e[n].begin,end:e[n].end});else for(var r=0;r<t.length;r++){var a=e[n].begin,o=e[n].end;if(o<t[r].begin){t.splice(r,0,{begin:a,end:o});break}if(!(a>t[r].end)){var i=t[r].begin,s=t[r].end;t[r].begin=Math.min(a,i),t[r].end=Math.max(o,s);break}if(r>t.length-2){t.push({begin:a,end:o});break}}for(var l=0,u=0;u<t.length;u++)l+=t[u].end-t[u].begin;return l}function E(e,t,n,r){e.once(r,(function a(){e.off(t,n),e.off(r,a)}))}function C(e,t,n,r){if(r)e.on(t,n),E(e,t,n,r);else{e.on(t,(function r(a){n(a),e.off(t,r)}))}}function j(e,t,n,r){if(r)e.once(t,n),E(e,t,n,r);else{e.once(t,(function r(a){n(a),e.off(t,r)}))}}function z(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=[],r=0;r<e.length;r++)n.push({start:e.start(r)<.5?0:e.start(r),end:e.end(r)});n.sort((function(e,t){var n=e.start-t.start;return n||t.end-e.end}));var a=[];if(t)for(var i=0;i<n.length;i++){var s=a.length;if(s){var l=a[s-1].end;n[i].start-l<t?n[i].end>l&&(a[s-1].end=n[i].end):a.push(n[i])}else a.push(n[i])}else a=n;return new o.default(a)}function M(){return!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)}function S(e,t,n){var r=e.style;try{r[t]=n}catch(e){r.setProperty(t,n)}}t.PresentationMode={PIP:"picture-in-picture",INLINE:"inline",FULLSCREEN:"fullscreen"};t.util={createDom:i,hasClass:s,addClass:l,removeClass:u,toggleClass:c,findDom:d,padStart:p,format:f,event:h,typeOf:g,deepCopy:y,getBgImage:m,copyDom:v,setInterval:x,clearInterval:b,createImgBtn:w,isWeiXin:k,isUc:_,computeWatchDur:O,offInDestroy:E,on:C,once:j,getBuffered2:z,checkIsBrowser:M,setStyle:S}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=o(n(2)),a=o(n(4));function o(e){return e&&e.__esModule?e:{default:e}}t.default={name:"danmu",method:function(){r.default.method.call(this),a.default.method.call(this)}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);t.default={name:"danmu",method:function(){var e=this;e.on("initDefaultDanmu",(function(t){var n=e.root.querySelector("xg-danmu");if((0,r.addClass)(n,"xgplayer-has-danmu"),!e.config.danmu.closeDefaultBtn){var a=function(){t.start()},o=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.pause()},i=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&t.play()},s=function(){(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")&&(t.stop(),t.start())};e.danmuBtn=(0,r.copyDom)(t.bulletBtn.createSwitch(!0)),e.controls.appendChild(e.danmuBtn),["click","touchend"].forEach((function(o){e.danmuBtn.addEventListener(o,(function(o){o.preventDefault(),o.stopPropagation(),(0,r.toggleClass)(e.danmuBtn,"danmu-switch-active"),(0,r.hasClass)(e.danmuBtn,"danmu-switch-active")?(e.emit("danmuBtnOn"),(0,r.addClass)(n,"xgplayer-has-danmu"),e.once("timeupdate",a)):(e.emit("danmuBtnOff"),(0,r.removeClass)(n,"xgplayer-has-danmu"),t.stop())}))})),e.onElementClick&&n.addEventListener("click",(function(t){e.onElementClick(t,n)}),!1),e.onElementDblclick&&n.addEventListener("dblclick",(function(t){e.onElementDblclick(t,n)}),!1),e.on("pause",o),e.on("play",i),e.on("seeked",s),e.once("destroy",(function t(){e.off("timeupdate",a),e.off("pause",o),e.off("play",i),e.off("seeked",s),e.off("destroy",t)}))}}))}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var a=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bufferedList=t}return r(e,[{key:"start",value:function(e){return this.bufferedList[e].start}},{key:"end",value:function(e){return this.bufferedList[e].end}},{key:"length",get:function(){return this.bufferedList.length}}]),e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),a=i(n(5)),o=i(n(6));function i(e){return e&&e.__esModule?e:{default:e}}n(7);t.default={name:"s_danmu",method:function(){var e=this,t=e.root;if(e.config.danmu){var n=(0,r.createDom)("xg-danmu","",{},"xgplayer-danmu");e.once("ready",(function(){t.appendChild(n)}));var i=(0,r.deepCopy)({container:n,player:e.video,comments:[],area:{start:0,end:1}},e.config.danmu),s=void 0;e.config.danmu.panel&&(s=(0,r.createDom)("xg-panel",'<xg-panel-icon class="xgplayer-panel-icon">\n '+o.default+'\n </xg-panel-icon>\n <xg-panel-slider class="xgplayer-panel-slider">\n <xg-hidemode class="xgplayer-hidemode">\n <p class="xgplayer-hidemode-font">屏蔽类型</p>\n <ul class="xgplayer-hidemode-radio">\n <li class="xgplayer-hidemode-scroll" id="false">滚动</li><li class="xgplayer-hidemode-top" id="false">顶部</li><li class="xgplayer-hidemode-bottom" id="false">底部</li><li class="xgplayer-hidemode-color" id="false">色彩</li>\n </ul>\n </xg-hidemode>\n <xg-transparency class="xgplayer-transparency">\n <span>不透明度</span>\n <input class="xgplayer-transparency-line xgplayer-transparency-color xgplayer-transparency-bar xgplayer-transparency-gradient" type="range" min="0" max="100" step="0.1" value="50"></input>\n </xg-transparency>\n <xg-showarea class="xgplayer-showarea">\n <div class="xgplayer-showarea-name">显示区域</div>\n <div class="xgplayer-showarea-control">\n <div class="xgplayer-showarea-control-up">\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-onequarters">1/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-twoquarters selected-color">1/2</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-threequarters">3/4</span>\n <span class="xgplayer-showarea-control-up-item xgplayer-showarea-full">1</span>\n </div>\n <div class="xgplayer-showarea-control-down">\n <div class="xgplayer-showarea-control-down-dots">\n <span class="xgplayer-showarea-onequarters-dot"></span>\n <span class="xgplayer-showarea-twoquarters-dot"></span>\n <span class="xgplayer-showarea-threequarters-dot"></span>\n <span class="xgplayer-showarea-full-dot"></span>\n </div>\n <input class="xgplayer-showarea-line xgplayer-showarea-color xgplayer-showarea-bar xgplayer-gradient" type="range" min="1" max="4" step="1" value="1">\n </div>\n </div>\n </xg-showarea>\n <xg-danmuspeed class="xgplayer-danmuspeed">\n <div class="xgplayer-danmuspeed-name">弹幕速度</div>\n <div class="xgplayer-danmuspeed-control">\n <div class="xgplayer-danmuspeed-control-up">\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-small">慢</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-middle selected-color">中</span>\n <span class="xgplayer-danmuspeed-control-up-item xgplayer-danmuspeed-large">快</span>\n </div>\n <div class="xgplayer-danmuspeed-control-down">\n <div class="xgplayer-danmuspeed-control-down-dots">\n <span class="xgplayer-danmuspeed-small-dot"></span>\n <span class="xgplayer-danmuspeed-middle-dot"></span>\n <span class="xgplayer-danmuspeed-large-dot"></span>\n </div>\n <input class="xgplayer-danmuspeed-line xgplayer-danmuspeed-color xgplayer-danmuspeed-bar xgplayer-gradient" type="range" min="50" max="150" step="50" value="100">\n </div>\n </div>\n </xg-danmuspeed>\n <xg-danmufont class="xgplayer-danmufont">\n <div class="xgplayer-danmufont-name">字体大小</div>\n <div class="xgplayer-danmufont-control">\n <div class="xgplayer-danmufont-control-up">\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-small">小</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-middle">中</span>\n <span class="xgplayer-danmufont-control-up-item xgplayer-danmufont-large selected-color">大</span>\n </div>\n <div class="xgplayer-danmufont-control-down">\n <div class="xgplayer-danmufont-control-down-dots">\n <span class="xgplayer-danmufont-small-dot"></span>\n <span class="xgplayer-danmufont-middle-dot"></span>\n <span class="xgplayer-danmufont-large-dot"></span>\n </div>\n <input class="xgplayer-danmufont-line xgplayer-danmufont-color xgplayer-danmufont-bar xgplayer-gradient" type="range" min="20" max="30" step="5" value="25">\n </div>\n </div>\n </xg-danmufont>\n </xg-panel-slider>',{tabindex:7},"xgplayer-panel"),e.once("ready",(function(){e.controls.appendChild(s)}))),e.once("complete",(function(){var t=new a.default(i);if(e.emit("initDefaultDanmu",t),e.danmu=t,e.config.danmu.panel){var n=s.querySelector(".xgplayer-panel-slider"),o=void 0;["mouseenter","touchend","click"].forEach((function(e){s.addEventListener(e,(function(e){e.preventDefault(),e.stopPropagation(),(0,r.addClass)(n,"xgplayer-panel-active"),s.focus(),o=!0}))})),s.addEventListener("mouseleave",(function(e){e.preventDefault(),e.stopPropagation(),(0,r.removeClass)(n,"xgplayer-panel-active"),o=!1})),n.addEventListener("mouseleave",(function(e){e.preventDefault(),e.stopPropagation(),!1===o&&(0,r.removeClass)(n,"xgplayer-panel-active")}));var l=e.config.danmu,u={scroll:s.querySelector(".xgplayer-hidemode-scroll"),top:s.querySelector(".xgplayer-hidemode-top"),bottom:s.querySelector(".xgplayer-hidemode-bottom"),color:s.querySelector(".xgplayer-hidemode-color")},c=function(t){var n=t;["touchend","click"].forEach((function(t){u[n].addEventListener(t,(function(t){"true"!==u[n].getAttribute("id")?(u[n].style.color="#f85959",u[n].setAttribute("id","true"),e.danmu.hide(n)):(u[n].style.color="#aaa",u[n].setAttribute("id","false"),e.danmu.show(n))}))}))};for(var d in u)c(d);var p=s.querySelector(".xgplayer-transparency-line"),f=s.querySelector(".xgplayer-transparency-gradient"),h=50;if(f.style.background="linear-gradient(to right, #f85959 0%, #f85959 "+h+"%, #aaa "+h+"%, #aaa)",p.addEventListener("input",(function(e){e.preventDefault(),e.stopPropagation(),h=e.target.value,f.style.background="linear-gradient(to right, #f85959 0%, #f85959 "+h+"%, #aaa "+h+"%, #aaa)",l.comments.forEach((function(e){e.style.opacity=h/100}))})),s.querySelector(".xgplayer-showarea-line").addEventListener("input",(function(t){t.preventDefault(),t.stopPropagation();var n=t.target.value;e.danmu.config.area.end=n/100,e.config.danmu.area.end=n/100,e.danmu.bulletBtn.main.channel.resize()})),s.querySelector(".xgplayer-danmuspeed-line").addEventListener("input",(function(e){e.preventDefault(),e.stopPropagation();var t=e.target.value;l.comments.forEach((function(e){e.duration=100*(200-t)}))})),s.querySelector(".xgplayer-danmufont-line").addEventListener("input",(function(e){e.preventDefault(),e.stopPropagation();var t=e.target.value;l.comments.forEach((function(e){e.style.fontSize=t+"px"}))})),navigator.userAgent.indexOf("Firefox")>-1)for(var g=0;g<n.querySelectorAll("input").length;g++)n.querySelectorAll("input")[g].style.marginTop="10px"}}))}}},e.exports=t.default},function(e,t,n){
2
+ /*! Built @Thu, 14 Sep 2023 04:46:00 GMT */
3
+ window,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={i:r,l:!1,exports:{}};return e[r].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)n.d(r,a,function(t){return e[t]}.bind(null,a));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){"use strict";function r(e,t){return e.classList?Array.prototype.some.call(e.classList,(function(e){return e===t})):!!e.className.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))}function a(e,t){e.classList?t.replace(/(^\s+|\s+$)/g,"").split(/\s+/g).forEach((function(t){t&&e.classList.add(t)})):r(e,t)||(e.className+=" "+t)}function o(e,t){e.classList?t.split(/\s+/g).forEach((function(t){e.classList.remove(t)})):r(e,t)&&t.split(/\s+/g).forEach((function(t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ")}))}function i(e){return Object.prototype.toString.call(e).match(/([^\s.*]+)(?=]$)/g)[0]}Object.defineProperty(t,"__esModule",{value:!0}),t.createDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=document.createElement(e);return a.className=r,a.innerHTML=t,Object.keys(n).forEach((function(t){var r=t,o=n[t];"video"===e||"audio"===e?o&&a.setAttribute(r,o):a.setAttribute(r,o)})),a},t.hasClass=r,t.addClass=a,t.removeClass=o,t.toggleClass=function(e,t){t.split(/\s+/g).forEach((function(t){r(e,t)?o(e,t):a(e,t)}))},t.findDom=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments[1],n=void 0;try{n=e.querySelector(t)}catch(r){t.startsWith("#")&&(n=e.getElementById(t.slice(1)))}return n},t.deepCopy=function e(t,n){if("Object"===i(n)&&"Object"===i(t))return Object.keys(n).forEach((function(r){"Object"!==i(n[r])||n[r]instanceof Node?"Array"===i(n[r])?t[r]="Array"===i(t[r])?t[r].concat(n[r]):n[r]:t[r]=n[r]:t[r]?e(t[r],n[r]):t[r]=n[r]})),t},t.typeOf=i,t.copyDom=function(e){if(e&&1===e.nodeType){var t=document.createElement(e.tagName);return Array.prototype.forEach.call(e.attributes,(function(e){t.setAttribute(e.name,e.value)})),e.innerHTML&&(t.innerHTML=e.innerHTML),t}return""},t.attachEventListener=function(e,t,n,r){r?(e.on(t,n),function(e,t,n,r){e.once(r,(function a(){e.off(t,n),e.off(r,a)}))}(e,t,n,r)):e.on(t,(function r(a){n(a),e.off(t,r)}))},t.styleUtil=function(e,t,n){var r=e.style;try{r[t]=n}catch(e){r.setProperty(t,n)}},t.styleCSSText=function(e,t){var n=e.style;try{n.cssText=t}catch(e){}},t.isNumber=function(e){return"number"==typeof e&&!Number.isNaN(e)},t.isFunction=function(e){return"function"==typeof e},t.throttle=function(e,t){var n=this,r=0;return function(){for(var a=arguments.length,o=Array(a),i=0;i<a;i++)o[i]=arguments[i];clearTimeout(r),r=setTimeout((function(){return e.apply(n,o)}),t)}},t.hasOwnProperty=Object.prototype.hasOwnProperty},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(r=n(4))&&r.__esModule?r:{default:r},i=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return a(e,[{key:"setLogger",value:function(e){this.logger=e instanceof o.default?e:new o.default((e||"")+".js")}}]),e}();t.default=i,e.exports=t.default},function(e,t,n){"use strict";var r=n(19)();e.exports=function(e){return e!==r&&null!==e}},function(e,t,n){"use strict";e.exports=function(e){return null!=e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a="undefined"!=typeof window&&window.location.href.indexOf("danmu-debug")>-1,o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.constructorName=t||""}return r(e,[{key:"info",value:function(e){for(var t,n=arguments.length,r=Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];a&&(t=console).log.apply(t,["[Danmu Log]["+this.constructorName+"]",e].concat(r))}}]),e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=(r=n(6))&&r.__esModule?r:{default:r};n(34),t.default=a.default,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DanmuJs=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=d(n(7)),o=n(26),i=d(n(1)),s=d(n(27)),l=d(n(32)),u=n(33),c=n(0);function d(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var f=t.DanmuJs=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));n.setLogger("danmu"),n.logger&&n.logger.info("danmu.js version: "+o.version);var r=n.config={overlap:!1,area:{start:0,end:1,lines:void 0},hooks:void 0,live:!1,comments:[],direction:"r2l",needResizeObserver:!1,dropStaleComments:!1,channelSize:void 0,maxCommentsLength:void 0,bulletOffset:void 0,interval:2e3,highScorePriority:!0,chaseEffect:!0};if((0,c.deepCopy)(r,e),(0,a.default)(n),n.globalHooks={},r.hooks&&n.hooks(r.hooks),n.hideArr=[],n.recycler=new l.default,n.freezeId=null,r.comments.forEach((function(e){e.duration=e.duration?e.duration:5e3,e.mode||(e.mode="scroll")})),n.container=r.container&&1===r.container.nodeType?r.container:null,!n.container)return n.emit("error","container id can't be empty"),p(n,!1);if(r.containerStyle){var i=r.containerStyle;Object.keys(i).forEach((function(e){n.container.style[e]=i[e]}))}return(0,c.addClass)(n.container,"danmu"),n.live=r.live,n.player=r.player,n.direction=r.direction,n.bulletBtn=new s.default(n),n.main=n.bulletBtn.main,n.isReady=!0,n.emit("ready"),n.logger&&n.logger.info("ready"),n.addResizeObserver(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"hooks",value:function(e){(0,c.deepCopy)(this.globalHooks,e)}},{key:"addResizeObserver",value:function(){var e=this;this.config.needResizeObserver&&this.container&&(0,u.addObserver)(this.container,(function(){e.logger&&e.logger.info("needResizeObserver"),e.resize()}))}},{key:"start",value:function(){this.logger&&this.logger.info("start"),this.main&&this.main.start()}},{key:"pause",value:function(){this.logger&&this.logger.info("pause"),this.main&&this.main.pause()}},{key:"play",value:function(){this.logger&&this.logger.info("play"),this.main&&this.main.play()}},{key:"stop",value:function(){this.logger&&this.logger.info("stop"),this.main&&this.main.stop()}},{key:"clear",value:function(){this.logger&&this.logger.info("clear"),this.main&&this.main.clear()}},{key:"destroy",value:function(){for(var e in(0,u.unObserver)(this.container),this.logger&&this.logger.info("destroy"),this.stop(),this.bulletBtn&&this.bulletBtn.destroy(),this.recycler&&this.recycler.destroy(),this)delete this[e];this.emit("destroy")}},{key:"sendComment",value:function(e){var t=this.main,n=this.logger;n&&n.info("sendComment: "+(e.txt||"[DOM Element]")),t&&(e.duration||(e.duration=15e3),e&&e.id&&e.duration&&(e.el||e.elLazyInit||e.txt)&&(e.duration=e.duration?e.duration:5e3,e.style||(e.style={opacity:void 0,fontSize:void 0}),e.style&&(this.opacity&&this.opacity!==e.style.opacity&&(e.style.opacity=this.opacity),this.fontSize&&this.fontSize!==e.style.fontSize&&(e.style.fontSize=this.fontSize)),e.prior||e.realTime?(t.data.unshift(e),e.realTime&&(t.readData(),t.dataHandle())):t.data.push(e),t.sortData(),t.keepPoolWatermark()))}},{key:"setCommentID",value:function(e,t){var n=this;this.logger&&this.logger.info("setCommentID: oldID "+e+" newID "+t),e&&t&&(this.main.data.some((function(n){return n.id===e&&(n.id=t,!0)})),this.main.queue.some((function(r){return r.id===e&&(r.id=t,r.pauseMove(),"paused"!==n.main.status&&r.startMove(),!0)})))}},{key:"setCommentDuration",value:function(e,t){var n=this;this.logger&&this.logger.info("setCommentDuration: id "+e+" duration "+t),e&&t&&(t=t||5e3,this.main.data.some((function(n){return n.id===e&&(n.duration=t,!0)})),this.main.queue.some((function(r){return r.id===e&&(r.duration=t,r.pauseMove(),"paused"!==n.main.status&&r.startMove(),!0)})))}},{key:"setCommentLike",value:function(e,t){this.logger&&this.logger.info("setCommentLike: id "+e+" like "+t),e&&t&&(this.main.data.some((function(n){return n.id===e&&(n.like=t,!0)})),this.main.queue.some((function(n){return n.id===e&&(n.pauseMove(),n.setLikeDom(t.el,t.style),"paused"!==n.danmu.main.status&&n.startMove(),!0)})))}},{key:"restartComment",value:function(e){if(this.logger&&this.logger.info("restartComment: id "+e),e){var t=this.main;if(this._releaseCtrl(e),"closed"===t.status)return;t.queue.some((function(n){return n.id===e&&("paused"!==t.status?n.startMove(!0):n.status="paused",!0)}))}}},{key:"_releaseCtrl",value:function(e){this.freezeId&&e===this.freezeId&&(this.mouseControl=!1,this.freezeId=null)}},{key:"_freezeCtrl",value:function(e){this.mouseControl=!0,this.freezeId=e}},{key:"freezeComment",value:function(e){this.logger&&this.logger.info("freezeComment: id "+e),e&&(this._freezeCtrl(e),this.main.queue.some((function(t){return t.id===e&&(t.status="forcedPause",t.pauseMove(),t.el&&t.el.style&&(0,c.styleUtil)(t.el,"zIndex",10),!0)})))}},{key:"removeComment",value:function(e){if(this.logger&&this.logger.info("removeComment: id "+e),e){var t=this.main;this._releaseCtrl(e),t.queue=t.queue.filter((function(t){return t.id!==e||(t.remove(),!1)})),t.data=t.data.filter((function(t){return t.id!==e}))}}},{key:"updateComments",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.logger&&this.logger.info("updateComments: "+e.length+", isClear "+t);var n=this.main;"boolean"==typeof t&&t&&(n.data=[]),n.data=n.data.concat(e),n.sortData(),n.keepPoolWatermark()}},{key:"setAllDuration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll",t=this,n=arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.logger&&this.logger.info("setAllDuration: mode "+e+" duration "+n+" force "+r),n&&(n=n||5e3,r&&(this.main.forceDuration=n),this.main.data.forEach((function(t){e===t.mode&&(t.duration=n)})),this.main.queue.forEach((function(r){e===r.mode&&(r.duration=n,r.pauseMove(),"paused"!==t.main.status&&r.startMove())})))}},{key:"setPlayRate",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll",n=arguments[1];this.logger&&this.logger.info("setPlayRate: "+n),(0,c.isNumber)(n)&&n>0&&(this.main.playRate=n,this.main.queue.forEach((function(n){t===n.mode&&(n.pauseMove(),"paused"!==e.main.status&&n.startMove())})))}},{key:"setOpacity",value:function(e){this.logger&&this.logger.info("setOpacity: opacity "+e),this.container&&(this.container.style.opacity=e)}},{key:"setFontSize",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{reflow:!0};this.logger&&this.logger.info("setFontSize: size "+e+" channelSize "+t),this.fontSize=e+"px",e&&(this.main.data.forEach((function(e){e.style&&(e.style.fontSize=n.fontSize)})),this.main.queue.forEach((function(e){e.options.style||(e.options.style={}),e.options.style.fontSize=n.fontSize,e.setFontSize(n.fontSize),t&&(e.top=e.channel_id[0]*t,e.topInit())}))),t&&(this.config.channelSize=t,r.reflow&&this.main.channel.resizeSync())}},{key:"setArea",value:function(e){this.logger&&this.logger.info("setArea: area "+e),this.config.area=e,!1!==e.reflow&&this.main.channel.resizeSync()}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";this.logger&&this.logger.info("hide: mode "+e),this.hideArr.indexOf(e)<0&&this.hideArr.push(e);var t=this.main.queue.filter((function(t){return e===t.mode||"color"===e&&t.color}));t.forEach((function(e){return e.remove()}))}},{key:"show",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll";this.logger&&this.logger.info("show: mode "+e);var t=this.hideArr.indexOf(e);t>-1&&this.hideArr.splice(t,1)}},{key:"setDirection",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"r2l";this.logger&&this.logger.info("setDirection: direction "+e),this.direction=e,this.emit("changeDirection",e)}},{key:"resize",value:function(){this.logger&&this.logger.info("resize"),this.emit("channel_resize")}},{key:"status",get:function(){return this.main.status}},{key:"state",get:function(){var e=this.main;return{status:e.status,comments:e.data,bullets:e.queue,displayArea:e.channel.getRealOccupyArea()}}},{key:"containerPos",get:function(){return this.main.channel.containerPos}}]),t}(i.default);t.default=f},function(e,t,n){"use strict";var r,a,o,i,s,l,u,c=n(8),d=n(25),p=Function.prototype.apply,f=Function.prototype.call,h=Object.create,g=Object.defineProperty,y=Object.defineProperties,m=Object.prototype.hasOwnProperty,v={configurable:!0,enumerable:!1,writable:!0};a=function(e,t){var n,a;return d(t),a=this,r.call(this,e,n=function(){o.call(a,e,n),p.call(t,this,arguments)}),n.__eeOnceListener__=t,this},s={on:r=function(e,t){var n;return d(t),m.call(this,"__ee__")?n=this.__ee__:(n=v.value=h(null),g(this,"__ee__",v),v.value=null),n[e]?"object"==typeof n[e]?n[e].push(t):n[e]=[n[e],t]:n[e]=t,this},once:a,off:o=function(e,t){var n,r,a,o;if(d(t),!m.call(this,"__ee__"))return this;if(!(n=this.__ee__)[e])return this;if("object"==typeof(r=n[e]))for(o=0;a=r[o];++o)a!==t&&a.__eeOnceListener__!==t||(2===r.length?n[e]=r[o?0:1]:r.splice(o,1));else r!==t&&r.__eeOnceListener__!==t||delete n[e];return this},emit:i=function(e){var t,n,r,a,o;if(m.call(this,"__ee__")&&(a=this.__ee__[e]))if("object"==typeof a){for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];for(a=a.slice(),t=0;r=a[t];++t)p.call(r,this,o)}else switch(arguments.length){case 1:f.call(a,this);break;case 2:f.call(a,this,arguments[1]);break;case 3:f.call(a,this,arguments[1],arguments[2]);break;default:for(n=arguments.length,o=new Array(n-1),t=1;t<n;++t)o[t-1]=arguments[t];p.call(a,this,o)}}},l={on:c(r),once:c(a),off:c(o),emit:c(i)},u=y({},l),e.exports=t=function(e){return null==e?h(u):y(Object(e),l)},t.methods=s},function(e,t,n){"use strict";var r=n(3),a=n(9),o=n(13),i=n(21),s=n(22);(e.exports=function(e,t){var n,a,l,u,c;return arguments.length<2||"string"!=typeof e?(u=t,t=e,e=null):u=arguments[2],r(e)?(n=s.call(e,"c"),a=s.call(e,"e"),l=s.call(e,"w")):(n=l=!0,a=!1),c={value:t,configurable:n,enumerable:a,writable:l},u?o(i(u),c):c}).gs=function(e,t,n){var l,u,c,d;return"string"!=typeof e?(c=n,n=t,t=e,e=null):c=arguments[3],r(t)?a(t)?r(n)?a(n)||(c=n,n=void 0):n=void 0:(c=t,t=n=void 0):t=void 0,r(e)?(l=s.call(e,"c"),u=s.call(e,"e")):(l=!0,u=!1),d={get:t,set:n,configurable:l,enumerable:u},c?o(i(c),d):d}},function(e,t,n){"use strict";var r=n(10),a=/^\s*class[\s{/}]/,o=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!a.test(o.call(e))}},function(e,t,n){"use strict";var r=n(11);e.exports=function(e){if("function"!=typeof e)return!1;if(!hasOwnProperty.call(e,"length"))return!1;try{if("number"!=typeof e.length)return!1;if("function"!=typeof e.call)return!1;if("function"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},function(e,t,n){"use strict";var r=n(12);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(3),a={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(a,typeof e)}},function(e,t,n){"use strict";e.exports=n(14)()?Object.assign:n(15)},function(e,t,n){"use strict";e.exports=function(){var e,t=Object.assign;return"function"==typeof t&&(t(e={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},function(e,t,n){"use strict";var r=n(16),a=n(20),o=Math.max;e.exports=function(e,t){var n,i,s,l=o(arguments.length,2);for(e=Object(a(e)),s=function(r){try{e[r]=t[r]}catch(e){n||(n=e)}},i=1;i<l;++i)r(t=arguments[i]).forEach(s);if(void 0!==n)throw n;return e}},function(e,t,n){"use strict";e.exports=n(17)()?Object.keys:n(18)},function(e,t,n){"use strict";e.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}},function(e,t,n){"use strict";var r=n(2),a=Object.keys;e.exports=function(e){return a(r(e)?Object(e):e)}},function(e,t,n){"use strict";e.exports=function(){}},function(e,t,n){"use strict";var r=n(2);e.exports=function(e){if(!r(e))throw new TypeError("Cannot use null or undefined");return e}},function(e,t,n){"use strict";var r=n(2),a=Array.prototype.forEach,o=Object.create,i=function(e,t){var n;for(n in e)t[n]=e[n]};e.exports=function(e){var t=o(null);return a.call(arguments,(function(e){r(e)&&i(Object(e),t)})),t}},function(e,t,n){"use strict";e.exports=n(23)()?String.prototype.contains:n(24)},function(e,t,n){"use strict";var r="razdwatrzy";e.exports=function(){return"function"==typeof r.contains&&!0===r.contains("dwa")&&!1===r.contains("foo")}},function(e,t,n){"use strict";var r=String.prototype.indexOf;e.exports=function(e){return r.call(this,e,arguments[1])>-1}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return e}},function(e){e.exports=JSON.parse('{"version":"1.1.13"}')},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(1)),o=s(n(28)),i=n(0);function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.setLogger("control"),n.danmu=e,n.main=new o.default(e),e.config.defaultOff||n.main.start(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"createSwitch",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.logger&&this.logger.info("createSwitch"),this.switchBtn=(0,i.createDom)("dk-switch",'<span class="txt">弹</span>',{},"danmu-switch "+(e?"danmu-switch-active":"")),this.switchBtn}},{key:"destroy",value:function(){for(var e in this.logger&&this.logger.info("destroy"),this.main.destroy(),this)i.hasOwnProperty.call(this,e)&&delete this[e]}}]),t}(a.default);t.default=l,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=l(n(1)),o=l(n(29)),i=l(n(30)),s=n(0);function l(e){return e&&e.__esModule?e:{default:e}}var u=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return n.setLogger("main"),n.danmu=e,n.container=e.container,n.channel=new i.default(e),n.data=[].concat(e.config.comments),n.playedData=[],n.queue=[],n.timer=null,n.playRate=1,n.retryStatus="normal",n.interval=e.config.interval,n._status="idle",n._events=[],n._bindEvents(),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"destroy",value:function(){for(var e in this.logger&&this.logger.info("destroy"),this._unbindEvents(),this._cancelTick(),this.channel&&this.channel.destroy(),this.data=[],this)delete this[e]}},{key:"_bindEvents",value:function(){var e=this,t=this.danmu,n=this.container;this._unbindEvents(),this._events.push([t,"bullet_remove",function(t){var n=t.bullet,r=e.data,a=e.queue;a.some((function(e,t){return e.id===n.id&&(a.splice(t,1),!0)})),r.some((function(e){return e.id===n.id&&(e.attached_=!1,!0)}))}]),this._events.push([n,"transitionend",function(t){var n=e._getBulletByEvt(t);n&&(n.status="end",n.remove(!1))}]),(t.config.mouseControl||t.config.mouseEnterControl)&&this._events.push([n,"mouseover",function(t){var n,r=e.danmu;!r||r.mouseControl&&r.config.mouseControlPause||(n=e._getBulletByEvt(t))&&"waiting"!==n.status&&"end"!==n.status&&r.emit("bullet_hover",{bullet:n,event:t})}]),this._events.forEach((function(e){e[0].addEventListener?e[0].addEventListener(e[1],e[2],!1):e[0].on&&e[0].on(e[1],e[2])}))}},{key:"_unbindEvents",value:function(){this._events.length&&(this._events.forEach((function(e){e[0].removeEventListener?e[0].removeEventListener(e[1],e[2],!1):e[0].off&&e[0].off(e[1],e[2])})),this._events=[])}},{key:"_cancelTick",value:function(){this.handleTimer&&(clearTimeout(this.handleTimer),this.handleTimer=null)}},{key:"_startTick",value:function(){var e=this;e.retryStatus="normal",e._cancelTick(),e.sortData(),function t(){"closed"!==e._status||"stop"!==e.retryStatus?("playing"===e._status&&(e.readData(),e.dataHandle()),"stop"===e.retryStatus&&"paused"!==e._status||(e.handleTimer=setTimeout(t,250))):e._cancelTick()}()}},{key:"start",value:function(){this.logger&&this.logger.info("start"),"playing"!==this._status&&(this._status="playing",this.queue=[],this.container.innerHTML="",this.channel.reset(),this._startTick())}},{key:"stop",value:function(){this.logger&&this.logger.info("stop"),"closed"!==this._status&&(this._status="closed",this.retryStatus="stop",this.queue=[],this.container&&(this.container.innerHTML=""),this.channel&&this.channel.reset(),this._cancelTick())}},{key:"clear",value:function(){this.logger&&this.logger.info("clear"),this.channel&&this.channel.reset(),this.data=[],this.queue=[],this.container&&(this.container.innerHTML="")}},{key:"play",value:function(){var e=this;if("closed"!==this._status){this.logger&&this.logger.info("play"),this._status="playing";var t=this.channel.channels;t&&t.length>0&&["scroll","top","bottom"].forEach((function(n){e.queue.forEach((function(e){e.startMove(),e.resized=!0}));for(var r=0;r<t.length;r++)t[r].queue[n].forEach((function(e){e.resized=!1}))})),this._startTick()}else this.logger&&this.logger.info("play ignored")}},{key:"pause",value:function(){if("closed"!==this._status){this.logger&&this.logger.info("pause"),this._status="paused",this._cancelTick();var e=this.channel.channels;e&&e.length>0&&this.queue.forEach((function(e){e.pauseMove()}))}else this.logger&&this.logger.info("pause ignored")}},{key:"dataHandle",value:function(){"paused"!==this._status&&"closed"!==this._status&&this.queue.length&&this.queue.forEach((function(e){"waiting"===e.status&&e.startMove()}))}},{key:"readData",value:function(){var e=this.danmu,t=this.interval,n=this.channel,r=e.player,a=void 0,i=void 0;if(e.isReady&&e.main){if(r){var l=r.currentTime?Math.floor(1e3*r.currentTime):0;i=this.data.filter((function(n){return!n.start&&e.hideArr.indexOf(n.mode)<0&&(!n.color||e.hideArr.indexOf("color")<0)&&(n.start=l),!n.attached_&&e.hideArr.indexOf(n.mode)<0&&(!n.color||e.hideArr.indexOf("color")<0)&&n.start-t<=l&&l<=n.start+t})),e.config.highScorePriority&&i.sort((function(e,t){return t.prior&&!e.prior||(t.score||-1)-(e.score||-1)})),e.live&&(this.data=[])}else 0===(i=this.data.splice(0,1)).length&&(i=this.playedData.splice(0,1));if(i.length>0&&n.checkAvailableTrack(i[0].mode)){n.updatePos();var u=0;e:for(var c,d=0;d<i.length;d++)if(c=i[d],this.forceDuration&&this.forceDuration!==c.duration&&(c.duration=this.forceDuration),(a=new o.default(e,c)).bulletCreateFail){if(0===u)break e;u--}else if(a.attach(),c.attached_=!0,n.addBullet(a).result)this.queue.push(a),a.topInit(),u=0;else{for(var p in a.detach(),a)s.hasOwnProperty.call(a,p)&&delete a[p];if(a=null,c.attached_=!1,c.noDiscard&&(c.prior?this.data.unshift(c):this.data.push(c)),0===u)break e;u--}}}}},{key:"sortData",value:function(){this.data.sort((function(e,t){return(e.start||-1)-(t.start||-1)}))}},{key:"keepPoolWatermark",value:function(){var e=this.danmu,t=e.config,n=e.player,r=this.data,a=[],o=0;if("number"==typeof t.maxCommentsLength&&r.length>t.maxCommentsLength){o=r.length-t.maxCommentsLength;for(var i,s=0;s<o;s++)(i=r[s]).prior&&!i.attached_&&a.push(r[s])}else if(t.dropStaleComments&&n&&n.currentTime){var l=Math.floor(1e3*n.currentTime)-t.interval;if(l>0)for(var u,c=0;c<r.length;c++)if((u=r[c]).prior&&!u.attached_&&a.push(r[c]),u.start>l){o=c;break}}o>0&&(r.splice(0,o),this.data=a.concat(r))}},{key:"_getBulletByEvt",value:function(e){for(var t,n=e.target||e.srcElement,r=this.queue,a=void 0,o=0;o<r.length;o++)if((t=r[o])&&t.el&&(t.el===n||t.el.contains(n))){a=t;break}return a}},{key:"status",get:function(){return this._status}}]),t}(a.default);t.default=u,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Bullet=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=s(n(1)),o=s(n(4)),i=n(0);function s(e){return e&&e.__esModule?e:{default:e}}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=new o.default("bullet"),d=t.Bullet=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};l(this,t);var r=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),a=e.container,o=e.recycler,i=e.config;return r.setLogger(c),r.danmu=e,r.options=n,r.duration=n.duration,r.id=n.id,r.container=a,r.mode="top"===n.mode||"bottom"===n.mode?n.mode:"scroll",r.start=n.start,r.prior=n.prior,r.realTime=n.realTime,r.color=n.color,r.bookChannelId=n.bookChannelId,r.reuseDOM=!0,r.noCopyEl=!(!i.disableCopyDOM&&!n.disableCopyDOM),r.recycler=o,r._fullySlideInScreenDuration=void 0,r._lastMoveTime=void 0,r.status="waiting",n.elLazyInit||(r.bulletCreateFail=!r._makeEl()),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"_makeEl",value:function(){var e=this.danmu,t=this.options,n=e.config,r=e.globalHooks,a=void 0,o="",s=t.style||{};if(s.perspective="500em",t.el||t.elLazyInit){if(this.noCopyEl&&(this.reuseDOM=!1),t.elLazyInit){if((0,i.isFunction)(r.bulletCreateEl))try{var l=r.bulletCreateEl(t);a=l instanceof HTMLElement?l:l.el}catch(e){}}else if(1===t.el.nodeType&&!t.el.parentNode)if(this.reuseDOM){var u=(0,i.copyDom)(t.el);t.eventListeners&&t.eventListeners.length>0&&t.eventListeners.forEach((function(e){u.addEventListener(e.event,e.listener,e.useCapture||!1)})),(a=this.recycler.use()).childNodes.length>0&&(a.innerHTML=""),a.textContent&&(a.textContent=""),a.appendChild(u)}else a=t.el}else"string"==typeof t.txt&&((a=this.recycler.use()).textContent=t.txt);if(!a||!e.main)return!1;var c=void 0;if((0,i.isNumber)(n.bulletOffset)&&n.bulletOffset>=0)c=n.bulletOffset;else{var d=e.containerPos;c=d.width/10>100?100:d.width/10}var p=t.realTime?0:Math.floor(Math.random()*c),f=this.updateOffset(p,!0);return s.left=f,Object.keys(s).forEach((function(e){var t=e.replace(/[A-Z]/g,(function(e){return"-"+e.toLowerCase()}));o+=t+":"+s[e]+";"})),(0,i.styleCSSText)(a,o),this.el=a,t.like&&t.like.el&&this.setLikeDom(t.like.el,t.like.style),!0}},{key:"updateOffset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.random=e;var n=this.danmu.containerPos.width+e+"px";return t||(0,i.styleUtil)(this.el,"left",this.danmu.containerPos.width+e+"px"),n}},{key:"attach",value:function(){if(this.options.elLazyInit&&!this.el&&this._makeEl(),this.danmu&&this.danmu.main){var e=this.danmu,t=this.options,n=this.el,r=e.globalHooks;r.bulletAttaching&&r.bulletAttaching(t),this.container.contains(n)||this.container.appendChild(n),this.elPos=n.getBoundingClientRect(),"b2t"===this.direction?(this.width=this.elPos.height,this.height=this.elPos.width):(this.width=this.elPos.width,this.height=this.elPos.height),this.moveV&&(this.duration=(this.danmu.containerPos.width+this.random+this.width)/this.moveV*1e3),r.bulletAttached&&r.bulletAttached(t,n)}}},{key:"detach",value:function(){var e=this.el,t=this.danmu,n=this.options,r=t.globalHooks;e&&(r.bulletDetaching&&r.bulletDetaching(n),this.reuseDOM?this.recycler.unused(e):e.parentNode&&e.parentNode.removeChild(e),r.bulletDetached&&r.bulletDetached(n,e),this.el=null),this.elPos=void 0}},{key:"topInit",value:function(){this.logger&&this.logger.info("topInit #"+(this.options.txt||"[DOM Element]")+"#"),"b2t"===this.direction?((0,i.styleUtil)(this.el,"transformOrigin","left top"),(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY("+this.danmu.containerPos.height+"px) translateZ(0px) rotate(90deg)"),(0,i.styleUtil)(this.el,"transition","transform 0s linear 0s")):(0,i.styleUtil)(this.el,"top",this.top+"px")}},{key:"pauseMove",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this;if("paused"!==t.status&&("forcedPause"!==t.status&&(this.status="paused"),t._moveV=void 0,this.el))if("scroll"===this.mode){var n=t.danmu.containerPos;if(e){var r=((new Date).getTime()-t._lastMoveTime)/1e3,a=r*this.moveV,o=0;o=t.moveMoreS-a>=0?"b2t"===this.direction?(t.moveMoreS-a)/t.moveContainerHeight*n.height:(t.moveMoreS-a)/t.moveContainerWidth*n.width:t.moveMoreS-a,"b2t"===this.direction?(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY("+o+"px) translateZ(0px) rotate(90deg)"):(0,i.styleUtil)(this.el,"left",o+"px")}else"b2t"===this.direction?(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY("+(this.el.getBoundingClientRect().top-n.top)+"px) translateZ(0px) rotate(90deg)"):(0,i.styleUtil)(this.el,"left",this.el.getBoundingClientRect().left-n.left+"px");"b2t"===this.direction||(0,i.styleUtil)(this.el,"transform","translateX(0px) translateY(0px) translateZ(0px)"),(0,i.styleUtil)(this.el,"transition","transform 0s linear 0s")}else this.pastDuration&&this.startTime?this.pastDuration=this.pastDuration+(new Date).getTime()-this.startTime:this.pastDuration=1}},{key:"startMove",value:function(e){if(this.hasMove||(this.danmu.emit("bullet_start",this),this.hasMove=!0),("forcedPause"!==this.status||e)&&this.el&&"start"!==this.status)if(this.status="start","scroll"===this.mode){var t=this.danmu.containerPos;if(!this.el)return;var n=this.el.getBoundingClientRect(),r=void 0;if("b2t"===this.direction){r=n.bottom-t.bottom;var a=(n.bottom-t.top)/this.moveV;(0,i.styleUtil)(this.el,"transition","transform "+a+"s linear 0s"),(0,i.styleUtil)(this.el,"transform","translateX(-"+this.top+"px) translateY(-"+this.height+"px) translateZ(0px) rotate(90deg)"),this._lastMoveTime=(new Date).getTime(),this.moveMoreS=n.top-t.top,this.moveContainerHeight=t.height}else{r=n.right-t.right;var o=n.right-t.left,s=o/this.moveV;n.right>t.left?((0,i.styleUtil)(this.el,"transition","transform "+s+"s linear 0s"),(0,i.styleUtil)(this.el,"transform","translateX(-"+o+"px) translateY(0px) translateZ(0px)"),this._lastMoveTime=(new Date).getTime(),this.moveMoreS=n.left-t.left,this.moveContainerWidth=t.width):(this.status="end",this.remove())}this._fullySlideInScreenDuration=r/this.moveV}else{var l=(new Date).getTime(),u=(this.startTime&&l-this.startTime>this.duration?l-this.startTime:this.duration)/1e3;(0,i.styleUtil)(this.el,"left","50%"),(0,i.styleUtil)(this.el,"margin","0 0 0 -"+this.width/2+"px"),(0,i.styleUtil)(this.el,"visibility","hidden"),(0,i.styleUtil)(this.el,"transition","visibility "+u+"s 0s"),this.pastDuration||(this.pastDuration=1),this.startTime=l}}},{key:"remove",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.logger&&this.logger.info("remove #"+(this.options.txt||"[DOM Element]")+"#");var t=this;e&&t.pauseMove(),t.el&&t.el.parentNode&&(t.detach(),this.options.el&&1===this.options.el.nodeType&&this.noCopyEl&&(0,i.styleUtil)(this.options.el,"transform","none"),t.danmu.emit("bullet_remove",{bullet:t}))}},{key:"setFontSize",value:function(e){this.el&&(this.el.style.fontSize=e)}},{key:"setLikeDom",value:function(e,t){if(e&&(Object.keys(t).forEach((function(n){e.style[n]=t[n]})),e.className="danmu-like",this.el)){var n=this.el.querySelector(".danmu-like");n&&this.el.removeChild(n),this.el.innerHTML=""+this.el.innerHTML+e.outerHTML}return e}},{key:"moveV",get:function(){var e=this.danmu,t=this.options,n=this._moveV;if(!n){if(t.moveV)n=t.moveV;else if(this.elPos){var r=e.containerPos;n=("b2t"===this.direction?r.height+(e.config.chaseEffect?this.height:0):r.width+(e.config.chaseEffect?this.width:0))/this.duration*1e3}n&&(n*=e.main.playRate,this._moveV=n)}return n}},{key:"direction",get:function(){return this.danmu.direction}},{key:"fullySlideIntoScreen",get:function(){var e=!0;return"scroll"===this.mode&&this._lastMoveTime&&this._fullySlideInScreenDuration>0&&(e=((new Date).getTime()-this._lastMoveTime)/1e3>=this._fullySlideInScreenDuration),e}}]),t}(a.default);t.default=d},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,a=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=(r=n(1))&&r.__esModule?r:{default:r},i=n(0),s=n(31),l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),r=n;return r.setLogger("channel"),r.danmu=e,r.width=0,r.height=0,r.reset(!0),r.channels=[],r.updatePos(),(0,i.attachEventListener)(n.danmu,"bullet_remove",(function(e){r.removeBullet(e.bullet)}),"destroy"),(0,i.attachEventListener)(n.danmu,"channel_resize",(function(){r.resize()}),"destroy"),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"checkAvailableTrack",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"scroll",t=this.channels,n=!1;if("scroll"===e)for(var r,a=0;a<t.length;a++)if(n=!0,(r=t[a]).operating[e])n=!1;else{var o=r.queue[e][0];if(!o||o.fullySlideIntoScreen){if(n)break}else n=!1}else n=!0;return n}},{key:"destroy",value:function(){for(var e in this.logger&&this.logger.info("destroy"),this.channels.splice(0,this.channels.length),this._cancelResizeTimer(),this)i.hasOwnProperty.call(this,e)&&delete this[e]}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger&&this.logger.info("reset");var t=this,n=t.danmu,r=n.container,a=n.bulletBtn;function o(){if(t.danmu&&t.danmu.container){var e=t.danmu.container.getBoundingClientRect();t.width=e.width,t.height=e.height,t.resetId&&(cancelAnimationFrame(t.resetId),t.resetId=null);var n=t._initChannels(),r=n.channelSize,a=n.channelCount,o=n.channels;t.channelCount=a,t.channels=o,"b2t"===t.direction?t.channelWidth=r:t.channelHeight=r}}t.container=r,a&&a.main&&a.main.queue.forEach((function(e){e.remove()})),t.channels&&t.channels.length>0&&["scroll","top","bottom"].forEach((function(e){for(var n=0;n<t.channels.length;n++)t.channels[n].queue[e].forEach((function(e){e.remove()}))})),a&&a.main&&a.main.data&&a.main.data.forEach((function(e){e.attached_=!1})),e?this.resetId=requestAnimationFrame(o):o()}},{key:"getRealOccupyArea",value:function(){return{width:this.width,height:this.height}}},{key:"updatePos",value:function(){var e=this.container.getBoundingClientRect();this.containerPos=e,this.containerWidth=e.width,this.containerHeight=e.height,this.containerTop=e.top,this.containerBottom=e.bottom,this.containerLeft=e.left,this.containerRight=e.right}},{key:"addBullet",value:function(e){var t=this,n=this.danmu,r=this.channels,a=void 0,o=void 0,i=void 0;if("b2t"===t.direction?(o=this.channelWidth,i=Math.ceil(e.width/o)):(a=this.channelHeight,i=Math.ceil(e.height/a)),i>r.length)return{result:!1,message:"exceed channels.length, occupy="+i+",channelsSize="+r.length};for(var s=!0,l=void 0,u=-1,c=0,d=r.length;c<d;c++)if(r[c].queue[e.mode].some((function(t){return t.id===e.id})))return{result:!1,message:"exited, channelOrder="+c+",danmu_id="+e.id};if("scroll"===e.mode)for(var p=0,f=r.length-i;p<=f;p+=i){s=!0;for(var h=p;h<p+i;h++){if((l=r[h]).operating.scroll||l.bookId.scroll&&l.bookId.scroll!==e.id){s=!1;break}l.operating.scroll=!0;var g=l.queue.scroll[0];if(g){var y=g.el.getBoundingClientRect();if("b2t"===t.direction){if(y.bottom>=t.containerPos.bottom){s=!1,l.operating.scroll=!1;break}}else if(y.right>=t.containerPos.right){s=!1,l.operating.scroll=!1;break}var m=void 0,v=g.moveV,x=void 0,b=e.moveV,w=void 0;if("b2t"===t.direction?(x=(m=y.bottom-t.containerTop)/v,w=t.containerHeight+e.random-m):(x=(m=y.right-t.containerLeft)/v,w=t.containerWidth+e.random-m),b>v){var k=w/(b-v);if(n.config.bOffset||(n.config.bOffset=0),x+n.config.bOffset>=k){var _=x*b-t.containerPos.width;_>0&&e.updateOffset(_+(1+Math.ceil(5*Math.random())))}}}l.operating.scroll=!1}if(s){u=p;break}}else if("top"===e.mode)for(var O=0,E=r.length-i;O<=E;O++){s=!0;for(var C=O;C<O+i;C++){if(C>Math.floor(r.length/2)){s=!1;break}if((l=r[C]).operating[e.mode]){s=!1;break}if((l.bookId[e.mode]||e.prior)&&l.bookId[e.mode]!==e.id){s=!1;break}if(l.operating[e.mode]=!0,l.queue[e.mode].length>0){s=!1,l.operating[e.mode]=!1;break}l.operating[e.mode]=!1}if(s){u=O;break}}else if("bottom"===e.mode)for(var j=r.length-i;j>=0;j--){s=!0;for(var z=j;z<j+i;z++){if(z<=Math.floor(r.length/2)){s=!1;break}if((l=r[z]).operating[e.mode]){s=!1;break}if((l.bookId[e.mode]||e.prior)&&l.bookId[e.mode]!==e.id){s=!1;break}if(l.operating[e.mode]=!0,l.queue[e.mode].length>0){s=!1,l.operating[e.mode]=!1;break}l.operating[e.mode]=!1}if(s){u=j;break}}if(-1!==u){for(var M=u,S=u+i;M<S;M++)(l=r[M]).operating[e.mode]=!0,l.queue[e.mode].unshift(e),e.prior&&(delete l.bookId[e.mode],t.logger&&t.logger.info(M+"号轨道恢复正常使用")),l.operating[e.mode]=!1;return e.prior&&(t.logger&&t.logger.info(e.id+"号优先弹幕运行完毕"),delete e.bookChannelId,n.player&&n.bulletBtn.main.data.some((function(t){return t.id===e.id&&(delete t.bookChannelId,!0)}))),e.channel_id=[u,i],e.el.setAttribute("data-line-index",u+1),"b2t"===t.direction?(e.top=u*o,t.danmu.config.area&&t.danmu.config.area.start&&(e.top+=t.containerWidth*t.danmu.config.area.start)):(e.top=u*a,t.danmu.config.area&&t.danmu.config.area.start&&(e.top+=t.containerHeight*t.danmu.config.area.start)),{result:e,message:"success"}}if(e.options.realTime){var L=0,T=-1,P=null;if(t.danmu.bulletBtn.main.queue.forEach((function(e,n){!e.prior&&!e.options.realTime&&e.el&&e.el.getBoundingClientRect().left>t.containerPos.right&&e.start>=L&&(L=e.start,T=n,P=e)})),P){P.remove(),t.removeBullet(P),t.danmu.bulletBtn.main.queue.splice(T,1),e.channel_id=P.channel_id;for(var D=P.channel_id[0],I=P.channel_id[0]+P.channel_id[1];D<I;D++)(l=r[D]).operating[e.mode]=!0,l.queue[e.mode].unshift(e),e.prior&&delete l.bookId[e.mode],l.operating[e.mode]=!1;return e.top=P.top,t.danmu.config.area&&t.danmu.config.area.start&&(e.top+=t.containerHeight*t.danmu.config.area.start),{result:e,message:"success"}}}if(e.prior)if(e.bookChannelId||t.danmu.live)n.player&&n.bulletBtn.main.data.some((function(n){return n.id===e.id&&(t.logger&&t.logger.info(e.id+"号优先弹幕将于2秒后再次请求注册"),n.start+=2e3,!0)}));else{u=-1;for(var A=0,q=r.length-i;A<=q;A++){s=!0;for(var B=A;B<A+i;B++)if(r[B].bookId[e.mode]){s=!1;break}if(s){u=A;break}}if(-1!==u){for(var R=u;R<u+i;R++)r[R].bookId[e.mode]=e.id,t.logger&&t.logger.info(R+"号轨道被"+e.id+"号优先弹幕预定");n.player&&n.bulletBtn.main.data.some((function(n){return n.id===e.id&&(t.logger&&t.logger.info(e.id+"号优先弹幕将于2秒后再次请求注册"),n.start+=2e3,n.bookChannelId=[u,i],t.logger&&t.logger.info(e.id+"号优先弹幕预定了"+u+"~"+(u+i-1)+"号轨道"),!0)}))}}return{result:!1,message:"no surplus will right"}}},{key:"removeBullet",value:function(e){this.logger&&this.logger.info("removeBullet "+(e.options.txt||"[DOM Element]"));for(var t=this.channels,n=e.channel_id,r=void 0,a=n[0],o=n[0]+n[1];a<o;a++)if(r=t[a]){r.operating[e.mode]=!0;var i=-1;r.queue[e.mode].some((function(t,n){return t.id===e.id&&(i=n,!0)})),i>-1&&r.queue[e.mode].splice(i,1),r.operating[e.mode]=!1}e.options.loop&&this.danmu.bulletBtn.main.playedData.push(e.options)}},{key:"resizeSync",value:function(){this.resize(!0)}},{key:"_initChannels",value:function(){if(this.danmu&&this.danmu.config){var e=this.danmu.config,t=e.channelSize||(/mobile/gi.test(navigator.userAgent)?10:12),n=void 0;if(e.area){var r=e.area,a=r.lines,o=r.start,l=r.end;if((0,s.validAreaLineRule)(a))n=a,"b2t"===this.direction?this.width=n*t:this.height=n*t;else if(o>=0&&l>=o){var u=l-o;"b2t"===this.direction?this.width=Math.floor(this.width*u):this.height=Math.floor(this.height*u)}}(0,i.isNumber)(n)||(n="b2t"===this.direction?Math.floor(this.width/t):Math.floor(this.height/t));for(var c=[],d=0;d<n;d++)c[d]={id:d,queue:{scroll:[],top:[],bottom:[]},operating:{scroll:!1,top:!1,bottom:!1},bookId:{}};return{channelSize:t,channelCount:n,channels:c}}}},{key:"resize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.logger&&this.logger.info("resize");var t=this;function n(e,t){e[t]={id:t,queue:{scroll:[],top:[],bottom:[]},operating:{scroll:!1,top:!1,bottom:!1},bookId:{}}}function r(e,r){function a(n){["scroll","top"].forEach((function(r){t.channels[n].queue[r].forEach((function(t){t.el&&e[n].queue[r].push(t)}))}))}function o(n){t.channels[n].queue.bottom.forEach((function(a){if(a.el&&(e[n+e.length-t.channels.length].queue.bottom.push(a),a.channel_id[0]+a.channel_id[1]-1===n)){var o=[].concat(a.channel_id);a.channel_id=[o[0]-t.channels.length+e.length,o[1]],a.top=a.channel_id[0]*r,t.danmu.config.area&&t.danmu.config.area.start&&(a.top+=t.containerHeight*t.danmu.config.area.start),a.topInit()}}))}for(var i=0;i<t.channels.length;i++)n(e,i),a(i),o(i);for(var s=function(t){["scroll","top","bottom"].forEach((function(n){e[t].queue[n].forEach((function(e){e.resized=!1}))}))},l=0;l<e.length;l++)s(l);t.channels=e,"b2t"===t.direction?t.channelWidth=r:t.channelHeight=r}function a(e,r){for(var a=["scroll","top","bottom"],o=function(o){n(e,o),a.forEach((function(n){if("top"===n&&o>Math.floor(e.length/2));else if("bottom"===n&&o<=Math.floor(e.length/2));else{var a="bottom"===n?o-e.length+t.channels.length:o;t.channels[a].queue[n].forEach((function(i,s){if(i.el){if(e[o].queue[n].push(i),"bottom"===n&&i.channel_id[0]+i.channel_id[1]-1===a){var l=[].concat(i.channel_id);i.channel_id=[l[0]-t.channels.length+e.length,l[1]],i.top=i.channel_id[0]*r,t.danmu.config.area&&t.danmu.config.area.start&&(i.top+=t.containerHeight*t.danmu.config.area.start),i.topInit()}t.channels[a].queue[n].splice(s,1)}}))}}))},i=0;i<e.length;i++)o(i);var s=function(t){a.forEach((function(n){e[t].queue[n].forEach((function(e){e.resized=!1}))}))};for(i=0;i<e.length;i++)s(i);t.channels=e,"b2t"===t.direction?t.channelWidth=r:t.channelHeight=r}function o(){var e=t.danmu,n=e.container,o=e.bulletBtn;t.container=n,t.updatePos(),t._cancelResizeTimer(),o.main.data&&o.main.data.forEach((function(e){e.bookChannelId&&(delete e.bookChannelId,t.logger&&t.logger.info("resize导致"+e.id+"号优先弹幕预定取消"))})),t.logger&&t.logger.info("resize导致所有轨道恢复正常使用"),t.width=t.containerWidth,t.height=t.containerHeight;var i=t._initChannels(),s=i.channelSize,l=i.channels;t.channels&&(t.channels.length<=l.length?r(l,s):a(l,s)),t.resizing=!1}t.resizing||(t.resizing=!0,e?o():(this._cancelResizeTimer(),this.resizeId=requestAnimationFrame(o)))}},{key:"_cancelResizeTimer",value:function(){this.resizeId&&(cancelAnimationFrame(this.resizeId),this.resizeId=null)}},{key:"direction",get:function(){return this.danmu.direction}}]),t}(o.default);t.default=l,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validAreaLineRule=function(e){return"number"==typeof e&&e>=0&&Number.isInteger(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t={initDOM:function(){return document.createElement("div")},initSize:10},this.init(t)}return r(e,[{key:"init",value:function(e){this.idleList=[],this.usingList=[],this._id=0,this.options=e,this._expand(e.initSize)}},{key:"use",value:function(){this.idleList.length||this._expand(1);var e=this.idleList.shift();return this.usingList.push(e),e}},{key:"unused",value:function(e){var t=this.usingList.indexOf(e);t<0||(this.usingList.splice(t,1),e.style.opacity=0,this.idleList.push(e))}},{key:"_expand",value:function(e){for(var t=0;t<e;t++)this.idleList.push(this.options.initDOM(this._id++))}},{key:"destroy",value:function(){for(var e=0;e<this.idleList.length;e++)this.idleList[e].innerHTML="",this.idleList[e].textcontent="",this.clearElementStyle(this.idleList[e]);for(var t=0;t<this.usingList.length;t++)this.usingList[t].innerHTML="",this.usingList[t].textcontent="",this.clearElementStyle(this.usingList[t]);for(var n in this)a.hasOwnProperty.call(this,n)&&delete this[n]}},{key:"clearElementStyle",value:function(e){var t="undefined"!=typeof window?window.navigator.userAgent:null;t&&(t.indexOf("MSIE ")>-1||t.indexOf("Trident/")>-1?(0,a.styleUtil)(e,"transform","none"):e.setAttribute("style",""))}}]),e}();t.default=o,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.destroyObserver=t.unObserver=t.addObserver=void 0;var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(0),o=new(function(){function e(){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.__handlers=[],window.ResizeObserver)try{this.observer=new window.ResizeObserver((0,a.throttle)((function(e){t.__trigger(e)}),100))}catch(e){}}return r(e,[{key:"addObserver",value:function(e,t){if(this.observer&&e){this.observer&&this.observer.observe(e);for(var n=this.__handlers,r=-1,a=0;a<n.length;a++)n[a]&&e===n[a].target&&(r=a);r>-1?this.__handlers[r].handler.push(t):this.__handlers.push({target:e,handler:[t]})}}},{key:"unObserver",value:function(e){if(e){var t=-1;this.__handlers.map((function(n,r){e===n.target&&(t=r)})),this.observer&&this.observer.unobserve(e),t>-1&&this.__handlers.splice(t,1)}}},{key:"destroyObserver",value:function(){this.observer&&this.observer.disconnect(),this.observer=null,this.__handlers=null}},{key:"__runHandler",value:function(e){for(var t=this.__handlers,n=0;n<t.length;n++)if(t[n]&&e===t[n].target){t[n].handler&&t[n].handler.map((function(e){try{e()}catch(e){console.error(e)}}));break}}},{key:"__trigger",value:function(e){var t=this;e.map((function(e){t.__runHandler(e.target)}))}}]),e}());t.addObserver=function(e,t){o.addObserver(e,t)},t.unObserver=function(e,t){o.unObserver(e,t)},t.destroyObserver=function(e,t){o.destroyObserver(e,t)}},function(e,t,n){var r=n(35);"string"==typeof r&&(r=[[e.i,r,""]]),n(37)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(36)(!1)).push([e.i,".danmu{overflow:hidden;-webkit-user-select:none;-moz-user-select:none;user-select:none;-ms-user-select:none}.danmu>*{position:absolute;white-space:nowrap}.danmu-switch{width:32px;height:20px;border-radius:100px;background-color:#ccc;-webkit-box-sizing:border-box;box-sizing:border-box;outline:none;cursor:pointer;position:relative;text-align:center;margin:10px auto}.danmu-switch.danmu-switch-active{padding-left:12px;background-color:#f85959}.danmu-switch span.txt{width:20px;height:20px;line-height:20px;text-align:center;display:block;border-radius:100px;background-color:#fff;-webkit-box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);box-shadow:-2px 0 0 0 rgba(0, 0, 0, .04);font-family:PingFangSC;font-size:10px;font-weight:500;color:#f44336}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,r=e[1]||"",a=e[3];if(!a)return r;if(t&&"function"==typeof btoa){var o=(n=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),i=a.sources.map((function(e){return"/*# sourceURL="+a.sourceRoot+e+" */"}));return[r].concat(i).concat([o]).join("\n")}return[r].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(r[o]=!0)}for(a=0;a<e.length;a++){var i=e[a];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),t.push(i))}},t}},function(e,t,n){var r,a,o={},i=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,d=[],p=n(38);function f(e,t){for(var n=0;n<e.length;n++){var r=e[n],a=o[r.id];if(a){a.refs++;for(var i=0;i<a.parts.length;i++)a.parts[i](r.parts[i]);for(;i<r.parts.length;i++)a.parts.push(x(r.parts[i],t))}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(x(r.parts[i],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function h(e,t){for(var n=[],r={},a=0;a<e.length;a++){var o=e[a],i=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[i]?r[i].parts.push(s):n.push(r[i]={id:i,parts:[s]})}return n}function g(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,a)}}function y(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),v(t,e.attrs),g(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,r,a,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var i=c++;n=u||(u=m(t)),r=k.bind(null,n,i,!1),a=k.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),g(e,t),t}(t),r=O.bind(null,n,t),a=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=_.bind(null,n),a=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],a=0;a<n.length;a++){var i=n[a];(s=o[i.id]).refs--,r.push(s)}for(e&&f(h(e,t),t),a=0;a<r.length;a++){var s;if(0===(s=r[a]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete o[s.id]}}}};var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function k(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function _(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function O(e,t,n){var r=n.css,a=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||o)&&(r=p(r)),a&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var i=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}}])},function(e,t,n){"use strict";n.r(t),t.default='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40">\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M36.5,18.73a1.19,1.19,0,0,0,1-1.14V16.33a1.2,1.2,0,0,0-1-1.13l-.61-.08a1.75,1.75,0,0,1-1.3-.86l-.21-.36-.2-.36A1.72,1.72,0,0,1,34,12l.23-.58a1.18,1.18,0,0,0-.5-1.42l-1.1-.62a1.18,1.18,0,0,0-1.47.3l-.39.51a1.82,1.82,0,0,1-1.41.72c-.44,0-1.88-.27-2.22-.7l-.39-.49a1.18,1.18,0,0,0-1.48-.28l-1.09.64a1.19,1.19,0,0,0-.47,1.43l.25.59a1.87,1.87,0,0,1-.08,1.58c-.26.37-1.17,1.5-1.71,1.58l-.63.09a1.19,1.19,0,0,0-1,1.14l0,1.27a1.17,1.17,0,0,0,1,1.12l.61.08a1.74,1.74,0,0,1,1.3.87l.21.36.2.35A1.69,1.69,0,0,1,24,22.08l-.23.59a1.19,1.19,0,0,0,.5,1.42l1.1.62a1.19,1.19,0,0,0,1.48-.31l.38-.5a1.83,1.83,0,0,1,1.41-.72c.44,0,1.88.25,2.22.69l.39.49a1.18,1.18,0,0,0,1.48.28L33.86,24a1.19,1.19,0,0,0,.47-1.43L34.09,22a1.84,1.84,0,0,1,.07-1.58c.26-.37,1.17-1.5,1.72-1.58ZM31,18.94a2.76,2.76,0,0,1-4.65-1.2A2.71,2.71,0,0,1,27,15.13a2.76,2.76,0,0,1,4.64,1.2A2.7,2.7,0,0,1,31,18.94Z"/>\n <path fill="#f85959" transform="scale(0.8 0.8)" d="M32,0H3.59A3.59,3.59,0,0,0,0,3.59v17A3.59,3.59,0,0,0,3.59,24.2H19.72a12.59,12.59,0,0,1-.81-1.2A11.73,11.73,0,0,1,35.54,7.28V3.59A3.59,3.59,0,0,0,32,0ZM13,14.18H4.29a1.52,1.52,0,0,1,0-3H13a1.52,1.52,0,0,1,0,3ZM16.45,8H4.29a1.51,1.51,0,0,1,0-3H16.45a1.51,1.51,0,1,1,0,3Z"/>\n</svg>\n'},function(e,t,n){var r=n(8);"string"==typeof r&&(r=[[e.i,r,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n(10)(r,a);r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(9)(!1)).push([e.i,".xgplayer-skin-default .danmu-switch{-webkit-order:6;-moz-box-ordinal-group:7;order:6;z-index:26}.xgplayer-skin-default .xgplayer-danmu{display:none;position:absolute;top:0;left:0;right:0;height:100%;overflow:hidden;z-index:9;outline:none;pointer-events:none}.xgplayer-skin-default .xgplayer-danmu>*{position:absolute;white-space:nowrap;z-index:9;pointer-events:auto}.xgplayer-skin-default .xgplayer-danmu.xgplayer-has-danmu{display:block}.xgplayer-skin-default .xgplayer-panel{outline:none;-webkit-order:7;-moz-box-ordinal-group:8;order:7;width:40px;height:40px;display:inline-block;position:relative;font-family:PingFangSC-Regular;font-size:13px;color:hsla(0,0%,100%,.8);z-index:36}.xgplayer-skin-default .xgplayer-panel .xgplayer-panel-icon{cursor:pointer;position:absolute;margin-left:5px;top:10px}.xgplayer-skin-default .xgplayer-panel-active{display:block!important;bottom:30px}.xgplayer-skin-default .xgplayer-panel-slider{z-index:36;display:none;position:absolute;width:230px;height:230px;background:rgba(0,0,0,.54);border-radius:1px;padding:10px 20px;outline:none;left:-115px;bottom:40px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode{padding-bottom:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode-radio li{display:inline;list-style:none;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode ul{display:-webkit-flex;display:-moz-box;display:flex;-webkit-justify-content:space-around;justify-content:space-around}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode li{margin:0 12px;font-size:11px;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-hidemode-font{margin-bottom:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency{display:block;margin-top:10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-transparency .xgplayer-transparency-bar::-moz-range-progress{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border-radius:4px;background:linear-gradient(90deg,#f85959,#f85959 100%,#aaa)}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea{display:block;margin-top:8px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-threequarters,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-twoquarters{margin-left:-6px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea-full{margin-right:3px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-full-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-onequarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-threequarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-twoquarters-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-showarea .xgplayer-showarea-zero-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed{display:block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-large-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-middle-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmuspeed .xgplayer-danmuspeed-small-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont{display:block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-name{display:inline-block;position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control{display:inline-block}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-up{width:150px;margin-left:10px;display:-moz-box;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between;color:#aaa}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-down{position:relative;top:-10px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont-control-down-dots{display:-webkit-flex;display:-moz-box;display:flex;width:150px;margin-left:10px;-webkit-justify-content:space-between;-moz-box-pack:justify;justify-content:space-between}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-line{-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;outline:none;width:150px;height:4px;background:#aaa;border-radius:4px;border-style:none;margin-left:10px;margin-top:-2px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-line::-moz-focus-outer{border:0!important}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-webkit-slider-runnable-track{outline:none;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-moz-range-track{outline:none;background-color:#aaa;border-color:transparent;cursor:pointer;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-color::-ms-track{outline:none;background-color:#aaa;color:transparent;border-color:transparent;width:150px;height:4px;border-radius:4px}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-webkit-slider-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;margin-top:-4px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-moz-range-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:0;width:0;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-bar::-ms-thumb{outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:6px solid #f85959;height:6px;width:6px;border-radius:6px;cursor:pointer}.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-large-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-middle-dot,.xgplayer-skin-default .xgplayer-panel-slider .xgplayer-danmufont .xgplayer-danmufont-small-dot{width:3px;height:3px;border:3px solid #aaa;border-radius:50%;background-color:#aaa;position:relative;top:16px;z-index:-1}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var a=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),o=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[n].concat(o).concat([a]).join("\n")}var i;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(r[o]=!0)}for(a=0;a<e.length;a++){var i=e[a];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),t.push(i))}},t}},function(e,t,n){var r,a,o={},i=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=r.apply(this,arguments)),a}),s=function(e){return document.querySelector(e)},l=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=s.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),u=null,c=0,d=[],p=n(11);function f(e,t){for(var n=0;n<e.length;n++){var r=e[n],a=o[r.id];if(a){a.refs++;for(var i=0;i<a.parts.length;i++)a.parts[i](r.parts[i]);for(;i<r.parts.length;i++)a.parts.push(x(r.parts[i],t))}else{var s=[];for(i=0;i<r.parts.length;i++)s.push(x(r.parts[i],t));o[r.id]={id:r.id,refs:1,parts:s}}}}function h(e,t){for(var n=[],r={},a=0;a<e.length;a++){var o=e[a],i=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[i]?r[i].parts.push(s):n.push(r[i]={id:i,parts:[s]})}return n}function g(e,t){var n=l(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var a=l(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,a)}}function y(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function m(e){var t=document.createElement("style");return e.attrs.type="text/css",v(t,e.attrs),g(e,t),t}function v(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function x(e,t){var n,r,a,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var i=c++;n=u||(u=m(t)),r=k.bind(null,n,i,!1),a=k.bind(null,n,i,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",v(t,e.attrs),g(e,t),t}(t),r=O.bind(null,n,t),a=function(){y(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=_.bind(null,n),a=function(){y(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else a()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=h(e,t);return f(n,t),function(e){for(var r=[],a=0;a<n.length;a++){var i=n[a];(s=o[i.id]).refs--,r.push(s)}e&&f(h(e,t),t);for(a=0;a<r.length;a++){var s;if(0===(s=r[a]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete o[s.id]}}}};var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function k(e,t,n,r){var a=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function _(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function O(e,t,n){var r=n.css,a=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&a;(t.convertToAbsoluteUrls||o)&&(r=p(r)),a&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */");var i=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(i),s&&URL.revokeObjectURL(s)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var a,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(a=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(a)+")")}))}}]);
@@ -1 +1 @@
1
- window.PlayerControls=window.PlayerControls||{},window.PlayerControls.errorRetry=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o=t(1),a=(n=o)&&n.__esModule?n:{default:n};r.default={name:"errorRetry",method:function(){a.default.method.call(this)}},e.exports=r.default},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o=t(2),a=(n=o)&&n.__esModule?n:{default:n};var u={maxCount:3,backupUrl:"",isFetch:!0,fetchTimeout:100};r.default={name:"errorretry",method:function(){var e=this,r=this;if(r.config.errorConfig&&!(r.src.indexOf("blob:")>-1)){var t={},n=r.config.errorConfig;for(var o in u)void 0===n[o]?t[o]=u[o]:t[o]=n[o];r.retryData={count:0,errfTimer:null,isFetchReturn:!1,currentTime:0};var i=r._onError;r._onError=function(n){var o=e.retryData.count;if(o>t.maxCount)t.isFetch?function(e,r,t){var n=function(r,t){e.retryData.isFetchReturn||(e.retryData.isFetchReturn=!0,r(t))};return new Promise((function(o,a){try{var u=new window.XMLHttpRequest;u.open("get",r),u.onload=function(){n(o,{status:u.status,statusText:u.statusText,xhr:u})},u.onerror=function(){n(o,{status:u.status,statusText:u.statusText||"The network environment is disconnected or the address is invalid",xhr:u})},u.onabort=function(){},e.retryData.errfTimer=window.setTimeout((function(){var r=e.retryData.errfTimer;window.clearTimeout(r),e.retryData.errfTimer=null,n(o,{status:-1,statusText:"request timeout"})}),t),u.send()}catch(r){e.retryData.isFetchReturn=!0,n(o,{status:-2,statusText:"request error"})}}))}(e,e.currentSrc,t.fetchTimeout).then((function(r){e.emit("error",new a.default({type:"network",currentTime:e.currentTime,duration:e.duration||0,networkState:e.networkState,readyState:e.readyState,currentSrc:e.currentSrc,src:e.src,ended:e.ended,httpCode:r.status,httpMsg:r.statusText,errd:{line:101,msg:e.error,handle:"plugin errorRetry"},errorCode:e.video&&e.video.error.code,mediaError:e.video&&e.video.error})),i.call(e,r)})):i.call(e,n);else{0===o&&(e.retryData.currentTime=e.currentTime,e.once("canplay",s.bind(e)));var u="";u=t.count<2?t.backupUrl?t.backupUrl:r.currentSrc:t.backupUrl&&o>1?t.backupUrl:r.currentSrc,e.retryData.count++,e.src=u}}}function s(){this.currentTime=this.retryData.currentTime,this.play(),this.retryData.retryCode=0,this.retryData.isFetchReturn=!1,this.retryData.currentTime=0}}},e.exports=r.default},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(3);function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var a={network:{code:1,msg:"视频下载错误",remark:"只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},mse:{code:2,msg:"流追加错误",remark:"追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},parse:{code:3,msg:"解析错误",remark:"mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},format:{code:4,msg:"格式错误",remark:"如果浏览器不支持的格式导致播放错误"},decoder:{code:5,msg:"解码错误",remark:"浏览器解码异常会抛出此类型错误"},runtime:{code:6,msg:"语法错误",remark:"播放器语法错误"},timeout:{code:7,msg:"播放超时",remark:"播放过程中无法正常请求下一个分段导致播放中断"},other:{code:8,msg:"其他错误",remark:"不可知的错误或被忽略的错误类型"}};r.default=function e(r,t,u,i,s,c,d,l){var f=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},m=arguments[9],y=arguments[10];o(this,e);var p={};if(arguments.length>1)p.playerVersion=n.version,p.errorType=r,p.domain=document.domain,p.duration=u,p.currentTime=t,p.networkState=i,p.readyState=s,p.currentSrc=d,p.src=c,p.ended=l,p.errd=f,p.ex=(a[r]||{}).msg,p.errorCode=m,p.mediaError=y;else{var v=arguments[0];Object.keys(v).map((function(e){p[e]=v[e]})),p.ex=(v.type&&a[v.type]||{}).msg}return p},e.exports=r.default},function(e){e.exports=JSON.parse('{"version":"2.32.3"}')}]);
1
+ window.PlayerControls=window.PlayerControls||{},window.PlayerControls.errorRetry=function(e){var r={};function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(r){return e[r]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=0)}([function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o=t(1),a=(n=o)&&n.__esModule?n:{default:n};r.default={name:"errorRetry",method:function(){a.default.method.call(this)}},e.exports=r.default},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n,o=t(2),a=(n=o)&&n.__esModule?n:{default:n};var u={maxCount:3,backupUrl:"",isFetch:!0,fetchTimeout:100};r.default={name:"errorretry",method:function(){var e=this,r=this;if(r.config.errorConfig&&!(r.src.indexOf("blob:")>-1)){var t={},n=r.config.errorConfig;for(var o in u)void 0===n[o]?t[o]=u[o]:t[o]=n[o];r.retryData={count:0,errfTimer:null,isFetchReturn:!1,currentTime:0};var i=r._onError;r._onError=function(n){var o=e.retryData.count;if(o>t.maxCount)t.isFetch?function(e,r,t){var n=function(r,t){e.retryData.isFetchReturn||(e.retryData.isFetchReturn=!0,r(t))};return new Promise((function(o,a){try{var u=new window.XMLHttpRequest;u.open("get",r),u.onload=function(){n(o,{status:u.status,statusText:u.statusText,xhr:u})},u.onerror=function(){n(o,{status:u.status,statusText:u.statusText||"The network environment is disconnected or the address is invalid",xhr:u})},u.onabort=function(){},e.retryData.errfTimer=window.setTimeout((function(){var r=e.retryData.errfTimer;window.clearTimeout(r),e.retryData.errfTimer=null,n(o,{status:-1,statusText:"request timeout"})}),t),u.send()}catch(r){e.retryData.isFetchReturn=!0,n(o,{status:-2,statusText:"request error"})}}))}(e,e.currentSrc,t.fetchTimeout).then((function(r){e.emit("error",new a.default({type:"network",currentTime:e.currentTime,duration:e.duration||0,networkState:e.networkState,readyState:e.readyState,currentSrc:e.currentSrc,src:e.src,ended:e.ended,httpCode:r.status,httpMsg:r.statusText,errd:{line:101,msg:e.error,handle:"plugin errorRetry"},errorCode:e.video&&e.video.error.code,mediaError:e.video&&e.video.error})),i.call(e,r)})):i.call(e,n);else{0===o&&(e.retryData.currentTime=e.currentTime,e.once("canplay",s.bind(e)));var u="";u=t.count<2?t.backupUrl?t.backupUrl:r.currentSrc:t.backupUrl&&o>1?t.backupUrl:r.currentSrc,e.retryData.count++,e.src=u}}}function s(){this.currentTime=this.retryData.currentTime,this.play(),this.retryData.retryCode=0,this.retryData.isFetchReturn=!1,this.retryData.currentTime=0}}},e.exports=r.default},function(e,r,t){"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n=t(3);function o(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}var a={network:{code:1,msg:"视频下载错误",remark:"只要视频下载错误就使用此类型,无论是video本身的超时还是xhr的分段请求超时或者资源不存在"},mse:{code:2,msg:"流追加错误",remark:"追加流的时候如果类型不对、无法被正确解码则会触发此类错误"},parse:{code:3,msg:"解析错误",remark:"mp4、hls、flv我们都是使用js进行格式解析,如果解析失败则会触发此类错误"},format:{code:4,msg:"格式错误",remark:"如果浏览器不支持的格式导致播放错误"},decoder:{code:5,msg:"解码错误",remark:"浏览器解码异常会抛出此类型错误"},runtime:{code:6,msg:"语法错误",remark:"播放器语法错误"},timeout:{code:7,msg:"播放超时",remark:"播放过程中无法正常请求下一个分段导致播放中断"},other:{code:8,msg:"其他错误",remark:"不可知的错误或被忽略的错误类型"}};r.default=function e(r,t,u,i,s,c,d,l){var f=arguments.length>8&&void 0!==arguments[8]?arguments[8]:{line:"",handle:"",msg:"",version:""},m=arguments[9],y=arguments[10];o(this,e);var p={};if(arguments.length>1)p.playerVersion=n.version,p.errorType=r,p.domain=document.domain,p.duration=u,p.currentTime=t,p.networkState=i,p.readyState=s,p.currentSrc=d,p.src=c,p.ended=l,p.errd=f,p.ex=(a[r]||{}).msg,p.errorCode=m,p.mediaError=y;else{var v=arguments[0];Object.keys(v).map((function(e){p[e]=v[e]})),p.ex=(v.type&&a[v.type]||{}).msg}return p},e.exports=r.default},function(e){e.exports=JSON.parse('{"version":"2.32.6-alpha.0"}')}]);