mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-08 19:06:15 -08:00
7 lines
75 KiB
JavaScript
7 lines
75 KiB
JavaScript
/*!
|
|
* artplayer-plugin-danmuku.js v5.1.0
|
|
* Github: https://github.com/zhw2590582/ArtPlayer
|
|
* (c) 2017-2024 Harvey Zack
|
|
* Released under the MIT License.
|
|
*/
|
|
!function(e,t,r,n,a){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[n]&&o[n],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!s[t]){if(!e[t]){var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var p=s[t]=new u.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return s[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=i,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return o[n]}}),o[n]=u;for(var c=0;c<t.length;c++)u(t[c]);if(r){var p=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({"40mNk":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return c});var a=e("./danmuku"),o=n.interopDefault(a),i=e("./setting"),s=n.interopDefault(i),l=e("./heatmap"),u=n.interopDefault(l);function c(e){return function(t){var r=new o.default(t,e),n=new s.default(t,r);return r.option.heatmap&&(0,u.default)(t,r,r.option.heatmap),{name:"artplayerPluginDanmuku",emit:r.emit.bind(r),load:r.load.bind(r),config:r.config.bind(r),hide:r.hide.bind(r),show:r.show.bind(r),reset:r.reset.bind(r),mount:n.mount.bind(n),get option(){return r.option},get isHide(){return r.isHide},get isStop(){return r.isStop}}}}c.icons=s.default.icons,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=c)},{"./danmuku":"jgffw","./setting":"d3V7t","./heatmap":"dXFn2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgffw:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return f});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_object_spread"),l=e("@swc/helpers/_/_object_spread_props"),u=e("@swc/helpers/_/_ts_generator"),c=e("./bilibili"),p=e("bundle-text:./worker"),d=n.interopDefault(p),f=function(){function e(t,r){(0,o._)(this,e);var n=t.constructor,a=t.template;this.utils=n.utils,this.validator=n.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=t,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(r),this.worker=new Worker(URL.createObjectURL(new Blob([d.default]))),this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),t.on("video:play",this.start),t.on("video:playing",this.start),t.on("video:pause",this.stop),t.on("video:waiting",this.stop),t.on("destroy",this.destroy),t.on("resize",this.reset),this.load()}return(0,i._)(e,[{key:"isRotate",get:function(){var e,t;return null===(t=this.art.plugins)||void 0===t?void 0:null===(e=t.autoOrientation)||void 0===e?void 0:e.state}},{key:"marginTop",get:function(){var t=this.utils.clamp,r=this.option.margin[0],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[0]}},{key:"marginBottom",get:function(){var t=this.utils.clamp,r=this.option.margin[1],n=this.$player.clientHeight;return"number"==typeof r?t(r,0,n):"string"==typeof r&&r.endsWith("%")?t(n*(parseFloat(r)/100),0,n):e.option.margin[1]}},{key:"load",value:function(){var e=this;return(0,a._)(function(){var t,r;return(0,u._)(this,function(n){switch(n.label){case 0:t=e.utils.errorHandle,n.label=1;case 1:if(n.trys.push([1,9,,10]),"function"!=typeof e.option.danmuku)return[3,3];return[4,e.option.danmuku()];case 2:case 4:case 6:return e.danmus=n.sent(),[3,8];case 3:if("function"!=typeof e.option.danmuku.then)return[3,5];return[4,e.option.danmuku];case 5:if("string"!=typeof e.option.danmuku)return[3,7];return[4,(0,c.bilibiliDanmuParseFromUrl)(e.option.danmuku)];case 7:e.danmus=e.option.danmuku,n.label=8;case 8:return t(Array.isArray(e.danmus),"Danmuku need return an array as result"),e.queue=[],e.$danmuku.innerText="",e.danmus.forEach(function(t){return e.emit(t)}),e.art.emit("artplayerPluginDanmuku:loaded",e.queue),[3,10];case 9:throw r=n.sent(),e.art.emit("artplayerPluginDanmuku:error",r),r;case 10:return[2,e]}})})()}},{key:"emit",value:function(e){var t=this.utils.clamp;return this.validator(e,{text:"string",mode:"?number",color:"?string",time:"?number",border:"?boolean",style:"?object",escape:"?boolean"}),e.text.trim()&&(e.time?e.time=t(e.time,0,1/0):e.time=this.art.currentTime+.5,void 0===e.mode&&(e.mode=this.option.mode),void 0===e.style&&(e.style={}),void 0===e.escape&&(e.escape=!0),void 0===e.color&&(e.color=this.option.color),[0,1,2].includes(e.mode)&&this.option.filter(e)&&this.queue.push((0,l._)((0,s._)({},e),{$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}))),this}},{key:"config",value:function(t){var r=this.utils.clamp,n=this.art.template.$controlsCenter;if(this.option=Object.assign({},e.option,this.option,t),this.validator(this.option,e.scheme),this.option.mode=r(this.option.mode,0,2),this.option.speed=r(this.option.speed,1,10),this.option.opacity=r(this.option.opacity,0,1),this.option.lockTime=r(this.option.lockTime,1,60),this.option.maxLength=r(this.option.maxLength,1,1e3),this.option.mount=this.option.mount||n,t.fontSize){var a=this.getFontSize(this.option.fontSize);a!==this.option.fontSize&&(this.option.fontSize=a,this.reset())}return this.option.visible?this.show():this.hide(),this.art.emit("artplayerPluginDanmuku:config",this.option),this}},{key:"getLeft",value:function(e){var t=e.getBoundingClientRect();return this.isRotate?t.top:t.left}},{key:"getRef",value:function(){var t=this.$refs.pop()||document.createElement("div");return t.style.cssText=e.cssText,t.dataset.mode="",t}},{key:"getFontSize",value:function(t){var r=this.utils.clamp,n=this.$player.clientHeight;return"number"==typeof t?r(t,12,n):"string"==typeof t&&t.endsWith("%")?r(n*(parseFloat(t)/100),12,n):e.option.fontSize}},{key:"postMessage",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Promise(function(r){t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var n=e.data;n.id===t.id&&r(n)}})}},{key:"filter",value:function(e,t){return this.queue.filter(function(t){return t.$state===e}).map(t)}},{key:"getReady",value:function(){var e=this.art.currentTime;return this.queue.filter(function(t){return"ready"===t.$state||"wait"===t.$state&&e+.1>=t.time&&t.time>=e-.1})}},{key:"getEmits",value:function(){var e=this,t=[],r=this.$player.clientWidth,n=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=e.getLeft(a.$ref)-n,s=a.$ref.clientHeight,l=a.$ref.clientWidth,u=i+l,c=u/a.$restTime,p={};p.top=o,p.left=i,p.height=s,p.width=l,p.right=r-u,p.speed=c,p.distance=u,p.time=a.$restTime,p.mode=a.mode,t.push(p)}),t}},{key:"makeWait",value:function(t){t.$state="wait",t.$ref&&(t.$ref.style.cssText=e.cssText,this.$refs.push(t.$ref),t.$ref=null)}},{key:"update",value:function(){var e=this.utils.setStyles,t=this;return this.timer=window.requestAnimationFrame((0,a._)(function(){var r,n,a,o,i,s,l,c;return(0,u._)(this,function(u){switch(u.label){case 0:if(!(t.art.playing&&!t.isHide))return[3,5];t.filter("emit",function(e){var r=(Date.now()-e.$lastStartTime)/1e3;e.$restTime-=r,e.$lastStartTime=Date.now(),e.$restTime<=0&&t.makeWait(e)}),r=t.getReady(),n=0,u.label=1;case 1:if(!(n<r.length))return[3,5];return a=r[n],[4,t.option.beforeVisible(a)];case 2:if(!u.sent())return[3,4];return i=(o=t.$player).clientWidth,s=o.clientHeight,a.$ref=t.getRef(),a.escape?a.$ref.innerText=a.text:a.$ref.innerHTML=a.text,t.$danmuku.appendChild(a.$ref),a.$ref.style.left="".concat(i,"px"),a.$ref.style.opacity=t.option.opacity,a.$ref.style.fontSize="".concat(t.option.fontSize,"px"),a.$ref.style.color=a.color,a.$ref.style.border=a.border?"1px solid ".concat(a.color):null,a.$ref.style.backgroundColor=a.border?"rgb(0 0 0 / 50%)":null,a.$ref.style.marginLeft="0px",e(a.$ref,a.style),a.$lastStartTime=Date.now(),a.$restTime=t.option.synchronousPlayback&&t.art.playbackRate?t.option.speed/Number(t.art.playbackRate):t.option.speed,[4,t.postMessage({target:{mode:a.mode,height:a.$ref.clientHeight,speed:(i+a.$ref.clientWidth)/a.$restTime},emits:t.getEmits(),antiOverlap:t.option.antiOverlap,clientWidth:i,clientHeight:s,marginBottom:t.marginBottom,marginTop:t.marginTop})];case 3:if(l=u.sent().top,a.$ref){if(t.isStop||void 0===l)a.$state="ready",t.$refs.push(a.$ref),a.$ref=null;else switch(a.$state="emit",a.$ref.style.visibility="visible",a.$ref.dataset.mode=a.mode,t.art.emit("artplayerPluginDanmuku:visible",a),a.mode){case 0:a.$ref.style.top="".concat(l,"px"),c=i+a.$ref.clientWidth,a.$ref.style.transform="translateX(".concat(-c,"px)"),a.$ref.style.transition="transform ".concat(a.$restTime,"s linear 0s");break;case 1:case 2:a.$ref.style.left="50%",a.$ref.style.top="".concat(l,"px"),a.$ref.style.marginLeft="-".concat(a.$ref.clientWidth/2,"px")}}u.label=4;case 4:return n++,[3,1];case 5:return t.isStop||t.update(),[2]}})})),this}},{key:"continue",value:function(){var e=this.$player.clientWidth;return this.filter("stop",function(t){if(t.$state="emit",t.$lastStartTime=Date.now(),0===t.mode){var r=e+t.$ref.clientWidth;t.$ref.style.transform="translateX(".concat(-r,"px)"),t.$ref.style.transition="transform ".concat(t.$restTime,"s linear 0s")}}),this}},{key:"suspend",value:function(){var e=this,t=this.$player.clientWidth;return this.filter("emit",function(r){if(r.$state="stop",0===r.mode){var n=t-(e.getLeft(r.$ref)-e.getLeft(e.$player));r.$ref.style.transform="translateX(".concat(-n,"px)"),r.$ref.style.transition="transform 0s linear 0s"}}),this}},{key:"stop",value:function(){return this.isStop=!0,this.suspend(),window.cancelAnimationFrame(this.timer),this.art.emit("artplayerPluginDanmuku:stop"),this}},{key:"start",value:function(){return this.isStop=!1,this.continue(),this.update(),this.art.emit("artplayerPluginDanmuku:start"),this}},{key:"reset",value:function(){var e=this;return this.queue.forEach(function(t){return e.makeWait(t)}),this.art.emit("artplayerPluginDanmuku:reset"),this}},{key:"show",value:function(){return this.isHide=!1,this.start(),this.$danmuku.style.display="",this.art.emit("artplayerPluginDanmuku:show"),this}},{key:"hide",value:function(){var e=this;return this.isHide=!0,this.stop(),this.queue.forEach(function(t){return e.makeWait(t)}),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}},{key:"destroy",value:function(){this.stop(),this.worker.terminate(),this.art.off("video:play",this.start),this.art.off("video:playing",this.start),this.art.off("video:pause",this.stop),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}],[{key:"option",get:function(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,modes:[0,1,2],fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,points:[],filter:function(){return!0},beforeEmit:function(){return!0},beforeVisible:function(){return!0},visible:!0,maxLength:200,lockTime:5,theme:"dark"}}},{key:"scheme",get:function(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",modes:"array",fontSize:"number|string",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement",heatmap:"object|boolean",points:"array",filter:"function",beforeEmit:"function",beforeVisible:"function",visible:"boolean",maxLength:"number",lockTime:"number",theme:"string"}}},{key:"cssText",get:function(){return'\n user-select: none;\n position: absolute;\n white-space: pre;\n pointer-events: none;\n perspective: 500px;\n display: inline-block;\n will-change: transform;\n font-weight: normal;\n line-height: 1.125;\n visibility: hidden;\n font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n '}}]),e}()},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","./bilibili":"kMsXR","bundle-text:./worker":"1gMd5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t,r,n,a,o,i){try{var s=e[o](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,a)}function o(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function s(e){a(i,n,o,s,l,"next",e)}function l(e){a(i,n,o,s,l,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||Object.prototype.hasOwnProperty.call(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_class_call_check",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}n.defineInteropFlag(r),n.export(r,"_create_class",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_object_spread",function(){return o}),n.export(r,"_",function(){return o});var a=e("./_define_property.js");function o(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){(0,a._define_property)(e,t,r[t])})}return e}},{"./_define_property.js":"3NGsL","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3NGsL":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}n.defineInteropFlag(r),n.export(r,"_define_property",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gJNH2:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r.push.apply(r,n)}return r})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}n.defineInteropFlag(r),n.export(r,"_object_spread_props",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return a.__generator}),n.export(r,"_ts_generator",function(){return a.__generator});var a=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return i}),n.export(r,"__assign",function(){return s}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return u}),n.export(r,"__param",function(){return c}),n.export(r,"__esDecorate",function(){return p}),n.export(r,"__runInitializers",function(){return d}),n.export(r,"__propKey",function(){return f}),n.export(r,"__setFunctionName",function(){return h}),n.export(r,"__metadata",function(){return m}),n.export(r,"__awaiter",function(){return y}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return v}),n.export(r,"__exportStar",function(){return _}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return x}),n.export(r,"__spread",function(){return k}),n.export(r,"__spreadArrays",function(){return w}),n.export(r,"__spreadArray",function(){return j}),n.export(r,"__await",function(){return $}),n.export(r,"__asyncGenerator",function(){return S}),n.export(r,"__asyncDelegator",function(){return O}),n.export(r,"__asyncValues",function(){return D}),n.export(r,"__makeTemplateObject",function(){return M}),n.export(r,"__importStar",function(){return P}),n.export(r,"__importDefault",function(){return E}),n.export(r,"__classPrivateFieldGet",function(){return T}),n.export(r,"__classPrivateFieldSet",function(){return z}),n.export(r,"__classPrivateFieldIn",function(){return A}),n.export(r,"__addDisposableResource",function(){return I}),n.export(r,"__disposeResources",function(){return H});var a=e("@swc/helpers/_/_type_of"),o=function(e,t){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var a in t=arguments[r])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e}).apply(this,arguments)};function l(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(e);a<n.length;a++)0>t.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(r[n[a]]=e[n[a]]);return r}function u(e,t,r,n){var a,o=arguments.length,i=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(a=e[s])&&(i=(o<3?a(i):o>3?a(t,r,i):a(t,r))||i);return o>3&&i&&Object.defineProperty(t,r,i),i}function c(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,a,o){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?n.static?e:e.prototype:null,p=t||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),d=!1,f=r.length-1;f>=0;f--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(d)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(e||null))};var y=(0,r[f])("accessor"===l?{get:p.get,set:p.set}:p[u],h);if("accessor"===l){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(s=i(y.get))&&(p.get=s),(s=i(y.set))&&(p.set=s),(s=i(y.init))&&a.unshift(s)}else(s=i(y))&&("field"===l?a.unshift(s):p[u]=s)}c&&Object.defineProperty(c,n.name,p),d=!0}function d(e,t,r){for(var n=arguments.length>2,a=0;a<t.length;a++)r=n?t[a].call(e,r):t[a].call(e);return n?r:void 0}function f(e){return(void 0===e?"undefined":(0,a._)(e))==="symbol"?e:"".concat(e)}function h(e,t,r){return(void 0===t?"undefined":(0,a._)(t))==="symbol"&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function m(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function y(e,t,r,n){return new(r||(r=Promise))(function(a,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function s(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(i,s)}l((n=n.apply(e,t||[])).next())})}function g(e,t){var r,n,a,o,i={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(r)throw TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(i=0)),i;)try{if(r=1,n&&(a=2&s[0]?n.return:s[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,s[1])).done)return a;switch(n=0,a&&(s=[2&s[0],a.value]),s[0]){case 0:case 1:a=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,n=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(a=(a=i.trys).length>0&&a[a.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]<a[3])){i.label=s[1];break}if(6===s[0]&&i.label<a[1]){i.label=a[1],a=s;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(s);break}a[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],n=0}finally{r=a=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var v=Object.create?function(e,t,r,n){void 0===n&&(n=r);var a=Object.getOwnPropertyDescriptor(t,r);(!a||("get"in a?!t.__esModule:a.writable||a.configurable))&&(a={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,a)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function _(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||v(t,e,r)}function b(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function x(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,a,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){a={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function k(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(x(arguments[t]));return e}function w(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var n=Array(e),a=0,t=0;t<r;t++)for(var o=arguments[t],i=0,s=o.length;i<s;i++,a++)n[a]=o[i];return n}function j(e,t,r){if(r||2==arguments.length)for(var n,a=0,o=t.length;a<o;a++)!n&&a in t||(n||(n=Array.prototype.slice.call(t,0,a)),n[a]=t[a]);return e.concat(n||Array.prototype.slice.call(t))}function $(e){return this instanceof $?(this.v=e,this):new $(e)}function S(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var n,a=r.apply(e,t||[]),o=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(e){a[e]&&(n[e]=function(t){return new Promise(function(r,n){o.push([e,t,r,n])>1||s(e,t)})})}function s(e,t){try{var r;(r=a[e](t)).value instanceof $?Promise.resolve(r.value.v).then(l,u):c(o[0][2],r)}catch(e){c(o[0][3],e)}}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),o.shift(),o.length&&s(o[0][0],o[0][1])}}function O(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,a){t[n]=e[n]?function(t){return(r=!r)?{value:$(e[n](t)),done:!1}:a?a(t):t}:a}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,a){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,a,(t=e[r](t)).done,t.value)})}}}function M(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function P(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return F(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function T(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function z(e,t,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!a:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(e,r):a?a.value=r:t.set(e,r),r}function A(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function I(e,t,r){if(null!=t){var n;if("object"!=typeof t&&"function"!=typeof t)throw TypeError("Object expected.");if(r){if(!Symbol.asyncDispose)throw TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose]}if("function"!=typeof n)throw TypeError("Object not disposable.");e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var C="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function H(e){function t(t){e.error=e.hasError?new C(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function r(){for(;e.stack.length;){var n=e.stack.pop();try{var a=n.dispose&&n.dispose.call(n.value);if(n.async)return Promise.resolve(a).then(r,function(e){return t(e),r()})}catch(e){t(e)}}if(e.hasError)throw e.error}()}r.default={__extends:i,__assign:s,__rest:l,__decorate:u,__param:c,__metadata:m,__awaiter:y,__generator:g,__createBinding:v,__exportStar:_,__values:b,__read:x,__spread:k,__spreadArrays:w,__spreadArray:j,__await:$,__asyncGenerator:S,__asyncDelegator:O,__asyncValues:D,__makeTemplateObject:M,__importStar:P,__importDefault:E,__classPrivateFieldGet:T,__classPrivateFieldSet:z,__classPrivateFieldIn:A,__addDisposableResource:I,__disposeResources:H}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"getMode",function(){return i}),n.export(r,"bilibiliDanmuParseFromXml",function(){return s}),n.export(r,"bilibiliDanmuParseFromUrl",function(){return l});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_ts_generator");function i(e){switch(e){case 1:case 2:case 3:default:return 0;case 4:return 2;case 5:return 1}}function s(e){return"string"!=typeof e?[]:Array.from(e.matchAll(RegExp('<d (?:.*? )??p="(?<p>.+?)"(?: .*?)?>(?<text>.+?)<\\/d>',"gs"))).map(function(e){var t=e.groups.p.split(",");return t.length>=8?{text:e.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(t[0]),mode:i(Number(t[1])),fontSize:Number(t[2]),color:"#".concat(Number(t[3]).toString(16)),timestamp:Number(t[4]),pool:Number(t[5]),userID:t[6],rowID:Number(t[7])}:null}).filter(Boolean)}function l(e){return u.apply(this,arguments)}function u(){return(u=(0,a._)(function(e){return(0,o._)(this,function(t){switch(t.label){case 0:return[4,fetch(e)];case 1:return[4,t.sent().text()];case 2:return[2,s(t.sent())]}})})).apply(this,arguments)}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1gMd5":[function(e,t,r){t.exports='!function(e,r,t,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(r,t){if(!s[r]){if(!e[r]){var o="function"==typeof a[n]&&a[n];if(!t&&o)return o(r,!0);if(i)return i(r,!0);if(u&&"string"==typeof r)return u(r);var f=Error("Cannot find module \'"+r+"\'");throw f.code="MODULE_NOT_FOUND",f}c.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},c.cache={};var p=s[r]=new l.Module(r);e[r][0].call(p.exports,c,p,p.exports,this)}return s[r].exports;function c(e){var r=c.resolve(e);return!1===r?{}:l(r)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=s,l.parent=i,l.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(l,"root",{get:function(){return a[n]}}),a[n]=l;for(var f=0;f<r.length;f++)l(r[f]);if(t){var p=l(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({"5xNO9":[function(e,r,t){var n=e("@swc/helpers/_/_to_consumable_array");onmessage=function(e){var r=e.data;if(r.id){var t=function(e){var r=e.target,t=e.emits,o=e.clientWidth,a=e.clientHeight,i=e.marginBottom,s=e.marginTop,u=e.antiOverlap,l=a-i,f=t.filter(function(e){return e.mode===r.mode&&e.top<=l}).sort(function(e,r){return e.top-r.top});if(0===f.length)return 2===r.mode?l-r.height:s;if(f.unshift({type:"top",top:0,left:0,right:0,height:s,width:o,speed:0,distance:o}),f.push({type:"bottom",top:l,left:0,right:0,height:i,width:o,speed:0,distance:o}),2===r.mode)for(var p=f.length-2;p>=0;p-=1){var c=f[p],_=f[p+1],d=c.top+c.height;if(_.top-d>=r.height)return _.top-r.height}else for(var h=1;h<f.length;h+=1){var m=f[h],y=f[h-1],g=y.top+y.height;if(m.top-g>=r.height)return g}for(var j=[],b=1;b<f.length-1;b+=1){var v=f[b];if(j.length){var x=j[j.length-1];x[0].top===v.top?x.push(v):j.push([v])}else j.push([v])}if(u)switch(r.mode){case 0:var w=j.find(function(e){return e.every(function(e){return!(o<e.distance)&&(r.speed<e.speed||e.right/(r.speed-e.speed)>e.time)})});return w&&w[0]?w[0].top:void 0;case 1:case 2:return}else{switch(r.mode){case 0:j.sort(function(e,r){var t,o,a=(t=Math).min.apply(t,(0,n._)(r.map(function(e){return e.right}))),i=(o=Math).min.apply(o,(0,n._)(e.map(function(e){return e.right})));return a*r.length-i*e.length});break;case 1:case 2:j.sort(function(e,r){var t,o,a=(t=Math).max.apply(t,(0,n._)(r.map(function(e){return e.width})));return(o=Math).max.apply(o,(0,n._)(e.map(function(e){return e.width})))*e.length-a*r.length})}return j[0][0].top}}(r);self.postMessage({top:t,id:r.id})}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0"}],iwLF0:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_to_consumable_array",function(){return u}),n.export(t,"_",function(){return u});var o=e("./_array_without_holes.js"),a=e("./_iterable_to_array.js"),i=e("./_non_iterable_spread.js"),s=e("./_unsupported_iterable_to_array.js");function u(e){return(0,o._array_without_holes)(e)||(0,a._iterable_to_array)(e)||(0,s._unsupported_iterable_to_array)(e)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_array_without_holes",function(){return a}),n.export(t,"_",function(){return a});var o=e("./_array_like_to_array.js");function a(e){if(Array.isArray(e))return(0,o._array_like_to_array)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}n.defineInteropFlag(t),n.export(t,"_array_like_to_array",function(){return o}),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,r,t){t.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},t.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},t.exportAll=function(e,r){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(r,t)||Object.defineProperty(r,t,{enumerable:!0,get:function(){return e[t]}})}),r},t.export=function(e,r,t){Object.defineProperty(e,r,{enumerable:!0,get:t})}},{}],"2thrs":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.defineInteropFlag(t),n.export(t,"_iterable_to_array",function(){return o}),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a8nO2:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(t),n.export(t,"_non_iterable_spread",function(){return o}),n.export(t,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5m31D":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"_unsupported_iterable_to_array",function(){return a}),n.export(t,"_",function(){return a});var o=e("./_array_like_to_array.js");function a(e,r){if(e){if("string"==typeof e)return(0,o._array_like_to_array)(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return(0,o._array_like_to_array)(e,r)}}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["5xNO9"],"5xNO9","parcelRequire4dc0");'},{}],d3V7t:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return A});var a=e("@swc/helpers/_/_async_to_generator"),o=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_to_consumable_array"),l=e("@swc/helpers/_/_ts_generator"),u=e("bundle-text:./style.less"),c=n.interopDefault(u),p=e("bundle-text:./img/on.svg"),d=n.interopDefault(p),f=e("bundle-text:./img/off.svg"),h=n.interopDefault(f),m=e("bundle-text:./img/config.svg"),y=n.interopDefault(m),g=e("bundle-text:./img/style.svg"),v=n.interopDefault(g),_=e("bundle-text:./img/mode_0_off.svg"),b=n.interopDefault(_),x=e("bundle-text:./img/mode_0_on.svg"),k=n.interopDefault(x),w=e("bundle-text:./img/mode_1_off.svg"),j=n.interopDefault(w),$=e("bundle-text:./img/mode_1_on.svg"),S=n.interopDefault($),O=e("bundle-text:./img/mode_2_off.svg"),D=n.interopDefault(O),M=e("bundle-text:./img/mode_2_on.svg"),F=n.interopDefault(M),P=e("bundle-text:./img/check_on.svg"),E=n.interopDefault(P),T=e("bundle-text:./img/check_off.svg"),z=n.interopDefault(T),A=function(){function e(t,r){var n=this;(0,o._)(this,e),this.art=t,this.danmuku=r,this.utils=t.constructor.utils;var a=this.utils.setStyle,i=t.template.$controlsCenter;a(i,"display","flex"),this.template={$controlsCenter:i,$mount:i,$danmuku:null,$toggle:null,$configModes:null,$styleModes:null,$colors:null,$opacitySlider:null,$opacityValue:null,$marginSlider:null,$marginValue:null,$fontSizeSlider:null,$fontSizeValue:null,$speedSlider:null,$speedValue:null,$input:null,$send:null},this.slider={opacity:null,margin:null,fontSize:null,speed:null},this.emitting=!1,this.isLock=!1,this.timer=null,this.createTemplate(),this.createSliders(),this.createEvents(),this.mount(this.option.mount),t.on("fullscreen",function(e){return n.onFullscreen(e)}),t.on("fullscreenWeb",function(e){return n.onFullscreen(e)})}return(0,i._)(e,[{key:"option",get:function(){return this.danmuku.option}},{key:"outside",get:function(){return this.template.$mount!==this.template.$controlsCenter}},{key:"TEMPLATE",get:function(){var e=this.option;return'\n <div class="apd-toggle">\n '.concat(d.default).concat(h.default,'\n</div>\n<div class="apd-config">\n ').concat(y.default,'\n<div class="apd-config-panel">\n<div class="apd-config-panel-inner">\n<div class="apd-config-mode">\n 按类型屏蔽\n<div class="apd-modes">\n<div data-mode="0" class="apd-mode">\n ').concat(b.default).concat(k.default,'\n<div>滚动</div>\n</div>\n<div data-mode="1" class="apd-mode">\n ').concat(j.default).concat(S.default,'\n<div>顶部</div>\n</div>\n<div data-mode="2" class="apd-mode">\n ').concat(D.default).concat(F.default,'\n<div>底部</div>\n</div>\n</div>\n</div>\n<div class="apd-config-other">\n<div class="apd-other apd-anti-overlap">\n ').concat(E.default).concat(z.default,'\n 防止弹幕重叠\n</div>\n<div class="apd-other apd-sync-video">\n ').concat(E.default).concat(z.default,'\n 同步视频速度\n</div>\n</div>\n<div class="apd-config-slider apd-config-opacity">\n 不透明度\n<div class="apd-slider"></div>\n<div class="apd-value">未知</div>\n</div>\n<div class="apd-config-slider apd-config-margin">\n 显示区域\n<div class="apd-slider"></div>\n<div class="apd-value">未知</div>\n</div>\n<div class="apd-config-slider apd-config-fontSize">\n 弹幕字号\n<div class="apd-slider"></div>\n<div class="apd-value">未知</div>\n</div>\n<div class="apd-config-slider apd-config-speed">\n 弹幕速度\n<div class="apd-slider"></div>\n<div class="apd-value">未知</div>\n</div>\n</div>\n</div>\n</div>\n<div class="apd-emitter">\n<div class="apd-style">\n ').concat(v.default,'\n<div class="apd-style-panel">\n<div class="apd-style-panel-inner">\n<div class="apd-style-mode">\n 模式\n<div class="apd-modes">\n<div data-mode="0" class="apd-mode">\n ').concat(k.default,'\n<div>滚动</div>\n</div>\n<div data-mode="1" class="apd-mode">\n ').concat(S.default,'\n<div>顶部</div>\n</div>\n<div data-mode="2" class="apd-mode">\n ').concat(F.default,'\n<div>底部</div>\n</div>\n</div>\n</div>\n<div class="apd-style-color">\n 颜色\n<div class="apd-colors">\n ').concat(this.COLOR.map(function(e){return'<div data-color="'.concat(e,'" class="apd-color" style="background-color: ').concat(e,'"></div>')}).join(""),'\n</div>\n</div>\n</div>\n</div>\n</div>\n<input class="apd-input" placeholder="发个友善的弹幕见证当下" autocomplete="off" maxLength="').concat(e.maxLength,'" />\n<div class="apd-send">发送</div>\n</div>\n ')}},{key:"MARGIN",get:function(){return this.option.MARGIN||[{name:"1/4",value:[10,"75%"]},{name:"半屏",value:[10,"50%"]},{name:"3/4",value:[10,"25%"]},{name:"满屏",value:[10,10]}]}},{key:"SPEED",get:function(){return this.option.SPEED||[{name:"极慢",value:10},{name:"较慢",value:7.5,hide:!0},{name:"适中",value:5},{name:"较快",value:2.5,hide:!0},{name:"极快",value:1}]}},{key:"COLOR",get:function(){return this.option.COLOR||["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"]}},{key:"query",value:function(e){return(0,this.utils.query)(e,this.template.$danmuku)}},{key:"setData",value:function(e,t){var r=this.art.template.$player,n=this.template.$mount;r.dataset[e]=t,this.outside&&(n.dataset[e]=t)}},{key:"createTemplate",value:function(){var e=this.utils,t=e.createElement,r=e.tooltip,n=t("div");n.className="artplayer-plugin-danmuku",n.innerHTML=this.TEMPLATE,this.template.$danmuku=n,this.template.$toggle=this.query(".apd-toggle"),r(this.template.$toggle,"弹幕开关"),this.template.$configModes=this.query(".apd-config-mode .apd-modes"),this.template.$styleModes=this.query(".apd-style-mode .apd-modes"),this.template.$colors=this.query(".apd-colors"),this.template.$antiOverlap=this.query(".apd-anti-overlap"),this.template.$syncVideo=this.query(".apd-sync-video"),this.template.$opacitySlider=this.query(".apd-config-opacity .apd-slider"),this.template.$opacityValue=this.query(".apd-config-opacity .apd-value"),this.template.$marginSlider=this.query(".apd-config-margin .apd-slider"),this.template.$marginValue=this.query(".apd-config-margin .apd-value"),this.template.$fontSizeSlider=this.query(".apd-config-fontSize .apd-slider"),this.template.$fontSizeValue=this.query(".apd-config-fontSize .apd-value"),this.template.$speedSlider=this.query(".apd-config-speed .apd-slider"),this.template.$speedValue=this.query(".apd-config-speed .apd-value"),this.template.$input=this.query(".apd-input"),this.template.$send=this.query(".apd-send")}},{key:"createEvents",value:function(){var e=this,t=this.template,r=t.$toggle,n=t.$configModes,a=t.$styleModes,o=t.$colors,i=t.$antiOverlap,l=t.$syncVideo,u=t.$send,c=t.$input;this.art.proxy(r,"click",function(){e.danmuku.config({visible:!e.option.visible}),e.reset()}),this.art.proxy(n,"click",function(t){var r=t.target.closest(".apd-mode");if(r){var n=Number(r.dataset.mode);e.option.modes.includes(n)?e.danmuku.config({modes:e.option.modes.filter(function(e){return e!==n})}):e.danmuku.config({modes:(0,s._)(e.option.modes).concat([n])}),e.reset()}}),this.art.proxy(i,"click",function(){e.danmuku.config({antiOverlap:!e.option.antiOverlap}),e.reset()}),this.art.proxy(l,"click",function(){e.danmuku.config({synchronousPlayback:!e.option.synchronousPlayback}),e.reset()}),this.art.proxy(a,"click",function(t){var r=t.target.closest(".apd-mode");if(r){var n=Number(r.dataset.mode);e.danmuku.config({mode:n}),e.reset()}}),this.art.proxy(o,"click",function(t){var r=t.target.closest(".apd-color");r&&(e.danmuku.config({color:r.dataset.color}),e.reset())}),this.art.proxy(u,"click",function(){return e.emit()}),this.art.proxy(c,"keypress",function(t){"Enter"===t.key&&(t.preventDefault(),e.emit())})}},{key:"createSliders",value:function(){var e=this;this.slider.opacity=this.createSlider({min:0,max:100,steps:[],container:this.template.$opacitySlider,findIndex:function(){return Math.round(100*e.option.opacity)},onChange:function(t){e.template.$opacityValue.textContent="".concat(t,"%");var r=t/100;r!==e.option.opacity&&e.danmuku.config({opacity:r})}}),this.slider.margin=this.createSlider({min:0,max:3,steps:this.MARGIN,container:this.template.$marginSlider,findIndex:function(){return e.MARGIN.findIndex(function(t){return t.value[0]===e.option.margin[0]&&t.value[1]===e.option.margin[1]})},onChange:function(t){var r=e.MARGIN[t];if(r){e.template.$marginValue.textContent=r.name;var n=r.value;(n[0]!==e.option.margin[0]||n[1]!==e.option.margin[1])&&e.danmuku.config({margin:n})}}}),this.slider.fontSize=this.createSlider({min:1,max:25,steps:[],container:this.template.$fontSizeSlider,findIndex:function(){var t=e.art.template.$player.clientHeight;return Math.round(e.option.fontSize/t*100)},onChange:function(t){var r=e.template.$fontSizeValue,n=e.art.template.$player.clientHeight;r.textContent="".concat(t,"%"),t!==Math.round(e.option.fontSize/n*100)&&e.danmuku.config({fontSize:"".concat(t,"%")})}}),this.slider.speed=this.createSlider({min:0,max:4,steps:this.SPEED,container:this.template.$speedSlider,findIndex:function(){return e.SPEED.findIndex(function(t){return t.value===e.option.speed})},onChange:function(t){var r=e.SPEED[t];if(r){e.template.$speedValue.textContent=r.name;var n=r.value;n!==e.option.speed&&e.danmuku.config({speed:n})}}})}},{key:"createSlider",value:function(e){var t=e.min,r=e.max,n=e.container,a=e.findIndex,o=e.onChange,i=e.steps,s=void 0===i?[]:i,l=this.utils,u=l.query,c=l.clamp;n.innerHTML='\n<div class="apd-slider-line">\n<div class="apd-slider-points">\n '.concat(s.map(function(){return'<div class="apd-slider-point"></div>'}).join(""),'\n</div>\n<div class="apd-slider-progress"></div>\n</div>\n<div class="apd-slider-dot"></div>\n<div class="apd-slider-steps">\n ').concat(s.map(function(e){return e.hide?"":'<div class="apd-slider-step">'.concat(e.name,"</div>")}).join(""),"\n</div>\n ");var p=u(".apd-slider-dot",n),d=u(".apd-slider-progress",n),f=!1;function h(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a();if(!(e<t)&&!(e>r)){var n=(e-t)/(r-t);p.style.left="".concat(100*n,"%"),0===s.length&&(d.style.width=p.style.left),o(e)}}function m(e){var a=n.getBoundingClientRect(),o=a.left,i=a.width;h(Math.round(c(e.clientX-o,0,i)/i*(r-t)+t))}return this.art.proxy(n,"click",function(e){m(e)}),this.art.proxy(n,"mousedown",function(e){f=0===e.button}),this.art.on("document:mousemove",function(e){f&&m(e)}),this.art.on("document:mouseup",function(e){f&&(f=!1,m(e))}),{reset:h}}},{key:"onFullscreen",value:function(e){if(this.outside){var t=this.template,r=t.$danmuku,n=t.$controlsCenter,a=t.$mount;e?n.appendChild(r):a.appendChild(r)}}},{key:"emit",value:function(){var e=this;return(0,a._)(function(){var t,r,n,a;return(0,l._)(this,function(o){switch(o.label){case 0:if(!(r=(t=e.template.$input).value.trim()).length||e.isLock||e.emitting)return[2];n={text:r,mode:e.option.mode,color:e.option.color,time:e.art.currentTime},o.label=1;case 1:return o.trys.push([1,3,,4]),e.emitting=!0,[4,e.option.beforeEmit(n)];case 2:if(a=o.sent(),e.emitting=!1,!0!==a)return[2];return n.border=!0,delete n.time,e.danmuku.emit(n),t.value="",e.lock(),[3,4];case 3:return o.sent(),e.emitting=!1,[3,4];case 4:return[2]}})})()}},{key:"lock",value:function(){var e=this,t=this.utils.addClass,r=this.template.$send;this.isLock=!0;var n=this.option.lockTime;r.innerText=n,t(r,"apd-lock");var a=function(){e.timer=setTimeout(function(){0===n?e.unlock():(n-=1,r.innerText=n,a())},1e3)};a()}},{key:"unlock",value:function(){var e=this.utils.removeClass,t=this.template.$send;clearTimeout(this.timer),this.isLock=!1,t.innerText="发送",e(t,"apd-lock")}},{key:"reset",value:function(){var e=this;this.slider.opacity.reset(),this.slider.margin.reset(),this.slider.fontSize.reset(),this.slider.speed.reset(),this.setData("danmukuVisible",this.option.visible),this.setData("danmukuMode",this.option.mode),this.setData("danmukuColor",this.option.color),this.setData("danmukuMode0",this.option.modes.includes(0)),this.setData("danmukuMode1",this.option.modes.includes(1)),this.setData("danmukuMode2",this.option.modes.includes(2)),this.setData("danmukuAntiOverlap",this.option.antiOverlap),this.setData("danmukuSyncVideo",this.option.synchronousPlayback),this.setData("danmukuTheme",this.option.theme);var t=this.utils.inverseClass,r=Array.from(this.template.$colors.children).find(function(t){return t.dataset.color===e.option.color.toUpperCase()});r&&t(r,"apd-active")}},{key:"mount",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.template.$controlsCenter;e.appendChild(this.template.$danmuku),this.template.$mount=e,this.reset()}}],[{key:"icons",get:function(){return{$on:d.default,$off:h.default,$config:y.default,$style:v.default,$mode_0_off:b.default,$mode_0_on:k.default,$mode_1_off:j.default,$mode_1_on:S.default,$mode_2_off:D.default,$mode_2_on:F.default,$check_on:E.default,$check_off:z.default}}}]),e}();if("undefined"!=typeof document){var I="artplayer-plugin-danmuku",C=document.getElementById(I);if(C)C.textContent=c.default;else{var H=document.createElement("style");H.id=I,H.textContent=c.default,document.head.appendChild(H)}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_to_consumable_array":"iwLF0","@swc/helpers/_/_ts_generator":"6Xyd0","bundle-text:./style.less":"i8wAr","bundle-text:./img/on.svg":"4mwSI","bundle-text:./img/off.svg":"9bQDs","bundle-text:./img/config.svg":"cciuY","bundle-text:./img/style.svg":"e5G6o","bundle-text:./img/mode_0_off.svg":"fC4yA","bundle-text:./img/mode_0_on.svg":"fUkVg","bundle-text:./img/mode_1_off.svg":"isoJm","bundle-text:./img/mode_1_on.svg":"20nBM","bundle-text:./img/mode_2_off.svg":"6x9CL","bundle-text:./img/mode_2_on.svg":"7GKdL","bundle-text:./img/check_on.svg":"9SCIh","bundle-text:./img/check_off.svg":"6KRxn","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iwLF0:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",function(){return l}),n.export(r,"_",function(){return l});var a=e("./_array_without_holes.js"),o=e("./_iterable_to_array.js"),i=e("./_non_iterable_spread.js"),s=e("./_unsupported_iterable_to_array.js");function l(e){return(0,a._array_without_holes)(e)||(0,o._iterable_to_array)(e)||(0,s._unsupported_iterable_to_array)(e)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",function(){return o}),n.export(r,"_",function(){return o});var a=e("./_array_like_to_array.js");function o(e){if(Array.isArray(e))return(0,a._array_like_to_array)(e)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}n.defineInteropFlag(r),n.export(r,"_array_like_to_array",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2thrs":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.defineInteropFlag(r),n.export(r,"_iterable_to_array",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a8nO2:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_spread",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5m31D":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_unsupported_iterable_to_array",function(){return o}),n.export(r,"_",function(){return o});var a=e("./_array_like_to_array.js");function o(e,t){if(e){if("string"==typeof e)return(0,a._array_like_to_array)(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return(0,a._array_like_to_array)(e,t)}}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i8wAr:[function(e,t,r){t.exports='.artplayer-plugin-danmuku{z-index:99;color:#fff;flex-shrink:0;justify-content:center;align-items:center;gap:10px;width:100%;height:32px;font-size:12px;font-weight:300;display:flex;position:relative}.artplayer-plugin-danmuku .apd-icon{cursor:pointer;opacity:.75;fill:#fff;transition:all .2s}.artplayer-plugin-danmuku .apd-icon:hover{opacity:1}.artplayer-plugin-danmuku .apd-config{display:flex;position:relative}.artplayer-plugin-danmuku .apd-config .apd-config-panel{width:320px;padding:10px;display:none;position:absolute;bottom:24px;left:-148px}.artplayer-plugin-danmuku .apd-config .apd-config-panel .apd-config-panel-inner{background-color:rgba(0,0,0,.85);border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-config:hover .apd-config-panel{display:flex}.artplayer-plugin-danmuku .apd-config-mode,.artplayer-plugin-danmuku .apd-config-slider,.artplayer-plugin-danmuku .apd-config-other,.artplayer-plugin-danmuku .apd-style-mode{margin-bottom:15px}.artplayer-plugin-danmuku .apd-modes{align-items:center;gap:20px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-modes .apd-mode{cursor:pointer;text-align:center}.artplayer-plugin-danmuku .apd-modes .apd-mode:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-config-slider{align-items:center;gap:12px;display:flex}.artplayer-plugin-danmuku .apd-config-slider .apd-value{text-align:right;width:32px}.artplayer-plugin-danmuku .apd-slider{cursor:pointer;flex:1;justify-content:center;align-items:center;height:20px;display:flex;position:relative}.artplayer-plugin-danmuku .apd-slider .apd-slider-line{background-color:rgba(255,255,255,.25);border-radius:3px;width:100%;height:2px;position:relative;overflow:hidden}.artplayer-plugin-danmuku .apd-slider .apd-slider-points{justify-content:space-between;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.artplayer-plugin-danmuku .apd-slider .apd-slider-points .apd-slider-point{background-color:rgba(255,255,255,.5);border-radius:50%;width:2px;height:2px}.artplayer-plugin-danmuku .apd-slider .apd-slider-progress{background-color:#00a1d6;width:0%;height:100%}.artplayer-plugin-danmuku .apd-slider .apd-slider-dot{background-color:#00a1d6;border-radius:50%;width:12px;height:12px;position:absolute;left:0%;transform:translate(-6px)}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps{color:#777;justify-content:space-between;align-items:center;width:calc(100% + 32px);display:flex;position:absolute;bottom:-12px}.artplayer-plugin-danmuku .apd-slider .apd-slider-steps .apd-slider-step{text-align:center;flex-shrink:0;width:36px;scale:.95}.artplayer-plugin-danmuku .apd-config-other{align-items:center;gap:20px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-check-off,.artplayer-plugin-danmuku .apd-config-other .apd-check-on{width:16px;height:16px}.artplayer-plugin-danmuku .apd-config-other .apd-other{cursor:pointer;align-items:center;gap:2px;display:flex}.artplayer-plugin-danmuku .apd-config-other .apd-other:hover{color:#00a1d6}.artplayer-plugin-danmuku .apd-emitter{background-color:rgba(255,255,255,.25);border-radius:5px;flex:1;align-items:center;height:100%;display:flex}.artplayer-plugin-danmuku .apd-style{justify-content:center;align-items:center;display:flex;position:relative}.artplayer-plugin-danmuku .apd-style .apd-style-panel{width:200px;padding:10px;display:none;position:absolute;bottom:24px;left:-88px}.artplayer-plugin-danmuku .apd-style .apd-style-panel .apd-style-panel-inner{background-color:rgba(0,0,0,.85);border-radius:3px;width:100%;padding:10px}.artplayer-plugin-danmuku .apd-style:hover .apd-style-panel{display:flex}.artplayer-plugin-danmuku .apd-colors{flex-wrap:wrap;gap:8px;margin-top:5px;display:flex}.artplayer-plugin-danmuku .apd-colors .apd-color{cursor:pointer;border-radius:2px;width:16px;height:16px}.artplayer-plugin-danmuku .apd-colors .apd-color.apd-active{border:1px solid #000;box-shadow:0 0 0 1px #fff}.artplayer-plugin-danmuku .apd-input{color:#fff;background-color:transparent;border:none;outline:none;flex:1;width:auto;min-width:0;height:100%;line-height:1}.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(255,255,255,.5)}.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(255,255,255,.5)}.artplayer-plugin-danmuku .apd-send{cursor:pointer;text-shadow:none;background-color:#00a1d6;border-top-right-radius:5px;border-bottom-right-radius:5px;flex-shrink:0;justify-content:center;align-items:center;width:60px;height:100%;display:flex}.artplayer-plugin-danmuku .apd-send.apd-lock{cursor:not-allowed;color:#666;background-color:#e7e7e7}.art-controls-center .apd-emitter{flex:none;width:260px}.art-fullscreen .artplayer-plugin-danmuku,.art-fullscreen-web .artplayer-plugin-danmuku{gap:16px;height:38px}.art-fullscreen .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen-web .artplayer-plugin-danmuku .apd-config-icon,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-off,.art-fullscreen .artplayer-plugin-danmuku .apd-toggle-on,.art-fullscreen-web .artplayer-plugin-danmuku .apd-toggle-on{width:28px;height:28px}.art-fullscreen .artplayer-plugin-danmuku .apd-emitter,.art-fullscreen-web .artplayer-plugin-danmuku .apd-emitter{flex:none;width:400px}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-icon{fill:#333}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-emitter{background-color:#f1f2f3}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input{color:#000}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-theme=light]>.artplayer-plugin-danmuku .apd-input::placeholder{color:rgba(0,0,0,.3)}[data-danmuku-visible=false] .apd-toggle-off{display:block}[data-danmuku-visible=false] .apd-toggle-on,[data-danmuku-visible=true] .apd-toggle-off{display:none}[data-danmuku-visible=true] .apd-toggle-on{display:block}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-on{display:none}[data-danmuku-anti-overlap=false] .apd-anti-overlap .apd-check-off,[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-on{display:block}[data-danmuku-anti-overlap=true] .apd-anti-overlap .apd-check-off,[data-danmuku-sync-video=false] .apd-sync-video .apd-check-on{display:none}[data-danmuku-sync-video=false] .apd-sync-video .apd-check-off,[data-danmuku-sync-video=true] .apd-sync-video .apd-check-on{display:block}[data-danmuku-sync-video=true] .apd-sync-video .apd-check-off{display:none}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-off{display:block}[data-danmuku-mode0=false] .apd-config-mode .apd-mode-0-on{display:none}[data-danmuku-mode0=false] .art-danmuku [data-mode="0"]{opacity:0!important}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-off{display:none}[data-danmuku-mode0=true] .apd-config-mode .apd-mode-0-on{display:block}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"]{color:#00a1d6}[data-danmuku-mode="0"] .apd-style-mode [data-mode="0"] path{fill:#00a1d6}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-off{display:block}[data-danmuku-mode1=false] .apd-config-mode .apd-mode-1-on{display:none}[data-danmuku-mode1=false] .art-danmuku [data-mode="1"]{opacity:0!important}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-off{display:none}[data-danmuku-mode1=true] .apd-config-mode .apd-mode-1-on{display:block}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"]{color:#00a1d6}[data-danmuku-mode="1"] .apd-style-mode [data-mode="1"] path{fill:#00a1d6}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-off{display:block}[data-danmuku-mode2=false] .apd-config-mode .apd-mode-2-on{display:none}[data-danmuku-mode2=false] .art-danmuku [data-mode="2"]{opacity:0!important}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-off{display:none}[data-danmuku-mode2=true] .apd-config-mode .apd-mode-2-on{display:block}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"]{color:#00a1d6}[data-danmuku-mode="2"] .apd-style-mode [data-mode="2"] path{fill:#00a1d6}'},{}],"4mwSI":[function(e,t,r){t.exports='<svg class="apd-icon apd-toggle-on" xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24" width="24" height="24"><path fill-rule="evenodd" d="M11.989 4.828c-.47 0-.975.004-1.515.012l-1.71-2.566a1.008 1.008 0 0 0-1.678 1.118l.999 1.5c-.681.018-1.403.04-2.164.068a4.013 4.013 0 0 0-3.83 3.44c-.165 1.15-.245 2.545-.245 4.185 0 1.965.115 3.67.35 5.116a4.012 4.012 0 0 0 3.763 3.363l.906.046c1.205.063 1.808.095 3.607.095a.988.988 0 0 0 0-1.975c-1.758 0-2.339-.03-3.501-.092l-.915-.047a2.037 2.037 0 0 1-1.91-1.708c-.216-1.324-.325-2.924-.325-4.798 0-1.563.076-2.864.225-3.904.14-.977.96-1.713 1.945-1.747 2.444-.087 4.465-.13 6.063-.131 1.598 0 3.62.044 6.064.13.96.034 1.71.81 1.855 1.814.075.524.113 1.962.141 3.065v.002c.01.342.017.65.025.88a.987.987 0 1 0 1.974-.068c-.008-.226-.016-.523-.025-.856v-.027c-.03-1.118-.073-2.663-.16-3.276-.273-1.906-1.783-3.438-3.74-3.507-.9-.032-1.743-.058-2.531-.078l1.05-1.46a1.008 1.008 0 0 0-1.638-1.177l-1.862 2.59c-.38-.004-.744-.007-1.088-.007h-.13Zm.521 4.775h-1.32v4.631h2.222v.847h-2.618v1.078h2.618l.003.678c.36.026.714.163 1.01.407h.11v-1.085h2.694v-1.078h-2.695v-.847H16.8v-4.63h-1.276a8.59 8.59 0 0 0 .748-1.42L15.183 7.8a14.232 14.232 0 0 1-.814 1.804h-1.518l.693-.308a8.862 8.862 0 0 0-.814-1.408l-1.045.352c.297.396.572.847.825 1.364Zm-4.18 3.564.154-1.485h1.98V8.294h-3.2v.98H9.33v1.43H7.472l-.308 3.453h2.277c0 1.166-.044 1.925-.12 2.277-.078.352-.386.528-.936.528-.308 0-.616-.022-.902-.055l.297 1.067.062.005c.285.02.551.04.818.04 1.001-.067 1.562-.419 1.694-1.057.11-.638.176-1.903.176-3.795h-2.2Zm7.458.11v-.858h-1.254v.858h1.254Zm-2.376-.858v.858h-1.199v-.858h1.2Zm-1.199-.946h1.2v-.902h-1.2v.902Zm2.321 0v-.902h1.254v.902h-1.254Z" clip-rule="evenodd"/><path fill="#00AEEC" fill-rule="evenodd" d="M22.846 14.627a1 1 0 0 0-1.412.075l-5.091 5.703-2.216-2.275-.097-.086-.008-.005a1 1 0 0 0-1.322 1.493l2.963 3.041.093.083.007.005a1 1 0 0 0 1.354-.124l5.81-6.505.08-.102.005-.008a1 1 0 0 0-.166-1.295Z" clip-rule="evenodd"/></svg>'},{}],"9bQDs":[function(e,t,r){t.exports='<svg class="apd-icon apd-toggle-off" xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24" width="24" height="24"><path fill-rule="evenodd" d="m8.085 4.891-.999-1.499a1.008 1.008 0 0 1 1.679-1.118l1.709 2.566c.54-.008 1.045-.012 1.515-.012h.13c.345 0 .707.003 1.088.007l1.862-2.59a1.008 1.008 0 0 1 1.637 1.177l-1.049 1.46c.788.02 1.631.046 2.53.078 1.958.069 3.468 1.6 3.74 3.507.088.613.13 2.158.16 3.276l.001.027c.01.333.017.63.025.856a.987.987 0 0 1-1.974.069c-.008-.23-.016-.539-.025-.881v-.002c-.028-1.103-.066-2.541-.142-3.065-.143-1.004-.895-1.78-1.854-1.813a179.14 179.14 0 0 0-6.064-.131c-1.598 0-3.619.044-6.063.13a2.037 2.037 0 0 0-1.945 1.748c-.15 1.04-.225 2.341-.225 3.904 0 1.874.11 3.474.325 4.798.154.949.95 1.66 1.91 1.708a97.58 97.58 0 0 0 5.416.139.988.988 0 0 1 0 1.975 99.78 99.78 0 0 1-5.513-.141A4.012 4.012 0 0 1 2.197 17.7c-.236-1.446-.351-3.151-.351-5.116 0-1.64.08-3.035.245-4.184A4.013 4.013 0 0 1 5.92 4.96c.761-.027 1.483-.05 2.164-.069Zm4.436 4.707h-1.32v4.63h2.222v.848h-2.618v1.078h2.431a5.01 5.01 0 0 1 3.575-3.115V9.598h-1.276a8.59 8.59 0 0 0 .748-1.42l-1.089-.384a14.232 14.232 0 0 1-.814 1.804h-1.518l.693-.308a8.862 8.862 0 0 0-.814-1.408l-1.045.352c.297.396.572.847.825 1.364Zm-4.18 3.564.154-1.485h1.98V8.289h-3.2v.979h2.067v1.43H7.483l-.308 3.454h2.277c0 1.166-.044 1.925-.12 2.277-.078.352-.386.528-.936.528-.308 0-.616-.022-.902-.055l.297 1.067.062.004c.285.02.551.04.818.04 1.001-.066 1.562-.418 1.694-1.056.11-.638.176-1.903.176-3.795h-2.2Zm7.458.11v-.858h-1.254v.858H15.8Zm-2.376-.858v.858h-1.199v-.858h1.2Zm-1.199-.946h1.2v-.902h-1.2v.902Zm2.321 0v-.902H15.8v.902h-1.254Zm3.517 10.594a4 4 0 1 0 0-8 4 4 0 0 0 0 8Zm-.002-1.502a2.5 2.5 0 0 1-2.217-3.657l3.326 3.398a2.49 2.49 0 0 1-1.109.259Zm2.5-2.5c0 .42-.103.815-.286 1.162l-3.328-3.401a2.5 2.5 0 0 1 3.614 2.239Z" clip-rule="evenodd"/></svg>'},{}],cciuY:[function(e,t,r){t.exports='<svg class="apd-icon apd-config-icon" xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 24 24" width="24" height="24"><path fill-rule="evenodd" d="m15.645 4.881 1.06-1.473a.998.998 0 1 0-1.622-1.166L13.22 4.835a110.67 110.67 0 0 0-1.1-.007h-.131c-.47 0-.975.004-1.515.012L8.783 2.3A.998.998 0 0 0 7.12 3.408l.988 1.484c-.688.019-1.418.042-2.188.069a4.013 4.013 0 0 0-3.83 3.44c-.165 1.15-.245 2.545-.245 4.185 0 1.965.115 3.67.35 5.116a4.012 4.012 0 0 0 3.763 3.363 99.78 99.78 0 0 0 5.513.141.988.988 0 0 0 0-1.975 97.58 97.58 0 0 1-5.416-.139 2.037 2.037 0 0 1-1.91-1.708c-.216-1.324-.325-2.924-.325-4.798 0-1.563.076-2.864.225-3.904.14-.977.96-1.713 1.945-1.747 2.444-.087 4.465-.13 6.063-.131 1.598 0 3.62.044 6.064.13.96.034 1.71.81 1.855 1.814.075.524.113 1.962.141 3.065v.002c.005.183.01.07.014-.038.004-.096.008-.189.011-.081a.987.987 0 1 0 1.974-.069c-.004-.105-.007-.009-.011.09a2.175 2.175 0 0 1-.007.135l-.002.01a.574.574 0 0 1-.005-.091v-.027c-.03-1.118-.073-2.663-.16-3.276-.273-1.906-1.783-3.438-3.74-3.507-.905-.032-1.752-.058-2.543-.079Zm-3.113 4.703h-1.307v4.643h2.2v.04l.651-1.234c.113-.215.281-.389.482-.509v-.11h.235c.137-.049.283-.074.433-.074h1.553V9.584h-1.264a8.5 8.5 0 0 0 .741-1.405l-1.078-.381c-.24.631-.501 1.23-.806 1.786h-1.503l.686-.305a8.613 8.613 0 0 0-.806-1.394l-1.034.348c.294.392.566.839.817 1.35Zm-1.7 5.502h2.16l-.564 1.068h-1.595v-1.068Zm-2.498-1.863.152-1.561h1.96V8.289H7.277v.969h2.048v1.435h-1.84l-.306 3.51h2.254c0 1.155-.043 1.906-.12 2.255-.076.348-.38.523-.925.523-.305 0-.61-.022-.893-.055l.294 1.056.061.005c.282.02.546.039.81.039.991-.065 1.547-.414 1.677-1.046.11-.631.175-1.883.175-3.757H8.334Zm5.09-.8v.85h-1.188v-.85h1.187Zm-1.188-.955h1.187v-.893h-1.187v.893Zm2.322.007v-.893h1.241v.893h-1.241Zm.528 2.757a1.26 1.26 0 0 1 1.087-.627l4.003-.009a1.26 1.26 0 0 1 1.094.63l1.721 2.982c.226.39.225.872-.001 1.263l-1.743 3a1.26 1.26 0 0 1-1.086.628l-4.003.009a1.26 1.26 0 0 1-1.094-.63l-1.722-2.982a1.26 1.26 0 0 1 .002-1.263l1.742-3Zm1.967.858a1.26 1.26 0 0 0-1.08.614l-.903 1.513a1.26 1.26 0 0 0-.002 1.289l.885 1.492c.227.384.64.62 1.086.618l2.192-.005a1.26 1.26 0 0 0 1.08-.615l.904-1.518a1.26 1.26 0 0 0 .001-1.288l-.884-1.489a1.26 1.26 0 0 0-1.086-.616l-2.193.005Zm2.517 2.76a1.4 1.4 0 1 1-2.8 0 1.4 1.4 0 0 1 2.8 0Z" clip-rule="evenodd"/></svg>'},{}],e5G6o:[function(e,t,r){t.exports='<svg class="apd-icon apd-style-icon" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 22 22" viewBox="0 0 22 22" width="36" height="24"><path d="M17 16H5c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1zM6.96 15c.39 0 .74-.24.89-.6l.65-1.6h5l.66 1.6c.15.36.5.6.89.6.69 0 1.15-.71.88-1.34l-3.88-8.97C11.87 4.27 11.46 4 11 4s-.87.27-1.05.69l-3.88 8.97c-.27.63.2 1.34.89 1.34zM11 5.98 12.87 11H9.13L11 5.98z"/></svg>'},{}],fC4yA:[function(e,t,r){t.exports='<svg class="apd-icon apd-mode-0-off" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 28 28" viewBox="0 0 28 28" width="28" height="28"><path d="M23 15c1.487 0 2.866.464 4 1.255V7a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v14a4 4 0 0 0 4 4h11.674A7 7 0 0 1 23 15zM11 9h6a1 1 0 0 1 0 2h-6a1 1 0 0 1 0-2zm-3 2H6V9h2v2zm4 4h-2v-2h2v2zm2-1a1 1 0 0 1 1-1h1a1 1 0 0 1 0 2h-1a1 1 0 0 1-1-1z" fill="#00AEEC"/><path d="M26.536 18.464a5 5 0 0 0-7.071 0 5 5 0 0 0 0 7.071 5 5 0 1 0 7.071-7.071zm-5.657 5.657a3 3 0 0 1-.586-3.415l4.001 4.001a3 3 0 0 1-3.415-.586zm4.829-.827-4.001-4.001a3.002 3.002 0 0 1 4.001 4.001z" fill="#00AEEC"/></svg>'},{}],fUkVg:[function(e,t,r){t.exports='<svg class="apd-icon apd-mode-0-on" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 28 28" viewBox="0 0 28 28" width="28" height="28"><path d="M23 3H5a4 4 0 0 0-4 4v14a4 4 0 0 0 4 4h18a4 4 0 0 0 4-4V7a4 4 0 0 0-4-4zM11 9h6a1 1 0 0 1 0 2h-6a1 1 0 0 1 0-2zm-3 2H6V9h2v2zm4 4h-2v-2h2v2zm9 0h-6a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2z" fill="#FFF"/></svg>'},{}],isoJm:[function(e,t,r){t.exports='<svg class="apd-icon apd-mode-1-off" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 28 28" viewBox="0 0 28 28" width="28" height="28"><path d="M23 15c1.487 0 2.866.464 4 1.255V7a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v14a4 4 0 0 0 4 4h11.674A7 7 0 0 1 23 15zm-4-8h2v2h-2V7zM9 9H7V7h2v2zm4 0h-2V7h2v2zm2-2h2v2h-2V7z" fill="#00AEEC"/><path d="M26.536 18.464a5 5 0 0 0-7.071 0 5 5 0 0 0 0 7.071 5 5 0 1 0 7.071-7.071zm-5.657 5.657a3 3 0 0 1-.586-3.415l4.001 4.001a3 3 0 0 1-3.415-.586zm4.829-.827-4.001-4.001a3.002 3.002 0 0 1 4.001 4.001z" fill="#00AEEC"/></svg>'},{}],"20nBM":[function(e,t,r){t.exports='<svg class="apd-icon apd-mode-1-on" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 28 28" viewBox="0 0 28 28" width="28" height="28"><path d="M23 3H5a4 4 0 0 0-4 4v14a4 4 0 0 0 4 4h18a4 4 0 0 0 4-4V7a4 4 0 0 0-4-4zM9 9H7V7h2v2zm4 0h-2V7h2v2zm4 0h-2V7h2v2zm4 0h-2V7h2v2z" fill="#FFF"/></svg>'},{}],"6x9CL":[function(e,t,r){t.exports='<svg class="apd-icon apd-mode-2-off" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 28 28" viewBox="0 0 28 28" width="28" height="28"><path d="M23 15c1.487 0 2.866.464 4 1.255V7a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v14a4 4 0 0 0 4 4h11.674A7 7 0 0 1 23 15zM9 21H7v-2h2v2zm4 0h-2v-2h2v2z" fill="#00AEEC"/><path d="M26.536 18.464a5 5 0 0 0-7.071 0 5 5 0 0 0 0 7.071 5 5 0 1 0 7.071-7.071zm-5.657 5.657a3 3 0 0 1-.586-3.415l4.001 4.001a3 3 0 0 1-3.415-.586zm4.829-.827-4.001-4.001a3.002 3.002 0 0 1 4.001 4.001z" fill="#00AEEC"/></svg>'},{}],"7GKdL":[function(e,t,r){t.exports='<svg class="apd-icon apd-mode-2-on" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" data-pointer="none" style="enable-background:new 0 0 28 28" viewBox="0 0 28 28" width="28" height="28"><path d="M23 3H5a4 4 0 0 0-4 4v14a4 4 0 0 0 4 4h18a4 4 0 0 0 4-4V7a4 4 0 0 0-4-4zM9 21H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2z" fill="#FFF"/></svg>'},{}],"9SCIh":[function(e,t,r){t.exports='<svg class="apd-icon apd-check-on" xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 32 32" width="32" height="32"><path d="m13 18.25-1.8-1.8c-.6-.6-1.65-.6-2.25 0s-.6 1.5 0 2.25l2.85 2.85c.318.318.762.468 1.2.448.438.02.882-.13 1.2-.448l8.85-8.85c.6-.6.6-1.65 0-2.25s-1.65-.6-2.25 0l-7.8 7.8zM8 4h16c2.21 0 4 1.79 4 4v16c0 2.21-1.79 4-4 4H8c-2.21 0-4-1.79-4-4V8c0-2.21 1.79-4 4-4z" fill="#00AEEC"/></svg>'},{}],"6KRxn":[function(e,t,r){t.exports='<svg class="apd-icon apd-check-off" xmlns="http://www.w3.org/2000/svg" data-pointer="none" viewBox="0 0 32 32" width="32" height="32"><path d="M8 6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2H8zm0-2h16c2.21 0 4 1.79 4 4v16c0 2.21-1.79 4-4 4H8c-2.21 0-4-1.79-4-4V8c0-2.21 1.79-4 4-4z" fill="#FFF"/></svg>'},{}],dXFn2:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return s});var a=e("@swc/helpers/_/_to_consumable_array"),o={map:function(e,t,r,n,a){return(e-t)*(a-n)/(r-t)+n}},i=function(e,t){var r=t[0]-e[0],n=t[1]-e[1];return{length:Math.sqrt(Math.pow(r,2)+Math.pow(n,2)),angle:Math.atan2(n,r)}};function s(e,t,r){var n=e.constructor.utils.query;e.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted:function(s){var l=null,u=null;function c(){var c,p,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(l=null,u=null,s.innerHTML="",e.duration&&!e.option.isLive){var f={w:s.offsetWidth,h:s.offsetHeight},h={xMin:0,xMax:f.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*f.h),sampling:Math.floor(f.w/100),smoothing:.2,flattening:.2};"object"==typeof r&&Object.assign(h,r);var m=[];if(Array.isArray(d)&&d.length)m=(0,a._)(d);else for(var y=function(e){var r=t.danmus.filter(function(t){var r=t.time;return r>e*g&&r<=(e+h.sampling)*g}).length;m.push([e,r])},g=e.duration/f.w,v=0;v<=f.w;v+=h.sampling)y(v);if(0!==m.length){var _=m[m.length-1],b=_[0],x=_[1];b!==f.w&&m.push([f.w,x]);for(var k=m.map(function(e){return e[1]}),w=((c=Math).min.apply(c,(0,a._)(k))+(p=Math).max.apply(p,(0,a._)(k)))/2,j=0;j<m.length;j++){var $=m[j],S=$[1];$[1]=S*(S>w?1+h.scale:1-h.scale)+h.minHeight}var O=function(e,t,r,n){var a=i(t||e,r||e),s=o.map(Math.cos(a.angle)*h.flattening,0,1,1,0),l=a.angle*s+(n?Math.PI:0),u=a.length*h.smoothing;return[e[0]+Math.cos(l)*u,e[1]+Math.sin(l)*u]},D=function(e,t,r){var n=O(r[t-1],r[t-2],e),a=O(e,r[t-1],r[t+1],!0),o=t===r.length-1?" z":"";return"C ".concat(n[0],",").concat(n[1]," ").concat(a[0],",").concat(a[1]," ").concat(e[0],",").concat(e[1]).concat(o)},M=m.map(function(e){return[o.map(e[0],h.xMin,h.xMax,0,f.w),o.map(e[1],h.yMin,h.yMax,f.h,0)]}).reduce(function(e,t,r,n){return 0===r?"M ".concat(n[n.length-1][0],",").concat(f.h," L ").concat(t[0],",").concat(f.h," L ").concat(t[0],",").concat(t[1]):"".concat(e," ").concat(D(t,r,n))},"");s.innerHTML='\n<svg viewBox="0 0 '.concat(f.w," ").concat(f.h,'">\n<defs>\n<linearGradient id="heatmap-solids" x1="0%" y1="0%" x2="100%" y2="0%">\n<stop offset="0%" style="stop-color:var(--art-theme);stop-opacity:').concat(h.opacity,'" />\n<stop offset="0%" style="stop-color:var(--art-theme);stop-opacity:').concat(h.opacity,'" id="heatmap-start" />\n<stop offset="0%" style="stop-color:var(--art-progress-color);stop-opacity:1" id="heatmap-stop" />\n<stop offset="100%" style="stop-color:var(--art-progress-color);stop-opacity:1" />\n</linearGradient>\n</defs>\n<path fill="url(#heatmap-solids)" d="').concat(M,'"></path>\n</svg>\n '),l=n("#heatmap-start",s),u=n("#heatmap-stop",s),l.setAttribute("offset","".concat(100*e.played,"%")),u.setAttribute("offset","".concat(100*e.played,"%"))}}}e.on("video:timeupdate",function(){l&&u&&(l.setAttribute("offset","".concat(100*e.played,"%")),u.setAttribute("offset","".concat(100*e.played,"%")))}),e.on("setBar",function(e,t){l&&u&&"played"===e&&(l.setAttribute("offset","".concat(100*t,"%")),u.setAttribute("offset","".concat(100*t,"%")))}),e.on("ready",function(){return c()}),e.on("resize",function(){return c()}),e.on("artplayerPluginDanmuku:loaded",function(){return c()}),e.on("artplayerPluginDanmuku:points",function(e){return c(e)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); |