* chore: Bump artplayer-plugin-danmuku version to 5.1.0

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Refactor getDanmuTop function to handle additional cases

* chore: Refactor getDanmuTop function to handle additional cases

* chore: Update danmuku plugin with new mount option

* chore: Update danmuku plugin with new mount option

* chore: Refactor danmuku plugin to always create a new Setting instance

* Refactor danmuku plugin to always create a new Setting instance

* Refactor danmuku plugin to always create a new Setting instance

* Update danmuku.js

* Update danmuku.js

* Refactor danmuku plugin to include a new Setting instance

* Refactor danmuku plugin to include a new Setting instance

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* Refactor danmuku plugin styles for better alignment and spacing

* chore: Update package.json files

* Refactor danmuku plugin to remove unnecessary whitespace in the setting template

* chore: Remove ESLint configuration files and update npm dependencies

* chore: Update ESLint configuration to disable console warnings and fix unused variable warnings

* chore: Update ESLint configuration to fix quotes rule

* Update package.json

* Update package.json

* Update setting.js

* chore: Compress CSS code in build script

* chore: Update build script to compress JavaScript code

* chore: Update build script to compress JavaScript code

* chore: Refactor setting.js to improve code organization and remove unused variables

* chore: Add isHover flag to Control component for better control hiding behavior

* chore: Update Control component to use $bottom instead of $controls for better control hiding behavior

* Update package.json

* Update package.json

* Update package.json

* chore: Update lerna.json to use independent versioning and yarn as npm client

* refactor: Update Danmuku class to support configurable modes and visibility

* refactor: Update Danmuku styles for better visibility and configurability

* feat: Update font weight in Danmuku styles for better readability

* refactor: Update Danmuku class to support configurable modes and visibility

* refactor: Add opacity, area, font, and speed sliders to Danmuku settings

* refactor: Initialize sliders for opacity, area, font, and speed in Danmuku settings

* feat: Add slider UI for opacity, area, and speed in Danmuku settings

* feat: Update slider styles in Danmuku settings for better visibility and configurability

* refactor: Improve Danmuku settings UI for better visibility and configurability

* refactor: Improve Danmuku settings UI for better visibility and configurability

* refactor: Update slider styles in Danmuku settings for better visibility and configurability

* refactor: Update margin slider initialization in Danmuku settings

* refactor: Update slider styles and initialization in Danmuku settings

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku class to support configurable visibility

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Improve Danmuku settings UI for better visibility and configurability

* add lock

* refactor: Add lock and unlock methods to Danmuku settings

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* Update artplayer-plugin-danmuku.d.ts

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings event listeners

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability

* refactor: Update Danmuku settings UI for better visibility and configurability
This commit is contained in:
Harvey Zack authored and GitHub committed 2024-05-26 14:57:22 +08:00
1 parent dfd1cf968d
commit 699135afcf
402 files changed
+20804 -17005

No files matched your search

+1 -7
View File
@@ -1,7 +1 @@
/*!
* artplayer-plugin-ads.js v2.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new s.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:s(n)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=o,s.parent=r,s.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(s,"root",{get:function(){return a[t]}}),a[t]=s;for(var p=0;p<n.length;p++)s(n[p]);if(l){var u=s(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({hUYA0:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{!function(e){const{version:n,utils:{errorHandle:l}}=e.constructor,t=n.split(".").map(Number);l(t[0]+t[1]/100>=5,`Artplayer.js@${n} is not compatible the artplayerPluginAds@${r.version}. Please update it to version Artplayer.js@5.x.x`)}(n);const{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:o,loading:d},constructor:{validator:s,utils:{query:p,append:u,setStyle:c}}}=n;e=s({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let y=null,f=null,g=null,m=null,v=null,x=null,h=0,b=null,w=!1,j=!1,D=!1;function $(e,n){return n.replace("%s",e)}function k(){w=!0,n.play(),e.video&&y.pause(),c(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function P(){w||(b=setTimeout((()=>{h+=1;const n=e.playDuration-h;n>=1?g.innerHTML=$(n,e.i18n.canBeClosed):(g.innerHTML=e.i18n.close,D||(D=!0)),m.innerHTML=$(e.totalDuration-h,e.i18n.countdown),h>=e.totalDuration?k():P()}),1e3))}function A(){w||clearTimeout(b)}function O(){j||(j=!0,function(){n.template.$ads=u(l,'<div class="artplayer-plugin-ads"></div>'),y=u(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),x=u(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),u(x,d),f=u(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:$(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${$(e.totalDuration,e.i18n.countdown)}</div></div>`),g=p(".artplayer-plugin-ads-close",f),m=p(".artplayer-plugin-ads-countdown",f),e.playDuration>=e.totalDuration&&c(g,"display","none"),n.proxy(g,"click",(()=>{D&&k()})),v=u(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`);const r=p(".artplayer-plugin-ads-detail",v),s=p(".artplayer-plugin-ads-muted",v),h=p(".artplayer-plugin-ads-fullscreen",v);if(e.url?n.proxy(r,"click",(()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)})):c(r,"display","none"),e.video){const l=u(s,t),a=u(s,i);c(a,"display","none"),e.muted&&(y.muted=!0,c(l,"display","none"),c(a,"display","inline-flex")),n.proxy(s,"click",(()=>{y.muted=!y.muted,y.muted?(c(l,"display","none"),c(a,"display","inline-flex")):(c(l,"display","inline-flex"),c(a,"display","none"))}))}else c(s,"display","none");const b=u(h,a),w=u(h,o);c(w,"display","none"),n.proxy(h,"click",(()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(c(b,"display","inline-flex"),c(w,"display","none")):(c(b,"display","none"),c(w,"display","inline-flex"))})),n.proxy(y,"click",(()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(y,"error",k),n.proxy(y,"loadedmetadata",(()=>{P(),y.play(),c(f,"display","flex"),c(v,"display","flex"),c(x,"display","none")}))):(P(),c(f,"display","flex"),c(v,"display","flex"),c(x,"display","none")),n.proxy(document,"visibilitychange",(()=>{document.hidden?A():P()})))}return n.on("ready",(()=>{n.once("play",O),n.once("video:playing",O)})),{name:"artplayerPluginAds",skip:k,pause:A,play:P}}}if(l.default=r,"undefined"!=typeof documenLine truncated
/*! * artplayer-plugin-ads.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,n,l,t,i){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},r="function"==typeof a[t]&&a[t],o=r.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,l){if(!o[n]){if(!e[n]){var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);if(r)return r(n,!0);if(d&&"string"==typeof n)return d(n);var s=Error("Cannot find module '"+n+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(l){var t=e[n][1][l];return null!=t?t:l},c.cache={};var u=o[n]=new p.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=r,p.register=function(n,l){e[n]=[function(e,n){n.exports=l},{}]},Object.defineProperty(p,"root",{get:function(){return a[t]}}),a[t]=p;for(var s=0;s<n.length;s++)p(n[s]);if(l){var u=p(l);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({hUYA0:[function(e,n,l){var t=e("@parcel/transformer-js/src/esmodule-helpers.js");t.defineInteropFlag(l),t.export(l,"default",()=>r);var i=e("bundle-text:./style.less"),a=t.interopDefault(i);function r(e){return n=>{!function(e){let{version:n,utils:{errorHandle:l}}=e.constructor,t=n.split(".").map(Number);l(t[0]+t[1]/100>=5,`Artplayer.js@${n}is not compatible the artplayerPluginAds@${r.version}. Please update it to version Artplayer.js@5.x.x`)}(n);let{template:{$player:l},icons:{volume:t,volumeClose:i,fullscreenOn:a,fullscreenOff:o,loading:d},constructor:{validator:p,utils:{query:s,append:u,setStyle:c}}}=n;e=p({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"},...e},{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});let y=null,f=null,g=null,m=null,x=null,v=null,h=0,b=null,w=!1,j=!1,D=!1;function P(e,n){return n.replace("%s",e)}function $(){w=!0,n.play(),e.video&&y.pause(),c(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function k(){w||(b=setTimeout(()=>{h+=1;let n=e.playDuration-h;n>=1?g.innerHTML=P(n,e.i18n.canBeClosed):(g.innerHTML=e.i18n.close,D||(D=!0)),m.innerHTML=P(e.totalDuration-h,e.i18n.countdown),h>=e.totalDuration?$():k()},1e3))}function A(){w||clearTimeout(b)}function O(){j||(j=!0,function(){n.template.$ads=u(l,'<div class="artplayer-plugin-ads"></div>'),y=u(n.template.$ads,e.video?`<video class="artplayer-plugin-ads-video" src="${e.video}" loop playsInline></video>`:`<div class="artplayer-plugin-ads-html">${e.html}</div>`),v=u(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),u(v,d),g=s(".artplayer-plugin-ads-close",f=u(n.template.$ads,`<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">${e.playDuration<=0?e.i18n.close:P(e.playDuration,e.i18n.canBeClosed)}</div><div class="artplayer-plugin-ads-countdown">${P(e.totalDuration,e.i18n.countdown)}</div></div>`)),m=s(".artplayer-plugin-ads-countdown",f),e.playDuration>=e.totalDuration&&c(g,"display","none"),n.proxy(g,"click",()=>{D&&$()});let r=s(".artplayer-plugin-ads-detail",x=u(n.template.$ads,`<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">${e.i18n.detail}</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>`)),p=s(".artplayer-plugin-ads-muted",x),h=s(".artplayer-plugin-ads-fullscreen",x);if(e.url?n.proxy(r,"click",()=>{window.open(e.url),n.emit("artplayerPluginAds:click",e)}):c(r,"display","none"),e.video){let l=u(p,t),a=u(p,i);c(a,"display","none"),e.muted&&(y.muted=!0,c(l,"display","none"),c(a,"display","inline-flex")),n.proxy(p,"click",()=>{y.muted=!y.muted,y.muted?(c(l,"display","none"),c(a,"display","inline-flex")):(c(l,"display","inline-flex"),c(a,"display","none"))})}else c(p,"display","none");let b=u(h,a),w=u(h,o);c(w,"display","none"),n.proxy(h,"click",()=>{n.fullscreen=!n.fullscreen,n.fullscreen?(c(b,"display","inline-flex"),c(w,"display","none")):(c(b,"display","none"),c(w,"display","inline-flex"))}),n.proxy(y,"click",()=>{e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(y,"error",$),n.proxy(y,"loadedmetadata",()=>{k(),y.play(),c(f,"display","flex"),c(x,"display","flex"),c(v,"display","none")})):(k(),c(f,"display","flex"),c(x,"display","flex"),c(v,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?A():k()}))}return n.on("ready",()=>{Line truncated
@@ -1,7 +1 @@
/*!
* artplayer-plugin-ads.js v2.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,n,t,r,l){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[r]&&i[r],o=a.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,t){if(!o[n]){if(!e[n]){var l="function"==typeof i[r]&&i[r];if(!t&&l)return l(n,!0);if(a)return a(n,!0);if(s&&"string"==typeof n)return s(n);var p=new Error("Cannot find module '"+n+"'");throw p.code="MODULE_NOT_FOUND",p}c.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},c.cache={};var u=o[n]=new d.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=o,d.parent=a,d.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var p=0;p<n.length;p++)d(n[p]);if(t){var u=d(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({"69VIU":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t);var l=e("@swc/helpers/src/_object_spread.mjs"),i=r.interopDefault(l),a=e("bundle-text:./style.less"),o=r.interopDefault(a);function s(e){return function(n){!function(e){var n=e.constructor,t=n.version,r=n.utils.errorHandle,l=t.split(".").map(Number);r(l[0]+l[1]/100>=5,"Artplayer.js@".concat(t," is not compatible the artplayerPluginAds@").concat(s.version,". Please update it to version Artplayer.js@5.x.x"))}(n);var t=n.template.$player,r=n.icons,l=r.volume,a=r.volumeClose,o=r.fullscreenOn,d=r.fullscreenOff,p=r.loading,u=n.constructor,c=u.validator,f=u.utils,y=f.query,g=f.append,m=f.setStyle;e=c((0,i.default)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var v=null,h=null,x=null,b=null,w=null,j=null,D=0,O=null,P=!1,_=!1,k=!1;function A(e,n){return n.replace("%s",e)}function I(){P=!0,n.play(),e.video&&v.pause(),m(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function M(){P||(O=setTimeout((function(){D+=1;var n=e.playDuration-D;n>=1?x.innerHTML=A(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),b.innerHTML=A(e.totalDuration-D,e.i18n.countdown),D>=e.totalDuration?I():M()}),1e3))}function C(){P||clearTimeout(O)}function L(){_||(_=!0,function(){n.template.$ads=g(t,'<div class="artplayer-plugin-ads"></div>'),v=g(n.template.$ads,e.video?'<video class="artplayer-plugin-ads-video" src="'.concat(e.video,'" loop playsInline></video>'):'<div class="artplayer-plugin-ads-html">'.concat(e.html,"</div>")),j=g(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),g(j,p),h=g(n.template.$ads,'<div class="artplayer-plugin-ads-timer"><div class="artplayer-plugin-ads-close">'.concat(e.playDuration<=0?e.i18n.close:A(e.playDuration,e.i18n.canBeClosed),'</div><div class="artplayer-plugin-ads-countdown">').concat(A(e.totalDuration,e.i18n.countdown),"</div></div>")),x=y(".artplayer-plugin-ads-close",h),b=y(".artplayer-plugin-ads-countdown",h),e.playDuration>=e.totalDuration&&m(x,"display","none"),n.proxy(x,"click",(function(){k&&I()})),w=g(n.template.$ads,'<div class="artplayer-plugin-ads-control"><div class="artplayer-plugin-ads-detail">'.concat(e.i18n.detail,'</div><div class="artplayer-plugin-ads-muted"></div><div class="artplayer-plugin-ads-fullscreen"></div></div>'));var r=y(".artplayer-plugin-ads-detail",w),i=y(".artplayer-plugin-ads-muted",w),s=y(".artplayer-plugin-ads-fullscreen",w);if(e.url?n.proxy(r,"click",(function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)})):m(r,"display","none"),e.video){var u=g(i,l),c=g(i,a);m(c,"display","none"),e.muted&&(v.muted=!0,m(u,"display","none"),m(c,"display","inline-flex")),n.proxy(i,"click",(function(){v.muted=!v.muted,v.muted?(m(u,"display","none"),m(c,"display","inline-flex")):(m(u,"display","inline-flex"),m(c,"display","none"))}))}else m(i,"display","none");var f=g(s,o),D=g(s,d);m(D,"display","none"),n.proxy(s,"click",(function(){n.fullscreen=!n.fullscreen,n.fullscreen?(m(f,"display","inline-flex"),m(D,"display","none")):(m(f,"display","none"),m(D,"display","inline-flex"))})),n.proxy(v,"click",(function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)}))}(),n.pause(),e.video?(n.proxy(v,"error",I),n.proxy(v,"loadedmetadata",(function(){M(),v.play(),m(h,"display","flex"),m(w,"display","flex"),m(j,"display","none")}))):(M(),m(h,"display","flex"),m(w,"display","flex"),m(j,"display","none")),n.proxy(document,"visibilitychaLine truncated
/*! * artplayer-plugin-ads.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,n,t,r,l){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[r]&&i[r],o=a.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(n,t){if(!o[n]){if(!e[n]){var l="function"==typeof i[r]&&i[r];if(!t&&l)return l(n,!0);if(a)return a(n,!0);if(s&&"string"==typeof n)return s(n);var d=Error("Cannot find module '"+n+"'");throw d.code="MODULE_NOT_FOUND",d}c.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},c.cache={};var u=o[n]=new p.Module(n);e[n][0].call(u.exports,c,u,u.exports,this)}return o[n].exports;function c(e){var n=c.resolve(e);return!1===n?{}:p(n)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=o,p.parent=a,p.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(p,"root",{get:function(){return i[r]}}),i[r]=p;for(var d=0;d<n.length;d++)p(n[d]);if(t){var u=p(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({"69VIU":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"default",function(){return o});var l=e("@swc/helpers/_/_object_spread"),i=e("bundle-text:./style.less"),a=r.interopDefault(i);function o(e){return function(n){r=(t=n.constructor).version,(0,t.utils.errorHandle)((i=r.split(".").map(Number))[0]+i[1]/100>=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginAds@").concat(o.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,i,a=n.template.$player,s=n.icons,p=s.volume,d=s.volumeClose,u=s.fullscreenOn,c=s.fullscreenOff,f=s.loading,y=n.constructor,g=y.validator,m=y.utils,v=m.query,h=m.append,x=m.setStyle;e=g((0,l._)({html:"",video:"",url:"",playDuration:5,totalDuration:10,muted:!1,i18n:{close:"关闭广告",countdown:"%s秒",detail:"查看详情",canBeClosed:"%s秒后可关闭广告"}},e),{html:"?string",video:"?string",url:"?string",playDuration:"number",totalDuration:"number",muted:"?boolean",i18n:{close:"string",countdown:"string",detail:"string",canBeClosed:"string"}});var b=null,j=null,w=null,_=null,D=null,O=null,P=0,k=null,A=!1,I=!1,M=!1;function C(e,n){return n.replace("%s",e)}function L(){A=!0,n.play(),e.video&&b.pause(),x(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function T(){A||(k=setTimeout(function(){P+=1;var n=e.playDuration-P;n>=1?w.innerHTML=C(n,e.i18n.canBeClosed):(w.innerHTML=e.i18n.close,M||(M=!0)),_.innerHTML=C(e.totalDuration-P,e.i18n.countdown),P>=e.totalDuration?L():T()},1e3))}function F(){A||clearTimeout(k)}function U(){I||(I=!0,function(){n.template.$ads=h(a,'<div class="artplayer-plugin-ads"></div>'),b=h(n.template.$ads,e.video?'<video class="artplayer-plugin-ads-video" src="'.concat(e.video,'" loop playsInline></video>'):'<div class="artplayer-plugin-ads-html">'.concat(e.html,"</div>")),O=h(n.template.$ads,'<div class="artplayer-plugin-ads-loading"></div>'),h(O,f),w=v(".artplayer-plugin-ads-close",j=h(n.template.$ads,'<div class="artplayer-plugin-ads-timer">\n<div class="artplayer-plugin-ads-close">'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'</div>\n<div class="artplayer-plugin-ads-countdown">').concat(C(e.totalDuration,e.i18n.countdown),"</div>\n</div>"))),_=v(".artplayer-plugin-ads-countdown",j),e.playDuration>=e.totalDuration&&x(w,"display","none"),n.proxy(w,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",D=h(n.template.$ads,'<div class="artplayer-plugin-ads-control">\n<div class="artplayer-plugin-ads-detail">'.concat(e.i18n.detail,'</div>\n<div class="artplayer-plugin-ads-muted"></div>\n<div class="artplayer-plugin-ads-fullscreen"></div>\n</div>'))),r=v(".artplayer-plugin-ads-muted",D),l=v(".artplayer-plugin-ads-fullscreen",D);if(e.url?n.proxy(t,"click",function(){window.open(e.url),n.emit("artplayerPluginAds:click",e)}):x(t,"display","none"),e.video){var i=h(r,p),o=h(r,d);x(o,"display","none"),e.muted&&(b.muted=!0,x(i,"display","none"),x(o,"display","inline-flex")),n.proxy(r,"click",function(){b.muted=!b.muted,b.muted?(x(i,"display","none"),x(o,"display","inline-flex")):(x(i,"display","inline-flex"),x(o,"display","none"))})}else x(r,"display","none");var s=h(l,u),y=h(l,c);x(y,"display","none"),n.proxy(l,"click",function(){n.fullscreen=!n.fullscreen,n.fullscreen?(x(s,"display","inline-flex"),x(y,"display","none")):(x(s,"display","none"),x(y,"display","inline-flex"))}),n.proxy(b,"click",function(){e.url&&window.open(e.url),n.emit("artplayerPluginAds:click",e)})}(),n.pause(),e.video?(n.proxy(b,"error",L),n.proxy(b,"loadedmetadata",function(){T(),b.play(),x(j,"display","flex"),x(D,"display","Line truncated
@@ -0,0 +1 @@
/*! * artplayer-plugin-chromecast.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,o,t,n,i){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},c="function"==typeof r[n]&&r[n],a=c.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(o,t){if(!a[o]){if(!e[o]){var i="function"==typeof r[n]&&r[n];if(!t&&i)return i(o,!0);if(c)return c(o,!0);if(s&&"string"==typeof o)return s(o);var l=Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}f.resolve=function(t){var n=e[o][1][t];return null!=n?n:t},f.cache={};var u=a[o]=new d.Module(o);e[o][0].call(u.exports,f,u,u.exports,this)}return a[o].exports;function f(e){var o=f.resolve(e);return!1===o?{}:d(o)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=c,d.register=function(o,t){e[o]=[function(e,o){o.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return r[n]}}),r[n]=d;for(var l=0;l<o.length;l++)d(o[l]);if(t){var u=d(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({"3wl5Y":[function(e,o,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function i(e){return window.__onGCastApiAvailable=function(e){e&&window.cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})},async o=>{if(!window.chrome||!window.chrome.cast){var t;await (t=e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",new Promise((e,o)=>{let n=document.createElement("script");n.src=t,n.onload=e,n.onerror=o,document.body.appendChild(n)}))}function n(t){let n=e.url||o.option.url,i=e.mimeType||({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mp3:"audio/mp3",wav:"audio/wav",flv:"video/x-flv",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mpd:"application/dash+xml",m3u8:"application/x-mpegURL"})[n.split("?")[0].split("#")[0].split(".").pop().toLowerCase()]||"application/octet-stream",r=new window.chrome.cast.media.MediaInfo(n,i),c=new window.chrome.cast.media.LoadRequest(r);t.loadMedia(c).then(function(){console.log("Media loaded successfully")},function(e){o.notice.show="Error casting media",console.log("Error casting media",e)})}return o.controls.add({name:"chromecast",position:"right",tooltip:"Chromecast",html:`<i class="art-icon art-icon-cast">${e.icon||'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M512 96H64v99c-13-2-26.4-3-40-3H0V96C0 60.7 28.7 32 64 32H512c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H288V456c0-13.6-1-27-3-40H512V96zM24 224c128.1 0 232 103.9 232 232c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-101.6-82.4-184-184-184c-13.3 0-24-10.7-24-24s10.7-24 24-24zm8 192a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM0 344c0-13.3 10.7-24 24-24c75.1 0 136 60.9 136 136c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-48.6-39.4-88-88-88c-13.3 0-24-10.7-24-24z"/></svg>'}</i>`,click(){let e=window.cast.framework.CastContext.getInstance().getCurrentSession();e?n(e):window.cast.framework.CastContext.getInstance().requestSession().then(function(e){n(e)},function(e){o.notice.show="Error connecting to cast session",console.log("Error connecting to cast session",e)})}}),{name:"artplayerPluginChromecast"}}}n.defineInteropFlag(t),n.export(t,"default",()=>i),"undefined"!=typeof window&&(window.artplayerPluginChromecast=i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,o,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,o){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(o,t)||Object.defineProperty(o,t,{enumerable:!0,get:function(){return e[t]}})}),o},t.export=function(e,o,t){Object.defineProperty(e,o,{enumerable:!0,get:t})}},{}]},["3wl5Y"],"3wl5Y","parcelRequire4dc0");
@@ -0,0 +1 @@
/*! * artplayer-plugin-chromecast.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],c=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,r){if(!c[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var l=c[t]=new s.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return c[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=c,s.parent=a,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var f=0;f<t.length;f++)s(t[f]);if(r){var l=s(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define(function(){return l})}}({ipx5S:[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 o=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator");function a(e){var t;return window.__onGCastApiAvailable=function(e){e&&window.cast.framework.CastContext.getInstance().setOptions({receiverApplicationId:window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,autoJoinPolicy:window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED})},t=(0,o._)(function(t){function r(r){var n=e.url||t.option.url,o=e.mimeType||({mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",ogv:"video/ogg",mp3:"audio/mp3",wav:"audio/wav",flv:"video/x-flv",mov:"video/quicktime",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",mpd:"application/dash+xml",m3u8:"application/x-mpegURL"})[n.split("?")[0].split("#")[0].split(".").pop().toLowerCase()]||"application/octet-stream",i=new window.chrome.cast.media.MediaInfo(n,o),a=new window.chrome.cast.media.LoadRequest(i);r.loadMedia(a).then(function(){console.log("Media loaded successfully")},function(e){t.notice.show="Error casting media",console.log("Error casting media",e)})}return(0,i._)(this,function(n){switch(n.label){case 0:var o;if(!(!window.chrome||!window.chrome.cast))return[3,2];return[4,(o=e.sdk||"https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1",new Promise(function(e,t){var r=document.createElement("script");r.src=o,r.onload=e,r.onerror=t,document.body.appendChild(r)}))];case 1:n.sent(),n.label=2;case 2:return t.controls.add({name:"chromecast",position:"right",tooltip:"Chromecast",html:'<i class="art-icon art-icon-cast">'.concat(e.icon||'<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><path d="M512 96H64v99c-13-2-26.4-3-40-3H0V96C0 60.7 28.7 32 64 32H512c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H288V456c0-13.6-1-27-3-40H512V96zM24 224c128.1 0 232 103.9 232 232c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-101.6-82.4-184-184-184c-13.3 0-24-10.7-24-24s10.7-24 24-24zm8 192a32 32 0 1 1 0 64 32 32 0 1 1 0-64zM0 344c0-13.3 10.7-24 24-24c75.1 0 136 60.9 136 136c0 13.3-10.7 24-24 24s-24-10.7-24-24c0-48.6-39.4-88-88-88c-13.3 0-24-10.7-24-24z"/></svg>',"</i>"),click:function(){var e=window.cast.framework.CastContext.getInstance().getCurrentSession();e?r(e):window.cast.framework.CastContext.getInstance().requestSession().then(function(e){r(e)},function(e){t.notice.show="Error connecting to cast session",console.log("Error connecting to cast session",e)})}}),[2,{name:"artplayerPluginChromecast"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginChromecast=a)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eONSn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){r(e);return}c.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function c(e){o(a,n,i,c,u,"next",e)}function u(e){o(a,n,i,c,u,"throw",e)}c(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return i}),n.export(r,"_",function(){return i})},{"@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|Line truncated
@@ -21,4 +21,4 @@
"video",
"player"
]
}
}
@@ -33,9 +33,9 @@ export default function artplayerPluginChromecast(option) {
window['__onGCastApiAvailable'] = function (isAvailable) {
if (isAvailable) {
cast.framework.CastContext.getInstance().setOptions({
receiverApplicationId: chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
autoJoinPolicy: chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
window.cast.framework.CastContext.getInstance().setOptions({
receiverApplicationId: window.chrome.cast.media.DEFAULT_MEDIA_RECEIVER_APP_ID,
autoJoinPolicy: window.chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
});
}
};
@@ -48,8 +48,8 @@ export default function artplayerPluginChromecast(option) {
function castVideo(session) {
const url = option.url || art.option.url;
const mimeType = option.mimeType || getMimeType(url);
const mediaInfo = new chrome.cast.media.MediaInfo(url, mimeType);
const request = new chrome.cast.media.LoadRequest(mediaInfo);
const mediaInfo = new window.chrome.cast.media.MediaInfo(url, mimeType);
const request = new window.chrome.cast.media.LoadRequest(mediaInfo);
session.loadMedia(request).then(
function () {
console.log('Media loaded successfully');
@@ -67,12 +67,12 @@ export default function artplayerPluginChromecast(option) {
tooltip: 'Chromecast',
html: `<i class="art-icon art-icon-cast">${option.icon || DEFAULT_ICON}</i>`,
click() {
const castSession = cast.framework.CastContext.getInstance().getCurrentSession();
const castSession = window.cast.framework.CastContext.getInstance().getCurrentSession();
if (castSession) {
castVideo(castSession);
} else {
cast.framework.CastContext.getInstance()
window.cast.framework.CastContext.getInstance()
.requestSession()
.then(
function (session) {
@@ -1,7 +1,7 @@
/*!
* artplayer-plugin-danmuku.js v5.0.1
* artplayer-plugin-danmuku.js v5.1.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[i]&&a[i],o=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,n){if(!o[e]){if(!t[e]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(e,!0);if(s)return s(e,!0);if(l&&"string"==typeof e)return l(e);var d=new Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(n){var i=t[e][1][n];return null!=i?i:n},p.cache={};var m=o[e]=new u.Module(e);t[e][0].call(m.exports,p,m,m.exports,this)}return o[e].exports;function p(t){var e=p.resolve(t);return!1===e?{}:u(e)}}u.isParcelRequire=!0,u.Module=function(t){this.id=t,this.bundle=u,this.exports={}},u.modules=t,u.cache=o,u.parent=s,u.register=function(e,n){t[e]=[function(t,e){e.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var d=0;d<e.length;d++)u(e[d]);if(n){var m=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=m:"function"==typeof define&&define.amd&&define((function(){return m}))}}({bgm6t:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./danmuku"),a=i.interopDefault(r),s=t("./setting"),o=i.interopDefault(s),l=t("./heatmap"),u=i.interopDefault(l);function d(t){return e=>{!function(t){const{version:e,utils:{errorHandle:n}}=t.constructor,i=e.split(".").map(Number);n(i[0]+i[1]/100>=5,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上`)}(e);const n=new(0,a.default)(e,t);return(0,o.default)(e,n),t.heatmap&&(0,u.default)(e,n,t.heatmap),{name:"artplayerPluginDanmuku",emit:n.emit.bind(n),load:n.load.bind(n),config:n.config.bind(n),hide:n.hide.bind(n),show:n.show.bind(n),reset:n.reset.bind(n),get option(){return n.option},get isHide(){return n.isHide},get isStop(){return n.isStop}}}}n.default=d,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=d)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("./bilibili"),a=t("./getDanmuTop"),s=i.interopDefault(a);class o{constructor(e,n){const{constructor:i,template:r}=e;if(this.utils=i.utils,this.validator=i.validator,this.$danmuku=r.$danmuku,this.$player=r.$player,this.art=e,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("12ceab24749100d0"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("resize",this.reset),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:["2%","25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,filter:()=>!0,antiOverlap:!0,useWorker:!0,synchronousPlayback:!1,lockTime:5,maxLength:100,minWidth:200,maxWidth:400,mount:void 0,theme:"dark",heatmap:!1,points:[],beforeEmit:()=>!0}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",useWorker:"boolean",synchronousPlayback:"boolean",lockTime:"number",maxLength:"number",minWidth:"number",maxWidth:"number",mount:"undefined|htmldivelement",theme:"string",heatmap:"object|boolean",points:"array",beforeEmit:"function"}}get isRotate(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.state}get marginTop(){const{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return o.option.margin[0]}get marginBottom(){const{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:n}=this.$player;if("number"==typeof e)return t(e,0,n);if("string"==typeof e&&e.endsWith("%")){return t(n*(parseFloat(e)/100),0,n)}return o.option.margin[1]}filter(t,e){return this.queue.filter((e=>e.$state===t)).map(e)}getLeft(t){const e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){const t=this.$refs.pop();if(t)return t;const e=document.createElement("div");return e.style.cssText='\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 JhengHeLine truncated
!function(e,t,i,a,n){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof o[a]&&o[a],l=s.cache||{},r="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,i){if(!l[t]){if(!e[t]){var n="function"==typeof o[a]&&o[a];if(!i&&n)return n(t,!0);if(s)return s(t,!0);if(r&&"string"==typeof t)return r(t);var p=Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}h.resolve=function(i){var a=e[t][1][i];return null!=a?a:i},h.cache={};var u=l[t]=new d.Module(t);e[t][0].call(u.exports,h,u,u.exports,this)}return l[t].exports;function h(e){var t=h.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=l,d.parent=s,d.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(d,"root",{get:function(){return o[a]}}),o[a]=d;for(var p=0;p<t.length;p++)d(t[p]);if(i){var u=d(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({bgm6t:[function(e,t,i){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i),a.export(i,"default",()=>p);var n=e("./danmuku"),o=a.interopDefault(n),s=e("./setting"),l=a.interopDefault(s),r=e("./heatmap"),d=a.interopDefault(r);function p(e){return t=>{let i=new o.default(t,e),a=new l.default(t,i);return e.heatmap&&(0,d.default)(t,i,e.heatmap),{name:"artplayerPluginDanmuku",emit:i.emit.bind(i),load:i.load.bind(i),config:i.config.bind(i),hide:i.hide.bind(i),show:i.show.bind(i),reset:i.reset.bind(i),mount:a.mount.bind(a),reset:a.reset.bind(a),lock:a.lock.bind(a),unlock:a.unlock.bind(a),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}"undefined"!=typeof window&&(window.artplayerPluginDanmuku=p)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(e,t,i){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(i);var n=e("./bilibili"),o=e("bundle-text:./worker"),s=a.interopDefault(o);class l{constructor(e,t){let{constructor:i,template:a}=e;this.utils=i.utils,this.validator=i.validator,this.$danmuku=a.$danmuku,this.$player=a.$player,this.art=e,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(t),this.worker=new Worker(URL.createObjectURL(new Blob([s.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),e.on("video:play",this.start),e.on("video:playing",this.start),e.on("video:pause",this.stop),e.on("video:waiting",this.stop),e.on("destroy",this.destroy),this.load()}static get option(){return{danmuku:[],speed:5,margin:[10,"25%"],opacity:1,color:"#FFFFFF",mode:0,fontSize:25,antiOverlap:!0,synchronousPlayback:!1,mount:void 0,heatmap:!1,points:[],setting:{},filter:()=>!0,beforeEmit:()=>!0,beforeVisible:()=>!0,modes:[0,1,2],visible:!0,maxLength:200,lockTime:5}}static get scheme(){return{danmuku:"array|function|string",speed:"number",margin:"array",opacity:"number",color:"string",mode:"number",fontSize:"number|string",filter:"function",antiOverlap:"boolean",synchronousPlayback:"boolean",mount:"?htmldivelement",heatmap:"object|boolean",points:"array",setting:"object",beforeEmit:"function",beforeVisible:"function",modes:"array",visible:"boolean",maxLength:"number",lockTime:"number"}}static get cssText(){return` user-select:none;position:absolute;white-space:pre;pointer-events:none;perspective:500px;display:inline-block;will-change:transform;font-weight:normal;line-height:1.125;visibility:hidden;font-family:SimHei,"Microsoft JhengHei",Arial,Helvetica,sans-serif;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;`}get isRotate(){return this.art.plugins?.autoOrientation?.state}get marginTop(){let{clamp:e}=this.utils,t=this.option.margin[0],{clientHeight:i}=this.$player;return"number"==typeof t?e(t,0,i):"string"==typeof t&&t.endsWith("%")?e(i*(parseFloat(t)/100),0,i):l.option.margin[0]}get marginBottom(){let{clamp:e}=this.utils,t=this.option.margin[1],{clientHeight:i}=this.$player;return"number"==typeof t?e(t,0,i):"string"==typeof t&&t.endsWith("%")?e(i*(parseFloat(t)/100),0,i):l.option.margin[1]}async load(){let{errorHandle:e}=this.utils;try{"function"==typeof this.option.danmuku?this.danmus=await this.option.danmuku():"function"==typeof this.option.danmuku.then?this.danmus=await this.option.danmuku:"string"==typeof this.option.danmuku?this.danmus=await (0,n.bilibiliDanmuParseFromUrl)(this.option.danmuku):this.danmus=this.option.danmuku,e(Array.isArray(this.danmus),"Danmuku need return an array as result"),this.queue=[],this.$danmuku.innerText="",this.danmus.forEach(e=>Line truncated
@@ -1,7 +1,7 @@
/*!
* artplayer-plugin-danmuku.js v5.0.1
* artplayer-plugin-danmuku.js v5.1.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,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],u=i.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!u[e]){if(!t[e]){var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(e,!0);if(i)return i(e,!0);if(s&&"string"==typeof e)return s(e);var c=new Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var p=u[e]=new l.Module(e);t[e][0].call(p.exports,f,p,p.exports,this)}return u[e].exports;function f(t){var e=f.resolve(t);return!1===e?{}:l(e)}}l.isParcelRequire=!0,l.Module=function(t){this.id=t,this.bundle=l,this.exports={}},l.modules=t,l.cache=u,l.parent=i,l.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return o[n]}}),o[n]=l;for(var c=0;c<e.length;c++)l(e[c]);if(r){var p=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}}({"40mNk":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var a=t("./danmuku"),o=n.interopDefault(a),i=t("./setting"),u=n.interopDefault(i),s=t("./heatmap"),l=n.interopDefault(s);function c(t){return function(e){!function(t){var e=t.constructor,r=e.version,n=e.utils.errorHandle,a=r.split(".").map(Number);n(a[0]+a[1]/100>=5,"Artplayer.js@".concat(r," 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上"))}(e);var r=new(0,o.default)(e,t);return(0,u.default)(e,r),t.heatmap&&(0,l.default)(e,r,t.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),get option(){return r.option},get isHide(){return r.isHide},get isStop(){return r.isStop}}}}r.default=c,"undefined"!=typeof window&&(window.artplayerPluginDanmuku=c)},{"./danmuku":"jgffw","./setting":"d3V7t","./heatmap":"dXFn2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgffw:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return b}));var a=t("@swc/helpers/src/_async_to_generator.mjs"),o=n.interopDefault(a),i=t("@swc/helpers/src/_class_call_check.mjs"),u=n.interopDefault(i),s=t("@swc/helpers/src/_create_class.mjs"),l=n.interopDefault(s),c=t("@swc/helpers/src/_object_spread.mjs"),p=n.interopDefault(c),f=t("@swc/helpers/src/_object_spread_props.mjs"),d=n.interopDefault(f),m=t("@swc/helpers/src/_ts_generator.mjs"),h=n.interopDefault(m),y=t("./bilibili"),g=t("./getDanmuTop"),v=n.interopDefault(g),b=function(){"use strict";function e(r,n){(0,u.default)(this,e);var a=r.constructor,o=r.template;if(this.utils=a.utils,this.validator=a.validator,this.$danmuku=o.$danmuku,this.$player=o.$player,this.art=r,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(n),this.option.useWorker)try{this.worker=new Worker(t("12ceab24749100d0"))}catch(t){}this.start=this.start.bind(this),this.stop=this.stop.bind(this),this.reset=this.reset.bind(this),this.destroy=this.destroy.bind(this),r.on("video:play",this.start),r.on("video:playing",this.start),r.on("video:pause",this.stop),r.on("video:waiting",this.stop),r.on("resize",this.reset),r.on("destroy",this.destroy),this.load()}return(0,l.default)(e,[{key:"isRotate",get:function(){return this.art.plugins.autoOrientation&&this.art.plugins.autoOrientation.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:"filter",value:function(t,e){return this.queue.filter((function(e){return e.$state===t})).map(e)}},{key:"getLeft",value:function(t){var e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}},{key:"getRef",value:function(){var t=this.$refs.pop();if(t)return t;var e=document.createElement("div");return e.style.cssText='\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, Line truncated
!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 d});var a=e("@swc/helpers/_/_define_enumerable_properties"),o=e("@swc/helpers/_/_define_property"),i=e("./danmuku"),s=n.interopDefault(i),l=e("./setting"),u=n.interopDefault(l),c=e("./heatmap"),p=n.interopDefault(c);function d(e){return function(t){var r=new s.default(t,e),n=new u.default(t,r);e.heatmap&&(0,p.default)(t,r,e.heatmap);var i,l={};return i={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)},(0,o._)(i,"reset",n.reset.bind(n)),(0,o._)(i,"lock",n.lock.bind(n)),(0,o._)(i,"unlock",n.unlock.bind(n)),l.option=l.option||{},l.option.get=function(){return r.option},l.isHide=l.isHide||{},l.isHide.get=function(){return r.isHide},l.isStop=l.isStop||{},l.isStop.get=function(){return r.isStop},(0,a._)(i,l),i}}"undefined"!=typeof window&&(window.artplayerPluginDanmuku=d)},{"@swc/helpers/_/_define_enumerable_properties":"jIwJC","@swc/helpers/_/_define_property":"3NGsL","./danmuku":"jgffw","./setting":"d3V7t","./heatmap":"dXFn2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jIwJC:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function a(e,t){for(var r in t){var n=t[r];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,r,n)}if(Object.getOwnPropertySymbols)for(var a=Object.getOwnPropertySymbols(t),o=0;o<a.length;o++){var i=a[o],n=t[i];n.configurable=n.enumerable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,i,n)}return e}n.defineInteropFlag(r),n.export(r,"_define_enumerable_properties",function(){return a}),n.export(r,"_",function(){return a})},{"@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})}},{}],"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"}],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.stoLine truncated
@@ -1,6 +1,6 @@
{
"license": "MIT",
"version": "5.0.1",
"version": "5.1.0",
"name": "artplayer-plugin-danmuku",
"types": "types/artplayer-plugin-danmuku.d.ts",
"description": "Danmuku plugin for ArtPlayer",
@@ -3,10 +3,11 @@ export function getMode(key) {
case 1:
case 2:
case 3:
return 0;
return 0; // 滚动
case 4:
return 2; // 底部
case 5:
return 1;
return 1; // 顶部
default:
return 0;
}
@@ -45,8 +46,8 @@ export function bilibiliDanmuParseFromXml(xmlString) {
.filter(Boolean);
}
export function bilibiliDanmuParseFromUrl(url) {
return fetch(url)
.then((res) => res.text())
.then((xmlString) => bilibiliDanmuParseFromXml(xmlString));
export async function bilibiliDanmuParseFromUrl(url) {
const res = await fetch(url);
const xmlString = await res.text();
return bilibiliDanmuParseFromXml(xmlString);
}
+381 -293
View File
@@ -1,73 +1,73 @@
import { bilibiliDanmuParseFromUrl } from './bilibili';
import getDanmuTop from './getDanmuTop';
import workerText from 'bundle-text:./worker';
export default class Danmuku {
constructor(art, option) {
const { constructor, template } = art;
this.utils = constructor.utils;
this.validator = constructor.validator;
this.$danmuku = template.$danmuku;
this.$player = template.$player;
this.utils = constructor.utils; // 工具库
this.validator = constructor.validator; // 配置校验器
this.$danmuku = template.$danmuku; // 弹幕层容器
this.$player = template.$player; // 播放器容器
this.art = art;
this.danmus = [];
this.queue = [];
this.option = {};
this.$refs = [];
this.isStop = false;
this.isHide = false;
this.timer = null;
this.config(option);
this.danmus = []; // 原始弹幕数据
this.queue = []; // 实际弹幕队列
this.option = {}; // 格式化后的配置项
this.$refs = []; // 弹幕DOM节点池
this.isStop = false; // 是否停止
this.isHide = false; // 是否隐藏
this.timer = null; // 定时器
this.config(option); // 动态配置
if (this.option.useWorker) {
try {
this.worker = new Worker(new URL('data-url:./worker.js', import.meta.url));
} catch (error) {
//
}
}
// 创建 Web Worker, 用于计算弹幕的 top 值
this.worker = new Worker(URL.createObjectURL(new Blob([workerText])));
// 绑定公用事件
this.start = this.start.bind(this);
this.stop = this.stop.bind(this);
this.reset = this.reset.bind(this);
this.destroy = this.destroy.bind(this);
// 监听事件
art.on('video:play', this.start);
art.on('video:playing', this.start);
art.on('video:pause', this.stop);
art.on('video:waiting', this.stop);
art.on('resize', this.reset);
art.on('destroy', this.destroy);
art.on('resize', this.reset);
// 开始加载弹幕
this.load();
}
// 默认配置
static get option() {
return {
danmuku: [],
speed: 5,
margin: ['2%', '25%'],
opacity: 1,
color: '#FFFFFF',
mode: 0,
fontSize: 25,
filter: () => true,
antiOverlap: true,
useWorker: true,
synchronousPlayback: false,
lockTime: 5,
maxLength: 100,
minWidth: 200,
maxWidth: 400,
mount: undefined,
theme: 'dark',
heatmap: false,
points: [],
beforeEmit: () => true,
danmuku: [], // 弹幕数据
speed: 5, // 弹幕持续时间,范围在[1 ~ 10]
margin: [10, '25%'], // 弹幕上下边距,支持像素数字和百分比
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
color: '#FFFFFF', // 默认弹幕颜色,可以被单独弹幕项覆盖
mode: 0, // 默认弹幕模式: 0: 滚动,1: 顶部,2: 底部
modes: [0, 1, 2], // 弹幕可见的模式
fontSize: 25, // 弹幕字体大小,支持像素数字和百分比
antiOverlap: true, // 弹幕是否防重叠
synchronousPlayback: false, // 是否同步播放速度
mount: undefined, // 弹幕发射器挂载点, 默认为播放器控制栏中部
heatmap: false, // 是否开启热力图
points: [], // 热力图数据
filter: () => true, // 弹幕载入前的过滤器,只支持返回布尔值
beforeEmit: () => true, // 弹幕发送前的过滤器,支持返回 Promise
beforeVisible: () => true, // 弹幕显示前的过滤器,支持返回 Promise
visible: true, // 弹幕层是否可见
maxLength: 200, // 弹幕输入框最大长度, 范围在[1 ~ 1000]
lockTime: 5, // 输入框锁定时间,范围在[1 ~ 60]
theme: 'dark', // 弹幕主题,支持 dark 和 light,只在自定义挂载时生效
};
}
// 配置校验
static get scheme() {
return {
danmuku: 'array|function|string',
@@ -76,27 +76,47 @@ export default class Danmuku {
opacity: 'number',
color: 'string',
mode: 'number',
modes: 'array',
fontSize: 'number|string',
filter: 'function',
antiOverlap: 'boolean',
useWorker: 'boolean',
synchronousPlayback: 'boolean',
lockTime: 'number',
maxLength: 'number',
minWidth: 'number',
maxWidth: 'number',
mount: 'undefined|htmldivelement',
theme: 'string',
mount: '?htmldivelement',
heatmap: 'object|boolean',
points: 'array',
filter: 'function',
beforeEmit: 'function',
beforeVisible: 'function',
visible: 'boolean',
maxLength: 'number',
lockTime: 'number',
theme: 'string',
};
}
get isRotate() {
return this.art.plugins.autoOrientation && this.art.plugins.autoOrientation.state;
// 初始弹幕样式
static get cssText() {
return `
user-select: none;
position: absolute;
white-space: pre;
pointer-events: none;
perspective: 500px;
display: inline-block;
will-change: transform;
font-weight: normal;
line-height: 1.125;
visibility: hidden;
font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;
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;
`;
}
// 是否在移动端使用了自动旋屏,会影响弹幕的left和top值
get isRotate() {
return this.art.plugins?.autoOrientation?.state;
}
// 计算上空白边距
get marginTop() {
const { clamp } = this.utils;
const value = this.option.margin[0];
@@ -114,6 +134,7 @@ export default class Danmuku {
return Danmuku.option.margin[0];
}
// 计算下空白边距
get marginBottom() {
const { clamp } = this.utils;
const value = this.option.margin[1];
@@ -131,39 +152,190 @@ export default class Danmuku {
return Danmuku.option.margin[1];
}
filter(state, callback) {
return this.queue.filter((danmu) => danmu.$state === state).map(callback);
// 加载弹幕
async load() {
const { errorHandle } = this.utils;
try {
if (typeof this.option.danmuku === 'function') {
this.danmus = await this.option.danmuku();
} else if (typeof this.option.danmuku.then === 'function') {
this.danmus = await this.option.danmuku;
} else if (typeof this.option.danmuku === 'string') {
this.danmus = await bilibiliDanmuParseFromUrl(this.option.danmuku);
} else {
this.danmus = this.option.danmuku;
}
errorHandle(Array.isArray(this.danmus), 'Danmuku need return an array as result');
this.queue = []; // 清空实际弹幕队列
this.$danmuku.innerText = ''; // 清空弹幕层
this.danmus.forEach((danmu) => this.emit(danmu)); // 逐个验证原始弹幕并转换为实际弹幕
this.art.emit('artplayerPluginDanmuku:loaded', this.queue);
// TODO: 按时间从小到大排序,用于减少弹幕的遍历次数,待优化...
// this.queue = this.queue.sort((a, b) => a.time - b.time);
} catch (error) {
this.art.emit('artplayerPluginDanmuku:error', error);
throw error;
}
return this;
}
// 把原始弹幕转换为实际弹幕
emit(danmu) {
const { clamp } = this.utils;
this.validator(danmu, {
text: 'string', // 弹幕文本
mode: '?number', // 弹幕模式: 0: 滚动,1: 顶部,2: 底部
color: '?string', // 弹幕颜色
time: '?number', // 弹幕时间
border: '?boolean', // 弹幕是否有边框
style: '?object', // 弹幕额外样式
escape: '?boolean', // 弹幕文本是否转义
});
// 弹幕文本为空则直接忽略
if (!danmu.text.trim()) return this;
// 弹幕模式只能是 0, 1, 2
if (![0, 1, 2].includes(danmu.mode)) return this;
// 自定义弹幕过滤函数
if (!this.option.filter(danmu)) return this;
// 设置弹幕时间,如果没有则默认为当前时间加 0.5 秒
if (danmu.time) {
danmu.time = clamp(danmu.time, 0, Infinity);
} else {
danmu.time = this.art.currentTime + 0.5;
}
// 设置弹幕模式,如果没有则默认为全局配置
if (danmu.mode === undefined) {
danmu.mode = this.option.mode;
}
// 设置弹幕单独样式,如果没有则默认为空对象
if (danmu.style === undefined) {
danmu.style = {};
}
// 设置弹幕弹幕是否转义,如果没有则默认为 true,即不会显示 HTML 标签
if (danmu.escape === undefined) {
danmu.escape = true;
}
// 设置弹幕颜色,如果没有则默认为全局配置
if (danmu.color === undefined) {
danmu.color = this.option.color;
}
// 添加到实际弹幕队列
this.queue.push({
...danmu,
$state: 'wait', // 弹幕状态
$ref: null, // 弹幕 DOM 节点
$restTime: 0, // 弹幕剩余时间
$lastStartTime: 0, // 弹幕上次开始时间
});
// 弹幕有四个状态:
// - wait: 弹幕还未开始显示,没有被添加到 DOM 中
// - ready: 弹幕准备好显示,没有被添加到 DOM 中
// - emit: 弹幕正在显示,已经被添加到 DOM 中
// - stop: 弹幕正在停止显示,已经被添加到 DOM 中
return this;
}
// 动态配置
config(option) {
const { clamp } = this.utils;
const { $controlsCenter } = this.art.template;
this.option = Object.assign({}, Danmuku.option, this.option, option);
this.validator(this.option, Danmuku.scheme);
this.option.mode = clamp(this.option.mode, 0, 2);
this.option.speed = clamp(this.option.speed, 1, 10);
this.option.opacity = clamp(this.option.opacity, 0, 1);
this.option.lockTime = clamp(this.option.lockTime, 1, 60);
this.option.maxLength = clamp(this.option.maxLength, 1, 1000);
this.option.mount = this.option.mount || $controlsCenter;
// 重新计算弹幕字体大小,需要重新渲染
if (option.fontSize) {
this.option.fontSize = this.getFontSize(this.option.fontSize);
this.reset();
}
// 通过配置项控制弹幕的显示和隐藏
if (this.option.visible) {
this.show();
} else {
this.hide();
}
this.art.emit('artplayerPluginDanmuku:config', this.option);
return this;
}
// 计算DOM的left值,受到旋屏影响
getLeft($ref) {
const rect = $ref.getBoundingClientRect();
return this.isRotate ? rect.top : rect.left;
}
// 获取弹幕DOM节点
getRef() {
const $refCache = this.$refs.pop();
if ($refCache) return $refCache;
const $ref = document.createElement('div');
$ref.style.cssText = `
user-select: none;
position: absolute;
white-space: pre;
pointer-events: none;
perspective: 500px;
display: inline-block;
will-change: transform;
font-weight: normal;
line-height: 1.125;
visibility: hidden;
font-family: SimHei, "Microsoft JhengHei", Arial, Helvetica, sans-serif;
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;
`;
const $ref = this.$refs.pop() || document.createElement('div');
$ref.style.cssText = Danmuku.cssText;
$ref.dataset.mode = '';
return $ref;
}
// 计算弹幕字体大小
getFontSize(fontSize) {
const { clamp } = this.utils;
const { clientHeight } = this.$player;
if (typeof fontSize === 'number') {
return clamp(fontSize, 12, clientHeight);
}
if (typeof fontSize === 'string' && fontSize.endsWith('%')) {
const ratio = parseFloat(fontSize) / 100;
return clamp(clientHeight * ratio, 12, clientHeight);
}
return Danmuku.option.fontSize;
}
// 计算弹幕的top值
postMessage(message = {}) {
return new Promise((resolve) => {
message.id = Date.now();
this.worker.postMessage(message);
this.worker.onmessage = (event) => {
const { data } = event;
if (data.id === message.id) {
resolve(data);
}
};
});
}
// 根据状态,获取弹幕队列中的弹幕
filter(state, callback) {
return this.queue.filter((danmu) => danmu.$state === state).map(callback);
}
// 获取准备好发送的弹幕:有的是ready状态(如之前因为弹幕太多而暂停发送的弹幕),有的是wait状态
getReady() {
const { currentTime } = this.art;
return this.queue.filter((danmu) => {
@@ -174,6 +346,7 @@ export default class Danmuku {
});
}
// 获取正在发送的弹幕,用于计算下一个弹幕的top值
getEmits() {
const result = [];
const { clientWidth } = this.$player;
@@ -205,107 +378,144 @@ export default class Danmuku {
return result;
}
getFontSize(fontSize) {
const { clamp } = this.utils;
const { clientHeight } = this.$player;
if (typeof fontSize === 'number') {
return clamp(fontSize, 12, clientHeight);
}
if (typeof fontSize === 'string' && fontSize.endsWith('%')) {
const ratio = parseFloat(fontSize) / 100;
return clamp(clientHeight * ratio, 12, clientHeight);
}
return Danmuku.option.fontSize;
}
postMessage(message = {}) {
return new Promise((resolve) => {
if (this.option.useWorker && this.worker && this.worker.postMessage) {
message.id = Date.now();
this.worker.postMessage(message);
this.worker.onmessage = (event) => {
const { data } = event;
if (data.id === message.id) {
resolve(data);
}
};
} else {
const top = getDanmuTop(message);
resolve({ top });
}
});
}
async load() {
try {
if (typeof this.option.danmuku === 'function') {
this.danmus = await this.option.danmuku();
} else if (typeof this.option.danmuku.then === 'function') {
this.danmus = await this.option.danmuku;
} else if (typeof this.option.danmuku === 'string') {
this.danmus = await bilibiliDanmuParseFromUrl(this.option.danmuku);
} else {
this.danmus = this.option.danmuku;
}
this.utils.errorHandle(Array.isArray(this.danmus), 'Danmuku need return an array as result');
this.art.emit('artplayerPluginDanmuku:loaded', this.danmus);
this.queue = [];
this.$danmuku.innerText = '';
this.danmus.forEach((danmu) => this.emit(danmu));
} catch (error) {
this.art.emit('artplayerPluginDanmuku:error', error);
throw error;
}
return this;
}
config(option) {
const { clamp } = this.utils;
this.option = Object.assign({}, Danmuku.option, this.option, option);
this.validator(this.option, Danmuku.scheme);
this.option.speed = clamp(this.option.speed, 1, 10);
this.option.opacity = clamp(this.option.opacity, 0, 1);
this.option.lockTime = clamp(Math.floor(this.option.lockTime), 0, 60);
this.option.maxLength = clamp(this.option.maxLength, 0, 500);
this.option.minWidth = clamp(this.option.minWidth, 0, 500);
this.option.maxWidth = clamp(this.option.maxWidth, 0, Infinity);
if (option.fontSize) {
this.option.fontSize = this.getFontSize(this.option.fontSize);
this.reset();
}
this.art.emit('artplayerPluginDanmuku:config', this.option);
return this;
}
// 重置弹幕到wait状态,回收弹幕DOM节点
makeWait(danmu) {
danmu.$state = 'wait';
if (danmu.$ref) {
danmu.$ref.style.visibility = 'hidden';
danmu.$ref.style.marginLeft = '0px';
danmu.$ref.style.transform = 'translateX(0px)';
danmu.$ref.style.transition = 'transform 0s linear 0s';
danmu.$ref.style.cssText = Danmuku.cssText;
this.$refs.push(danmu.$ref);
danmu.$ref = null;
}
}
// 实时更新弹幕
update() {
const { setStyles } = this.utils;
this.timer = window.requestAnimationFrame(async () => {
if (this.art.playing && !this.isHide) {
// 实时计算弹幕的剩余显示时间
this.filter('emit', (danmu) => {
const emitTime = (Date.now() - danmu.$lastStartTime) / 1000;
danmu.$restTime -= emitTime;
danmu.$lastStartTime = Date.now();
// 超过时间即重置弹幕
if (danmu.$restTime <= 0) {
this.makeWait(danmu);
}
});
// 获取准备好发送的弹幕,可能包含ready和wait状态的弹幕
const readys = this.getReady();
for (let index = 0; index < readys.length; index++) {
const danmu = readys[index];
// 弹幕发送前的过滤器
const state = await this.option.beforeVisible(danmu);
if (state) {
const { clientWidth, clientHeight } = this.$player;
danmu.$ref = this.getRef(); // 获取弹幕DOM节点
// 设置弹幕文本
if (danmu.escape) {
danmu.$ref.innerText = danmu.text;
} else {
danmu.$ref.innerHTML = danmu.text;
}
// 提前添加到弹幕层中,用于计算top值
this.$danmuku.appendChild(danmu.$ref);
// 设置初始弹幕样式
danmu.$ref.style.left = `${clientWidth}px`;
danmu.$ref.style.opacity = this.option.opacity;
danmu.$ref.style.fontSize = `${this.option.fontSize}px`;
danmu.$ref.style.color = danmu.color;
danmu.$ref.style.border = danmu.border ? `1px solid ${danmu.color}` : null;
danmu.$ref.style.backgroundColor = danmu.border ? 'rgb(0 0 0 / 50%)' : null;
danmu.$ref.style.marginLeft = '0px';
// 设置单独弹幕样式
setStyles(danmu.$ref, danmu.style);
// 记录弹幕时间戳
danmu.$lastStartTime = Date.now();
// 计算弹幕剩余时间
danmu.$restTime =
this.option.synchronousPlayback && this.art.playbackRate
? this.option.speed / Number(this.art.playbackRate)
: this.option.speed;
// 计算弹幕的top值
const { top } = await this.postMessage({
target: {
mode: danmu.mode,
height: danmu.$ref.clientHeight,
speed: (clientWidth + danmu.$ref.clientWidth) / danmu.$restTime,
}, // 当前弹幕信息
emits: this.getEmits(), // 正在发送的其它弹幕
antiOverlap: this.option.antiOverlap,
clientWidth: clientWidth,
clientHeight: clientHeight,
marginBottom: this.marginBottom,
marginTop: this.marginTop,
});
if (danmu.$ref) {
if (!this.isStop && top !== undefined) {
danmu.$state = 'emit'; // 转换为emit状态
danmu.$ref.style.visibility = 'visible';
danmu.$ref.dataset.mode = danmu.mode; // CSS控制模式的显示和隐藏
this.art.emit('artplayerPluginDanmuku:visible', danmu);
switch (danmu.mode) {
// 滚动的弹幕
case 0: {
danmu.$ref.style.top = `${top}px`;
const translateX = clientWidth + danmu.$ref.clientWidth;
danmu.$ref.style.transform = `translateX(${-translateX}px)`;
danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;
break;
}
case 1:
// falls through
case 2:
danmu.$ref.style.left = '50%';
danmu.$ref.style.top = `${top}px`;
danmu.$ref.style.marginLeft = `-${danmu.$ref.clientWidth / 2}px`;
break;
default:
break;
}
} else {
// 假如弹幕已经停止或者没有 top 值,则重置弹幕为ready状态,回收弹幕DOM节点,等待下次发送
danmu.$state = 'ready';
this.$refs.push(danmu.$ref);
danmu.$ref = null;
}
}
}
}
}
// 递归调用
if (!this.isStop) {
this.update();
}
});
return this;
}
// 继续弹幕
continue() {
const { clientWidth } = this.$player;
this.filter('stop', (danmu) => {
danmu.$state = 'emit';
danmu.$state = 'emit'; // 转换为emit状态
danmu.$lastStartTime = Date.now();
switch (danmu.mode) {
// 继续滚动的弹幕
case 0: {
const translateX = clientWidth + danmu.$ref.clientWidth;
danmu.$ref.style.transform = `translateX(${-translateX}px)`;
@@ -320,11 +530,13 @@ export default class Danmuku {
return this;
}
// 暂停弹幕
suspend() {
const { clientWidth } = this.$player;
this.filter('emit', (danmu) => {
danmu.$state = 'stop';
danmu.$state = 'stop'; // 转换为stop状态
switch (danmu.mode) {
// 停止滚动的弹幕
case 0: {
const translateX = clientWidth - (this.getLeft(danmu.$ref) - this.getLeft(this.$player));
danmu.$ref.style.transform = `translateX(${-translateX}px)`;
@@ -339,98 +551,6 @@ export default class Danmuku {
return this;
}
reset() {
this.queue.forEach((danmu) => this.makeWait(danmu));
return this;
}
update() {
this.timer = window.requestAnimationFrame(async () => {
if (this.art.playing && !this.isHide) {
this.filter('emit', (danmu) => {
const emitTime = (Date.now() - danmu.$lastStartTime) / 1000;
danmu.$restTime -= emitTime;
danmu.$lastStartTime = Date.now();
if (danmu.$restTime <= 0) {
this.makeWait(danmu);
}
});
const readys = this.getReady();
const { clientWidth, clientHeight } = this.$player;
for (let index = 0; index < readys.length; index++) {
const danmu = readys[index];
danmu.$ref = this.getRef();
danmu.$ref.innerText = danmu.text;
this.$danmuku.appendChild(danmu.$ref);
danmu.$ref.style.left = `${clientWidth}px`;
danmu.$ref.style.opacity = this.option.opacity;
danmu.$ref.style.fontSize = `${this.option.fontSize}px`;
danmu.$ref.style.color = danmu.color;
danmu.$ref.style.border = danmu.border ? `1px solid ${danmu.color}` : null;
danmu.$ref.style.backgroundColor = danmu.border ? 'rgb(0 0 0 / 50%)' : null;
danmu.$ref.style.marginLeft = '0px';
danmu.$lastStartTime = Date.now();
danmu.$restTime =
this.option.synchronousPlayback && this.art.playbackRate
? this.option.speed / Number(this.art.playbackRate)
: this.option.speed;
const target = {
mode: danmu.mode,
height: danmu.$ref.clientHeight,
speed: (clientWidth + danmu.$ref.clientWidth) / danmu.$restTime,
};
const { top } = await this.postMessage({
target,
emits: this.getEmits(),
antiOverlap: this.option.antiOverlap,
clientWidth: clientWidth,
clientHeight: clientHeight,
marginBottom: this.marginBottom,
marginTop: this.marginTop,
});
if (danmu.$ref) {
if (!this.isStop && top !== undefined) {
danmu.$state = 'emit';
danmu.$ref.style.visibility = 'visible';
switch (danmu.mode) {
case 0: {
danmu.$ref.style.top = `${top}px`;
const translateX = clientWidth + danmu.$ref.clientWidth;
danmu.$ref.style.transform = `translateX(${-translateX}px)`;
danmu.$ref.style.transition = `transform ${danmu.$restTime}s linear 0s`;
break;
}
case 1:
danmu.$ref.style.left = '50%';
danmu.$ref.style.top = `${top}px`;
danmu.$ref.style.marginLeft = `-${danmu.$ref.clientWidth / 2}px`;
break;
default:
break;
}
} else {
danmu.$state = 'ready';
this.$refs.push(danmu.$ref);
danmu.$ref = null;
}
}
}
}
if (!this.isStop) {
this.update();
}
});
return this;
}
stop() {
this.isStop = true;
this.suspend();
@@ -447,10 +567,15 @@ export default class Danmuku {
return this;
}
reset() {
this.queue.forEach((danmu) => this.makeWait(danmu));
return this;
}
show() {
this.isHide = false;
this.start();
this.$danmuku.style.display = 'block';
this.$danmuku.style.display = '';
this.art.emit('artplayerPluginDanmuku:show');
return this;
}
@@ -464,46 +589,9 @@ export default class Danmuku {
return this;
}
emit(danmu) {
this.validator(danmu, {
text: 'string',
mode: 'number|undefined',
color: 'string|undefined',
time: 'number|undefined',
border: 'boolean|undefined',
});
if (!danmu.text.trim()) return this;
if (!this.option.filter(danmu)) return this;
if (danmu.time) {
danmu.time = this.utils.clamp(danmu.time, 0, Infinity);
} else {
danmu.time = this.art.currentTime + 0.5;
}
if (danmu.mode === undefined) {
danmu.mode = this.option.mode;
}
if (danmu.color === undefined) {
danmu.color = this.option.color;
}
this.queue.push({
...danmu,
$state: 'wait',
$ref: null,
$restTime: 0,
$lastStartTime: 0,
});
return this;
}
destroy() {
this.stop();
if (this.worker && this.worker.terminate) this.worker.terminate();
this.worker.terminate();
this.art.off('video:play', this.start);
this.art.off('video:playing', this.start);
this.art.off('video:pause', this.stop);
@@ -1,105 +0,0 @@
export default function getDanmuTop({
target,
emits,
clientWidth,
clientHeight,
marginBottom,
marginTop,
antiOverlap,
}) {
const danmus = emits
.filter((item) => item.mode === target.mode && item.top <= clientHeight - marginBottom)
.sort((prev, next) => prev.top - next.top);
if (danmus.length === 0) {
return marginTop;
}
danmus.unshift({
top: 0,
left: 0,
right: 0,
height: marginTop,
width: clientWidth,
speed: 0,
distance: clientWidth,
});
danmus.push({
top: clientHeight - marginBottom,
left: 0,
right: 0,
height: marginBottom,
width: clientWidth,
speed: 0,
distance: clientWidth,
});
for (let index = 1; index < danmus.length; index += 1) {
const item = danmus[index];
const prev = danmus[index - 1];
const prevBottom = prev.top + prev.height;
const diff = item.top - prevBottom;
if (diff >= target.height) {
return prevBottom;
}
}
const topMap = [];
for (let index = 1; index < danmus.length - 1; index += 1) {
const item = danmus[index];
if (topMap.length) {
const last = topMap[topMap.length - 1];
if (last[0].top === item.top) {
last.push(item);
} else {
topMap.push([item]);
}
} else {
topMap.push([item]);
}
}
if (antiOverlap) {
switch (target.mode) {
case 0: {
const result = topMap.find((list) => {
return list.every((danmu) => {
if (clientWidth < danmu.distance) return false;
if (target.speed < danmu.speed) return true;
const overlapTime = danmu.right / (target.speed - danmu.speed);
if (overlapTime > danmu.time) return true;
return false;
});
});
return result && result[0] ? result[0].top : undefined;
}
case 1:
return undefined;
default:
break;
}
} else {
switch (target.mode) {
case 0:
topMap.sort((prev, next) => {
const nextMinRight = Math.min(...next.map((item) => item.right));
const prevMinRight = Math.min(...prev.map((item) => item.right));
return nextMinRight * next.length - prevMinRight * prev.length;
});
break;
case 1:
topMap.sort((prev, next) => {
const nextMaxWidth = Math.max(...next.map((item) => item.width));
const prevMaxWidth = Math.max(...prev.map((item) => item.width));
return prevMaxWidth * prev.length - nextMaxWidth * next.length;
});
break;
default:
break;
}
return topMap[0][0].top;
}
}
+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-check-off" xmlns:xlink="http://www.w3.org/1999/xlink" 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="#FFFFFF"></path></svg>

After

Width:  |  Height:  |  Size: 378 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-check-on" xmlns:xlink="http://www.w3.org/1999/xlink" 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"></path></svg>

After

Width:  |  Height:  |  Size: 474 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-config-icon" xmlns:xlink="http://www.w3.org/1999/xlink" 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.363c1.903.094 3.317.141 5.513.141a.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.09-.002.056-.004.112-.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-.305c-.228-.501-.5-.959-.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"></path></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -1,4 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" width="22" height="22">
<path d="M16.5 8c1.289 0 2.49.375 3.5 1.022V6a2 2 0 00-2-2H4a2 2 0 00-2 2v10a2 2 0 002 2h7.022A6.5 6.5 0 0116.5 8zM7 13H5a1 1 0 010-2h2a1 1 0 010 2zm2-4H5a1 1 0 010-2h4a1 1 0 010 2z"></path>
<path d="M20.587 13.696l-.787-.131a3.503 3.503 0 00-.593-1.051l.301-.804a.46.46 0 00-.21-.56l-1.005-.581a.52.52 0 00-.656.113l-.499.607a3.53 3.53 0 00-1.276 0l-.499-.607a.52.52 0 00-.656-.113l-1.005.581a.46.46 0 00-.21.56l.301.804c-.254.31-.456.665-.593 1.051l-.787.131a.48.48 0 00-.413.465v1.209a.48.48 0 00.413.465l.811.135c.144.382.353.733.614 1.038l-.292.78a.46.46 0 00.21.56l1.005.581a.52.52 0 00.656-.113l.515-.626a3.549 3.549 0 001.136 0l.515.626a.52.52 0 00.656.113l1.005-.581a.46.46 0 00.21-.56l-.292-.78c.261-.305.47-.656.614-1.038l.811-.135A.48.48 0 0021 15.37v-1.209a.48.48 0 00-.413-.465zM16.5 16.057a1.29 1.29 0 11.002-2.582 1.29 1.29 0 01-.002 2.582z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 964 B

@@ -1,6 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="0 0 1152 1024" width="22" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path fill="#fff" d="M311.296 661.504c0 4.096-4.096 8.704-8.704 12.8 0 4.096 0 4.096-4.096 8.704h-12.8c-4.096 0-8.704-4.096-16.896-8.704-8.704-8.704-16.896-8.704-25.6-8.704s-12.8 4.096-16.896 12.8c-4.096 12.8-8.704 21.504-4.096 29.696 4.096 8.704 12.8 16.896 25.6 21.504 16.896 8.704 34.304 16.896 47.104 16.896 12.8 0 21.504-4.096 34.304-8.704 8.704-4.096 16.896-16.896 25.6-29.696 8.704-12.8 12.8-34.304 16.896-55.296 4.096-21.504 4.096-51.2 4.096-85.504 0-12.8 0-21.504-4.096-29.696 0-8.704-4.096-12.8-8.704-16.896-4.096-4.096-8.704-8.704-12.8-8.704s-12.8-4.096-21.504-4.096H272.896s-4.096-4.096 0-8.704l4.096-38.4c0-4.096 0-8.704 4.096-8.704h47.104c16.896 0 25.6-4.096 34.304-12.8 8.704-8.704 12.8-21.504 12.8-42.496V324.096c0-16.896-4.096-34.304-8.704-42.496-12.8-12.8-25.6-16.896-42.496-16.896H243.2c-8.704 0-16.896 0-21.504 4.096-4.096 8.704-4.096 12.8-4.096 25.6 0 8.704 0 16.896 4.096 21.504 4.096 4.096 12.8 8.704 21.504 8.704H307.2c4.096 0 8.704 0 8.704 4.096v34.304c0 8.704 0 12.8-4.096 12.8 0 0-4.096 4.096-8.704 4.096h-34.304c-8.704 0-12.8 0-21.504 4.096-4.096 0-8.704 4.096-8.704 4.096-4.096 4.096-8.704 12.8-8.704 16.896 0 8.704-4.096 16.896-4.096 25.6l-8.704 72.704v29.696c0 8.704 4.096 12.8 8.704 16.896s8.704 4.096 16.896 8.704h68.096c4.096 0 8.704 0 8.704 4.096s4.096 8.704 4.096 16.896c0 21.504 0 42.496-4.096 55.296 0.512 9.216-3.584 22.016-8.192 26.624zM896 486.4c-93.696 0-175.104 51.2-217.6 123.904h-106.496v-34.304H640c21.504 0 34.304-4.096 42.496-12.8 8.704-8.704 12.8-21.504 12.8-42.496V358.4c0-21.504-4.096-34.304-12.8-42.496-8.704-8.704-21.504-12.8-42.496-12.8 0-4.096 4.096-4.096 4.096-8.704-4.096 0-4.096-4.096-4.096-4.096 4.096-12.8 8.704-21.504 4.096-25.6 0-8.704-4.096-12.8-12.8-21.504-8.704-4.096-16.896-4.096-21.504-4.096-8.704 4.096-12.8 8.704-21.504 21.504-4.096 8.704-8.704 12.8-12.8 21.504-4.096 8.704-8.704 12.8-12.8 21.504h-51.2c-4.096-8.704-8.704-16.896-8.704-21.504-4.096-8.704-8.704-12.8-12.8-21.504-4.096-12.8-12.8-16.896-21.504-16.896s-16.896 0-25.6 8.704C434.176 261.12 430.08 265.216 430.08 273.92c0 8.704 0 16.896 8.704 25.6l4.096 4.096 4.096 4.096c-16.896 0-29.696 4.096-38.4 12.8-8.704 4.096-12.8 21.504-12.8 38.4v157.696c0 21.504 4.096 34.304 12.8 42.496 8.704 8.704 21.504 12.8 42.496 12.8H512v34.304H413.696c-12.8 0-21.504 0-25.6 4.096-4.096 4.096-8.704 8.704-8.704 21.504v16.896c0 4.096 4.096 8.704 4.096 8.704 4.096 0 4.096 4.096 8.704 4.096H512V716.8c0 12.8 4.096 21.504 8.704 25.6 4.096 4.096 12.8 8.704 21.504 8.704 12.8 0 21.504-4.096 25.6-8.704 4.096-4.096 4.096-12.8 4.096-25.6v-55.296h80.896c-8.704 25.6-12.8 51.2-12.8 76.8 0 140.8 115.2 256 256 256s256-115.2 256-256S1036.8 486.4 896 486.4z m-328.704-128h55.296c4.096 0 4.096 0 4.096 4.096V409.6h-59.904V358.4z m0 102.4h59.904v51.2h-55.296V460.8h-4.608zM512 516.096H456.704v-51.2H512v51.2z m0-102.4H452.096v-51.2H512v51.2z m384 499.2c-93.696 0-170.496-76.8-170.496-170.496s76.8-170.496 170.496-170.496 170.496 76.8 170.496 170.496-76.8 170.496-170.496 170.496z" />
<path fill="#fff" d="M580.096 879.104H213.504c-72.704 0-128-55.296-128-119.296V230.4c0-64 55.296-119.296 128-119.296h512c72.704 0 128 55.296 128 119.296v140.8c0 25.6 16.896 42.496 42.496 42.496s42.496-16.896 42.496-42.496V230.4c0-115.2-93.696-204.8-213.504-204.8h-512C93.696 25.6 0 119.296 0 230.4v528.896c0 115.2 93.696 204.8 213.504 204.8h367.104c25.6 0 42.496-16.896 42.496-42.496 0-25.6-21.504-42.496-43.008-42.496z m171.52 10.752c-15.36-15.36-15.36-40.96 0-56.32l237.568-237.568c15.36-15.36 40.96-15.36 56.32 0s15.36 40.96 0 56.32l-237.568 237.568c-15.36 15.36-40.448 15.36-56.32 0z" />
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

@@ -1,6 +0,0 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg viewBox="0 0 1152 1024" width="22" height="22" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path fill="#fff" d="M311.466667 661.333333c0 4.266667-4.266667 8.533333-8.533334 12.8 0 4.266667 0 4.266667-4.266666 8.533334h-12.8c-4.266667 0-8.533333-4.266667-17.066667-8.533334-8.533333-8.533333-17.066667-8.533333-25.6-8.533333-8.533333 0-12.8 4.266667-17.066667 12.8-4.266667 12.8-8.533333 21.333333-4.266666 29.866667 4.266667 8.533333 12.8 17.066667 25.6 21.333333 17.066667 8.533333 34.133333 17.066667 46.933333 17.066667 12.8 0 21.333333-4.266667 34.133333-8.533334 8.533333-4.266667 17.066667-17.066667 25.6-29.866666 8.533333-12.8 12.8-34.133333 17.066667-55.466667 4.266667-21.333333 4.266667-51.2 4.266667-85.333333 0-12.8 0-21.333333-4.266667-29.866667 0-8.533333-4.266667-12.8-8.533333-17.066667-4.266667-4.266667-8.533333-8.533333-12.8-8.533333-4.266667 0-12.8-4.266667-21.333334-4.266667H273.066667s-4.266667-4.266667 0-8.533333l4.266666-38.4c0-4.266667 0-8.533333 4.266667-8.533333h46.933333c17.066667 0 25.6-4.266667 34.133334-12.8 8.533333-8.533333 12.8-21.333333 12.8-42.666667V324.266667c0-17.066667-4.266667-34.133333-8.533334-42.666667-12.8-12.8-25.6-17.066667-42.666666-17.066667H243.2c-8.533333 0-17.066667 0-21.333333 4.266667-4.266667 8.533333-4.266667 12.8-4.266667 25.6 0 8.533333 0 17.066667 4.266667 21.333333 4.266667 4.266667 12.8 8.533333 21.333333 8.533334h64c4.266667 0 8.533333 0 8.533333 4.266666v34.133334c0 8.533333 0 12.8-4.266666 12.8 0 0-4.266667 4.266667-8.533334 4.266666h-34.133333c-8.533333 0-12.8 0-21.333333 4.266667-4.266667 0-8.533333 4.266667-8.533334 4.266667-4.266667 4.266667-8.533333 12.8-8.533333 17.066666 0 8.533333-4.266667 17.066667-4.266667 25.6l-8.533333 72.533334v29.866666c0 8.533333 4.266667 12.8 8.533333 17.066667 4.266667 4.266667 8.533333 4.266667 17.066667 8.533333h68.266667c4.266667 0 8.533333 0 8.533333 4.266667s4.266667 8.533333 4.266667 17.066667c0 21.333333 0 42.666667-4.266667 55.466666 0 8.533333-4.266667 21.333333-8.533333 25.6zM896 486.4c-93.866667 0-174.933333 51.2-217.6 123.733333h-106.666667v-34.133333H640c21.333333 0 34.133333-4.266667 42.666667-12.8 8.533333-8.533333 12.8-21.333333 12.8-42.666667V358.4c0-21.333333-4.266667-34.133333-12.8-42.666667-8.533333-8.533333-21.333333-12.8-42.666667-12.8 0-4.266667 4.266667-4.266667 4.266667-8.533333-4.266667 0-4.266667-4.266667-4.266667-4.266667 4.266667-12.8 8.533333-21.333333 4.266667-25.6 0-8.533333-4.266667-12.8-12.8-21.333333-8.533333-4.266667-17.066667-4.266667-21.333334-4.266667-8.533333 4.266667-12.8 8.533333-21.333333 21.333334-4.266667 8.533333-8.533333 12.8-12.8 21.333333-4.266667 8.533333-8.533333 12.8-12.8 21.333333H512c-4.266667-8.533333-8.533333-17.066667-8.533333-21.333333-4.266667-8.533333-8.533333-12.8-12.8-21.333333-4.266667-12.8-12.8-17.066667-21.333334-17.066667s-17.066667 0-25.6 8.533333c-8.533333 8.533333-12.8 12.8-12.8 21.333334s0 17.066667 8.533334 25.6l4.266666 4.266666 4.266667 4.266667c-17.066667 0-29.866667 4.266667-38.4 12.8-8.533333 4.266667-12.8 21.333333-12.8 38.4v157.866667c0 21.333333 4.266667 34.133333 12.8 42.666666 8.533333 8.533333 21.333333 12.8 42.666667 12.8H512v34.133334H413.866667c-12.8 0-21.333333 0-25.6 4.266666-4.266667 4.266667-8.533333 8.533333-8.533334 21.333334v17.066666c0 4.266667 4.266667 8.533333 4.266667 8.533334 4.266667 0 4.266667 4.266667 8.533333 4.266666H512v55.466667c0 12.8 4.266667 21.333333 8.533333 25.6 4.266667 4.266667 12.8 8.533333 21.333334 8.533333 12.8 0 21.333333-4.266667 25.6-8.533333 4.266667-4.266667 4.266667-12.8 4.266666-25.6v-55.466667h81.066667c-8.533333 25.6-12.8 51.2-12.8 76.8 0 140.8 115.2 256 256 256s256-115.2 256-256-115.2-251.733333-256-251.733333z m-328.533333-128h55.466666c4.266667 0 4.266667 0 4.266667 4.266667v46.933333h-59.733333V358.4z m0 102.4h59.733333V512h-55.466667v-51.2zM512 516.266667h-55.466667V465.066667H512v51.2z m0-102.4h-59.733333V366.933333v-4.266666H512v51.2z m384 499.2c-93.866667 0-170.666667-76.8-170.666667-170.666667s76.8-170.666667 170.666667-170.666667 170.666667 76.8 170.666667 170.666667-76.8 170.666667-170.666667 170.666667z" />
<path fill="#fff" d="M951.466667 669.866667l-72.533334 72.533333-29.866666-25.6c-17.066667-17.066667-42.666667-12.8-59.733334 4.266667-17.066667 17.066667-12.8 42.666667 4.266667 59.733333l59.733333 51.2c8.533333 8.533333 17.066667 8.533333 29.866667 8.533333 12.8 0 21.333333-4.266667 29.866667-12.8l102.4-102.4c17.066667-17.066667 17.066667-42.666667 0-59.733333-21.333333-12.8-46.933333-12.8-64 4.266667zM580.266667 878.933333H213.333333c-72.533333 0-128-55.466667-128-119.466666V230.4c0-64 55.466667-119.466667 128-119.466667h512c72.533333 0 128 55.466667 128 119.466667v140.8c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667V230.4c0-115.2-93.866667-204.8-213.333334-204.8H213.333333C93.866667 25.6 0 119.466667 0 230.4v529.066667c0 115.2 93.866667 204.8 213.333333 204.8h366.933334c25.6 0 42.666667-17.066667 42.666666-42.666667s-21.333333-42.666667-42.666666-42.666667z" />
</svg>

Before

Width:  |  Height:  |  Size: 5.1 KiB

@@ -1,3 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22" width="24" 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.98L12.87 11H9.13L11 5.98z"></path>
</svg>

Before

Width:  |  Height:  |  Size: 380 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-mode-0-off" xmlns:xlink="http://www.w3.org/1999/xlink" 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><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"></path></svg>

After

Width:  |  Height:  |  Size: 733 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-mode-0-on" xmlns:xlink="http://www.w3.org/1999/xlink" 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="#FFFFFF"></path></svg>

After

Width:  |  Height:  |  Size: 457 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-mode-1-off" xmlns:xlink="http://www.w3.org/1999/xlink" 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><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"></path></svg>

After

Width:  |  Height:  |  Size: 669 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-mode-1-on" xmlns:xlink="http://www.w3.org/1999/xlink" 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="#FFFFFF"></path></svg>

After

Width:  |  Height:  |  Size: 406 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-mode-2-off" xmlns:xlink="http://www.w3.org/1999/xlink" 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><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"></path></svg>

After

Width:  |  Height:  |  Size: 643 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-mode-2-on" xmlns:xlink="http://www.w3.org/1999/xlink" 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="#FFFFFF"></path></svg>

After

Width:  |  Height:  |  Size: 411 B

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-toggle-off" xmlns:xlink="http://www.w3.org/1999/xlink" 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.813-2.444-.087-4.466-.13-6.064-.131-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.975c-2.196 0-3.61-.047-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"></path></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-toggle-on" xmlns:xlink="http://www.w3.org/1999/xlink" 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><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.005c.407.315 1 .27 1.354-.124l5.81-6.505.08-.102.005-.008a1 1 0 0 0-.166-1.295Z" clip-rule="evenodd"></path></svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

+1
View File
@@ -0,0 +1 @@
<svg class="apd-icon apd-style-icon" xmlns:xlink="http://www.w3.org/1999/xlink" 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"></path></svg>

After

Width:  |  Height:  |  Size: 532 B

+9 -16
View File
@@ -1,26 +1,16 @@
import Danmuku from './danmuku';
import setting from './setting';
import Setting from './setting';
import heatmap from './heatmap';
function checkVersion(art) {
const {
version,
utils: { errorHandle },
} = art.constructor;
const arr = version.split('.').map(Number);
const major = arr[0];
const minor = arr[1] / 100;
errorHandle(major + minor >= 5, `Artplayer.js@${version} 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上`);
}
export default function artplayerPluginDanmuku(option) {
return (art) => {
checkVersion(art);
const danmuku = new Danmuku(art, option);
setting(art, danmuku);
if (option.heatmap) {
heatmap(art, danmuku, option.heatmap);
const setting = new Setting(art, danmuku);
if (danmuku.option.heatmap) {
heatmap(art, danmuku, danmuku.option.heatmap);
}
return {
name: 'artplayerPluginDanmuku',
emit: danmuku.emit.bind(danmuku),
@@ -29,6 +19,7 @@ export default function artplayerPluginDanmuku(option) {
hide: danmuku.hide.bind(danmuku),
show: danmuku.show.bind(danmuku),
reset: danmuku.reset.bind(danmuku),
mount: setting.mount.bind(setting),
get option() {
return danmuku.option;
},
@@ -42,6 +33,8 @@ export default function artplayerPluginDanmuku(option) {
};
}
artplayerPluginDanmuku.icons = Setting.icons;
if (typeof window !== 'undefined') {
window['artplayerPluginDanmuku'] = artplayerPluginDanmuku;
}
+577 -348
View File
@@ -1,401 +1,630 @@
import style from 'bundle-text:./style.less';
import danmuOn from 'bundle-text:./img/danmu-on.svg';
import danmuOff from 'bundle-text:./img/danmu-off.svg';
import danmuConfig from 'bundle-text:./img/danmu-config.svg';
import danmuStyle from 'bundle-text:./img/danmu-style.svg';
import $on from 'bundle-text:./img/on.svg';
import $off from 'bundle-text:./img/off.svg';
import $config from 'bundle-text:./img/config.svg';
import $style from 'bundle-text:./img/style.svg';
import $mode_0_off from 'bundle-text:./img/mode_0_off.svg';
import $mode_0_on from 'bundle-text:./img/mode_0_on.svg';
import $mode_1_off from 'bundle-text:./img/mode_1_off.svg';
import $mode_1_on from 'bundle-text:./img/mode_1_on.svg';
import $mode_2_off from 'bundle-text:./img/mode_2_off.svg';
import $mode_2_on from 'bundle-text:./img/mode_2_on.svg';
import $check_on from 'bundle-text:./img/check_on.svg';
import $check_off from 'bundle-text:./img/check_off.svg';
export default function setting(art, danmuku) {
const { option } = danmuku;
const {
template: { $controlsCenter, $player },
constructor: {
SETTING_ITEM_WIDTH,
utils: { removeClass, addClass, append, setStyle, tooltip, query, inverseClass, getIcon },
},
} = art;
export default class Setting {
constructor(art, danmuku) {
this.art = art;
this.danmuku = danmuku;
this.utils = art.constructor.utils;
setStyle($controlsCenter, 'display', 'flex');
const { setStyle } = this.utils;
const { $controlsCenter } = art.template;
setStyle($controlsCenter, 'display', 'flex');
const $danmuOn = getIcon('danmu-on', danmuOn);
const $danmuOff = getIcon('danmu-off', danmuOff);
const $danmuConfig = getIcon('danmu-config', danmuConfig);
const $danmuStyle = getIcon('danmu-style', danmuStyle);
function addEmitter() {
const colors = [
'#FE0302',
'#FF7204',
'#FFAA02',
'#FFD302',
'#FFFF00',
'#A0EE00',
'#00CD00',
'#019899',
'#4266BE',
'#89D5FF',
'#CC0273',
'#222222',
'#9B9B9B',
'#FFFFFF',
].map((item) => {
const isCurrent = option.color === item ? ' art-current' : '';
return `<div class="art-danmuku-style-panel-color${isCurrent}" data-color="${item}" style="background-color:${item}"></div>`;
});
const $emitter = append(
this.template = {
$controlsCenter,
`
<div class="art-danmuku-emitter" style="max-width: ${option.maxWidth ? `${option.maxWidth}px` : '100%'}">
<div class="art-danmuku-left">
<div class="art-danmuku-style">
<div class="art-danmuku-style-panel">
<div class="art-danmuku-style-panel-inner">
<div class="art-danmuku-style-panel-title">模式</div>
<div class="art-danmuku-style-panel-modes">
<div class="art-danmuku-style-panel-mode art-current" data-mode="0">滚动</div>
<div class="art-danmuku-style-panel-mode" data-mode="1">静止</div>
$mount: $controlsCenter,
$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 = false;
this.isLock = false;
this.timer = null;
this.createTemplate();
this.createSliders();
this.createEvents();
this.mount(this.option.mount);
art.on('fullscreen', (state) => this.onFullscreen(state));
art.on('fullscreenWeb', (state) => this.onFullscreen(state));
}
static icons = {
$on,
$off,
$config,
$style,
$mode_0_off,
$mode_0_on,
$mode_1_off,
$mode_1_on,
$mode_2_off,
$mode_2_on,
$check_on,
$check_off,
};
get option() {
return this.danmuku.option;
}
get outside() {
return this.template.$mount !== this.template.$controlsCenter;
}
get TEMPLATE() {
const { option } = this;
return `
<div class="apd-toggle">
${$on}${$off}
</div>
<div class="apd-config">
${$config}
<div class="apd-config-panel">
<div class="apd-config-panel-inner">
<div class="apd-config-mode">
按类型屏蔽
<div class="apd-modes">
<div data-mode="0" class="apd-mode">
${$mode_0_off}${$mode_0_on}
<div>滚动</div>
</div>
<div class="art-danmuku-style-panel-title">颜色</div>
<div class="art-danmuku-style-panel-colors">
${colors.join('')}
<div data-mode="1" class="apd-mode">
${$mode_1_off}${$mode_1_on}
<div>顶部</div>
</div>
<div data-mode="2" class="apd-mode">
${$mode_2_off}${$mode_2_on}
<div>底部</div>
</div>
</div>
</div>
<div class="apd-config-other">
<div class="apd-other apd-anti-overlap">
${$check_on}${$check_off}
防止弹幕重叠
</div>
<div class="apd-other apd-sync-video">
${$check_on}${$check_off}
同步视频速度
</div>
</div>
<div class="apd-config-slider apd-config-opacity">
不透明度
<div class="apd-slider"></div>
<div class="apd-value"></div>
</div>
<div class="apd-config-slider apd-config-margin">
显示区域
<div class="apd-slider"></div>
<div class="apd-value"></div>
</div>
<div class="apd-config-slider apd-config-fontSize">
弹幕字号
<div class="apd-slider"></div>
<div class="apd-value"></div>
</div>
<div class="apd-config-slider apd-config-speed">
弹幕速度
<div class="apd-slider"></div>
<div class="apd-value"></div>
</div>
</div>
</div>
</div>
<div class="apd-emitter">
<div class="apd-style">
${$style}
<div class="apd-style-panel">
<div class="apd-style-panel-inner">
<div class="apd-style-mode">
模式
<div class="apd-modes">
<div data-mode="0" class="apd-mode">
${$mode_0_on}
<div>滚动</div>
</div>
<div data-mode="1" class="apd-mode">
${$mode_1_on}
<div>顶部</div>
</div>
<div data-mode="2" class="apd-mode">
${$mode_2_on}
<div>底部</div>
</div>
</div>
</div>
<div class="apd-style-color">
颜色
<div class="apd-colors">
${this.COLOR.map((color) => `<div data-color="${color}" class="apd-color" style="background-color: ${color}"></div>`).join('')}
</div>
</div>
</div>
</div>
<input class="art-danmuku-input" maxlength="${option.maxLength}" placeholder="发个弹幕见证当下" />
</div>
<div class="art-danmuku-send">发送</div>
<input class="apd-input" placeholder="发个友善的弹幕见证当下" autocomplete="off" maxLength="${option.maxLength}" />
<div class="apd-send">发送</div>
</div>
`,
`;
}
get MARGIN() {
return (
this.option.MARGIN || [
{
name: '1/4',
value: [10, '75%'],
},
{
name: '半屏',
value: [10, '50%'],
},
{
name: '3/4',
value: [10, '25%'],
},
{
name: '满屏',
value: [10, 10],
},
]
);
}
const $style = query('.art-danmuku-style', $emitter);
const $input = query('.art-danmuku-input', $emitter);
const $send = query('.art-danmuku-send', $emitter);
const $panel = query('.art-danmuku-style-panel-inner', $emitter);
const $modes = query('.art-danmuku-style-panel-modes', $emitter);
const $colors = query('.art-danmuku-style-panel-colors', $emitter);
const $layer = option.mount || append($player, '<div class="art-layer-danmuku-emitter"></div>');
get SPEED() {
return (
this.option.SPEED || [
{
name: '极慢',
value: 10,
},
{
name: '较慢',
value: 7.5,
hide: true,
},
{
name: '适中',
value: 5,
},
{
name: '较快',
value: 2.5,
hide: true,
},
{
name: '极快',
value: 1,
},
]
);
}
if (art.option.backdrop) {
addClass($panel, 'art-backdrop-filter');
get COLOR() {
return (
this.option.COLOR || [
'#FE0302',
'#FF7204',
'#FFAA02',
'#FFD302',
'#FFFF00',
'#A0EE00',
'#00CD00',
'#019899',
'#4266BE',
'#89D5FF',
'#CC0273',
'#222222',
'#9B9B9B',
'#FFFFFF',
]
);
}
query(selector) {
const { query } = this.utils;
const { $danmuku } = this.template;
return query(selector, $danmuku);
}
setData(key, value) {
const { $player } = this.art.template;
const { $mount } = this.template;
$player.dataset[key] = value;
if (this.outside) {
$mount.dataset[key] = value;
}
}
if (option.theme) {
addClass($emitter, `art-danmuku-theme-${option.theme}`);
}
createTemplate() {
const { createElement, tooltip } = this.utils;
let timer = null;
let mode = option.mode;
let color = option.color;
append($style, $danmuStyle);
const $danmuku = createElement('div');
$danmuku.className = 'artplayer-plugin-danmuku';
$danmuku.innerHTML = this.TEMPLATE;
this.template.$danmuku = $danmuku;
function countdown(time) {
if (time <= 0) {
timer = null;
$send.innerText = '发送';
removeClass($send, 'art-disabled');
this.template.$toggle = this.query('.apd-toggle');
tooltip(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');
}
createEvents() {
const { $toggle, $configModes, $styleModes, $colors, $antiOverlap, $syncVideo, $send, $input } = this.template;
this.art.proxy($toggle, 'click', () => {
this.danmuku.config({
visible: !this.option.visible,
});
this.reset();
});
this.art.proxy($configModes, 'click', (event) => {
const $mode = event.target.closest('.apd-mode');
if (!$mode) return;
const mode = Number($mode.dataset.mode);
if (this.option.modes.includes(mode)) {
this.danmuku.config({
modes: this.option.modes.filter((m) => m !== mode),
});
} else {
$send.innerText = time;
timer = setTimeout(() => countdown(time - 1), 1000);
this.danmuku.config({
modes: [...this.option.modes, mode],
});
}
}
this.reset();
});
function onSend() {
const danmu = {
mode,
color,
border: true,
text: $input.value.trim(),
};
this.art.proxy($antiOverlap, 'click', () => {
this.danmuku.config({
antiOverlap: !this.option.antiOverlap,
});
this.reset();
});
if (timer === null && option.beforeEmit(danmu)) {
$input.value = '';
danmuku.emit(danmu);
addClass($send, 'art-disabled');
countdown(option.lockTime);
art.emit('artplayerPluginDanmuku:emit', danmu);
}
}
this.art.proxy($syncVideo, 'click', () => {
this.danmuku.config({
synchronousPlayback: !this.option.synchronousPlayback,
});
this.reset();
});
function onResize() {
if ($controlsCenter.clientWidth < option.minWidth) {
append($layer, $emitter);
setStyle($layer, 'display', 'flex');
addClass($emitter, 'art-danmuku-mount');
this.art.proxy($styleModes, 'click', (event) => {
const $mode = event.target.closest('.apd-mode');
if (!$mode) return;
const mode = Number($mode.dataset.mode);
this.danmuku.config({
mode: mode,
});
this.reset();
});
if (!option.mount) {
setStyle($player, 'marginBottom', '40px');
}
} else {
append($controlsCenter, $emitter);
setStyle($layer, 'display', 'none');
removeClass($emitter, 'art-danmuku-mount');
this.art.proxy($colors, 'click', (event) => {
const $color = event.target.closest('.apd-color');
if (!$color) return;
this.danmuku.config({
color: $color.dataset.color,
});
this.reset();
});
if (!option.mount) {
setStyle($player, 'marginBottom', null);
}
}
}
this.art.proxy($send, 'click', () => this.emit());
art.proxy($send, 'click', onSend);
art.proxy($input, 'keypress', (event) => {
this.art.proxy($input, 'keypress', (event) => {
if (event.key === 'Enter') {
event.preventDefault();
onSend();
}
});
art.proxy($modes, 'click', (event) => {
const { dataset } = event.target;
if (dataset.mode) {
mode = Number(dataset.mode);
inverseClass(event.target, 'art-current');
}
});
art.proxy($colors, 'click', (event) => {
const { dataset } = event.target;
if (dataset.color) {
color = dataset.color;
inverseClass(event.target, 'art-current');
}
});
onResize();
art.on('resize', () => {
if (!art.isInput) {
onResize();
}
});
art.on('destroy', () => {
if (option.mount && $emitter.parentElement === option.mount) {
option.mount.removeChild($emitter);
this.emit();
}
});
}
function addControl() {
art.controls.add({
position: 'right',
name: 'danmuku',
click: function () {
if (danmuku.isHide) {
danmuku.show();
art.notice.show = '弹幕显示';
setStyle($danmuOn, 'display', null);
setStyle($danmuOff, 'display', 'none');
createSliders() {
this.slider.opacity = this.createSlider({
min: 0,
max: 100,
steps: [],
container: this.template.$opacitySlider,
findIndex: () => {
return Math.round(this.option.opacity * 100) || 100;
},
onChange: (index) => {
const { $opacityValue } = this.template;
$opacityValue.textContent = `${index}%`;
this.danmuku.config({
opacity: index / 100,
});
},
});
this.slider.margin = this.createSlider({
min: 0,
max: 3,
steps: this.MARGIN,
container: this.template.$marginSlider,
findIndex: () => {
return (
this.MARGIN.findIndex(
(item) => item.value[0] === this.option.margin[0] && item.value[1] === this.option.margin[1],
) || 2
);
},
onChange: (index) => {
const margin = this.MARGIN[index];
const { $marginValue } = this.template;
$marginValue.textContent = margin.name;
this.danmuku.config({
margin: margin.value,
});
},
});
this.slider.fontSize = this.createSlider({
min: 1,
max: 25,
steps: [],
container: this.template.$fontSizeSlider,
findIndex: () => {
const { clientHeight } = this.art.template.$player;
if (typeof this.option.fontSize === 'number') {
return Math.round((this.option.fontSize / clientHeight) * 100) || 5;
} else {
danmuku.hide();
art.notice.show = '弹幕隐藏';
setStyle($danmuOn, 'display', 'none');
setStyle($danmuOff, 'display', null);
return Math.round(this.option.fontSize.replace('%', '')) || 5;
}
},
mounted($ref) {
append($ref, $danmuOn);
append($ref, $danmuOff);
tooltip($ref, '弹幕开关');
setStyle($danmuOff, 'display', 'none');
art.on('artplayerPluginDanmuku:hide', () => {
setStyle($danmuOn, 'display', 'none');
setStyle($danmuOff, 'display', null);
onChange: (index) => {
const { $fontSizeValue } = this.template;
$fontSizeValue.textContent = `${index}%`;
this.danmuku.config({
fontSize: `${index}%`,
});
},
});
art.on('artplayerPluginDanmuku:show', () => {
setStyle($danmuOn, 'display', null);
setStyle($danmuOff, 'display', 'none');
this.slider.speed = this.createSlider({
min: 0,
max: 4,
steps: this.SPEED,
container: this.template.$speedSlider,
findIndex: () => {
return this.SPEED.findIndex((item) => item.value === this.option.speed) || 2;
},
onChange: (index) => {
const speed = this.SPEED[index];
const { $speedValue } = this.template;
$speedValue.textContent = speed.name;
this.danmuku.config({
speed: speed.value,
});
},
});
}
function addSetting() {
art.setting.add({
width: 260,
name: 'danmuku',
html: '弹幕设置',
tooltip: '更多',
icon: $danmuConfig,
selector: [
{
width: SETTING_ITEM_WIDTH,
html: '播放速度',
icon: '',
tooltip: '适中',
selector: [
{
html: '极慢',
time: 10,
},
{
html: '较慢',
time: 7.5,
},
{
default: true,
html: '适中',
time: 5,
},
{
html: '较快',
time: 2.5,
},
{
html: '极快',
time: 1,
},
],
onSelect: function (item) {
danmuku.config({
speed: item.time,
});
return item.html;
},
},
{
width: SETTING_ITEM_WIDTH,
html: '字体大小',
icon: '',
tooltip: '适中',
selector: [
{
html: '极小',
fontSize: '4%',
},
{
html: '较小',
fontSize: '5%',
},
{
default: true,
html: '适中',
fontSize: '6%',
},
{
html: '较大',
fontSize: '7%',
},
{
html: '极大',
fontSize: '8%',
},
],
onSelect: function (item) {
danmuku.config({
fontSize: item.fontSize,
});
return item.html;
},
},
{
width: SETTING_ITEM_WIDTH,
html: '不透明度',
icon: '',
tooltip: '100%',
selector: [
{
default: true,
opacity: 1,
html: '100%',
},
{
opacity: 0.75,
html: '75%',
},
{
opacity: 0.5,
html: '50%',
},
{
opacity: 0.25,
html: '25%',
},
{
opacity: 0,
html: '0%',
},
],
onSelect: function (item) {
danmuku.config({
opacity: item.opacity,
});
return item.html;
},
},
{
width: SETTING_ITEM_WIDTH,
html: '显示范围',
icon: '',
tooltip: '3/4',
selector: [
{
html: '1/4',
margin: [10, '75%'],
},
{
html: '半屏',
margin: [10, '50%'],
},
{
default: true,
html: '3/4',
margin: [10, '25%'],
},
{
html: '满屏',
margin: [10, 10],
},
],
onSelect: function (item) {
danmuku.config({
margin: item.margin,
});
return item.html;
},
},
{
html: '弹幕防重叠',
icon: '',
tooltip: option.antiOverlap ? '开启' : '关闭',
switch: option.antiOverlap,
onSwitch(item) {
danmuku.config({
antiOverlap: !item.switch,
});
item.tooltip = item.switch ? '关闭' : '开启';
return !item.switch;
},
},
{
html: '同步视频速度',
icon: '',
tooltip: option.synchronousPlayback ? '开启' : '关闭',
switch: option.synchronousPlayback,
onSwitch(item) {
danmuku.config({
synchronousPlayback: !item.switch,
});
item.tooltip = item.switch ? '关闭' : '开启';
return !item.switch;
},
},
],
createSlider({ min, max, container, findIndex, onChange, steps = [] }) {
const { query, clamp } = this.utils;
container.innerHTML = `
<div class="apd-slider-line">
<div class="apd-slider-points">
${steps.map(() => `<div class="apd-slider-point"></div>`).join('')}
</div>
<div class="apd-slider-progress"></div>
</div>
<div class="apd-slider-dot"></div>
<div class="apd-slider-steps">
${steps.map((step) => (step.hide ? '' : `<div class="apd-slider-step">${step.name}</div>`)).join('')}
</div>
`;
const $dot = query('.apd-slider-dot', container);
const $progress = query('.apd-slider-progress', container);
let isDroging = false;
function reset(index = findIndex()) {
const value = clamp(index, min, max);
const percentage = (value - min) / (max - min);
$dot.style.left = `${percentage * 100}%`;
if (steps.length === 0) {
$progress.style.width = $dot.style.left;
}
onChange(value);
}
function updateLeft(event) {
const { left, width } = container.getBoundingClientRect();
const value = clamp(event.clientX - left, 0, width);
const index = Math.round((value / width) * (max - min) + min);
reset(index);
}
this.art.proxy(container, 'click', (event) => {
updateLeft(event);
});
this.art.proxy(container, 'mousedown', (event) => {
isDroging = event.button === 0;
});
this.art.on('document:mousemove', (event) => {
if (isDroging) {
updateLeft(event);
}
});
this.art.on('document:mouseup', (event) => {
if (isDroging) {
isDroging = false;
updateLeft(event);
}
});
return { reset };
}
addEmitter();
addControl();
addSetting();
onFullscreen(state) {
if (this.outside) {
const { $danmuku, $controlsCenter, $mount } = this.template;
if (state) {
$controlsCenter.appendChild($danmuku);
} else {
$mount.appendChild($danmuku);
}
}
}
async emit() {
const { $input } = this.template;
const text = $input.value.trim();
if (!text.length) return;
if (this.isLock) return;
if (this.emitting) return;
const danmu = {
text: text,
mode: this.option.mode,
color: this.option.color,
time: this.art.currentTime,
};
try {
this.emitting = true;
const state = await this.option.beforeEmit(danmu);
this.emitting = false;
if (state !== true) return;
danmu.border = true;
delete danmu.time;
this.danmuku.emit(danmu);
$input.value = '';
this.lock();
} catch (error) {
this.emitting = false;
}
}
lock() {
const { addClass } = this.utils;
const { $send } = this.template;
this.isLock = true;
let time = this.option.lockTime;
$send.innerText = time;
addClass($send, 'apd-lock');
const loop = () => {
this.timer = setTimeout(() => {
if (time === 0) {
this.unlock();
} else {
time -= 1;
$send.innerText = time;
loop();
}
}, 1000);
};
loop();
}
unlock() {
const { removeClass } = this.utils;
const { $send } = this.template;
clearTimeout(this.timer);
this.isLock = false;
$send.innerText = '发送';
removeClass($send, 'apd-lock');
}
reset() {
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);
const { inverseClass } = this.utils;
const colors = this.template.$colors.children;
const $color = Array.from(colors).find((item) => item.dataset.color === this.option.color.toUpperCase());
$color && inverseClass($color, 'apd-active');
}
mount(target = this.template.$controlsCenter) {
target.appendChild(this.template.$danmuku);
this.template.$mount = target;
this.reset();
}
}
if (typeof document !== 'undefined') {
if (!document.getElementById('artplayer-plugin-danmuku')) {
const id = 'artplayer-plugin-danmuku';
const $style = document.getElementById(id);
if ($style) {
$style.textContent = style;
} else {
const $style = document.createElement('style');
$style.id = 'artplayer-plugin-danmuku';
$style.id = id;
$style.textContent = style;
document.head.appendChild($style);
}
+381 -156
View File
@@ -1,199 +1,424 @@
.art-danmuku-emitter {
position: relative;
@highlight: #00a1d6;
.artplayer-plugin-danmuku {
display: flex;
position: relative;
z-index: 99;
align-items: center;
justify-content: center;
font-size: 12px;
height: 32px;
width: 100%;
font-size: 12px;
line-height: 1;
border-radius: 5px;
max-width: 100%;
background-color: rgb(255 255 255 / 30%);
color: #fff;
font-weight: 300;
flex-shrink: 0;
gap: 10px;
.art-backdrop-filter {
-webkit-backdrop-filter: saturate(180%) blur(20px);
backdrop-filter: saturate(180%) blur(20px);
background-color: rgba(0, 0, 0, 0.7) !important;
.apd-icon {
cursor: pointer;
opacity: 0.75;
transition: all 0.2s ease;
fill: #fff;
&:hover {
opacity: 1;
}
}
.art-danmuku-left {
.apd-config {
display: flex;
flex: 1;
border-radius: 3px 0 0 3px;
position: relative;
.art-danmuku-style {
position: relative;
display: flex;
width: 32px;
align-items: center;
justify-content: center;
.apd-config-panel {
position: absolute;
bottom: 24px;
left: -148px;
display: none;
width: 320px;
padding: 10px;
.art-danmuku-style-panel {
display: none;
position: absolute;
z-index: 999;
left: -85px;
bottom: 30px;
width: 200px;
padding-bottom: 10px;
.art-danmuku-style-panel-inner {
display: flex;
flex-direction: column;
padding: 10px 10px 0;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.9);
.art-danmuku-style-panel-title {
font-size: 13px;
margin-bottom: 10px;
}
.art-danmuku-style-panel-modes {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
.art-danmuku-style-panel-mode {
display: flex;
justify-content: center;
width: 47%;
padding: 5px 0;
cursor: pointer;
color: #fff;
border: 1px solid #fff;
&.art-current {
background-color: #00a1d6;
border: 1px solid #00a1d6;
}
}
}
.art-danmuku-style-panel-colors {
display: flex;
gap: 5px;
flex-wrap: wrap;
margin-bottom: 10px;
justify-content: space-between;
.art-danmuku-style-panel-color {
cursor: pointer;
width: 20px;
height: 20px;
border: 1px solid #fff;
&.art-current {
position: relative;
box-shadow: 0 0 2px #fff;
&::before {
content: '';
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
right: 0;
bottom: 0;
border: 2px solid #000;
}
}
}
}
}
.apd-config-panel-inner {
width: 100%;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.85);
padding: 10px;
}
}
&:hover .art-danmuku-style-panel {
&:hover {
.apd-config-panel {
display: flex;
}
.art-icon {
opacity: 0.75;
cursor: pointer;
&:hover {
opacity: 1;
}
}
}
}
.art-danmuku-input {
flex: 1;
display: flex;
padding: 0 10px 0 0;
border: none;
outline: none;
width: 100%;
color: #ffffff;
background-color: transparent;
.apd-config-mode,
.apd-config-slider,
.apd-config-other,
.apd-style-mode {
margin-bottom: 15px;
}
&::placeholder,
&::-webkit-input-placeholder {
color: rgb(255 255 255 / 50%);
.apd-modes {
display: flex;
align-items: center;
margin-top: 5px;
gap: 20px;
.apd-mode {
cursor: pointer;
text-align: center;
&:hover {
color: @highlight;
}
}
}
.art-danmuku-send {
.apd-config-slider {
display: flex;
width: 50px;
align-items: center;
gap: 12px;
.apd-value {
width: 32px;
text-align: right;
}
}
.apd-slider {
position: relative;
flex: 1;
display: flex;
height: 20px;
align-items: center;
justify-content: center;
cursor: pointer;
background-color: #00a1d6;
border-radius: 0 5px 5px 0;
.apd-slider-line {
position: relative;
height: 2px;
width: 100%;
overflow: hidden;
border-radius: 3px;
background-color: rgba(255, 255, 255, 0.25);
}
.apd-slider-points {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: space-between;
.apd-slider-point {
width: 2px;
height: 2px;
border-radius: 50%;
background-color: rgba(255, 255, 255, 0.5);
}
}
.apd-slider-progress {
width: 0%;
height: 100%;
background-color: @highlight;
}
.apd-slider-dot {
position: absolute;
transform: translateX(-6px);
left: 0%;
width: 12px;
height: 12px;
border-radius: 50%;
background-color: @highlight;
}
.apd-slider-steps {
display: flex;
align-items: center;
justify-content: space-between;
position: absolute;
bottom: -12px;
width: calc(100% + 32px);
color: #777;
.apd-slider-step {
flex-shrink: 0;
width: 36px;
text-align: center;
scale: 0.95;
}
}
}
.apd-config-other {
display: flex;
align-items: center;
gap: 20px;
.apd-check-off,
.apd-check-on {
width: 16px;
height: 16px;
}
.apd-other {
display: flex;
align-items: center;
cursor: pointer;
gap: 2px;
&:hover {
color: @highlight;
}
}
}
.apd-emitter {
display: flex;
flex: 1;
align-items: center;
height: 100%;
background-color: rgba(255, 255, 255, 0.25);
border-radius: 5px;
}
.apd-style {
position: relative;
display: flex;
align-items: center;
justify-content: center;
.apd-style-panel {
position: absolute;
bottom: 24px;
left: -88px;
display: none;
width: 200px;
padding: 10px;
.apd-style-panel-inner {
width: 100%;
border-radius: 3px;
background-color: rgba(0, 0, 0, 0.85);
padding: 10px;
}
}
&:hover {
background-color: #00b5e5;
}
&.art-disabled {
opacity: 0.5;
pointer-events: none;
.apd-style-panel {
display: flex;
}
}
}
&.art-danmuku-mount {
max-width: 100% !important;
.apd-colors {
display: flex;
flex-wrap: wrap;
margin-top: 5px;
gap: 8px;
.art-danmuku-left {
.art-danmuku-style {
.art-danmuku-style-panel {
left: 0;
}
.apd-color {
width: 16px;
height: 16px;
border-radius: 2px;
cursor: pointer;
&.apd-active {
border: 1px solid black;
box-shadow: 0 0 0 1px #fff;
}
}
}
.apd-input {
outline: none;
height: 100%;
flex: 1;
min-width: 0;
width: auto;
border: none;
line-height: 1;
color: #fff;
background-color: transparent;
&::placeholder {
color: rgba(255, 255, 255, 0.5);
}
}
.apd-send {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
width: 60px;
flex-shrink: 0;
cursor: pointer;
text-shadow: none;
border-top-right-radius: 5px;
border-bottom-right-radius: 5px;
background-color: @highlight;
&.apd-lock {
cursor: not-allowed;
color: #666;
background-color: #e7e7e7;
}
}
}
.art-fullscreen,
.art-fullscreen-web {
.artplayer-plugin-danmuku {
height: 38px;
gap: 16px;
.apd-config-icon,
.apd-toggle-off,
.apd-toggle-on {
width: 28px;
height: 28px;
}
.apd-emitter {
width: 390px;
flex: none;
}
}
}
[data-danmuku-theme='light'] > .artplayer-plugin-danmuku {
.apd-icon {
fill: #333;
}
.apd-emitter {
background-color: #f1f2f3;
}
.apd-input {
color: #000;
&::placeholder {
color: rgba(0, 0, 0, 0.3);
}
}
}
[data-danmuku-visible='false'] {
.apd-toggle-off {
display: block;
}
.apd-toggle-on {
display: none;
}
}
[data-danmuku-visible='true'] {
.apd-toggle-off {
display: none;
}
.apd-toggle-on {
display: block;
}
}
[data-danmuku-anti-overlap='false'] {
.apd-anti-overlap {
.apd-check-on {
display: none;
}
.apd-check-off {
display: block;
}
}
}
[data-danmuku-anti-overlap='true'] {
.apd-anti-overlap {
.apd-check-on {
display: block;
}
.apd-check-off {
display: none;
}
}
}
[data-danmuku-sync-video='false'] {
.apd-sync-video {
.apd-check-on {
display: none;
}
.apd-check-off {
display: block;
}
}
}
[data-danmuku-sync-video='true'] {
.apd-sync-video {
.apd-check-on {
display: block;
}
.apd-check-off {
display: none;
}
}
}
.generate-mode-styles(@index) when (@index >= 0) {
.generate-mode-styles(@index - 1);
@mode: ~'data-danmuku-mode@{index}';
[@{mode}='false'] {
.apd-config-mode {
.apd-mode-@{index}-off {
display: block;
}
.apd-mode-@{index}-on {
display: none;
}
}
.art-danmuku-send {
width: 60px;
.art-danmuku [data-mode='@{index}'] {
opacity: 0 !important;
}
}
&.art-danmuku-theme-light {
.art-danmuku-left {
border: 1px solid #dadada;
background: #f4f4f4;
[@{mode}='true'] {
.apd-config-mode {
.apd-mode-@{index}-off {
display: none;
}
.art-danmuku-style .art-icon svg {
fill: #666;
}
.apd-mode-@{index}-on {
display: block;
}
}
}
.art-danmuku-input {
color: #000000;
&::placeholder,
&::-webkit-input-placeholder {
color: rgb(0 0 0 / 50%);
}
[data-danmuku-mode='@{index}'] {
.apd-style-mode {
[data-mode='@{index}'] {
color: @highlight;
path {
fill: @highlight;
}
}
}
}
}
.art-layer-danmuku-emitter {
position: absolute;
z-index: 99;
left: 0;
right: 0;
bottom: -40px;
width: 100%;
}
.generate-mode-styles(2);
+42 -10
View File
@@ -1,13 +1,24 @@
function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, marginTop, antiOverlap }) {
// 弹幕最大高度
const maxTop = clientHeight - marginBottom;
// 过滤同模式的弹幕,即每种模式各不影响
const danmus = emits
.filter((item) => item.mode === target.mode && item.top <= clientHeight - marginBottom)
.filter((item) => item.mode === target.mode && item.top <= maxTop)
.sort((prev, next) => prev.top - next.top);
// 如果没有同模式的弹幕,直接返回
if (danmus.length === 0) {
return marginTop;
if (target.mode === 2) {
return maxTop - target.height;
} else {
return marginTop;
}
}
// 上下各加一个虚拟弹幕,方便计算
danmus.unshift({
type: 'top',
top: 0,
left: 0,
right: 0,
@@ -18,7 +29,8 @@ function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, m
});
danmus.push({
top: clientHeight - marginBottom,
type: 'bottom',
top: maxTop,
left: 0,
right: 0,
height: marginBottom,
@@ -27,13 +39,28 @@ function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, m
distance: clientWidth,
});
for (let index = 1; index < danmus.length; index += 1) {
const item = danmus[index];
const prev = danmus[index - 1];
const prevBottom = prev.top + prev.height;
const diff = item.top - prevBottom;
if (diff >= target.height) {
return prevBottom;
// 查找是否有多余的缝隙足以容纳当前弹幕
if (target.mode === 2) {
// 倒序查找
for (let index = danmus.length - 2; index >= 0; index -= 1) {
const item = danmus[index];
const prev = danmus[index + 1];
const itemBottom = item.top + item.height;
const diff = prev.top - itemBottom;
if (diff >= target.height) {
return prev.top - target.height;
}
}
} else {
// 顺序查找
for (let index = 1; index < danmus.length; index += 1) {
const item = danmus[index];
const prev = danmus[index - 1];
const prevBottom = prev.top + prev.height;
const diff = item.top - prevBottom;
if (diff >= target.height) {
return prevBottom;
}
}
}
@@ -67,7 +94,10 @@ function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, m
return result && result[0] ? result[0].top : undefined;
}
// 静止弹幕没有重叠问题
case 1:
case 2:
return undefined;
default:
break;
@@ -82,6 +112,7 @@ function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, m
});
break;
case 1:
case 2:
topMap.sort((prev, next) => {
const nextMaxWidth = Math.max(...next.map((item) => item.width));
const prevMaxWidth = Math.max(...prev.map((item) => item.width));
@@ -98,6 +129,7 @@ function getDanmuTop({ target, emits, clientWidth, clientHeight, marginBottom, m
onmessage = (event) => {
const { data } = event;
if (!data.id) return;
const top = getDanmuTop(data);
self.postMessage({
top,
@@ -3,6 +3,8 @@ import type Artplayer from 'artplayer';
export = artplayerPluginDanmuku;
export as namespace artplayerPluginDanmuku;
type Mode = 0 | 1 | 2;
type Danmu = {
/**
* 弹幕文本
@@ -10,9 +12,9 @@ type Danmu = {
text: string;
/**
* 弹幕发送模式,0为滚动,1为静止
* 弹幕发送模式: 0: 滚动,1: 顶部,2: 底部
*/
mode?: 0 | 1;
mode?: Mode;
/**
* 弹幕颜色
@@ -25,24 +27,34 @@ type Danmu = {
time?: number;
/**
* 弹幕是否有描边
* 弹幕是否有描边, 默认为 false
*/
border?: boolean;
/**
* 弹幕自定义样式
*/
style?: Partial<CSSStyleDeclaration>;
/**
* 弹幕文本是否转义, 默认为 true
*/
escape?: boolean;
};
type Option = {
/**
* 弹幕源,可以是弹幕数组,xml 地址或者一个返回 Promise 的函数
* 弹幕数据: 函数,数组,Promise,URL
*/
danmuku: Danmu[] | string | (() => Promise<Danmu[]>) | Promise<Danmu[]>;
/**
* 弹幕持续时间,单位秒,范围在[1 ~ 10]
* 弹幕持续时间,范围在[1 ~ 10]
*/
speed?: number;
/**
* 弹幕上下边距,支持数字和高度的百分比
* 弹幕上下边距,支持像素数字和百分比
*/
margin?: [number | `${number}%`, number | `${number}%`];
@@ -52,70 +64,40 @@ type Option = {
opacity?: number;
/**
* 默认字体颜色
* 默认弹幕颜色,可以被单独弹幕项覆盖
*/
color?: string;
/**
* 默认弹幕发送模式,0为滚动,1为静止
* 弹幕模式: 0: 滚动,1: 顶部,2: 底部
*/
mode?: 0 | 1;
mode?: Mode;
/**
* 字体大小,支持数字和高度的百分比
* 幕可见的模式
*/
modes?: Mode[];
/**
* 弹幕字体大小,支持像素数字和百分比
*/
fontSize?: number | `${number}%`;
/**
* 弹幕过滤函数,返回 true 则可以发送
*/
filter?: (danmu: Danmu) => boolean;
/**
* 是否防重叠
* 弹幕是否防重叠
*/
antiOverlap?: boolean;
/**
* 是否使用 web worker
*/
useWorker?: boolean;
/**
* 是否同步到播放速度
* 是否同步播放速度
*/
synchronousPlayback?: boolean;
/**
* 输入框锁定时间,单位秒,范围在[1 ~ 60]
*/
lockTime?: number;
/**
* 输入框最大可输入的字数,范围在[0 ~ 500]
*/
maxLength?: number;
/**
* 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
*/
minWidth?: number;
/**
* 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
*/
maxWidth?: number;
/**
* 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效
* 弹幕发射器挂载点, 默认为播放器控制栏中部
*/
mount?: Element;
/**
* 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
*/
theme?: 'dark' | 'light';
/**
* 是否开启弹幕热度图
*/
@@ -135,9 +117,44 @@ type Option = {
};
/**
* 发送弹幕前的自定义校验,返回 true 则可以发送
* 热力图数据
*/
beforeEmit?: (danmu: Danmu) => boolean;
points?: any[];
/**
* 弹幕载入前的过滤器,只支持返回布尔值
*/
filter?: (danmu: Danmu) => boolean;
/**
* 弹幕发送前的过滤器,支持返回 Promise
*/
beforeEmit?: (danmu: Danmu) => boolean | (() => Promise<boolean>);
/**
* 弹幕显示前的过滤器,支持返回 Promise
*/
beforeVisible?: (danmu: Danmu) => boolean | (() => Promise<boolean>);
/**
* 弹幕是否可见
*/
visible?: boolean;
/**
* 弹幕输入框最大长度, 范围在[1 ~ 1000]
*/
maxLength?: number;
/**
* 输入框锁定时间,范围在[1 ~ 60]
*/
lockTime?: number;
/**
* 弹幕主题,只在自定义挂载时生效
*/
theme?: 'light' | 'dark';
};
type Danmuku = {
@@ -168,6 +185,21 @@ type Danmuku = {
*/
show: () => Danmuku;
/**
* 挂载弹幕输入框
*/
mount: (el?: Element) => void;
/**
* 重置弹幕
*/
reset: () => void;
/**
* 弹幕配置
*/
option: Option;
/**
* 是否隐藏弹幕层
*/
@@ -1,7 +1 @@
/*!
* artplayer-plugin-dash-quality.js v2.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[o]&&i[o],l=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!l[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var f=l[t]=new d.Module(t);e[t][0].call(f.exports,c,f,f.exports,this)}return l[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=l,d.parent=a,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var f=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}}({"92dvd":[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n);var r=e("bundle-text:./image.svg"),i=o.interopDefault(r);function a(e){return t=>{!function(e){const{version:t,utils:{errorHandle:n}}=e.constructor,o=t.split(".").map(Number);n(o[0]+o[1]/100>=5,`Artplayer.js@${t} is not compatible the artplayerPluginDashQuality@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(t);const{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function r(){const r=t.dash||window.dash;o(r&&r.getVideoElement()===n,'Cannot find instance of Dash from "art.dash" or "window.dash"');const a=e.auto||"Auto",l=e.title||"Quality",u=r.getBitrateInfoListFor("video"),d=r.getQualityFor("video"),s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=r.getSettings(),c=u[d],p=f?.streaming?.abr?.autoSwitchBitrate?.video?a:s(c),h={streaming:{abr:{autoSwitchBitrate:{}}}};e.control&&t.controls.update({name:"dash-quality",position:"right",html:p,style:{padding:"0 10px"},selector:u.map(((e,t)=>({html:s(e),level:t,default:c===e}))),onSelect:e=>(h.streaming.abr.autoSwitchBitrate.video=!1,r.updateSettings(h),r.setQualityFor("video",e.level,!0),e.html)}),e.setting&&t.setting.update({name:"dash-quality",tooltip:p,html:l,icon:i.default,width:200,selector:u.map(((e,t)=>({html:s(e),level:t,default:c===e}))),onSelect:function(e){return h.streaming.abr.autoSwitchBitrate.video=!1,r.updateSettings(h),r.setQualityFor("video",e.level,!0),e.html}})}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashQuality"}}}n.default=a,"undefined"!=typeof window&&(window.artplayerPluginDashQuality=a)},{"bundle-text:./image.svg":"kcayM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kcayM:[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["92dvd"],"92dvd","parcelRequire4dc0");
/*! * artplayer-plugin-dash-quality.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[o]&&i[o],l=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!l[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var f=l[t]=new d.Module(t);e[t][0].call(f.exports,c,f,f.exports,this)}return l[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=l,d.parent=a,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var f=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({"92dvd":[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"default",()=>a);var r=e("bundle-text:./image.svg"),i=o.interopDefault(r);function a(e){return t=>{!function(e){let{version:t,utils:{errorHandle:n}}=e.constructor,o=t.split(".").map(Number);n(o[0]+o[1]/100>=5,`Artplayer.js@${t}is not compatible the artplayerPluginDashQuality@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(t);let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function r(){let r=t.dash||window.dash;o(r&&r.getVideoElement()===n,'Cannot find instance of Dash from "art.dash" or "window.dash"');let a=e.auto||"Auto",l=e.title||"Quality",u=r.getBitrateInfoListFor("video"),d=r.getQualityFor("video"),s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=r.getSettings(),c=u[d],p=f?.streaming?.abr?.autoSwitchBitrate?.video?a:s(c),h={streaming:{abr:{autoSwitchBitrate:{}}}};e.control&&t.controls.update({name:"dash-quality",position:"right",html:p,style:{padding:"0 10px"},selector:u.map((e,t)=>({html:s(e),level:t,default:c===e})),onSelect:e=>(h.streaming.abr.autoSwitchBitrate.video=!1,r.updateSettings(h),r.setQualityFor("video",e.level,!0),e.html)}),e.setting&&t.setting.update({name:"dash-quality",tooltip:p,html:l,icon:i.default,width:200,selector:u.map((e,t)=>({html:s(e),level:t,default:c===e})),onSelect:function(e){return h.streaming.abr.autoSwitchBitrate.video=!1,r.updateSettings(h),r.setQualityFor("video",e.level,!0),e.html}})}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginDashQuality"}}}"undefined"!=typeof window&&(window.artplayerPluginDashQuality=a)},{"bundle-text:./image.svg":"kcayM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kcayM:[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["92dvd"],"92dvd","parcelRequire4dc0");
@@ -1,7 +1 @@
/*!
* artplayer-plugin-dash-quality.js v2.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[r]&&i[r],a=u.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!a[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(u)return u(t,!0);if(l&&"string"==typeof t)return l(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},c.cache={};var f=a[t]=new d.Module(t);e[t][0].call(f.exports,c,f,f.exports,this)}return a[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=u,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var f=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}}({gZVrQ:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("bundle-text:./image.svg"),i=r.interopDefault(o);function u(e){return function(t){!function(e){var t=e.constructor,n=t.version,r=t.utils.errorHandle,o=n.split(".").map(Number);r(o[0]+o[1]/100>=5,"Artplayer.js@".concat(n," is not compatible the artplayerPluginDashQuality@").concat(u.version,". Please update it to version Artplayer.js@5.x.x"))}(t);var n=t.template.$video,r=t.constructor.utils.errorHandle;function o(){var o,u,a,l=t.dash||window.dash;r(l&&l.getVideoElement()===n,'Cannot find instance of Dash from "art.dash" or "window.dash"');var d=e.auto||"Auto",s=e.title||"Quality",f=l.getBitrateInfoListFor("video"),c=l.getQualityFor("video"),p=e.getResolution||function(e){return(e.height||"Unknown ")+"P"},h=l.getSettings(),g=f[c],v=(null==h||null===(o=h.streaming)||void 0===o||null===(u=o.abr)||void 0===u||null===(a=u.autoSwitchBitrate)||void 0===a?void 0:a.video)?d:p(g),m={streaming:{abr:{autoSwitchBitrate:{}}}};e.control&&t.controls.update({name:"dash-quality",position:"right",html:v,style:{padding:"0 10px"},selector:f.map((function(e,t){return{html:p(e),level:t,default:g===e}})),onSelect:function(e){return m.streaming.abr.autoSwitchBitrate.video=!1,l.updateSettings(m),l.setQualityFor("video",e.level,!0),e.html}}),e.setting&&t.setting.update({name:"dash-quality",tooltip:v,html:s,icon:i.default,width:200,selector:f.map((function(e,t){return{html:p(e),level:t,default:g===e}})),onSelect:function(e){return m.streaming.abr.autoSwitchBitrate.video=!1,l.updateSettings(m),l.setQualityFor("video",e.level,!0),e.html}})}return t.on("ready",o),t.on("restart",o),{name:"artplayerPluginDashQuality"}}}n.default=u,"undefined"!=typeof window&&(window.artplayerPluginDashQuality=u)},{"bundle-text:./image.svg":"gI7Xh","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gI7Xh:[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["gZVrQ"],"gZVrQ","parcelRequire4dc0");
/*! * artplayer-plugin-dash-quality.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[o]&&i[o],l=u.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!l[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(u)return u(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var f=l[t]=new d.Module(t);e[t][0].call(f.exports,c,f,f.exports,this)}return l[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=l,d.parent=u,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var s=0;s<t.length;s++)d(t[s]);if(n){var f=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({gZVrQ:[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"default",function(){return u});var r=e("bundle-text:./image.svg"),i=o.interopDefault(r);function u(e){return function(t){o=(n=t.constructor).version,(0,n.utils.errorHandle)((r=o.split(".").map(Number))[0]+r[1]/100>=5,"Artplayer.js@".concat(o," is not compatible the artplayerPluginDashQuality@").concat(u.version,". Please update it to version Artplayer.js@5.x.x"));var n,o,r,l=t.template.$video,a=t.constructor.utils.errorHandle;function d(){var n,o,r,u=t.dash||window.dash;a(u&&u.getVideoElement()===l,'Cannot find instance of Dash from "art.dash" or "window.dash"');var d=e.auto||"Auto",s=e.title||"Quality",f=u.getBitrateInfoListFor("video"),c=u.getQualityFor("video"),p=e.getResolution||function(e){return(e.height||"Unknown ")+"P"},h=u.getSettings(),g=f[c],v=(null==h?void 0:null===(r=h.streaming)||void 0===r?void 0:null===(o=r.abr)||void 0===o?void 0:null===(n=o.autoSwitchBitrate)||void 0===n?void 0:n.video)?d:p(g),m={streaming:{abr:{autoSwitchBitrate:{}}}};e.control&&t.controls.update({name:"dash-quality",position:"right",html:v,style:{padding:"0 10px"},selector:f.map(function(e,t){return{html:p(e),level:t,default:g===e}}),onSelect:function(e){return m.streaming.abr.autoSwitchBitrate.video=!1,u.updateSettings(m),u.setQualityFor("video",e.level,!0),e.html}}),e.setting&&t.setting.update({name:"dash-quality",tooltip:v,html:s,icon:i.default,width:200,selector:f.map(function(e,t){return{html:p(e),level:t,default:g===e}}),onSelect:function(e){return m.streaming.abr.autoSwitchBitrate.video=!1,u.updateSettings(m),u.setQualityFor("video",e.level,!0),e.html}})}return t.on("ready",d),t.on("restart",d),{name:"artplayerPluginDashQuality"}}}"undefined"!=typeof window&&(window.artplayerPluginDashQuality=u)},{"bundle-text:./image.svg":"gI7Xh","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gI7Xh:[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["gZVrQ"],"gZVrQ","parcelRequire4dc0");
@@ -1,7 +1 @@
/*!
* artplayer-plugin-hls-quality.js v2.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,o,r){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[o]&&l[o],u=i.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);if(i)return i(t,!0);if(s&&"string"==typeof t)return s(t);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var c=u[t]=new a.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=u,a.parent=i,a.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(a,"root",{get:function(){return l[o]}}),l[o]=a;for(var f=0;f<t.length;f++)a(t[f]);if(n){var c=a(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({eEHR6:[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{!function(e){const{version:t,utils:{errorHandle:n}}=e.constructor,o=t.split(".").map(Number);n(o[0]+o[1]/100>=5,`Artplayer.js@${t} is not compatible the artplayerPluginHlsQuality@${i.version}. Please update it to version Artplayer.js@5.x.x`)}(t);const{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function r(){const r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');const i=e.auto||"Auto",u=e.title||"Quality",s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),a=r.levels[r.currentLevel],f=a?s(a):i;e.control&&t.controls.update({name:"hls-quality",position:"right",html:f,style:{padding:"0 10px"},selector:r.levels.map(((e,t)=>({html:s(e),level:e.level||t,default:a===e}))),onSelect:e=>(r.currentLevel=e.level,t.loading.show=!0,e.html)}),e.setting&&t.setting.update({name:"hls-quality",tooltip:f,html:u,icon:l.default,width:200,selector:r.levels.map(((e,t)=>({html:s(e),level:e.level||t,default:a===e}))),onSelect:function(e){return r.currentLevel=e.level,t.loading.show=!0,e.html}})}return t.on("ready",r),t.on("restart",r),{name:"artplayerPluginHlsQuality"}}}n.default=i,"undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"5VXix","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5VXix":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["eEHR6"],"eEHR6","parcelRequire4dc0");
/*! * artplayer-plugin-hls-quality.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,t,n,o,l){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof r[o]&&r[o],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!u[t]){if(!e[t]){var l="function"==typeof r[o]&&r[o];if(!n&&l)return l(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},d.cache={};var c=u[t]=new f.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=u,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return r[o]}}),r[o]=f;for(var s=0;s<t.length;s++)f(t[s]);if(n){var c=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({eEHR6:[function(e,t,n){var o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(n),o.export(n,"default",()=>i);var l=e("bundle-text:./image.svg"),r=o.interopDefault(l);function i(e){return t=>{!function(e){let{version:t,utils:{errorHandle:n}}=e.constructor,o=t.split(".").map(Number);n(o[0]+o[1]/100>=5,`Artplayer.js@${t}is not compatible the artplayerPluginHlsQuality@${i.version}. Please update it to version Artplayer.js@5.x.x`)}(t);let{$video:n}=t.template,{errorHandle:o}=t.constructor.utils;function l(){let l=t.hls||window.hls;o(l&&l.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');let i=e.auto||"Auto",u=e.title||"Quality",a=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=l.levels[l.currentLevel],s=f?a(f):i;e.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:l.levels.map((e,t)=>({html:a(e),level:e.level||t,default:f===e})),onSelect:e=>(l.currentLevel=e.level,t.loading.show=!0,e.html)}),e.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:u,icon:r.default,width:200,selector:l.levels.map((e,t)=>({html:a(e),level:e.level||t,default:f===e})),onSelect:function(e){return l.currentLevel=e.level,t.loading.show=!0,e.html}})}return t.on("ready",l),t.on("restart",l),{name:"artplayerPluginHlsQuality"}}}"undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"5VXix","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5VXix":[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["eEHR6"],"eEHR6","parcelRequire4dc0");
@@ -1,7 +1 @@
/*!
* artplayer-plugin-hls-quality.js v2.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[r]&&l[r],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof l[r]&&l[r];if(!n&&o)return o(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var s=new Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var c=u[t]=new f.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=u,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return l[r]}}),l[r]=f;for(var s=0;s<t.length;s++)f(t[s]);if(n){var c=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({"34JKw":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("bundle-text:./image.svg"),l=r.interopDefault(o);function i(e){return function(t){!function(e){var t=e.constructor,n=t.version,r=t.utils.errorHandle,o=n.split(".").map(Number);r(o[0]+o[1]/100>=5,"Artplayer.js@".concat(n," is not compatible the artplayerPluginHlsQuality@").concat(i.version,". Please update it to version Artplayer.js@5.x.x"))}(t);var n=t.template.$video,r=t.constructor.utils.errorHandle;function o(){var o=t.hls||window.hls;r(o&&o.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');var i=e.auto||"Auto",u=e.title||"Quality",a=e.getResolution||function(e){return(e.height||"Unknown ")+"P"},f=o.levels[o.currentLevel],s=f?a(f):i;e.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:o.levels.map((function(e,t){return{html:a(e),level:e.level||t,default:f===e}})),onSelect:function(e){return o.currentLevel=e.level,t.loading.show=!0,e.html}}),e.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:u,icon:l.default,width:200,selector:o.levels.map((function(e,t){return{html:a(e),level:e.level||t,default:f===e}})),onSelect:function(e){return o.currentLevel=e.level,t.loading.show=!0,e.html}})}return t.on("ready",o),t.on("restart",o),{name:"artplayerPluginHlsQuality"}}}n.default=i,"undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"jPEUe","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jPEUe:[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["34JKw"],"34JKw","parcelRequire4dc0");
/*! * artplayer-plugin-hls-quality.js v2.0.0 * Github:https://github.com/zhw2590582/ArtPlayer * (c) 2017-2024 Harvey Zack * Released under the MIT License. */ !function(e,t,n,r,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[r]&&l[r],u=i.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof l[r]&&l[r];if(!n&&o)return o(t,!0);if(i)return i(t,!0);if(a&&"string"==typeof t)return a(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var c=u[t]=new f.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=u,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return l[r]}}),l[r]=f;for(var s=0;s<t.length;s++)f(t[s]);if(n){var c=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({"34JKw":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"default",function(){return i});var o=e("bundle-text:./image.svg"),l=r.interopDefault(o);function i(e){return function(t){r=(n=t.constructor).version,(0,n.utils.errorHandle)((o=r.split(".").map(Number))[0]+o[1]/100>=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginHlsQuality@").concat(i.version,". Please update it to version Artplayer.js@5.x.x"));var n,r,o,u=t.template.$video,a=t.constructor.utils.errorHandle;function f(){var n=t.hls||window.hls;a(n&&n.media===u,'Cannot find instance of HLS from "art.hls" or "window.hls"');var r=e.auto||"Auto",o=e.title||"Quality",i=e.getResolution||function(e){return(e.height||"Unknown ")+"P"},f=n.levels[n.currentLevel],s=f?i(f):r;e.control&&t.controls.update({name:"hls-quality",position:"right",html:s,style:{padding:"0 10px"},selector:n.levels.map(function(e,t){return{html:i(e),level:e.level||t,default:f===e}}),onSelect:function(e){return n.currentLevel=e.level,t.loading.show=!0,e.html}}),e.setting&&t.setting.update({name:"hls-quality",tooltip:s,html:o,icon:l.default,width:200,selector:n.levels.map(function(e,t){return{html:i(e),level:e.level||t,default:f===e}}),onSelect:function(e){return n.currentLevel=e.level,t.loading.show=!0,e.html}})}return t.on("ready",f),t.on("restart",f),{name:"artplayerPluginHlsQuality"}}}"undefined"!=typeof window&&(window.artplayerPluginHlsQuality=i)},{"bundle-text:./image.svg":"jPEUe","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jPEUe:[function(e,t,n){t.exports='<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="24" height="24"><path d="M870.4 176H153.6c-49.472 0-89.6 40.128-89.6 89.6v492.736c0 49.472 40.128 89.6 89.6 89.6h716.8c49.472 0 89.6-40.128 89.6-89.6V265.6c0-49.472-40.128-89.6-89.6-89.6zm0 492.8h-44.8s-29.696-65.792-89.6-89.6-134.4 89.6-134.4 89.6-66.56-71.808-134.4-224S153.6 624 153.6 624V265.6h716.8v403.2zM668.8 489.6c37.056 0 67.2-30.144 67.2-67.264 0-37.056-30.144-67.2-67.2-67.2-37.12.064-67.2 30.208-67.2 67.264 0 37.12 30.08 67.2 67.2 67.2z" fill="#fff"/></svg>'},{}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["34JKw"],"34JKw","parcelRequire4dc0");
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,s){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof o[r]&&o[r],a=i.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!a[t]){if(!e[t]){var s="function"==typeof o[r]&&o[r];if(!n&&s)return s(t,!0);if(i)return i(t,!0);if(d&&"string"==typeof t)return d(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}l.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},l.cache={};var u=a[t]=new f.Module(t);e[t][0].call(u.exports,l,u,u.exports,this)}return a[t].exports;function l(e){var t=l.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=a,f.parent=i,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return o[r]}}),o[r]=f;for(var c=0;c<t.length;c++)f(t[c]);if(n){var u=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({aFKtw:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);class r{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:n=0}){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:n},"*")}static async onMessage(e){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');const{type:t,data:n,id:s}=e.data;if("commit"===t)try{if(n.match(/\bresolve\((.*?)\)/)){const e=`return new Promise(function(resolve){\n${n}\n})`,t=await new Function(e)();r.postMessage({type:"response",data:t,id:s})}else{const e=new Function(n)();r.postMessage({type:"response",data:e,id:s})}}catch(e){throw r.postMessage({type:"error",data:e.message,id:s}),e}}static inject(){if(!r.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');r.postMessage({type:"inject"}),window.addEventListener("message",r.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw new Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){const{type:t,data:n,id:r}=e.data;if("inject"===t)this.injected=!0;this.promises[r]&&("error"===t?this.promises[r].reject(new Error(n)):this.promises[r].resove(n),delete this.promises[r]),this.messageCallback&&this.messageCallback({type:t,data:n})}postMessage({type:e,data:t}){return new Promise(((n,r)=>{(function s(){if(this.destroyed)r(new Error("The instance has been destroyed"));else if(this.injected){const s=Date.now();this.promises[s]={resove:n,reject:r},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)}))}commit(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');const t=e.toString(),n=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:n})}message(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}n.default=r,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0");
!function(e,t,r,n,s){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],a=i.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!a[t]){if(!e[t]){var s="function"==typeof o[n]&&o[n];if(!r&&s)return s(t,!0);if(i)return i(t,!0);if(f&&"string"==typeof t)return f(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}c.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},c.cache={};var u=a[t]=new d.Module(t);e[t][0].call(u.exports,c,u,u.exports,this)}return a[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=i,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return o[n]}}),o[n]=d;for(var l=0;l<t.length;l++)d(t[l]);if(r){var u=d(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({ewmKy:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);class n{static get iframe(){return window.top!==window}static postMessage({type:e,data:t,id:r=0}){if(!n.iframe)throw Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:e,data:t,id:r},"*")}static async onMessage(e){if(!n.iframe)throw Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');let{type:t,data:r,id:s}=e.data;if("commit"===t)try{if(r.match(/\bresolve\((.*?)\)/)){let e=`return new Promise(function(resolve){${r}})`,t=await Function(e)();n.postMessage({type:"response",data:t,id:s})}else{let e=Function(r)();n.postMessage({type:"response",data:e,id:s})}}catch(e){throw n.postMessage({type:"error",data:e.message,id:s}),e}}static inject(){if(!n.iframe)throw Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');n.postMessage({type:"inject"}),window.addEventListener("message",n.onMessage)}constructor({iframe:e,url:t}){if(e instanceof HTMLIFrameElement==!1)throw Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof t)throw Error('"option.url" needs to be a string');this.url=t,this.$iframe=e,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=()=>null,this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}onMessage(e){let{type:t,data:r,id:n}=e.data;"inject"===t&&(this.injected=!0),this.promises[n]&&("error"===t?this.promises[n].reject(Error(r)):this.promises[n].resove(r),delete this.promises[n]),this.messageCallback&&this.messageCallback({type:t,data:r})}postMessage({type:e,data:t}){return new Promise((r,n)=>{(function s(){if(this.destroyed)n(Error("The instance has been destroyed"));else if(this.injected){let s=Date.now();this.promises[s]={resove:r,reject:n},this.$iframe.contentWindow.postMessage({type:e,data:t,id:s},"*")}else setTimeout(s.bind(this),200)}).call(this)})}commit(e){if("function"!=typeof e)throw Error('"commit.callback" needs to be a function');let t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}message(e){if("function"!=typeof e)throw Error('"message.callback" needs to be a function');this.messageCallback=e}destroy(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}r.default=n,"undefined"!=typeof window&&(window.ArtplayerPluginIframe=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"hqP7A"}],hqP7A:[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})}},{}]},["ewmKy"],"ewmKy","parcelRequire94c2");
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var l=s[t]=new c.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return s[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[n]}}),i[n]=c;for(var f=0;f<t.length;f++)c(t[f]);if(r){var l=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define((function(){return l}))}}({akNoT:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return p}));var o=e("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(o),a=e("@swc/helpers/src/_class_call_check.mjs"),s=n.interopDefault(a),u=e("@swc/helpers/src/_create_class.mjs"),c=n.interopDefault(u),f=e("@swc/helpers/src/_ts_generator.mjs"),l=n.interopDefault(f),p=function(){"use strict";function e(t){var r=t.iframe,n=t.url;if((0,s.default)(this,e),r instanceof HTMLIFrameElement==!1)throw new Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof n)throw new Error('"option.url" needs to be a string');this.url=n,this.$iframe=r,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=function(){return null},this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}return(0,c.default)(e,[{key:"onMessage",value:function(e){var t=e.data,r=t.type,n=t.data,o=t.id;if("inject"===r)this.injected=!0;this.promises[o]&&("error"===r?this.promises[o].reject(new Error(n)):this.promises[o].resove(n),delete this.promises[o]),this.messageCallback&&this.messageCallback({type:r,data:n})}},{key:"postMessage",value:function(e){var t=e.type,r=e.data,n=this;return new Promise((function(e,o){(function n(){if(this.destroyed)o(new Error("The instance has been destroyed"));else if(this.injected){var i=Date.now();this.promises[i]={resove:e,reject:o},this.$iframe.contentWindow.postMessage({type:t,data:r,id:i},"*")}else setTimeout(n.bind(this),200)}).call(n)}))}},{key:"commit",value:function(e){if("function"!=typeof e)throw new Error('"commit.callback" needs to be a function');var t=e.toString(),r=t.substring(t.indexOf("{")+1,t.lastIndexOf("}"));return this.postMessage({type:"commit",data:r})}},{key:"message",value:function(e){if("function"!=typeof e)throw new Error('"message.callback" needs to be a function');this.messageCallback=e}},{key:"destroy",value:function(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}],[{key:"iframe",get:function(){return window.top!==window}},{key:"postMessage",value:function(t){var r=t.type,n=t.data,o=t.id,i=void 0===o?0:o;if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:r,data:n,id:i},"*")}},{key:"onMessage",value:function(t){return(0,i.default)((function(){var r,n,o,i,a,s,u,c;return(0,l.default)(this,(function(f){switch(f.label){case 0:if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');return r=t.data,n=r.type,o=r.data,i=r.id,"commit"===n?[3,1]:[3,7];case 1:return f.trys.push([1,5,,6]),o.match(/\bresolve\((.*?)\)/)?(a="return new Promise(function(resolve){\n".concat(o,"\n})"),[4,new Function(a)()]):[3,3];case 2:return s=f.sent(),e.postMessage({type:"response",data:s,id:i}),[3,4];case 3:u=new Function(o)(),e.postMessage({type:"response",data:u,id:i}),f.label=4;case 4:return[3,6];case 5:throw c=f.sent(),e.postMessage({type:"error",data:c.message,id:i}),c;case 6:case 7:return[3,8];case 8:return[2]}}))}))()}},{key:"inject",value:function(){if(!e.iframe)throw new Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');e.postMessage({type:"inject"}),window.addEventListener("message",e.onMessage)}}]),e}();"undefined"!=typeof window&&(window.ArtplayerPluginIframe=p)},{"@swc/helpers/src/_async_to_generator.mjs":"9vSoD","@swc/helpers/src/_class_call_check.mjs":"iwG1v","@swc/helpers/src/_create_class.mjs":"6rgu9","@swc/helpers/src/_ts_generator.mjs":"8UZjC","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9vSoD":[function(e,t,r){function n(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){retuLine truncated
!function(e,r,t,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(r,t){if(!s[r]){if(!e[r]){var o="function"==typeof i[n]&&i[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(c&&"string"==typeof r)return c(r);var f=Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(t){var n=e[r][1][t];return null!=n?n:t},p.cache={};var l=s[r]=new u.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return s[r].exports;function p(e){var r=p.resolve(e);return!1===r?{}:u(r)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=s,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var f=0;f<r.length;f++)u(r[f]);if(t){var l=u(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define(function(){return l})}}({f7Bbi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"default",function(){return c});var o=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_ts_generator"),c=function(){function e(r){var t=r.iframe,n=r.url;if((0,i._)(this,e),t instanceof HTMLIFrameElement==!1)throw Error('"option.iframe" needs to be a HTMLIFrameElement');if("string"!=typeof n)throw Error('"option.url" needs to be a string');this.url=n,this.$iframe=t,this.promises={},this.injected=!1,this.destroyed=!1,this.messageCallback=function(){return null},this.onMessage=this.onMessage.bind(this),window.addEventListener("message",this.onMessage),this.$iframe.src=this.url}return(0,a._)(e,[{key:"onMessage",value:function(e){var r=e.data,t=r.type,n=r.data,o=r.id;"inject"===t&&(this.injected=!0),this.promises[o]&&("error"===t?this.promises[o].reject(Error(n)):this.promises[o].resove(n),delete this.promises[o]),this.messageCallback&&this.messageCallback({type:t,data:n})}},{key:"postMessage",value:function(e){var r=this,t=e.type,n=e.data;return new Promise(function(e,o){(function r(){if(this.destroyed)o(Error("The instance has been destroyed"));else if(this.injected){var i=Date.now();this.promises[i]={resove:e,reject:o},this.$iframe.contentWindow.postMessage({type:t,data:n,id:i},"*")}else setTimeout(r.bind(this),200)}).call(r)})}},{key:"commit",value:function(e){if("function"!=typeof e)throw Error('"commit.callback" needs to be a function');var r=e.toString(),t=r.substring(r.indexOf("{")+1,r.lastIndexOf("}"));return this.postMessage({type:"commit",data:t})}},{key:"message",value:function(e){if("function"!=typeof e)throw Error('"message.callback" needs to be a function');this.messageCallback=e}},{key:"destroy",value:function(){this.destroyed=!0,window.removeEventListener("message",this.onMessage)}}],[{key:"iframe",get:function(){return window.top!==window}},{key:"postMessage",value:function(r){var t=r.type,n=r.data,o=r.id;if(!e.iframe)throw Error('The "ArtplayerPluginIframe.postMessage" method can only be used in iframe');window.parent.postMessage({type:t,data:n,id:void 0===o?0:o},"*")}},{key:"onMessage",value:function(r){return(0,o._)(function(){var t,n,o,i,a,c,u;return(0,s._)(this,function(s){switch(s.label){case 0:if(!e.iframe)throw Error('The "ArtplayerPluginIframe.onMessage" method can only be used in iframe');if(n=(t=r.data).type,o=t.data,i=t.id,"commit"===n)return[3,1];return[3,7];case 1:if(s.trys.push([1,5,,6]),!o.match(/\bresolve\((.*?)\)/))return[3,3];return[4,Function("return new Promise(function(resolve){\n".concat(o,"\n})"))()];case 2:return a=s.sent(),e.postMessage({type:"response",data:a,id:i}),[3,4];case 3:c=Function(o)(),e.postMessage({type:"response",data:c,id:i}),s.label=4;case 4:return[3,6];case 5:throw u=s.sent(),e.postMessage({type:"error",data:u.message,id:i}),u;case 6:case 7:return[3,8];case 8:return[2]}})})()}},{key:"inject",value:function(){if(!e.iframe)throw Error('The "ArtplayerPluginIframe.inject" method can only be used in iframe');e.postMessage({type:"inject"}),window.addEventListener("message",e.onMessage)}}]),e}();"undefined"!=typeof window&&(window.ArtplayerPluginIframe=c)},{"@swc/helpers/_/_async_to_generator":"h1sPa","@swc/helpers/_/_class_call_check":"dEM7t","@swc/helpers/_/_create_class":"gHxfl","@swc/helpers/_/_ts_generator":"ilbUJ","@parcel/transformer-js/src/esmodule-helpers.js":"jOuxX"}],h1sPa:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,r,t,n,o,i,a){try{var s=e[i](a),c=s.value}catch(e){t(e);return}s.done?r(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var r=this,t=arguments;return new Promise(function(n,i){var a=e.apply(r,t);function s(e){Line truncated
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,s,r,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[r]&&a[r],o=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,s){if(!o[t]){if(!e[t]){var n="function"==typeof a[r]&&a[r];if(!s&&n)return n(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var d=new Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}v.resolve=function(s){var r=e[t][1][s];return null!=r?r:s},v.cache={};var u=o[t]=new c.Module(t);e[t][0].call(u.exports,v,u,u.exports,this)}return o[t].exports;function v(e){var t=v.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=o,c.parent=i,c.register=function(t,s){e[t]=[function(e,t){t.exports=s},{}]},Object.defineProperty(c,"root",{get:function(){return a[r]}}),a[r]=c;for(var d=0;d<t.length;d++)c(t[d]);if(s){var u=c(s);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({abjMI:[function(e,t,s){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(s);var n=e("./adapter"),a=r.interopDefault(n);function i(e){return t=>{const s=new(0,a.default)(t,e);return{name:"artplayerPluginLibass",libass:s.libass,visible:s.visible,init:s.init.bind(s),switch:s.switch.bind(s),show:s.show.bind(s),hide:s.hide.bind(s),destroy:s.destroy.bind(s)}}}s.default=i,"undefined"!=typeof window&&(window.artplayerPluginLibass=i)},{"./adapter":"cjgNP","@parcel/transformer-js/src/esmodule-helpers.js":"6N8qz"}],cjgNP:[function(e,t,s){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(s);var n=e("libass-wasm"),a=r.interopDefault(n);s.default=class{constructor(e,t){const{constructor:s,template:r}=e;this.art=e,this.$video=r.$video,this.$webvtt=r.$subtitle,this.utils=s.utils,this.libass=null,e.once("ready",this.init.bind(this,t))}async init(e){this.#e(),await this.#t(e),this.#s(),this.art.emit("artplayerPluginLibass:init",this);const t=this.art?.option?.subtitle?.url;t&&"ass"===this.utils.getExt(t)&&this.switch(t)}switch(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl(this.#r(e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}setVisibility(e){this.visible=e}setOffset(e){this.timeOffset=e}get active(){return"ass"===this.currentType}get visible(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display}set visible(e){this.art.emit("artplayerPluginLibass:visible",e),this.#n(!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}get timeOffset(){return this.libass.timeOffset}set timeOffset(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}show(){this.visible=!0}hide(){this.visible=!1}destroy(){this.art.emit("artplayerPluginLibass:destroy"),this.#a(),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}async#t(e={}){if(!e.fallbackFont)return this.utils.errorHandle(e.fallbackFont,"artplayerPluginLibass: fallbackFont is required");e.workerUrl||(e.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),e.availableFonts&&(e.availableFonts=Object.entries(e.availableFonts).reduce(((e,[t,s])=>(e[t]=this.#r(s),e)),{})),this.libass=new(0,a.default)({subContent:"[Script Info]\nScriptType: v4.00+",video:this.$video,...e,workerUrl:await this.#i(e),fallbackFont:this.#r(e.fallbackFont),fonts:e.fonts?.map((e=>this.#r(e)))}),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n user-select: none;\n pointer-events: none;\n z-index: 20;"}#s(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}#a(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}#n(e){this.$webvtt.style.visibility=e?"visible":"hidden"}#r(e){return this.#o(e)?e:new URL(e,document.baseURI).toString()}#o(e){return/^https?:\/\//.test(e)}#i({workerUrl:e,wasmUrl:t}){return new Promise((s=>{fetch(e).then((e=>e.text())).then((r=>{let n=r;n=n.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,((s,r)=>`wasmBinaryFile = "${t=t?thLine truncated
!function(e,t,r,s,n){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[s]&&a[s],o=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!o[t]){if(!e[t]){var n="function"==typeof a[s]&&a[s];if(!r&&n)return n(t,!0);if(i)return i(t,!0);if(l&&"string"==typeof t)return l(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}v.resolve=function(r){var s=e[t][1][r];return null!=s?s:r},v.cache={};var u=o[t]=new c.Module(t);e[t][0].call(u.exports,v,u,u.exports,this)}return o[t].exports;function v(e){var t=v.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=o,c.parent=i,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[s]}}),a[s]=c;for(var d=0;d<t.length;d++)c(t[d]);if(r){var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({abjMI:[function(e,t,r){var s=e("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r),s.export(r,"default",()=>i);var n=e("./adapter"),a=s.interopDefault(n);function i(e){return t=>{let r=new a.default(t,e);return{name:"artplayerPluginLibass",libass:r.libass,visible:r.visible,init:r.init.bind(r),switch:r.switch.bind(r),show:r.show.bind(r),hide:r.hide.bind(r),destroy:r.destroy.bind(r)}}}"undefined"!=typeof window&&(window.artplayerPluginLibass=i)},{"./adapter":"cjgNP","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],cjgNP:[function(e,t,r){var s=e("@parcel/transformer-js/src/esmodule-helpers.js");s.defineInteropFlag(r);var n=e("libass-wasm"),a=s.interopDefault(n);let i=`[Script Info] ScriptType:v4.00+`;r.default=class{constructor(e,t){let{constructor:r,template:s}=e;this.art=e,this.$video=s.$video,this.$webvtt=s.$subtitle,this.utils=r.utils,this.libass=null,e.once("ready",this.init.bind(this,t))}async init(e){this.#e(),await this.#t(e),this.#r(),this.art.emit("artplayerPluginLibass:init",this);let t=this.art?.option?.subtitle?.url;t&&"ass"===this.utils.getExt(t)&&this.switch(t)}switch(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl(this.#s(e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}setVisibility(e){this.visible=e}setOffset(e){this.timeOffset=e}get active(){return"ass"===this.currentType}get visible(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display}set visible(e){this.art.emit("artplayerPluginLibass:visible",e),this.#n(!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}get timeOffset(){return this.libass.timeOffset}set timeOffset(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}show(){this.visible=!0}hide(){this.visible=!1}destroy(){this.art.emit("artplayerPluginLibass:destroy"),this.#a(),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}async #t(e={}){if(!e.fallbackFont)return this.utils.errorHandle(e.fallbackFont,"artplayerPluginLibass:fallbackFont is required");e.workerUrl||(e.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),e.availableFonts&&(e.availableFonts=Object.entries(e.availableFonts).reduce((e,[t,r])=>(e[t]=this.#s(r),e),{})),this.libass=new a.default({subContent:i,video:this.$video,...e,workerUrl:await this.#i(e),fallbackFont:this.#s(e.fallbackFont),fonts:e.fonts?.map(e=>this.#s(e))}),this.libass.canvasParent.className="artplayer-plugin-libass",this.libass.canvasParent.style.cssText=` position:absolute;top:0;left:0;width:100%;height:100%;user-select:none;pointer-events:none;z-index:20;`}#r(){this.switchHandler=this.switch.bind(this),this.visibleHandler=this.setVisibility.bind(this),this.offsetHandler=this.setOffset.bind(this),this.art.on("subtitle",this.visibleHandler),this.art.on("subtitleLoad",this.switchHandler),this.art.on("subtitleOffset",this.offsetHandler),this.art.once("destroy",this.destroy.bind(this))}#a(){this.art.off("subtitle",this.visibleHandler),this.art.off("subtitleLoad",this.switchHandler),this.art.off("subtitleOffset",this.offsetHandler)}#n(e){this.$webvtt.style.visibility=e?"visible":"hidden"}#s(e){return this.#o(e)?e:new URL(e,document.baseURI).toString()}#o(e){return/^https?:\/\//.test(e)}#i({workerUrl:e,wasmUrl:t}){return new Promise(r=>{fetch(e).then(e=>e.text()).then(s=>{let n=s,a=new Blob([n=n.replace(/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,(r,s)=>(t=t?this.#s(t):new URL(s,e).toString(),`wasmBinaryFile = "${t}"`))],{type:"text/javascript"});r(URL.createObjectURL(a))})})}#e(){let e=!1;Line truncated
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],i=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!i[t]){if(!e[t]){var o="function"==typeof s[n]&&s[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var u=new Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},d.cache={};var f=i[t]=new c.Module(t);e[t][0].call(f.exports,d,f,f.exports,this)}return i[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=i,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return s[n]}}),s[n]=c;for(var u=0;u<t.length;u++)c(t[u]);if(r){var f=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}}({"7Csdv":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("./adapter"),s=n.interopDefault(o);function a(e){return function(t){var r=new(0,s.default)(t,e);return{name:"artplayerPluginLibass",libass:r.libass,visible:r.visible,init:r.init.bind(r),switch:r.switch.bind(r),show:r.show.bind(r),hide:r.hide.bind(r),destroy:r.destroy.bind(r)}}}r.default=a,"undefined"!=typeof window&&(window.artplayerPluginLibass=a)},{"./adapter":"9NihZ","@parcel/transformer-js/src/esmodule-helpers.js":"8MTyn"}],"9NihZ":[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 o=e("@swc/helpers/src/_async_to_generator.mjs"),s=n.interopDefault(o),a=e("@swc/helpers/src/_class_call_check.mjs"),i=n.interopDefault(a),l=e("@swc/helpers/src/_class_private_method_get.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_class_private_method_init.mjs"),f=n.interopDefault(u),d=e("@swc/helpers/src/_create_class.mjs"),p=n.interopDefault(d),h=e("@swc/helpers/src/_object_spread.mjs"),v=n.interopDefault(h),m=e("@swc/helpers/src/_object_spread_props.mjs"),y=n.interopDefault(m),b=e("@swc/helpers/src/_sliced_to_array.mjs"),w=n.interopDefault(b),g=e("@swc/helpers/src/_ts_generator.mjs"),j=n.interopDefault(g),_=e("libass-wasm"),k=n.interopDefault(_),x="[Script Info]\nScriptType: v4.00+",O=new WeakSet,E=new WeakSet,T=new WeakSet,M=new WeakSet,P=new WeakSet,L=new WeakSet,F=new WeakSet,C=new WeakSet,S=function(){"use strict";function e(t,r){(0,i.default)(this,e),(0,f.default)(this,O),(0,f.default)(this,E),(0,f.default)(this,T),(0,f.default)(this,M),(0,f.default)(this,P),(0,f.default)(this,L),(0,f.default)(this,F),(0,f.default)(this,C);var n=t.constructor,o=t.template;this.art=t,this.$video=o.$video,this.$webvtt=o.$subtitle,this.utils=n.utils,this.libass=null,t.once("ready",this.init.bind(this,r))}return(0,p.default)(e,[{key:"init",value:function(e){var t=this;return(0,s.default)((function(){var r,n,o,s;return(0,j.default)(this,(function(a){switch(a.label){case 0:return(0,c.default)(t,C,B).call(t),[4,(0,c.default)(t,O,A).call(t,e)];case 1:return a.sent(),(0,c.default)(t,E,R).call(t),t.art.emit("artplayerPluginLibass:init",t),(s=null===(r=t.art)||void 0===r||null===(n=r.option)||void 0===n||null===(o=n.subtitle)||void 0===o?void 0:o.url)&&"ass"===t.utils.getExt(s)&&t.switch(s),[2]}}))}))()}},{key:"switch",value:function(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl((0,c.default)(this,P,U).call(this,e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}},{key:"setVisibility",value:function(e){this.visible=e}},{key:"setOffset",value:function(e){this.timeOffset=e}},{key:"active",get:function(){return"ass"===this.currentType}},{key:"visible",get:function(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display},set:function(e){this.art.emit("artplayerPluginLibass:visible",e),(0,c.default)(this,M,D).call(this,!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}},{key:"timeOffset",get:function(){return this.libass.timeOffset},set:function(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}},{key:"show",value:function(){this.visible=!0}},{key:"hide",value:function(){this.visible=!1}},{key:"destroy",value:function(){this.art.emit("artplayerPluginLibass:destroy"),(0,c.default)(this,T,W).call(this),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}}]),e}();function A(){return I.apply(this,arguments)}function I(){return I=(0,s.default)((function(){var eLine truncated
!function(e,t,r,n,o){var s="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof s[n]&&s[n],i=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(t,r){if(!i[t]){if(!e[t]){var o="function"==typeof s[n]&&s[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=i[t]=new l.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return i[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:l(t)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=i,l.parent=a,l.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return s[n]}}),s[n]=l;for(var u=0;u<t.length;u++)l(t[u]);if(r){var f=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({"7Csdv":[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 o=e("./adapter"),s=n.interopDefault(o);function a(e){return function(t){var r=new s.default(t,e);return{name:"artplayerPluginLibass",libass:r.libass,visible:r.visible,init:r.init.bind(r),switch:r.switch.bind(r),show:r.show.bind(r),hide:r.hide.bind(r),destroy:r.destroy.bind(r)}}}"undefined"!=typeof window&&(window.artplayerPluginLibass=a)},{"./adapter":"9NihZ","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9NihZ":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return k});var o=e("@swc/helpers/_/_async_to_generator"),s=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_class_private_method_get"),i=e("@swc/helpers/_/_class_private_method_init"),c=e("@swc/helpers/_/_create_class"),l=e("@swc/helpers/_/_object_spread"),u=e("@swc/helpers/_/_object_spread_props"),f=e("@swc/helpers/_/_sliced_to_array"),p=e("@swc/helpers/_/_ts_generator"),d=e("libass-wasm"),h=n.interopDefault(d),v=new WeakSet,m=new WeakSet,y=new WeakSet,_=new WeakSet,b=new WeakSet,g=new WeakSet,w=new WeakSet,j=new WeakSet,k=function(){function e(t,r){(0,s._)(this,e),(0,i._)(this,v),(0,i._)(this,m),(0,i._)(this,y),(0,i._)(this,_),(0,i._)(this,b),(0,i._)(this,g),(0,i._)(this,w),(0,i._)(this,j);var n=t.constructor,o=t.template;this.art=t,this.$video=o.$video,this.$webvtt=o.$subtitle,this.utils=n.utils,this.libass=null,t.once("ready",this.init.bind(this,r))}return(0,c._)(e,[{key:"init",value:function(e){var t=this;return(0,o._)(function(){var r,n,o,s;return(0,p._)(this,function(i){switch(i.label){case 0:return(0,a._)(t,j,F).call(t),[4,(0,a._)(t,v,x).call(t,e)];case 1:return i.sent(),(0,a._)(t,m,E).call(t),t.art.emit("artplayerPluginLibass:init",t),(s=null===(o=t.art)||void 0===o?void 0:null===(n=o.option)||void 0===n?void 0:null===(r=n.subtitle)||void 0===r?void 0:r.url)&&"ass"===t.utils.getExt(s)&&t.switch(s),[2]}})})()}},{key:"switch",value:function(e){this.art.emit("artplayerPluginLibass:switch",e),e&&"ass"===this.utils.getExt(e)?(this.currentType="ass",this.libass.freeTrack(),this.libass.setTrackByUrl((0,a._)(this,b,P).call(this,e)),this.visible=this.art.subtitle.show):(this.currentType="webvtt",this.hide(),this.libass.freeTrack())}},{key:"setVisibility",value:function(e){this.visible=e}},{key:"setOffset",value:function(e){this.timeOffset=e}},{key:"active",get:function(){return"ass"===this.currentType}},{key:"visible",get:function(){return!!this.libass&&"none"!==this.libass.canvasParent.style.display},set:function(e){this.art.emit("artplayerPluginLibass:visible",e),(0,a._)(this,_,M).call(this,!this.active),this.libass.canvasParent&&(this.libass.canvasParent.style.display=e?"block":"none",e&&this.libass.resize())}},{key:"timeOffset",get:function(){return this.libass.timeOffset},set:function(e){this.art.emit("artplayerPluginLibass:timeOffset",e),this.libass.timeOffset=e}},{key:"show",value:function(){this.visible=!0}},{key:"hide",value:function(){this.visible=!1}},{key:"destroy",value:function(){this.art.emit("artplayerPluginLibass:destroy"),(0,a._)(this,y,T).call(this),this.libass.dispose(),URL.revokeObjectURL(this.workerScriptUrl),this.libass=null}}]),e}();function x(){return O.apply(this,arguments)}function O(){return(O=(0,o._)(function(){var e,t,r,n,o,s,i,c=arguments;return(0,p._)(this,function(p){switch(p.label){case 0:if(e=this,!(t=c.length>0&&void 0!==c[0]?c[0]:{}).fallbackFont)return[2,this.utils.errorHandle(t.fallbackFont,"artplayerPluginLibass:fallbackFont is required")];return t.workerUrl||(t.workerUrl="https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js"),t.availableFonts&&(t.availaLine truncated
+85 -88
View File
@@ -1,127 +1,125 @@
import SubtitlesOctopus from "libass-wasm"
import SubtitlesOctopus from 'libass-wasm';
const defaultAssSubtitle = `[Script Info]\nScriptType: v4.00+`
const defaultAssSubtitle = `[Script Info]\nScriptType: v4.00+`;
export default class LibassAdapter {
constructor(art, option) {
const { constructor, template } = art
const { constructor, template } = art;
this.art = art
this.$video = template.$video
this.$webvtt = template.$subtitle
this.utils = constructor.utils
this.art = art;
this.$video = template.$video;
this.$webvtt = template.$subtitle;
this.utils = constructor.utils;
this.libass = null
this.libass = null;
art.once("ready", this.init.bind(this, option))
art.once('ready', this.init.bind(this, option));
}
async init(option) {
this.#checkWebAssemblySupport()
this.#checkWebAssemblySupport();
await this.#createLibass(option)
await this.#createLibass(option);
this.#addEventListeners()
this.#addEventListeners();
this.art.emit("artplayerPluginLibass:init", this)
this.art.emit('artplayerPluginLibass:init', this);
// set initial subtitle
const initialSubtitle = this.art?.option?.subtitle?.url
if (initialSubtitle && this.utils.getExt(initialSubtitle) === "ass") {
this.switch(initialSubtitle)
const initialSubtitle = this.art?.option?.subtitle?.url;
if (initialSubtitle && this.utils.getExt(initialSubtitle) === 'ass') {
this.switch(initialSubtitle);
}
}
switch(url) {
this.art.emit("artplayerPluginLibass:switch", url)
this.art.emit('artplayerPluginLibass:switch', url);
if (url && this.utils.getExt(url) === "ass") {
this.currentType = "ass"
this.libass.freeTrack()
this.libass.setTrackByUrl(this.#toAbsoluteUrl(url))
if (url && this.utils.getExt(url) === 'ass') {
this.currentType = 'ass';
this.libass.freeTrack();
this.libass.setTrackByUrl(this.#toAbsoluteUrl(url));
this.visible = this.art.subtitle.show
this.visible = this.art.subtitle.show;
} else {
this.currentType = "webvtt"
this.hide()
this.libass.freeTrack()
this.currentType = 'webvtt';
this.hide();
this.libass.freeTrack();
}
}
setVisibility(visible) {
this.visible = visible
this.visible = visible;
}
setOffset(offset) {
this.timeOffset = offset
this.timeOffset = offset;
}
get active() {
return this.currentType === 'ass'
return this.currentType === 'ass';
}
get visible() {
if (!this.libass)
return false
if (!this.libass) return false;
return this.libass.canvasParent.style.display !== "none"
return this.libass.canvasParent.style.display !== 'none';
}
set visible(visible) {
this.art.emit("artplayerPluginLibass:visible", visible)
this.art.emit('artplayerPluginLibass:visible', visible);
this.#setVttVisible(!this.active)
this.#setVttVisible(!this.active);
if (this.libass.canvasParent) {
this.libass.canvasParent.style.display = visible ? "block" : "none"
this.libass.canvasParent.style.display = visible ? 'block' : 'none';
if (visible) this.libass.resize()
if (visible) this.libass.resize();
}
}
get timeOffset() {
return this.libass.timeOffset
return this.libass.timeOffset;
}
set timeOffset(offset) {
this.art.emit("artplayerPluginLibass:timeOffset", offset)
this.libass.timeOffset = offset
this.art.emit('artplayerPluginLibass:timeOffset', offset);
this.libass.timeOffset = offset;
}
show() {
this.visible = true
this.visible = true;
}
hide() {
this.visible = false
this.visible = false;
}
destroy() {
this.art.emit("artplayerPluginLibass:destroy")
this.art.emit('artplayerPluginLibass:destroy');
this.#removeEventListeners()
this.#removeEventListeners();
this.libass.dispose()
URL.revokeObjectURL(this.workerScriptUrl)
this.libass = null
this.libass.dispose();
URL.revokeObjectURL(this.workerScriptUrl);
this.libass = null;
}
async #createLibass(option = {}) {
if (!option.fallbackFont) {
return this.utils.errorHandle(option.fallbackFont, 'artplayerPluginLibass: fallbackFont is required')
return this.utils.errorHandle(option.fallbackFont, 'artplayerPluginLibass: fallbackFont is required');
}
if (!option.workerUrl) {
option.workerUrl = 'https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js'
option.workerUrl =
'https://cdnjs.cloudflare.com/ajax/libs/libass-wasm/4.1.0/js/subtitles-octopus-worker.js';
}
if (option.availableFonts) {
option.availableFonts = Object
.entries(option.availableFonts)
.reduce((acc, [key, value]) => {
acc[key] = this.#toAbsoluteUrl(value)
return acc
}, {})
option.availableFonts = Object.entries(option.availableFonts).reduce((acc, [key, value]) => {
acc[key] = this.#toAbsoluteUrl(value);
return acc;
}, {});
}
this.libass = new SubtitlesOctopus({
@@ -131,9 +129,9 @@ export default class LibassAdapter {
workerUrl: await this.#loadWorker(option),
fallbackFont: this.#toAbsoluteUrl(option.fallbackFont),
fonts: option.fonts?.map((font) => this.#toAbsoluteUrl(font)),
})
});
this.libass.canvasParent.className = "artplayer-plugin-libass"
this.libass.canvasParent.className = 'artplayer-plugin-libass';
this.libass.canvasParent.style.cssText = `
position: absolute;
top: 0;
@@ -142,81 +140,80 @@ export default class LibassAdapter {
height: 100%;
user-select: none;
pointer-events: none;
z-index: 20;`
z-index: 20;`;
}
#addEventListeners() {
this.switchHandler = this.switch.bind(this)
this.visibleHandler = this.setVisibility.bind(this)
this.offsetHandler = this.setOffset.bind(this)
this.switchHandler = this.switch.bind(this);
this.visibleHandler = this.setVisibility.bind(this);
this.offsetHandler = this.setOffset.bind(this);
this.art.on("subtitle", this.visibleHandler)
this.art.on('subtitleLoad', this.switchHandler)
this.art.on("subtitleOffset", this.offsetHandler)
this.art.on('subtitle', this.visibleHandler);
this.art.on('subtitleLoad', this.switchHandler);
this.art.on('subtitleOffset', this.offsetHandler);
this.art.once("destroy", this.destroy.bind(this))
this.art.once('destroy', this.destroy.bind(this));
}
#removeEventListeners() {
this.art.off("subtitle", this.visibleHandler)
this.art.off('subtitleLoad', this.switchHandler)
this.art.off("subtitleOffset", this.offsetHandler)
this.art.off('subtitle', this.visibleHandler);
this.art.off('subtitleLoad', this.switchHandler);
this.art.off('subtitleOffset', this.offsetHandler);
}
#setVttVisible(visible) {
this.$webvtt.style.visibility = visible ? 'visible' : 'hidden'
this.$webvtt.style.visibility = visible ? 'visible' : 'hidden';
}
#toAbsoluteUrl(url) {
if (this.#isAbsoluteUrl(url))
return url
if (this.#isAbsoluteUrl(url)) return url;
// handle absolute URL when the `Worker` of `BLOB` type loading network resources
return new URL(url, document.baseURI).toString()
return new URL(url, document.baseURI).toString();
}
#isAbsoluteUrl(url) {
return /^https?:\/\//.test(url)
return /^https?:\/\//.test(url);
}
#loadWorker({ workerUrl, wasmUrl }) {
return new Promise((resolve) => {
fetch(workerUrl)
.then(res => res.text())
.then(text => {
let workerScriptContent = text
.then((res) => res.text())
.then((text) => {
let workerScriptContent = text;
workerScriptContent = workerScriptContent.replace(
/wasmBinaryFile\s*=\s*"(subtitles-octopus-worker\.wasm)"/g,
(_match, wasm) => {
if (!wasmUrl) {
wasmUrl = new URL(wasm, workerUrl).toString()
wasmUrl = new URL(wasm, workerUrl).toString();
} else {
wasmUrl = this.#toAbsoluteUrl(wasmUrl)
wasmUrl = this.#toAbsoluteUrl(wasmUrl);
}
return `wasmBinaryFile = "${wasmUrl}"`
}
)
return `wasmBinaryFile = "${wasmUrl}"`;
},
);
const workerBlob = new Blob([workerScriptContent], { type: "text/javascript" })
resolve(URL.createObjectURL(workerBlob))
})
})
const workerBlob = new Blob([workerScriptContent], { type: 'text/javascript' });
resolve(URL.createObjectURL(workerBlob));
});
});
}
#checkWebAssemblySupport() {
let supportsWebAssembly = false
let supportsWebAssembly = false;
try {
if (typeof WebAssembly === "object" && typeof WebAssembly.instantiate === "function") {
const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00))
if (typeof WebAssembly === 'object' && typeof WebAssembly.instantiate === 'function') {
const module = new WebAssembly.Module(Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00));
if (module instanceof WebAssembly.Module)
supportsWebAssembly = (new WebAssembly.Instance(module) instanceof WebAssembly.Instance)
supportsWebAssembly = new WebAssembly.Instance(module) instanceof WebAssembly.Instance;
}
} catch (e) {
//
}
this.utils.errorHandle(supportsWebAssembly, "Browser does not support WebAssembly")
this.utils.errorHandle(supportsWebAssembly, 'Browser does not support WebAssembly');
}
}
@@ -1,9 +1,9 @@
import type Artplayer from 'artplayer';
import type SubtitlesOctopus from "@hrgui/libass-wasm-ts"
import { type Options } from "libass-wasm"
import type SubtitlesOctopus from '@hrgui/libass-wasm-ts';
import { type Options } from 'libass-wasm';
export = artplayerPluginAss
export as namespace artplayerPluginAss
export = artplayerPluginAss;
export as namespace artplayerPluginAss;
declare const artplayerPluginAss: (options: Options) => (art: Artplayer) => {
name: 'artplayerPluginLibass';
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[i]&&a[i],o=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!o[t]){if(!e[t]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},d.cache={};var c=o[t]=new u.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return o[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=o,u.parent=s,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var f=0;f<t.length;f++)u(t[f]);if(n){var c=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({"4Kbf6":[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);var i=e("./parser");function r({subtitles:e=[]}){return async t=>{const{unescape:n,getExt:r,srtToVtt:a,assToVtt:s}=t.constructor.utils,o=new(0,i.WebVTTParser),l=new(0,i.WebVTTSerializer),u=await Promise.all(e.map((e=>async function(e,{getExt:t,srtToVtt:n,assToVtt:i}){const r=await fetch(e.url),a=await r.arrayBuffer(),s=new TextDecoder(e.encoding||"utf-8").decode(a);switch(e.type||t(e.url)){case"srt":return n(s);case"ass":return i(s);case"vtt":return s;default:return""}}(e,{getExt:r,srtToVtt:a,assToVtt:s})))),f=u.map(((t,n)=>{const i=o.parse(t,"metadata");return i.url=e[n].url,i.name=e[n].name,i}));let c="";function d(e=[]){const r=function(e){const t=(new(0,i.WebVTTParser)).parse("","metadata");for(let n=0;n<e.length;n++){const i=e[n];if(!i.updated){i.updated=!0;for(let e=0;e<i.cues.length;e++){const t=i.cues[e];for(let e=0;e<t.tree.children.length;e++){const n=t.tree.children[e];n.value=`<div class="art-subtitle-${i.name}">${n.value}</div>`}}}if(0===t.cues.length)t.cues=[...i.cues];else for(let e=0;e<t.cues.length;e++){const n=t.cues[e].tree.children,r=i.cues[e]?.tree?.children;t.cues[e]={...t.cues[e],tree:{children:[...n,...r]}}}}return t}(e),a=l.serialize(r.cues);URL.revokeObjectURL(c);const s=URL.createObjectURL(new Blob([a],{type:"text/vtt"}));c=s,t.option.subtitle.escape=!1,t.subtitle.init({...t.option.subtitle,url:s,type:"vtt",onVttLoad:n})}return d(f),{name:"multipleSubtitles",tracks:(e=[])=>d(e.map((e=>f.find((t=>t.name===e))))),reset:()=>d(f)}}}n.default=r,"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=r)},{"./parser":"cU78l","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cU78l:[function(e,t,n){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&amp":"&","&lt":"<","&gt":">","&lrm":"‎","&rlm":"‏","&nbsp":" "}),this.entities=t,this.parse=function(n,a){n=n.replace(/\0/g,"�");var s=Date.now(),o=0,l=n.split(/\r\n|\r|\n/),u=!1,f=[],c=[],d=[];function p(e,t){d.push({message:e,line:o+1,col:t})}var m=l[o],g=m.length,h="WEBVTT",v=0,b=h.length;for("\ufeff"===m[0]&&(v=1,b+=1),(g<b||m.indexOf(h)!==0+v||g>b&&" "!==m[b]&&"\t"!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),o++;""!=l[o]&&null!=l[o];){if(p("No blank line after the signature."),-1!=l[o].indexOf("--\x3e")){u=!0;break}o++}for(;null!=l[o];){for(var T;!u&&""==l[o];)o++;if(!u&&null==l[o])break;T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var x=!0;if(-1==l[o].indexOf("--\x3e")){if(T.id=l[o],/^NOTE($|[ \t])/.test(T.id)){for(o++;""!=l[o]&&null!=l[o];)-1!=l[o].indexOf("--\x3e")&&p("Cannot have timestamp in a comment."),o++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var y=[],w=!1;for(o++;""!=l[o]&&null!=l[o];)-1!=l[o].indexOf("--\x3e")&&(p("Cannot have timestamp in a style block."),w=!0),y.push(l[o]),o++;if(c.length){p("Style blocks cannot appear after the first cue.");continue}w||f.push(y.join("\n"));continue}if(""==l[++o]||null==l[o]){p("Cue identifier cannot be standalone.");continue}if(-1==l[o].indexOf("--\x3e")){x=!1,p("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var O=new i(l[o],p),P=0;if(c.length>0&&(P=c[c.length-1].startTime),!x||O.parse(T,P)){for(o++;""!=l[o]&&null!=l[o];){if(-1!=l[o].indexOf("--\x3e")){p("Blank line missing before cue."),u=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[o],o++}var j=new r(T.text,p,a,t);T.tree=j.parse(T.startTime,T.endTime),c.push(T)}else for(T=Line truncated
!function(e,t,n,i,r){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[i]&&a[i],o=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!o[t]){if(!e[t]){var r="function"==typeof a[i]&&a[i];if(!n&&r)return r(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}d.resolve=function(n){var i=e[t][1][n];return null!=i?i:n},d.cache={};var c=o[t]=new u.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return o[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=o,u.parent=s,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return a[i]}}),a[i]=u;for(var f=0;f<t.length;f++)u(t[f]);if(n){var c=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({bt91X:[function(e,t,n){var i=e("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n),i.export(n,"default",()=>s);var r=e("./parser");async function a(e,{getExt:t,srtToVtt:n,assToVtt:i}){let r=await fetch(e.url),a=await r.arrayBuffer(),s=new TextDecoder(e.encoding||"utf-8").decode(a);switch(e.type||t(e.url)){case"srt":return n(s);case"ass":return i(s);case"vtt":return s;default:return""}}function s({subtitles:e=[]}){return async t=>{let{unescape:n,getExt:i,srtToVtt:s,assToVtt:o}=t.constructor.utils,l=new r.WebVTTParser,u=new r.WebVTTSerializer,f=(await Promise.all(e.map(e=>a(e,{getExt:i,srtToVtt:s,assToVtt:o})))).map((t,n)=>{let i=l.parse(t,"metadata");return i.url=e[n].url,i.name=e[n].name,i}),c="";function d(e=[]){let i=function(e){let t=new r.WebVTTParser().parse("","metadata");for(let n=0;n<e.length;n++){let i=e[n];if(!i.updated){i.updated=!0;for(let e=0;e<i.cues.length;e++){let t=i.cues[e];for(let e=0;e<t.tree.children.length;e++){let n=t.tree.children[e];n.value=`<div class="art-subtitle-${i.name}">${n.value}</div>`}}}if(0===t.cues.length)t.cues=[...i.cues];else for(let e=0;e<t.cues.length;e++){let n=t.cues[e].tree.children,r=i.cues[e]?.tree?.children;t.cues[e]={...t.cues[e],tree:{children:[...n,...r]}}}}return t}(e),a=u.serialize(i.cues);URL.revokeObjectURL(c);let s=URL.createObjectURL(new Blob([a],{type:"text/vtt"}));c=s,t.option.subtitle.escape=!1,t.subtitle.init({...t.option.subtitle,url:s,type:"vtt",onVttLoad:n})}return d(f),{name:"multipleSubtitles",tracks:(e=[])=>d(e.map(e=>f.find(t=>t.name===e))),reset:()=>d(f)}}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=s)},{"./parser":"e4aAa","@parcel/transformer-js/src/esmodule-helpers.js":"hqP7A"}],e4aAa:[function(e,t,n){!function(){var e={direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center"},t=function(t){t||(t={"&amp":"&","&lt":"<","&gt":">","&lrm":"‎","&rlm":"‏","&nbsp":" "}),this.entities=t,this.parse=function(n,a){n=n.replace(/\0/g,"�");var s=Date.now(),o=0,l=n.split(/\r\n|\r|\n/),u=!1,f=[],c=[],d=[];function p(e,t){d.push({message:e,line:o+1,col:t})}var m=l[o],g=m.length,h="WEBVTT",v=0,b=h.length;for("\uFEFF"===m[0]&&(v=1,b+=1),(g<b||m.indexOf(h)!==0+v||g>b&&" "!==m[b]&&" "!==m[b])&&p('No valid signature. (File needs to start with "WEBVTT".)'),o++;""!=l[o]&&void 0!=l[o];){if(p("No blank line after the signature."),-1!=l[o].indexOf("-->")){u=!0;break}o++}for(;void 0!=l[o];){for(;!u&&""==l[o];)o++;if(!u&&void 0==l[o])break;T=Object.assign({},e,{id:"",startTime:0,endTime:0,pauseOnExit:!1,direction:"horizontal",snapToLines:!0,linePosition:"auto",lineAlign:"start",textPosition:"auto",positionAlign:"auto",size:100,alignment:"center",text:"",tree:null});var T,y=!0;if(-1==l[o].indexOf("-->")){if(T.id=l[o],/^NOTE($|[ \t])/.test(T.id)){for(o++;""!=l[o]&&void 0!=l[o];)-1!=l[o].indexOf("-->")&&p("Cannot have timestamp in a comment."),o++;continue}if(/^STYLE($|[ \t])/.test(T.id)){var x=[],w=!1;for(o++;""!=l[o]&&void 0!=l[o];)-1!=l[o].indexOf("-->")&&(p("Cannot have timestamp in a style block."),w=!0),x.push(l[o]),o++;if(c.length){p("Style blocks cannot appear after the first cue.");continue}w||f.push(x.join("\n"));continue}if(""==l[++o]||void 0==l[o]){p("Cue identifier cannot be standalone.");continue}if(-1==l[o].indexOf("-->")){y=!1,p("Cue identifier needs to be followed by timestamp.");continue}}u=!1;var O=new i(l[o],p),P=0;if(c.length>0&&(P=c[c.length-1].startTime),y&&!O.parse(T,P)){for(T=null,o++;""!=l[o]&&void 0!=l[o];){if(-1!=l[o].indexOf("-->")){u=!0;break}o++}continue}for(o++;""!=l[o]&&void 0!=l[o];){if(-1!=l[o].indexOf("-->")){p("Blank line missing before cue."),u=!0;break}""!=T.text&&(T.text+="\n"),T.text+=l[o],o++}var A=new r(T.text,p,a,t);Line truncated
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,i){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof o[r]&&o[r],s=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,n){if(!s[t]){if(!e[t]){var i="function"==typeof o[r]&&o[r];if(!n&&i)return i(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},p.cache={};var f=s[t]=new u.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return s[t].exports;function p(e){var t=p.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=a,u.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(u,"root",{get:function(){return o[r]}}),o[r]=u;for(var c=0;c<t.length;c++)u(t[c]);if(n){var f=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}}({"2hz0c":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var i=e("@swc/helpers/src/_async_to_generator.mjs"),o=r.interopDefault(i),a=e("@swc/helpers/src/_object_spread.mjs"),s=r.interopDefault(a),l=e("@swc/helpers/src/_object_spread_props.mjs"),u=r.interopDefault(l),c=e("@swc/helpers/src/_to_consumable_array.mjs"),f=r.interopDefault(c),p=e("@swc/helpers/src/_ts_generator.mjs"),d=r.interopDefault(p),m=e("./parser");function h(){return(h=(0,o.default)((function(e,t){var n,r,i,o,a,s;return(0,d.default)(this,(function(l){switch(l.label){case 0:return n=t.getExt,r=t.srtToVtt,i=t.assToVtt,[4,fetch(e.url)];case 1:return[4,l.sent().arrayBuffer()];case 2:switch(o=l.sent(),a=new TextDecoder(e.encoding||"utf-8"),s=a.decode(o),e.type||n(e.url)){case"srt":return[2,r(s)];case"ass":return[2,i(s)];case"vtt":return[2,s];default:return[2,""]}return[2]}}))}))).apply(this,arguments)}function v(e){for(var t=(new(0,m.WebVTTParser)).parse("","metadata"),n=0;n<e.length;n++){var r=e[n];if(!r.updated){r.updated=!0;for(var i=0;i<r.cues.length;i++)for(var o=r.cues[i],a=0;a<o.tree.children.length;a++){var l=o.tree.children[a];l.value='<div class="art-subtitle-'.concat(r.name,'">').concat(l.value,"</div>")}}if(0===t.cues.length)t.cues=(0,f.default)(r.cues);else for(var c=0;c<t.cues.length;c++){var p,d,h=t.cues[c].tree.children,v=null===(p=r.cues[c])||void 0===p||null===(d=p.tree)||void 0===d?void 0:d.children;t.cues[c]=(0,u.default)((0,s.default)({},t.cues[c]),{tree:{children:(0,f.default)(h).concat((0,f.default)(v))}})}}return t}function g(e){var t,n=e.subtitles,r=void 0===n?[]:n;return t=(0,o.default)((function(e){var t,n,i,o,a,l,c,f,p,g;function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=v(t),i=c.serialize(r.cues);URL.revokeObjectURL(g);var o=URL.createObjectURL(new Blob([i],{type:"text/vtt"}));g=o,e.option.subtitle.escape=!1,e.subtitle.init((0,u.default)((0,s.default)({},e.option.subtitle),{url:o,type:"vtt",onVttLoad:n}))}return(0,d.default)(this,(function(s){switch(s.label){case 0:return t=e.constructor.utils,n=t.unescape,i=t.getExt,o=t.srtToVtt,a=t.assToVtt,l=new(0,m.WebVTTParser),c=new(0,m.WebVTTSerializer),[4,Promise.all(r.map((function(e){return function(e,t){return h.apply(this,arguments)}(e,{getExt:i,srtToVtt:o,assToVtt:a})})))];case 1:return f=s.sent(),p=f.map((function(e,t){var n=l.parse(e,"metadata");return n.url=r[t].url,n.name=r[t].name,n})),g="",y(p),[2,{name:"multipleSubtitles",tracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return y(e.map((function(e){return p.find((function(t){return t.name===e}))})))},reset:function(){return y(p)}}]}}))})),function(e){return t.apply(this,arguments)}}n.default=g,"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=g)},{"@swc/helpers/src/_async_to_generator.mjs":"9vSoD","@swc/helpers/src/_object_spread.mjs":"1LSQ7","@swc/helpers/src/_object_spread_props.mjs":"8IISz","@swc/helpers/src/_to_consumable_array.mjs":"inwWM","@swc/helpers/src/_ts_generator.mjs":"8UZjC","./parser":"8YYw5","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9vSoD":[function(e,t,n){function r(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n),n.default=function(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,l,"next",e)}function l(e){r(a,i,o,s,l,"throw",e)}s(void 0)}))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.Line truncated
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],s=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var l=Error("Cannot find module '"+t+"'");throw l.code="MODULE_NOT_FOUND",l}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=s[t]=new c.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return s[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=a,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return i[n]}}),i[n]=c;for(var l=0;l<t.length;l++)c(t[l]);if(r){var f=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({cYMzD:[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 o=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),s=e("@swc/helpers/_/_to_consumable_array"),u=e("@swc/helpers/_/_ts_generator"),c=e("./parser");function l(){return(l=(0,o._)(function(e,t){var r,n,o,i,a;return(0,u._)(this,function(s){switch(s.label){case 0:return r=t.getExt,n=t.srtToVtt,o=t.assToVtt,[4,fetch(e.url)];case 1:return[4,s.sent().arrayBuffer()];case 2:switch(i=s.sent(),a=new TextDecoder(e.encoding||"utf-8").decode(i),e.type||r(e.url)){case"srt":return[2,n(a)];case"ass":return[2,o(a)];case"vtt":return[2,a];default:return[2,""]}return[2]}})})).apply(this,arguments)}function f(e){var t,r=e.subtitles,n=void 0===r?[]:r;return t=(0,o._)(function(e){var t,r,o,f,p,d,_,h,m;function y(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=function(e){for(var t=new c.WebVTTParser().parse("","metadata"),r=0;r<e.length;r++){var n=e[r];if(!n.updated){n.updated=!0;for(var o=0;o<n.cues.length;o++)for(var u=n.cues[o],l=0;l<u.tree.children.length;l++){var f=u.tree.children[l];f.value='<div class="art-subtitle-'.concat(n.name,'">').concat(f.value,"</div>")}}if(0===t.cues.length)t.cues=(0,s._)(n.cues);else for(var p=0;p<t.cues.length;p++){var d,_,h=t.cues[p].tree.children,m=null===(_=n.cues[p])||void 0===_?void 0:null===(d=_.tree)||void 0===d?void 0:d.children;t.cues[p]=(0,a._)((0,i._)({},t.cues[p]),{tree:{children:(0,s._)(h).concat((0,s._)(m))}})}}return t}(t),o=_.serialize(n.cues);URL.revokeObjectURL(m);var u=URL.createObjectURL(new Blob([o],{type:"text/vtt"}));m=u,e.option.subtitle.escape=!1,e.subtitle.init((0,a._)((0,i._)({},e.option.subtitle),{url:u,type:"vtt",onVttLoad:r}))}return(0,u._)(this,function(i){switch(i.label){case 0:return r=(t=e.constructor.utils).unescape,o=t.getExt,f=t.srtToVtt,p=t.assToVtt,d=new c.WebVTTParser,_=new c.WebVTTSerializer,[4,Promise.all(n.map(function(e){return function(e,t){return l.apply(this,arguments)}(e,{getExt:o,srtToVtt:f,assToVtt:p})}))];case 1:return h=i.sent().map(function(e,t){var r=d.parse(e,"metadata");return r.url=n[t].url,r.name=n[t].name,r}),m="",y(h),[2,{name:"multipleSubtitles",tracks:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return y(e.map(function(e){return h.find(function(t){return t.name===e})}))},reset:function(){return y(h)}}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginMultipleSubtitles=f)},{"@swc/helpers/_/_async_to_generator":"h1sPa","@swc/helpers/_/_object_spread":"kz2vW","@swc/helpers/_/_object_spread_props":"6yvhT","@swc/helpers/_/_to_consumable_array":"gPzaF","@swc/helpers/_/_ts_generator":"ilbUJ","./parser":"2kukK","@parcel/transformer-js/src/esmodule-helpers.js":"jOuxX"}],h1sPa:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var s=e[i](a),u=s.value}catch(e){r(e);return}s.done?t(u):Promise.resolve(u).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function s(e){o(a,n,i,s,u,"next",e)}function u(e){o(a,n,i,s,u,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"jOuxX"}],jOuxX:[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(tLine truncated
@@ -21,4 +21,4 @@
"video",
"player"
]
}
}
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],u=l.cache||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(l)return l(t,!0);if(s&&"string"==typeof t)return s(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var c=u[t]=new f.Module(t);e[t][0].call(c.exports,d,c,c.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:f(t)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=u,f.parent=l,f.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(f,"root",{get:function(){return i[r]}}),i[r]=f;for(var a=0;a<t.length;a++)f(t[a]);if(n){var c=f(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({YTqB2:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n);var o=e("./getVttArray"),i=r.interopDefault(o);function l(e){return async t=>{const{constructor:{utils:{setStyle:n,clamp:r}},template:{$progress:o},events:{proxy:l}}=t,u=await(0,i.default)(e.vtt);return t.controls.add({name:"thumbnails",position:"top",index:20,style:e.style||{},mounted(e){l(o,"mousemove",(async i=>{n(e,"display","block");const{second:l,width:s}=function(e,t){const{$progress:n}=e.template,{left:o}=n.getBoundingClientRect(),i=r(t.pageX-o,0,n.clientWidth);return{width:i,second:i/n.clientWidth*e.duration}}(t,i),f=u.find((e=>l>=e.start&&l<=e.end));if(!f)return n(e,"display","none");n(e,"backgroundImage",`url(${f.url})`),n(e,"height",`${f.h}px`),n(e,"width",`${f.w}px`),n(e,"backgroundPosition",`-${f.x}px -${f.y}px`),s<=f.w/2?n(e,"left",0):s>o.clientWidth-f.w/2?n(e,"left",o.clientWidth-f.w+"px"):n(e,"left",s-f.w/2+"px")})),l(o,"mouseleave",(()=>{n(e,"display","none")})),t.on("hover",(t=>{t||n(e,"display","none")}))}}),{name:"artplayerPluginVttThumbnail"}}}n.default=l,"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[function(e,t,n){function r(e){var t,n,r,o=e.split("."),i=o[0].split(":")||[],l=(t=o[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))),u=Number(l)/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+u}e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n),n.default=async function(e=""){const t=(await(await fetch(e)).text()).split(/[\n\r]/gm).filter((e=>e.trim())),n=[];for(let o=1;o<t.length;o+=2){const i=t[o],l=t[o+1];if(!l.trim())continue;const u=/((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)(?: ?--> ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,s=i.match(u),f=/(.*)#(\w{4})=(.*)/i,a=l.match(f),c=Math.floor(r(s[1])),d=Math.floor(r(s[2]));let p=a[1];if(!/^\/|((https?|ftp|file):\/\/)/i.test(p)){const t=e.split("/");t.pop(),t.push(p),p=t.join("/")}const h={start:c,end:d,url:p},m=a[2].split(""),g=a[3].split(",");for(let e=0;e<m.length;e++)h[m[e]]=g[e];n.push(h)}return n}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["YTqB2"],"YTqB2","parcelRequire4dc0");
!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}d.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},d.cache={};var p=u[t]=new a.Module(t);e[t][0].call(p.exports,d,p,p.exports,this)}return u[t].exports;function d(e){var t=d.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=u,a.parent=l,a.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(a,"root",{get:function(){return i[r]}}),i[r]=a;for(var s=0;s<t.length;s++)a(t[s]);if(n){var p=a(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({g0Vtv:[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(n),r.export(n,"default",()=>l);var o=e("./getVttArray"),i=r.interopDefault(o);function l(e){return async t=>{let{constructor:{utils:{setStyle:n,clamp:r}},template:{$progress:o},events:{proxy:l}}=t,u=await (0,i.default)(e.vtt);return t.controls.add({name:"thumbnails",position:"top",index:20,style:e.style||{},mounted(e){l(o,"mousemove",async i=>{n(e,"display","block");let{second:l,width:f}=function(e,t){let{$progress:n}=e.template,{left:o}=n.getBoundingClientRect(),i=r(t.pageX-o,0,n.clientWidth),l=i/n.clientWidth*e.duration;return{width:i,second:l}}(t,i),a=u.find(e=>l>=e.start&&l<=e.end);if(!a)return n(e,"display","none");n(e,"backgroundImage",`url(${a.url})`),n(e,"height",`${a.h}px`),n(e,"width",`${a.w}px`),n(e,"backgroundPosition",`-${a.x}px -${a.y}px`),f<=a.w/2?n(e,"left",0):f>o.clientWidth-a.w/2?n(e,"left",`${o.clientWidth-a.w}px`):n(e,"left",`${f-a.w/2}px`)}),l(o,"mouseleave",()=>{n(e,"display","none")}),t.on("hover",t=>{t||n(e,"display","none")})}}),{name:"artplayerPluginVttThumbnail"}}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"2yoeP","@parcel/transformer-js/src/esmodule-helpers.js":"hqP7A"}],"2yoeP":[function(e,t,n){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){var t,n,r,o=e.split("."),i=o[0].split(":")||[],l=Number((t=o[1]||"0",n=3,r="0",t.length>n?String(t):((n-=t.length)>r.length&&(r+=r.repeat(n/r.length)),String(t)+r.slice(0,n))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+l}async function i(e=""){let t=(await (await fetch(e)).text()).split(/[\n\r]/gm).filter(e=>e.trim()),n=[];for(let r=1;r<t.length;r+=2){let i=t[r],l=t[r+1];if(!l.trim())continue;let u=/((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)(?:?-->?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,s=l.match(a),p=Math.floor(o(f[1])),d=Math.floor(o(f[2])),c=s[1];if(!/^\/|((https?|ftp|file):\/\/)/i.test(c)){let t=e.split("/");t.pop(),t.push(c),c=t.join("/")}let h={start:p,end:d,url:c},m=s[2].split(""),g=s[3].split(",");for(let e=0;e<m.length;e++)h[m[e]]=g[e];n.push(h)}return n}r.defineInteropFlag(n),r.export(n,"default",()=>i)},{"@parcel/transformer-js/src/esmodule-helpers.js":"hqP7A"}],hqP7A:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["g0Vtv"],"g0Vtv","parcelRequire94c2");
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},u="function"==typeof i[n]&&i[n],a=u.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(u)return u(t,!0);if(c&&"string"==typeof t)return c(t);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var s=a[t]=new l.Module(t);e[t][0].call(s.exports,p,s,s.exports,this)}return a[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:l(t)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=a,l.parent=u,l.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return i[n]}}),i[n]=l;for(var f=0;f<t.length;f++)l(t[f]);if(r){var s=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({"2Oq25":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_async_to_generator.mjs"),i=n.interopDefault(o),u=e("@swc/helpers/src/_ts_generator.mjs"),a=n.interopDefault(u),c=e("./getVttArray"),l=n.interopDefault(c);function f(e){return t=(0,i.default)((function(t){var r,n,o,u,c,f,s;return(0,a.default)(this,(function(p){switch(p.label){case 0:return r=t.constructor,n=r.utils,o=n.setStyle,u=n.clamp,c=t.template.$progress,f=t.events.proxy,[4,(0,l.default)(e.vtt)];case 1:return s=p.sent(),t.controls.add({name:"thumbnails",position:"top",index:20,style:e.style||{},mounted:function(e){f(c,"mousemove",function(){var r=(0,i.default)((function(r){var n,i,l,f;return(0,a.default)(this,(function(a){return o(e,"display","block"),n=function(e,t){var r=e.template.$progress,n=r.getBoundingClientRect().left,o=u(t.pageX-n,0,r.clientWidth);return{width:o,second:o/r.clientWidth*e.duration}}(t,r),i=n.second,l=n.width,(f=s.find((function(e){return i>=e.start&&i<=e.end})))?(o(e,"backgroundImage","url(".concat(f.url,")")),o(e,"height","".concat(f.h,"px")),o(e,"width","".concat(f.w,"px")),o(e,"backgroundPosition","-".concat(f.x,"px -").concat(f.y,"px")),l<=f.w/2?o(e,"left",0):l>c.clientWidth-f.w/2?o(e,"left","".concat(c.clientWidth-f.w,"px")):o(e,"left","".concat(l-f.w/2,"px")),[2]):[2,o(e,"display","none")]}))}));return function(e){return r.apply(this,arguments)}}()),f(c,"mouseleave",(function(){o(e,"display","none")})),t.on("hover",(function(t){t||o(e,"display","none")}))}}),[2,{name:"artplayerPluginVttThumbnail"}]}}))})),function(e){return t.apply(this,arguments)};var t}r.default=f,"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=f)},{"@swc/helpers/src/_async_to_generator.mjs":"9vSoD","@swc/helpers/src/_ts_generator.mjs":"8UZjC","./getVttArray":"iUpz3","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9vSoD":[function(e,t,r){function n(e,t,r,n,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void r(e)}a.done?t(c):Promise.resolve(c).then(n,o)}e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){return function(){var t=this,r=arguments;return new Promise((function(o,i){var u=e.apply(t,r);function a(e){n(u,o,i,a,c,"next",e)}function c(e){n(u,o,i,a,c,"throw",e)}a(void 0)}))}}},{"@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||t.hasOwnProperty(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})}},{}],"8UZjC":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o.__generator}));var o=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 u})),n.export(r,"__rest",(function(){return a})),n.export(r,"__decorate",(function(){return c})),n.export(r,"__param",(function(){return l})),n.export(r,"__metadata",(function(){return f})),n.export(r,"__awaiter",(function(){return s})),n.export(r,"__generator",(function(){return p})),n.export(r,"__createBinding",(function(){return d})),n.export(r,"__exportStar",(function(){return h})),n.export(r,"__values",(function(){return y})),n.export(r,"__read",(function(){return v})),n.export(r,"__spread",(functioLine truncated
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[n]&&i[n],u=a.cache||{},c="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function s(t,r){if(!u[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(a)return a(t,!0);if(c&&"string"==typeof t)return c(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var l=u[t]=new s.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:s(t)}}s.isParcelRequire=!0,s.Module=function(e){this.id=e,this.bundle=s,this.exports={}},s.modules=e,s.cache=u,s.parent=a,s.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(s,"root",{get:function(){return i[n]}}),i[n]=s;for(var f=0;f<t.length;f++)s(t[f]);if(r){var l=s(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd&&define(function(){return l})}}({"2NUwP":[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 o=e("@swc/helpers/_/_async_to_generator"),i=e("@swc/helpers/_/_ts_generator"),a=e("./getVttArray"),u=n.interopDefault(a);function c(e){var t;return t=(0,o._)(function(t){var r,n,a,c,s,f;return(0,i._)(this,function(l){switch(l.label){case 0:return n=(r=t.constructor.utils).setStyle,a=r.clamp,c=t.template.$progress,s=t.events.proxy,[4,(0,u.default)(e.vtt)];case 1:return f=l.sent(),t.controls.add({name:"thumbnails",position:"top",index:20,style:e.style||{},mounted:function(e){var r;s(c,"mousemove",(r=(0,o._)(function(r){var o,u,s,l;return(0,i._)(this,function(i){var p,d,_,y;return(n(e,"display","block"),d=(p=t.template.$progress).getBoundingClientRect().left,y=(_=a(r.pageX-d,0,p.clientWidth))/p.clientWidth*t.duration,u=(o={width:_,second:y}).second,s=o.width,l=f.find(function(e){return u>=e.start&&u<=e.end}))?(n(e,"backgroundImage","url(".concat(l.url,")")),n(e,"height","".concat(l.h,"px")),n(e,"width","".concat(l.w,"px")),n(e,"backgroundPosition","-".concat(l.x,"px -").concat(l.y,"px")),s<=l.w/2?n(e,"left",0):s>c.clientWidth-l.w/2?n(e,"left","".concat(c.clientWidth-l.w,"px")):n(e,"left","".concat(s-l.w/2,"px")),[2]):[2,n(e,"display","none")]})}),function(e){return r.apply(this,arguments)})),s(c,"mouseleave",function(){n(e,"display","none")}),t.on("hover",function(t){t||n(e,"display","none")})}}),[2,{name:"artplayerPluginVttThumbnail"}]}})}),function(e){return t.apply(this,arguments)}}"undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=c)},{"@swc/helpers/_/_async_to_generator":"h1sPa","@swc/helpers/_/_ts_generator":"ilbUJ","./getVttArray":"fGa7F","@parcel/transformer-js/src/esmodule-helpers.js":"jOuxX"}],h1sPa:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){r(e);return}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var a=e.apply(t,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return i}),n.export(r,"_",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"jOuxX"}],jOuxX:[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})}},{}],ilbUJ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator}),n.export(r,"_ts_generator",function(){return o.__generator});var o=e("tslib")},{tslib:"2NqC1","@parcel/transformer-js/src/esmodule-helpers.js":"jOuxX"}],"2NqC1":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return a}),n.export(r,"__assign",function(){return u}),n.export(r,"__rest",function(){return c}),n.export(r,"__decorate",function(){return s}),n.export(r,"__param",function(){return f}),n.export(r,"__esDecorate",function(){return l}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return _}),n.export(r,"__metadata",function(){return y}),n.export(r,"__awaiter",function(){return h}),n.export(r,"__generator",function(){return v}),n.exLine truncated
@@ -7,4 +7,4 @@
"modules": true
}
}
}
}
@@ -18,4 +18,4 @@
"eslint": "8.49.0",
"eslint-config-next": "13.4.19"
}
}
}
@@ -61,7 +61,14 @@
border-radius: 5px;
padding: 0.75rem;
font-size: 1.1rem;
font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New,
font-family:
Menlo,
Monaco,
Lucida Console,
Liberation Mono,
DejaVu Sans Mono,
Bitstream Vera Sans Mono,
Courier New,
monospace;
}
@@ -81,7 +88,9 @@
text-decoration: none;
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
transition:
color 0.15s ease,
border-color 0.15s ease;
max-width: 300px;
}
@@ -2,8 +2,18 @@ html,
body {
padding: 0;
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans,
Helvetica Neue, sans-serif;
font-family:
-apple-system,
BlinkMacSystemFont,
Segoe UI,
Roboto,
Oxygen,
Ubuntu,
Cantarell,
Fira Sans,
Droid Sans,
Helvetica Neue,
sans-serif;
}
a {
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8" />
@@ -1,4 +1,4 @@
<!DOCTYPE html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
@@ -63,10 +63,23 @@ body {
min-height: 100vh;
color: var(--color-text);
background: var(--color-background);
transition: color 0.5s, background-color 0.5s;
transition:
color 0.5s,
background-color 0.5s;
line-height: 1.6;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Fira Sans',
'Droid Sans', 'Helvetica Neue', sans-serif;
font-family:
Inter,
-apple-system,
BlinkMacSystemFont,
'Segoe UI',
Roboto,
Oxygen,
Ubuntu,
Cantarell,
'Fira Sans',
'Droid Sans',
'Helvetica Neue',
sans-serif;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(h&&"string"==typeof t)return h(t);var d=new Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new a.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=s,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return r[n]}}),r[n]=a;for(var d=0;d<t.length;d++)a(t[d]);if(i){var u=a(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({eoujN:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();const t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);const{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==t.tagName||"file"!==t.type){t.style.position="relative";const e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach((e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)})),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){const e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){const t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){const t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported: ${e.type}`);const i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then((()=>this.start()));const{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1, but got ${this.density}`);const r=this.creatScreenshotDate(),l=this.creatCanvas(),h=l.getContext("2d");this.emit("canvas",l);const a=r.map(((i,n)=>()=>new Promise((r=>{this.video.oncanplay=()=>{h.drawImage(this.video,i.x,i.y,e,o),l.toBlob((e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()}))},this.video.currentTime=i.time}))));return this.processing=!0,(0,s.runPromisesInSeries)(a).then((()=>{this.processing=!1,this.emit("done")})).catch((e=>{throw this.processing=!1,this.emit("error",e.message),e}))}creatScreenshotDate(){const{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){const e=s[s.length-1];s.push(e+r)}return s.map(((e,o)=>({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCLine truncated
!function(e,t,i,n,o){var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof r[n]&&r[n],l=s.cache||{},h="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,i){if(!l[t]){if(!e[t]){var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);if(s)return s(t,!0);if(h&&"string"==typeof t)return h(t);var d=Error("Cannot find module '"+t+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var n=e[t][1][i];return null!=n?n:i},p.cache={};var u=l[t]=new a.Module(t);e[t][0].call(u.exports,p,u,u.exports,this)}return l[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:a(t)}}a.isParcelRequire=!0,a.Module=function(e){this.id=e,this.bundle=a,this.exports={}},a.modules=e,a.cache=l,a.parent=s,a.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(a,"root",{get:function(){return r[n]}}),r[n]=a;for(var d=0;d<t.length;d++)a(t[d]);if(i){var u=a(i);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define(function(){return u})}}({e1IG9:[function(e,t,i){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(i);var o=e("./emitter"),r=n.interopDefault(o),s=e("./utils");class l extends r.default{constructor(e={}){super(),this.processing=!1,this.option={},this.setup(Object.assign({},l.DEFAULTS,e)),this.video=l.creatVideo(),this.duration=0,this.inputChange=this.inputChange.bind(this),this.ondrop=this.ondrop.bind(this),this.option.fileInput.addEventListener("change",this.inputChange),this.option.fileInput.addEventListener("dragover",l.ondragover),this.option.fileInput.addEventListener("drop",l.ondrop)}static get DEFAULTS(){return{number:60,width:160,height:90,column:10,begin:0,end:NaN}}static ondragover(e){e.preventDefault()}ondrop(e){e.preventDefault();let t=e.dataTransfer.files[0];this.loadVideo(t)}setup(e={}){this.option=Object.assign({},this.option,e);let{fileInput:t,number:i,width:n,column:o}=this.option;if(this.errorHandle(t instanceof Element,"The 'fileInput' is not a Element"),!("INPUT"===t.tagName&&"file"===t.type)){t.style.position="relative";let e=document.createElement("input");e.type="file",e.style.position="absolute",e.style.width="100%",e.style.height="100%",e.style.left="0",e.style.top="0",e.style.right="0",e.style.bottom="0",e.style.opacity="0",t.appendChild(e),this.option.fileInput=e}return["number","width","column","begin","end"].forEach(e=>{this.errorHandle("number"==typeof this.option[e],`The '${e}' is not a number`)}),this.option.number=(0,s.clamp)(i,10,1e3),this.option.width=(0,s.clamp)(n,10,1e3),this.option.column=(0,s.clamp)(o,1,1e3),this}static creatVideo(){let e=document.createElement("video");return e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px",e.muted=!0,e.controls=!0,document.body.appendChild(e),e}inputChange(e){let t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}loadVideo(e){if(e){let t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,`Playback of this file format is not supported:${e.type}`);let i=URL.createObjectURL(e);this.videoUrl=i,this.file=e,this.emit("file",this.file),this.video.src=i,this.emit("video",this.video)}}start(){if(!this.video.duration)return(0,s.sleep)(1e3).then(()=>this.start());let{width:e,number:t,begin:i,end:n}=this.option,o=this.video.videoHeight/this.video.videoWidth*e;this.option.height=o,this.option.begin=(0,s.clamp)(i,0,this.video.duration),this.option.end=(0,s.clamp)(n||this.video.duration,i,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=t/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress,please wait a moment..."),this.errorHandle(this.density<=1,`The preview density cannot be greater than 1,but got ${this.density}`);let r=this.creatScreenshotDate(),l=this.creatCanvas(),h=l.getContext("2d");this.emit("canvas",l);let a=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{h.drawImage(this.video,i.x,i.y,e,o),l.toBlob(e=>{this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.thumbnailUrl=URL.createObjectURL(e),this.emit("update",this.thumbnailUrl,(n+1)/t),this.video.oncanplay=null,r()})},this.video.currentTime=i.time}));return this.processing=!0,(0,s.runPromisesInSeries)(a).then(()=>{this.processing=!1,this.emit("done")}).catch(e=>{throw this.processing=!1,this.emit("error",e.message),e})}creatScreenshotDate(){let{number:e,width:t,height:i,column:n,begin:o}=this.option,r=this.duration/e,s=[o+r];for(;s.length<e;){let e=s[s.length-1];s.push(e+r)}return s.map((e,o)=>({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:nLine truncated
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i[n]&&i[n],a=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=a[t]=new u.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return a[t].exports;function p(e){var t=p.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=a,u.parent=s,u.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return i[n]}}),i[n]=u;for(var c=0;c<t.length;c++)u(t[c]);if(r){var f=u(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}}({esZVA:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return y}));var o=e("@swc/helpers/src/_assert_this_initialized.mjs"),i=n.interopDefault(o),s=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(s),l=e("@swc/helpers/src/_create_class.mjs"),u=n.interopDefault(l),c=e("@swc/helpers/src/_inherits.mjs"),f=n.interopDefault(c),p=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(p),h=e("./emitter"),m=n.interopDefault(h),v=e("./utils"),y=function(e){"use strict";(0,f.default)(r,e);var t=(0,d.default)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,a.default)(this,r),(e=t.call(this)).processing=!1,e.option={},e.setup(Object.assign({},r.DEFAULTS,n)),e.video=r.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind((0,i.default)(e)),e.ondrop=e.ondrop.bind((0,i.default)(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",r.ondragover),e.option.fileInput.addEventListener("drop",r.ondrop),e}return(0,u.default)(r,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this;this.option=Object.assign({},this.option,e);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),"INPUT"!==n.tagName||"file"!==n.type){n.style.position="relative";var a=document.createElement("input");a.type="file",a.style.position="absolute",a.style.width="100%",a.style.height="100%",a.style.left="0",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.opacity="0",n.appendChild(a),this.option.fileInput=a}return["number","width","column","begin","end"].forEach((function(e){t.errorHandle("number"==typeof t.option[e],"The '".concat(e,"' is not a number"))})),this.option.number=(0,v.clamp)(o,10,1e3),this.option.width=(0,v.clamp)(i,10,1e3),this.option.column=(0,v.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported: ".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,v.sleep)(1e3).then((function(){return e.start()}));var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,v.clamp)(o,0,this.video.duration),this.option.end=(0,v.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1, but got ".concat(this.density));var a=this.creatScreenshotDate(),l=this.creatCanvas(),u=l.getContext("2d");this.emit("canvas",l);var c=a.map((function(t,o){return function(){return new Promise((function(i){e.video.oncanplay=function(){u.drawImage(e.video,t.x,t.y,r,s),l.toBlob((function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailUrl=URL.createObjectURL(t),e.emit("update",e.thumbnailUrl,(o+1)/n),e.video.oncanplaLine truncated
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof i[n]&&i[n],a=s.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(t,r){if(!a[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(u&&"string"==typeof t)return u(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},p.cache={};var f=a[t]=new l.Module(t);e[t][0].call(f.exports,p,f,f.exports,this)}return a[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:l(t)}}l.isParcelRequire=!0,l.Module=function(e){this.id=e,this.bundle=l,this.exports={}},l.modules=e,l.cache=a,l.parent=s,l.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(l,"root",{get:function(){return i[n]}}),i[n]=l;for(var c=0;c<t.length;c++)l(t[c]);if(r){var f=l(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({kxYXn:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return p});var o=e("@swc/helpers/_/_assert_this_initialized"),i=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_create_class"),a=e("@swc/helpers/_/_inherits"),u=e("@swc/helpers/_/_create_super"),l=e("./emitter"),c=n.interopDefault(l),f=e("./utils"),p=function(e){(0,a._)(r,e);var t=(0,u._)(r);function r(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,i._)(this,r),(e=t.call(this)).processing=!1,e.option={},e.setup(Object.assign({},r.DEFAULTS,n)),e.video=r.creatVideo(),e.duration=0,e.inputChange=e.inputChange.bind((0,o._)(e)),e.ondrop=e.ondrop.bind((0,o._)(e)),e.option.fileInput.addEventListener("change",e.inputChange),e.option.fileInput.addEventListener("dragover",r.ondragover),e.option.fileInput.addEventListener("drop",r.ondrop),e}return(0,s._)(r,[{key:"ondrop",value:function(e){e.preventDefault();var t=e.dataTransfer.files[0];this.loadVideo(t)}},{key:"setup",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.option=Object.assign({},this.option,t);var r=this.option,n=r.fileInput,o=r.number,i=r.width,s=r.column;if(this.errorHandle(n instanceof Element,"The 'fileInput' is not a Element"),!("INPUT"===n.tagName&&"file"===n.type)){n.style.position="relative";var a=document.createElement("input");a.type="file",a.style.position="absolute",a.style.width="100%",a.style.height="100%",a.style.left="0",a.style.top="0",a.style.right="0",a.style.bottom="0",a.style.opacity="0",n.appendChild(a),this.option.fileInput=a}return["number","width","column","begin","end"].forEach(function(t){e.errorHandle("number"==typeof e.option[t],"The '".concat(t,"' is not a number"))}),this.option.number=(0,f.clamp)(o,10,1e3),this.option.width=(0,f.clamp)(i,10,1e3),this.option.column=(0,f.clamp)(s,1,1e3),this}},{key:"inputChange",value:function(e){var t=this.option.fileInput.files[0];this.loadVideo(t),e.target.value=""}},{key:"loadVideo",value:function(e){if(e){var t=this.video.canPlayType(e.type);this.errorHandle("maybe"===t||"probably"===t,"Playback of this file format is not supported:".concat(e.type));var r=URL.createObjectURL(e);this.videoUrl=r,this.file=e,this.emit("file",this.file),this.video.src=r,this.emit("video",this.video)}}},{key:"start",value:function(){var e=this;if(!this.video.duration)return(0,f.sleep)(1e3).then(function(){return e.start()});var t=this.option,r=t.width,n=t.number,o=t.begin,i=t.end,s=this.video.videoHeight/this.video.videoWidth*r;this.option.height=s,this.option.begin=(0,f.clamp)(o,0,this.video.duration),this.option.end=(0,f.clamp)(i||this.video.duration,o,this.video.duration),this.errorHandle(this.option.end>this.option.begin,"End time must be greater than the start time"),this.duration=this.option.end-this.option.begin,this.density=n/this.duration,this.errorHandle(this.file&&this.video,"Please select the video file first"),this.errorHandle(!this.processing,"There is currently a task in progress,please wait a moment..."),this.errorHandle(this.density<=1,"The preview density cannot be greater than 1,but got ".concat(this.density));var a=this.creatScreenshotDate(),u=this.creatCanvas(),l=u.getContext("2d");this.emit("canvas",u);var c=a.map(function(t,o){return function(){return new Promise(function(i){e.video.oncanplay=function(){l.drawImage(e.video,t.x,t.y,r,s),u.toBlob(function(t){e.thumbnailUrl&&URL.revokeObjectURL(e.thumbnailUrl),e.thumbnailUrl=URL.createObjectURL(t),e.emit("update",e.thumbnailUrl,(o+1)/n),e.video.oncanplay=null,i()})},e.video.currentTime=t.time})}});return this.processing=!0,(0,f.runPromisesInSeries)(c).then(function(){e.processing=!1,e.emit("done")}).catch(function(t){throw e.processing=!1,e.emit("error"Line truncated
@@ -1,56 +1,54 @@
import {
useMediaQuery
} from "./chunk-JXSPZ7FU.js";
} from "./chunk-ZEI2HCB7.js";
import {
computed,
ref,
shallowRef,
watch
} from "./chunk-HBMF7DTD.js";
} from "./chunk-RY5ODQAQ.js";
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/index.js
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/fonts.css";
// node_modules/vitepress/dist/client/theme-default/index.js
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/fonts.css";
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/without-fonts.js
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/vars.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/base.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/utils.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/components/custom-block.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/components/vp-code.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/components/vp-doc.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
import VPBadge from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPBadge.vue";
import Layout from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/Layout.vue";
import { default as default2 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPImage.vue";
import { default as default3 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPButton.vue";
import { default as default4 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPHomeHero.vue";
import { default as default5 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
import { default as default6 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
import { default as default7 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
import { default as default8 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPSponsors.vue";
import { default as default9 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPTeamPage.vue";
import { default as default10 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
import { default as default11 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
import { default as default12 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
// node_modules/vitepress/dist/client/theme-default/without-fonts.js
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/vars.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/base.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/icons.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/utils.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css";
import "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css";
import VPBadge from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import Layout from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/Layout.vue";
import { default as default2 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue";
import { default as default3 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue";
import { default as default4 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue";
import { default as default5 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue";
import { default as default6 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue";
import { default as default7 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue";
import { default as default8 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue";
import { default as default9 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue";
import { default as default10 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue";
import { default as default11 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue";
import { default as default12 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue";
import { default as default13 } from "/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue";
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/shared.js
var inBrowser = typeof document !== "undefined";
var KNOWN_EXTENSIONS = new Set("3g2,3gp,7z,aac,abw,ai,aif,aifc,aiff,arc,asf,asr,asx,au,avi,avif,axs,azw,bin,bmp,bz,bz2,c,cda,cer,class,crl,crt,csh,css,csv,dcr,der,dll,doc,docx,eot,eps,epub,exe,gif,gtar,gz,gzip,ico,ics,ief,jar,jpe,jpeg,jpg,js,json,jsonld,latex,m3u,man,mdb,mht,mhtml,mid,midi,mjs,mov,mp2,mp3,mp4,mpa,mpe,mpeg,mpg,mpkg,mpp,odp,ods,odt,oga,ogv,ogx,opus,otf,p10,p12,p7b,p7c,p7m,p7r,p7s,pbm,pdf,pfx,php,png,ppt,pptx,ps,pub,qt,rar,roff,rtf,rtx,ser,sh,spc,svg,swf,t,tar,tcl,tex,texi,texinfo,tgz,tif,tiff,tr,ts,tsv,ttf,txt,ua,viv,vivo,vsd,wav,weba,webm,webp,woff,woff2,xbm,xhtml,xls,xlsx,xml,xul,zip,conf".split(","));
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/support/utils.js
// node_modules/vitepress/dist/client/theme-default/support/utils.js
import { withBase } from "vitepress";
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/data.js
// node_modules/vitepress/dist/client/theme-default/composables/data.js
import { useData as useData$ } from "vitepress";
var useData = useData$;
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/support/utils.js
// node_modules/vitepress/dist/client/theme-default/support/utils.js
function ensureStartingSlash(path) {
return /^\//.test(path) ? path : `/${path}`;
}
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/support/sidebar.js
// node_modules/vitepress/dist/client/theme-default/support/sidebar.js
function getSidebar(_sidebar, path) {
if (Array.isArray(_sidebar))
return addBase(_sidebar);
@@ -93,15 +91,7 @@ function addBase(items, _base) {
});
}
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/hash.js
var hashRef = ref(inBrowser ? location.hash : "");
if (inBrowser) {
window.addEventListener("hashchange", () => {
hashRef.value = location.hash;
});
}
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/sidebar.js
// node_modules/vitepress/dist/client/theme-default/composables/sidebar.js
function useSidebar() {
const { frontmatter, page, theme: theme2 } = useData();
const is960 = useMediaQuery("(min-width: 960px)");
@@ -158,10 +148,11 @@ function useSidebar() {
};
}
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/local-nav.js
// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
import { onContentUpdated } from "vitepress";
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/outline.js
// node_modules/vitepress/dist/client/theme-default/composables/outline.js
import { getScrollOffset } from "vitepress";
var resolvedHeaders = [];
function getHeaders(range) {
const headers = [
@@ -223,7 +214,7 @@ function resolveHeaders(headers, range) {
return ret;
}
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/local-nav.js
// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js
function useLocalNav() {
const { theme: theme2, frontmatter } = useData();
const headers = shallowRef([]);
@@ -239,7 +230,7 @@ function useLocalNav() {
};
}
// node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/without-fonts.js
// node_modules/vitepress/dist/client/theme-default/without-fonts.js
var theme = {
Layout,
enhanceApp: ({ app }) => {
@@ -248,17 +239,18 @@ var theme = {
};
var without_fonts_default = theme;
export {
default3 as VPButton,
default7 as VPDocAsideSponsors,
default5 as VPHomeFeatures,
default4 as VPHomeHero,
default6 as VPHomeSponsors,
default2 as VPImage,
default8 as VPSponsors,
default12 as VPTeamMembers,
default9 as VPTeamPage,
default11 as VPTeamPageSection,
default10 as VPTeamPageTitle,
default2 as VPBadge,
default4 as VPButton,
default8 as VPDocAsideSponsors,
default6 as VPHomeFeatures,
default5 as VPHomeHero,
default7 as VPHomeSponsors,
default3 as VPImage,
default9 as VPSponsors,
default13 as VPTeamMembers,
default10 as VPTeamPage,
default12 as VPTeamPageSection,
default11 as VPTeamPageTitle,
without_fonts_default as default,
useLocalNav,
useSidebar
@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/index.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/without-fonts.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/shared.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/support/utils.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/data.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/support/sidebar.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/hash.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/sidebar.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/local-nav.js", "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/composables/outline.js"],
"sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { useSidebar } from './composables/sidebar';\nexport { useLocalNav } from './composables/local-nav';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "export const EXTERNAL_URL_RE = /^(?:[a-z]+:|\\/\\/)/i;\nexport const APPEARANCE_KEY = 'vitepress-theme-appearance';\nexport const HASH_RE = /#.*$/;\nexport const EXT_RE = /(index)?\\.(md|html)$/;\nexport const inBrowser = typeof document !== 'undefined';\nexport const notFoundPageData = {\n relativePath: '',\n filePath: '',\n title: '404',\n description: 'Not Found',\n headers: [],\n frontmatter: { sidebar: false, layout: 'page' },\n lastUpdated: 0,\n isNotFound: true\n};\nexport function isActive(currentPath, matchPath, asRegex = false) {\n if (matchPath === undefined) {\n return false;\n }\n currentPath = normalize(`/${currentPath}`);\n if (asRegex) {\n return new RegExp(matchPath).test(currentPath);\n }\n if (normalize(matchPath) !== currentPath) {\n return false;\n }\n const hashMatch = matchPath.match(HASH_RE);\n if (hashMatch) {\n return (inBrowser ? location.hash : '') === hashMatch[0];\n }\n return true;\n}\nexport function normalize(path) {\n return decodeURI(path).replace(HASH_RE, '').replace(EXT_RE, '');\n}\nexport function isExternal(path) {\n return EXTERNAL_URL_RE.test(path);\n}\n/**\n * this merges the locales data to the main data by the route\n */\nexport function resolveSiteDataByRoute(siteData, relativePath) {\n const localeIndex = Object.keys(siteData.locales).find((key) => key !== 'root' &&\n !isExternal(key) &&\n isActive(relativePath, `/${key}/`, true)) || 'root';\n return Object.assign({}, siteData, {\n localeIndex,\n lang: siteData.locales[localeIndex]?.lang ?? siteData.lang,\n dir: siteData.locales[localeIndex]?.dir ?? siteData.dir,\n title: siteData.locales[localeIndex]?.title ?? siteData.title,\n titleTemplate: siteData.locales[localeIndex]?.titleTemplate ?? siteData.titleTemplate,\n description: siteData.locales[localeIndex]?.description ?? siteData.description,\n head: mergeHead(siteData.head, siteData.locales[localeIndex]?.head ?? []),\n themeConfig: {\n ...siteData.themeConfig,\n ...siteData.locales[localeIndex]?.themeConfig\n }\n });\n}\n/**\n * Create the page title string based on config.\n */\nexport function createTitle(siteData, pageData) {\n const title = pageData.title || siteData.title;\n const template = pageData.titleTemplate ?? siteData.titleTemplate;\n if (typeof template === 'string' && template.includes(':title')) {\n return template.replace(/:title/g, title);\n }\n const templateString = createTitleTemplate(siteData.title, template);\n if (title === templateString.slice(3)) {\n return title;\n }\n return `${title}${templateString}`;\n}\nfunction createTitleTemplate(siteTitle, template) {\n if (template === false) {\n return '';\n }\n if (template === true || template === undefined) {\n return ` | ${siteTitle}`;\n }\n if (siteTitle === template) {\n return '';\n }\n return ` | ${template}`;\n}\nfunction hasTag(head, tag) {\n const [tagType, tagAttrs] = tag;\n if (tagType !== 'meta')\n return false;\n const keyAttr = Object.entries(tagAttrs)[0]; // First key\n if (keyAttr == null)\n return false;\n return head.some(([type, attrs]) => type === tagType && attrs[keyAttr[0]] Line truncated
"mappings": "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",
"sources": ["../../../../node_modules/vitepress/dist/client/theme-default/index.js", "../../../../node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/local-nav.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/outline.js"],
"sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/icons.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPBadge } from './components/VPBadge.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { useSidebar } from './composables/sidebar';\nexport { useLocalNav } from './composables/local-nav';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "import { withBase } from 'vitepress';\nimport { useData } from '../composables/data';\nimport { isExternal, treatAsHtml } from '../../shared';\nexport function throttleAndDebounce(fn, delay) {\n let timeoutId;\n let called = false;\n return () => {\n if (timeoutId)\n clearTimeout(timeoutId);\n if (!called) {\n fn();\n (called = true) && setTimeout(() => (called = false), delay);\n }\n else\n timeoutId = setTimeout(fn, delay);\n };\n}\nexport function ensureStartingSlash(path) {\n return /^\\//.test(path) ? path : `/${path}`;\n}\nexport function normalizeLink(url) {\n const { pathname, search, hash, protocol } = new URL(url, 'http://a.com');\n if (isExternal(url) ||\n url.startsWith('#') ||\n !protocol.startsWith('http') ||\n !treatAsHtml(pathname))\n return url;\n const { site } = useData();\n const normalizedPath = pathname.endsWith('/') || pathname.endsWith('.html')\n ? url\n : url.replace(/(?:(^\\.+)\\/)?.*$/, `$1${pathname.replace(/(\\.md)?$/, site.value.cleanUrls ? '' : '.html')}${search}${hash}`);\n return withBase(normalizedPath);\n}\n", "import { useData as useData$ } from 'vitepress';\nexport const useData = useData$;\n", "import { ensureStartingSlash } from './utils';\nimport { isActive } from '../../shared';\n/**\n * Get the `Sidebar` from sidebar option. This method will ensure to get correct\n * sidebar config from `MultiSideBarConfig` with various path combinations such\n * as matching `guide/` and `/guide/`. If no matching config was found, it will\n * return empty array.\n */\nexport function getSidebar(_sidebar, path) {\n if (Array.isArray(_sidebar))\n return addBase(_sidebar);\n if (_sidebar == null)\n return [];\n path = ensureStartingSlash(path);\n const dir = Object.keys(_sidebar)\n .sort((a, b) => {\n return b.split('/').length - a.split('/').length;\n })\n .find((dir) => {\n // make sure the multi sidebar key starts with slash too\n return path.startsWith(ensureStartingSlash(dir));\n });\n const sidebar = dir ? _sidebar[dir] : [];\n return Array.isArray(sidebar)\n ? addBase(sidebar)\n : addBase(sidebar.items, sidebar.base);\n}\n/**\n * Get or generate sidebar group from the given sidebar items.\n */\nexport function getSidebarGroups(sidebar) {\n const groups = [];\n let lastGroupIndex = 0;\n for (const index in sidebar) {\n const item = sidebar[index];\n if (item.items) {\n lastGroupIndex = groups.push(item);\n continue;\n }\n if (!groups[lastGroupIndex]) {\n groups.push({ items: [] });\n }\n groups[lastGroupIndex].items.push(item);\n }\n return groups;\n}\nexport function getFlatSideBarLinks(sidebar) {\n const links = [];\n function recursivelyExtractLinks(items) {\n for (const item of items) {\n if (item.text && item.link) {\n links.push({\n text: item.text,\n link: item.link,\n docFooterText: item.docFooterText\n });\n }\n if (item.items) {\n Line truncated
"mappings": "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",
"names": ["default", "dir", "theme", "theme"]
}
@@ -1,40 +1,40 @@
{
"hash": "eeb120b6",
"configHash": "40757742",
"lockfileHash": "d75c23ab",
"browserHash": "34069683",
"hash": "8884d6be",
"configHash": "946bf1d9",
"lockfileHash": "b7b1f3f6",
"browserHash": "0ac2a31b",
"optimized": {
"vue": {
"src": "../../../../node_modules/_vue@3.4.7@vue/dist/vue.runtime.esm-bundler.js",
"src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "c0fdc911",
"fileHash": "40b31d8f",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../../node_modules/_@vue_devtools-api@6.5.1@@vue/devtools-api/lib/esm/index.js",
"src": "../../../../node_modules/@vue/devtools-api/dist/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "e3cffb2c",
"fileHash": "45f9c130",
"needsInterop": false
},
"vitepress > @vueuse/core": {
"src": "../../../../node_modules/_@vueuse_core@10.7.1@@vueuse/core/index.mjs",
"src": "../../../../node_modules/@vueuse/core/index.mjs",
"file": "vitepress___@vueuse_core.js",
"fileHash": "89170fa2",
"fileHash": "2e254b18",
"needsInterop": false
},
"@theme/index": {
"src": "../../../../node_modules/_vitepress@1.0.0-rc.36@vitepress/dist/client/theme-default/index.js",
"src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js",
"file": "@theme_index.js",
"fileHash": "c4a83b29",
"fileHash": "9c3a6e0f",
"needsInterop": false
}
},
"chunks": {
"chunk-JXSPZ7FU": {
"file": "chunk-JXSPZ7FU.js"
"chunk-ZEI2HCB7": {
"file": "chunk-ZEI2HCB7.js"
},
"chunk-HBMF7DTD": {
"file": "chunk-HBMF7DTD.js"
"chunk-RY5ODQAQ": {
"file": "chunk-RY5ODQAQ.js"
}
}
}
@@ -1,7 +0,0 @@
{
"version": 3,
"sources": ["../../../../node_modules/_@vue_shared@3.4.7@@vue/shared/dist/shared.esm-bundler.js", "../../../../node_modules/_@vue_reactivity@3.4.7@@vue/reactivity/dist/reactivity.esm-bundler.js", "../../../../node_modules/_@vue_runtime-core@3.4.7@@vue/runtime-core/dist/runtime-core.esm-bundler.js", "../../../../node_modules/_@vue_runtime-dom@3.4.7@@vue/runtime-dom/dist/runtime-dom.esm-bundler.js", "../../../../node_modules/_vue@3.4.7@vue/dist/vue.runtime.esm-bundler.js"],
"sourcesContent": ["function makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [Line truncated
"mappings": "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 truncated
"names": ["set", "effect", "trigger", "computed", "computed", "hasOwnProperty", "isReadonly", "isShallow", "self", "get", "set", "p", "version", "isModelListener", "emit", "render", "render2", "remove", "effect", "callHook", "resolve", "has", "track", "trigger", "get", "set", "computed", "h", "hydrate", "createApp", "ref", "patchProp", "hasWarned", "remove2", "isFlushing", "isShallow", "warn", "callHook", "resolve", "warn", "isBoolean", "def", "enterCbKey", "compile", "warn"]
}
@@ -1,7 +0,0 @@
{
"version": 3,
"sources": ["../../../../node_modules/_vue-demi@0.14.6@vue-demi/lib/index.mjs", "../../../../node_modules/_@vueuse_shared@10.7.1@@vueuse/shared/index.mjs", "../../../../node_modules/_@vueuse_core@10.7.1@@vueuse/core/index.mjs"],
"sourcesContent": ["import * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport {\n Vue,\n Vue2,\n isVue2,\n isVue3,\n install,\n}\n", "import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(\"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\nLine truncated
"mappings": "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 truncated
"names": ["get", "set", "ref", "keys", "invoke", "toRef", "toRefs", "events", "window", "document", "timestamp", "getValue", "defaults", "toRef", "set", "onUpdated", "preventDefault", "toRefs", "now", "scrollTo", "keys", "get", "isReadonly"]
}
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../node_modules/@vue/shared/dist/shared.esm-bundler.js", "../../../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js", "../../../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js", "../../../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js", "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js"],
"sourcesContent": ["/**\n* @vue/shared v3.4.27\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str, expectsLowerCase) {\n const set = new Set(str.split(\",\"));\n return expectsLowerCase ? (val) => set.has(val.toLowerCase()) : (val) => set.has(val);\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction((str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n});\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"HOISTED\": -1,\n \"-1\": \"HOISTED\",\n \"BAIL\": -2,\n \"-Line truncated
"mappings": "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 truncated
"names": ["set", "effect", "trigger", "computed", "computed", "hasOwnProperty", "isReadonly", "isShallow", "self", "get", "set", "p", "version", "isModelListener", "emit", "render", "render2", "remove", "effect", "callHook", "resolve", "has", "get", "set", "computed", "h", "hydrate", "createApp", "ref", "patchProp", "hasWarned", "remove2", "isFlushing", "track", "trigger", "warn", "callHook", "resolve", "warn", "isBoolean", "def", "enterCbKey", "compile", "warn"]
}
@@ -33,9 +33,9 @@ import {
version,
watch,
watchEffect
} from "./chunk-HBMF7DTD.js";
} from "./chunk-RY5ODQAQ.js";
// node_modules/_vue-demi@0.14.6@vue-demi/lib/index.mjs
// node_modules/vitepress/lib/vue-demi.mjs
var isVue2 = false;
var isVue3 = true;
function set(target, key, val) {
@@ -55,7 +55,7 @@ function del(target, key) {
delete target[key];
}
// node_modules/_@vueuse_shared@10.7.1@@vueuse/shared/index.mjs
// node_modules/@vueuse/shared/index.mjs
function computedEager(fn, options) {
var _a;
const result = shallowRef();
@@ -164,7 +164,7 @@ var injectLocal = (...args) => {
return inject(...args);
};
function createInjectionState(composable, options) {
const key = (options == null ? void 0 : options.injectionKey) || Symbol("InjectionState");
const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState");
const useProvidingState = (...args) => {
const state = composable(...args);
provideLocal(key, state);
@@ -398,12 +398,20 @@ function debounceFilter(ms, options = {}) {
};
return filter;
}
function throttleFilter(ms, trailing = true, leading = true, rejectOnCancel = false) {
function throttleFilter(...args) {
let lastExec = 0;
let timer;
let isLeading = true;
let lastRejector = noop;
let lastValue;
let ms;
let trailing;
let leading;
let rejectOnCancel;
if (!isRef(args[0]) && typeof args[0] === "object")
({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);
else
[ms, trailing = true, leading = true, rejectOnCancel = false] = args;
const clear = () => {
if (timer) {
clearTimeout(timer);
@@ -1045,8 +1053,8 @@ function useCounter(initialValue = 0, options = {}) {
max = Number.POSITIVE_INFINITY,
min = Number.NEGATIVE_INFINITY
} = options;
const inc = (delta = 1) => count.value = Math.min(max, count.value + delta);
const dec = (delta = 1) => count.value = Math.max(min, count.value - delta);
const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);
const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);
const get2 = () => count.value;
const set3 = (val) => count.value = Math.max(min, Math.min(max, val));
const reset = (val = _initialValue) => {
@@ -1526,17 +1534,24 @@ function getOldValue(source) {
return Array.isArray(source) ? source.map(() => void 0) : void 0;
}
function whenever(source, cb, options) {
return watch(
const stop = watch(
source,
(v, ov, onInvalidate) => {
if (v)
if (v) {
if (options == null ? void 0 : options.once)
nextTick(() => stop());
cb(v, ov, onInvalidate);
}
},
options
{
...options,
once: false
}
);
return stop;
}
// node_modules/_@vueuse_core@10.7.1@@vueuse/core/index.mjs
// node_modules/@vueuse/core/index.mjs
function computedAsync(evaluationCallback, initialState, optionsOrRef) {
let options;
if (isRef(optionsOrRef)) {
@@ -2001,26 +2016,28 @@ function useActiveElement(options = {}) {
}
return element;
};
const activeElement = computedWithControl(
() => null,
() => getDeepActiveElement()
);
const activeElement = ref();
const trigger = () => {
activeElement.value = getDeepActiveElement();
};
if (window2) {
useEventListener(window2, "blur", (event) => {
if (event.relatedTarget !== null)
return;
activeElement.trigger();
trigger();
}, true);
useEventListener(window2, "focus", activeElement.trigger, true);
useEventListener(window2, "focus", trigger, true);
}
trigger();
return activeElement;
}
function useMounted() {
const isMounted = ref(false);
if (getCurrentInstance()) {
const instance = getCurrentInstance();
if (instance) {
onMounted(() => {
isMounted.value = true;
});
}, isVue2 ? null : instance);
}
return isMounted;
}
@@ -2044,18 +2061,21 @@ function useRafFn(fn, options = {}) {
function loop(timestamp2) {
if (!isActive.value || !window2)
return;
const delta = timestamp2 - (previousFrameTimestamp || timestamp2);
if (!previousFrameTimestamp)
previousFrameTimestamp = timestamp2;
const delta = timestamp2 - previousFrameTimestamp;
if (intervalLimit && delta < intervalLimit) {
rafId = window2.requestAnimationFrame(loop);
return;
}
fn({ delta, timestamp: timestamp2 });
previousFrameTimestamp = timestamp2;
fn({ delta, timestamp: timestamp2 });
rafId = window2.requestAnimationFrame(loop);
}
function resume() {
if (!isActive.value && window2) {
isActive.value = true;
previousFrameTimestamp = 0;
rafId = window2.requestAnimationFrame(loop);
}
}
@@ -2224,7 +2244,8 @@ function useAnimate(target, keyframes, options) {
const el = unrefElement(target);
if (!isSupported.value || !el)
return;
animate.value = el.animate(toValue(keyframes), animateOptions);
if (!animate.value)
animate.value = el.animate(toValue(keyframes), animateOptions);
if (commitStyles)
animate.value.commitStyles();
if (persist)
@@ -2504,7 +2525,7 @@ function blobToBase64(blob) {
function useBattery(options = {}) {
const { navigator = defaultNavigator } = options;
const events2 = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"];
const isSupported = useSupported(() => navigator && "getBattery" in navigator);
const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function");
const charging = ref(false);
const chargingTime = ref(0);
const dischargingTime = ref(0);
@@ -2650,12 +2671,22 @@ var breakpointsBootstrapV5 = {
xl: 1200,
xxl: 1400
};
var breakpointsVuetify = {
xs: 600,
sm: 960,
md: 1264,
lg: 1904
var breakpointsVuetifyV2 = {
xs: 0,
sm: 600,
md: 960,
lg: 1264,
xl: 1904
};
var breakpointsVuetifyV3 = {
xs: 0,
sm: 600,
md: 960,
lg: 1280,
xl: 1920,
xxl: 2560
};
var breakpointsVuetify = breakpointsVuetifyV2;
var breakpointsAntDesign = {
xs: 480,
sm: 576,
@@ -2665,10 +2696,11 @@ var breakpointsAntDesign = {
xxl: 1600
};
var breakpointsQuasar = {
xs: 600,
sm: 1024,
md: 1440,
lg: 1920
xs: 0,
sm: 600,
md: 1024,
lg: 1440,
xl: 1920
};
var breakpointsSematic = {
mobileS: 320,
@@ -2699,14 +2731,14 @@ var breakpointsPrimeFlex = {
};
function useBreakpoints(breakpoints, options = {}) {
function getValue2(k, delta) {
let v = toValue(breakpoints[k]);
let v = toValue(breakpoints[toValue(k)]);
if (delta != null)
v = increaseWithUnit(v, delta);
if (typeof v === "number")
v = `${v}px`;
return v;
}
const { window: window2 = defaultWindow } = options;
const { window: window2 = defaultWindow, strategy = "min-width" } = options;
function match(query) {
if (!window2)
return false;
@@ -2715,25 +2747,30 @@ function useBreakpoints(breakpoints, options = {}) {
const greaterOrEqual = (k) => {
return useMediaQuery(() => `(min-width: ${getValue2(k)})`, options);
};
const smallerOrEqual = (k) => {
return useMediaQuery(() => `(max-width: ${getValue2(k)})`, options);
};
const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {
Object.defineProperty(shortcuts, k, {
get: () => greaterOrEqual(k),
get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k),
enumerable: true,
configurable: true
});
return shortcuts;
}, {});
function current() {
const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);
return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));
}
return Object.assign(shortcutMethods, {
greaterOrEqual,
smallerOrEqual,
greater(k) {
return useMediaQuery(() => `(min-width: ${getValue2(k, 0.1)})`, options);
},
greaterOrEqual,
smaller(k) {
return useMediaQuery(() => `(max-width: ${getValue2(k, -0.1)})`, options);
},
smallerOrEqual(k) {
return useMediaQuery(() => `(max-width: ${getValue2(k)})`, options);
},
between(a, b) {
return useMediaQuery(() => `(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`, options);
},
@@ -2752,9 +2789,10 @@ function useBreakpoints(breakpoints, options = {}) {
isInBetween(a, b) {
return match(`(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`);
},
current() {
const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);
return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));
current,
active() {
const bps = current();
return computed(() => bps.value.length === 0 ? "" : bps.value.at(-1));
}
});
}
@@ -2910,7 +2948,7 @@ function useClipboard(options = {}) {
const copied = ref(false);
const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);
function updateText() {
if (isClipboardApiSupported.value && permissionRead.value !== "denied") {
if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {
navigator.clipboard.readText().then((value) => {
text.value = value;
});
@@ -2922,7 +2960,7 @@ function useClipboard(options = {}) {
useEventListener(["copy", "cut"], updateText);
async function copy(value = toValue(source)) {
if (isSupported.value && value != null) {
if (isClipboardApiSupported.value && permissionWrite.value !== "denied")
if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))
await navigator.clipboard.writeText(value);
else
legacyCopy(value);
@@ -2945,6 +2983,9 @@ function useClipboard(options = {}) {
var _a, _b, _c;
return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : "";
}
function isAllowed(status) {
return status === "granted" || status === "prompt";
}
return {
isSupported,
text,
@@ -3112,26 +3153,29 @@ function useStorage(key, defaults2, storage, options = {}) {
}
if (!initOnMounted)
update();
return data;
function dispatchWriteEvent(oldValue, newValue) {
if (window2) {
window2.dispatchEvent(new CustomEvent(customStorageEventName, {
detail: {
key,
oldValue,
newValue,
storageArea: storage
}
}));
}
}
function write(v) {
try {
const oldValue = storage.getItem(key);
if (v == null) {
dispatchWriteEvent(oldValue, null);
storage.removeItem(key);
} else {
const serialized = serializer.write(v);
const oldValue = storage.getItem(key);
if (oldValue !== serialized) {
storage.setItem(key, serialized);
if (window2) {
window2.dispatchEvent(new CustomEvent(customStorageEventName, {
detail: {
key,
oldValue,
newValue: serialized,
storageArea: storage
}
}));
}
dispatchWriteEvent(oldValue, serialized);
}
}
} catch (e) {
@@ -3157,9 +3201,6 @@ function useStorage(key, defaults2, storage, options = {}) {
return serializer.read(rawValue);
}
}
function updateFromCustomEvent(event) {
update(event.detail);
}
function update(event) {
if (event && event.storageArea !== storage)
return;
@@ -3182,6 +3223,10 @@ function useStorage(key, defaults2, storage, options = {}) {
resumeWatch();
}
}
function updateFromCustomEvent(event) {
update(event.detail);
}
return data;
}
function usePreferredDark(options) {
return useMediaQuery("(prefers-color-scheme: dark)", options);
@@ -3307,16 +3352,21 @@ function useMutationObserver(target, callback, options = {}) {
observer = void 0;
}
};
const targets = computed(() => {
const value = toValue(target);
const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);
return new Set(items);
});
const stopWatch = watch(
() => unrefElement(target),
(el) => {
() => targets.value,
(targets2) => {
cleanup();
if (isSupported.value && window2 && el) {
if (isSupported.value && window2 && targets2.size) {
observer = new MutationObserver(callback);
observer.observe(el, mutationOptions);
targets2.forEach((el) => observer.observe(el, mutationOptions));
}
},
{ immediate: true }
{ immediate: true, flush: "post" }
);
const takeRecords = () => {
return observer == null ? void 0 : observer.takeRecords();
@@ -3369,11 +3419,11 @@ function useCssVar(prop, target, options = {}) {
);
return variable;
}
function useCurrentElement() {
function useCurrentElement(rootComponent) {
const vm = getCurrentInstance();
const currentElement = computedWithControl(
() => null,
() => vm.proxy.$el
() => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el
);
onUpdated(currentElement.trigger);
onMounted(currentElement.trigger);
@@ -3421,7 +3471,8 @@ function useCycleList(list, options) {
state,
index,
next,
prev
prev,
go: set3
};
}
function useDark(options = {}) {
@@ -3838,7 +3889,7 @@ function useDraggable(target, options = {}) {
};
const start = (e) => {
var _a2;
if (!filterEvent(e))
if (toValue(options.disabled) || !filterEvent(e))
return;
if (toValue(exact) && e.target !== toValue(target))
return;
@@ -3846,8 +3897,8 @@ function useDraggable(target, options = {}) {
const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);
const targetRect = toValue(target).getBoundingClientRect();
const pos = {
x: e.clientX - (container ? targetRect.left - containerRect.left : targetRect.left),
y: e.clientY - (container ? targetRect.top - containerRect.top : targetRect.top)
x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),
y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)
};
if ((onStart == null ? void 0 : onStart(pos, e)) === false)
return;
@@ -3855,24 +3906,22 @@ function useDraggable(target, options = {}) {
handleEvent(e);
};
const move = (e) => {
var _a2;
if (!filterEvent(e))
if (toValue(options.disabled) || !filterEvent(e))
return;
if (!pressedDelta.value)
return;
const container = toValue(containerElement);
const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);
const targetRect = toValue(target).getBoundingClientRect();
let { x, y } = position.value;
if (axis === "x" || axis === "both") {
x = e.clientX - pressedDelta.value.x;
if (container)
x = Math.min(Math.max(0, x), containerRect.width - targetRect.width);
x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);
}
if (axis === "y" || axis === "both") {
y = e.clientY - pressedDelta.value.y;
if (container)
y = Math.min(Math.max(0, y), containerRect.height - targetRect.height);
y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);
}
position.value = {
x,
@@ -3882,7 +3931,7 @@ function useDraggable(target, options = {}) {
handleEvent(e);
};
const end = (e) => {
if (!filterEvent(e))
if (toValue(options.disabled) || !filterEvent(e))
return;
if (!pressedDelta.value)
return;
@@ -3982,7 +4031,7 @@ function useResizeObserver(target, callback, options = {}) {
_el && observer.observe(_el, observerOptions);
}
},
{ immediate: true, flush: "post", deep: true }
{ immediate: true, flush: "post" }
);
const stop = () => {
cleanup();
@@ -4225,7 +4274,7 @@ function useIntersectionObserver(target, callback, options = {}) {
};
}
function useElementVisibility(element, options = {}) {
const { window: window2 = defaultWindow, scrollTarget } = options;
const { window: window2 = defaultWindow, scrollTarget, threshold = 0 } = options;
const elementIsVisible = ref(false);
useIntersectionObserver(
element,
@@ -4243,7 +4292,7 @@ function useElementVisibility(element, options = {}) {
{
root: scrollTarget,
window: window2,
threshold: 0
threshold
}
);
return elementIsVisible;
@@ -4284,51 +4333,90 @@ function useEventBus(key) {
}
return { on, once, off, emit, reset };
}
function resolveNestedOptions$1(options) {
if (options === true)
return {};
return options;
}
function useEventSource(url, events2 = [], options = {}) {
const event = ref(null);
const data = ref(null);
const status = ref("CONNECTING");
const eventSource = ref(null);
const error = shallowRef(null);
const urlRef = toRef2(url);
let explicitlyClosed = false;
let retried = 0;
const {
withCredentials = false
withCredentials = false,
immediate = true
} = options;
const close = () => {
if (eventSource.value) {
if (isClient && eventSource.value) {
eventSource.value.close();
eventSource.value = null;
status.value = "CLOSED";
explicitlyClosed = true;
}
};
const es = new EventSource(url, { withCredentials });
eventSource.value = es;
es.onopen = () => {
status.value = "OPEN";
error.value = null;
const _init = () => {
if (explicitlyClosed || typeof urlRef.value === "undefined")
return;
const es = new EventSource(urlRef.value, { withCredentials });
status.value = "CONNECTING";
eventSource.value = es;
es.onopen = () => {
status.value = "OPEN";
error.value = null;
};
es.onerror = (e) => {
status.value = "CLOSED";
error.value = e;
if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {
es.close();
const {
retries = -1,
delay = 1e3,
onFailed
} = resolveNestedOptions$1(options.autoReconnect);
retried += 1;
if (typeof retries === "number" && (retries < 0 || retried < retries))
setTimeout(_init, delay);
else if (typeof retries === "function" && retries())
setTimeout(_init, delay);
else
onFailed == null ? void 0 : onFailed();
}
};
es.onmessage = (e) => {
event.value = null;
data.value = e.data;
};
for (const event_name of events2) {
useEventListener(es, event_name, (e) => {
event.value = event_name;
data.value = e.data || null;
});
}
};
es.onerror = (e) => {
status.value = "CLOSED";
error.value = e;
};
es.onmessage = (e) => {
event.value = null;
data.value = e.data;
};
for (const event_name of events2) {
useEventListener(es, event_name, (e) => {
event.value = event_name;
data.value = e.data || null;
});
}
tryOnScopeDispose(() => {
const open = () => {
if (!isClient)
return;
close();
});
explicitlyClosed = false;
retried = 0;
_init();
};
if (immediate)
watch(urlRef, open, { immediate: true });
tryOnScopeDispose(close);
return {
eventSource,
event,
data,
status,
error,
open,
close
};
}
@@ -4389,7 +4477,7 @@ function isAbsoluteURL(url) {
}
function headersToObject(headers) {
if (typeof Headers !== "undefined" && headers instanceof Headers)
return Object.fromEntries([...headers.entries()]);
return Object.fromEntries(headers.entries());
return headers;
}
function combineCallbacks(combination, ...callbacks) {
@@ -4619,12 +4707,12 @@ function useFetch(url, ...args) {
{ deep: true }
);
const shell = {
isFinished,
isFinished: readonly(isFinished),
isFetching: readonly(isFetching),
statusCode,
response,
error,
data,
isFetching,
canAbort,
aborted,
abort,
@@ -4790,7 +4878,6 @@ function useFileSystemAccess(options = {}) {
return;
const [handle] = await window2.showOpenFilePicker({ ...toValue(options), ..._options });
fileHandle.value = handle;
await updateFile();
await updateData();
}
async function create(_options = {}) {
@@ -4798,7 +4885,6 @@ function useFileSystemAccess(options = {}) {
return;
fileHandle.value = await window2.showSaveFilePicker({ ...options, ..._options });
data.value = void 0;
await updateFile();
await updateData();
}
async function save(_options = {}) {
@@ -4830,6 +4916,7 @@ function useFileSystemAccess(options = {}) {
}
async function updateData() {
var _a, _b;
await updateFile();
const type = toValue(dataType);
if (type === "Text")
data.value = await ((_a = file.value) == null ? void 0 : _a.text());
@@ -5089,18 +5176,15 @@ function useGamepad(options = {}) {
id: gamepad.id,
hapticActuators,
axes: gamepad.axes.map((axes) => axes),
buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))
buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value })),
index: gamepad.index
};
};
const updateGamepadState = () => {
const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];
for (let i = 0; i < _gamepads.length; ++i) {
const gamepad = _gamepads[i];
if (gamepad) {
const index = gamepads.value.findIndex(({ index: index2 }) => index2 === gamepad.index);
if (index > -1)
gamepads.value[index] = stateFromGamepad(gamepad);
}
for (const gamepad of _gamepads) {
if (gamepad && gamepads.value[gamepad.index])
gamepads.value[gamepad.index] = stateFromGamepad(gamepad);
}
};
const { isActive, pause, resume } = useRafFn(updateGamepadState);
@@ -5119,12 +5203,9 @@ function useGamepad(options = {}) {
useEventListener("gamepaddisconnected", (e) => onGamepadDisconnected(e.gamepad));
tryOnMounted(() => {
const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];
if (_gamepads) {
for (let i = 0; i < _gamepads.length; ++i) {
const gamepad = _gamepads[i];
if (gamepad)
onGamepadConnected(gamepad);
}
for (const gamepad of _gamepads) {
if (gamepad && gamepads.value[gamepad.index])
onGamepadConnected(gamepad);
}
});
pause();
@@ -5293,7 +5374,10 @@ function useScroll(element, options = {}) {
passive: true
},
behavior = "auto",
window: window2 = defaultWindow
window: window2 = defaultWindow,
onError = (e) => {
console.error(e);
}
} = options;
const internalX = ref(0);
const internalY = ref(0);
@@ -5354,12 +5438,12 @@ function useScroll(element, options = {}) {
var _a;
if (!window2)
return;
const el = target.document ? target.document.documentElement : (_a = target.documentElement) != null ? _a : target;
const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);
const { display, flexDirection } = getComputedStyle(el);
const scrollLeft = el.scrollLeft;
directions.left = scrollLeft < internalX.value;
directions.right = scrollLeft > internalX.value;
const left = Math.abs(scrollLeft) <= 0 + (offset.left || 0);
const left = Math.abs(scrollLeft) <= (offset.left || 0);
const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
if (display === "flex" && flexDirection === "row-reverse") {
arrivedState.left = right;
@@ -5374,7 +5458,7 @@ function useScroll(element, options = {}) {
scrollTop = window2.document.body.scrollTop;
directions.top = scrollTop < internalY.value;
directions.bottom = scrollTop > internalY.value;
const top = Math.abs(scrollTop) <= 0 + (offset.top || 0);
const top = Math.abs(scrollTop) <= (offset.top || 0);
const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;
if (display === "flex" && flexDirection === "column-reverse") {
arrivedState.top = bottom;
@@ -5402,10 +5486,14 @@ function useScroll(element, options = {}) {
eventListenerOptions
);
tryOnMounted(() => {
const _element = toValue(element);
if (!_element)
return;
setArrivedState(_element);
try {
const _element = toValue(element);
if (!_element)
return;
setArrivedState(_element);
} catch (e) {
onError(e);
}
});
useEventListener(
element,
@@ -6259,6 +6347,37 @@ function usePageLeave(options = {}) {
}
return isLeft;
}
function useScreenOrientation(options = {}) {
const {
window: window2 = defaultWindow
} = options;
const isSupported = useSupported(() => window2 && "screen" in window2 && "orientation" in window2.screen);
const screenOrientation = isSupported.value ? window2.screen.orientation : {};
const orientation = ref(screenOrientation.type);
const angle = ref(screenOrientation.angle || 0);
if (isSupported.value) {
useEventListener(window2, "orientationchange", () => {
orientation.value = screenOrientation.type;
angle.value = screenOrientation.angle;
});
}
const lockOrientation = (type) => {
if (isSupported.value && typeof screenOrientation.lock === "function")
return screenOrientation.lock(type);
return Promise.reject(new Error("Not supported"));
};
const unlockOrientation = () => {
if (isSupported.value && typeof screenOrientation.unlock === "function")
screenOrientation.unlock();
};
return {
isSupported,
orientation,
angle,
lockOrientation,
unlockOrientation
};
}
function useParallax(target, options = {}) {
const {
deviceOrientationTiltAdjust = (i) => i,
@@ -6268,6 +6387,7 @@ function useParallax(target, options = {}) {
window: window2 = defaultWindow
} = options;
const orientation = reactive(useDeviceOrientation({ window: window2 }));
const screenOrientation = reactive(useScreenOrientation({ window: window2 }));
const {
elementX: x,
elementY: y,
@@ -6281,7 +6401,23 @@ function useParallax(target, options = {}) {
});
const roll = computed(() => {
if (source.value === "deviceOrientation") {
const value = -orientation.beta / 90;
let value;
switch (screenOrientation.orientation) {
case "landscape-primary":
value = orientation.gamma / 90;
break;
case "landscape-secondary":
value = -orientation.gamma / 90;
break;
case "portrait-primary":
value = -orientation.beta / 90;
break;
case "portrait-secondary":
value = orientation.beta / 90;
break;
default:
value = -orientation.beta / 90;
}
return deviceOrientationRollAdjust(value);
} else {
const value = -(y.value - height.value / 2) / height.value;
@@ -6290,7 +6426,23 @@ function useParallax(target, options = {}) {
});
const tilt = computed(() => {
if (source.value === "deviceOrientation") {
const value = orientation.gamma / 90;
let value;
switch (screenOrientation.orientation) {
case "landscape-primary":
value = orientation.beta / 90;
break;
case "landscape-secondary":
value = -orientation.beta / 90;
break;
case "portrait-primary":
value = orientation.gamma / 90;
break;
case "portrait-secondary":
value = -orientation.gamma / 90;
break;
default:
value = orientation.gamma / 90;
}
return deviceOrientationTiltAdjust(value);
} else {
const value = (x.value - width.value / 2) / width.value;
@@ -6374,7 +6526,7 @@ function usePointer(options = {}) {
};
}
function usePointerLock(target, options = {}) {
const { document: document2 = defaultDocument, pointerLockOptions } = options;
const { document: document2 = defaultDocument } = options;
const isSupported = useSupported(() => document2 && "pointerLockElement" in document2);
const element = ref();
const triggerElement = ref();
@@ -6398,7 +6550,7 @@ function usePointerLock(target, options = {}) {
}
});
}
async function lock(e, options2) {
async function lock(e) {
var _a;
if (!isSupported.value)
throw new Error("Pointer Lock API is not supported by your browser.");
@@ -6406,7 +6558,7 @@ function usePointerLock(target, options = {}) {
targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);
if (!targetElement)
throw new Error("Target element undefined.");
targetElement.requestPointerLock(options2 != null ? options2 : pointerLockOptions);
targetElement.requestPointerLock();
return await until(element).toBe(targetElement);
}
async function unlock() {
@@ -6572,37 +6724,6 @@ function usePrevious(value, initialValue) {
);
return readonly(previous);
}
function useScreenOrientation(options = {}) {
const {
window: window2 = defaultWindow
} = options;
const isSupported = useSupported(() => window2 && "screen" in window2 && "orientation" in window2.screen);
const screenOrientation = isSupported.value ? window2.screen.orientation : {};
const orientation = ref(screenOrientation.type);
const angle = ref(screenOrientation.angle || 0);
if (isSupported.value) {
useEventListener(window2, "orientationchange", () => {
orientation.value = screenOrientation.type;
angle.value = screenOrientation.angle;
});
}
const lockOrientation = (type) => {
if (isSupported.value && typeof screenOrientation.lock === "function")
return screenOrientation.lock(type);
return Promise.reject(new Error("Not supported"));
};
const unlockOrientation = () => {
if (isSupported.value && typeof screenOrientation.unlock === "function")
screenOrientation.unlock();
};
return {
isSupported,
orientation,
angle,
lockOrientation,
unlockOrientation
};
}
var topVarName = "--vueuse-safe-area-top";
var rightVarName = "--vueuse-safe-area-right";
var bottomVarName = "--vueuse-safe-area-bottom";
@@ -6745,13 +6866,12 @@ var elInitialOverflow = /* @__PURE__ */ new WeakMap();
function useScrollLock(element, initialState = false) {
const isLocked = ref(initialState);
let stopTouchMoveListener = null;
let initialOverflow;
watch(toRef2(element), (el) => {
const target = resolveElement(toValue(el));
if (target) {
const ele = target;
if (!elInitialOverflow.get(ele))
elInitialOverflow.set(ele, initialOverflow);
elInitialOverflow.set(ele, ele.style.overflow);
if (isLocked.value)
ele.style.overflow = "hidden";
}
@@ -7114,7 +7234,7 @@ function useStorageAsync(key, initialValue, storage, options = {}) {
const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];
if (!storage) {
try {
storage = getSSRHandler("getDefaultStorage", () => {
storage = getSSRHandler("getDefaultStorageAsync", () => {
var _a2;
return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;
})();
@@ -7395,21 +7515,23 @@ function useTextSelection(options = {}) {
};
}
function useTextareaAutosize(options) {
var _a;
const textarea = ref(options == null ? void 0 : options.element);
const input = ref(options == null ? void 0 : options.input);
const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : "height";
const textareaScrollHeight = ref(1);
function triggerResize() {
var _a, _b;
var _a2, _b;
if (!textarea.value)
return;
let height = "";
textarea.value.style.height = "1px";
textareaScrollHeight.value = (_a = textarea.value) == null ? void 0 : _a.scrollHeight;
textarea.value.style[styleProp] = "1px";
textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;
if (options == null ? void 0 : options.styleTarget)
toValue(options.styleTarget).style.height = `${textareaScrollHeight.value}px`;
toValue(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`;
else
height = `${textareaScrollHeight.value}px`;
textarea.value.style.height = height;
textarea.value.style[styleProp] = height;
(_b = options == null ? void 0 : options.onResize) == null ? void 0 : _b.call(options);
}
watch([input, textarea], () => nextTick(triggerResize), { immediate: true });
@@ -7901,6 +8023,9 @@ function useUserMedia(options = {}) {
},
{ immediate: true }
);
tryOnScopeDispose(() => {
stop();
});
return {
isSupported,
stream,
@@ -8346,6 +8471,7 @@ function useWebSocket(url, options = {}) {
resetHeartbeat();
heartbeatPause == null ? void 0 : heartbeatPause();
wsRef.value.close(code, reason);
wsRef.value = void 0;
};
const send = (data2, useBuffer = true) => {
if (!wsRef.value || status.value !== "OPEN") {
@@ -8371,7 +8497,6 @@ function useWebSocket(url, options = {}) {
};
ws.onclose = (ev) => {
status.value = "CLOSED";
wsRef.value = void 0;
onDisconnected == null ? void 0 : onDisconnected(ws, ev);
if (!explicitlyClosed && options.autoReconnect) {
const {
@@ -8440,7 +8565,7 @@ function useWebSocket(url, options = {}) {
_init();
};
if (immediate)
watch(urlRef, open, { immediate: true });
open();
return {
data,
status,
@@ -8815,6 +8940,8 @@ export {
useMediaQuery,
breakpointsTailwind,
breakpointsBootstrapV5,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
breakpointsVuetify,
breakpointsAntDesign,
breakpointsQuasar,
@@ -8897,6 +9024,7 @@ export {
useOffsetPagination,
useOnline,
usePageLeave,
useScreenOrientation,
useParallax,
useParentElement,
usePerformanceObserver,
@@ -8908,7 +9036,6 @@ export {
usePreferredLanguages,
usePreferredReducedMotion,
usePrevious,
useScreenOrientation,
useScreenSafeArea,
useScriptTag,
useScrollLock,
@@ -8949,4 +9076,13 @@ export {
useWindowScroll,
useWindowSize
};
//# sourceMappingURL=chunk-JXSPZ7FU.js.map
/*! Bundled license information:
vitepress/lib/vue-demi.mjs:
(**
* vue-demi v0.14.7
* Copyright (c) 2020-present, Anthony Fu
* @license MIT
*)
*/
//# sourceMappingURL=chunk-ZEI2HCB7.js.map
@@ -0,0 +1,7 @@
{
"version": 3,
"sources": ["../../../../node_modules/vitepress/lib/vue-demi.mjs", "../../../../node_modules/@vueuse/shared/index.mjs", "../../../../node_modules/@vueuse/core/index.mjs"],
"sourcesContent": ["/**\n * vue-demi v0.14.7\n * Copyright (c) 2020-present, Anthony Fu\n * @license MIT\n */\n\nimport * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport { Vue, Vue2, isVue2, isVue3, install }\n", "import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n Line truncated
"mappings": "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 truncated
"names": ["get", "set", "ref", "keys", "invoke", "toRef", "toRefs", "events", "window", "document", "timestamp", "getValue", "defaults", "toRef", "set", "onUpdated", "preventDefault", "toRefs", "now", "scrollTo", "keys", "get", "isReadonly"]
}
File diff suppressed because it is too large. Load diff
@@ -1,7 +1,7 @@
{
"version": 3,
"sources": ["../../../../node_modules/_@vue_devtools-api@6.5.1@@vue/devtools-api/lib/esm/env.js", "../../../../node_modules/_@vue_devtools-api@6.5.1@@vue/devtools-api/lib/esm/const.js", "../../../../node_modules/_@vue_devtools-api@6.5.1@@vue/devtools-api/lib/esm/time.js", "../../../../node_modules/_@vue_devtools-api@6.5.1@@vue/devtools-api/lib/esm/proxy.js", "../../../../node_modules/_@vue_devtools-api@6.5.1@@vue/devtools-api/lib/esm/index.js"],
"sourcesContent": ["export function getDevtoolsGlobalHook() {\n return getTarget().__VUE_DEVTOOLS_GLOBAL_HOOK__;\n}\nexport function getTarget() {\n // @ts-ignore\n return (typeof navigator !== 'undefined' && typeof window !== 'undefined')\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n}\nexport const isProxyAvailable = typeof Proxy === 'function';\n", "export const HOOK_SETUP = 'devtools-plugin:setup';\nexport const HOOK_PLUGIN_SETTINGS_SET = 'plugin:settings:set';\n", "let supported;\nlet perf;\nexport function isPerformanceSupported() {\n var _a;\n if (supported !== undefined) {\n return supported;\n }\n if (typeof window !== 'undefined' && window.performance) {\n supported = true;\n perf = window.performance;\n }\n else if (typeof global !== 'undefined' && ((_a = global.perf_hooks) === null || _a === void 0 ? void 0 : _a.performance)) {\n supported = true;\n perf = global.perf_hooks.performance;\n }\n else {\n supported = false;\n }\n return supported;\n}\nexport function now() {\n return isPerformanceSupported() ? perf.now() : Date.now();\n}\n", "import { HOOK_PLUGIN_SETTINGS_SET } from './const.js';\nimport { now } from './time.js';\nexport class ApiProxy {\n constructor(plugin, hook) {\n this.target = null;\n this.targetQueue = [];\n this.onQueue = [];\n this.plugin = plugin;\n this.hook = hook;\n const defaultSettings = {};\n if (plugin.settings) {\n for (const id in plugin.settings) {\n const item = plugin.settings[id];\n defaultSettings[id] = item.defaultValue;\n }\n }\n const localSettingsSaveId = `__vue-devtools-plugin-settings__${plugin.id}`;\n let currentSettings = Object.assign({}, defaultSettings);\n try {\n const raw = localStorage.getItem(localSettingsSaveId);\n const data = JSON.parse(raw);\n Object.assign(currentSettings, data);\n }\n catch (e) {\n // noop\n }\n this.fallbacks = {\n getSettings() {\n return currentSettings;\n },\n setSettings(value) {\n try {\n localStorage.setItem(localSettingsSaveId, JSON.stringify(value));\n }\n catch (e) {\n // noop\n }\n currentSettings = value;\n },\n now() {\n return now();\n },\n };\n if (hook) {\n hook.on(HOOK_PLUGIN_SETTINGS_SET, (pluginId, value) => {\n if (pluginId === this.plugin.id) {\n this.fallbacks.setSettings(value);\n }\n });\n }\n this.proxiedOn = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target.on[prop];\n }\n else {\n return (...args) => {\n this.onQueue.push({\n method: prop,\n args,\n });\n };\n }\n },\n });\n this.proxiedTarget = new Proxy({}, {\n get: (_target, prop) => {\n if (this.target) {\n return this.target[prop];\n }\n else if (prop === 'on') {\n return this.proxiedOn;\n }\n else if (Object.keys(this.fallbacks).includes(prop)) {\n return (...args) => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve: () => { },\n });\n return this.fallbacks[prop](...args);\n };\n }\n else {\n return (...args) => {\n return new Promise(resolve => {\n this.targetQueue.push({\n method: prop,\n args,\n resolve,\n });\n });\n };\n }\n },\n });\n }\n async setRealTarget(target) {\n this.target = target;\n for (const item of this.onQueue) {\n this.target.on[item.method](...item.args);\n }\n for (const item of this.targetQueue) {\n item.resolve(await this.target[item.method](...item.args));\n }\n }\n}\n", "import { getTarget, getDevtoolsGlobalHook, isProxyAvailable } from './env.js';\nimport { HOOK_SETUP } from './const.js';\nimport { ApiProxy } from Line truncated
"mappings": "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",
"names": []
"sources": ["../../../../node_modules/@vue/devtools-shared/dist/index.js", "../../../../node_modules/hookable/dist/index.mjs", "../../../../node_modules/perfect-debounce/dist/index.mjs", "../../../../node_modules/@vue/devtools-kit/dist/index.js"],
"sourcesContent": ["var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target2) => (target2 = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target2, \"default\", { value: mod, enumerable: true }) : target2,\n mod\n));\n\n// ../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.43.0_@types+node@20.12.12__postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js\nvar init_esm_shims = __esm({\n \"../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.43.0_@types+node@20.12.12__postcss@8.4.38_typescript@5.4.5/node_modules/tsup/assets/esm_shims.js\"() {\n \"use strict\";\n }\n});\n\n// ../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js\nvar require_rfdc = __commonJS({\n \"../../node_modules/.pnpm/rfdc@1.3.1/node_modules/rfdc/index.js\"(exports, module) {\n \"use strict\";\n init_esm_shims();\n module.exports = rfdc2;\n function copyBuffer(cur) {\n if (cur instanceof Buffer) {\n return Buffer.from(cur);\n }\n return new cur.constructor(cur.buffer.slice(), cur.byteOffset, cur.length);\n }\n function rfdc2(opts) {\n opts = opts || {};\n if (opts.circles)\n return rfdcCircles(opts);\n return opts.proto ? cloneProto : clone;\n function cloneArray(a, fn) {\n var keys = Object.keys(a);\n var a2 = new Array(keys.length);\n for (var i = 0; i < keys.length; i++) {\n var k = keys[i];\n var cur = a[k];\n if (typeof cur !== \"object\" || cur === null) {\n a2[k] = cur;\n } else if (cur instanceof Date) {\n a2[k] = new Date(cur);\n } else if (ArrayBuffer.isView(cur)) {\n a2[k] = copyBuffer(cur);\n } else {\n a2[k] = fn(cur);\n }\n }\n return a2;\n }\n function clone(o) {\n if (typeof o !== \"object\" || o === null)\n return o;\n if (o instanceof Date)\n return new Date(o);\n if (Array.isArray(o))\n return cloneArray(o, clone);\n if (o instanceof Map)\n return new Map(cloneArray(Array.from(o), clone));\n if (o instanceof Set)\n return new Set(cloneArray(Array.from(o), clone));\n var o2 = {};\n for (var k in o) {\n if (Object.hasOwnProperty.call(o, k) === false)\n continue;\n var cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur instanceof Date) {\n o2[k] = new Date(cur);\n } else if (cur instanceof Map) {\n o2[k] = new Map(cloneArray(Array.from(cur), clone));\n } else if (cur instanceof Set) {\n o2[k] = new Set(cloneArray(Array.from(cur), clone));\n } else if (ArrayBuffer.isView(cur)) {\n o2[k] = copyBuffer(cur);\n } else {\n o2[k] = clone(cur);\n }\n }\n return o2;\n }\n function cloneProto(o) {\n if (typeof o !== \"object\" || o === null)\n return o;\n if (o instanceof Date)\n return new Date(o);\n if (Array.isArray(o))\n return cloneArray(o, cloneProto);\n if (o instanceof Map)\n return new Map(cloneArray(Array.from(o), cloneProto));\n if (o instanceof Set)\n return new Set(cloneArray(Array.from(o), cloneProto));\n var o2 = {};\n for (var k in o) {\n var cur = o[k];\n if (typeof cur !== \"object\" || cur === null) {\n o2[k] = cur;\n } else if (cur instanceof Date) {\n o2[k] = new Date(cur);\n } else if (cur instanceof Map) {\n Line truncated
"mappings": "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 truncated
"names": ["hook", "hook", "__create", "__defProp", "__getOwnPropDesc", "__getOwnPropNames", "__getProtoOf", "__hasOwnProp", "__esm", "__commonJS", "__copyProps", "__toESM", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "__toESM", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims", "init_esm_shims"]
}
@@ -11,6 +11,8 @@ import {
breakpointsSematic,
breakpointsTailwind,
breakpointsVuetify,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
bypassFilter,
camelize,
clamp,
@@ -271,8 +273,8 @@ import {
watchTriggerable,
watchWithFilter,
whenever
} from "./chunk-JXSPZ7FU.js";
import "./chunk-HBMF7DTD.js";
} from "./chunk-ZEI2HCB7.js";
import "./chunk-RY5ODQAQ.js";
export {
DefaultMagicKeysAliasMap,
StorageSerializers,
@@ -288,6 +290,8 @@ export {
breakpointsSematic,
breakpointsTailwind,
breakpointsVuetify,
breakpointsVuetifyV2,
breakpointsVuetifyV3,
bypassFilter,
camelize,
clamp,
@@ -158,7 +158,7 @@ import {
withMemo,
withModifiers,
withScopeId
} from "./chunk-HBMF7DTD.js";
} from "./chunk-RY5ODQAQ.js";
export {
BaseTransition,
BaseTransitionPropsValidators,
@@ -1,10 +1,10 @@
# Danmuku
# 弹幕库
## Demo
## 演示
👉 [View Full Demo](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku)
👉 [查看完整演示](https://artplayer.org/?libs=./uncompiled/artplayer-plugin-danmuku/index.js&example=danmuku)
## Installation
## 安装
::: code-group
@@ -40,34 +40,116 @@ https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
:::
## Option
## 弹幕结构
每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕源,通常只需要`text`就可以发送一个弹幕,其余都是非必要参数
```js
{
danmuku: [], // 弹幕库,支持数组, xml 地址, Promise返回数组
speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
fontSize: 25, // 字体大小,支持数字和百分比
color: '#FFFFFF', // 默认字体颜色
mode: 0, // 默认模式,0-滚动,1-静止
margin: [10, '25%'], // 弹幕上下边距,支持数字和百分比
antiOverlap: true, // 是否防重叠
useWorker: true, // 是否使用 web worker
synchronousPlayback: false, // 是否同步到播放速度
filter: (danmu) => danmu.text.length < 50, // 弹幕过滤函数,返回 true 则可以发送
lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60]
maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500]
minWidth: 200, // 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
maxWidth: 400, // 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
theme: 'dark', // 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
heatmap: true, // 是否开启弹幕热度图, 默认为 false
beforeEmit: (danmu) => !!danmu.text.trim(), // 发送弹幕前的自定义校验,返回 true 则可以发送
// 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效
mount: document.querySelector('.artplayer-danmuku'),
text: '', // 弹幕文本
time: 10, // 弹幕时间, 默认为当前播放器时间
mode: 0, // 弹幕模式: 0: 滚动(默认),1: 顶部,2: 底部
color: '#FFFFFF', // 弹幕颜色,默认为白色
border: false, // 弹幕是否有描边, 默认为 false
style: {}, // 弹幕自定义样式, 默认为空对象
escape: true, // 弹幕文本是否转义, 默认为 true
}
```
## Using Danmuku Array
## 全部选项
只有`danmuku`是必须的参数,其余都是非必填
```js
{
danmuku: [], // 弹幕源
speed: 5, // 弹幕持续时间,范围在[1 ~ 10]
margin: [10, '25%'], // 弹幕上下边距,支持像素数字和百分比
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
color: '#FFFFFF', // 默认弹幕颜色,可以被单独弹幕项覆盖
mode: 0, // 默认弹幕模式: 0: 滚动,1: 顶部,2: 底部
modes: [0, 1, 2], // 弹幕可见的模式
fontSize: 25, // 弹幕字体大小,支持像素数字和百分比
antiOverlap: true, // 弹幕是否防重叠
synchronousPlayback: false, // 是否同步播放速度
mount: undefined, // 弹幕发射器挂载点, 默认为播放器控制栏中部
heatmap: false, // 是否开启热力图
points: [], // 热力图数据
filter: () => true, // 弹幕载入前的过滤器,只支持返回布尔值
beforeEmit: () => true, // 弹幕发送前的过滤器,支持返回 Promise
beforeVisible: () => true, // 弹幕显示前的过滤器,支持返回 Promise
visible: true, // 弹幕层是否可见
maxLength: 200, // 弹幕输入框最大长度, 范围在[1 ~ 1000]
lockTime: 5, // 输入框锁定时间,范围在[1 ~ 60]
theme: 'dark', // 弹幕主题,支持 dark 和 light,只在自定义挂载时生效
}
```
## 生命周期
来自用户输入的弹幕:
`beforeEmit -> filter -> beforeVisible -> artplayerPluginDanmuku:visible`
来自服务器的弹幕:
`filter -> beforeVisible -> artplayerPluginDanmuku:visible`
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
</div>
```js
// 保存到数据库
function saveDanmu(danmu) {
return new Promise(resolve => {
setTimeout(() => {
resolve(true);
}, 1000);
})
}
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
// 这是用户在输入框输入弹幕文本,然后点击发送按钮后触发的函数
// 你可以对弹幕做合法校验,或者做存库处理
// 当返回true后才表示把弹幕加入到弹幕队列
async beforeEmit(danmu) {
const isDirty = (/fuck/i).test(danmu.text);
if (isDirty) return false;
const state = await saveDanmu(danmu);
return state;
},
// 这里是所有弹幕的过滤器,包含来自服务端的和来自用户输入的
// 你可以对弹幕做合法校验
// 当返回true后才表示把弹幕加入到弹幕队列
filter(danmu) {
return danmu.text.length <= 200;
},
// 这是弹幕即将显示的时触发的函数
// 你可以对弹幕做合法校验
// 当返回true后才表示可以马上发送到播放器里
async beforeVisible(danmu) {
return true;
},
}),
],
});
// 弹幕已经出现在播放器里,你可以访问到弹幕的dom元素里
art.on('artplayerPluginDanmuku:visible', danmu => {
danmu.$ref.innerHTML = 'ଘ(੭ˊᵕˋ)੭: ' + danmu.$ref.innerHTML;
})
```
## 使用弹幕数组
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -77,31 +159,11 @@ https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
// Danmuku array
danmuku: [
{
text: '111', // Danmuku text
time: 1, // Send time, in seconds
color: '#fff', // Danmuku local color
border: false, // Whether to display outline
mode: 0, // Danmuku mode: 0 for scrolling, 1 for stationary
},
{
text: '222',
time: 2,
color: 'red',
border: true,
mode: 0,
},
{
text: '333',
time: 3,
color: 'green',
border: false,
mode: 1,
text: '使用数组',
},
],
}),
@@ -109,7 +171,9 @@ var art = new Artplayer({
});
```
## Using Danmuku XML
## 使用弹幕 XML
弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -121,14 +185,13 @@ var art = new Artplayer({
url: '/assets/sample/video.mp4',
plugins: [
artplayerPluginDanmuku({
// Danmuku XML file, consistent with the danmuku format of the Bilibili website
danmuku: '/assets/sample/danmuku.xml',
}),
],
});
```
## Using Asynchronous Call
## 使用异步返回
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -140,21 +203,11 @@ var art = new Artplayer({
url: '/assets/sample/video.mp4',
plugins: [
artplayerPluginDanmuku({
// Use Promise to return asynchronously
danmuku: function () {
return new Promise((resolve) => {
return resolve([
return new Promise((resovle) => {
return resovle([
{
text: '111',
time: 1,
},
{
text: '222',
time: 2,
},
{
text: '333',
time: 3,
text: '使用 Promise 异步返回',
},
]);
});
@@ -166,7 +219,7 @@ var art = new Artplayer({
## `hide/show`
Hide or show the bullet comments with the methods `hide` and `show`.
通过方法 `hide` 和 `show` 进行隐藏或者显示弹幕
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -184,14 +237,14 @@ var art = new Artplayer({
controls: [
{
position: 'right',
html: 'Hide Danmuku',
html: '隐藏弹幕',
click: function () {
art.plugins.artplayerPluginDanmuku.hide();
},
},
{
position: 'right',
html: 'Show Danmuku',
html: '显示弹幕',
click: function () {
art.plugins.artplayerPluginDanmuku.show();
},
@@ -199,9 +252,10 @@ var art = new Artplayer({
],
});
```
## `isHide`
Judge whether the current barrage is hidden or displayed with the `isHide` property.
通过属性 `isHide` 判断当前弹幕是隐藏或者显示
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -219,14 +273,14 @@ var art = new Artplayer({
controls: [
{
position: 'right',
html: 'Hide Barrage',
html: '隐藏弹幕',
click: function (_, event) {
if (art.plugins.artplayerPluginDanmuku.isHide) {
art.plugins.artplayerPluginDanmuku.show();
event.target.innerText = 'Hide Barrage';
event.target.innerText = '隐藏弹幕';
} else {
art.plugins.artplayerPluginDanmuku.hide();
event.target.innerText = 'Show Barrage';
event.target.innerText = '显示弹幕';
}
},
},
@@ -236,7 +290,7 @@ var art = new Artplayer({
## `emit`
Send a real-time danmaku message through the `emit` method
通过方法 `emit` 发送一条实时弹幕
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -254,9 +308,9 @@ var art = new Artplayer({
controls: [
{
position: 'right',
html: 'Send Danmaku',
html: '发送弹幕',
click: function () {
var text = prompt('Please enter the danmaku text', 'Danmaku test text');
var text = prompt('请输入弹幕文本', '弹幕测试文本');
if (!text || !text.trim()) return;
var color = '#' + Math.floor(Math.random() * 0xffffff).toString(16);
art.plugins.artplayerPluginDanmuku.emit({
@@ -269,22 +323,10 @@ var art = new Artplayer({
],
});
```
## `config`
Change the barrage configuration in real-time with the `config` method, supported attributes include:
- `danmuku`
- `speed`
- `opacity`
- `fontSize`
- `color`
- `mode`
- `margin`
- `antiOverlap`
- `synchronousPlayback`
- `filter`
- `lockTime`
- `beforeEmit`
通过方法 `config` 实时改变弹幕配置
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -302,7 +344,7 @@ var art = new Artplayer({
controls: [
{
position: 'right',
html: 'Danmaku size:<input type="range" min="12" max="50" step="1" value="25">',
html: '弹幕大小:<input type="range" min="12" max="50" step="1" value="25">',
style: {
display: 'flex',
alignItems: 'center',
@@ -319,9 +361,10 @@ var art = new Artplayer({
],
});
```
## `load`
The load method can be used to reload the danmu data source or switch to new danmu.
通过 load 方法可以重载弹幕源,或者切换新弹幕
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -339,14 +382,14 @@ var art = new Artplayer({
controls: [
{
position: 'right',
html: 'Reload Danmu',
html: '重载弹幕',
click: function () {
art.plugins.artplayerPluginDanmuku.load();
},
},
{
position: 'right',
html: 'Switch Danmu',
html: '切换弹幕',
click: function () {
art.plugins.artplayerPluginDanmuku.config({
danmuku: '/assets/sample/danmuku-v2.xml',
@@ -357,9 +400,10 @@ var art = new Artplayer({
],
});
```
## `reset`
Used to clear the current displayed barrages
用于清空当前显示的弹幕
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -369,7 +413,6 @@ Used to clear the current displayed barrages
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
@@ -382,9 +425,38 @@ art.on('resize', () => {
});
```
## `mount`
在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。
当播放器全屏的时候,发射器会自动回到控制栏的中部。假如你挂载的地方是亮色的话,建议把 `theme` 设置成 `light`,否则会看不清。
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
</div>
```js
var $danmu = document.querySelector('.artplayer-app');
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
fullscreenWeb: true,
plugins: [
artplayerPluginDanmuku({
mount: $danmu,
theme: 'dark',
danmuku: '/assets/sample/danmuku.xml',
}),
],
});
// 也可以手动挂载
// art.plugins.artplayerPluginDanmuku.mount($danmu);
```
## `option`
Used to get the current barrage configuration
用于获取当前弹幕配置
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -394,7 +466,6 @@ Used to get the current barrage configuration
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
@@ -407,13 +478,12 @@ art.on('ready', () => {
});
```
## Event
## 事件
```js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
@@ -421,6 +491,10 @@ var art = new Artplayer({
],
});
art.on('artplayerPluginDanmuku:visible', (danmu) => {
console.info('显示弹幕', danmu);
});
art.on('artplayerPluginDanmuku:emit', (danmu) => {
console.info('新增弹幕', danmu);
});
@@ -40,33 +40,115 @@ https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
:::
## 选项
## 弹幕结构
每一个弹幕是一个对象,多个弹幕组成的数组就是弹幕源,通常只需要`text`就可以发送一个弹幕,其余都是非必要参数
```js
{
danmuku: [], // 弹幕库,支持数组, xml 地址, Promise返回数组
speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
fontSize: 25, // 字体大小,支持数字和百分比
color: '#FFFFFF', // 默认字体颜色
mode: 0, // 默认模式,0-滚动,1-静止
margin: [10, '25%'], // 弹幕上下边距,支持数字和百分比
antiOverlap: true, // 是否防重叠
useWorker: true, // 是否使用 web worker
synchronousPlayback: false, // 是否同步到播放速度
filter: (danmu) => danmu.text.length < 50, // 弹幕过滤函数,返回 true 则可以发送
lockTime: 5, // 输入框锁定时间,单位秒,范围在[1 ~ 60]
maxLength: 100, // 输入框最大可输入的字数,范围在[0 ~ 500]
minWidth: 200, // 输入框最小宽度,范围在[0 ~ 500],填 0 则为无限制
maxWidth: 400, // 输入框最大宽度,范围在[0 ~ Infinity],填 0 则为 100% 宽度
theme: 'dark', // 输入框自定义挂载时的主题色,默认为 dark,可以选填亮色 light
heatmap: true, // 是否开启弹幕热度图, 默认为 false
beforeEmit: (danmu) => !!danmu.text.trim(), // 发送弹幕前的自定义校验,返回 true 则可以发送
// 通过 mount 选项可以自定义输入框挂载的位置,默认挂载于播放器底部,仅在当宽度小于最小值时生效
mount: document.querySelector('.artplayer-danmuku'),
text: '', // 弹幕文本
time: 10, // 弹幕时间, 默认为当前播放器时间
mode: 0, // 弹幕模式: 0: 滚动(默认),1: 顶部,2: 底部
color: '#FFFFFF', // 弹幕颜色,默认为白色
border: false, // 弹幕是否有描边, 默认为 false
style: {}, // 弹幕自定义样式, 默认为空对象
escape: true, // 弹幕文本是否转义, 默认为 true
}
```
## 全部选项
只有`danmuku`是必须的参数,其余都是非必填
```js
{
danmuku: [], // 弹幕源
speed: 5, // 弹幕持续时间,范围在[1 ~ 10]
margin: [10, '25%'], // 弹幕上下边距,支持像素数字和百分比
opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
color: '#FFFFFF', // 默认弹幕颜色,可以被单独弹幕项覆盖
mode: 0, // 默认弹幕模式: 0: 滚动,1: 顶部,2: 底部
modes: [0, 1, 2], // 弹幕可见的模式
fontSize: 25, // 弹幕字体大小,支持像素数字和百分比
antiOverlap: true, // 弹幕是否防重叠
synchronousPlayback: false, // 是否同步播放速度
mount: undefined, // 弹幕发射器挂载点, 默认为播放器控制栏中部
heatmap: false, // 是否开启热力图
points: [], // 热力图数据
filter: () => true, // 弹幕载入前的过滤器,只支持返回布尔值
beforeEmit: () => true, // 弹幕发送前的过滤器,支持返回 Promise
beforeVisible: () => true, // 弹幕显示前的过滤器,支持返回 Promise
visible: true, // 弹幕层是否可见
maxLength: 200, // 弹幕输入框最大长度, 范围在[1 ~ 1000]
lockTime: 5, // 输入框锁定时间,范围在[1 ~ 60]
theme: 'dark', // 弹幕主题,支持 dark 和 light,只在自定义挂载时生效
}
```
## 生命周期
来自用户输入的弹幕:
`beforeEmit -> filter -> beforeVisible -> artplayerPluginDanmuku:visible`
来自服务器的弹幕:
`filter -> beforeVisible -> artplayerPluginDanmuku:visible`
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
</div>
```js
// 保存到数据库
function saveDanmu(danmu) {
return new Promise(resolve => {
setTimeout(() => {
resolve(true);
}, 1000);
})
}
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
// 这是用户在输入框输入弹幕文本,然后点击发送按钮后触发的函数
// 你可以对弹幕做合法校验,或者做存库处理
// 当返回true后才表示把弹幕加入到弹幕队列
async beforeEmit(danmu) {
const isDirty = (/fuck/i).test(danmu.text);
if (isDirty) return false;
const state = await saveDanmu(danmu);
return state;
},
// 这里是所有弹幕的过滤器,包含来自服务端的和来自用户输入的
// 你可以对弹幕做合法校验
// 当返回true后才表示把弹幕加入到弹幕队列
filter(danmu) {
return danmu.text.length <= 200;
},
// 这是弹幕即将显示的时触发的函数
// 你可以对弹幕做合法校验
// 当返回true后才表示可以马上发送到播放器里
async beforeVisible(danmu) {
return true;
},
}),
],
});
// 弹幕已经出现在播放器里,你可以访问到弹幕的dom元素里
art.on('artplayerPluginDanmuku:visible', danmu => {
danmu.$ref.innerHTML = 'ଘ(੭ˊᵕˋ)੭: ' + danmu.$ref.innerHTML;
})
```
## 使用弹幕数组
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
@@ -77,31 +159,11 @@ https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
// 弹幕数组
danmuku: [
{
text: '111', // 弹幕文本
time: 1, // 发送时间,单位秒
color: '#fff', // 弹幕局部颜色
border: false, // 是否显示描边
mode: 0, // 弹幕模式: 0表示滚动, 1静止
},
{
text: '222',
time: 2,
color: 'red',
border: true,
mode: 0,
},
{
text: '333',
time: 3,
color: 'green',
border: false,
mode: 1,
text: '使用数组',
},
],
}),
@@ -111,6 +173,8 @@ var art = new Artplayer({
## 使用弹幕 XML
弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
</div>
@@ -121,14 +185,13 @@ var art = new Artplayer({
url: '/assets/sample/video.mp4',
plugins: [
artplayerPluginDanmuku({
// 弹幕 XML 文件,和 Bilibili 网站的弹幕格式一致
danmuku: '/assets/sample/danmuku.xml',
}),
],
});
```
## 使用异步调用
## 使用异步返回
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -140,21 +203,11 @@ var art = new Artplayer({
url: '/assets/sample/video.mp4',
plugins: [
artplayerPluginDanmuku({
// 使用 Promise 异步返回
danmuku: function () {
return new Promise((resovle) => {
return resovle([
{
text: '111',
time: 1,
},
{
text: '222',
time: 2,
},
{
text: '333',
time: 3,
text: '使用 Promise 异步返回',
},
]);
});
@@ -273,20 +326,7 @@ var art = new Artplayer({
## `config`
通过方法 `config` 实时改变弹幕配置,支持属性有:
- `danmuku`
- `speed`
- `opacity`
- `fontSize`
- `color`
- `mode`
- `margin`
- `antiOverlap`
- `synchronousPlayback`
- `filter`
- `lockTime`
- `beforeEmit`
通过方法 `config` 实时改变弹幕配置
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
@@ -373,7 +413,6 @@ var art = new Artplayer({
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
@@ -386,6 +425,35 @@ art.on('resize', () => {
});
```
## `mount`
在初始化弹幕插件的时候,是可以指定弹幕发射器的挂载位置的,默认是挂载在控制栏的中部,你也可以把它挂载在播放器以外的地方。
当播放器全屏的时候,发射器会自动回到控制栏的中部。假如你挂载的地方是亮色的话,建议把 `theme` 设置成 `light`,否则会看不清。
<div className="run-code" data-libs="./uncompiled/artplayer-plugin-danmuku/index.js">
▶ Run Code
</div>
```js
var $danmu = document.querySelector('.artplayer-app');
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
fullscreenWeb: true,
plugins: [
artplayerPluginDanmuku({
mount: $danmu,
theme: 'dark',
danmuku: '/assets/sample/danmuku.xml',
}),
],
});
// 也可以手动挂载
// art.plugins.artplayerPluginDanmuku.mount($danmu);
```
## `option`
用于获取当前弹幕配置
@@ -398,7 +466,6 @@ art.on('resize', () => {
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
@@ -417,7 +484,6 @@ art.on('ready', () => {
var art = new Artplayer({
container: '.artplayer-app',
url: '/assets/sample/video.mp4',
setting: true,
plugins: [
artplayerPluginDanmuku({
danmuku: '/assets/sample/danmuku.xml',
@@ -425,6 +491,10 @@ var art = new Artplayer({
],
});
art.on('artplayerPluginDanmuku:visible', (danmu) => {
console.info('显示弹幕', danmu);
});
art.on('artplayerPluginDanmuku:emit', (danmu) => {
console.info('新增弹幕', danmu);
});
+5 -5
View File
@@ -7,10 +7,10 @@
"preview": "vitepress preview docs"
},
"devDependencies": {
"flexsearch": "^0.7.31",
"markdown-it": "^13.0.2",
"vitepress": "1.0.0-rc.31",
"vitepress-plugin-search": "^1.0.4-alpha.20",
"vue": "^3.3.9"
"flexsearch": "^0.7.43",
"markdown-it": "^14.1.0",
"vitepress": "1.2.2",
"vitepress-plugin-search": "^1.0.4-alpha.22",
"vue": "^3.4.27"
}
}
+1 -1
View File
@@ -4,4 +4,4 @@
* (c) 2017-2024 Harvey Zack
* Released under the MIT License.
*/
!function(t,e,r,a,o){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof n[a]&&n[a],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(e,r){if(!s[e]){if(!t[e]){var o="function"==typeof n[a]&&n[a];if(!r&&o)return o(e,!0);if(i)return i(e,!0);if(l&&"string"==typeof e)return l(e);var p=new Error("Cannot find module '"+e+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var a=t[e][1][r];return null!=a?a:r},d.cache={};var u=s[e]=new c.Module(e);t[e][0].call(u.exports,d,u,u.exports,this)}return s[e].exports;function d(t){var e=d.resolve(t);return!1===e?{}:c(e)}}c.isParcelRequire=!0,c.Module=function(t){this.id=t,this.bundle=c,this.exports={}},c.modules=t,c.cache=s,c.parent=i,c.register=function(e,r){t[e]=[function(t,e){e.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return n[a]}}),n[a]=c;for(var p=0;p<e.length;p++)c(e[p]);if(r){var u=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=u:"function"==typeof define&&define.amd&&define((function(){return u}))}}({"5lTcX":[function(t,e,r){var a=t("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=t("bundle-text:./style/index.less"),n=a.interopDefault(o),i=t("option-validator"),s=a.interopDefault(i),l=t("./utils/emitter"),c=a.interopDefault(l),p=t("./utils"),u=t("./scheme"),d=a.interopDefault(u),f=t("./config"),h=a.interopDefault(f),m=t("./template"),g=a.interopDefault(m),v=t("./i18n"),y=a.interopDefault(v),b=t("./player"),x=a.interopDefault(b),w=t("./control"),j=a.interopDefault(w),k=t("./contextmenu"),C=a.interopDefault(k),I=t("./info"),S=a.interopDefault(I),$=t("./subtitle"),T=a.interopDefault($),E=t("./events"),M=a.interopDefault(E),F=t("./hotkey"),H=a.interopDefault(F),D=t("./layer"),z=a.interopDefault(D),A=t("./loading"),R=a.interopDefault(A),O=t("./notice"),L=a.interopDefault(O),P=t("./mask"),Y=a.interopDefault(P),V=t("./icons"),_=a.interopDefault(V),N=t("./setting"),q=a.interopDefault(N),B=t("./storage"),W=a.interopDefault(B),U=t("./plugins"),K=a.interopDefault(U);let G=0;const Z=[];class X extends c.default{constructor(t,e){super(),this.id=++G;const r=p.mergeDeep(X.option,t);if(r.container=t.container,this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.template=new(0,g.default)(this),this.events=new(0,M.default)(this),this.storage=new(0,W.default)(this),this.icons=new(0,_.default)(this),this.i18n=new(0,y.default)(this),this.notice=new(0,L.default)(this),this.player=new(0,x.default)(this),this.layers=new(0,z.default)(this),this.controls=new(0,j.default)(this),this.contextmenu=new(0,C.default)(this),this.subtitle=new(0,T.default)(this),this.info=new(0,S.default)(this),this.loading=new(0,R.default)(this),this.hotkey=new(0,H.default)(this),this.mask=new(0,Y.default)(this),this.setting=new(0,q.default)(this),this.plugins=new(0,K.default)(this),"function"==typeof e&&this.on("ready",(()=>e.call(this,this))),X.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t("Version@"+X.version),t("Env@"+X.env),t("Build@"+X.build);for(let e=0;e<h.default.events.length;e++)this.on("video:"+h.default.events[e],(e=>t("Event@"+e.type)))}Z.push(this)}static get instances(){return Z}static get version(){return"5.1.2"}static get env(){return"production"}static get build(){return"2024-03-30 10:33:57"}static get config(){return h.default}static get utils(){return p}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return g.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:p.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(t=!0){this.events.destroy(),this.template.destroy(t),Z.splice(Z.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=X,X.DEBUG=!1,X.CONTEXTMENU=!0,X.NOTICE_TIME=2e3,X.SETTING_WIDTH=250,X.SETTING_ITEM_WIDTH=200,X.SETTING_ITEM_HEIGHT=35,X.RESIZE_TIME=200,X.SCROLLine truncated
!function(e,t,r,a,i){var o="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof o[a]&&o[a],s=n.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){var i="function"==typeof o[a]&&o[a];if(!r&&i)return i(t,!0);if(n)return n(t,!0);if(l&&"string"==typeof t)return l(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},d.cache={};var p=s[t]=new c.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?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=s,c.parent=n,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return o[a]}}),o[a]=c;for(var u=0;u<t.length;u++)c(t[u]);if(r){var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({abjMI:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var i=e("bundle-text:./style/index.less"),o=a.interopDefault(i),n=e("option-validator"),s=a.interopDefault(n),l=e("./utils/emitter"),c=a.interopDefault(l),u=e("./utils"),p=e("./scheme"),d=a.interopDefault(p),f=e("./config"),h=a.interopDefault(f),m=e("./template"),g=a.interopDefault(m),v=e("./i18n"),y=a.interopDefault(v),b=e("./player"),x=a.interopDefault(b),w=e("./control"),j=a.interopDefault(w),k=e("./contextmenu"),S=a.interopDefault(k),I=e("./info"),T=a.interopDefault(I),O=e("./subtitle"),E=a.interopDefault(O),M=e("./events"),$=a.interopDefault(M),F=e("./hotkey"),C=a.interopDefault(F),H=e("./layer"),D=a.interopDefault(H),B=e("./loading"),z=a.interopDefault(B),A=e("./notice"),R=a.interopDefault(A),L=e("./mask"),P=a.interopDefault(L),N=e("./icons"),Z=a.interopDefault(N),_=e("./setting"),q=a.interopDefault(_),V=e("./storage"),W=a.interopDefault(V),U=e("./plugins"),Y=a.interopDefault(U);let K=0,X=[];class G extends c.default{constructor(e,t){super(),this.id=++K;let r=u.mergeDeep(G.option,e);if(r.container=e.container,this.option=(0,s.default)(r,d.default),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,this.template=new g.default(this),this.events=new $.default(this),this.storage=new W.default(this),this.icons=new Z.default(this),this.i18n=new y.default(this),this.notice=new R.default(this),this.player=new x.default(this),this.layers=new D.default(this),this.controls=new j.default(this),this.contextmenu=new S.default(this),this.subtitle=new E.default(this),this.info=new T.default(this),this.loading=new z.default(this),this.hotkey=new C.default(this),this.mask=new P.default(this),this.setting=new q.default(this),this.plugins=new Y.default(this),"function"==typeof t&&this.on("ready",()=>t.call(this,this)),G.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+G.version),e("Env@"+G.env),e("Build@"+G.build);for(let t=0;t<h.default.events.length;t++)this.on("video:"+h.default.events[t],t=>e("Event@"+t.type))}X.push(this)}static get instances(){return X}static get version(){return"5.1.2"}static get env(){return"production"}static get build(){return"2024-05-23 21:58:48"}static get config(){return h.default}static get utils(){return u}static get scheme(){return d.default}static get Emitter(){return c.default}static get validator(){return s.default}static get kindOf(){return s.default.kindOf}static get html(){return g.default.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:e=>e},moreVideoAttr:{controls:!1,preload:u.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}destroy(e=!0){this.events.destroy(),this.template.destroy(e),X.splice(X.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}r.default=G,G.DEBUG=!1,G.CONTEXTMENU=!0,G.NOTICE_TIME=2e3,G.SETTING_WIDTH=250,G.SETTING_ITEM_WIDTH=200,G.SETTING_ITEM_HEIGHT=35,G.RESIZE_TIME=200,G.SCROLL_TIME=200,G.SCROLL_GAP=50,G.AUTO_PLAYBACK_MAX=10,G.AUTO_PLAYBACK_MIN=5,GLine truncated
+1 -1
View File
@@ -4,4 +4,4 @@
* (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:{},s="function"==typeof o[n]&&o[n],i=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!i[t]){if(!e[t]){var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var u=new Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var p=i[t]=new c.Module(t);e[t][0].call(p.exports,f,p,p.exports,this)}return i[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=i,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return o[n]}}),o[n]=c;for(var u=0;u<t.length;u++)c(t[u]);if(r){var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define((function(){return p}))}}({"4Be4O":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return ie}));var a=e("@swc/helpers/src/_assert_this_initialized.mjs"),o=n.interopDefault(a),s=e("@swc/helpers/src/_class_call_check.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_create_class.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_inherits.mjs"),p=n.interopDefault(u),f=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(f),h=e("bundle-text:./style/index.less"),m=n.interopDefault(h),v=e("option-validator"),g=n.interopDefault(v),y=e("./utils/emitter"),b=n.interopDefault(y),w=e("./utils"),j=e("./scheme"),_=n.interopDefault(j),x=e("./config"),k=n.interopDefault(x),D=e("./template"),S=n.interopDefault(D),I=e("./i18n"),M=n.interopDefault(I),R=e("./player"),T=n.interopDefault(R),E=e("./control"),F=n.interopDefault(E),C=e("./contextmenu"),O=n.interopDefault(C),z=e("./info"),W=n.interopDefault(z),L=e("./subtitle"),P=n.interopDefault(L),A=e("./events"),$=n.interopDefault(A),U=e("./hotkey"),H=n.interopDefault(U),V=e("./layer"),N=n.interopDefault(V),B=e("./loading"),q=n.interopDefault(B),Y=e("./notice"),G=n.interopDefault(Y),Q=e("./mask"),Z=n.interopDefault(Q),K=e("./icons"),X=n.interopDefault(K),J=e("./setting"),ee=n.interopDefault(J),te=e("./storage"),re=n.interopDefault(te),ne=e("./plugins"),ae=n.interopDefault(ne),oe=0,se=[],ie=function(e){"use strict";(0,p.default)(r,e);var t=(0,d.default)(r);function r(e,n){var a;(0,i.default)(this,r),(a=t.call(this)).id=++oe;var s=w.mergeDeep(r.option,e);if(s.container=e.container,a.option=(0,g.default)(s,_.default),a.isLock=!1,a.isReady=!1,a.isFocus=!1,a.isInput=!1,a.isRotate=!1,a.isDestroy=!1,a.template=new(0,S.default)((0,o.default)(a)),a.events=new(0,$.default)((0,o.default)(a)),a.storage=new(0,re.default)((0,o.default)(a)),a.icons=new(0,X.default)((0,o.default)(a)),a.i18n=new(0,M.default)((0,o.default)(a)),a.notice=new(0,G.default)((0,o.default)(a)),a.player=new(0,T.default)((0,o.default)(a)),a.layers=new(0,N.default)((0,o.default)(a)),a.controls=new(0,F.default)((0,o.default)(a)),a.contextmenu=new(0,O.default)((0,o.default)(a)),a.subtitle=new(0,P.default)((0,o.default)(a)),a.info=new(0,W.default)((0,o.default)(a)),a.loading=new(0,q.default)((0,o.default)(a)),a.hotkey=new(0,H.default)((0,o.default)(a)),a.mask=new(0,Z.default)((0,o.default)(a)),a.setting=new(0,ee.default)((0,o.default)(a)),a.plugins=new(0,ae.default)((0,o.default)(a)),"function"==typeof n&&a.on("ready",(function(){return n.call((0,o.default)(a),(0,o.default)(a))})),r.DEBUG){var l=function(e){return console.log("[ART.".concat(a.id,"] -> ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c<k.default.events.length;c++)a.on("video:"+k.default.events[c],(function(e){return l("Event@"+e.type)}))}return se.push((0,o.default)(a)),a}return(0,c.default)(r,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(e),se.splice(se.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return se}},{key:"version",get:function(){return"5.1.2"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2024-03-30 10:34:00"}},{key:"config",get:function(){return k.default}},{key:"utils",get:function(){return w}},{key:"scheme",get:function(){return _.default}},{key:"Emitter",get:function(){return b.default}},{key:"validator",get:function(){return g.default}},{key:"kindOf",get:function(){return g.default.kindOf}},{key:"html",get:function(){return SLine truncated
!function(e,t,r,n,o){var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[n]&&a[n],i=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!i[t]){if(!e[t]){var o="function"==typeof a[n]&&a[n];if(!r&&o)return o(t,!0);if(s)return s(t,!0);if(l&&"string"==typeof t)return l(t);var u=Error("Cannot find module '"+t+"'");throw u.code="MODULE_NOT_FOUND",u}f.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},f.cache={};var p=i[t]=new c.Module(t);e[t][0].call(p.exports,f,p,p.exports,this)}return i[t].exports;function f(e){var t=f.resolve(e);return!1===t?{}:c(t)}}c.isParcelRequire=!0,c.Module=function(e){this.id=e,this.bundle=c,this.exports={}},c.modules=e,c.cache=i,c.parent=s,c.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(c,"root",{get:function(){return a[n]}}),a[n]=c;for(var u=0;u<t.length;u++)c(t[u]);if(r){var p=c(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=p:"function"==typeof define&&define.amd&&define(function(){return p})}}({"7Csdv":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return er});var o=e("@swc/helpers/_/_assert_this_initialized"),a=e("@swc/helpers/_/_class_call_check"),s=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),l=e("@swc/helpers/_/_create_super"),c=e("bundle-text:./style/index.less"),u=n.interopDefault(c),p=e("option-validator"),f=n.interopDefault(p),d=e("./utils/emitter"),h=n.interopDefault(d),m=e("./utils"),v=e("./scheme"),g=n.interopDefault(v),_=e("./config"),y=n.interopDefault(_),b=e("./template"),w=n.interopDefault(b),x=e("./i18n"),j=n.interopDefault(x),k=e("./player"),T=n.interopDefault(k),S=e("./control"),M=n.interopDefault(S),I=e("./contextmenu"),E=n.interopDefault(I),F=e("./info"),C=n.interopDefault(F),O=e("./subtitle"),R=n.interopDefault(O),D=e("./events"),P=n.interopDefault(D),A=e("./hotkey"),z=n.interopDefault(A),V=e("./layer"),$=n.interopDefault(V),L=e("./loading"),q=n.interopDefault(L),H=e("./notice"),N=n.interopDefault(H),W=e("./mask"),B=n.interopDefault(W),U=e("./icons"),Y=n.interopDefault(U),K=e("./setting"),X=n.interopDefault(K),G=e("./storage"),J=n.interopDefault(G),Z=e("./plugins"),Q=n.interopDefault(Z),ee=0,et=[],er=function(e){(0,i._)(r,e);var t=(0,l._)(r);function r(e,n){(0,a._)(this,r),(s=t.call(this)).id=++ee;var s,i=m.mergeDeep(r.option,e);if(i.container=e.container,s.option=(0,f.default)(i,g.default),s.isLock=!1,s.isReady=!1,s.isFocus=!1,s.isInput=!1,s.isRotate=!1,s.isDestroy=!1,s.template=new w.default((0,o._)(s)),s.events=new P.default((0,o._)(s)),s.storage=new J.default((0,o._)(s)),s.icons=new Y.default((0,o._)(s)),s.i18n=new j.default((0,o._)(s)),s.notice=new N.default((0,o._)(s)),s.player=new T.default((0,o._)(s)),s.layers=new $.default((0,o._)(s)),s.controls=new M.default((0,o._)(s)),s.contextmenu=new E.default((0,o._)(s)),s.subtitle=new R.default((0,o._)(s)),s.info=new C.default((0,o._)(s)),s.loading=new q.default((0,o._)(s)),s.hotkey=new z.default((0,o._)(s)),s.mask=new B.default((0,o._)(s)),s.setting=new X.default((0,o._)(s)),s.plugins=new Q.default((0,o._)(s)),"function"==typeof n&&s.on("ready",function(){return n.call((0,o._)(s),(0,o._)(s))}),r.DEBUG){var l=function(e){return console.log("[ART.".concat(s.id,"] ->").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c<y.default.events.length;c++)s.on("video:"+y.default.events[c],function(e){return l("Event@"+e.type)})}return et.push((0,o._)(s)),s}return(0,s._)(r,[{key:"proxy",get:function(){return this.events.proxy}},{key:"query",get:function(){return this.template.query}},{key:"video",get:function(){return this.template.$video}},{key:"destroy",value:function(){var e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];this.events.destroy(),this.template.destroy(e),et.splice(et.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return et}},{key:"version",get:function(){return"5.1.2"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2024-05-23 21:58:49"}},{key:"config",get:function(){return y.default}},{key:"utils",get:function(){return m}},{key:"scheme",get:function(){return g.default}},{key:"Emitter",get:function(){return h.default}},{key:"validator",get:function(){return f.default}},{key:"kindOf",get:function(){return f.default.kindOf}},{key:"html",get:function(){return w.default.html}},{key:"option",get:function(){return{id:"",container:"#artplayer",url:"",poster:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,plaLine truncated
+1 -1
View File
@@ -1 +1 @@
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}c.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},c.cache={};var s=u[t]=new d.Module(t);e[t][0].call(s.exports,c,s,s.exports,this)}return u[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var f=0;f<t.length;f++)d(t[f]);if(n){var s=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define((function(){return s}))}}({e6ZzM:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const o={"Video Info":"Info o videu",Close:"Zavřít","Video Load Failed":"Nahrání videa selhalo",Volume:"Hlasitost",Play:"Přehrát",Pause:"Pozastavit",Rate:"Hodnocení",Mute:"Ztlumit","Video Flip":"Otočit video",Horizontal:"Horizontálně",Vertical:"Vertikálně",Reconnect:"Opětovné připojení","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení",Screenshot:"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran",Default:"Výchozí",Normal:"Normální",Open:"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky",Fullscreen:"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Last Seen":"Naposledy viděn","Jump Play":"Hra na skok",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay není k dispozici"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-cs"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["e6ZzM"],"e6ZzM","parcelRequire94c2");
!function(e,t,o,n,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[n]&&i[n],u=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,o){if(!u[t]){if(!e[t]){var r="function"==typeof i[n]&&i[n];if(!o&&r)return r(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}c.resolve=function(o){var n=e[t][1][o];return null!=n?n:o},c.cache={};var s=u[t]=new d.Module(t);e[t][0].call(s.exports,c,s,s.exports,this)}return u[t].exports;function c(e){var t=c.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(d,"root",{get:function(){return i[n]}}),i[n]=d;for(var f=0;f<t.length;f++)d(t[f]);if(o){var s=d(o);"object"==typeof exports&&"undefined"!=typeof module?module.exports=s:"function"==typeof define&&define.amd&&define(function(){return s})}}({e6ZzM:[function(e,t,o){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(o);let n={"Video Info":"Info o videu",Close:"Zavřít","Video Load Failed":"Nahrání videa selhalo",Volume:"Hlasitost",Play:"Přehrát",Pause:"Pozastavit",Rate:"Hodnocení",Mute:"Ztlumit","Video Flip":"Otočit video",Horizontal:"Horizontálně",Vertical:"Vertikálně",Reconnect:"Opětovné připojení","Show Setting":"Zobrazit nastavení","Hide Setting":"Skrýt nastavení",Screenshot:"Snímek obrazovky","Play Speed":"Rychlost přehrávání","Aspect Ratio":"Poměr stran",Default:"Výchozí",Normal:"Normální",Open:"Otevřít","Switch Video":"Přepnout video","Switch Subtitle":"Přepnout titulky",Fullscreen:"Celá obrazovka","Exit Fullscreen":"Opustit režim celé obrazovky","Web Fullscreen":"Celá stránka","Exit Web Fullscreen":"Zavřít režim celé stránky","Mini Player":"Mini přehrávač","PIP Mode":"Režim PIP","Exit PIP Mode":"Opustit režim PIP","PIP Not Supported":"Režim PIP není podporován","Fullscreen Not Supported":"Režim celé obrazovky není podporován","Subtitle Offset":"Posun titulků","Last Seen":"Naposledy viděn","Jump Play":"Hra na skok",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay není k dispozici"};o.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-cs"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,o){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["e6ZzM"],"e6ZzM","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,o,t,r,n){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],a=l.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(o,t){if(!a[o]){if(!e[o]){var n="function"==typeof i[r]&&i[r];if(!t&&n)return n(o,!0);if(l)return l(o,!0);if(u&&"string"==typeof o)return u(o);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(t){var r=e[o][1][t];return null!=r?r:t},s.cache={};var f=a[o]=new d.Module(o);e[o][0].call(f.exports,s,f,f.exports,this)}return a[o].exports;function s(e){var o=s.resolve(e);return!1===o?{}:d(o)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=l,d.register=function(o,t){e[o]=[function(e,o){o.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var c=0;c<o.length;c++)d(o[c]);if(t){var f=d(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define((function(){return f}))}}({"1ZtP4":[function(e,o,t){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(t);const r={"Video Info":"Información del video",Close:"Cerrar","Video Load Failed":"Falló carga de video",Volume:"Volumen",Play:"Reproduciendo",Pause:"Pausa",Rate:"Velocidad",Mute:"Silencio","Video Flip":"Rotar video",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconectando","Show Setting":"Mostrar ajustes","Hide Setting":"Ocultar ajustes",Screenshot:"Captura de Pantalla","Play Speed":"Velocidad de reproducción","Aspect Ratio":"Relación de aspecto",Default:"Por defecto",Normal:"Normal",Open:"Abrir","Switch Video":"Cambiar video","Switch Subtitle":"Cambiar subtítulo",Fullscreen:"Pantalla completa","Exit Fullscreen":"Salir de Pantalla completa","Web Fullscreen":"Pantalla completa Web","Exit Web Fullscreen":"Salir de Pantalla completa","Mini Player":"Mini reproductor","PIP Mode":"Modo PiP","Exit PIP Mode":"Cerrar modo PiP","PIP Not Supported":"Modo PiP no compatible","Fullscreen Not Supported":"Pantalla completa no soportada","Subtitle Offset":"Ajuste subtítulo","Last Seen":"Visto última vez","Jump Play":"Saltar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay no disponible"};t.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-es"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,o,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,o){return Object.keys(e).forEach((function(t){"default"===t||"__esModule"===t||o.hasOwnProperty(t)||Object.defineProperty(o,t,{enumerable:!0,get:function(){return e[t]}})})),o},t.export=function(e,o,t){Object.defineProperty(e,o,{enumerable:!0,get:t})}},{}]},["1ZtP4"],"1ZtP4","parcelRequire94c2");
!function(e,t,o,r,n){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof l[r]&&l[r],a=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,o){if(!a[t]){if(!e[t]){var n="function"==typeof l[r]&&l[r];if(!o&&n)return n(t,!0);if(i)return i(t,!0);if(u&&"string"==typeof t)return u(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(o){var r=e[t][1][o];return null!=r?r:o},s.cache={};var f=a[t]=new d.Module(t);e[t][0].call(f.exports,s,f,f.exports,this)}return a[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=i,d.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(d,"root",{get:function(){return l[r]}}),l[r]=d;for(var c=0;c<t.length;c++)d(t[c]);if(o){var f=d(o);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof define&&define.amd&&define(function(){return f})}}({"1ZtP4":[function(e,t,o){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(o);let r={"Video Info":"Información del video",Close:"Cerrar","Video Load Failed":"Falló carga de video",Volume:"Volumen",Play:"Reproduciendo",Pause:"Pausa",Rate:"Velocidad",Mute:"Silencio","Video Flip":"Rotar video",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconectando","Show Setting":"Mostrar ajustes","Hide Setting":"Ocultar ajustes",Screenshot:"Captura de Pantalla","Play Speed":"Velocidad de reproducción","Aspect Ratio":"Relación de aspecto",Default:"Por defecto",Normal:"Normal",Open:"Abrir","Switch Video":"Cambiar video","Switch Subtitle":"Cambiar subtítulo",Fullscreen:"Pantalla completa","Exit Fullscreen":"Salir de Pantalla completa","Web Fullscreen":"Pantalla completa Web","Exit Web Fullscreen":"Salir de Pantalla completa","Mini Player":"Mini reproductor","PIP Mode":"Modo PiP","Exit PIP Mode":"Cerrar modo PiP","PIP Not Supported":"Modo PiP no compatible","Fullscreen Not Supported":"Pantalla completa no soportada","Subtitle Offset":"Ajuste subtítulo","Last Seen":"Visto última vez","Jump Play":"Saltar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay no disponible"};o.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-es"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,o){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,t){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[o]}})}),t},o.export=function(e,t,o){Object.defineProperty(e,t,{enumerable:!0,get:o})}},{}]},["1ZtP4"],"1ZtP4","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a<t.length;a++)d(t[a]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({l5TEk:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const o={"Video Info":"اطلاعات ویدیو",Close:"بستن","Video Load Failed":"بارگذاری ناموفق",Play:"پخش",Volume:"میزان صدا",Pause:"توقف",Rate:"نرخ",Mute:"سکوت","Video Flip":"چرخش تصویر",Horizontal:"افقی",Vertical:"عمودی",Reconnect:"اتصال مجدد","Show Setting":"تنظیمات","Hide Setting":"بستن تنظیمات",Screenshot:"عکس از صفحه","Play Speed":"سرعت پخش","Aspect Ratio":"نسبت تصویر",Default:"حالت پیشفرض",Normal:" حالت عادی",Open:"بازکردن","Switch Video":"تغییر ویدیو","Switch Subtitle":"نغییر زیرنویس",Fullscreen:"تمام صفحه","Exit Fullscreen":"کوچک کردن","Web Fullscreen":"حالت تئاتر","Exit Web Fullscreen":"خروج از حالت تئاتر","Mini Player":"حالت پخش کوچک","PIP Mode":" مینی پلیر","Exit PIP Mode":"خروج از مینی پلیر","PIP Not Supported":"عدم پشتیبانی از مینی پلیر","Fullscreen Not Supported":"عدم پشتیبانی از حالت تمام صفحه","Subtitle Offset":"افست زیرنویس","Last Seen":"آخرین بازدید","Jump Play":"جامپ پلی",AirPlay:"ایر پلی","AirPlay Not Available":"عدم پشتیبانی از ایرپلی"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-fa"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["l5TEk"],"l5TEk","parcelRequire94c2");
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a<t.length;a++)d(t[a]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({l5TEk:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);let o={"Video Info":"اطلاعات ویدیو",Close:"بستن","Video Load Failed":"بارگذاری ناموفق",Play:"پخش",Volume:"میزان صدا",Pause:"توقف",Rate:"نرخ",Mute:"سکوت","Video Flip":"چرخش تصویر",Horizontal:"افقی",Vertical:"عمودی",Reconnect:"اتصال مجدد","Show Setting":"تنظیمات","Hide Setting":"بستن تنظیمات",Screenshot:"عکس از صفحه","Play Speed":"سرعت پخش","Aspect Ratio":"نسبت تصویر",Default:"حالت پیشفرض",Normal:" حالت عادی",Open:"بازکردن","Switch Video":"تغییر ویدیو","Switch Subtitle":"نغییر زیرنویس",Fullscreen:"تمام صفحه","Exit Fullscreen":"کوچک کردن","Web Fullscreen":"حالت تئاتر","Exit Web Fullscreen":"خروج از حالت تئاتر","Mini Player":"حالت پخش کوچک","PIP Mode":" مینی پلیر","Exit PIP Mode":"خروج از مینی پلیر","PIP Not Supported":"عدم پشتیبانی از مینی پلیر","Fullscreen Not Supported":"عدم پشتیبانی از حالت تمام صفحه","Subtitle Offset":"افست زیرنویس","Last Seen":"آخرین بازدید","Jump Play":"جامپ پلی",AirPlay:"ایر پلی","AirPlay Not Available":"عدم پشتیبانی از ایرپلی"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-fa"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["l5TEk"],"l5TEk","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],u=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var f=new Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var f=0;f<t.length;f++)d(t[f]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({hldOd:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const r={"Video Info":"Informations de la vidéo",Close:"Fermer","Video Load Failed":"Téléchargement de la vidéo échoué",Volume:"Volume",Play:"Lire",Pause:"Pause",Rate:"Vitesse",Mute:"Muet","Video Flip":"Rotation de la vidéo",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconnexion","Show Setting":"Afficher les paramètres","Hide Setting":"Cacher les paramètres",Screenshot:"Capture d'écran","Play Speed":"Vitesse de lecture","Aspect Ratio":"Rapport d'aspect",Default:"Défaut",Normal:"Normal",Open:"Ouvrir","Switch Video":"Basculer la vidéo","Switch Subtitle":"Basculer le sous-titre",Fullscreen:"Plein écran","Exit Fullscreen":"Quitter le plein écran","Web Fullscreen":"Plein écran Web","Exit Web Fullscreen":"Quitter le plein écran Web","Mini Player":"Mini lecteur","PIP Mode":"Mode PiP","Exit PIP Mode":"Fermer le mode PiP","PIP Not Supported":"Mode PiP non supporté","Fullscreen Not Supported":"Plein écran non supporté","Subtitle Offset":"Réglage des sous-titres","Last Seen":"Dernière position","Jump Play":"Continuer",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay non disponible"};n.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-fr"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["hldOd"],"hldOd","parcelRequire94c2");
!function(e,t,r,n,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[n]&&i[n],u=l.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,r){if(!u[t]){if(!e[t]){var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);if(l)return l(t,!0);if(a&&"string"==typeof t)return a(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(r){var n=e[t][1][r];return null!=n?n:r},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(d,"root",{get:function(){return i[n]}}),i[n]=d;for(var f=0;f<t.length;f++)d(t[f]);if(r){var c=d(r);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({hldOd:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let n={"Video Info":"Informations de la vidéo",Close:"Fermer","Video Load Failed":"Téléchargement de la vidéo échoué",Volume:"Volume",Play:"Lire",Pause:"Pause",Rate:"Vitesse",Mute:"Muet","Video Flip":"Rotation de la vidéo",Horizontal:"Horizontal",Vertical:"Vertical",Reconnect:"Reconnexion","Show Setting":"Afficher les paramètres","Hide Setting":"Cacher les paramètres",Screenshot:"Capture d'écran","Play Speed":"Vitesse de lecture","Aspect Ratio":"Rapport d'aspect",Default:"Défaut",Normal:"Normal",Open:"Ouvrir","Switch Video":"Basculer la vidéo","Switch Subtitle":"Basculer le sous-titre",Fullscreen:"Plein écran","Exit Fullscreen":"Quitter le plein écran","Web Fullscreen":"Plein écran Web","Exit Web Fullscreen":"Quitter le plein écran Web","Mini Player":"Mini lecteur","PIP Mode":"Mode PiP","Exit PIP Mode":"Fermer le mode PiP","PIP Not Supported":"Mode PiP non supporté","Fullscreen Not Supported":"Plein écran non supporté","Subtitle Offset":"Réglage des sous-titres","Last Seen":"Dernière position","Jump Play":"Continuer",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay non disponible"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-fr"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[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})}},{}]},["hldOd"],"hldOd","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,n,t,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[r]&&i[r],u=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,t){if(!u[n]){if(!e[n]){var o="function"==typeof i[r]&&i[r];if(!t&&o)return o(n,!0);if(a)return a(n,!0);if(l&&"string"==typeof n)return l(n);var f=new Error("Cannot find module '"+n+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},s.cache={};var c=u[n]=new d.Module(n);e[n][0].call(c.exports,s,c,c.exports,this)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=a,d.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var f=0;f<n.length;f++)d(n[f]);if(t){var c=d(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({"9TmPo":[function(e,n,t){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(t);const r={"Video Info":"Informasi Video",Close:"Tutup","Video Load Failed":"Gagal Memuat Video",Volume:"Volume",Play:"Putar",Pause:"Jeda",Rate:"Kecepatan",Mute:"Senyap","Video Flip":"Memutar Video",Horizontal:"Horizontal",Vertical:"Vertikal",Reconnect:"Menyambung Kembali","Show Setting":"Tampilkan Pengaturan","Hide Setting":"Sembunyikan Pengaturan",Screenshot:"Tangkapan Layar","Play Speed":"Kecepatan Putar","Aspect Ratio":"Rasio Aspek",Default:"Default",Normal:"Normal",Open:"Buka","Switch Video":"Ganti Video","Switch Subtitle":"Ganti Subtitle",Fullscreen:"Layar Penuh","Exit Fullscreen":"Keluar dari Layar Penuh","Web Fullscreen":"Layar Penuh Web","Exit Web Fullscreen":"Keluar dari Layar Penuh Web","Mini Player":"Pemutar Mini","PIP Mode":"Mode PIP","Exit PIP Mode":"Keluar dari Mode PIP","PIP Not Supported":"PIP Tidak Didukung","Fullscreen Not Supported":"Layar Penuh Tidak Didukung","Subtitle Offset":"Pergeseran Subtitle","Last Seen":"Terakhir Dilihat","Jump Play":"Lompat Putar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Tidak Tersedia"};t.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-id"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,n,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,n){return Object.keys(e).forEach((function(t){"default"===t||"__esModule"===t||n.hasOwnProperty(t)||Object.defineProperty(n,t,{enumerable:!0,get:function(){return e[t]}})})),n},t.export=function(e,n,t){Object.defineProperty(e,n,{enumerable:!0,get:t})}},{}]},["9TmPo"],"9TmPo","parcelRequire94c2");
!function(e,t,n,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[r]&&i[r],u=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);if(a)return a(t,!0);if(l&&"string"==typeof t)return l(t);var f=Error("Cannot find module '"+t+"'");throw f.code="MODULE_NOT_FOUND",f}p.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},p.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,p,c,c.exports,this)}return u[t].exports;function p(e){var t=p.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=a,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var f=0;f<t.length;f++)d(t[f]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({"9TmPo":[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);let r={"Video Info":"Informasi Video",Close:"Tutup","Video Load Failed":"Gagal Memuat Video",Volume:"Volume",Play:"Putar",Pause:"Jeda",Rate:"Kecepatan",Mute:"Senyap","Video Flip":"Memutar Video",Horizontal:"Horizontal",Vertical:"Vertikal",Reconnect:"Menyambung Kembali","Show Setting":"Tampilkan Pengaturan","Hide Setting":"Sembunyikan Pengaturan",Screenshot:"Tangkapan Layar","Play Speed":"Kecepatan Putar","Aspect Ratio":"Rasio Aspek",Default:"Default",Normal:"Normal",Open:"Buka","Switch Video":"Ganti Video","Switch Subtitle":"Ganti Subtitle",Fullscreen:"Layar Penuh","Exit Fullscreen":"Keluar dari Layar Penuh","Web Fullscreen":"Layar Penuh Web","Exit Web Fullscreen":"Keluar dari Layar Penuh Web","Mini Player":"Pemutar Mini","PIP Mode":"Mode PIP","Exit PIP Mode":"Keluar dari Mode PIP","PIP Not Supported":"PIP Tidak Didukung","Fullscreen Not Supported":"Layar Penuh Tidak Didukung","Subtitle Offset":"Pergeseran Subtitle","Last Seen":"Terakhir Dilihat","Jump Play":"Lompat Putar",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Tidak Tersedia"};n.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-id"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["9TmPo"],"9TmPo","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,n,o,t,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[t]&&i[t],u=a.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,o){if(!u[n]){if(!e[n]){var r="function"==typeof i[t]&&i[t];if(!o&&r)return r(n,!0);if(a)return a(n,!0);if(l&&"string"==typeof n)return l(n);var f=new Error("Cannot find module '"+n+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(o){var t=e[n][1][o];return null!=t?t:o},s.cache={};var c=u[n]=new d.Module(n);e[n][0].call(c.exports,s,c,c.exports,this)}return u[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=a,d.register=function(n,o){e[n]=[function(e,n){n.exports=o},{}]},Object.defineProperty(d,"root",{get:function(){return i[t]}}),i[t]=d;for(var f=0;f<n.length;f++)d(n[f]);if(o){var c=d(o);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({"8I2Bn":[function(e,n,o){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(o);const t={"Video Info":"Informacje o wideo",Close:"Zamknij","Video Load Failed":"Błąd ładowania wideo",Volume:"Głośność",Play:"Odtwórz",Pause:"Wstrzymaj",Rate:"Oceń",Mute:"Wycisz","Video Flip":"Rotacja wideo",Horizontal:"Pozioma",Vertical:"Pionowa",Reconnect:"Połącz ponownie","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia",Screenshot:"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji",Default:"Domyślny",Normal:"Normalny",Open:"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy",Fullscreen:"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Last Seen":"Ostatnio widziany","Jump Play":"Skocz do gry",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay nie jest dostępny"};o.default=t,"undefined"!=typeof window&&(window["artplayer-i18n-pl"]=t)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,n,o){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,n){return Object.keys(e).forEach((function(o){"default"===o||"__esModule"===o||n.hasOwnProperty(o)||Object.defineProperty(n,o,{enumerable:!0,get:function(){return e[o]}})})),n},o.export=function(e,n,o){Object.defineProperty(e,n,{enumerable:!0,get:o})}},{}]},["8I2Bn"],"8I2Bn","parcelRequire94c2");
!function(e,n,o,t,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof i[t]&&i[t],l=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,o){if(!l[n]){if(!e[n]){var r="function"==typeof i[t]&&i[t];if(!o&&r)return r(n,!0);if(a)return a(n,!0);if(u&&"string"==typeof n)return u(n);var f=Error("Cannot find module '"+n+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(o){var t=e[n][1][o];return null!=t?t:o},s.cache={};var c=l[n]=new d.Module(n);e[n][0].call(c.exports,s,c,c.exports,this)}return l[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=l,d.parent=a,d.register=function(n,o){e[n]=[function(e,n){n.exports=o},{}]},Object.defineProperty(d,"root",{get:function(){return i[t]}}),i[t]=d;for(var f=0;f<n.length;f++)d(n[f]);if(o){var c=d(o);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({"8I2Bn":[function(e,n,o){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(o);let t={"Video Info":"Informacje o wideo",Close:"Zamknij","Video Load Failed":"Błąd ładowania wideo",Volume:"Głośność",Play:"Odtwórz",Pause:"Wstrzymaj",Rate:"Oceń",Mute:"Wycisz","Video Flip":"Rotacja wideo",Horizontal:"Pozioma",Vertical:"Pionowa",Reconnect:"Połącz ponownie","Show Setting":"Pokaż ustawienia","Hide Setting":"Ukryj ustawienia",Screenshot:"Zrzut ekranu","Play Speed":"Prędkość odtwarzania","Aspect Ratio":"Współczynnik proporcji",Default:"Domyślny",Normal:"Normalny",Open:"Otwórz","Switch Video":"Przełącz wideo","Switch Subtitle":"Przełącz napisy",Fullscreen:"Pełny ekran","Exit Fullscreen":"Zamknij pełny ekran","Web Fullscreen":"Tryb pełnej strony","Exit Web Fullscreen":"Zamknij tryb pełnej strony","Mini Player":"Miniodtwarzacz","PIP Mode":"Tryb PiP","Exit PIP Mode":"Zamknij tryb PiP","PIP Not Supported":"Tryb PiP nieobsługiwany","Fullscreen Not Supported":"Pełny ekran nieobsługiwany","Subtitle Offset":"Przesunięcie napisów","Last Seen":"Ostatnio widziany","Jump Play":"Skocz do gry",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay nie jest dostępny"};o.default=t,"undefined"!=typeof window&&(window["artplayer-i18n-pl"]=t)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,n,o){o.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},o.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},o.exportAll=function(e,n){return Object.keys(e).forEach(function(o){"default"===o||"__esModule"===o||Object.prototype.hasOwnProperty.call(n,o)||Object.defineProperty(n,o,{enumerable:!0,get:function(){return e[o]}})}),n},o.export=function(e,n,o){Object.defineProperty(e,n,{enumerable:!0,get:o})}},{}]},["8I2Bn"],"8I2Bn","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a<t.length;a++)d(t[a]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({kNQQh:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const o={"Video Info":"Информация",Close:"Закрыть","Video Load Failed":"Ошибка загрузки видео",Volume:"Громкость",Play:"Играть",Pause:"Пауза",Rate:"Скорость",Mute:"Заглушить","Video Flip":"Развернуть видео",Horizontal:"Горизонтально",Vertical:"Вертикально",Reconnect:"Переподключенине","Show Setting":"Показать настройки","Hide Setting":"Скрыть настройки",Screenshot:"Скриншот","Play Speed":"Скорость воспроизведения","Aspect Ratio":"Соотношение сторон",Default:"По-умолчанию",Normal:"Нормальный",Open:"Открыть","Switch Video":"Переключить видео","Switch Subtitle":"Переключить субтитры",Fullscreen:"Полноэкранный режим","Exit Fullscreen":"Выход из полноэкранного режима","Web Fullscreen":"На все окно браузера","Exit Web Fullscreen":"Выход из режима полного окна","Mini Player":"Мини проигрыватель","PIP Mode":"Картинка в картинке","Exit PIP Mode":"Закрыть картинку в картинке","PIP Not Supported":"Картинка в картинке не поддерживается","Fullscreen Not Supported":"Полноэкранный режим не поддерживается","Subtitle Offset":"Настройка субтитров","Last Seen":"Последнее просмотренное","Jump Play":"Перейти",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay недоступен"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-ru"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["kNQQh"],"kNQQh","parcelRequire94c2");
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a<t.length;a++)d(t[a]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({kNQQh:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);let o={"Video Info":"Информация",Close:"Закрыть","Video Load Failed":"Ошибка загрузки видео",Volume:"Громкость",Play:"Играть",Pause:"Пауза",Rate:"Скорость",Mute:"Заглушить","Video Flip":"Развернуть видео",Horizontal:"Горизонтально",Vertical:"Вертикально",Reconnect:"Переподключенине","Show Setting":"Показать настройки","Hide Setting":"Скрыть настройки",Screenshot:"Скриншот","Play Speed":"Скорость воспроизведения","Aspect Ratio":"Соотношение сторон",Default:"По-умолчанию",Normal:"Нормальный",Open:"Открыть","Switch Video":"Переключить видео","Switch Subtitle":"Переключить субтитры",Fullscreen:"Полноэкранный режим","Exit Fullscreen":"Выход из полноэкранного режима","Web Fullscreen":"На все окно браузера","Exit Web Fullscreen":"Выход из режима полного окна","Mini Player":"Мини проигрыватель","PIP Mode":"Картинка в картинке","Exit PIP Mode":"Закрыть картинку в картинке","PIP Not Supported":"Картинка в картинке не поддерживается","Fullscreen Not Supported":"Полноэкранный режим не поддерживается","Subtitle Offset":"Настройка субтитров","Last Seen":"Последнее просмотренное","Jump Play":"Перейти",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay недоступен"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-ru"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["kNQQh"],"kNQQh","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,n,t,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],a=l.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,t){if(!a[n]){if(!e[n]){var o="function"==typeof i[r]&&i[r];if(!t&&o)return o(n,!0);if(l)return l(n,!0);if(u&&"string"==typeof n)return u(n);var f=new Error("Cannot find module '"+n+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},s.cache={};var c=a[n]=new d.Module(n);e[n][0].call(c.exports,s,c,c.exports,this)}return a[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=l,d.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var f=0;f<n.length;f++)d(n[f]);if(t){var c=d(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({l9cQ0:[function(e,n,t){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(t);const r={"Video Info":"Video Bilgisi",Close:"Kapat","Video Load Failed":"Video Yüklenemedi",Volume:"Ses Seviyesi",Play:"Oynat",Pause:"Duraklat",Rate:"Hız",Mute:"Sessize Al","Video Flip":"Videoyu Çevir",Horizontal:"Yatay",Vertical:"Dikey",Reconnect:"Yeniden Bağlan","Show Setting":"Ayarları Göster","Hide Setting":"Ayarları Gizle",Screenshot:"Ekran Görüntüsü","Play Speed":"Oynatma Hızı","Aspect Ratio":"En Boy Oranı",Default:"Varsayılan",Normal:"Normal",Open:"Aç","Switch Video":"Video Değiştir","Switch Subtitle":"Altyazı Değiştir",Fullscreen:"Tam Ekran","Exit Fullscreen":"Tam Ekrandan Çık","Web Fullscreen":"Web Tam Ekran","Exit Web Fullscreen":"Web Tam Ekranından Çık","Mini Player":"Küçük Oynatıcı","PIP Mode":"PIP Modu","Exit PIP Mode":"PIP Modundan Çık","PIP Not Supported":"PIP Desteklenmiyor","Fullscreen Not Supported":"Tam Ekran Desteklenmiyor","Subtitle Offset":"Altyazı Kaydırma","Last Seen":"Son İzlenen","Jump Play":"Atla ve Oynat",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Kullanılamıyor"};t.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-tr"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,n,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,n){return Object.keys(e).forEach((function(t){"default"===t||"__esModule"===t||n.hasOwnProperty(t)||Object.defineProperty(n,t,{enumerable:!0,get:function(){return e[t]}})})),n},t.export=function(e,n,t){Object.defineProperty(e,n,{enumerable:!0,get:t})}},{}]},["l9cQ0"],"l9cQ0","parcelRequire94c2");
!function(e,n,t,r,o){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[r]&&i[r],a=l.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(n,t){if(!a[n]){if(!e[n]){var o="function"==typeof i[r]&&i[r];if(!t&&o)return o(n,!0);if(l)return l(n,!0);if(u&&"string"==typeof n)return u(n);var f=Error("Cannot find module '"+n+"'");throw f.code="MODULE_NOT_FOUND",f}s.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},s.cache={};var c=a[n]=new d.Module(n);e[n][0].call(c.exports,s,c,c.exports,this)}return a[n].exports;function s(e){var n=s.resolve(e);return!1===n?{}:d(n)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=a,d.parent=l,d.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(d,"root",{get:function(){return i[r]}}),i[r]=d;for(var f=0;f<n.length;f++)d(n[f]);if(t){var c=d(t);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({l9cQ0:[function(e,n,t){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(t);let r={"Video Info":"Video Bilgisi",Close:"Kapat","Video Load Failed":"Video Yüklenemedi",Volume:"Ses Seviyesi",Play:"Oynat",Pause:"Duraklat",Rate:"Hız",Mute:"Sessize Al","Video Flip":"Videoyu Çevir",Horizontal:"Yatay",Vertical:"Dikey",Reconnect:"Yeniden Bağlan","Show Setting":"Ayarları Göster","Hide Setting":"Ayarları Gizle",Screenshot:"Ekran Görüntüsü","Play Speed":"Oynatma Hızı","Aspect Ratio":"En Boy Oranı",Default:"Varsayılan",Normal:"Normal",Open:"Aç","Switch Video":"Video Değiştir","Switch Subtitle":"Altyazı Değiştir",Fullscreen:"Tam Ekran","Exit Fullscreen":"Tam Ekrandan Çık","Web Fullscreen":"Web Tam Ekran","Exit Web Fullscreen":"Web Tam Ekranından Çık","Mini Player":"Küçük Oynatıcı","PIP Mode":"PIP Modu","Exit PIP Mode":"PIP Modundan Çık","PIP Not Supported":"PIP Desteklenmiyor","Fullscreen Not Supported":"Tam Ekran Desteklenmiyor","Subtitle Offset":"Altyazı Kaydırma","Last Seen":"Son İzlenen","Jump Play":"Atla ve Oynat",AirPlay:"AirPlay","AirPlay Not Available":"AirPlay Kullanılamıyor"};t.default=r,"undefined"!=typeof window&&(window["artplayer-i18n-tr"]=r)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,n,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,n){return Object.keys(e).forEach(function(t){"default"===t||"__esModule"===t||Object.prototype.hasOwnProperty.call(n,t)||Object.defineProperty(n,t,{enumerable:!0,get:function(){return e[t]}})}),n},t.export=function(e,n,t){Object.defineProperty(e,n,{enumerable:!0,get:t})}},{}]},["l9cQ0"],"l9cQ0","parcelRequire94c2");
+1 -1
View File
@@ -1 +1 @@
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a<t.length;a++)d(t[a]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define((function(){return c}))}}({oLNvk:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const o={"Video Info":"統計訊息",Close:"關閉","Video Load Failed":"載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音","Video Flip":"畫面翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Show Setting":"顯示设置","Hide Setting":"隱藏设置",Screenshot:"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch Video":"切換","Switch Subtitle":"切換字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳轉播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-tw"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach((function(n){"default"===n||"__esModule"===n||t.hasOwnProperty(n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})})),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["oLNvk"],"oLNvk","parcelRequire94c2");
!function(e,t,n,o,r){var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof i[o]&&i[o],u=l.cache||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!u[t]){if(!e[t]){var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(l)return l(t,!0);if(f&&"string"==typeof t)return f(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var c=u[t]=new d.Module(t);e[t][0].call(c.exports,s,c,c.exports,this)}return u[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:d(t)}}d.isParcelRequire=!0,d.Module=function(e){this.id=e,this.bundle=d,this.exports={}},d.modules=e,d.cache=u,d.parent=l,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return i[o]}}),i[o]=d;for(var a=0;a<t.length;a++)d(t[a]);if(n){var c=d(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=c:"function"==typeof define&&define.amd&&define(function(){return c})}}({oLNvk:[function(e,t,n){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);let o={"Video Info":"統計訊息",Close:"關閉","Video Load Failed":"載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音","Video Flip":"畫面翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Show Setting":"顯示设置","Hide Setting":"隱藏设置",Screenshot:"截圖","Play Speed":"播放速度","Aspect Ratio":"畫面比例",Default:"默認",Normal:"正常",Open:"打開","Switch Video":"切換","Switch Subtitle":"切換字幕",Fullscreen:"全屏","Exit Fullscreen":"退出全屏","Web Fullscreen":"網頁全屏","Exit Web Fullscreen":"退出網頁全屏","Mini Player":"迷你播放器","PIP Mode":"開啟畫中畫","Exit PIP Mode":"退出畫中畫","PIP Not Supported":"不支持畫中畫","Fullscreen Not Supported":"不支持全屏","Subtitle Offset":"字幕偏移","Last Seen":"上次看到","Jump Play":"跳轉播放",AirPlay:"隔空播放","AirPlay Not Available":"隔空播放不可用"};n.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-tw"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"gKGrl"}],gKGrl:[function(e,t,n){n.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},n.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.exportAll=function(e,t){return Object.keys(e).forEach(function(n){"default"===n||"__esModule"===n||Object.prototype.hasOwnProperty.call(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[n]}})}),t},n.export=function(e,t,n){Object.defineProperty(e,t,{enumerable:!0,get:n})}},{}]},["oLNvk"],"oLNvk","parcelRequire94c2");
+1 -1
View File
@@ -24,4 +24,4 @@
"dependencies": {
"option-validator": "^2.0.6"
}
}
}
+15 -3
View File
@@ -1,4 +1,4 @@
import { errorHandle, addClass, removeClass, isMobile, sleep } from '../utils';
import { errorHandle, addClass, removeClass, isMobile, sleep, includeFromEvent } from '../utils';
import Component from '../utils/component';
import fullscreen from './fullscreen';
import fullscreenWeb from './fullscreenWeb';
@@ -16,11 +16,12 @@ export default class Control extends Component {
constructor(art) {
super(art);
this.isHover = false;
this.name = 'control';
this.timer = Date.now();
const { constructor } = art;
const { $player } = this.art.template;
const { $player, $bottom } = this.art.template;
art.on('mousemove', () => {
if (!isMobile) {
@@ -36,8 +37,19 @@ export default class Control extends Component {
}
});
art.on('document:mousemove', (event) => {
this.isHover = includeFromEvent(event, $bottom);
});
art.on('video:timeupdate', () => {
if (!art.isInput && art.playing && this.show && Date.now() - this.timer >= constructor.CONTROL_HIDE_TIME) {
if (
!art.setting.show &&
!this.isHover &&
!art.isInput &&
art.playing &&
this.show &&
Date.now() - this.timer >= constructor.CONTROL_HIDE_TIME
) {
this.show = false;
}
});
+10 -1
View File
@@ -43,7 +43,16 @@ export default class Hotkey {
if (this.art.isFocus) {
const tag = document.activeElement.tagName.toUpperCase();
const editable = document.activeElement.getAttribute('contenteditable');
if (tag !== 'INPUT' && tag !== 'TEXTAREA' && editable !== '' && editable !== 'true' && !event.altKey && !event.ctrlKey && !event.metaKey && !event.shiftKey) {
if (
tag !== 'INPUT' &&
tag !== 'TEXTAREA' &&
editable !== '' &&
editable !== 'true' &&
!event.altKey &&
!event.ctrlKey &&
!event.metaKey &&
!event.shiftKey
) {
const events = this.keys[event.keyCode];
if (events) {
event.preventDefault();
+38 -38
View File
@@ -1,44 +1,44 @@
const cs = {
"Video Info": "Info o videu",
"Close": "Zavřít",
"Video Load Failed": "Nahrání videa selhalo",
"Volume": "Hlasitost",
"Play": "Přehrát",
"Pause": "Pozastavit",
"Rate": "Hodnocení",
"Mute": "Ztlumit",
"Video Flip": "Otočit video",
"Horizontal": "Horizontálně",
"Vertical": "Vertikálně",
"Reconnect": "Opětovné připojení",
"Show Setting": "Zobrazit nastavení",
"Hide Setting": "Skrýt nastavení",
"Screenshot": "Snímek obrazovky",
"Play Speed": "Rychlost přehrávání",
"Aspect Ratio": "Poměr stran",
"Default": "Výchozí",
"Normal": "Normální",
"Open": "Otevřít",
"Switch Video": "Přepnout video",
"Switch Subtitle": "Přepnout titulky",
"Fullscreen": "Celá obrazovka",
"Exit Fullscreen": "Opustit režim celé obrazovky",
"Web Fullscreen": "Celá stránka",
"Exit Web Fullscreen": "Zavřít režim celé stránky",
"Mini Player": "Mini přehrávač",
"PIP Mode": "Režim PIP",
"Exit PIP Mode": "Opustit režim PIP",
"PIP Not Supported": "Režim PIP není podporován",
"Fullscreen Not Supported": "Režim celé obrazovky není podporován",
"Subtitle Offset": "Posun titulků",
"Last Seen": "Naposledy viděn",
"Jump Play": "Hra na skok",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay není k dispozici"
}
'Video Info': 'Info o videu',
Close: 'Zavřít',
'Video Load Failed': 'Nahrání videa selhalo',
Volume: 'Hlasitost',
Play: 'Přehrát',
Pause: 'Pozastavit',
Rate: 'Hodnocení',
Mute: 'Ztlumit',
'Video Flip': 'Otočit video',
Horizontal: 'Horizontálně',
Vertical: 'Vertikálně',
Reconnect: 'Opětovné připojení',
'Show Setting': 'Zobrazit nastavení',
'Hide Setting': 'Skrýt nastavení',
Screenshot: 'Snímek obrazovky',
'Play Speed': 'Rychlost přehrávání',
'Aspect Ratio': 'Poměr stran',
Default: 'Výchozí',
Normal: 'Normální',
Open: 'Otevřít',
'Switch Video': 'Přepnout video',
'Switch Subtitle': 'Přepnout titulky',
Fullscreen: 'Celá obrazovka',
'Exit Fullscreen': 'Opustit režim celé obrazovky',
'Web Fullscreen': 'Celá stránka',
'Exit Web Fullscreen': 'Zavřít režim celé stránky',
'Mini Player': 'Mini přehrávač',
'PIP Mode': 'Režim PIP',
'Exit PIP Mode': 'Opustit režim PIP',
'PIP Not Supported': 'Režim PIP není podporován',
'Fullscreen Not Supported': 'Režim celé obrazovky není podporován',
'Subtitle Offset': 'Posun titulků',
'Last Seen': 'Naposledy viděn',
'Jump Play': 'Hra na skok',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay není k dispozici',
};
export default cs;
if (typeof window !== 'undefined') {
window['artplayer-i18n-cs'] = cs;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const es = {
"Video Info": "Información del video",
"Close": "Cerrar",
"Video Load Failed": "Falló carga de video",
"Volume": "Volumen",
"Play": "Reproduciendo",
"Pause": "Pausa",
"Rate": "Velocidad",
"Mute": "Silencio",
"Video Flip": "Rotar video",
"Horizontal": "Horizontal",
"Vertical": "Vertical",
"Reconnect": "Reconectando",
"Show Setting": "Mostrar ajustes",
"Hide Setting": "Ocultar ajustes",
"Screenshot": "Captura de Pantalla",
"Play Speed": "Velocidad de reproducción",
"Aspect Ratio": "Relación de aspecto",
"Default": "Por defecto",
"Normal": "Normal",
"Open": "Abrir",
"Switch Video": "Cambiar video",
"Switch Subtitle": "Cambiar subtítulo",
"Fullscreen": "Pantalla completa",
"Exit Fullscreen": "Salir de Pantalla completa",
"Web Fullscreen": "Pantalla completa Web",
"Exit Web Fullscreen": "Salir de Pantalla completa",
"Mini Player": "Mini reproductor",
"PIP Mode": "Modo PiP",
"Exit PIP Mode": "Cerrar modo PiP",
"PIP Not Supported": "Modo PiP no compatible",
"Fullscreen Not Supported": "Pantalla completa no soportada",
"Subtitle Offset": "Ajuste subtítulo",
"Last Seen": "Visto última vez",
"Jump Play": "Saltar",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay no disponible"
}
'Video Info': 'Información del video',
Close: 'Cerrar',
'Video Load Failed': 'Falló carga de video',
Volume: 'Volumen',
Play: 'Reproduciendo',
Pause: 'Pausa',
Rate: 'Velocidad',
Mute: 'Silencio',
'Video Flip': 'Rotar video',
Horizontal: 'Horizontal',
Vertical: 'Vertical',
Reconnect: 'Reconectando',
'Show Setting': 'Mostrar ajustes',
'Hide Setting': 'Ocultar ajustes',
Screenshot: 'Captura de Pantalla',
'Play Speed': 'Velocidad de reproducción',
'Aspect Ratio': 'Relación de aspecto',
Default: 'Por defecto',
Normal: 'Normal',
Open: 'Abrir',
'Switch Video': 'Cambiar video',
'Switch Subtitle': 'Cambiar subtítulo',
Fullscreen: 'Pantalla completa',
'Exit Fullscreen': 'Salir de Pantalla completa',
'Web Fullscreen': 'Pantalla completa Web',
'Exit Web Fullscreen': 'Salir de Pantalla completa',
'Mini Player': 'Mini reproductor',
'PIP Mode': 'Modo PiP',
'Exit PIP Mode': 'Cerrar modo PiP',
'PIP Not Supported': 'Modo PiP no compatible',
'Fullscreen Not Supported': 'Pantalla completa no soportada',
'Subtitle Offset': 'Ajuste subtítulo',
'Last Seen': 'Visto última vez',
'Jump Play': 'Saltar',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay no disponible',
};
export default es;
if (typeof window !== 'undefined') {
window['artplayer-i18n-es'] = es;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const fa = {
"Video Info": "اطلاعات ویدیو",
"Close": "بستن",
"Video Load Failed": "بارگذاری ناموفق",
"Play": "پخش",
"Volume": "میزان صدا",
"Pause": "توقف",
"Rate": "نرخ",
"Mute": "سکوت",
"Video Flip": "چرخش تصویر",
"Horizontal": "افقی",
"Vertical": "عمودی",
"Reconnect": "اتصال مجدد",
"Show Setting": "تنظیمات",
"Hide Setting": "بستن تنظیمات",
"Screenshot": "عکس از صفحه",
"Play Speed": "سرعت پخش",
"Aspect Ratio": "نسبت تصویر",
"Default": "حالت پیشفرض",
"Normal": " حالت عادی",
"Open": "بازکردن",
"Switch Video": "تغییر ویدیو",
"Switch Subtitle": "نغییر زیرنویس",
"Fullscreen": "تمام صفحه",
"Exit Fullscreen": "کوچک کردن",
"Web Fullscreen": "حالت تئاتر",
"Exit Web Fullscreen": "خروج از حالت تئاتر",
"Mini Player": "حالت پخش کوچک",
"PIP Mode": " مینی پلیر",
"Exit PIP Mode": "خروج از مینی پلیر",
"PIP Not Supported": "عدم پشتیبانی از مینی پلیر",
"Fullscreen Not Supported": "عدم پشتیبانی از حالت تمام صفحه",
"Subtitle Offset": "افست زیرنویس",
"Last Seen": "آخرین بازدید",
"Jump Play": "جامپ پلی",
"AirPlay": "ایر پلی",
"AirPlay Not Available": "عدم پشتیبانی از ایرپلی"
}
'Video Info': 'اطلاعات ویدیو',
Close: 'بستن',
'Video Load Failed': 'بارگذاری ناموفق',
Play: 'پخش',
Volume: 'میزان صدا',
Pause: 'توقف',
Rate: 'نرخ',
Mute: 'سکوت',
'Video Flip': 'چرخش تصویر',
Horizontal: 'افقی',
Vertical: 'عمودی',
Reconnect: 'اتصال مجدد',
'Show Setting': 'تنظیمات',
'Hide Setting': 'بستن تنظیمات',
Screenshot: 'عکس از صفحه',
'Play Speed': 'سرعت پخش',
'Aspect Ratio': 'نسبت تصویر',
Default: 'حالت پیشفرض',
Normal: ' حالت عادی',
Open: 'بازکردن',
'Switch Video': 'تغییر ویدیو',
'Switch Subtitle': 'نغییر زیرنویس',
Fullscreen: 'تمام صفحه',
'Exit Fullscreen': 'کوچک کردن',
'Web Fullscreen': 'حالت تئاتر',
'Exit Web Fullscreen': 'خروج از حالت تئاتر',
'Mini Player': 'حالت پخش کوچک',
'PIP Mode': ' مینی پلیر',
'Exit PIP Mode': 'خروج از مینی پلیر',
'PIP Not Supported': 'عدم پشتیبانی از مینی پلیر',
'Fullscreen Not Supported': 'عدم پشتیبانی از حالت تمام صفحه',
'Subtitle Offset': 'افست زیرنویس',
'Last Seen': 'آخرین بازدید',
'Jump Play': 'جامپ پلی',
AirPlay: 'ایر پلی',
'AirPlay Not Available': 'عدم پشتیبانی از ایرپلی',
};
export default fa;
if (typeof window !== 'undefined') {
window['artplayer-i18n-fa'] = fa;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const fr = {
"Video Info": "Informations de la vidéo",
"Close": "Fermer",
"Video Load Failed": "Téléchargement de la vidéo échoué",
"Volume": "Volume",
"Play": "Lire",
"Pause": "Pause",
"Rate": "Vitesse",
"Mute": "Muet",
"Video Flip": "Rotation de la vidéo",
"Horizontal": "Horizontal",
"Vertical": "Vertical",
"Reconnect": "Reconnexion",
"Show Setting": "Afficher les paramètres",
"Hide Setting": "Cacher les paramètres",
"Screenshot": "Capture d'écran",
"Play Speed": "Vitesse de lecture",
"Aspect Ratio": "Rapport d'aspect",
"Default": "Défaut",
"Normal": "Normal",
"Open": "Ouvrir",
"Switch Video": "Basculer la vidéo",
"Switch Subtitle": "Basculer le sous-titre",
"Fullscreen": "Plein écran",
"Exit Fullscreen": "Quitter le plein écran",
"Web Fullscreen": "Plein écran Web",
"Exit Web Fullscreen": "Quitter le plein écran Web",
"Mini Player": "Mini lecteur",
"PIP Mode": "Mode PiP",
"Exit PIP Mode": "Fermer le mode PiP",
"PIP Not Supported": "Mode PiP non supporté",
"Fullscreen Not Supported": "Plein écran non supporté",
"Subtitle Offset": "Réglage des sous-titres",
"Last Seen": "Dernière position",
"Jump Play": "Continuer",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay non disponible"
}
'Video Info': 'Informations de la vidéo',
Close: 'Fermer',
'Video Load Failed': 'Téléchargement de la vidéo échoué',
Volume: 'Volume',
Play: 'Lire',
Pause: 'Pause',
Rate: 'Vitesse',
Mute: 'Muet',
'Video Flip': 'Rotation de la vidéo',
Horizontal: 'Horizontal',
Vertical: 'Vertical',
Reconnect: 'Reconnexion',
'Show Setting': 'Afficher les paramètres',
'Hide Setting': 'Cacher les paramètres',
Screenshot: "Capture d'écran",
'Play Speed': 'Vitesse de lecture',
'Aspect Ratio': "Rapport d'aspect",
Default: 'Défaut',
Normal: 'Normal',
Open: 'Ouvrir',
'Switch Video': 'Basculer la vidéo',
'Switch Subtitle': 'Basculer le sous-titre',
Fullscreen: 'Plein écran',
'Exit Fullscreen': 'Quitter le plein écran',
'Web Fullscreen': 'Plein écran Web',
'Exit Web Fullscreen': 'Quitter le plein écran Web',
'Mini Player': 'Mini lecteur',
'PIP Mode': 'Mode PiP',
'Exit PIP Mode': 'Fermer le mode PiP',
'PIP Not Supported': 'Mode PiP non supporté',
'Fullscreen Not Supported': 'Plein écran non supporté',
'Subtitle Offset': 'Réglage des sous-titres',
'Last Seen': 'Dernière position',
'Jump Play': 'Continuer',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay non disponible',
};
export default fr;
if (typeof window !== 'undefined') {
window['artplayer-i18n-fr'] = fr;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const id = {
"Video Info": "Informasi Video",
"Close": "Tutup",
"Video Load Failed": "Gagal Memuat Video",
"Volume": "Volume",
"Play": "Putar",
"Pause": "Jeda",
"Rate": "Kecepatan",
"Mute": "Senyap",
"Video Flip": "Memutar Video",
"Horizontal": "Horizontal",
"Vertical": "Vertikal",
"Reconnect": "Menyambung Kembali",
"Show Setting": "Tampilkan Pengaturan",
"Hide Setting": "Sembunyikan Pengaturan",
"Screenshot": "Tangkapan Layar",
"Play Speed": "Kecepatan Putar",
"Aspect Ratio": "Rasio Aspek",
"Default": "Default",
"Normal": "Normal",
"Open": "Buka",
"Switch Video": "Ganti Video",
"Switch Subtitle": "Ganti Subtitle",
"Fullscreen": "Layar Penuh",
"Exit Fullscreen": "Keluar dari Layar Penuh",
"Web Fullscreen": "Layar Penuh Web",
"Exit Web Fullscreen": "Keluar dari Layar Penuh Web",
"Mini Player": "Pemutar Mini",
"PIP Mode": "Mode PIP",
"Exit PIP Mode": "Keluar dari Mode PIP",
"PIP Not Supported": "PIP Tidak Didukung",
"Fullscreen Not Supported": "Layar Penuh Tidak Didukung",
"Subtitle Offset": "Pergeseran Subtitle",
"Last Seen": "Terakhir Dilihat",
"Jump Play": "Lompat Putar",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay Tidak Tersedia"
}
'Video Info': 'Informasi Video',
Close: 'Tutup',
'Video Load Failed': 'Gagal Memuat Video',
Volume: 'Volume',
Play: 'Putar',
Pause: 'Jeda',
Rate: 'Kecepatan',
Mute: 'Senyap',
'Video Flip': 'Memutar Video',
Horizontal: 'Horizontal',
Vertical: 'Vertikal',
Reconnect: 'Menyambung Kembali',
'Show Setting': 'Tampilkan Pengaturan',
'Hide Setting': 'Sembunyikan Pengaturan',
Screenshot: 'Tangkapan Layar',
'Play Speed': 'Kecepatan Putar',
'Aspect Ratio': 'Rasio Aspek',
Default: 'Default',
Normal: 'Normal',
Open: 'Buka',
'Switch Video': 'Ganti Video',
'Switch Subtitle': 'Ganti Subtitle',
Fullscreen: 'Layar Penuh',
'Exit Fullscreen': 'Keluar dari Layar Penuh',
'Web Fullscreen': 'Layar Penuh Web',
'Exit Web Fullscreen': 'Keluar dari Layar Penuh Web',
'Mini Player': 'Pemutar Mini',
'PIP Mode': 'Mode PIP',
'Exit PIP Mode': 'Keluar dari Mode PIP',
'PIP Not Supported': 'PIP Tidak Didukung',
'Fullscreen Not Supported': 'Layar Penuh Tidak Didukung',
'Subtitle Offset': 'Pergeseran Subtitle',
'Last Seen': 'Terakhir Dilihat',
'Jump Play': 'Lompat Putar',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay Tidak Tersedia',
};
export default id;
if (typeof window !== 'undefined') {
window['artplayer-i18n-id'] = id;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const pl = {
"Video Info": "Informacje o wideo",
"Close": "Zamknij",
"Video Load Failed": "Błąd ładowania wideo",
"Volume": "Głośność",
"Play": "Odtwórz",
"Pause": "Wstrzymaj",
"Rate": "Oceń",
"Mute": "Wycisz",
"Video Flip": "Rotacja wideo",
"Horizontal": "Pozioma",
"Vertical": "Pionowa",
"Reconnect": "Połącz ponownie",
"Show Setting": "Pokaż ustawienia",
"Hide Setting": "Ukryj ustawienia",
"Screenshot": "Zrzut ekranu",
"Play Speed": "Prędkość odtwarzania",
"Aspect Ratio": "Współczynnik proporcji",
"Default": "Domyślny",
"Normal": "Normalny",
"Open": "Otwórz",
"Switch Video": "Przełącz wideo",
"Switch Subtitle": "Przełącz napisy",
"Fullscreen": "Pełny ekran",
"Exit Fullscreen": "Zamknij pełny ekran",
"Web Fullscreen": "Tryb pełnej strony",
"Exit Web Fullscreen": "Zamknij tryb pełnej strony",
"Mini Player": "Miniodtwarzacz",
"PIP Mode": "Tryb PiP",
"Exit PIP Mode": "Zamknij tryb PiP",
"PIP Not Supported": "Tryb PiP nieobsługiwany",
"Fullscreen Not Supported": "Pełny ekran nieobsługiwany",
"Subtitle Offset": "Przesunięcie napisów",
"Last Seen": "Ostatnio widziany",
"Jump Play": "Skocz do gry",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay nie jest dostępny"
}
'Video Info': 'Informacje o wideo',
Close: 'Zamknij',
'Video Load Failed': 'Błąd ładowania wideo',
Volume: 'Głośność',
Play: 'Odtwórz',
Pause: 'Wstrzymaj',
Rate: 'Oceń',
Mute: 'Wycisz',
'Video Flip': 'Rotacja wideo',
Horizontal: 'Pozioma',
Vertical: 'Pionowa',
Reconnect: 'Połącz ponownie',
'Show Setting': 'Pokaż ustawienia',
'Hide Setting': 'Ukryj ustawienia',
Screenshot: 'Zrzut ekranu',
'Play Speed': 'Prędkość odtwarzania',
'Aspect Ratio': 'Współczynnik proporcji',
Default: 'Domyślny',
Normal: 'Normalny',
Open: 'Otwórz',
'Switch Video': 'Przełącz wideo',
'Switch Subtitle': 'Przełącz napisy',
Fullscreen: 'Pełny ekran',
'Exit Fullscreen': 'Zamknij pełny ekran',
'Web Fullscreen': 'Tryb pełnej strony',
'Exit Web Fullscreen': 'Zamknij tryb pełnej strony',
'Mini Player': 'Miniodtwarzacz',
'PIP Mode': 'Tryb PiP',
'Exit PIP Mode': 'Zamknij tryb PiP',
'PIP Not Supported': 'Tryb PiP nieobsługiwany',
'Fullscreen Not Supported': 'Pełny ekran nieobsługiwany',
'Subtitle Offset': 'Przesunięcie napisów',
'Last Seen': 'Ostatnio widziany',
'Jump Play': 'Skocz do gry',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay nie jest dostępny',
};
export default pl;
if (typeof window !== 'undefined') {
window['artplayer-i18n-pl'] = pl;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const ru = {
"Video Info": "Информация",
"Close": "Закрыть",
"Video Load Failed": "Ошибка загрузки видео",
"Volume": "Громкость",
"Play": "Играть",
"Pause": "Пауза",
"Rate": "Скорость",
"Mute": "Заглушить",
"Video Flip": "Развернуть видео",
"Horizontal": "Горизонтально",
"Vertical": "Вертикально",
"Reconnect": "Переподключенине",
"Show Setting": "Показать настройки",
"Hide Setting": "Скрыть настройки",
"Screenshot": "Скриншот",
"Play Speed": "Скорость воспроизведения",
"Aspect Ratio": "Соотношение сторон",
"Default": "По-умолчанию",
"Normal": "Нормальный",
"Open": "Открыть",
"Switch Video": "Переключить видео",
"Switch Subtitle": "Переключить субтитры",
"Fullscreen": "Полноэкранный режим",
"Exit Fullscreen": "Выход из полноэкранного режима",
"Web Fullscreen": "На все окно браузера",
"Exit Web Fullscreen": "Выход из режима полного окна",
"Mini Player": "Мини проигрыватель",
"PIP Mode": "Картинка в картинке",
"Exit PIP Mode": "Закрыть картинку в картинке",
"PIP Not Supported": "Картинка в картинке не поддерживается",
"Fullscreen Not Supported": "Полноэкранный режим не поддерживается",
"Subtitle Offset": "Настройка субтитров",
"Last Seen": "Последнее просмотренное",
"Jump Play": "Перейти",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay недоступен"
}
'Video Info': 'Информация',
Close: 'Закрыть',
'Video Load Failed': 'Ошибка загрузки видео',
Volume: 'Громкость',
Play: 'Играть',
Pause: 'Пауза',
Rate: 'Скорость',
Mute: 'Заглушить',
'Video Flip': 'Развернуть видео',
Horizontal: 'Горизонтально',
Vertical: 'Вертикально',
Reconnect: 'Переподключенине',
'Show Setting': 'Показать настройки',
'Hide Setting': 'Скрыть настройки',
Screenshot: 'Скриншот',
'Play Speed': 'Скорость воспроизведения',
'Aspect Ratio': 'Соотношение сторон',
Default: 'По-умолчанию',
Normal: 'Нормальный',
Open: 'Открыть',
'Switch Video': 'Переключить видео',
'Switch Subtitle': 'Переключить субтитры',
Fullscreen: 'Полноэкранный режим',
'Exit Fullscreen': 'Выход из полноэкранного режима',
'Web Fullscreen': 'На все окно браузера',
'Exit Web Fullscreen': 'Выход из режима полного окна',
'Mini Player': 'Мини проигрыватель',
'PIP Mode': 'Картинка в картинке',
'Exit PIP Mode': 'Закрыть картинку в картинке',
'PIP Not Supported': 'Картинка в картинке не поддерживается',
'Fullscreen Not Supported': 'Полноэкранный режим не поддерживается',
'Subtitle Offset': 'Настройка субтитров',
'Last Seen': 'Последнее просмотренное',
'Jump Play': 'Перейти',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay недоступен',
};
export default ru;
if (typeof window !== 'undefined') {
window['artplayer-i18n-ru'] = ru;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const tr = {
"Video Info": "Video Bilgisi",
"Close": "Kapat",
"Video Load Failed": "Video Yüklenemedi",
"Volume": "Ses Seviyesi",
"Play": "Oynat",
"Pause": "Duraklat",
"Rate": "Hız",
"Mute": "Sessize Al",
"Video Flip": "Videoyu Çevir",
"Horizontal": "Yatay",
"Vertical": "Dikey",
"Reconnect": "Yeniden Bağlan",
"Show Setting": "Ayarları Göster",
"Hide Setting": "Ayarları Gizle",
"Screenshot": "Ekran Görüntüsü",
"Play Speed": "Oynatma Hızı",
"Aspect Ratio": "En Boy Oranı",
"Default": "Varsayılan",
"Normal": "Normal",
"Open": "Aç",
"Switch Video": "Video Değiştir",
"Switch Subtitle": "Altyazı Değiştir",
"Fullscreen": "Tam Ekran",
"Exit Fullscreen": "Tam Ekrandan Çık",
"Web Fullscreen": "Web Tam Ekran",
"Exit Web Fullscreen": "Web Tam Ekranından Çık",
"Mini Player": "Küçük Oynatıcı",
"PIP Mode": "PIP Modu",
"Exit PIP Mode": "PIP Modundan Çık",
"PIP Not Supported": "PIP Desteklenmiyor",
"Fullscreen Not Supported": "Tam Ekran Desteklenmiyor",
"Subtitle Offset": "Altyazı Kaydırma",
"Last Seen": "Son İzlenen",
"Jump Play": "Atla ve Oynat",
"AirPlay": "AirPlay",
"AirPlay Not Available": "AirPlay Kullanılamıyor"
}
'Video Info': 'Video Bilgisi',
Close: 'Kapat',
'Video Load Failed': 'Video Yüklenemedi',
Volume: 'Ses Seviyesi',
Play: 'Oynat',
Pause: 'Duraklat',
Rate: 'Hız',
Mute: 'Sessize Al',
'Video Flip': 'Videoyu Çevir',
Horizontal: 'Yatay',
Vertical: 'Dikey',
Reconnect: 'Yeniden Bağlan',
'Show Setting': 'Ayarları Göster',
'Hide Setting': 'Ayarları Gizle',
Screenshot: 'Ekran Görüntüsü',
'Play Speed': 'Oynatma Hızı',
'Aspect Ratio': 'En Boy Oranı',
Default: 'Varsayılan',
Normal: 'Normal',
Open: 'Aç',
'Switch Video': 'Video Değiştir',
'Switch Subtitle': 'Altyazı Değiştir',
Fullscreen: 'Tam Ekran',
'Exit Fullscreen': 'Tam Ekrandan Çık',
'Web Fullscreen': 'Web Tam Ekran',
'Exit Web Fullscreen': 'Web Tam Ekranından Çık',
'Mini Player': 'Küçük Oynatıcı',
'PIP Mode': 'PIP Modu',
'Exit PIP Mode': 'PIP Modundan Çık',
'PIP Not Supported': 'PIP Desteklenmiyor',
'Fullscreen Not Supported': 'Tam Ekran Desteklenmiyor',
'Subtitle Offset': 'Altyazı Kaydırma',
'Last Seen': 'Son İzlenen',
'Jump Play': 'Atla ve Oynat',
AirPlay: 'AirPlay',
'AirPlay Not Available': 'AirPlay Kullanılamıyor',
};
export default tr;
if (typeof window !== 'undefined') {
window['artplayer-i18n-tr'] = tr;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const zhCn = {
"Video Info": "统计信息",
"Close": "关闭",
"Video Load Failed": "加载失败",
"Volume": "音量",
"Play": "播放",
"Pause": "暂停",
"Rate": "速度",
"Mute": "静音",
"Video Flip": "画面翻转",
"Horizontal": "水平",
"Vertical": "垂直",
"Reconnect": "重新连接",
"Show Setting": "显示设置",
"Hide Setting": "隐藏设置",
"Screenshot": "截图",
"Play Speed": "播放速度",
"Aspect Ratio": "画面比例",
"Default": "默认",
"Normal": "正常",
"Open": "打开",
"Switch Video": "切换",
"Switch Subtitle": "切换字幕",
"Fullscreen": "全屏",
"Exit Fullscreen": "退出全屏",
"Web Fullscreen": "网页全屏",
"Exit Web Fullscreen": "退出网页全屏",
"Mini Player": "迷你播放器",
"PIP Mode": "开启画中画",
"Exit PIP Mode": "退出画中画",
"PIP Not Supported": "不支持画中画",
"Fullscreen Not Supported": "不支持全屏",
"Subtitle Offset": "字幕偏移",
"Last Seen": "上次看到",
"Jump Play": "跳转播放",
"AirPlay": "隔空播放",
"AirPlay Not Available": "隔空播放不可用"
}
'Video Info': '统计信息',
Close: '关闭',
'Video Load Failed': '加载失败',
Volume: '音量',
Play: '播放',
Pause: '暂停',
Rate: '速度',
Mute: '静音',
'Video Flip': '画面翻转',
Horizontal: '水平',
Vertical: '垂直',
Reconnect: '重新连接',
'Show Setting': '显示设置',
'Hide Setting': '隐藏设置',
Screenshot: '截图',
'Play Speed': '播放速度',
'Aspect Ratio': '画面比例',
Default: '默认',
Normal: '正常',
Open: '打开',
'Switch Video': '切换',
'Switch Subtitle': '切换字幕',
Fullscreen: '全屏',
'Exit Fullscreen': '退出全屏',
'Web Fullscreen': '网页全屏',
'Exit Web Fullscreen': '退出网页全屏',
'Mini Player': '迷你播放器',
'PIP Mode': '开启画中画',
'Exit PIP Mode': '退出画中画',
'PIP Not Supported': '不支持画中画',
'Fullscreen Not Supported': '不支持全屏',
'Subtitle Offset': '字幕偏移',
'Last Seen': '上次看到',
'Jump Play': '跳转播放',
AirPlay: '隔空播放',
'AirPlay Not Available': '隔空播放不可用',
};
export default zhCn;
if (typeof window !== 'undefined') {
window['artplayer-i18n-zh-cn'] = zhCn;
}
}
+38 -38
View File
@@ -1,44 +1,44 @@
const zhTw = {
"Video Info": "統計訊息",
"Close": "關閉",
"Video Load Failed": "載入失敗",
"Volume": "音量",
"Play": "播放",
"Pause": "暫停",
"Rate": "速度",
"Mute": "靜音",
"Video Flip": "畫面翻轉",
"Horizontal": "水平",
"Vertical": "垂直",
"Reconnect": "重新連接",
"Show Setting": "顯示设置",
"Hide Setting": "隱藏设置",
"Screenshot": "截圖",
"Play Speed": "播放速度",
"Aspect Ratio": "畫面比例",
"Default": "默認",
"Normal": "正常",
"Open": "打開",
"Switch Video": "切換",
"Switch Subtitle": "切換字幕",
"Fullscreen": "全屏",
"Exit Fullscreen": "退出全屏",
"Web Fullscreen": "網頁全屏",
"Exit Web Fullscreen": "退出網頁全屏",
"Mini Player": "迷你播放器",
"PIP Mode": "開啟畫中畫",
"Exit PIP Mode": "退出畫中畫",
"PIP Not Supported": "不支持畫中畫",
"Fullscreen Not Supported": "不支持全屏",
"Subtitle Offset": "字幕偏移",
"Last Seen": "上次看到",
"Jump Play": "跳轉播放",
"AirPlay": "隔空播放",
"AirPlay Not Available": "隔空播放不可用"
}
'Video Info': '統計訊息',
Close: '關閉',
'Video Load Failed': '載入失敗',
Volume: '音量',
Play: '播放',
Pause: '暫停',
Rate: '速度',
Mute: '靜音',
'Video Flip': '畫面翻轉',
Horizontal: '水平',
Vertical: '垂直',
Reconnect: '重新連接',
'Show Setting': '顯示设置',
'Hide Setting': '隱藏设置',
Screenshot: '截圖',
'Play Speed': '播放速度',
'Aspect Ratio': '畫面比例',
Default: '默認',
Normal: '正常',
Open: '打開',
'Switch Video': '切換',
'Switch Subtitle': '切換字幕',
Fullscreen: '全屏',
'Exit Fullscreen': '退出全屏',
'Web Fullscreen': '網頁全屏',
'Exit Web Fullscreen': '退出網頁全屏',
'Mini Player': '迷你播放器',
'PIP Mode': '開啟畫中畫',
'Exit PIP Mode': '退出畫中畫',
'PIP Not Supported': '不支持畫中畫',
'Fullscreen Not Supported': '不支持全屏',
'Subtitle Offset': '字幕偏移',
'Last Seen': '上次看到',
'Jump Play': '跳轉播放',
AirPlay: '隔空播放',
'AirPlay Not Available': '隔空播放不可用',
};
export default zhTw;
if (typeof window !== 'undefined') {
window['artplayer-i18n-zh-tw'] = zhTw;
}
}
@@ -9,6 +9,7 @@ export default function posterMix(art) {
get: () => {
try {
return $poster.style['backgroundImage'].match(/"(.*)"/)[1];
// eslint-disable-next-line no-unused-vars
} catch (error) {
return '';
}
+4
View File
@@ -8,6 +8,7 @@ export default class Storage {
try {
const storage = JSON.parse(window.localStorage.getItem(this.name)) || {};
return key ? storage[key] : storage;
// eslint-disable-next-line no-unused-vars
} catch (error) {
return key ? this.settings[key] : this.settings;
}
@@ -19,6 +20,7 @@ export default class Storage {
[key]: value,
});
window.localStorage.setItem(this.name, JSON.stringify(storage));
// eslint-disable-next-line no-unused-vars
} catch (error) {
this.settings[key] = value;
}
@@ -29,6 +31,7 @@ export default class Storage {
const storage = this.get();
delete storage[key];
window.localStorage.setItem(this.name, JSON.stringify(storage));
// eslint-disable-next-line no-unused-vars
} catch (error) {
delete this.settings[key];
}
@@ -37,6 +40,7 @@ export default class Storage {
clear() {
try {
window.localStorage.removeItem(this.name);
// eslint-disable-next-line no-unused-vars
} catch (error) {
this.settings = {};
}
Loaded 100 of 402 files, more files were not shown because too many files have changed in this diff. Show more