diff --git a/dist/cs.js b/dist/cs.js new file mode 100644 index 000000000..9b7c970ca --- /dev/null +++ b/dist/cs.js @@ -0,0 +1 @@ +!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=new 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 numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,n,l,t,i){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(r)return r(n,!0);// Try the node require function if it exists. -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;sr);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),i=t[0],a=t[1]/100;l(i+a>=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,v=null,x=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 C(){j||(j=!0,function(){n.template.$ads=u(l,'
'),y=u(n.template.$ads,e.video?``:`
${e.html}
`),x=u(n.template.$ads,'
'),u(x,d),g=s(".artplayer-plugin-ads-close",f=u(n.template.$ads,`
-
${e.playDuration<=0?e.i18n.close:P(e.playDuration,e.i18n.canBeClosed)}
-
${P(e.totalDuration,e.i18n.countdown)}
-
`)),m=s(".artplayer-plugin-ads-countdown",f),e.playDuration>=e.totalDuration&&c(g,"display","none"),n.proxy(g,"click",()=>{D&&$()}),v=u(n.template.$ads,`
-
${e.i18n.detail}
-
-
-
`);let r=s(".artplayer-plugin-ads-detail",v),p=s(".artplayer-plugin-ads-muted",v),h=s(".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){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(v,"display","flex"),c(x,"display","none")})):(k(),c(f,"display","flex"),c(v,"display","flex"),c(x,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?A():k()}))}return n.on("ready",()=>{n.once("play",C),n.once("video:playing",C)}),{name:"artplayerPluginAds",skip:$,pause:A,play:k}}}if(r.env="production",r.version="2.0.0",r.build="2023-08-26 13:44:44","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){let e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=r)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l){n.exports=".artplayer-plugin-ads{z-index:150;width:100%;height:100%;color:#fff;background-color:#000;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{width:100%;height:100%;justify-content:center;align-items:center;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach(function(l){"default"===l||"__esModule"===l||n.hasOwnProperty(l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})}),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0"); \ No newline at end of file +!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{!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,'
'),y=u(n.template.$ads,e.video?``:`
${e.html}
`),x=u(n.template.$ads,'
'),u(x,d),f=u(n.template.$ads,`
${e.playDuration<=0?e.i18n.close:$(e.playDuration,e.i18n.canBeClosed)}
${$(e.totalDuration,e.i18n.countdown)}
`),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,`
${e.i18n.detail}
`);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,r.env="production",r.version="2.0.0",r.build="2023-08-26 16:47:27","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=r)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l){n.exports=".artplayer-plugin-ads{z-index:150;width:100%;height:100%;color:#fff;background-color:#000;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{width:100%;height:100%;justify-content:center;align-items:center;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach((function(l){"default"===l||"__esModule"===l||n.hasOwnProperty(l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})})),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-ads.legacy.js b/docs/compiled/artplayer-plugin-ads.legacy.js index 2b7bc8d54..338246bcc 100644 --- a/docs/compiled/artplayer-plugin-ads.legacy.js +++ b/docs/compiled/artplayer-plugin-ads.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,n,t,r,l){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var l="function"==typeof i[r]&&i[r];if(!t&&l)return l(n,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(n,!0);// Try the node require function if it exists. -if(s&&"string"==typeof n)return s(n);var p=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=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,d=s.volume,p=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,w=null,j=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?j.innerHTML=C(n,e.i18n.canBeClosed):(j.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,'
'),b=h(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),O=h(n.template.$ads,'
'),h(O,f),j=v(".artplayer-plugin-ads-close",w=h(n.template.$ads,'
'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'
').concat(C(e.totalDuration,e.i18n.countdown),"
"))),_=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",D=h(n.template.$ads,'
'.concat(e.i18n.detail,'
'))),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,d),o=h(r,p);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(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")})):(T(),x(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")),n.proxy(document,"visibilitychange",function(){document.hidden?F():T()}))}return n.on("ready",function(){n.once("play",U),n.once("video:playing",U)}),{name:"artplayerPluginAds",skip:L,pause:F,play:T}}}if(o.env="production",o.version="2.0.0",o.build="2023-08-26 13:44:46","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var s=document.createElement("style");s.id="artplayer-plugin-ads",s.textContent=a.default,document.head.appendChild(s)}"undefined"!=typeof window&&(window.artplayerPluginAds=o)},{"@swc/helpers/_/_object_spread":"9agdF","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"_object_spread",function(){return i}),r.export(t,"_",function(){return i});var l=e("./_define_property.js");function i(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0"); \ No newline at end of file +!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=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,j=null,w=null,_=0,D=null,O=!1,P=!1,k=!1;function I(e,n){return n.replace("%s",e)}function L(){O=!0,n.play(),e.video&&v.pause(),m(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function A(){O||(D=setTimeout((function(){_+=1;var n=e.playDuration-_;n>=1?x.innerHTML=I(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),b.innerHTML=I(e.totalDuration-_,e.i18n.countdown),_>=e.totalDuration?L():A()}),1e3))}function M(){O||clearTimeout(D)}function C(){P||(P=!0,function(){n.template.$ads=g(t,'
'),v=g(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),w=g(n.template.$ads,'
'),g(w,p),h=g(n.template.$ads,'
'.concat(e.playDuration<=0?e.i18n.close:I(e.playDuration,e.i18n.canBeClosed),'
').concat(I(e.totalDuration,e.i18n.countdown),"
")),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&&L()})),j=g(n.template.$ads,'
'.concat(e.i18n.detail,'
'));var r=y(".artplayer-plugin-ads-detail",j),i=y(".artplayer-plugin-ads-muted",j),s=y(".artplayer-plugin-ads-fullscreen",j);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),_=g(s,d);m(_,"display","none"),n.proxy(s,"click",(function(){n.fullscreen=!n.fullscreen,n.fullscreen?(m(f,"display","inline-flex"),m(_,"display","none")):(m(f,"display","none"),m(_,"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",L),n.proxy(v,"loadedmetadata",(function(){A(),v.play(),m(h,"display","flex"),m(j,"display","flex"),m(w,"display","none")}))):(A(),m(h,"display","flex"),m(j,"display","flex"),m(w,"display","none")),n.proxy(document,"visibilitychange",(function(){document.hidden?M():A()})))}return n.on("ready",(function(){n.once("play",C),n.once("video:playing",C)})),{name:"artplayerPluginAds",skip:L,pause:M,play:A}}}if(t.default=s,s.env="production",s.version="2.0.0",s.build="2023-08-26 16:47:27","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var d=document.createElement("style");d.id="artplayer-plugin-ads",d.textContent=o.default,document.head.appendChild(d)}"undefined"!=typeof window&&(window.artplayerPluginAds=s)},{"@swc/helpers/src/_object_spread.mjs":"1LSQ7","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1LSQ7":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"default",(function(){return l._}));var l=e("../esm/_object_spread.js")},{"../esm/_object_spread.js":"9agdF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"_object_spread",(function(){return i})),r.export(t,"_",(function(){return i}));var l=e("./_define_property.js");function i(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-control.js b/docs/compiled/artplayer-plugin-control.js index 5e6dd673b..a13b4d2d1 100644 --- a/docs/compiled/artplayer-plugin-control.js +++ b/docs/compiled/artplayer-plugin-control.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,o,n){/* eslint-disable no-undef */var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof l[o]&&l[o],i=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof l[o]&&l[o];if(!r&&n)return n(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -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(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=a,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var c=0;ca);var n=e("bundle-text:./style.less"),l=o.interopDefault(n);function a(){return e=>{!function(e){let{version:t,utils:{errorHandle:r}}=e.constructor,o=t.split(".").map(Number),n=o[0],l=o[1]/100;r(n+l>=5,`Artplayer.js@${t} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(e);let{template:{$bottom:t,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:l,removeClass:i,hasClass:u,isMobile:p}}}=e;if(p)return;let c="artplayer-plugin-control";l(r,c);let d=o(t,'
'),s=o(t,'
'),f=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t{d.innerText=n(e.currentTime),s.innerText=n(e.duration)});return{name:"artplayerPluginControl",get enable(){return u(r,c)},set enable(state){state?l(r,c):i(r,c)}}}}if(a.env="production",a.version="2.0.0",a.build="2023-08-26 13:44:42","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){let e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=l.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(e,t,r){t.exports=".artplayer-plugin-control{--art-control-height:46px;--art-control-icon-scale:1.1}.artplayer-plugin-control .apa-control-current,.artplayer-plugin-control .apa-control-duration{display:flex}.artplayer-plugin-control .art-control-time,.artplayer-plugin-control .art-controls-center{display:none}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control .art-bottom{height:70px;width:400px;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;align-items:center;margin-left:-200px;inset:auto auto 10px 50%;overflow:visible;box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%}.artplayer-plugin-control .art-bottom .art-controls{width:100%}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;font-size:12px;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[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})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,o,n){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof l[o]&&l[o],i=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){var n="function"==typeof l[o]&&l[o];if(!r&&n)return n(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=a,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var c=0;c{!function(e){const{version:t,utils:{errorHandle:r}}=e.constructor,o=t.split(".").map(Number);r(o[0]+o[1]/100>=5,`Artplayer.js@${t} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(e);const{template:{$bottom:t,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:l,removeClass:i,hasClass:u,isMobile:p}}}=e;if(p)return;const c="artplayer-plugin-control";l(r,c);const d=o(t,'
'),s=o(t,'
'),f=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t{d.innerText=n(e.currentTime),s.innerText=n(e.duration)}));return{name:"artplayerPluginControl",get enable(){return u(r,c)},set enable(e){e?l(r,c):i(r,c)}}}}if(r.default=a,a.env="production",a.version="2.0.0",a.build="2023-08-26 16:47:26","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=l.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(e,t,r){t.exports=".artplayer-plugin-control{--art-control-height:46px;--art-control-icon-scale:1.1}.artplayer-plugin-control .apa-control-current,.artplayer-plugin-control .apa-control-duration{display:flex}.artplayer-plugin-control .art-control-time,.artplayer-plugin-control .art-controls-center{display:none}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control .art-bottom{height:70px;width:400px;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;align-items:center;margin-left:-200px;inset:auto auto 10px 50%;overflow:visible;box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%}.artplayer-plugin-control .art-bottom .art-controls{width:100%}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;font-size:12px;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[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})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-control.legacy.js b/docs/compiled/artplayer-plugin-control.legacy.js index 54bde0a10..c83690b3e 100644 --- a/docs/compiled/artplayer-plugin-control.legacy.js +++ b/docs/compiled/artplayer-plugin-control.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,o,n){/* eslint-disable no-undef */var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof a[o]&&a[o],i=l.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof a[o]&&a[o];if(!r&&n)return n(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -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(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=l,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return a[o]}}),a[o]=p;for(var c=0;c=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginControl@").concat(l.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,o,n=e.template,a=n.$bottom,i=n.$player,u=e.constructor.utils,p=u.append,c=u.secondToTime,d=u.addClass,s=u.removeClass,f=u.hasClass;if(!u.isMobile){var y="artplayer-plugin-control";d(i,y);for(var g=p(a,'
'),b=p(a,'
'),m=["video:loadedmetadata","video:timeupdate","video:progress"],x=0;x=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginControl@").concat(l.version,". Please update it to version Artplayer.js@5.x.x"))}(e);var t=e.template,r=t.$bottom,o=t.$player,n=e.constructor.utils,a=n.append,i=n.secondToTime,u=n.addClass,p=n.removeClass,c=n.hasClass;if(!n.isMobile){var d="artplayer-plugin-control";u(o,d);for(var s=a(r,'
'),f=a(r,'
'),y=["video:loadedmetadata","video:timeupdate","video:progress"],g=0;g numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(t,e,i,r,n){/* eslint-disable no-undef */var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[r]&&a[r],o=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,i){if(!o[e]){if(!t[e]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof a[r]&&a[r];if(!i&&n)return n(e,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(s)return s(e,!0);// Try the node require function if it exists. -if(l&&"string"==typeof e)return l(e);var d=Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},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,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(u,"root",{get:function(){return a[r]}}),a[r]=u;for(var d=0;dd);var n=t("./danmuku"),a=r.interopDefault(n),s=t("./setting"),o=r.interopDefault(s),l=t("./heatmap"),u=r.interopDefault(l);function d(t){return e=>{!function(t){let{version:e,utils:{errorHandle:i}}=t.constructor,r=e.split(".").map(Number),n=r[0],a=r[1]/100;i(n+a>=5,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上`)}(e);let i=new a.default(e,t);return(0,o.default)(e,i),t.heatmap&&(0,u.default)(e,i,t.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),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}d.env="production",d.version="5.0.1",d.build="2023-08-26 13:44:38","undefined"!=typeof window&&(window.artplayerPluginDanmuku=d)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),a=t("./getDanmuTop"),s=r.interopDefault(a);class o{constructor(e,i){let{constructor:r,template:n}=e;if(this.utils=r.utils,this.validator=r.validator,this.$danmuku=n.$danmuku,this.$player=n.$player,this.art=e,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(i),this.option.useWorker)try{this.worker=new Worker(t("e55e9b30c441298a"))}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(){let{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"==typeof e)return t(e,0,i);if("string"==typeof e&&e.endsWith("%")){let r=parseFloat(e)/100;return t(i*r,0,i)}return o.option.margin[0]}get marginBottom(){let{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"==typeof e)return t(e,0,i);if("string"==typeof e&&e.endsWith("%")){let r=parseFloat(e)/100;return t(i*r,0,i)}return o.option.margin[1]}filter(t,e){return this.queue.filter(e=>e.$state===t).map(e)}getLeft(t){let e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){let t=this.$refs.pop();if(t)return t;let e=document.createElement("div");return e.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; - `,e}getReady(){let{currentTime:t}=this.art;return this.queue.filter(e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1)}getEmits(){let t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",r=>{let n=r.$ref.offsetTop,a=this.getLeft(r.$ref)-i,s=r.$ref.clientHeight,o=r.$ref.clientWidth,l=a+o,u=e-l,d=l/r.$restTime,m={};m.top=n,m.left=a,m.height=s,m.width=o,m.right=u,m.speed=d,m.distance=l,m.time=r.$restTime,m.mode=r.mode,t.push(m)}),t}getFontSize(t){let{clamp:e}=this.utils,{clientHeight:i}=this.$player;if("number"==typeof t)return e(t,12,i);if("string"==typeof t&&t.endsWith("%")){let r=parseFloat(t)/100;return e(i*r,12,i)}return o.option.fontSize}postMessage(t={}){return new Promise(e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{let{data:r}=i;r.id===t.id&&e(r)};else{let i=(0,s.default)(t);e({top:i})}})}async load(){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,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(t=>this.emit(t))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){let{clamp:e}=this.utils;return this.option=Object.assign({},o.option,this.option,t),this.validator(this.option,o.scheme),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(Math.floor(this.option.lockTime),0,60),this.option.maxLength=e(this.option.maxLength,0,500),this.option.minWidth=e(this.option.minWidth,0,500),this.option.maxWidth=e(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){let{clientWidth:t}=this.$player;return this.filter("stop",e=>{if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}}),this}suspend(){let{clientWidth:t}=this.$player;return this.filter("emit",e=>{if(e.$state="stop",0===e.mode){let i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s"}}),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this}update(){return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{let e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});let t=this.getReady(),{clientWidth:e,clientHeight:i}=this.$player;for(let r=0;rthis.makeWait(t)),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)&&(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+.5,void 0===t.mode&&(t.mode=this.option.mode),void 0===t.color&&(t.color=this.option.color),this.queue.push({...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0})),this}destroy(){this.stop(),this.worker&&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),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}i.default=o},{"./bilibili":"f83sx","./getDanmuTop":"jPSuD",e55e9b30c441298a:"fXq73","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function a(t){if("string"!=typeof t)return[];let e=t.matchAll(/(?.+?)<\/d>/gs);return Array.from(e).map(t=>{let e=t.groups.p.split(",");if(!(e.length>=8))return null;{let i=t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&");return{text:i,time:Number(e[0]),mode:n(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}}).filter(Boolean)}function s(t){return fetch(t).then(t=>t.text()).then(t=>a(t))}r.defineInteropFlag(i),r.export(i,"getMode",()=>n),r.export(i,"bilibiliDanmuParseFromXml",()=>a),r.export(i,"bilibiliDanmuParseFromUrl",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,i){i.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},i.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.exportAll=function(t,e){return Object.keys(t).forEach(function(i){"default"===i||"__esModule"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})}),e},i.export=function(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:i})}},{}],jPSuD:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n({target:t,emits:e,clientWidth:i,clientHeight:r,marginBottom:n,marginTop:a,antiOverlap:s}){let o=e.filter(e=>e.mode===t.mode&&e.top<=r-n).sort((t,e)=>t.top-e.top);if(0===o.length)return a;o.unshift({top:0,left:0,right:0,height:a,width:i,speed:0,distance:i}),o.push({top:r-n,left:0,right:0,height:n,width:i,speed:0,distance:i});for(let e=1;e=t.height)return n}let l=[];for(let t=1;te.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:return}else{switch(t.mode){case 0:l.sort((t,e)=>{let i=Math.min(...e.map(t=>t.right)),r=Math.min(...t.map(t=>t.right));return i*e.length-r*t.length});break;case 1:l.sort((t,e)=>{let i=Math.max(...e.map(t=>t.width)),r=Math.max(...t.map(t=>t.width));return r*t.length-i*e.length})}return l[0][0].top}}r.defineInteropFlag(i),r.export(i,"default",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fXq73:[function(t,e,i){e.exports="data:application/javascript,onmessage%3De%3D%3E%7Blet%7Bdata%3At%7D%3De%2Ch%3Dfunction%28%7Btarget%3Ae%2Cemits%3At%2CclientWidth%3Ah%2CclientHeight%3Ai%2CmarginBottom%3Ar%2CmarginTop%3As%2CantiOverlap%3An%7D%29%7Blet%20l%3Dt.filter%28t%3D%3Et.mode%3D%3D%3De.mode%26%26t.top%3C%3Di-r%29.sort%28%28e%2Ct%29%3D%3Ee.top-t.top%29%3Bif%280%3D%3D%3Dl.length%29return%20s%3Bl.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3Ah%2Cspeed%3A0%2Cdistance%3Ah%7D%29%2Cl.push%28%7Btop%3Ai-r%2Cleft%3A0%2Cright%3A0%2Cheight%3Ar%2Cwidth%3Ah%2Cspeed%3A0%2Cdistance%3Ah%7D%29%3Bfor%28let%20t%3D1%3Bt%3Cl.length%3Bt%2B%3D1%29%7Blet%20h%3Dl%5Bt%5D%2Ci%3Dl%5Bt-1%5D%2Cr%3Di.top%2Bi.height%2Cs%3Dh.top-r%3Bif%28s%3E%3De.height%29return%20r%7Dlet%20p%3D%5B%5D%3Bfor%28let%20e%3D1%3Be%3Cl.length-1%3Be%2B%3D1%29%7Blet%20t%3Dl%5Be%5D%3Bif%28p.length%29%7Blet%20e%3Dp%5Bp.length-1%5D%3Be%5B0%5D.top%3D%3D%3Dt.top%3Fe.push%28t%29%3Ap.push%28%5Bt%5D%29%7Delse%20p.push%28%5Bt%5D%29%7Dif%28n%29switch%28e.mode%29%7Bcase%200%3A%7Blet%20t%3Dp.find%28t%3D%3Et.every%28t%3D%3E%7Bif%28h%3Ct.distance%29return%211%3Bif%28e.speed%3Ct.speed%29return%210%3Blet%20i%3Dt.right%2F%28e.speed-t.speed%29%3Breturn%20i%3Et.time%7D%29%29%3Breturn%20t%26%26t%5B0%5D%3Ft%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7Delse%7Bswitch%28e.mode%29%7Bcase%200%3Ap.sort%28%28e%2Ct%29%3D%3E%7Blet%20h%3DMath.min%28...t.map%28e%3D%3Ee.right%29%29%2Ci%3DMath.min%28...e.map%28e%3D%3Ee.right%29%29%3Breturn%20h%2at.length-i%2ae.length%7D%29%3Bbreak%3Bcase%201%3Ap.sort%28%28e%2Ct%29%3D%3E%7Blet%20h%3DMath.max%28...t.map%28e%3D%3Ee.width%29%29%2Ci%3DMath.max%28...e.map%28e%3D%3Ee.width%29%29%3Breturn%20i%2ae.length-h%2at.length%7D%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7D%7D%28t%29%3Bself.postMessage%28%7Btop%3Ah%2Cid%3At.id%7D%29%7D%3B"},{}],lO8OT:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"default",()=>f);var n=t("bundle-text:./style.less"),a=r.interopDefault(n),s=t("bundle-text:./img/danmu-on.svg"),o=r.interopDefault(s),l=t("bundle-text:./img/danmu-off.svg"),u=r.interopDefault(l),d=t("bundle-text:./img/danmu-config.svg"),m=r.interopDefault(d),p=t("bundle-text:./img/danmu-style.svg"),h=r.interopDefault(p);function f(t,e){let{option:i}=e,{template:{$controlsCenter:r,$player:n},constructor:{SETTING_ITEM_WIDTH:a,utils:{removeClass:s,addClass:l,append:d,setStyle:p,tooltip:f,query:c,inverseClass:g,getIcon:y}}}=t;p(r,"display","flex");let k=y("danmu-on",o.default),x=y("danmu-off",u.default),b=y("danmu-config",m.default),v=y("danmu-style",h.default);!function(){let a=["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"].map(t=>{let e=i.color===t?" art-current":"";return`
`}),o=d(r,` -
-
-
-
-
-
模式
-
-
滚动
-
静止
-
-
颜色
-
- ${a.join("")} -
-
-
-
- -
-
发送
-
- `),u=c(".art-danmuku-style",o),m=c(".art-danmuku-input",o),h=c(".art-danmuku-send",o),f=c(".art-danmuku-style-panel-inner",o),y=c(".art-danmuku-style-panel-modes",o),k=c(".art-danmuku-style-panel-colors",o),x=i.mount||d(n,'
');t.option.backdrop&&l(f,"art-backdrop-filter"),i.theme&&l(o,`art-danmuku-theme-${i.theme}`);let b=null,w=i.mode,$=i.color;function D(){let r={mode:w,color:$,border:!0,text:m.value.trim()};null===b&&i.beforeEmit(r)&&(m.value="",e.emit(r),l(h,"art-disabled"),function t(e){e<=0?(b=null,h.innerText="发送",s(h,"art-disabled")):(h.innerText=e,b=setTimeout(()=>t(e-1),1e3))}(i.lockTime),t.emit("artplayerPluginDanmuku:emit",r))}function B(){r.clientWidth{"Enter"===t.key&&(t.preventDefault(),D())}),t.proxy(y,"click",t=>{let{dataset:e}=t.target;e.mode&&(w=Number(e.mode),g(t.target,"art-current"))}),t.proxy(k,"click",t=>{let{dataset:e}=t.target;e.color&&($=e.color,g(t.target,"art-current"))}),B(),t.on("resize",()=>{t.isInput||B()}),t.on("destroy",()=>{i.mount&&o.parentElement===i.mount&&i.mount.removeChild(o)})}(),t.controls.add({position:"right",name:"danmuku",click:function(){e.isHide?(e.show(),t.notice.show="弹幕显示",p(k,"display",null),p(x,"display","none")):(e.hide(),t.notice.show="弹幕隐藏",p(k,"display","none"),p(x,"display",null))},mounted(e){d(e,k),d(e,x),f(e,"弹幕开关"),p(x,"display","none"),t.on("artplayerPluginDanmuku:hide",()=>{p(k,"display","none"),p(x,"display",null)}),t.on("artplayerPluginDanmuku:show",()=>{p(k,"display",null),p(x,"display","none")})}}),t.setting.add({width:260,name:"danmuku",html:"弹幕设置",tooltip:"更多",icon:b,selector:[{width:a,html:"播放速度",icon:"",tooltip:"适中",selector:[{html:"极慢",time:10},{html:"较慢",time:7.5},{default:!0,html:"适中",time:5},{html:"较快",time:2.5},{html:"极快",time:1}],onSelect:function(t){return e.config({speed:t.time}),t.html}},{width:a,html:"字体大小",icon:"",tooltip:"适中",selector:[{html:"极小",fontSize:"4%"},{html:"较小",fontSize:"5%"},{default:!0,html:"适中",fontSize:"6%"},{html:"较大",fontSize:"7%"},{html:"极大",fontSize:"8%"}],onSelect:function(t){return e.config({fontSize:t.fontSize}),t.html}},{width:a,html:"不透明度",icon:"",tooltip:"100%",selector:[{default:!0,opacity:1,html:"100%"},{opacity:.75,html:"75%"},{opacity:.5,html:"50%"},{opacity:.25,html:"25%"},{opacity:0,html:"0%"}],onSelect:function(t){return e.config({opacity:t.opacity}),t.html}},{width:a,html:"显示范围",icon:"",tooltip:"3/4",selector:[{html:"1/4",margin:[10,"75%"]},{html:"半屏",margin:[10,"50%"]},{default:!0,html:"3/4",margin:[10,"25%"]},{html:"满屏",margin:[10,10]}],onSelect:function(t){return e.config({margin:t.margin}),t.html}},{html:"弹幕防重叠",icon:"",tooltip:i.antiOverlap?"开启":"关闭",switch:i.antiOverlap,onSwitch:t=>(e.config({antiOverlap:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)},{html:"同步视频速度",icon:"",tooltip:i.synchronousPlayback?"开启":"关闭",switch:i.synchronousPlayback,onSwitch:t=>(e.config({synchronousPlayback:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)}]})}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-danmuku")){let t=document.createElement("style");t.id="artplayer-plugin-danmuku",t.textContent=a.default,document.head.appendChild(t)}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/danmu-on.svg":"4KfW9","bundle-text:./img/danmu-off.svg":"9UR3U","bundle-text:./img/danmu-config.svg":"4MPCW","bundle-text:./img/danmu-style.svg":"7lV5Q","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,i){e.exports='.art-danmuku-emitter{height:32px;width:100%;max-width:100%;background-color:#ffffff4d;border-radius:5px;font-size:12px;line-height:1;display:flex;position:relative}.art-danmuku-emitter .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}.art-danmuku-emitter .art-danmuku-left{border-radius:3px 0 0 3px;flex:1;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style{width:32px;justify-content:center;align-items:center;display:flex;position:relative}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{z-index:999;width:200px;padding-bottom:10px;display:none;position:absolute;bottom:30px;left:-85px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner{background-color:#000000e6;border-radius:3px;flex-direction:column;padding:10px 10px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-title{margin-bottom:10px;font-size:13px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes{justify-content:space-between;margin-bottom:15px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode{width:47%;cursor:pointer;color:#fff;border:1px solid #fff;justify-content:center;padding:5px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode.art-current{background-color:#00a1d6;border:1px solid #00a1d6}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors{flex-wrap:wrap;justify-content:space-between;gap:5px;margin-bottom:10px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color{cursor:pointer;width:20px;height:20px;border:1px solid #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current{position:relative;box-shadow:0 0 2px #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current:before{content:"";width:100%;height:100%;border:2px solid #000;position:absolute;inset:0}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style:hover .art-danmuku-style-panel{display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon{opacity:.75;cursor:pointer}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon:hover{opacity:1}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input{width:100%;color:#fff;background-color:#0000;border:none;outline:none;flex:1;padding:0 10px 0 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#ffffff80}.art-danmuku-emitter .art-danmuku-send{width:50px;cursor:pointer;background-color:#00a1d6;border-radius:0 5px 5px 0;justify-content:center;align-items:center;display:flex}.art-danmuku-emitter .art-danmuku-send:hover{background-color:#00b5e5}.art-danmuku-emitter .art-danmuku-send.art-disabled{opacity:.5;pointer-events:none}.art-danmuku-emitter.art-danmuku-mount{max-width:100%!important}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{left:0}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-send{width:60px}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left{background:#f4f4f4;border:1px solid #dadada}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-style .art-icon svg{fill:#666}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input{color:#000}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#00000080}.art-layer-danmuku-emitter{z-index:99;width:100%;position:absolute;bottom:-40px;left:0;right:0}'},{}],"4KfW9":[function(t,e,i){e.exports=''},{}],"9UR3U":[function(t,e,i){e.exports=''},{}],"4MPCW":[function(t,e,i){e.exports=''},{}],"7lV5Q":[function(t,e,i){e.exports=''},{}],"8AxLD":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"default",()=>s);let n={map:(t,e,i,r,n)=>(t-e)*(n-r)/(i-e)+r,range(t,e,i){let r=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+r)}},a=(t,e)=>{let i=e[0]-t[0],r=e[1]-t[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(r,2)),angle:Math.atan2(r,i)}};function s(t,e,i){let{query:r}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(s){let o=null,l=null;function u(u=[]){if(o=null,l=null,s.innerHTML="",!t.duration||t.option.isLive)return;let d={w:s.offsetWidth,h:s.offsetHeight},m={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"==typeof i&&Object.assign(m,i);let p=[];if(Array.isArray(u)&&u.length)p=[...u];else{let i=t.duration/d.w;for(let t=0;t<=d.w;t+=m.sampling){let r=e.danmus.filter(({time:e})=>e>t*i&&e<=(t+m.sampling)*i).length;p.push([t,r])}}if(0===p.length)return;let h=p[p.length-1],f=h[0],c=h[1];f!==d.w&&p.push([d.w,c]);let g=p.map(t=>t[1]),y=(Math.min(...g)+Math.max(...g))/2;for(let t=0;ty?1+m.scale:1-m.scale)+m.minHeight}let k=(t,e,i,r)=>{let s=a(e||t,i||t),o=n.map(Math.cos(s.angle)*m.flattening,0,1,1,0),l=s.angle*o+(r?Math.PI:0),u=s.length*m.smoothing,d=t[0]+Math.cos(l)*u,p=t[1]+Math.sin(l)*u;return[d,p]},x=(t,e,i)=>{let r=k(i[e-1],i[e-2],t),n=k(t,i[e-1],i[e+1],!0),a=e===i.length-1?" z":"";return`C ${r[0]},${r[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${a}`},b=p.map(t=>{let e=n.map(t[0],m.xMin,m.xMax,0,d.w),i=n.map(t[1],m.yMin,m.yMax,d.h,0);return[e,i]}),v=b.reduce((t,e,i,r)=>0===i?`M ${r[r.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${x(e,i,r)}`,"");s.innerHTML=` - - - - - - - - - - - - `,o=r("#heatmap-start",s),l=r("#heatmap-stop",s),o.setAttribute("offset",`${100*t.played}%`),l.setAttribute("offset",`${100*t.played}%`)}t.on("video:timeupdate",()=>{o&&l&&(o.setAttribute("offset",`${100*t.played}%`),l.setAttribute("offset",`${100*t.played}%`))}),t.on("setBar",(t,e)=>{o&&l&&"played"===t&&(o.setAttribute("offset",`${100*e}%`),l.setAttribute("offset",`${100*e}%`))}),t.on("ready",()=>u()),t.on("resize",()=>u()),t.on("artplayerPluginDanmuku:loaded",()=>u()),t.on("artplayerPluginDanmuku:points",t=>u(t))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0"); \ No newline at end of file +!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{!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,d.env="production",d.version="5.0.1",d.build="2023-08-26 16:47:25","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("85d40535eae5f839"))}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 JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}getEmits(){const t=[],{clientWidth:e}=this.$player,n=this.getLeft(this.$player);return this.filter("emit",(i=>{const r=i.$ref.offsetTop,a=this.getLeft(i.$ref)-n,s=i.$ref.clientHeight,o=i.$ref.clientWidth,l=a+o,u=e-l,d=l/i.$restTime,m={};m.top=r,m.left=a,m.height=s,m.width=o,m.right=u,m.speed=d,m.distance=l,m.time=i.$restTime,m.mode=i.mode,t.push(m)})),t}getFontSize(t){const{clamp:e}=this.utils,{clientHeight:n}=this.$player;if("number"==typeof t)return e(t,12,n);if("string"==typeof t&&t.endsWith("%")){return e(n*(parseFloat(t)/100),12,n)}return o.option.fontSize}postMessage(t={}){return new Promise((e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=n=>{const{data:i}=n;i.id===t.id&&e(i)};else{const n=(0,s.default)(t);e({top:n})}}))}async load(){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,r.bilibiliDanmuParseFromUrl)(this.option.danmuku):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((t=>this.emit(t)))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){const{clamp:e}=this.utils;return this.option=Object.assign({},o.option,this.option,t),this.validator(this.option,o.scheme),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(Math.floor(this.option.lockTime),0,60),this.option.maxLength=e(this.option.maxLength,0,500),this.option.minWidth=e(this.option.minWidth,0,500),this.option.maxWidth=e(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",(e=>{switch(e.$state="emit",e.$lastStartTime=Date.now(),e.mode){case 0:{const n=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-n}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const n=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-n}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}reset(){return this.queue.forEach((t=>this.makeWait(t))),this}update(){return this.timer=window.requestAnimationFrame((async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",(t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)}));const t=this.getReady(),{clientWidth:e,clientHeight:n}=this.$player;for(let i=0;ithis.makeWait(t))),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)?(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+.5,void 0===t.mode&&(t.mode=this.option.mode),void 0===t.color&&(t.color=this.option.color),this.queue.push({...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}),this):this}destroy(){this.stop(),this.worker&&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),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}n.default=o},{"./bilibili":"f83sx","./getDanmuTop":"jPSuD","85d40535eae5f839":"fXq73","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");function r(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function a(t){if("string"!=typeof t)return[];const e=t.matchAll(/(?.+?)<\/d>/gs);return Array.from(e).map((t=>{const e=t.groups.p.split(",");if(e.length>=8){return{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:r(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}return null})).filter(Boolean)}function s(t){return fetch(t).then((t=>t.text())).then((t=>a(t)))}i.defineInteropFlag(n),i.export(n,"getMode",(()=>r)),i.export(n,"bilibiliDanmuParseFromXml",(()=>a)),i.export(n,"bilibiliDanmuParseFromUrl",(()=>s))},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,n){n.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},n.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.exportAll=function(t,e){return Object.keys(t).forEach((function(n){"default"===n||"__esModule"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),e},n.export=function(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get:n})}},{}],jPSuD:[function(t,e,n){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n),n.default=function({target:t,emits:e,clientWidth:n,clientHeight:i,marginBottom:r,marginTop:a,antiOverlap:s}){const o=e.filter((e=>e.mode===t.mode&&e.top<=i-r)).sort(((t,e)=>t.top-e.top));if(0===o.length)return a;o.unshift({top:0,left:0,right:0,height:a,width:n,speed:0,distance:n}),o.push({top:i-r,left:0,right:0,height:r,width:n,speed:0,distance:n});for(let e=1;e=t.height)return r}const l=[];for(let t=1;t{const n=Math.min(...e.map((t=>t.right))),i=Math.min(...t.map((t=>t.right)));return n*e.length-i*t.length}));break;case 1:l.sort(((t,e)=>{const n=Math.max(...e.map((t=>t.width)));return Math.max(...t.map((t=>t.width)))*t.length-n*e.length}))}return l[0][0].top}switch(t.mode){case 0:{const e=l.find((e=>e.every((e=>{if(ne.time}))));return e&&e[0]?e[0].top:void 0}case 1:return}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fXq73:[function(t,e,n){e.exports="data:application/javascript,function%20getDanmuTop%28%7Btarget%3At%2Cemits%3Ae%2CclientWidth%3An%2CclientHeight%3Ai%2CmarginBottom%3As%2CmarginTop%3Ah%2CantiOverlap%3Ao%7D%29%7Bconst%20r%3De.filter%28%28e%3D%3Ee.mode%3D%3D%3Dt.mode%26%26e.top%3C%3Di-s%29%29.sort%28%28%28t%2Ce%29%3D%3Et.top-e.top%29%29%3Bif%280%3D%3D%3Dr.length%29return%20h%3Br.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3Ah%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%2Cr.push%28%7Btop%3Ai-s%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%3Bfor%28let%20e%3D1%3Be%3Cr.length%3Be%2B%3D1%29%7Bconst%20n%3Dr%5Be%5D%2Ci%3Dr%5Be-1%5D%2Cs%3Di.top%2Bi.height%3Bif%28n.top-s%3E%3Dt.height%29return%20s%7Dconst%20p%3D%5B%5D%3Bfor%28let%20t%3D1%3Bt%3Cr.length-1%3Bt%2B%3D1%29%7Bconst%20e%3Dr%5Bt%5D%3Bif%28p.length%29%7Bconst%20t%3Dp%5Bp.length-1%5D%3Bt%5B0%5D.top%3D%3D%3De.top%3Ft.push%28e%29%3Ap.push%28%5Be%5D%29%7Delse%20p.push%28%5Be%5D%29%7Dif%28%21o%29%7Bswitch%28t.mode%29%7Bcase%200%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.min%28...e.map%28%28t%3D%3Et.right%29%29%29%2Ci%3DMath.min%28...t.map%28%28t%3D%3Et.right%29%29%29%3Breturn%20n%2ae.length-i%2at.length%7D%29%29%3Bbreak%3Bcase%201%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.max%28...e.map%28%28t%3D%3Et.width%29%29%29%3Breturn%20Math.max%28...t.map%28%28t%3D%3Et.width%29%29%29%2at.length-n%2ae.length%7D%29%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7Dswitch%28t.mode%29%7Bcase%200%3A%7Bconst%20e%3Dp.find%28%28e%3D%3Ee.every%28%28e%3D%3E%7Bif%28n%3Ce.distance%29return%211%3Bif%28t.speed%3Ce.speed%29return%210%3Breturn%20e.right%2F%28t.speed-e.speed%29%3Ee.time%7D%29%29%29%29%3Breturn%20e%26%26e%5B0%5D%3Fe%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7D%7Donmessage%3Dt%3D%3E%7Bconst%7Bdata%3Ae%7D%3Dt%2Cn%3DgetDanmuTop%28e%29%3Bself.postMessage%28%7Btop%3An%2Cid%3Ae.id%7D%29%7D%3B"},{}],lO8OT:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("bundle-text:./style.less"),a=i.interopDefault(r),s=t("bundle-text:./img/danmu-on.svg"),o=i.interopDefault(s),l=t("bundle-text:./img/danmu-off.svg"),u=i.interopDefault(l),d=t("bundle-text:./img/danmu-config.svg"),m=i.interopDefault(d),p=t("bundle-text:./img/danmu-style.svg"),h=i.interopDefault(p);if(n.default=function(t,e){const{option:n}=e,{template:{$controlsCenter:i,$player:r},constructor:{SETTING_ITEM_WIDTH:a,utils:{removeClass:s,addClass:l,append:d,setStyle:p,tooltip:c,query:f,inverseClass:g,getIcon:y}}}=t;p(i,"display","flex");const k=y("danmu-on",o.default),x=y("danmu-off",u.default),b=y("danmu-config",m.default),v=y("danmu-style",h.default);!function(){const a=["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"].map((t=>`
`)),o=d(i,`
模式
滚动
静止
颜色
${a.join("")}
发送
`),u=f(".art-danmuku-style",o),m=f(".art-danmuku-input",o),h=f(".art-danmuku-send",o),c=f(".art-danmuku-style-panel-inner",o),y=f(".art-danmuku-style-panel-modes",o),k=f(".art-danmuku-style-panel-colors",o),x=n.mount||d(r,'
');t.option.backdrop&&l(c,"art-backdrop-filter"),n.theme&&l(o,`art-danmuku-theme-${n.theme}`);let b=null,w=n.mode,$=n.color;function D(t){t<=0?(b=null,h.innerText="发送",s(h,"art-disabled")):(h.innerText=t,b=setTimeout((()=>D(t-1)),1e3))}function B(){const i={mode:w,color:$,border:!0,text:m.value.trim()};null===b&&n.beforeEmit(i)&&(m.value="",e.emit(i),l(h,"art-disabled"),D(n.lockTime),t.emit("artplayerPluginDanmuku:emit",i))}function M(){i.clientWidth{"Enter"===t.key&&(t.preventDefault(),B())})),t.proxy(y,"click",(t=>{const{dataset:e}=t.target;e.mode&&(w=Number(e.mode),g(t.target,"art-current"))})),t.proxy(k,"click",(t=>{const{dataset:e}=t.target;e.color&&($=e.color,g(t.target,"art-current"))})),M(),t.on("resize",(()=>{t.isInput||M()})),t.on("destroy",(()=>{n.mount&&o.parentElement===n.mount&&n.mount.removeChild(o)}))}(),t.controls.add({position:"right",name:"danmuku",click:function(){e.isHide?(e.show(),t.notice.show="弹幕显示",p(k,"display",null),p(x,"display","none")):(e.hide(),t.notice.show="弹幕隐藏",p(k,"display","none"),p(x,"display",null))},mounted(e){d(e,k),d(e,x),c(e,"弹幕开关"),p(x,"display","none"),t.on("artplayerPluginDanmuku:hide",(()=>{p(k,"display","none"),p(x,"display",null)})),t.on("artplayerPluginDanmuku:show",(()=>{p(k,"display",null),p(x,"display","none")}))}}),t.setting.add({width:260,name:"danmuku",html:"弹幕设置",tooltip:"更多",icon:b,selector:[{width:a,html:"播放速度",icon:"",tooltip:"适中",selector:[{html:"极慢",time:10},{html:"较慢",time:7.5},{default:!0,html:"适中",time:5},{html:"较快",time:2.5},{html:"极快",time:1}],onSelect:function(t){return e.config({speed:t.time}),t.html}},{width:a,html:"字体大小",icon:"",tooltip:"适中",selector:[{html:"极小",fontSize:"4%"},{html:"较小",fontSize:"5%"},{default:!0,html:"适中",fontSize:"6%"},{html:"较大",fontSize:"7%"},{html:"极大",fontSize:"8%"}],onSelect:function(t){return e.config({fontSize:t.fontSize}),t.html}},{width:a,html:"不透明度",icon:"",tooltip:"100%",selector:[{default:!0,opacity:1,html:"100%"},{opacity:.75,html:"75%"},{opacity:.5,html:"50%"},{opacity:.25,html:"25%"},{opacity:0,html:"0%"}],onSelect:function(t){return e.config({opacity:t.opacity}),t.html}},{width:a,html:"显示范围",icon:"",tooltip:"3/4",selector:[{html:"1/4",margin:[10,"75%"]},{html:"半屏",margin:[10,"50%"]},{default:!0,html:"3/4",margin:[10,"25%"]},{html:"满屏",margin:[10,10]}],onSelect:function(t){return e.config({margin:t.margin}),t.html}},{html:"弹幕防重叠",icon:"",tooltip:n.antiOverlap?"开启":"关闭",switch:n.antiOverlap,onSwitch:t=>(e.config({antiOverlap:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)},{html:"同步视频速度",icon:"",tooltip:n.synchronousPlayback?"开启":"关闭",switch:n.synchronousPlayback,onSwitch:t=>(e.config({synchronousPlayback:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)}]})},"undefined"!=typeof document&&!document.getElementById("artplayer-plugin-danmuku")){const t=document.createElement("style");t.id="artplayer-plugin-danmuku",t.textContent=a.default,document.head.appendChild(t)}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/danmu-on.svg":"4KfW9","bundle-text:./img/danmu-off.svg":"9UR3U","bundle-text:./img/danmu-config.svg":"4MPCW","bundle-text:./img/danmu-style.svg":"7lV5Q","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,n){e.exports='.art-danmuku-emitter{height:32px;width:100%;max-width:100%;background-color:#ffffff4d;border-radius:5px;font-size:12px;line-height:1;display:flex;position:relative}.art-danmuku-emitter .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}.art-danmuku-emitter .art-danmuku-left{border-radius:3px 0 0 3px;flex:1;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style{width:32px;justify-content:center;align-items:center;display:flex;position:relative}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{z-index:999;width:200px;padding-bottom:10px;display:none;position:absolute;bottom:30px;left:-85px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner{background-color:#000000e6;border-radius:3px;flex-direction:column;padding:10px 10px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-title{margin-bottom:10px;font-size:13px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes{justify-content:space-between;margin-bottom:15px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode{width:47%;cursor:pointer;color:#fff;border:1px solid #fff;justify-content:center;padding:5px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode.art-current{background-color:#00a1d6;border:1px solid #00a1d6}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors{flex-wrap:wrap;justify-content:space-between;gap:5px;margin-bottom:10px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color{cursor:pointer;width:20px;height:20px;border:1px solid #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current{position:relative;box-shadow:0 0 2px #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current:before{content:"";width:100%;height:100%;border:2px solid #000;position:absolute;inset:0}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style:hover .art-danmuku-style-panel{display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon{opacity:.75;cursor:pointer}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon:hover{opacity:1}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input{width:100%;color:#fff;background-color:#0000;border:none;outline:none;flex:1;padding:0 10px 0 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#ffffff80}.art-danmuku-emitter .art-danmuku-send{width:50px;cursor:pointer;background-color:#00a1d6;border-radius:0 5px 5px 0;justify-content:center;align-items:center;display:flex}.art-danmuku-emitter .art-danmuku-send:hover{background-color:#00b5e5}.art-danmuku-emitter .art-danmuku-send.art-disabled{opacity:.5;pointer-events:none}.art-danmuku-emitter.art-danmuku-mount{max-width:100%!important}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{left:0}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-send{width:60px}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left{background:#f4f4f4;border:1px solid #dadada}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-style .art-icon svg{fill:#666}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input{color:#000}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#00000080}.art-layer-danmuku-emitter{z-index:99;width:100%;position:absolute;bottom:-40px;left:0;right:0}'},{}],"4KfW9":[function(t,e,n){e.exports=''},{}],"9UR3U":[function(t,e,n){e.exports=''},{}],"4MPCW":[function(t,e,n){e.exports=''},{}],"7lV5Q":[function(t,e,n){e.exports=''},{}],"8AxLD":[function(t,e,n){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const i={map:(t,e,n,i,r)=>(t-e)*(r-i)/(n-e)+i,range(t,e,n){const i=Math.round(t/n)*n;return Array.from({length:Math.floor((e-t)/n)},((t,e)=>e*n+i))}};n.default=function(t,e,n){const{query:r}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(a){let s=null,o=null;function l(l=[]){if(s=null,o=null,a.innerHTML="",!t.duration||t.option.isLive)return;const u={w:a.offsetWidth,h:a.offsetHeight},d={xMin:0,xMax:u.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*u.h),sampling:Math.floor(u.w/100),smoothing:.2,flattening:.2};"object"==typeof n&&Object.assign(d,n);let m=[];if(Array.isArray(l)&&l.length)m=[...l];else{const n=t.duration/u.w;for(let t=0;t<=u.w;t+=d.sampling){const i=e.danmus.filter((({time:e})=>e>t*n&&e<=(t+d.sampling)*n)).length;m.push([t,i])}}if(0===m.length)return;const p=m[m.length-1],h=p[0],c=p[1];h!==u.w&&m.push([u.w,c]);const f=m.map((t=>t[1])),g=(Math.min(...f)+Math.max(...f))/2;for(let t=0;tg?1+d.scale:1-d.scale)+d.minHeight}const y=(t,e,n,r)=>{const a=((t,e)=>{const n=e[0]-t[0],i=e[1]-t[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),angle:Math.atan2(i,n)}})(e||t,n||t),s=i.map(Math.cos(a.angle)*d.flattening,0,1,1,0),o=a.angle*s+(r?Math.PI:0),l=a.length*d.smoothing;return[t[0]+Math.cos(o)*l,t[1]+Math.sin(o)*l]},k=m.map((t=>[i.map(t[0],d.xMin,d.xMax,0,u.w),i.map(t[1],d.yMin,d.yMax,u.h,0)])).reduce(((t,e,n,i)=>0===n?`M ${i[i.length-1][0]},${u.h} L ${e[0]},${u.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,n)=>{const i=y(n[e-1],n[e-2],t),r=y(t,n[e-1],n[e+1],!0),a=e===n.length-1?" z":"";return`C ${i[0]},${i[1]} ${r[0]},${r[1]} ${t[0]},${t[1]}${a}`})(e,n,i)}`),"");a.innerHTML=``,s=r("#heatmap-start",a),o=r("#heatmap-stop",a),s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",(()=>{s&&o&&(s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%"))})),t.on("setBar",((t,e)=>{s&&o&&"played"===t&&(s.setAttribute("offset",100*e+"%"),o.setAttribute("offset",100*e+"%"))})),t.on("ready",(()=>l())),t.on("resize",(()=>l())),t.on("artplayerPluginDanmuku:loaded",(()=>l())),t.on("artplayerPluginDanmuku:points",(t=>l(t)))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-danmuku.legacy.js b/docs/compiled/artplayer-plugin-danmuku.legacy.js index f31294a29..743519ed9 100644 --- a/docs/compiled/artplayer-plugin-danmuku.legacy.js +++ b/docs/compiled/artplayer-plugin-danmuku.legacy.js @@ -4,35 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(t,e,r,n,a){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(e,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(e,!0);// Try the node require function if it exists. -if(s&&"string"==typeof e)return s(e);var c=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=5,"Artplayer.js@".concat(n," 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上"));var r,n,a,i=new o.default(e,t);return(0,u.default)(e,i),t.heatmap&&(0,l.default)(e,i,t.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),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}c.env="production",c.version="5.0.1",c.build="2023-08-26 13:44:41","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 d});var a=t("@swc/helpers/_/_async_to_generator"),o=t("@swc/helpers/_/_class_call_check"),i=t("@swc/helpers/_/_create_class"),u=t("@swc/helpers/_/_object_spread"),s=t("@swc/helpers/_/_object_spread_props"),l=t("@swc/helpers/_/_ts_generator"),c=t("./bilibili"),p=t("./getDanmuTop"),f=n.interopDefault(p),d=/*#__PURE__*/function(){function e(r,n){(0,o._)(this,e);var a=r.constructor,i=r.template;if(this.utils=a.utils,this.validator=a.validator,this.$danmuku=i.$danmuku,this.$player=i.$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("e55e9b30c441298a"))}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,i._)(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, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}},{key:"getReady",value:function(){var t=this.art.currentTime;return this.queue.filter(function(e){return"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1})}},{key:"getEmits",value:function(){var t=this,e=[],r=this.$player.clientWidth,n=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=t.getLeft(a.$ref)-n,u=a.$ref.clientHeight,s=a.$ref.clientWidth,l=i+s,c=r-l,p=l/a.$restTime,f={};f.top=o,f.left=i,f.height=u,f.width=s,f.right=c,f.speed=p,f.distance=l,f.time=a.$restTime,f.mode=a.mode,e.push(f)}),e}},{key:"getFontSize",value:function(t){var r=this.utils.clamp,n=this.$player.clientHeight;return"number"==typeof t?r(t,12,n):"string"==typeof t&&t.endsWith("%")?r(n*(parseFloat(t)/100),12,n):e.option.fontSize}},{key:"postMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this;return new Promise(function(r){e.option.useWorker&&e.worker&&e.worker.postMessage?(t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var n=e.data;n.id===t.id&&r(n)}):r({top:(0,f.default)(t)})})}},{key:"load",value:function(){var t=this;return(0,a._)(function(){var e;return(0,l._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,8,,9]),"function"!=typeof t.option.danmuku)return[3,2];return[4,t.option.danmuku()];case 1:case 3:case 5:return t.danmus=r.sent(),[3,7];case 2:if("function"!=typeof t.option.danmuku.then)return[3,4];return[4,t.option.danmuku];case 4:if("string"!=typeof t.option.danmuku)return[3,6];return[4,(0,c.bilibiliDanmuParseFromUrl)(t.option.danmuku)];case 6:t.danmus=t.option.danmuku,r.label=7;case 7:return t.utils.errorHandle(Array.isArray(t.danmus),"Danmuku need return an array as result"),t.art.emit("artplayerPluginDanmuku:loaded",t.danmus),t.queue=[],t.$danmuku.innerText="",t.danmus.forEach(function(e){return t.emit(e)}),[3,9];case 8:throw e=r.sent(),t.art.emit("artplayerPluginDanmuku:error",e),e;case 9:return[2,t]}})})()}},{key:"config",value:function(t){var r=this.utils.clamp;return this.option=Object.assign({},e.option,this.option,t),this.validator(this.option,e.scheme),this.option.speed=r(this.option.speed,1,10),this.option.opacity=r(this.option.opacity,0,1),this.option.lockTime=r(Math.floor(this.option.lockTime),0,60),this.option.maxLength=r(this.option.maxLength,0,500),this.option.minWidth=r(this.option.minWidth,0,500),this.option.maxWidth=r(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}},{key:"makeWait",value:function(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}},{key:"continue",value:function(){var t=this.$player.clientWidth;return this.filter("stop",function(e){if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){var r=t+e.$ref.clientWidth;e.$ref.style.transform="translateX(".concat(-r,"px)"),e.$ref.style.transition="transform ".concat(e.$restTime,"s linear 0s")}}),this}},{key:"suspend",value:function(){var t=this,e=this.$player.clientWidth;return this.filter("emit",function(r){if(r.$state="stop",0===r.mode){var n=e-(t.getLeft(r.$ref)-t.getLeft(t.$player));r.$ref.style.transform="translateX(".concat(-n,"px)"),r.$ref.style.transition="transform 0s linear 0s"}}),this}},{key:"reset",value:function(){var t=this;return this.queue.forEach(function(e){return t.makeWait(e)}),this}},{key:"update",value:function(){var t=this;return this.timer=window.requestAnimationFrame(/*#__PURE__*/(0,a._)(function(){var e,r,n,a,o,i,u,s,c;return(0,l._)(this,function(l){switch(l.label){case 0:if(!(t.art.playing&&!t.isHide))return[3,4];t.filter("emit",function(e){var r=(Date.now()-e.$lastStartTime)/1e3;e.$restTime-=r,e.$lastStartTime=Date.now(),e.$restTime<=0&&t.makeWait(e)}),e=t.getReady(),n=(r=t.$player).clientWidth,a=r.clientHeight,o=0,l.label=1;case 1:if(!(oe.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(t);ae.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function l(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(a=t[u])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i}function c(t,e){return function(r,n){e(r,n,t)}}function p(t,e,r,n,a,o){function i(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,s=n.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!e&&t?n.static?t:t.prototype:null,p=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var m={};for(var h in n)m[h]="access"===h?{}:n[h];for(var h in n.access)m.access[h]=n.access[h];m.addInitializer=function(t){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(t||null))};var y=(0,r[d])("accessor"===s?{get:p.get,set:p.set}:p[l],m);if("accessor"===s){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(u=i(y.get))&&(p.get=u),(u=i(y.set))&&(p.set=u),(u=i(y.init))&&a.push(u)}else(u=i(y))&&("field"===s?a.push(u):p[l]=u)}c&&Object.defineProperty(c,n.name,p),f=!0}function f(t,e,r){for(var n=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,a,o=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function x(){for(var t=[],e=0;e1||u(t,e)})})}function u(t,e){try{var r;(r=a[t](e)).value instanceof j?Promise.resolve(r.value.v).then(s,l):c(o[0][2],r)}catch(t){c(o[0][3],t)}}function s(t){u("next",t)}function l(t){u("throw",t)}function c(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function B(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,a){e[n]=t[n]?function(e){return(r=!r)?{value:j(t[n](e)),done:!1}:a?a(e):e}:a}}function O(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=k(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,a){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,a,(e=t[r](e)).done,e.value)})}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var $=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function F(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&v(e,t,r);return $(e,t),e}function A(t){return t&&t.__esModule?t:{default:t}}function P(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function M(t,e,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(t,r):a?a.value=r:e.set(t,r),r}function T(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function o(t){return"string"!=typeof t?[]:Array.from(t.matchAll(RegExp('(?.+?)<\\/d>',"gs"))).map(function(t){var e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:a(Number(e[1])),fontSize:Number(e[2]),color:"#".concat(Number(e[3]).toString(16)),timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function i(t){return fetch(t).then(function(t){return t.text()}).then(function(t){return o(t)})}n.defineInteropFlag(r),n.export(r,"getMode",function(){return a}),n.export(r,"bilibiliDanmuParseFromXml",function(){return o}),n.export(r,"bilibiliDanmuParseFromUrl",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fdr65:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return o});var a=t("@swc/helpers/_/_to_consumable_array");function o(t){var e=t.target,r=t.emits,n=t.clientWidth,o=t.clientHeight,i=t.marginBottom,u=t.marginTop,s=t.antiOverlap,l=r.filter(function(t){return t.mode===e.mode&&t.top<=o-i}).sort(function(t,e){return t.top-e.top});if(0===l.length)return u;l.unshift({top:0,left:0,right:0,height:u,width:n,speed:0,distance:n}),l.push({top:o-i,left:0,right:0,height:i,width:n,speed:0,distance:n});for(var c=1;c=e.height)return d}for(var m=[],h=1;ht.time)})});return v&&v[0]?v[0].top:void 0;case 1:return}else{switch(e.mode){case 0:m.sort(function(t,e){var r,n,o=(r=Math).min.apply(r,(0,a._)(e.map(function(t){return t.right}))),i=(n=Math).min.apply(n,(0,a._)(t.map(function(t){return t.right})));return o*e.length-i*t.length});break;case 1:m.sort(function(t,e){var r,n,o=(r=Math).max.apply(r,(0,a._)(e.map(function(t){return t.width})));return(n=Math).max.apply(n,(0,a._)(t.map(function(t){return t.width})))*t.length-o*e.length})}return m[0][0].top}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iwLF0:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",function(){return s}),n.export(r,"_",function(){return s});var a=t("./_array_without_holes.js"),o=t("./_iterable_to_array.js"),i=t("./_non_iterable_spread.js"),u=t("./_unsupported_iterable_to_array.js");function s(t){return(0,a._array_without_holes)(t)||(0,o._iterable_to_array)(t)||(0,u._unsupported_iterable_to_array)(t)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",function(){return o}),n.export(r,"_",function(){return o});var a=t("./_array_like_to_array.js");function o(t){if(Array.isArray(t))return(0,a._array_like_to_array)(t)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r')}),i=h(a,'
模式
滚动
静止
颜色
').concat(n.join(""),'
发送
')),u=v(".art-danmuku-style",i),s=v(".art-danmuku-input",i),l=v(".art-danmuku-send",i),c=v(".art-danmuku-style-panel-inner",i),p=v(".art-danmuku-style-panel-modes",i),d=v(".art-danmuku-style-panel-colors",i),g=r.mount||h(o,'
');t.option.backdrop&&m(c,"art-backdrop-filter"),r.theme&&m(i,"art-danmuku-theme-".concat(r.theme));var k=null,_=r.mode,x=r.color;function w(){var n={mode:_,color:x,border:!0,text:s.value.trim()};null===k&&r.beforeEmit(n)&&(s.value="",e.emit(n),m(l,"art-disabled"),function t(e){e<=0?(k=null,l.innerText="发送",f(l,"art-disabled")):(l.innerText=e,k=setTimeout(function(){return t(e-1)},1e3))}(r.lockTime),t.emit("artplayerPluginDanmuku:emit",n))}function j(){a.clientWidth0&&void 0!==arguments[0]?arguments[0]:[];if(s=null,l=null,u.innerHTML="",t.duration&&!t.option.isLive){var d={w:u.offsetWidth,h:u.offsetHeight},m={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"==typeof r&&Object.assign(m,r);var h=[];if(Array.isArray(f)&&f.length)h=(0,a._)(f);else for(var y=function(t){var r=e.danmus.filter(function(e){var r=e.time;return r>t*g&&r<=(t+m.sampling)*g}).length;h.push([t,r])},g=t.duration/d.w,v=0;v<=d.w;v+=m.sampling)y(v);if(0!==h.length){var b=h[h.length-1],k=b[0],_=b[1];k!==d.w&&h.push([d.w,_]);for(var x=h.map(function(t){return t[1]}),w=((c=Math).min.apply(c,(0,a._)(x))+(p=Math).max.apply(p,(0,a._)(x)))/2,D=0;Dw?1+m.scale:1-m.scale)+m.minHeight}var B=function(t,e,r,n){var a=i(e||t,r||t),u=o.map(Math.cos(a.angle)*m.flattening,0,1,1,0),s=a.angle*u+(n?Math.PI:0),l=a.length*m.smoothing;return[t[0]+Math.cos(s)*l,t[1]+Math.sin(s)*l]},O=function(t,e,r){var n=B(r[e-1],r[e-2],t),a=B(t,r[e-1],r[e+1],!0),o=e===r.length-1?" z":"";return"C ".concat(n[0],",").concat(n[1]," ").concat(a[0],",").concat(a[1]," ").concat(t[0],",").concat(t[1]).concat(o)},S=h.map(function(t){return[o.map(t[0],m.xMin,m.xMax,0,d.w),o.map(t[1],m.yMin,m.yMax,d.h,0)]}).reduce(function(t,e,r,n){return 0===r?"M ".concat(n[n.length-1][0],",").concat(d.h," L ").concat(e[0],",").concat(d.h," L ").concat(e[0],",").concat(e[1]):"".concat(t," ").concat(O(e,r,n))},"");u.innerHTML=''),s=n("#heatmap-start",u),l=n("#heatmap-stop",u),s.setAttribute("offset","".concat(100*t.played,"%")),l.setAttribute("offset","".concat(100*t.played,"%"))}}}t.on("video:timeupdate",function(){s&&l&&(s.setAttribute("offset","".concat(100*t.played,"%")),l.setAttribute("offset","".concat(100*t.played,"%")))}),t.on("setBar",function(t,e){s&&l&&"played"===t&&(s.setAttribute("offset","".concat(100*e,"%")),l.setAttribute("offset","".concat(100*e,"%")))}),t.on("ready",function(){return c()}),t.on("resize",function(){return c()}),t.on("artplayerPluginDanmuku:loaded",function(){return c()}),t.on("artplayerPluginDanmuku:points",function(t){return c(t)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); \ No newline at end of file +!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],s=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!s[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(u&&"string"==typeof e)return u(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=s[e]=new l.Module(e);t[e][0].call(p.exports,f,p,p.exports,this)}return s[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=s,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=5,"Artplayer.js@".concat(r," 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上"))}(e);var r=new(0,o.default)(e,t);return(0,s.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,c.env="production",c.version="5.0.1",c.build="2023-08-26 16:47:25","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"),s=n.interopDefault(i),u=t("@swc/helpers/src/_create_class.mjs"),l=n.interopDefault(u),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,s.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("85d40535eae5f839"))}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, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}},{key:"getReady",value:function(){var t=this.art.currentTime;return this.queue.filter((function(e){return"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1}))}},{key:"getEmits",value:function(){var t=this,e=[],r=this.$player.clientWidth,n=this.getLeft(this.$player);return this.filter("emit",(function(a){var o=a.$ref.offsetTop,i=t.getLeft(a.$ref)-n,s=a.$ref.clientHeight,u=a.$ref.clientWidth,l=i+u,c=r-l,p=l/a.$restTime,f={};f.top=o,f.left=i,f.height=s,f.width=u,f.right=c,f.speed=p,f.distance=l,f.time=a.$restTime,f.mode=a.mode,e.push(f)})),e}},{key:"getFontSize",value:function(t){var r=this.utils.clamp,n=this.$player.clientHeight;return"number"==typeof t?r(t,12,n):"string"==typeof t&&t.endsWith("%")?r(n*(parseFloat(t)/100),12,n):e.option.fontSize}},{key:"postMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this;return new Promise((function(r){if(e.option.useWorker&&e.worker&&e.worker.postMessage)t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var n=e.data;n.id===t.id&&r(n)};else{var n=(0,v.default)(t);r({top:n})}}))}},{key:"load",value:function(){var t=this;return(0,o.default)((function(){var e;return(0,h.default)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,8,,9]),"function"!=typeof t.option.danmuku?[3,2]:[4,t.option.danmuku()];case 1:return t.danmus=r.sent(),[3,7];case 2:return"function"!=typeof t.option.danmuku.then?[3,4]:[4,t.option.danmuku];case 3:return t.danmus=r.sent(),[3,7];case 4:return"string"!=typeof t.option.danmuku?[3,6]:[4,(0,y.bilibiliDanmuParseFromUrl)(t.option.danmuku)];case 5:return t.danmus=r.sent(),[3,7];case 6:t.danmus=t.option.danmuku,r.label=7;case 7:return t.utils.errorHandle(Array.isArray(t.danmus),"Danmuku need return an array as result"),t.art.emit("artplayerPluginDanmuku:loaded",t.danmus),t.queue=[],t.$danmuku.innerText="",t.danmus.forEach((function(e){return t.emit(e)})),[3,9];case 8:throw e=r.sent(),t.art.emit("artplayerPluginDanmuku:error",e),e;case 9:return[2,t]}}))}))()}},{key:"config",value:function(t){var r=this.utils.clamp;return this.option=Object.assign({},e.option,this.option,t),this.validator(this.option,e.scheme),this.option.speed=r(this.option.speed,1,10),this.option.opacity=r(this.option.opacity,0,1),this.option.lockTime=r(Math.floor(this.option.lockTime),0,60),this.option.maxLength=r(this.option.maxLength,0,500),this.option.minWidth=r(this.option.minWidth,0,500),this.option.maxWidth=r(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}},{key:"makeWait",value:function(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}},{key:"continue",value:function(){var t=this.$player.clientWidth;return this.filter("stop",(function(e){if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){var r=t+e.$ref.clientWidth;e.$ref.style.transform="translateX(".concat(-r,"px)"),e.$ref.style.transition="transform ".concat(e.$restTime,"s linear 0s")}})),this}},{key:"suspend",value:function(){var t=this,e=this.$player.clientWidth;return this.filter("emit",(function(r){if(r.$state="stop",0===r.mode){var n=e-(t.getLeft(r.$ref)-t.getLeft(t.$player));r.$ref.style.transform="translateX(".concat(-n,"px)"),r.$ref.style.transition="transform 0s linear 0s"}})),this}},{key:"reset",value:function(){var t=this;return this.queue.forEach((function(e){return t.makeWait(e)})),this}},{key:"update",value:function(){var t=this;return this.timer=window.requestAnimationFrame((0,o.default)((function(){var e,r,n,a,o,i,s,u,l;return(0,h.default)(this,(function(c){switch(c.label){case 0:if(!t.art.playing||t.isHide)return[3,4];t.filter("emit",(function(e){var r=(Date.now()-e.$lastStartTime)/1e3;e.$restTime-=r,e.$lastStartTime=Date.now(),e.$restTime<=0&&t.makeWait(e)})),e=t.getReady(),r=t.$player,n=r.clientWidth,a=r.clientHeight,o=0,c.label=1;case 1:return o=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i}function p(t,e){return function(r,n){e(r,n,t)}}function f(t,e,r,n,a,o){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!e&&t?n.static?t:t.prototype:null,p=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var m={};for(var h in n)m[h]="access"===h?{}:n[h];for(var h in n.access)m.access[h]=n.access[h];m.addInitializer=function(t){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(t||null))};var y=(0,r[d])("accessor"===u?{get:p.get,set:p.set}:p[l],m);if("accessor"===u){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(p.get=s),(s=i(y.set))&&(p.set=s),(s=i(y.init))&&a.push(s)}else(s=i(y))&&("field"===u?a.push(s):p[l]=s)}c&&Object.defineProperty(c,n.name,p),f=!0}function d(t,e,r){for(var n=arguments.length>2,a=0;a0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,a,o=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function x(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(r=a[t](e)).value instanceof C?Promise.resolve(r.value.v).then(u,l):c(o[0][2],r)}catch(t){c(o[0][3],t)}var r}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function O(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,a){e[n]=t[n]?function(e){return(r=!r)?{value:C(t[n](e)),done:!1}:a?a(e):e}:a}}function B(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=k(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,a){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,a,(e=t[r](e)).done,e.value)}))}}}function A(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var $=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function F(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&b(e,t,r);return $(e,t),e}function P(t){return t&&t.__esModule?t:{default:t}}function W(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function T(t,e,r,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(t,r):a?a.value=r:e.set(t,r),r}function M(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},{"@swc/helpers/src/_type_of.mjs":"78qx0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"78qx0":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return a._}));var a=t("../esm/_type_of.js")},{"../esm/_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_type_of",(function(){return a})),n.export(r,"_",(function(){return a}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function o(t){if("string"!=typeof t)return[];var e=t.matchAll(RegExp('(?.+?)<\\/d>',"gs"));return Array.from(e).map((function(t){var e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:a(Number(e[1])),fontSize:Number(e[2]),color:"#".concat(Number(e[3]).toString(16)),timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null})).filter(Boolean)}function i(t){return fetch(t).then((function(t){return t.text()})).then((function(t){return o(t)}))}n.defineInteropFlag(r),n.export(r,"getMode",(function(){return a})),n.export(r,"bilibiliDanmuParseFromXml",(function(){return o})),n.export(r,"bilibiliDanmuParseFromUrl",(function(){return i}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fdr65:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var a=t("@swc/helpers/src/_to_consumable_array.mjs"),o=n.interopDefault(a);r.default=function(t){var e=t.target,r=t.emits,n=t.clientWidth,a=t.clientHeight,i=t.marginBottom,s=t.marginTop,u=t.antiOverlap,l=r.filter((function(t){return t.mode===e.mode&&t.top<=a-i})).sort((function(t,e){return t.top-e.top}));if(0===l.length)return s;l.unshift({top:0,left:0,right:0,height:s,width:n,speed:0,distance:n}),l.push({top:a-i,left:0,right:0,height:i,width:n,speed:0,distance:n});for(var c=1;c=e.height)return d}for(var m=[],h=1;ht.time)}))}));return v&&v[0]?v[0].top:void 0;case 1:return}}},{"@swc/helpers/src/_to_consumable_array.mjs":"inwWM","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],inwWM:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return a._}));var a=t("../esm/_to_consumable_array.js")},{"../esm/_to_consumable_array.js":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iwLF0:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",(function(){return u})),n.export(r,"_",(function(){return u}));var a=t("./_array_without_holes.js"),o=t("./_iterable_to_array.js"),i=t("./_non_iterable_spread.js"),s=t("./_unsupported_iterable_to_array.js");function u(t){return(0,a._array_without_holes)(t)||(0,o._iterable_to_array)(t)||(0,s._unsupported_iterable_to_array)(t)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",(function(){return o})),n.export(r,"_",(function(){return o}));var a=t("./_array_like_to_array.js");function o(t){if(Array.isArray(t))return(0,a._array_like_to_array)(t)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r')})),i=h(a,'
模式
滚动
静止
颜色
').concat(n.join(""),'
发送
')),s=v(".art-danmuku-style",i),u=v(".art-danmuku-input",i),l=v(".art-danmuku-send",i),c=v(".art-danmuku-style-panel-inner",i),p=v(".art-danmuku-style-panel-modes",i),d=v(".art-danmuku-style-panel-colors",i),g=r.mount||h(o,'
');t.option.backdrop&&m(c,"art-backdrop-filter"),r.theme&&m(i,"art-danmuku-theme-".concat(r.theme));var _=null,k=r.mode,w=r.color;function x(t){t<=0?(_=null,l.innerText="发送",f(l,"art-disabled")):(l.innerText=t,_=setTimeout((function(){return x(t-1)}),1e3))}function D(){var n={mode:k,color:w,border:!0,text:u.value.trim()};null===_&&r.beforeEmit(n)&&(u.value="",e.emit(n),m(l,"art-disabled"),x(r.lockTime),t.emit("artplayerPluginDanmuku:emit",n))}function C(){a.clientWidth0&&void 0!==arguments[0]?arguments[0]:[];if(s=null,u=null,a.innerHTML="",t.duration&&!t.option.isLive){var f={w:a.offsetWidth,h:a.offsetHeight},d={xMin:0,xMax:f.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*f.h),sampling:Math.floor(f.w/100),smoothing:.2,flattening:.2};"object"==typeof r&&Object.assign(d,r);var m=[];if(Array.isArray(p)&&p.length)m=(0,o.default)(p);else for(var h=function(t){var r=e.danmus.filter((function(e){var r=e.time;return r>t*y&&r<=(t+d.sampling)*y})).length;m.push([t,r])},y=t.duration/f.w,g=0;g<=f.w;g+=d.sampling)h(g);if(0!==m.length){var v=m[m.length-1],b=v[0],_=v[1];b!==f.w&&m.push([f.w,_]);for(var k=m.map((function(t){return t[1]})),w=((l=Math).min.apply(l,(0,o.default)(k))+(c=Math).max.apply(c,(0,o.default)(k)))/2,x=0;xw?1+d.scale:1-d.scale)+d.minHeight}var C=function(t,e,r,n){var a,o,s,u,l=(a=e||t,s=(o=r||t)[0]-a[0],u=o[1]-a[1],{length:Math.sqrt(Math.pow(s,2)+Math.pow(u,2)),angle:Math.atan2(u,s)}),c=i(Math.cos(l.angle)*d.flattening,0,1,1,0),p=l.angle*c+(n?Math.PI:0),f=l.length*d.smoothing;return[t[0]+Math.cos(p)*f,t[1]+Math.sin(p)*f]},S=m.map((function(t){return[i(t[0],d.xMin,d.xMax,0,f.w),i(t[1],d.yMin,d.yMax,f.h,0)]})).reduce((function(t,e,r,n){return 0===r?"M ".concat(n[n.length-1][0],",").concat(f.h," L ").concat(e[0],",").concat(f.h," L ").concat(e[0],",").concat(e[1]):"".concat(t," ").concat(function(t,e,r){var n=C(r[e-1],r[e-2],t),a=C(t,r[e-1],r[e+1],!0),o=e===r.length-1?" z":"";return"C ".concat(n[0],",").concat(n[1]," ").concat(a[0],",").concat(a[1]," ").concat(t[0],",").concat(t[1]).concat(o)}(e,r,n))}),"");a.innerHTML=''),s=n("#heatmap-start",a),u=n("#heatmap-stop",a),s.setAttribute("offset","".concat(100*t.played,"%")),u.setAttribute("offset","".concat(100*t.played,"%"))}}}t.on("video:timeupdate",(function(){s&&u&&(s.setAttribute("offset","".concat(100*t.played,"%")),u.setAttribute("offset","".concat(100*t.played,"%")))})),t.on("setBar",(function(t,e){s&&u&&"played"===t&&(s.setAttribute("offset","".concat(100*e,"%")),u.setAttribute("offset","".concat(100*e,"%")))})),t.on("ready",(function(){return l()})),t.on("resize",(function(){return l()})),t.on("artplayerPluginDanmuku:loaded",(function(){return l()})),t.on("artplayerPluginDanmuku:points",(function(t){return l(t)}))}})}},{"@swc/helpers/src/_to_consumable_array.mjs":"inwWM","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-dash-quality.js b/docs/compiled/artplayer-plugin-dash-quality.js index e8d19590e..7556338b4 100644 --- a/docs/compiled/artplayer-plugin-dash-quality.js +++ b/docs/compiled/artplayer-plugin-dash-quality.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -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;sa);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),r=o[0],i=o[1]/100;n(r+i>=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"}}}a.env="production",a.version="2.0.0",a.build="2023-08-26 13:44:37","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=''},{}],"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"); \ No newline at end of file +!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],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 r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(a)return a(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 o=e[t][1][n];return null!=o?o:n},c.cache={};var f=u[t]=new d.Module(t);e[t][0].call(f.exports,c,f,f.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=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{!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",u=e.title||"Quality",l=r.getBitrateInfoListFor("video"),d=r.getQualityFor("video"),s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=r.getSettings(),c=l[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:l.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:u,icon:i.default,width:200,selector:l.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,a.env="production",a.version="2.0.0",a.build="2023-08-26 16:47:24","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=''},{}],"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"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-dash-quality.legacy.js b/docs/compiled/artplayer-plugin-dash-quality.legacy.js index 61a718c7a..3f8521b81 100644 --- a/docs/compiled/artplayer-plugin-dash-quality.legacy.js +++ b/docs/compiled/artplayer-plugin-dash-quality.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(u)return u(t,!0);// Try the node require function if it exists. -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=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(),v=f[c],g=(null==h?void 0:null===(n=h.streaming)||void 0===n?void 0:null===(o=n.abr)||void 0===o?void 0:null===(r=o.autoSwitchBitrate)||void 0===r?void 0:r.video)?d:p(v),m={streaming:{abr:{autoSwitchBitrate:{}}}};e.control&&t.controls.update({name:"dash-quality",position:"right",html:g,style:{padding:"0 10px"},selector:f.map(function(e,t){return{html:p(e),level:t,default:v===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:g,html:s,icon:i.default,width:200,selector:f.map(function(e,t){return{html:p(e),level:t,default:v===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"}}}u.env="production",u.version="2.0.0",u.build="2023-08-26 13:44:38","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=''},{}],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"); \ No newline at end of file +!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=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,u.env="production",u.version="2.0.0",u.build="2023-08-26 16:47:25","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=''},{}],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"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-hls-quality.js b/docs/compiled/artplayer-plugin-hls-quality.js index 4a8b67400..d751689c8 100644 --- a/docs/compiled/artplayer-plugin-hls-quality.js +++ b/docs/compiled/artplayer-plugin-hls-quality.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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 f(t,n){if(!u[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -if(s&&"string"==typeof t)return s(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}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 l[o]}}),l[o]=f;for(var a=0;ai);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{!function(e){let{version:t,utils:{errorHandle:n}}=e.constructor,o=t.split(".").map(Number),r=o[0],l=o[1]/100;n(r+l>=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 r(){let r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');let i=e.auto||"Auto",u=e.title||"Quality",s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=r.levels[r.currentLevel],a=f?s(f):i;e.control&&t.controls.update({name:"hls-quality",position:"right",html:a,style:{padding:"0 10px"},selector:r.levels.map((e,t)=>({html:s(e),level:e.level||t,default:f===e})),onSelect:e=>(r.currentLevel=e.level,t.loading.show=!0,e.html)}),e.setting&&t.setting.update({name:"hls-quality",tooltip:a,html:u,icon:l.default,width:200,selector:r.levels.map((e,t)=>({html:s(e),level:e.level||t,default:f===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"}}}i.env="production",i.version="2.0.0",i.build="2023-08-26 13:44:35","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=''},{}],"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"); \ No newline at end of file +!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{!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,i.env="production",i.version="2.0.0",i.build="2023-08-26 16:47:24","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=''},{}],"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"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-hls-quality.legacy.js b/docs/compiled/artplayer-plugin-hls-quality.legacy.js index c4f5a430d..7430877a7 100644 --- a/docs/compiled/artplayer-plugin-hls-quality.legacy.js +++ b/docs/compiled/artplayer-plugin-hls-quality.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,r,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof l[r]&&l[r];if(!n&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -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=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"}}}i.env="production",i.version="2.0.0",i.build="2023-08-26 13:44:36","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=''},{}],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"); \ No newline at end of file +!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=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,i.env="production",i.version="2.0.0",i.build="2023-08-26 16:47:24","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=''},{}],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"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-iframe.js b/docs/compiled/artplayer-plugin-iframe.js index 7ce95407e..c0318a224 100644 --- a/docs/compiled/artplayer-plugin-iframe.js +++ b/docs/compiled/artplayer-plugin-iframe.js @@ -4,23 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,s){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var s="function"==typeof o[n]&&o[n];if(!r&&s)return s(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -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;lnull,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":"9pCYc"}],"9pCYc":[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})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0"); \ No newline at end of file +!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;cnull,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"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-iframe.legacy.js b/docs/compiled/artplayer-plugin-iframe.legacy.js index f2e592210..c1e9d3087 100644 --- a/docs/compiled/artplayer-plugin-iframe.legacy.js +++ b/docs/compiled/artplayer-plugin-iframe.legacy.js @@ -4,34 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */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||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!c[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -if(s&&"string"==typeof t)return s(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 u.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?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=c,u.parent=a,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 f=0;ft.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function f(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",f=!t&&e?n.static?e:e.prototype:null,l=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,r[d])("accessor"===s?{get:l.get,set:l.set}:l[u],y);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=a(m.get))&&(l.get=c),(c=a(m.set))&&(l.set=c),(c=a(m.init))&&o.push(c)}else(c=a(m))&&("field"===s?o.push(c):l[u]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],t=0;t1||c(e,t)})})}function c(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(s,u):f(i[0][2],r)}catch(e){f(i[0][3],e)}}function s(e){c("next",e)}function u(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function M(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return I(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function F(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function A(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function C(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["akNoT"],"akNoT","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,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 u(r,t){if(!i[r]){if(!e[r]){var o="function"==typeof s[n]&&s[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(c&&"string"==typeof r)return c(r);var f=new 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=i[r]=new u.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return i[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=i,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return s[n]}}),s[n]=u;for(var f=0;f=0;i--)(o=e[i])&&(a=(s<3?o(a):s>3?o(r,t,a):o(r,t))||a);return s>3&&a&&Object.defineProperty(r,t,a),a}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,t[d])("accessor"===c?{get:l.get,set:l.set}:l[u],y);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(i=a(m.get))&&(l.get=i),(i=a(m.set))&&(l.set=i),(i=a(m.init))&&o.push(i)}else(i=a(m))&&("field"===c?o.push(i):l[u]=i)}f&&Object.defineProperty(f,n.name,l),p=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,s=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],r=0;r1||i(e,r)}))})}function i(e,r){try{(t=o[e](r)).value instanceof E?Promise.resolve(t.value.v).then(c,u):f(s[0][2],t)}catch(e){f(s[0][3],e)}var t}function c(e){i("next",e)}function u(e){i("throw",e)}function f(e,r){e(r),s.shift(),s.length&&i(s[0][0],s[0][1])}}function k(e){var r,t;return r={},n("next"),n("throw",(function(e){throw e})),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:E(e[n](r)),done:!1}:o?o(r):r}:o}}function M(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=j(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise((function(n,o){(function(e,r,t,n){Promise.resolve(n).then((function(r){e({value:r,done:t})}),r)})(n,o,(r=e[t](r)).done,r.value)}))}}}function T(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var D=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function S(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&w(r,e,t);return D(r,e),r}function F(e){return e&&e.__esModule?e:{default:e}}function W(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function C(e,r,t,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function A(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}},{"@swc/helpers/src/_type_of.mjs":"78qx0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"78qx0":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"default",(function(){return o._}));var o=e("../esm/_type_of.js")},{"../esm/_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_type_of",(function(){return o})),n.export(t,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["akNoT"],"akNoT","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-plugin-vtt-thumbnail.js b/docs/compiled/artplayer-plugin-vtt-thumbnail.js index 0da2874f2..3fb59673b 100644 --- a/docs/compiled/artplayer-plugin-vtt-thumbnail.js +++ b/docs/compiled/artplayer-plugin-vtt-thumbnail.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,r,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -if(f&&"string"==typeof t)return f(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}p.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},p.cache={};var d=u[t]=new a.Module(t);e[t][0].call(d.exports,p,d,d.exports,this)}return u[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=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;sl);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"}}}l.env="production",l.version="1.0.0",l.build="2023-08-26 13:44:31","undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[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(),n=t.split(/[\n\r]/gm).filter(e=>e.trim()),r=[];for(let t=1;t ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,s=l.match(a),d=Math.floor(o(f[1])),p=Math.floor(o(f[2])),c=e.split("/");c.pop(),c.push(s[1]);let h=c.join("/"),m={start:d,end:p,url:h},g=s[2].split(""),y=s[3].split(",");for(let e=0;ei)},{"@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"); \ No newline at end of file +!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{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,l.env="production",l.version="1.0.0",l.build="2023-08-26 16:47:22","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 ?)((?:[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])),p=e.split("/");p.pop(),p.push(a[1]);const h={start:c,end:d,url:p.join("/")},m=a[2].split(""),g=a[3].split(",");for(let e=0;e numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */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],c=u.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!c[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(u)return u(t,!0);// Try the node require function if it exists. -if(a&&"string"==typeof t)return a(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 s=c[t]=new f.Module(t);e[t][0].call(s.exports,p,s,s.exports,this)}return c[t].exports;function p(e){var t=p.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=c,f.parent=u,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return i[n]}}),i[n]=f;for(var l=0;l=e.start&&c<=e.end}))?(n(e,"backgroundImage","url(".concat(s.url,")")),n(e,"height","".concat(s.h,"px")),n(e,"width","".concat(s.w,"px")),n(e,"backgroundPosition","-".concat(s.x,"px -").concat(s.y,"px")),f<=s.w/2?n(e,"left",0):f>a.clientWidth-s.w/2?n(e,"left","".concat(a.clientWidth-s.w,"px")):n(e,"left","".concat(f-s.w/2,"px")),[2]):[2,n(e,"display","none")]})}),function(e){return r.apply(this,arguments)})),f(a,"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)}}a.env="production",a.version="1.0.0",a.build="2023-08-26 13:44:32","undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=a)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","./getVttArray":"iUpz3","@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,u){try{var c=e[i](u),a=c.value}catch(e){r(e);return}c.done?t(a):Promise.resolve(a).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var u=e.apply(t,r);function c(e){o(u,n,i,c,a,"next",e)}function a(e){o(u,n,i,c,a,"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||"__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})}},{}],"6Xyd0":[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:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** *//* global Reflect, Promise */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return u}),n.export(r,"__assign",function(){return c}),n.export(r,"__rest",function(){return a}),n.export(r,"__decorate",function(){return f}),n.export(r,"__param",function(){return l}),n.export(r,"__esDecorate",function(){return s}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return y}),n.export(r,"__metadata",function(){return h}),n.export(r,"__awaiter",function(){return _}),n.export(r,"__generator",function(){return v}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return g}),n.export(r,"__read",function(){return w}),/** @deprecated */n.export(r,"__spread",function(){return x}),/** @deprecated */n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return O}),n.export(r,"__await",function(){return P}),n.export(r,"__asyncGenerator",function(){return S}),n.export(r,"__asyncDelegator",function(){return T}),n.export(r,"__asyncValues",function(){return I}),n.export(r,"__makeTemplateObject",function(){return E}),n.export(r,"__importStar",function(){return F}),n.export(r,"__importDefault",function(){return M}),n.export(r,"__classPrivateFieldGet",function(){return W}),n.export(r,"__classPrivateFieldSet",function(){return k}),n.export(r,"__classPrivateFieldIn",function(){return N});var o=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function f(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function s(e,t,r,n,o,i){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,a=n.kind,f="getter"===a?"get":"setter"===a?"set":"value",l=!t&&e?n.static?e:e.prototype:null,s=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(u(e||null))};var _=(0,r[d])("accessor"===a?{get:s.get,set:s.set}:s[f],y);if("accessor"===a){if(void 0===_)continue;if(null===_||"object"!=typeof _)throw TypeError("Object expected");(c=u(_.get))&&(s.get=c),(c=u(_.set))&&(s.set=c),(c=u(_.init))&&o.push(c)}else(c=u(_))&&("field"===a?o.push(c):s[f]=c)}l&&Object.defineProperty(l,n.name,s),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function x(){for(var e=[],t=0;t1||c(e,t)})})}function c(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(a,f):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function a(e){c("next",e)}function f(e){c("throw",e)}function l(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var D=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return D(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function W(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iUpz3:[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");function u(e){var t,r,n,o=e.split("."),i=o[0].split(":")||[],u=Number((t=o[1]||"0",r=3,n="0",t.length>r?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+u}function c(){return a.apply(this,arguments)}function a(){return(a=(0,o._)(function(){var e,t,r,n,o,c,a,f,l,s,p,d,y,h,_,v,m,b=arguments;return(0,i._)(this,function(i){switch(i.label){case 0:return e=b.length>0&&void 0!==b[0]?b[0]:"",[4,fetch(e)];case 1:return[4,i.sent().text()];case 2:for(n=1,t=i.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=o.match(a),l=/(.*)#(\w{4})=(.*)/i,s=c.match(l),p=Math.floor(u(f[1])),d=Math.floor(u(f[2])),(y=e.split("/")).pop(),y.push(s[1]),h={start:p,end:d,url:y.join("/")},_=s[2].split(""),v=s[3].split(","),m=0;m<_.length;m++)h[_[m]]=v[m];r.push(h)}return[2,r]}})})).apply(this,arguments)}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["2Oq25"],"2Oq25","parcelRequire4dc0"); \ No newline at end of file +!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],c=u.cache||{},a="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(u)return u(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}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=u,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=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")),s<=f.w/2?o(e,"left",0):s>a.clientWidth-f.w/2?o(e,"left","".concat(a.clientWidth-f.w,"px")):o(e,"left","".concat(s-f.w/2,"px")),[2]):[2,o(e,"display","none")]}))}));return function(e){return r.apply(this,arguments)}}()),f(a,"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,f.env="production",f.version="1.0.0",f.build="2023-08-26 16:47:23","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){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_async_to_generator.js")},{"../esm/_async_to_generator.js":"eONSn","@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,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var u=e.apply(t,r);function c(e){o(u,n,i,c,a,"next",e)}function a(e){o(u,n,i,c,a,"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||"__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._}));var o=e("../esm/_ts_generator.js")},{"../esm/_ts_generator.js":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",(function(){return o.__generator})),n.export(r,"_ts_generator",(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 c})),n.export(r,"__assign",(function(){return a})),n.export(r,"__rest",(function(){return s})),n.export(r,"__decorate",(function(){return f})),n.export(r,"__param",(function(){return l})),n.export(r,"__esDecorate",(function(){return p})),n.export(r,"__runInitializers",(function(){return d})),n.export(r,"__propKey",(function(){return y})),n.export(r,"__setFunctionName",(function(){return h})),n.export(r,"__metadata",(function(){return m})),n.export(r,"__awaiter",(function(){return _})),n.export(r,"__generator",(function(){return v})),n.export(r,"__createBinding",(function(){return b})),n.export(r,"__exportStar",(function(){return g})),n.export(r,"__values",(function(){return w})),n.export(r,"__read",(function(){return j})),n.export(r,"__spread",(function(){return x})),n.export(r,"__spreadArrays",(function(){return O})),n.export(r,"__spreadArray",(function(){return P})),n.export(r,"__await",(function(){return S})),n.export(r,"__asyncGenerator",(function(){return D})),n.export(r,"__asyncDelegator",(function(){return I})),n.export(r,"__asyncValues",(function(){return T})),n.export(r,"__makeTemplateObject",(function(){return E})),n.export(r,"__importStar",(function(){return W})),n.export(r,"__importDefault",(function(){return M})),n.export(r,"__classPrivateFieldGet",(function(){return k})),n.export(r,"__classPrivateFieldSet",(function(){return C})),n.export(r,"__classPrivateFieldIn",(function(){return q}));var o=e("@swc/helpers/src/_type_of.mjs"),i=n.interopDefault(o),u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},u(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;c--)(o=e[c])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,i){function u(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,a=n.kind,s="getter"===a?"get":"setter"===a?"set":"value",f=!t&&e?n.static?e:e.prototype:null,l=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(u(e||null))};var m=(0,r[d])("accessor"===a?{get:l.get,set:l.set}:l[s],y);if("accessor"===a){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(c=u(m.get))&&(l.get=c),(c=u(m.set))&&(l.set=c),(c=u(m.init))&&o.push(c)}else(c=u(m))&&("field"===a?o.push(c):l[s]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function x(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(a,s):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function a(e){c("next",e)}function s(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function W(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return F(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function q(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/src/_type_of.mjs":"78qx0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"78qx0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_type_of.js")},{"../esm/_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iUpz3:[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"),c=n.interopDefault(u);function a(e){var t,r,n,o=e.split("."),i=o[0].split(":")||[],u=(t=o[1]||"0",r=3,n="0",t.length>r?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))),c=Number(u)/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+c}function s(){return s=(0,i.default)((function(){var e,t,r,n,o,i,u,s,f,l,p,d,y,h,m,_,v,b,g,w=arguments;return(0,c.default)(this,(function(c){switch(c.label){case 0:return e=w.length>0&&void 0!==w[0]?w[0]:"",[4,fetch(e)];case 1:return[4,c.sent().text()];case 2:for(t=c.sent(),r=t.split(/[\n\r]/gm).filter((function(e){return e.trim()})),n=[],o=1;o ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(s),l=/(.*)#(\w{4})=(.*)/i,p=u.match(l),d=Math.floor(a(f[1])),y=Math.floor(a(f[2])),(h=e.split("/")).pop(),h.push(p[1]),m=h.join("/"),_={start:d,end:y,url:m},v=p[2].split(""),b=p[3].split(","),g=0;g numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,i,n,o){/* eslint-disable no-undef */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||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(s)return s(t,!0);// Try the node require function if it exists. -if(a&&"string"==typeof t)return a(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 h.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?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r[n]}}),r[n]=h;for(var d=0;d{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(),a=l.getContext("2d");this.emit("canvas",l);let h=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{a.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)(h).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({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");let e=document.createElement("a"),t=`${(0,s.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",l.ondragover),this.option.fileInput.removeEventListener("drop",l.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=l,window.ArtplayerToolThumbnail=l},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(e,t,i){let n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){let n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){let i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e))}function r(e){return e.reduce((e,t)=>e.then(t),Promise.resolve())}function s(e){let t=e.split(".");return t.pop(),t.join(".")}function l(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}n.defineInteropFlag(i),n.export(i,"sleep",()=>o),n.export(i,"runPromisesInSeries",()=>r),n.export(i,"getFileName",()=>s),n.export(i,"clamp",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0"); \ No newline at end of file +!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{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({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCanvas(){const{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");const e=document.createElement("a"),t=`${(0,s.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),new Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",l.ondragover),this.option.fileInput.removeEventListener("drop",l.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=l,window.ArtplayerToolThumbnail=l},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);i.default=class{on(e,t,i){const n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){const i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e)))}function r(e){return e.reduce(((e,t)=>e.then(t)),Promise.resolve())}function s(e){const t=e.split(".");return t.pop(),t.join(".")}function l(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}n.defineInteropFlag(i),n.export(i,"sleep",(()=>o)),n.export(i,"runPromisesInSeries",(()=>r)),n.export(i,"getFileName",(()=>s)),n.export(i,"clamp",(()=>l))},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0"); \ No newline at end of file diff --git a/docs/compiled/artplayer-tool-thumbnail.legacy.js b/docs/compiled/artplayer-tool-thumbnail.legacy.js index 94c4de130..56d5fff17 100644 --- a/docs/compiled/artplayer-tool-thumbnail.legacy.js +++ b/docs/compiled/artplayer-tool-thumbnail.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(s)return s(t,!0);// Try the node require function if it exists. -if(l&&"string"==typeof t)return l(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 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;c0&&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=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,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(),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.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",t.message),t})}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,i=e.begin,s=this.duration/t,a=[i+s];a.length1?t-1:0),n=1;n0&&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,s.default)(e)),e.ondrop=e.ondrop.bind((0,s.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,c.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,s=r.width,i=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,_.clamp)(o,10,1e3),this.option.width=(0,_.clamp)(s,10,1e3),this.option.column=(0,_.clamp)(i,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,_.sleep)(1e3).then((function(){return e.start()}));var t=this.option,r=t.width,n=t.number,o=t.begin,s=t.end,i=this.video.videoHeight/this.video.videoWidth*r;this.option.height=i,this.option.begin=(0,_.clamp)(o,0,this.video.duration),this.option.end=(0,_.clamp)(s||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(),c=l.getContext("2d");this.emit("canvas",l);var u=a.map((function(t,o){return function(){return new Promise((function(s){e.video.oncanplay=function(){c.drawImage(e.video,t.x,t.y,r,i),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.oncanplay=null,s()}))},e.video.currentTime=t.time}))}}));return this.processing=!0,(0,_.runPromisesInSeries)(u).then((function(){e.processing=!1,e.emit("done")})).catch((function(t){throw e.processing=!1,e.emit("error",t.message),t}))}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,s=e.begin,i=this.duration/t,a=[s+i];a.length1?t-1:0),n=1;n numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,a,o){/* eslint-disable no-undef */var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof i[a]&&i[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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[a]&&i[a];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(n)return n(t,!0);// Try the node require function if it exists. -if(l&&"string"==typeof t)return l(t);var p=Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.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 i[a]}}),i[a]=c;for(var p=0;pt.call(this,this)),X.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+X.version),e("Env@"+X.env),e("Build@"+X.build);for(let t=0;te("Event@"+t.type))}Z.push(this)}static get instances(){return Z}static get version(){return"5.1.0"}static get env(){return"production"}static get build(){return"2023-08-26 13:44:46"}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:{},escape:!0,encoding:"utf-8",onVttLoad:e=>e},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(e=!0){this.events.destroy(),this.template.destroy(e),Z.splice(Z.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(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.SCROLL_TIME=200,X.SCROLL_GAP=50,X.AUTO_PLAYBACK_MAX=10,X.AUTO_PLAYBACK_MIN=5,X.AUTO_PLAYBACK_TIMEOUT=3e3,X.RECONNECT_TIME_MAX=5,X.RECONNECT_SLEEP_TIME=1e3,X.CONTROL_HIDE_TIME=3e3,X.DBCLICK_TIME=300,X.DBCLICK_FULLSCREEN=!0,X.MOBILE_DBCLICK_PLAY=!0,X.MOBILE_CLICK_PLAY=!1,X.AUTO_ORIENTATION_TIME=200,X.INFO_LOOP_TIME=1e3,X.FAST_FORWARD_VALUE=3,X.FAST_FORWARD_TIME=1e3,X.TOUCH_MOVE_RATIO=.5,X.VOLUME_STEP=.1,X.SEEK_STEP=5,X.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],X.ASPECT_RATIO=["default","4:3","16:9"],X.FLIP=["normal","horizontal","vertical"],X.FULLSCREEN_WEB_IN_BODY=!1,X.LOG_VERSION=!0,X.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){let e=p.createElement("style");e.id="artplayer-style",e.textContent=i.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.Artplayer=X),setTimeout(()=>{X.LOG_VERSION&&console.log(`%c ArtPlayer %c ${X.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")})},{"bundle-text:./style/index.less":"0016T","option-validator":"bAWi2","./utils/emitter":"66mFZ","./utils":"71aH7","./scheme":"AKEiO","./config":"lyjeQ","./template":"X13Zf","./i18n":"3jKkj","./player":"a90nx","./control":"8Z0Uf","./contextmenu":"2KYsr","./info":"02ajl","./subtitle":"eSWto","./events":"jo4S1","./hotkey":"6NoFy","./layer":"6G6hZ","./loading":"3dsEe","./notice":"dWGTw","./mask":"5POkG","./icons":"6OeNg","./setting":"3eYNH","./storage":"2aaJe","./plugins":"8MTUM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"0016T":[function(e,t,r){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#fff3;--art-hover-color:#ffffff80;--art-loaded-color:#fff3;--art-loop-color:#ffffffbf;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-loop-width:2px;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#00000080;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{width:100%;height:100%;zoom:1;text-align:left;direction:ltr;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;width:100%;height:100%;cursor:pointer;position:absolute;inset:0}.art-poster{z-index:11;width:100%;height:100%;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;width:100%;height:100%;opacity:0;pointer-events:none;justify-content:flex-end;gap:var(--art-bottom-gap);padding:0 var(--art-padding);transition:opacity var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;width:100%;height:100%;width:0%;background-color:var(--art-hover-color);display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;width:100%;height:100%;width:0%;background-color:var(--art-loaded-color);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;width:100%;height:100%;width:0%;background-color:var(--art-theme);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;width:100%;height:100%;pointer-events:auto;width:var(--art-highlight-width);transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;bottom:10px;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom .art-progress .art-control-loop{z-index:0;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-loop .art-loop-point{z-index:0;width:100%;height:100%;width:var(--art-loop-width);background-color:var(--art-loop-color);transform:translateX(calc(var(--art-loop-width)/-2))scaleY(1.5);position:absolute;inset:0 0 0 0%}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{height:100%;flex:1;justify-content:center;align-items:center;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{height:100%;width:100%;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{width:100%;cursor:pointer;flex:1;justify-content:center;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{width:2px;border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;width:100%;height:100%;background-color:var(--art-theme);position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);transform-origin:100% 100%;max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transform:scale(var(--art-settings-scale));transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{min-width:32px;height:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{height:3px;width:80px;appearance:none;background-color:#fff3;outline:none}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{width:250px;text-overflow:ellipsis;white-space:nowrap;user-select:all;overflow:hidden}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;width:320px;height:180px;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;width:100%;height:100%;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-mini-progress-bar{z-index:0;width:100%;height:100%;height:var(--art-mini-progress-height);background-color:var(--art-theme);display:flex;position:absolute;inset:auto 0 0}.art-video-player .art-layer-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-lock .art-layer-mini-progress-bar{display:flex!important}.art-video-player.art-control-show .art-layer-mini-progress-bar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{width:100%;flex-shrink:0;justify-content:center;align-items:center;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000001;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(e,t,r){t.exports=function(){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if("function"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2i),a.export(r,"queryAll",()=>n),a.export(r,"addClass",()=>s),a.export(r,"removeClass",()=>l),a.export(r,"hasClass",()=>c),a.export(r,"append",()=>p),a.export(r,"remove",()=>u),a.export(r,"setStyle",()=>d),a.export(r,"setStyles",()=>f),a.export(r,"getStyle",()=>h),a.export(r,"sublings",()=>m),a.export(r,"inverseClass",()=>g),a.export(r,"tooltip",()=>v),a.export(r,"isInViewport",()=>y),a.export(r,"includeFromEvent",()=>b),a.export(r,"replaceElement",()=>x),a.export(r,"createElement",()=>w),a.export(r,"getIcon",()=>j);var o=e("./compatibility");function i(e,t=document){return t.querySelector(e)}function n(e,t=document){return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function p(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild??e.lastChild}function u(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function f(e,t){for(let r in t)d(e,r,t[r]);return e}function h(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}function m(e){return Array.from(e.parentElement.children).filter(t=>t!==e)}function g(e,t){m(e).forEach(e=>l(e,t)),s(e,t)}function v(e,t,r="top"){o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function y(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight??document.documentElement.clientHeight,o=window.innerWidth??document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function j(e="",t=""){let r=w("i");return s(r,"art-icon"),s(r,`art-icon-${e}`),p(r,t),r}},{"./compatibility":"6ZTr6","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6ZTr6":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"userAgent",()=>o),a.export(r,"isSafari",()=>i),a.export(r,"isWechat",()=>n),a.export(r,"isIE",()=>s),a.export(r,"isAndroid",()=>l),a.export(r,"isIOS",()=>c),a.export(r,"isIOS13",()=>p),a.export(r,"isMobile",()=>u);let o="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(o),n=/MicroMessenger/i.test(o),s=/MSIE|Trident/i.test(o),l=/android/i.test(o),c=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,p=c??(o.includes("Macintosh")&&navigator.maxTouchPoints>=1),u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)??p},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hwmZz:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ArtPlayerError",()=>o),a.export(r,"errorHandle",()=>i);class o extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t??this.constructor),this.name="ArtPlayerError"}}function i(e,t){if(!e)throw new o(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],inzwq:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"))}function i(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function n(e){let t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;// eslint-disable-next-line no-nested-ternary -return 0===t?e:t===r.length-1?`.${e}`:`:${e}`}).join("")}return`WEBVTT - -${e.split(/\r?\n/).map(e=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(e=>e.trim()).join("\n")}:null}).filter(e=>e).map((e,t)=>e?`${t+1} -${e.start} --> ${e.end} -${e.text}`:"").filter(e=>e.trim()).join("\n\n")}`}a.defineInteropFlag(r),a.export(r,"srtToVtt",()=>o),a.export(r,"vttToBlob",()=>i),a.export(r,"assToVtt",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6b7Ip":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}a.defineInteropFlag(r),a.export(r,"getExt",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),a.export(r,"download",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5NSdr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"def",()=>o),a.export(r,"has",()=>n),a.export(r,"get",()=>s),a.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let o=Object.defineProperty,{hasOwnProperty:i}=Object.prototype;function n(e,t){return i.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],epmNy:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e=0){return new Promise(t=>setTimeout(t,e))}function i(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function n(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}a.defineInteropFlag(r),a.export(r,"sleep",()=>o),a.export(r,"debounce",()=>i),a.export(r,"throttle",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gapRl:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function n(e){return["string","number"].includes(typeof e)}function s(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function l(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]??e)}a.defineInteropFlag(r),a.export(r,"clamp",()=>o),a.export(r,"capitalize",()=>i),a.export(r,"isStringOrNumber",()=>n),a.export(r,"secondToTime",()=>s),a.export(r,"escape",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],AKEiO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ComponentOption",()=>d);var o=e("../utils");let i="array",n="boolean",s="string",l="number",c="object",p="function";function u(e,t,r){return(0,o.errorHandle)((t===s)??t===l??e instanceof Element,`${r.join(".")} require '${s}' or 'Element' type`)}let d={html:u,disable:`?${n}`,name:`?${s}`,index:`?${l}`,style:`?${c}`,click:`?${p}`,mounted:`?${p}`,tooltip:`?${s}|${l}`,width:`?${l}`,selector:`?${i}`,onSelect:`?${p}`,switch:`?${n}`,onSwitch:`?${p}`,range:`?${i}`,onRange:`?${p}`,onChange:`?${p}`};r.default={id:s,container:u,url:s,poster:s,type:s,theme:s,lang:s,volume:l,isLive:n,muted:n,autoplay:n,autoSize:n,autoMini:n,loop:n,flip:n,playbackRate:n,aspectRatio:n,screenshot:n,setting:n,hotkey:n,pip:n,mutex:n,backdrop:n,fullscreen:n,fullscreenWeb:n,subtitleOffset:n,miniProgressBar:n,useSSR:n,playsInline:n,lock:n,fastForward:n,autoPlayback:n,autoOrientation:n,airplay:n,plugins:[p],layers:[d],contextmenu:[d],settings:[d],controls:[{...d,position:(e,t,r)=>{let a=["top","left","right"];return(0,o.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:s,url:s}],highlight:[{time:l,text:s}],thumbnails:{url:s,number:l,column:l,width:l,height:l},subtitle:{url:s,type:s,style:c,escape:n,encoding:s,onVttLoad:p},moreVideoAttr:c,i18n:c,icons:c,cssVar:c,customType:c}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lyjeQ:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],X13Zf:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");class o{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,a.query)(t.container),(0,a.errorHandle)(this.$container,`No container element found by ${t.container}`));let o=this.$container.tagName.toLowerCase();(0,a.errorHandle)("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),(0,a.errorHandle)(r.instances.every(e=>e.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.$original=this.$container.cloneNode(!0),this.init()}static get html(){return` -
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Player version:
-
5.1.0
-
-
-
Video url:
-
-
-
-
Video volume:
-
-
-
-
Video time:
-
-
-
-
Video duration:
-
-
-
-
Video resolution:
-
- x -
-
-
-
[x]
-
-
-
- `}query(e){return(0,a.query)(e,this.$container)}init(){let{option:e}=this.art;e.useSSR||(this.$container.innerHTML=o.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),e.backdrop&&(0,a.addClass)(this.$player,"art-backdrop"),a.isMobile&&(0,a.addClass)(this.$player,"art-mobile")}destroy(e){e?(0,a.replaceElement)(this.$original,this.$container):(0,a.addClass)(this.$player,"art-destroy")}}r.default=o},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3jKkj":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./zh-cn"),n=a.interopDefault(i);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":n.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]??{}}get(e){return this.language[e]??e}update(e){this.languages=(0,o.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"71aH7","./zh-cn":"5Y91w","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5Y91w":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a={"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":"隔空播放不可用"};r.default=a,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],a90nx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./urlMix"),i=a.interopDefault(o),n=e("./attrMix"),s=a.interopDefault(n),l=e("./playMix"),c=a.interopDefault(l),p=e("./pauseMix"),u=a.interopDefault(p),d=e("./toggleMix"),f=a.interopDefault(d),h=e("./seekMix"),m=a.interopDefault(h),g=e("./volumeMix"),v=a.interopDefault(g),y=e("./currentTimeMix"),b=a.interopDefault(y),x=e("./durationMix"),w=a.interopDefault(x),j=e("./switchMix"),k=a.interopDefault(j),C=e("./playbackRateMix"),S=a.interopDefault(C),I=e("./aspectRatioMix"),T=a.interopDefault(I),$=e("./screenshotMix"),E=a.interopDefault($),M=e("./fullscreenMix"),F=a.interopDefault(M),D=e("./fullscreenWebMix"),H=a.interopDefault(D),z=e("./pipMix"),A=a.interopDefault(z),O=e("./loadedMix"),R=a.interopDefault(O),Y=e("./playedMix"),P=a.interopDefault(Y),L=e("./playingMix"),V=a.interopDefault(L),N=e("./autoSizeMix"),_=a.interopDefault(N),q=e("./rectMix"),B=a.interopDefault(q),W=e("./flipMix"),U=a.interopDefault(W),G=e("./miniMix"),K=a.interopDefault(G),Z=e("./loopMix"),X=a.interopDefault(Z),Q=e("./posterMix"),J=a.interopDefault(Q),ee=e("./autoHeightMix"),et=a.interopDefault(ee),er=e("./cssVarMix"),ea=a.interopDefault(er),eo=e("./themeMix"),ei=a.interopDefault(eo),en=e("./typeMix"),es=a.interopDefault(en),el=e("./stateMix"),ec=a.interopDefault(el),ep=e("./subtitleOffsetMix"),eu=a.interopDefault(ep),ed=e("./airplayMix"),ef=a.interopDefault(ed),eh=e("./qualityMix"),em=a.interopDefault(eh),eg=e("./optionInit"),ev=a.interopDefault(eg),ey=e("./eventInit"),eb=a.interopDefault(ey);r.default=class{constructor(e){(0,i.default)(e),(0,s.default)(e),(0,c.default)(e),(0,u.default)(e),(0,f.default)(e),(0,m.default)(e),(0,v.default)(e),(0,b.default)(e),(0,w.default)(e),(0,k.default)(e),(0,S.default)(e),(0,T.default)(e),(0,E.default)(e),(0,F.default)(e),(0,H.default)(e),(0,A.default)(e),(0,R.default)(e),(0,P.default)(e),(0,V.default)(e),(0,_.default)(e),(0,B.default)(e),(0,U.default)(e),(0,K.default)(e),(0,X.default)(e),(0,J.default)(e),(0,et.default)(e),(0,ea.default)(e),(0,ei.default)(e),(0,es.default)(e),(0,ec.default)(e),(0,eu.default)(e),(0,ef.default)(e),(0,em.default)(e),(0,eb.default)(e),(0,ev.default)(e)}}},{"./urlMix":"kQoac","./attrMix":"deCma","./playMix":"fOJuP","./pauseMix":"fzHAy","./toggleMix":"cBHxQ","./seekMix":"koAPr","./volumeMix":"6eyuR","./currentTimeMix":"faaWv","./durationMix":"5y91K","./switchMix":"iceD8","./playbackRateMix":"keKwh","./aspectRatioMix":"jihET","./screenshotMix":"36kPY","./fullscreenMix":"2GYOJ","./fullscreenWebMix":"5aYAP","./pipMix":"7EnIB","./loadedMix":"3N9mP","./playedMix":"et96R","./playingMix":"9DzzM","./autoSizeMix":"i1LDY","./rectMix":"IqARI","./flipMix":"7E7Vs","./miniMix":"gpugx","./loopMix":"f1hVG","./posterMix":"1SuFS","./autoHeightMix":"8x4te","./cssVarMix":"1CaTA","./themeMix":"2FqhO","./typeMix":"1fQQs","./stateMix":"iBOQW","./subtitleOffsetMix":"6vlBV","./airplayMix":"eftqT","./qualityMix":"5SdyX","./optionInit":"fCWZK","./eventInit":"f8Lv3","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kQoac:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,template:{$video:r}}=e;(0,o.def)(e,"url",{get:()=>r.src,async set(a){if(a){let i=e.url,n=t.type??(0,o.getExt)(a),s=t.customType[n];n&&s?(await (0,o.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(i),r.src=a),i!==e.url&&(e.option.url=a,e.isReady&&i&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,o.sleep)(),e.loading.show=!0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],deCma:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t}}=e;(0,o.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fOJuP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,option:a,constructor:{instances:i},template:{$video:n}}=e;(0,o.def)(e,"play",{value:async function(){let o=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;ti);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cBHxQ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],koAPr:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t}=e;(0,o.def)(e,"seek",{set(r){e.currentTime=r,e.emit("seek",e.currentTime),e.duration&&(t.show=`${(0,o.secondToTime)(e.currentTime)} / ${(0,o.secondToTime)(e.duration)}`)}}),(0,o.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,o.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6eyuR":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a,storage:i}=e;(0,o.def)(e,"volume",{get:()=>t.volume??0,set:e=>{t.volume=(0,o.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&i.set("volume",t.volume)}}),(0,o.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],faaWv:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"currentTime",{get:()=>t.currentTime??0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,o.clamp)(r,0,e.duration))}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5y91K":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t??0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iceD8:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,e.currentTime=r,i&&await e.play(),e.notice.show="",a()})})}(0,o.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,o.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,o.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],keKwh:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jihET:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a,$player:i}}=e;(0,o.def)(e,"aspectRatio",{get:()=>i.dataset.aspectRatio??"default",set(n){if(n||(n="default"),"default"===n)(0,o.setStyle)(a,"width",null),(0,o.setStyle)(a,"height",null),(0,o.setStyle)(a,"margin",null),delete i.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=i,s=t/r,l=e[0]/e[1];s>l?((0,o.setStyle)(a,"width",`${l*r}px`),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height",`${t/l}px`),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"36kPY":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t,template:{$video:r}}=e,a=(0,o.createElement)("canvas");(0,o.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"screenshot",{value:async()=>{let t=await e.getDataURL();return(0,o.download)(t,`artplayer_${(0,o.secondToTime)(r.currentTime)}.png`),e.emit("screenshot",t),t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2GYOJ":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../libs/screenfull"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,s=e=>{(0,i.default).on("change",()=>{e.emit("fullscreen",i.default.isFullscreen)}),(0,n.def)(e,"fullscreen",{get:()=>i.default.isFullscreen,async set(t){t?(e.state="fullscreen",await (0,i.default).request(o),(0,n.addClass)(o,"art-fullscreen")):(await (0,i.default).exit(),(0,n.removeClass)(o,"art-fullscreen")),e.emit("resize")}})},l=e=>{(0,n.def)(e,"fullscreen",{get:()=>a.webkitDisplayingFullscreen,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen(),e.emit("fullscreen",!0)):(a.webkitExitFullscreen(),e.emit("fullscreen",!1)),e.emit("resize")}})};e.once("video:loadedmetadata",()=>{i.default.isEnabled?s(e):document.fullscreenEnabled??a.webkitSupportsFullscreen?l(e):(0,n.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),// Asynchronous setting -(0,n.def)(e,"fullscreen",(0,n.get)(e,"fullscreen"))})}},{"../libs/screenfull":"8v40z","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8v40z":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],// New WebKit -["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],// Old WebKit -["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=(()=>{if("undefined"==typeof document)return!1;let e=a[0],t={};for(let r of a){let a=r[1];if(a in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}}return!1})(),i={change:o.fullscreenchange,error:o.fullscreenerror},n={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let i=()=>{n.off("change",i),r()};n.on("change",i);let s=e[o.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(a)}),exit:()=>new Promise((e,t)=>{if(!n.isFullscreen){e();return}let r=()=>{n.off("change",r),e()};n.on("change",r);let a=document[o.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>n.isFullscreen?n.exit():n.request(e,t),onchange(e){n.on("change",e)},onerror(e){n.on("error",e)},on(e,t){let r=i[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=i[e];r&&document.removeEventListener(r,t,!1)},raw:o};Object.defineProperties(n,{isFullscreen:{get:()=>!!document[o.fullscreenElement]},element:{enumerable:!0,get:()=>document[o.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[o.fullscreenEnabled]}}),o||(n={isEnabled:!1}),r.default=n},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aYAP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$container:r,$player:a}}=e,i="";(0,o.def)(e,"fullscreenWeb",{get:()=>(0,o.hasClass)(a,"art-fullscreen-web"),set(n){n?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(r,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7EnIB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a}}=e;document.pictureInPictureEnabled?function(e){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}(e):a.webkitSupportsPresentationMode?function(e){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}(e):(0,o.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3N9mP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,o.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],et96R:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9DzzM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"playing",{get:()=>!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],i1LDY:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$container:t,$player:r,$video:a}=e.template;(0,o.def)(e,"autoSize",{value(){let{videoWidth:i,videoHeight:n}=a,{width:s,height:l}=t.getBoundingClientRect(),c=i/n;s/l>c?((0,o.setStyle)(r,"width",`${l*c/s*100}%`),(0,o.setStyle)(r,"height","100%")):((0,o.setStyle)(r,"width","100%"),(0,o.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],IqARI:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"rect",{get:()=>e.template.$player.getBoundingClientRect()});let t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[a]})}(0,o.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,o.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7E7Vs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,o.def)(e,"flip",{get:()=>t.dataset.flip??"normal",set(i){i||(i="normal"),"normal"===i?delete t.dataset.flip:t.dataset.flip=i,a.show=`${r.get("Video Flip")}: ${r.get((0,o.capitalize)(i))}`,e.emit("flip",i)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gpugx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{icons:t,proxy:r,storage:a,template:{$player:i,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,o.removeClass)(i,"art-mini"),(0,o.setStyle)(t,"display","none"),i.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,o.setStyle)(t,"display","none"),(0,o.setStyle)(r,"display","flex")):((0,o.setStyle)(t,"display","flex"),(0,o.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=t.getBoundingClientRect(),i=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",i),a.set("left",n),(0,o.setStyle)(t,"top",`${i}px`),(0,o.setStyle)(t,"left",`${n}px`)}(0,o.def)(e,"mini",{get:()=>(0,o.hasClass)(i,"art-mini"),set(f){if(f){e.state="mini",(0,o.addClass)(i,"art-mini");let f=function(){let{$mini:i}=e.template;if(i)return(0,o.append)(i,n),(0,o.setStyle)(i,"display","flex");{let i=(0,o.createElement)("div");(0,o.addClass)(i,"art-mini-popup"),(0,o.append)(document.body,i),e.template.$mini=i,(0,o.append)(i,n);let d=(0,o.append)(i,'
');(0,o.append)(d,t.close),r(d,"click",p);let f=(0,o.append)(i,'
'),h=(0,o.append)(f,t.play),m=(0,o.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(i,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,o.addClass)(i,"art-mini-droging");let t=e.pageX-l,r=e.pageY-c;(0,o.setStyle)(i,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,o.removeClass)(i,"art-mini-droging");let e=i.getBoundingClientRect();a.set("left",e.left),a.set("top",e.top),(0,o.setStyle)(i,"left",`${e.left}px`),(0,o.setStyle)(i,"top",`${e.top}px`),(0,o.setStyle)(i,"transform",null)}}),i}}(),h=a.get("top"),m=a.get("left");h&&m?((0,o.setStyle)(f,"top",`${h}px`),(0,o.setStyle)(f,"left",`${m}px`),(0,o.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f1hVG:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let t=[];(0,o.def)(e,"loop",{get:()=>t,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){let a=(0,o.clamp)(r[0],0,Math.min(r[1],e.duration)),i=(0,o.clamp)(r[1],a,e.duration);t=i-a>=1?[a,i]:[]}else t=[];e.emit("loop",t)}}),e.on("video:timeupdate",()=>{t.length&&((e.currentTimet[1])&&(e.seek=t[0])})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1SuFS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$poster:t}}=e;(0,o.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,o.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8x4te":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$container:t,$video:r}}=e;(0,o.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:i,videoWidth:n}=r,s=i*(a/n);(0,o.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1CaTA":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$player:t}=e.template;(0,o.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2FqhO":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1fQQs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iBOQW:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(e,"state",{get:()=>t.find(t=>e[t])??"standard",set(r){for(let a=0;ai);var o=e("../utils");function i(e){let{clamp:t}=e.constructor.utils,{notice:r,template:a,i18n:i}=e,n=0,s=[];e.on("subtitle:switch",()=>{s=[]}),(0,o.def)(e,"subtitleOffset",{get:()=>n,set(o){if(a.$track&&a.$track.track){let l=Array.from(a.$track.track.cues);n=t(o,-5,5);for(let r=0;ri);var o=e("../utils");function i(e){let{i18n:t,notice:r,proxy:a,template:{$video:i}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&i.webkitShowPlaybackTargetPicker?a(i,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,o.def)(e,"airplay",{value(){n?(i.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5SdyX":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)??t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?i.html:"",selector:t,async onSelect(t){await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`}})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fCWZK:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,storage:r,template:{$video:a,$poster:i}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,o.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,o.clamp)(n,0,1)),t.poster&&(0,o.setStyle)(i,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f8Lv3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../config"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:s,template:{$player:l,$video:c,$poster:p}}=e,u=0;for(let t=0;t{e.emit(`video:${t.type}`,t)});// art.on('video:abort', () => { -// }); -e.on("video:canplay",()=>{u=0,e.loading.show=!1}),e.once("video:canplay",()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")}),// art.on('video:canplaythrough', () => { -// }); -// art.on('video:durationchange', () => { -// }); -// art.on('video:emptied', () => { -// }); -e.on("video:ended",()=>{a.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)}),e.on("video:error",async i=>{u { -// }); -e.on("video:loadedmetadata",()=>{e.emit("resize"),n.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,n.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),// art.on('video:ratechange', () => { -// }); -e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),// art.on('video:stalled', () => { -// }); -// art.on('video:suspend', () => { -// }); -e.on("video:timeupdate",()=>{e.mask.show=!1}),// art.on('video:volumechange', () => { -// }); -e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"lyjeQ","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8Z0Uf":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("../utils/component"),n=a.interopDefault(i),s=e("./fullscreen"),l=a.interopDefault(s),c=e("./fullscreenWeb"),p=a.interopDefault(c),u=e("./pip"),d=a.interopDefault(u),f=e("./playAndPause"),h=a.interopDefault(f),m=e("./progress"),g=a.interopDefault(m),v=e("./time"),y=a.interopDefault(v),b=e("./volume"),x=a.interopDefault(b),w=e("./setting"),j=a.interopDefault(w),k=e("./thumbnails"),C=a.interopDefault(k),S=e("./screenshot"),I=a.interopDefault(S),T=e("./loop"),$=a.interopDefault(T),E=e("./airplay"),M=a.interopDefault(E);class F extends n.default{constructor(e){super(e),this.name="control";let{proxy:t,constructor:r,template:{$player:a}}=e,i=Date.now();t(a,["click","mousemove","touchstart","touchmove"],()=>{this.show=!0,(0,o.removeClass)(a,"art-hide-cursor"),(0,o.addClass)(a,"art-hover"),i=Date.now()}),e.on("video:timeupdate",()=>{!e.isInput&&e.playing&&this.show&&Date.now()-i>=r.CONTROL_HIDE_TIME&&(this.show=!1,(0,o.addClass)(a,"art-hide-cursor"),(0,o.removeClass)(a,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),!e.thumbnails.url||e.isLive||o.isMobile||this.add((0,C.default)({name:"thumbnails",position:"top",index:20})),this.add((0,$.default)({name:"loop",position:"top",index:30})),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,o.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!o.isMobile&&this.add((0,I.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,M.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,p.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;tNumber(e.dataset.index)>=Number(i.dataset.index));p?p.insertAdjacentElement("beforebegin",i):(0,o.append)(this.$parent,i),t.html&&(0,o.append)(i,t.html),t.style&&(0,o.setStyles)(i,t.style),t.tooltip&&(0,o.tooltip)(i,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(i,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.addSelector(t,i,u),this[r]=i,this.cache.set(r,{$ref:i,events:u,option:t}),t.mounted&&t.mounted.call(this.art,i),i}addSelector(e,t,r){let{hover:a,proxy:n}=this.art.events;(0,o.addClass)(t,"art-control-selector");let s=(0,o.createElement)("div");(0,o.addClass)(s,"art-selector-value"),(0,o.append)(s,e.html),t.innerText="",(0,o.append)(t,s);let l=e.selector.map((e,t)=>`
${e.html}
`).join(""),c=(0,o.createElement)("div");(0,o.addClass)(c,"art-selector-list"),(0,o.append)(c,l),(0,o.append)(t,c);let p=()=>{let e=(0,o.getStyle)(t,"width"),r=(0,o.getStyle)(c,"width");c.style.left=`${e/2-r/2}px`};a(t,p);let u=n(c,"click",async t=>{let r=t.composedPath()??[],a=r.find(e=>(0,o.hasClass)(e,"art-selector-item"));if(!a)return;(0,o.inverseClass)(a,"art-current");let n=Number(a.dataset.index),l=e.selector[n]??{};if(s.innerText=a.innerText,e.onSelect){let r=await e.onSelect.call(this.art,l,a,t);(0,i.isStringOrNumber)(r)&&(s.innerHTML=r)}p()});r.push(u)}remove(e){let t=this.cache.get(e);(0,n.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenOn),s=(0,o.append)(e,a.fullscreenOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,o.tooltip)(e,i.get("Exit Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03jeB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenWebOn),s=(0,o.append)(e,a.fullscreenWebOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,o.tooltip)(e,i.get("Exit Web Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Web Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],u8l8e:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,o.tooltip)(e,i.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ebXtb:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.play),s=(0,o.append)(e,a.pause);function l(){(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(s,"display","none")}function c(){(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","flex")}(0,o.tooltip)(n,i.get("Play")),(0,o.tooltip)(s,i.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bgoVP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"getPosFromEvent",()=>i),a.export(r,"setCurrentTime",()=>n),a.export(r,"default",()=>s);var o=e("../utils");function i(e,t){let{$progress:r}=e.template,{left:a}=r.getBoundingClientRect(),i=o.isMobile?t.touches[0].clientX:t.clientX,n=(0,o.clamp)(i-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,o.secondToTime)(s),c=(0,o.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function n(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r),e.seek=a}else{let{second:r,percentage:a}=i(e,t);e.emit("setBar","played",a),e.seek=r}}function s(e){return t=>{let{icons:r,option:a,proxy:s}=t;return{...e,html:` -
-
-
-
-
-
-
-
- `,mounted:e=>{let l=!1,c=(0,o.query)(".art-progress-hover",e),p=(0,o.query)(".art-progress-loaded",e),u=(0,o.query)(".art-progress-played",e),d=(0,o.query)(".art-progress-highlight",e),f=(0,o.query)(".art-progress-indicator",e),h=(0,o.query)(".art-progress-tip",e);function m(e,t){"loaded"===e&&(0,o.setStyle)(p,"width",`${100*t}%`),"played"===e&&((0,o.setStyle)(u,"width",`${100*t}%`),(0,o.setStyle)(f,"left",`${100*t}%`))}r.indicator?(0,o.append)(f,r.indicator):(0,o.setStyle)(f,"backgroundColor","var(--art-theme)"),t.on("video:loadedmetadata",()=>{for(let e=0;e`;(0,o.append)(d,n)}}),m("loaded",t.loaded),t.on("setBar",(e,t)=>{m(e,t)}),t.on("video:progress",()=>{m("loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",()=>{m("played",t.played)}):t.on("video:timeupdate",()=>{m("played",t.played)}),t.on("video:ended",()=>{m("played",1)}),o.isMobile||(s(e,"click",e=>{e.target!==f&&n(t,e)}),s(e,"mousemove",r=>{(function(e){let{width:r}=i(t,e);(0,o.setStyle)(c,"width",`${r}px`),(0,o.setStyle)(c,"display","flex")})(r),(0,o.setStyle)(h,"display","flex"),(0,o.includeFromEvent)(r,d)?function(r){let{width:a}=i(t,r),{text:n}=r.target.dataset;h.innerHTML=n;let s=h.clientWidth;a<=s/2?(0,o.setStyle)(h,"left",0):a>e.clientWidth-s/2?(0,o.setStyle)(h,"left",`${e.clientWidth-s}px`):(0,o.setStyle)(h,"left",`${a-s/2}px`)}(r):function(r){let{width:a,time:n}=i(t,r);h.innerHTML=n;let s=h.clientWidth;a<=s/2?(0,o.setStyle)(h,"left",0):a>e.clientWidth-s/2?(0,o.setStyle)(h,"left",`${e.clientWidth-s}px`):(0,o.setStyle)(h,"left",`${a-s/2}px`)}(r)}),s(e,"mouseleave",()=>{(0,o.setStyle)(h,"display","none"),(0,o.setStyle)(c,"display","none")}),s(e,"mousedown",e=>{l=0===e.button}),t.on("document:mousemove",e=>{if(l){let{second:r,percentage:a}=i(t,e);m("played",a),t.seek=r}}),t.on("document:mouseup",()=>{l&&(l=!1)}))}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ikc2j:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,style:o.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,o.secondToTime)(t.currentTime)} / ${(0,o.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,i=(0,o.append)(e,a.volume),n=(0,o.append)(e,a.volumeClose),s=(0,o.append)(e,'
'),l=(0,o.append)(s,'
'),c=(0,o.append)(l,'
'),p=(0,o.append)(l,'
'),u=(0,o.append)(p,'
'),d=(0,o.append)(u,'
'),f=(0,o.append)(p,'
');function h(e){let{top:t,height:r}=p.getBoundingClientRect();return 1-(e.clientY-t)/r}function m(){if(t.muted??0===t.volume)(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(f,"top","100%"),(0,o.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(f,"top",`${100-e}%`),(0,o.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(i,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),o.isMobile)(0,o.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03o9l":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.updateStyle()}),t.on("setting",t=>{(0,o.tooltip)(e,i.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eCVx2:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>n);var o=e("../utils"),i=e("./progress");function n(e){return t=>({...e,mounted:e=>{let{option:r,template:{$progress:a,$video:n},events:{proxy:s,loadImg:l}}=t,c=null,p=!1,u=!1;s(a,"mousemove",async s=>{if(!p){p=!0;let e=await l(r.thumbnails.url);c=e,u=!0}u&&((0,o.setStyle)(e,"display","flex"),function(s){let{width:l}=(0,i.getPosFromEvent)(t,s),{url:p,number:u,column:d,width:f,height:h}=r.thumbnails,m=f??c.naturalWidth/d,g=h??m/(n.videoWidth/n.videoHeight),v=a.clientWidth/u,y=Math.floor(l/v);(0,o.setStyle)(e,"backgroundImage",`url(${p})`),(0,o.setStyle)(e,"height",`${g}px`),(0,o.setStyle)(e,"width",`${m}px`),(0,o.setStyle)(e,"backgroundPosition",`-${((y%d)??d-1)*m}px -${(Math.ceil(y/d)-1)*g}px`),l<=m/2?(0,o.setStyle)(e,"left",0):l>a.clientWidth-m/2?(0,o.setStyle)(e,"left",`${a.clientWidth-m}px`):(0,o.setStyle)(e,"left",`${l-m/2}px`)}(s))}),s(a,"mouseleave",()=>{(0,o.setStyle)(e,"display","none")}),t.on("hover",t=>{t||(0,o.setStyle)(e,"display","none")})}})}},{"../utils":"71aH7","./progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4KCF5":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2hIff":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let r=(0,o.append)(e,''),a=(0,o.append)(e,'');t.on("loop",i=>{i&&i.length?((0,o.setStyle)(e,"display","flex"),(0,o.setStyle)(r,"left",`calc(${i[0]/t.duration*100}% - ${r.clientWidth}px)`),(0,o.setStyle)(a,"left",`${i[1]/t.duration*100}%`)):(0,o.setStyle)(e,"display","none")})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IS2d":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2KYsr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("../utils/component"),n=a.interopDefault(i),s=e("./playbackRate"),l=a.interopDefault(s),c=e("./aspectRatio"),p=a.interopDefault(c),u=e("./flip"),d=a.interopDefault(u),f=e("./info"),h=a.interopDefault(f),m=e("./version"),g=a.interopDefault(m),v=e("./close"),y=a.interopDefault(v);class b extends n.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,o.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,l.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,p.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,d.default)({name:"flip",index:30})),this.add((0,h.default)({name:"info",index:40})),this.add((0,g.default)({name:"version",index:50})),this.add((0,y.default)({name:"close",index:60}));for(let t=0;t{if(e.preventDefault(),!this.art.constructor.CONTEXTMENU)return;this.show=!0;let t=e.clientX,i=e.clientY,{height:n,width:s,left:l,top:c}=r.getBoundingClientRect(),{height:p,width:u}=a.getBoundingClientRect(),d=t-l,f=i-c;t+u>l+s&&(d=s-u),i+p>c+n&&(f=n-p),(0,o.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,o.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=b},{"../utils":"71aH7","../utils/component":"18nVI","./playbackRate":"69eLi","./aspectRatio":"lUefg","./flip":"kysiM","./info":"gqIgJ","./version":"kRU7C","./close":"jQ8Pm","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"69eLi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,i=a.map(e=>`${1===e?r.get("Normal"):e.toFixed(1)}`).join("");return{...e,html:`${r.get("Play Speed")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="1"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,o.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lUefg:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,i=a.map(e=>`${"default"===e?r.get("Default"):e}`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="default"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kysiM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,i=a.map(e=>`${r.get((0,o.capitalize)(e))}`).join("");return{...e,html:`${r.get("Video Flip")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="normal"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gqIgJ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kRU7C:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return{...e,html:'ArtPlayer 5.1.0'}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jQ8Pm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"02ajl":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="info",o.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:i}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,o.queryAll)("[data-video]",r)??[];this.art.on("destroy",()=>clearTimeout(n)),function e(){for(let e=0;enull,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,o.setStyles)(r,e):(0,o.setStyle)(r,e,t)}update(){let{$subtitle:e}=this.art.template;e.innerHTML="",this.activeCue&&(this.art.option.subtitle.escape?e.innerHTML=this.activeCue.text.split(/\r?\n/).map(e=>`

${(0,o.escape)(e)}

`).join(""):e.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a}=this.art,{$video:i,$track:n}=r,s=(0,o.createElement)("track");s.default=!0,s.kind=e,s.src=t,s.track.mode="hidden",this.eventDestroy(),(0,o.remove)(n),(0,o.append)(i,s),r.$track=s,this.eventDestroy=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;if((0,l.default)(e,p.default.subtitle),e.url)return this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding),a=r.decode(t);switch(this.art.emit("subtitleLoad",e.url),e.type??(0,o.getExt)(e.url)){case"srt":{let t=(0,o.srtToVtt)(a),r=e.onVttLoad(t);return(0,o.vttToBlob)(r)}case"ass":{let t=(0,o.assToVtt)(a),r=e.onVttLoad(t);return(0,o.vttToBlob)(r)}case"vtt":{let t=e.onVttLoad(a);return(0,o.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e),this.art.emit("subtitleSwitch",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})}}r.default=u},{"./utils":"71aH7","./utils/component":"18nVI","option-validator":"bAWi2","./scheme":"AKEiO","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jo4S1:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils/error"),i=e("./clickInit"),n=a.interopDefault(i),s=e("./hoverInit"),l=a.interopDefault(s),c=e("./moveInit"),p=a.interopDefault(c),u=e("./resizeInit"),d=a.interopDefault(u),f=e("./gestureInit"),h=a.interopDefault(f),m=e("./viewInit"),g=a.interopDefault(m),v=e("./documentInit"),y=a.interopDefault(v),b=e("./updateInit"),x=a.interopDefault(b);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,n.default)(e,this),(0,l.default)(e,this),(0,p.default)(e,this),(0,d.default)(e,this),(0,h.default)(e,this),(0,g.default)(e,this),(0,y.default)(e,this),(0,x.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}loadImg(e){return new Promise((t,r)=>{let a;if(e instanceof HTMLImageElement)a=e;else{if("string"!=typeof e)return r(new o.ArtPlayerError("Unable to get Image"));(a=new Image).src=e}if(a.complete)return t(a);this.proxy(a,"load",()=>t(a)),this.proxy(a,"error",()=>r(new o.ArtPlayerError(`Failed to load Image: ${a.src}`)))})}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;ei);var o=e("../utils");function i(e,t){let{constructor:r,template:{$player:a,$video:i}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,o.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=0;t.proxy(i,"click",t=>{let a=Date.now(),{MOBILE_CLICK_PLAY:i,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r;a-n<=s?(e.emit("dblclick",t),o.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen)):(e.emit("click",t),o.isMobile?!e.isLock&&i&&e.toggle():e.toggle()),n=a})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4jWHi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,o.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,o.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eqaUm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eDXPO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let i=(0,o.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>i()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>i())}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"95GtS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>n);var o=e("../utils"),i=e("../control/progress");function n(e,t){if(o.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,n=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){n===a&&(0,i.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:o}=t.touches[0];l=r,c=o,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:i}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:((s>=135&&s<=180)??(s>=-180&&s<-135))&&(n=3),n}(l,c,a,i),u=[3,4].includes(s),d=[1,2].includes(s),f=(u&&!e.isRotate)??(d&&e.isRotate);if(f){let t=(0,o.clamp)((a-l)/e.width,-1,1),s=(0,o.clamp)((i-c)/e.height,-1,1),u=e.isRotate?s:t,d=n===r?e.constructor.TOUCH_MOVE_RATIO:1,f=(0,o.clamp)(p+e.duration*u*d,0,e.duration);e.seek=f,e.emit("setBar","played",(0,o.clamp)(f/e.duration,0,1)),e.notice.show=`${(0,o.secondToTime)(f)} / ${(0,o.secondToTime)(e.duration)}`}}};t.proxy(a,"touchstart",e=>{n=a,u(e)}),t.proxy(r,"touchstart",e=>{n=r,u(e)}),t.proxy(r,"touchmove",d),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,n=null)})}}},{"../utils":"71aH7","../control/progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],InUBx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a,template:{$container:i}}=e,n=(0,o.throttle)(()=>{e.emit("view",(0,o.isInViewport)(i,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hoLfM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cl8m3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6NoFy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.option.hotkey&&!a.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add(27,()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add(32,()=>{this.art.toggle()}),this.add(37,()=>{this.art.backward=t.SEEK_STEP}),this.add(38,()=>{this.art.volume+=t.VOLUME_STEP}),this.add(39,()=>{this.art.forward=t.SEEK_STEP}),this.add(40,()=>{this.art.volume-=t.VOLUME_STEP}),e(window,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r){let t=this.keys[e.keyCode];if(t){e.preventDefault();for(let r=0;r{o.innerText="",(0,a.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,a.removeClass)(r,"art-notice-show")}}},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5POkG":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,i=(0,o.append)(t.$state,r.state),n=(0,o.append)(t.$state,r.error);(0,o.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=s},{"./utils":"71aH7","./utils/component":"18nVI","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6OeNg":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("bundle-text:./loading.svg"),n=a.interopDefault(i),s=e("bundle-text:./state.svg"),l=a.interopDefault(s),c=e("bundle-text:./check.svg"),p=a.interopDefault(c),u=e("bundle-text:./play.svg"),d=a.interopDefault(u),f=e("bundle-text:./pause.svg"),h=a.interopDefault(f),m=e("bundle-text:./volume.svg"),g=a.interopDefault(m),v=e("bundle-text:./volume-close.svg"),y=a.interopDefault(v),b=e("bundle-text:./screenshot.svg"),x=a.interopDefault(b),w=e("bundle-text:./setting.svg"),j=a.interopDefault(w),k=e("bundle-text:./arrow-left.svg"),C=a.interopDefault(k),S=e("bundle-text:./arrow-right.svg"),I=a.interopDefault(S),T=e("bundle-text:./playback-rate.svg"),$=a.interopDefault(T),E=e("bundle-text:./aspect-ratio.svg"),M=a.interopDefault(E),F=e("bundle-text:./config.svg"),D=a.interopDefault(F),H=e("bundle-text:./pip.svg"),z=a.interopDefault(H),A=e("bundle-text:./lock.svg"),O=a.interopDefault(A),R=e("bundle-text:./unlock.svg"),Y=a.interopDefault(R),P=e("bundle-text:./fullscreen-off.svg"),L=a.interopDefault(P),V=e("bundle-text:./fullscreen-on.svg"),N=a.interopDefault(V),_=e("bundle-text:./fullscreen-web-off.svg"),q=a.interopDefault(_),B=e("bundle-text:./fullscreen-web-on.svg"),W=a.interopDefault(B),U=e("bundle-text:./switch-on.svg"),G=a.interopDefault(U),K=e("bundle-text:./switch-off.svg"),Z=a.interopDefault(K),X=e("bundle-text:./flip.svg"),Q=a.interopDefault(X),J=e("bundle-text:./error.svg"),ee=a.interopDefault(J),et=e("bundle-text:./close.svg"),er=a.interopDefault(et),ea=e("bundle-text:./airplay.svg"),eo=a.interopDefault(ea);r.default=class{constructor(e){let t={loading:n.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:y.default,screenshot:x.default,setting:j.default,pip:z.default,arrowLeft:C.default,arrowRight:I.default,playbackRate:$.default,aspectRatio:M.default,config:D.default,lock:O.default,flip:Q.default,unlock:Y.default,fullscreenOff:L.default,fullscreenOn:N.default,fullscreenWebOff:q.default,fullscreenWebOn:W.default,switchOn:G.default,switchOff:Z.default,error:ee.default,close:er.default,airplay:eo.default,...e.option.icons};for(let e in t)(0,o.def)(this,e,{get:()=>(0,o.getIcon)(e,t[e])})}}},{"../utils":"71aH7","bundle-text:./loading.svg":"7tDub","bundle-text:./state.svg":"1ElZc","bundle-text:./check.svg":"lmgoP","bundle-text:./play.svg":"lVWoQ","bundle-text:./pause.svg":"5Mnax","bundle-text:./volume.svg":"w3eIa","bundle-text:./volume-close.svg":"rHjo1","bundle-text:./screenshot.svg":"2KcqM","bundle-text:./setting.svg":"8rQMV","bundle-text:./arrow-left.svg":"kqGBE","bundle-text:./arrow-right.svg":"aFjpC","bundle-text:./playback-rate.svg":"lx7ZM","bundle-text:./aspect-ratio.svg":"2sEjf","bundle-text:./config.svg":"fQTgE","bundle-text:./pip.svg":"2CaxO","bundle-text:./lock.svg":"aCGnW","bundle-text:./unlock.svg":"bTrAV","bundle-text:./fullscreen-off.svg":"bA3p0","bundle-text:./fullscreen-on.svg":"fTuY8","bundle-text:./fullscreen-web-off.svg":"tvKf4","bundle-text:./fullscreen-web-on.svg":"1F1oB","bundle-text:./switch-on.svg":"7qNHs","bundle-text:./switch-off.svg":"28aV8","bundle-text:./flip.svg":"1uXI6","bundle-text:./error.svg":"9f4dh","bundle-text:./close.svg":"4nTtS","bundle-text:./airplay.svg":"cDPXC","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7tDub":[function(e,t,r){t.exports=''},{}],"1ElZc":[function(e,t,r){t.exports=''},{}],lmgoP:[function(e,t,r){t.exports=''},{}],lVWoQ:[function(e,t,r){t.exports=''},{}],"5Mnax":[function(e,t,r){t.exports=''},{}],w3eIa:[function(e,t,r){t.exports=''},{}],rHjo1:[function(e,t,r){t.exports=''},{}],"2KcqM":[function(e,t,r){t.exports=''},{}],"8rQMV":[function(e,t,r){t.exports=''},{}],kqGBE:[function(e,t,r){t.exports=''},{}],aFjpC:[function(e,t,r){t.exports=''},{}],lx7ZM:[function(e,t,r){t.exports=''},{}],"2sEjf":[function(e,t,r){t.exports=''},{}],fQTgE:[function(e,t,r){t.exports=''},{}],"2CaxO":[function(e,t,r){t.exports=''},{}],aCGnW:[function(e,t,r){t.exports=''},{}],bTrAV:[function(e,t,r){t.exports=''},{}],bA3p0:[function(e,t,r){t.exports=''},{}],fTuY8:[function(e,t,r){t.exports=''},{}],tvKf4:[function(e,t,r){t.exports=''},{}],"1F1oB":[function(e,t,r){t.exports=''},{}],"7qNHs":[function(e,t,r){t.exports=''},{}],"28aV8":[function(e,t,r){t.exports=''},{}],"1uXI6":[function(e,t,r){t.exports=''},{}],"9f4dh":[function(e,t,r){t.exports=''},{}],"4nTtS":[function(e,t,r){t.exports=''},{}],cDPXC:[function(e,t,r){t.exports=''},{}],"3eYNH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./flip"),i=a.interopDefault(o),n=e("./aspectRatio"),s=a.interopDefault(n),l=e("./playbackRate"),c=a.interopDefault(l),p=e("./subtitleOffset"),u=a.interopDefault(p),d=e("../utils/component"),f=a.interopDefault(d),h=e("../utils/error"),m=e("../utils");class g extends f.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.option=[],this.events=[],this.cache=new Map,t.setting&&(this.init(),e.on("blur",()=>{this.show&&(this.show=!1,this.render(this.option))}),e.on("focus",e=>{let t=(0,m.includeFromEvent)(e,r.setting),a=(0,m.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render(this.option))}))}static makeRecursion(e,t,r){for(let a=0;a'),n=(0,m.createElement)("div");(0,m.addClass)(n,"art-setting-item-left-icon"),(0,m.append)(n,t.arrowLeft),(0,m.append)(i,n),(0,m.append)(i,e.$parentItem.html);let s=r(o,"click",()=>this.render(e.$parentList));return this.events.push(s),o}creatItem(e,t){let{icons:r,proxy:a,constructor:o}=this.art,i=(0,m.createElement)("div");(0,m.addClass)(i,"art-setting-item"),(0,m.setStyle)(i,"height",`${o.SETTING_ITEM_HEIGHT}px`),(0,m.isStringOrNumber)(t.name)&&(i.dataset.name=t.name),(0,m.isStringOrNumber)(t.value)&&(i.dataset.value=t.value);let n=(0,m.append)(i,'
'),s=(0,m.append)(i,'
'),l=(0,m.createElement)("div");switch((0,m.addClass)(l,"art-setting-item-left-icon"),e){case"switch":case"range":(0,m.append)(l,(0,m.isStringOrNumber)(t.icon)??t.icon instanceof Element?t.icon:r.config);break;case"selector":t.selector&&t.selector.length?(0,m.append)(l,(0,m.isStringOrNumber)(t.icon)??t.icon instanceof Element?t.icon:r.config):(0,m.append)(l,r.check)}(0,m.append)(n,l),t.$icon=l,(0,m.def)(t,"icon",{configurable:!0,get:()=>l.innerHTML,set(e){(0,m.isStringOrNumber)(e)&&(l.innerHTML=e)}});let c=(0,m.createElement)("div");(0,m.addClass)(c,"art-setting-item-left-text"),(0,m.append)(c,t.html??""),(0,m.append)(n,c),t.$html=c,(0,m.def)(t,"html",{configurable:!0,get:()=>c.innerHTML,set(e){(0,m.isStringOrNumber)(e)&&(c.innerHTML=e)}});let p=(0,m.createElement)("div");switch((0,m.addClass)(p,"art-setting-item-right-tooltip"),(0,m.append)(p,t.tooltip??""),(0,m.append)(s,p),t.$tooltip=p,(0,m.def)(t,"tooltip",{configurable:!0,get:()=>p.innerHTML,set(e){(0,m.isStringOrNumber)(e)&&(p.innerHTML=e)}}),e){case"switch":{let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon");let a=(0,m.append)(e,r.switchOn),o=(0,m.append)(e,r.switchOff);(0,m.setStyle)(t.switch?o:a,"display","none"),(0,m.append)(s,e),t.$switch=t.switch,(0,m.def)(t,"switch",{configurable:!0,get:()=>t.$switch,set(e){t.$switch=e,e?((0,m.setStyle)(o,"display","none"),(0,m.setStyle)(a,"display",null)):((0,m.setStyle)(o,"display",null),(0,m.setStyle)(a,"display","none"))}});break}case"range":{let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon");let r=(0,m.append)(e,'');r.value=t.range[0]??0,r.min=t.range[1]??0,r.max=t.range[2]??10,r.step=t.range[3]??1,(0,m.addClass)(r,"art-setting-range"),(0,m.append)(s,e),t.$range=r,(0,m.def)(t,"range",{configurable:!0,get:()=>r.valueAsNumber,set(e){r.value=Number(e)}})}break;case"selector":if(t.selector&&t.selector.length){let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon"),(0,m.append)(e,r.arrowRight),(0,m.append)(s,e)}}switch(e){case"switch":if(t.onSwitch){let e=a(i,"click",async e=>{t.switch=await t.onSwitch.call(this.art,t,i,e)});this.events.push(e)}break;case"range":if(t.$range){if(t.onRange){let e=a(t.$range,"change",async e=>{t.tooltip=await t.onRange.call(this.art,t,i,e)});this.events.push(e)}if(t.onChange){let e=a(t.$range,"input",async e=>{t.tooltip=await t.onChange.call(this.art,t,i,e)});this.events.push(e)}}break;case"selector":{let e=a(i,"click",async e=>{if(t.selector&&t.selector.length)this.render(t.selector,t.width);else{(0,m.inverseClass)(i,"art-current");for(let e=0;ec?((0,m.setStyle)(o,"left",null),(0,m.setStyle)(o,"right",null)):((0,m.setStyle)(o,"left",`${p}px`),(0,m.setStyle)(o,"right","auto"))}}render(e,t){let{constructor:r}=this.art;if(this.cache.has(e)){let t=this.cache.get(e);(0,m.inverseClass)(t,"art-current"),(0,m.setStyle)(this.$parent,"width",`${t.dataset.width}px`),(0,m.setStyle)(this.$parent,"height",`${t.dataset.height}px`),this.updateStyle(Number(t.dataset.width))}else{let a=(0,m.createElement)("div");(0,m.addClass)(a,"art-setting-panel"),a.dataset.width=t??r.SETTING_WIDTH,a.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0].$parentItem&&((0,m.append)(a,this.creatHeader(e[0])),a.dataset.height=Number(a.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let t=0;ti);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:i}}=e;function n(e,r,a){r&&(r.innerText=t.get((0,o.capitalize)(a)));let i=(0,o.queryAll)(".art-setting-item",e).find(e=>e.dataset.value===a);i&&(0,o.inverseClass)(i,"art-current")}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:t.get((0,o.capitalize)(e.flip)),icon:r.flip,selector:i.map(r=>({value:r,name:`aspect-ratio-${r}`,default:r===e.flip,html:t.get((0,o.capitalize)(r))})),onSelect:t=>(e.flip=t.value,t.html),mounted:(t,r)=>{n(t,r.$tooltip,e.flip),e.on("flip",()=>{n(t,r.$tooltip,e.flip)})}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"84NBV":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:i}}=e;function n(e){return"default"===e?t.get("Default"):e}function s(e,t,r){t&&(t.innerText=n(r));let a=(0,o.queryAll)(".art-setting-item",e).find(e=>e.dataset.value===r);a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(e.aspectRatio),selector:i.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:n(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:(t,r)=>{s(t,r.$tooltip,e.aspectRatio),e.on("aspectRatio",()=>{s(t,r.$tooltip,e.aspectRatio)})}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aetWt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:i}}=e;function n(e){return 1===e?t.get("Normal"):e.toFixed(1)}function s(e,t,r){t&&(t.innerText=n(r));let a=(0,o.queryAll)(".art-setting-item",e).find(e=>Number(e.dataset.value)===r);a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:n(e.playbackRate),icon:r.playbackRate,selector:i.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.playbackRate,html:n(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:(t,r)=>{s(t,r.$tooltip,e.playbackRate),e.on("video:ratechange",()=>{s(t,r.$tooltip,e.playbackRate)})}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fIBkO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-5,5,.1],onChange:t=>(e.subtitleOffset=t.range,t.range+"s")}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2aaJe":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{let t=JSON.parse(window.localStorage.getItem(this.name))??{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8MTUM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./miniProgressBar"),n=a.interopDefault(i),s=e("./autoOrientation"),l=a.interopDefault(s),c=e("./autoPlayback"),p=a.interopDefault(c),u=e("./fastForward"),d=a.interopDefault(u),f=e("./lock"),h=a.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(n.default),t.lock&&o.isMobile&&this.add(h.default),t.autoPlayback&&!t.isLive&&this.add(p.default),t.autoOrientation&&o.isMobile&&this.add(l.default),t.fastForward&&o.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;e{e.layers.add({name:"mini-progress-bar",mounted(t){e.on("destroy",()=>{t.style.display="none"}),e.constructor.USE_RAF?e.on("raf",()=>{t.style.width=`${100*e.played}%`}):e.on("video:timeupdate",()=>{t.style.width=`${100*e.played}%`}),e.on("setBar",(e,r)=>{"played"===e&&(t.style.width=`${100*r}%`)})}})}),{name:"mini-progress-bar"}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ePEg5:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",i=>{if(i){let{videoWidth:i,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;((i>n&&sl))&&setTimeout(()=>{(0,o.setStyle)(r,"width",`${l}px`),(0,o.setStyle)(r,"height",`${s}px`),(0,o.setStyle)(r,"transform-origin","0 0"),(0,o.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,o.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,o.hasClass)(r,"art-auto-orientation")&&((0,o.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:i}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if((e>i&&ns)){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,o.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,o.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,o.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,o.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cVO99:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,storage:a,constructor:i,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:` -
-
-
- `}),c=(0,o.query)(".art-auto-playback-last",l),p=(0,o.query)(".art-auto-playback-jump",l),u=(0,o.query)(".art-auto-playback-close",l);return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")??{},r=Object.keys(t);r.length>i.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id??e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",()=>{let d=a.get("times")??{},f=d[e.option.id??e.option.url];f&&f>=i.AUTO_PLAYBACK_MIN&&((0,o.append)(u,r.close),(0,o.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,o.secondToTime)(f)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,o.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=f,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{setTimeout(()=>{(0,o.setStyle)(l,"display","none")},i.AUTO_PLAYBACK_TIMEOUT)}))}),{name:"auto-playback",get times(){return a.get("times")??{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")??{};return delete t[e],a.set("times",t),t}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hFDwt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,proxy:r,template:{$player:a,$video:i}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1hsTH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{layers:t,icons:r,template:{$player:a}}=e;return t.add({name:"lock",mounted(t){let a=(0,o.append)(t,r.lock),i=(0,o.append)(t,r.unlock);(0,o.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,o.setStyle)(a,"display","inline-flex"),(0,o.setStyle)(i,"display","none")):((0,o.setStyle)(a,"display","none"),(0,o.setStyle)(i,"display","inline-flex"))})},click(){(0,o.hasClass)(a,"art-lock")?((0,o.removeClass)(a,"art-lock"),this.isLock=!1,e.emit("lock",!1)):((0,o.addClass)(a,"art-lock"),this.isLock=!0,e.emit("lock",!0))}}),{name:"lock",get state(){return(0,o.hasClass)(a,"art-lock")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["5lTcX"],"5lTcX","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,r,o,a){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof n[o]&&n[o],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 a="function"==typeof n[o]&&n[o];if(!r&&a)return a(e,!0);if(i)return i(e,!0);if(l&&"string"==typeof e)return l(e);var u=new Error("Cannot find module '"+e+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(r){var o=t[e][1][r];return null!=o?o:r},d.cache={};var p=s[e]=new c.Module(e);t[e][0].call(p.exports,d,p,p.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[o]}}),n[o]=c;for(var u=0;ue.call(this,this))),K.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t("Version@"+K.version),t("Env@"+K.env),t("Build@"+K.build);for(let e=0;et("Event@"+e.type)))}G.push(this)}static get instances(){return G}static get version(){return"5.1.0"}static get env(){return"production"}static get build(){return"2023-08-26 16:47:28"}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:{},escape:!0,encoding:"utf-8",onVttLoad:t=>t},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(t=!0){this.events.destroy(),this.template.destroy(t),G.splice(G.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=K,K.DEBUG=!1,K.CONTEXTMENU=!0,K.NOTICE_TIME=2e3,K.SETTING_WIDTH=250,K.SETTING_ITEM_WIDTH=200,K.SETTING_ITEM_HEIGHT=35,K.RESIZE_TIME=200,K.SCROLL_TIME=200,K.SCROLL_GAP=50,K.AUTO_PLAYBACK_MAX=10,K.AUTO_PLAYBACK_MIN=5,K.AUTO_PLAYBACK_TIMEOUT=3e3,K.RECONNECT_TIME_MAX=5,K.RECONNECT_SLEEP_TIME=1e3,K.CONTROL_HIDE_TIME=3e3,K.DBCLICK_TIME=300,K.DBCLICK_FULLSCREEN=!0,K.MOBILE_DBCLICK_PLAY=!0,K.MOBILE_CLICK_PLAY=!1,K.AUTO_ORIENTATION_TIME=200,K.INFO_LOOP_TIME=1e3,K.FAST_FORWARD_VALUE=3,K.FAST_FORWARD_TIME=1e3,K.TOUCH_MOVE_RATIO=.5,K.VOLUME_STEP=.1,K.SEEK_STEP=5,K.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],K.ASPECT_RATIO=["default","4:3","16:9"],K.FLIP=["normal","horizontal","vertical"],K.FULLSCREEN_WEB_IN_BODY=!1,K.LOG_VERSION=!0,K.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){const t=u.createElement("style");t.id="artplayer-style",t.textContent=n.default,document.head.appendChild(t)}"undefined"!=typeof window&&(window.Artplayer=K),setTimeout((()=>{K.LOG_VERSION&&console.log(`%c ArtPlayer %c ${K.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")}))},{"bundle-text:./style/index.less":"kfOe8","option-validator":"bAWi2","./utils/emitter":"2bGVu","./utils":"h3rH9","./scheme":"AdvwB","./config":"9Xmqu","./template":"2gKYH","./i18n":"1AdeF","./player":"556MW","./control":"14IBq","./contextmenu":"7iUum","./info":"hD2Lg","./subtitle":"lum0D","./events":"1Epl5","./hotkey":"eTow4","./layer":"4fDoD","./loading":"fE0Sp","./notice":"9PuGy","./mask":"2etr0","./icons":"6dYSr","./setting":"bRHiA","./storage":"f2Thp","./plugins":"96ThS","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kfOe8:[function(t,e,r){e.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#fff3;--art-hover-color:#ffffff80;--art-loaded-color:#fff3;--art-loop-color:#ffffffbf;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-loop-width:2px;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#00000080;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{width:100%;height:100%;zoom:1;text-align:left;direction:ltr;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;width:100%;height:100%;cursor:pointer;position:absolute;inset:0}.art-poster{z-index:11;width:100%;height:100%;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;width:100%;height:100%;opacity:0;pointer-events:none;justify-content:flex-end;gap:var(--art-bottom-gap);padding:0 var(--art-padding);transition:opacity var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;width:100%;height:100%;width:0%;background-color:var(--art-hover-color);display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;width:100%;height:100%;width:0%;background-color:var(--art-loaded-color);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;width:100%;height:100%;width:0%;background-color:var(--art-theme);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;width:100%;height:100%;pointer-events:auto;width:var(--art-highlight-width);transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;bottom:10px;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom .art-progress .art-control-loop{z-index:0;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-loop .art-loop-point{z-index:0;width:100%;height:100%;width:var(--art-loop-width);background-color:var(--art-loop-color);transform:translateX(calc(var(--art-loop-width)/-2))scaleY(1.5);position:absolute;inset:0 0 0 0%}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{height:100%;flex:1;justify-content:center;align-items:center;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{height:100%;width:100%;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{width:100%;cursor:pointer;flex:1;justify-content:center;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{width:2px;border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;width:100%;height:100%;background-color:var(--art-theme);position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);transform-origin:100% 100%;max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transform:scale(var(--art-settings-scale));transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{min-width:32px;height:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{height:3px;width:80px;appearance:none;background-color:#fff3;outline:none}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{width:250px;text-overflow:ellipsis;white-space:nowrap;user-select:all;overflow:hidden}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;width:320px;height:180px;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;width:100%;height:100%;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-mini-progress-bar{z-index:0;width:100%;height:100%;height:var(--art-mini-progress-height);background-color:var(--art-theme);display:flex;position:absolute;inset:auto 0 0}.art-video-player .art-layer-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-lock .art-layer-mini-progress-bar{display:flex!important}.art-video-player.art-control-show .art-layer-mini-progress-bar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{width:100%;flex-shrink:0;justify-content:center;align-items:center;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000001;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(t,e,r){e.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return function(t){return"GeneratorFunction"===o(t)}(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(a=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2n)),o.export(r,"queryAll",(()=>i)),o.export(r,"addClass",(()=>s)),o.export(r,"removeClass",(()=>l)),o.export(r,"hasClass",(()=>c)),o.export(r,"append",(()=>u)),o.export(r,"remove",(()=>p)),o.export(r,"setStyle",(()=>d)),o.export(r,"setStyles",(()=>f)),o.export(r,"getStyle",(()=>h)),o.export(r,"sublings",(()=>m)),o.export(r,"inverseClass",(()=>g)),o.export(r,"tooltip",(()=>v)),o.export(r,"isInViewport",(()=>y)),o.export(r,"includeFromEvent",(()=>b)),o.export(r,"replaceElement",(()=>x)),o.export(r,"createElement",(()=>w)),o.export(r,"getIcon",(()=>j));var a=t("./compatibility");function n(t,e=document){return e.querySelector(t)}function i(t,e=document){return Array.from(e.querySelectorAll(t))}function s(t,e){return t.classList.add(e)}function l(t,e){return t.classList.remove(e)}function c(t,e){return t.classList.contains(e)}function u(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild??t.lastChild}function p(t){return t.parentNode.removeChild(t)}function d(t,e,r){return t.style[e]=r,t}function f(t,e){for(const r in e)d(t,r,e[r]);return t}function h(t,e,r=!0){const o=window.getComputedStyle(t,null).getPropertyValue(e);return r?parseFloat(o):o}function m(t){return Array.from(t.parentElement.children).filter((e=>e!==t))}function g(t,e){m(t).forEach((t=>l(t,e))),s(t,e)}function v(t,e,r="top"){a.isMobile||(t.setAttribute("aria-label",e),s(t,"hint--rounded"),s(t,`hint--${r}`))}function y(t,e=0){const r=t.getBoundingClientRect(),o=window.innerHeight??document.documentElement.clientHeight,a=window.innerWidth??document.documentElement.clientWidth,n=r.top-e<=o&&r.top+r.height+e>=0,i=r.left-e<=a+e&&r.left+r.width+e>=0;return n&&i}function b(t,e){return t.composedPath&&t.composedPath().indexOf(e)>-1}function x(t,e){return e.parentNode.replaceChild(t,e),t}function w(t){return document.createElement(t)}function j(t="",e=""){const r=w("i");return s(r,"art-icon"),s(r,`art-icon-${t}`),u(r,e),r}},{"./compatibility":"luXC1","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],luXC1:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",(()=>a)),o.export(r,"isSafari",(()=>n)),o.export(r,"isWechat",(()=>i)),o.export(r,"isIE",(()=>s)),o.export(r,"isAndroid",(()=>l)),o.export(r,"isIOS",(()=>c)),o.export(r,"isIOS13",(()=>u)),o.export(r,"isMobile",(()=>p));const a="undefined"!=typeof navigator?navigator.userAgent:"",n=/^((?!chrome|android).)*safari/i.test(a),i=/MicroMessenger/i.test(a),s=/MSIE|Trident/i.test(a),l=/android/i.test(a),c=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,u=c??(a.includes("Macintosh")&&navigator.maxTouchPoints>=1),p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)??u},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2nFlF":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",(()=>a)),o.export(r,"errorHandle",(()=>n));class a extends Error{constructor(t,e){super(t),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e??this.constructor),this.name="ArtPlayerError"}}function n(t,e){if(!t)throw new a(e);return t}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],yqFoT:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,((t,e,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=r+"00"),2===r.length&&(o=r+"0"),`${e},${o}`}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var e}function n(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function i(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map(((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`})).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map((t=>{const o=t.match(e);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((t=>t.trim())).join("\n")}:null})).filter((t=>t)).map(((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"")).filter((t=>t.trim())).join("\n\n")}`}o.defineInteropFlag(r),o.export(r,"srtToVtt",(()=>a)),o.export(r,"vttToBlob",(()=>n)),o.export(r,"assToVtt",(()=>i))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1VRQn":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t.includes("?")?a(t.split("?")[0]):t.includes("#")?a(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function n(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",(()=>a)),o.export(r,"download",(()=>n))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3weX2":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",(()=>a)),o.export(r,"has",(()=>i)),o.export(r,"get",(()=>s)),o.export(r,"mergeDeep",(()=>l));const a=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function i(t,e){return n.call(t,e)}function s(t,e){return Object.getOwnPropertyDescriptor(t,e)}function l(...t){const e=t=>t&&"object"==typeof t&&!Array.isArray(t);return t.reduce(((t,r)=>(Object.keys(r).forEach((o=>{const a=t[o],n=r[o];Array.isArray(a)&&Array.isArray(n)?t[o]=a.concat(...n):e(a)&&e(n)?t[o]=l(a,n):t[o]=n})),t)),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7kBIx":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t=0){return new Promise((e=>setTimeout(e,t)))}function n(t,e){let r;return function(...o){clearTimeout(r),r=setTimeout((()=>(r=null,t.apply(this,o))),e)}}function i(t,e){let r=!1;return function(...o){r||(t.apply(this,o),r=!0,setTimeout((function(){r=!1}),e))}}o.defineInteropFlag(r),o.export(r,"sleep",(()=>a)),o.export(r,"debounce",(()=>n)),o.export(r,"throttle",(()=>i))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"13atT":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function n(t){return t.charAt(0).toUpperCase()+t.slice(1)}function i(t){return["string","number"].includes(typeof t)}function s(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),o=Math.floor(t-3600*e-60*r);return(e>0?[e,r,o]:[r,o]).map((t=>t<10?`0${t}`:String(t))).join(":")}function l(t){return t.replace(/[&<>'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]??t)))}o.defineInteropFlag(r),o.export(r,"clamp",(()=>a)),o.export(r,"capitalize",(()=>n)),o.export(r,"isStringOrNumber",(()=>i)),o.export(r,"secondToTime",(()=>s)),o.export(r,"escape",(()=>l))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],AdvwB:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",(()=>d));var a=t("../utils");const n="array",i="boolean",s="string",l="number",c="object",u="function";function p(t,e,r){return(0,a.errorHandle)(e===s??e===l??t instanceof Element,`${r.join(".")} require '${s}' or 'Element' type`)}const d={html:p,disable:`?${i}`,name:`?${s}`,index:`?${l}`,style:`?${c}`,click:`?${u}`,mounted:`?${u}`,tooltip:`?${s}|${l}`,width:`?${l}`,selector:`?${n}`,onSelect:`?${u}`,switch:`?${i}`,onSwitch:`?${u}`,range:`?${n}`,onRange:`?${u}`,onChange:`?${u}`};r.default={id:s,container:p,url:s,poster:s,type:s,theme:s,lang:s,volume:l,isLive:i,muted:i,autoplay:i,autoSize:i,autoMini:i,loop:i,flip:i,playbackRate:i,aspectRatio:i,screenshot:i,setting:i,hotkey:i,pip:i,mutex:i,backdrop:i,fullscreen:i,fullscreenWeb:i,subtitleOffset:i,miniProgressBar:i,useSSR:i,playsInline:i,lock:i,fastForward:i,autoPlayback:i,autoOrientation:i,airplay:i,plugins:[u],layers:[d],contextmenu:[d],settings:[d],controls:[{...d,position:(t,e,r)=>{const o=["top","left","right"];return(0,a.errorHandle)(o.includes(t),`${r.join(".")} only accept ${o.toString()} as parameters`)}}],quality:[{default:`?${i}`,html:s,url:s}],highlight:[{time:l,text:s}],thumbnails:{url:s,number:l,column:l,width:l,height:l},subtitle:{url:s,type:s,style:c,escape:i,encoding:s,onVttLoad:u},moreVideoAttr:c,i18n:c,icons:c,cssVar:c,customType:c}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9Xmqu":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2gKYH":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("./utils");class a{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=(0,o.query)(e.container),(0,o.errorHandle)(this.$container,`No container element found by ${e.container}`));const a=this.$container.tagName.toLowerCase();(0,o.errorHandle)("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),(0,o.errorHandle)(r.instances.every((t=>t.template.$container!==this.$container)),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.$original=this.$container.cloneNode(!0),this.init()}static get html(){return'
Player version:
5.1.0
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
'}query(t){return(0,o.query)(t,this.$container)}init(){const{option:t}=this.art;t.useSSR||(this.$container.innerHTML=a.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.backdrop&&(0,o.addClass)(this.$player,"art-backdrop"),o.isMobile&&(0,o.addClass)(this.$player,"art-mobile")}destroy(t){t?(0,o.replaceElement)(this.$original,this.$container):(0,o.addClass)(this.$player,"art-destroy")}}r.default=a},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1AdeF":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("./zh-cn"),i=o.interopDefault(n);r.default=class{constructor(t){this.art=t,this.languages={"zh-cn":i.default},this.language={},this.update(t.option.i18n)}init(){const t=this.art.option.lang.toLowerCase();this.language=this.languages[t]??{}}get(t){return this.language[t]??t}update(t){this.languages=(0,a.mergeDeep)(this.languages,t),this.init()}}},{"../utils":"h3rH9","./zh-cn":"3ZSKq","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3ZSKq":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);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":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"556MW":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./urlMix"),n=o.interopDefault(a),i=t("./attrMix"),s=o.interopDefault(i),l=t("./playMix"),c=o.interopDefault(l),u=t("./pauseMix"),p=o.interopDefault(u),d=t("./toggleMix"),f=o.interopDefault(d),h=t("./seekMix"),m=o.interopDefault(h),g=t("./volumeMix"),v=o.interopDefault(g),y=t("./currentTimeMix"),b=o.interopDefault(y),x=t("./durationMix"),w=o.interopDefault(x),j=t("./switchMix"),k=o.interopDefault(j),S=t("./playbackRateMix"),$=o.interopDefault(S),I=t("./aspectRatioMix"),T=o.interopDefault(I),E=t("./screenshotMix"),O=o.interopDefault(E),M=t("./fullscreenMix"),F=o.interopDefault(M),C=t("./fullscreenWebMix"),D=o.interopDefault(C),H=t("./pipMix"),B=o.interopDefault(H),A=t("./loadedMix"),R=o.interopDefault(A),z=t("./playedMix"),L=o.interopDefault(z),P=t("./playingMix"),N=o.interopDefault(P),_=t("./autoSizeMix"),Z=o.interopDefault(_),V=t("./rectMix"),q=o.interopDefault(V),W=t("./flipMix"),U=o.interopDefault(W),Y=t("./miniMix"),X=o.interopDefault(Y),G=t("./loopMix"),K=o.interopDefault(G),J=t("./posterMix"),Q=o.interopDefault(J),tt=t("./autoHeightMix"),et=o.interopDefault(tt),rt=t("./cssVarMix"),ot=o.interopDefault(rt),at=t("./themeMix"),nt=o.interopDefault(at),it=t("./typeMix"),st=o.interopDefault(it),lt=t("./stateMix"),ct=o.interopDefault(lt),ut=t("./subtitleOffsetMix"),pt=o.interopDefault(ut),dt=t("./airplayMix"),ft=o.interopDefault(dt),ht=t("./qualityMix"),mt=o.interopDefault(ht),gt=t("./optionInit"),vt=o.interopDefault(gt),yt=t("./eventInit"),bt=o.interopDefault(yt);r.default=class{constructor(t){(0,n.default)(t),(0,s.default)(t),(0,c.default)(t),(0,p.default)(t),(0,f.default)(t),(0,m.default)(t),(0,v.default)(t),(0,b.default)(t),(0,w.default)(t),(0,k.default)(t),(0,$.default)(t),(0,T.default)(t),(0,O.default)(t),(0,F.default)(t),(0,D.default)(t),(0,B.default)(t),(0,R.default)(t),(0,L.default)(t),(0,N.default)(t),(0,Z.default)(t),(0,q.default)(t),(0,U.default)(t),(0,X.default)(t),(0,K.default)(t),(0,Q.default)(t),(0,et.default)(t),(0,ot.default)(t),(0,nt.default)(t),(0,st.default)(t),(0,ct.default)(t),(0,pt.default)(t),(0,ft.default)(t),(0,mt.default)(t),(0,bt.default)(t),(0,vt.default)(t)}}},{"./urlMix":"2mRAc","./attrMix":"2EA19","./playMix":"fD2Tc","./pauseMix":"c3LGJ","./toggleMix":"fVsAa","./seekMix":"dmROF","./volumeMix":"9jtfB","./currentTimeMix":"7NCDR","./durationMix":"YS7JL","./switchMix":"dzUqN","./playbackRateMix":"5I2mT","./aspectRatioMix":"7m6R8","./screenshotMix":"2dgtR","./fullscreenMix":"fKDW8","./fullscreenWebMix":"lNvYI","./pipMix":"8j7oC","./loadedMix":"dwVOT","./playedMix":"dDeLx","./playingMix":"ceoBp","./autoSizeMix":"lcWXX","./rectMix":"f7y88","./flipMix":"l4qt5","./miniMix":"9ZPBQ","./loopMix":"d89IV","./posterMix":"5K8hA","./autoHeightMix":"3T5ls","./cssVarMix":"6KfHs","./themeMix":"7lcSc","./typeMix":"8JgTw","./stateMix":"cebt1","./subtitleOffsetMix":"hJvIy","./airplayMix":"4Tp0U","./qualityMix":"3wZgN","./optionInit":"iPdgW","./eventInit":"3mj0J","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2mRAc":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{option:e,template:{$video:r}}=t;(0,o.def)(t,"url",{get:()=>r.src,async set(a){if(a){const n=t.url,i=e.type??(0,o.getExt)(a),s=e.customType[i];i&&s?(await(0,o.sleep)(),t.loading.show=!0,s.call(t,r,a,t)):(URL.revokeObjectURL(n),r.src=a),n!==t.url&&(t.option.url=a,t.isReady&&n&&t.once("video:canplay",(()=>{t.emit("restart",a)})))}else await(0,o.sleep)(),t.loading.show=!0}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2EA19":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$video:e}}=t;(0,o.def)(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fD2Tc:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,notice:r,option:a,constructor:{instances:n},template:{$video:i}}=t;(0,o.def)(t,"play",{value:async function(){const o=await i.play();if(r.show=e.get("Play"),t.emit("play"),a.mutex)for(let e=0;et.playing?t.pause():t.play()})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dmROF:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{notice:e}=t;(0,o.def)(t,"seek",{set(r){t.currentTime=r,t.emit("seek",t.currentTime),t.duration&&(e.show=`${(0,o.secondToTime)(t.currentTime)} / ${(0,o.secondToTime)(t.duration)}`)}}),(0,o.def)(t,"forward",{set(e){t.seek=t.currentTime+e}}),(0,o.def)(t,"backward",{set(e){t.seek=t.currentTime-e}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9jtfB":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$video:e},i18n:r,notice:a,storage:n}=t;(0,o.def)(t,"volume",{get:()=>e.volume??0,set:t=>{e.volume=(0,o.clamp)(t,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*e.volume,10)}`,0!==e.volume&&n.set("volume",e.volume)}}),(0,o.def)(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7NCDR":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$video:e}=t.template;(0,o.def)(t,"currentTime",{get:()=>e.currentTime??0,set:r=>{r=parseFloat(r),Number.isNaN(r)||(e.currentTime=(0,o.clamp)(r,0,t.duration))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],YS7JL:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e??0}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dzUqN:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){function e(e,r){return new Promise(((o,a)=>{if(e===t.url)return;const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="",t.once("video:error",a),t.once("video:canplay",(async()=>{t.playbackRate=s,t.aspectRatio=i,t.currentTime=r,n&&await t.play(),t.notice.show="",o()}))}))}(0,o.def)(t,"switchQuality",{value:r=>e(r,t.currentTime)}),(0,o.def)(t,"switchUrl",{value:t=>e(t,0)}),(0,o.def)(t,"switch",{set:t.switchUrl})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5I2mT":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$video:e},i18n:r,notice:a}=t;(0,o.def)(t,"playbackRate",{get:()=>e.playbackRate,set(o){if(o){if(o===e.playbackRate)return;e.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`}else t.playbackRate=1}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7m6R8":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,notice:r,template:{$video:a,$player:n}}=t;(0,o.def)(t,"aspectRatio",{get:()=>n.dataset.aspectRatio??"default",set(i){if(i||(i="default"),"default"===i)(0,o.setStyle)(a,"width",null),(0,o.setStyle)(a,"height",null),(0,o.setStyle)(a,"margin",null),delete n.dataset.aspectRatio;else{const t=i.split(":").map(Number),{clientWidth:e,clientHeight:r}=n,s=e/r,l=t[0]/t[1];s>l?((0,o.setStyle)(a,"width",l*r+"px"),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height",e/l+"px"),(0,o.setStyle)(a,"margin","auto 0")),n.dataset.aspectRatio=i}r.show=`${e.get("Aspect Ratio")}: ${"default"===i?e.get("Default"):i}`,t.emit("aspectRatio",i)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2dgtR":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{notice:e,template:{$video:r}}=t,a=(0,o.createElement)("canvas");(0,o.def)(t,"getDataURL",{value:()=>new Promise(((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),t(a.toDataURL("image/png"))}catch(t){e.show=t,o(t)}}))}),(0,o.def)(t,"getBlobUrl",{value:()=>new Promise(((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob((e=>{t(URL.createObjectURL(e))}))}catch(t){e.show=t,o(t)}}))}),(0,o.def)(t,"screenshot",{value:async()=>{const e=await t.getDataURL();return(0,o.download)(e,`artplayer_${(0,o.secondToTime)(r.currentTime)}.png`),t.emit("screenshot",e),e}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fKDW8:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../libs/screenfull"),n=o.interopDefault(a),i=t("../utils");r.default=function(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t;t.once("video:loadedmetadata",(()=>{n.default.isEnabled?(t=>{n.default.on("change",(()=>{t.emit("fullscreen",n.default.isFullscreen)})),(0,i.def)(t,"fullscreen",{get:()=>n.default.isFullscreen,async set(e){e?(t.state="fullscreen",await n.default.request(a),(0,i.addClass)(a,"art-fullscreen")):(await n.default.exit(),(0,i.removeClass)(a,"art-fullscreen")),t.emit("resize")}})})(t):document.fullscreenEnabled??o.webkitSupportsFullscreen?(t=>{(0,i.def)(t,"fullscreen",{get:()=>o.webkitDisplayingFullscreen,set(e){e?(t.state="fullscreen",o.webkitEnterFullscreen(),t.emit("fullscreen",!0)):(o.webkitExitFullscreen(),t.emit("fullscreen",!1)),t.emit("resize")}})})(t):(0,i.def)(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),(0,i.def)(t,"fullscreen",(0,i.get)(t,"fullscreen"))}))}},{"../libs/screenfull":"lUahW","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lUahW:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);const o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=(()=>{if("undefined"==typeof document)return!1;const t=o[0],e={};for(const r of o){if(r[1]in document){for(const[o,a]of r.entries())e[t[o]]=a;return e}}return!1})(),n={change:a.fullscreenchange,error:a.fullscreenerror};let i={request:(t=document.documentElement,e)=>new Promise(((r,o)=>{const n=()=>{i.off("change",n),r()};i.on("change",n);const s=t[a.requestFullscreen](e);s instanceof Promise&&s.then(n).catch(o)})),exit:()=>new Promise(((t,e)=>{if(!i.isFullscreen)return void t();const r=()=>{i.off("change",r),t()};i.on("change",r);const o=document[a.exitFullscreen]();o instanceof Promise&&o.then(r).catch(e)})),toggle:(t,e)=>i.isFullscreen?i.exit():i.request(t,e),onchange(t){i.on("change",t)},onerror(t){i.on("error",t)},on(t,e){const r=n[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=n[t];r&&document.removeEventListener(r,e,!1)},raw:a};Object.defineProperties(i,{isFullscreen:{get:()=>Boolean(document[a.fullscreenElement])},element:{enumerable:!0,get:()=>document[a.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[a.fullscreenEnabled])}}),a||(i={isEnabled:!1}),r.default=i},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lNvYI:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{constructor:e,template:{$container:r,$player:a}}=t;let n="";(0,o.def)(t,"fullscreenWeb",{get:()=>(0,o.hasClass)(a,"art-fullscreen-web"),set(i){i?(n=a.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),t.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(r,a),n&&(a.style.cssText=n,n=""),(0,o.removeClass)(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8j7oC":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,notice:r,template:{$video:a}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:a}=t;e.disablePictureInPicture=!1,(0,o.def)(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch((t=>{throw a.show=t,t}))):document.exitPictureInPicture().catch((t=>{throw a.show=t,t}))}}),r(e,"enterpictureinpicture",(()=>{t.emit("pip",!0)})),r(e,"leavepictureinpicture",(()=>{t.emit("pip",!1)}))}(t):a.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),(0,o.def)(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):(0,o.def)(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dwVOT:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$video:e}=t.template;(0,o.def)(t,"loaded",{get:()=>t.loadedTime/e.duration}),(0,o.def)(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dDeLx:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"played",{get:()=>t.currentTime/t.duration})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],ceoBp:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$video:e}=t.template;(0,o.def)(t,"playing",{get:()=>!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lcWXX:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$container:e,$player:r,$video:a}=t.template;(0,o.def)(t,"autoSize",{value(){const{videoWidth:n,videoHeight:i}=a,{width:s,height:l}=e.getBoundingClientRect(),c=n/i;if(s/l>c){const t=l*c/s*100;(0,o.setStyle)(r,"width",`${t}%`),(0,o.setStyle)(r,"height","100%")}else{const t=s/c/l*100;(0,o.setStyle)(r,"width","100%"),(0,o.setStyle)(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f7y88:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"rect",{get:()=>t.template.$player.getBoundingClientRect()});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[a]})}(0,o.def)(t,"x",{get:()=>t.left+window.pageXOffset}),(0,o.def)(t,"y",{get:()=>t.top+window.pageYOffset})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],l4qt5:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$player:e},i18n:r,notice:a}=t;(0,o.def)(t,"flip",{get:()=>e.dataset.flip??"normal",set(n){n||(n="normal"),"normal"===n?delete e.dataset.flip:e.dataset.flip=n,a.show=`${r.get("Video Flip")}: ${r.get((0,o.capitalize)(n))}`,t.emit("flip",n)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9ZPBQ":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{icons:e,proxy:r,storage:a,template:{$player:n,$video:i}}=t;let s=!1,l=0,c=0;function u(){const{$mini:e}=t.template;e&&((0,o.removeClass)(n,"art-mini"),(0,o.setStyle)(e,"display","none"),n.prepend(i),t.emit("mini",!1))}function p(e,r){t.playing?((0,o.setStyle)(e,"display","none"),(0,o.setStyle)(r,"display","flex")):((0,o.setStyle)(e,"display","flex"),(0,o.setStyle)(r,"display","none"))}function d(){const{$mini:e}=t.template,r=e.getBoundingClientRect(),n=window.innerHeight-r.height-50,i=window.innerWidth-r.width-50;a.set("top",n),a.set("left",i),(0,o.setStyle)(e,"top",`${n}px`),(0,o.setStyle)(e,"left",`${i}px`)}(0,o.def)(t,"mini",{get:()=>(0,o.hasClass)(n,"art-mini"),set(f){if(f){t.state="mini",(0,o.addClass)(n,"art-mini");const f=function(){const{$mini:n}=t.template;if(n)return(0,o.append)(n,i),(0,o.setStyle)(n,"display","flex");{const n=(0,o.createElement)("div");(0,o.addClass)(n,"art-mini-popup"),(0,o.append)(document.body,n),t.template.$mini=n,(0,o.append)(n,i);const d=(0,o.append)(n,'
');(0,o.append)(d,e.close),r(d,"click",u);const f=(0,o.append)(n,'
'),h=(0,o.append)(f,e.play),m=(0,o.append)(f,e.pause);return r(h,"click",(()=>t.play())),r(m,"click",(()=>t.pause())),p(h,m),t.on("video:playing",(()=>p(h,m))),t.on("video:pause",(()=>p(h,m))),t.on("video:timeupdate",(()=>p(h,m))),r(n,"mousedown",(t=>{s=0===t.button,l=t.pageX,c=t.pageY})),t.on("document:mousemove",(t=>{if(s){(0,o.addClass)(n,"art-mini-droging");const e=t.pageX-l,r=t.pageY-c;(0,o.setStyle)(n,"transform",`translate(${e}px, ${r}px)`)}})),t.on("document:mouseup",(()=>{if(s){s=!1,(0,o.removeClass)(n,"art-mini-droging");const t=n.getBoundingClientRect();a.set("left",t.left),a.set("top",t.top),(0,o.setStyle)(n,"left",`${t.left}px`),(0,o.setStyle)(n,"top",`${t.top}px`),(0,o.setStyle)(n,"transform",null)}})),n}}(),h=a.get("top"),m=a.get("left");h&&m?((0,o.setStyle)(f,"top",`${h}px`),(0,o.setStyle)(f,"left",`${m}px`),(0,o.isInViewport)(f)||d()):d(),t.emit("mini",!0)}else u()}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],d89IV:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){let e=[];(0,o.def)(t,"loop",{get:()=>e,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){const a=(0,o.clamp)(r[0],0,Math.min(r[1],t.duration)),n=(0,o.clamp)(r[1],a,t.duration);e=n-a>=1?[a,n]:[]}else e=[];t.emit("loop",e)}}),t.on("video:timeupdate",(()=>{e.length&&(t.currentTimee[1])&&(t.seek=e[0])}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5K8hA":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$poster:e}}=t;(0,o.def)(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){(0,o.setStyle)(e,"backgroundImage",`url(${t})`)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3T5ls":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$container:e,$video:r}}=t;(0,o.def)(t,"autoHeight",{value(){const{clientWidth:a}=e,{videoHeight:n,videoWidth:i}=r,s=n*(a/i);(0,o.setStyle)(e,"height",s+"px"),t.emit("autoHeight",s)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6KfHs":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$player:e}=t.template;(0,o.def)(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7lcSc":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8JgTw":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],cebt1:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(t,"state",{get:()=>e.find((e=>t[e]))??"standard",set(r){for(let o=0;o{s=[]})),(0,o.def)(t,"subtitleOffset",{get:()=>i,set(o){if(a.$track&&a.$track.track){const l=Array.from(a.$track.track.cues);i=e(o,-5,5);for(let r=0;r{switch(t.availability){case"available":i=!0;break;case"not-available":i=!1}})):i=!1,(0,o.def)(t,"airplay",{value(){i?(n.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3wZgN":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"quality",{set(e){const{controls:r,notice:o,i18n:a}=t,n=e.find((t=>t.default))??e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:n?n.html:"",selector:e,async onSelect(e){await t.switchQuality(e.url),o.show=`${a.get("Switch Video")}: ${e.html}`}})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iPdgW:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{option:e,storage:r,template:{$video:a,$poster:n}}=t;for(const r in e.moreVideoAttr)t.attr(r,e.moreVideoAttr[r]);e.muted&&(t.muted=e.muted),e.volume&&(a.volume=(0,o.clamp)(e.volume,0,1));const i=r.get("volume");"number"==typeof i&&(a.volume=(0,o.clamp)(i,0,1)),e.poster&&(0,o.setStyle)(n,"backgroundImage",`url(${e.poster})`),e.autoplay&&(a.autoplay=e.autoplay),e.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const r in e.cssVar)t.cssVar(r,e.cssVar[r]);t.url=e.url}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3mj0J":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../config"),n=o.interopDefault(a),i=t("../utils");r.default=function(t){const{i18n:e,notice:r,option:o,constructor:a,proxy:s,template:{$player:l,$video:c,$poster:u}}=t;let p=0;for(let e=0;e{t.emit(`video:${e.type}`,e)}));t.on("video:canplay",(()=>{p=0,t.loading.show=!1})),t.once("video:canplay",(()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")})),t.on("video:ended",(()=>{o.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)})),t.on("video:error",(async n=>{p{t.emit("resize"),i.isMobile&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)})),t.on("video:loadstart",(()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0})),t.on("video:pause",(()=>{t.controls.show=!0,t.mask.show=!0})),t.on("video:play",(()=>{t.mask.show=!1,(0,i.setStyle)(u,"display","none")})),t.on("video:playing",(()=>{t.mask.show=!1})),t.on("video:progress",(()=>{t.playing&&(t.loading.show=!1)})),t.on("video:seeked",(()=>{t.loading.show=!1,t.mask.show=!0})),t.on("video:seeking",(()=>{t.loading.show=!0,t.mask.show=!1})),t.on("video:timeupdate",(()=>{t.mask.show=!1})),t.on("video:waiting",(()=>{t.loading.show=!0,t.mask.show=!1}))}},{"../config":"9Xmqu","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"14IBq":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("../utils/component"),i=o.interopDefault(n),s=t("./fullscreen"),l=o.interopDefault(s),c=t("./fullscreenWeb"),u=o.interopDefault(c),p=t("./pip"),d=o.interopDefault(p),f=t("./playAndPause"),h=o.interopDefault(f),m=t("./progress"),g=o.interopDefault(m),v=t("./time"),y=o.interopDefault(v),b=t("./volume"),x=o.interopDefault(b),w=t("./setting"),j=o.interopDefault(w),k=t("./thumbnails"),S=o.interopDefault(k),$=t("./screenshot"),I=o.interopDefault($),T=t("./loop"),E=o.interopDefault(T),O=t("./airplay"),M=o.interopDefault(O);class F extends i.default{constructor(t){super(t),this.name="control";const{proxy:e,constructor:r,template:{$player:o}}=t;let n=Date.now();e(o,["click","mousemove","touchstart","touchmove"],(()=>{this.show=!0,(0,a.removeClass)(o,"art-hide-cursor"),(0,a.addClass)(o,"art-hover"),n=Date.now()})),t.on("video:timeupdate",(()=>{!t.isInput&&t.playing&&this.show&&Date.now()-n>=r.CONTROL_HIDE_TIME&&(this.show=!1,(0,a.addClass)(o,"art-hide-cursor"),(0,a.removeClass)(o,"art-hover"))})),this.init()}init(){const{option:t}=this.art;t.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),!t.thumbnails.url||t.isLive||a.isMobile||this.add((0,S.default)({name:"thumbnails",position:"top",index:20})),this.add((0,E.default)({name:"loop",position:"top",index:30})),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,a.sleep)().then((()=>{this.art.quality=t.quality})),t.screenshot&&!a.isMobile&&this.add((0,I.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,M.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,u.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let e=0;eNumber(t.dataset.index)>=Number(n.dataset.index)));u?u.insertAdjacentElement("beforebegin",n):(0,a.append)(this.$parent,n),e.html&&(0,a.append)(n,e.html),e.style&&(0,a.setStyles)(n,e.style),e.tooltip&&(0,a.tooltip)(n,e.tooltip);const p=[];if(e.click){const t=this.art.events.proxy(n,"click",(t=>{t.preventDefault(),e.click.call(this.art,this,t)}));p.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.addSelector(e,n,p),this[r]=n,this.cache.set(r,{$ref:n,events:p,option:e}),e.mounted&&e.mounted.call(this.art,n),n}addSelector(t,e,r){const{hover:o,proxy:i}=this.art.events;(0,a.addClass)(e,"art-control-selector");const s=(0,a.createElement)("div");(0,a.addClass)(s,"art-selector-value"),(0,a.append)(s,t.html),e.innerText="",(0,a.append)(e,s);const l=t.selector.map(((t,e)=>`
${t.html}
`)).join(""),c=(0,a.createElement)("div");(0,a.addClass)(c,"art-selector-list"),(0,a.append)(c,l),(0,a.append)(e,c);const u=()=>{const t=(0,a.getStyle)(e,"width")/2-(0,a.getStyle)(c,"width")/2;c.style.left=`${t}px`};o(e,u);const p=i(c,"click",(async e=>{const r=(e.composedPath()??[]).find((t=>(0,a.hasClass)(t,"art-selector-item")));if(!r)return;(0,a.inverseClass)(r,"art-current");const o=Number(r.dataset.index),i=t.selector[o]??{};if(s.innerText=r.innerText,t.onSelect){const o=await t.onSelect.call(this.art,i,r,e);(0,n.isStringOrNumber)(o)&&(s.innerHTML=o)}u()}));r.push(p)}remove(t){const e=this.cache.get(t);(0,i.errorHandle)(e,`Can't find [${t}] from the [${this.name}]`),e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(let t=0;t({...t,tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e,i=(0,o.append)(t,a.fullscreenOn),s=(0,o.append)(t,a.fullscreenOff);(0,o.setStyle)(s,"display","none"),r(t,"click",(()=>{e.fullscreen=!e.fullscreen})),e.on("fullscreen",(e=>{e?((0,o.tooltip)(t,n.get("Exit Fullscreen")),(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(t,n.get("Fullscreen")),(0,o.setStyle)(i,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"66eEC":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e,i=(0,o.append)(t,a.fullscreenWebOn),s=(0,o.append)(t,a.fullscreenWebOff);(0,o.setStyle)(s,"display","none"),r(t,"click",(()=>{e.fullscreenWeb=!e.fullscreenWeb})),e.on("fullscreenWeb",(e=>{e?((0,o.tooltip)(t,n.get("Exit Web Fullscreen")),(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(t,n.get("Web Fullscreen")),(0,o.setStyle)(i,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kCFkA:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e;(0,o.append)(t,a.pip),r(t,"click",(()=>{e.pip=!e.pip})),e.on("pip",(e=>{(0,o.tooltip)(t,n.get(e?"Exit PIP Mode":"PIP Mode"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iRhgD:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a,i18n:n}=e,i=(0,o.append)(t,a.play),s=(0,o.append)(t,a.pause);function l(){(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(s,"display","none")}function c(){(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(s,"display","flex")}(0,o.tooltip)(i,n.get("Play")),(0,o.tooltip)(s,n.get("Pause")),r(i,"click",(()=>{e.play()})),r(s,"click",(()=>{e.pause()})),e.playing?c():l(),e.on("video:playing",(()=>{c()})),e.on("video:pause",(()=>{l()}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],aBBSH:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",(()=>n)),o.export(r,"setCurrentTime",(()=>i));var a=t("../utils");function n(t,e){const{$progress:r}=t.template,{left:o}=r.getBoundingClientRect(),n=a.isMobile?e.touches[0].clientX:e.clientX,i=(0,a.clamp)(n-o,0,r.clientWidth),s=i/r.clientWidth*t.duration;return{second:s,time:(0,a.secondToTime)(s),width:i,percentage:(0,a.clamp)(i/r.clientWidth,0,1)}}function i(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,o=r*t.duration;t.emit("setBar","played",r),t.seek=o}else{const{second:r,percentage:o}=n(t,e);t.emit("setBar","played",o),t.seek=r}}r.default=function(t){return e=>{const{icons:r,option:o,proxy:s}=e;return{...t,html:'
',mounted:t=>{let l=!1;const c=(0,a.query)(".art-progress-hover",t),u=(0,a.query)(".art-progress-loaded",t),p=(0,a.query)(".art-progress-played",t),d=(0,a.query)(".art-progress-highlight",t),f=(0,a.query)(".art-progress-indicator",t),h=(0,a.query)(".art-progress-tip",t);function m(t,e){"loaded"===t&&(0,a.setStyle)(u,"width",100*e+"%"),"played"===t&&((0,a.setStyle)(p,"width",100*e+"%"),(0,a.setStyle)(f,"left",100*e+"%"))}r.indicator?(0,a.append)(f,r.indicator):(0,a.setStyle)(f,"backgroundColor","var(--art-theme)"),e.on("video:loadedmetadata",(()=>{for(let t=0;t`;(0,a.append)(d,i)}})),m("loaded",e.loaded),e.on("setBar",((t,e)=>{m(t,e)})),e.on("video:progress",(()=>{m("loaded",e.loaded)})),e.constructor.USE_RAF?e.on("raf",(()=>{m("played",e.played)})):e.on("video:timeupdate",(()=>{m("played",e.played)})),e.on("video:ended",(()=>{m("played",1)})),a.isMobile||(s(t,"click",(t=>{t.target!==f&&i(e,t)})),s(t,"mousemove",(r=>{!function(t){const{width:r}=n(e,t);(0,a.setStyle)(c,"width",`${r}px`),(0,a.setStyle)(c,"display","flex")}(r),(0,a.setStyle)(h,"display","flex"),(0,a.includeFromEvent)(r,d)?function(r){const{width:o}=n(e,r),{text:i}=r.target.dataset;h.innerHTML=i;const s=h.clientWidth;o<=s/2?(0,a.setStyle)(h,"left",0):o>t.clientWidth-s/2?(0,a.setStyle)(h,"left",t.clientWidth-s+"px"):(0,a.setStyle)(h,"left",o-s/2+"px")}(r):function(r){const{width:o,time:i}=n(e,r);h.innerHTML=i;const s=h.clientWidth;o<=s/2?(0,a.setStyle)(h,"left",0):o>t.clientWidth-s/2?(0,a.setStyle)(h,"left",t.clientWidth-s+"px"):(0,a.setStyle)(h,"left",o-s/2+"px")}(r)})),s(t,"mouseleave",(()=>{(0,a.setStyle)(h,"display","none"),(0,a.setStyle)(c,"display","none")})),s(t,"mousedown",(t=>{l=0===t.button})),e.on("document:mousemove",(t=>{if(l){const{second:r,percentage:o}=n(e,t);m("played",o),e.seek=r}})),e.on("document:mouseup",(()=>{l&&(l=!1)})))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7H0CE":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,style:o.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${(0,o.secondToTime)(e.currentTime)} / ${(0,o.secondToTime)(e.duration)}`;r!==t.innerText&&(t.innerText=r)}r();const a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t({...t,mounted:t=>{const{proxy:r,icons:a}=e,n=(0,o.append)(t,a.volume),i=(0,o.append)(t,a.volumeClose),s=(0,o.append)(t,'
'),l=(0,o.append)(s,'
'),c=(0,o.append)(l,'
'),u=(0,o.append)(l,'
'),p=(0,o.append)(u,'
'),d=(0,o.append)(p,'
'),f=(0,o.append)(u,'
');function h(t){const{top:e,height:r}=u.getBoundingClientRect();return 1-(t.clientY-e)/r}function m(){if(e.muted??0===e.volume)(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(f,"top","100%"),(0,o.setStyle)(d,"top","100%"),c.innerText=0;else{const t=100*e.volume;(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(f,"top",100-t+"%"),(0,o.setStyle)(d,"top",100-t+"%"),c.innerText=Math.floor(t)}}if(m(),e.on("video:volumechange",m),r(n,"click",(()=>{e.muted=!0})),r(i,"click",(()=>{e.muted=!1})),o.isMobile)(0,o.setStyle)(s,"display","none");else{let t=!1;r(u,"mousedown",(r=>{t=0===r.button,e.volume=h(r)})),e.on("document:mousemove",(r=>{t&&(e.muted=!1,e.volume=h(r))})),e.on("document:mouseup",(()=>{t&&(t=!1)}))}}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8BrCu":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e;(0,o.append)(t,a.setting),r(t,"click",(()=>{e.setting.toggle(),e.setting.updateStyle()})),e.on("setting",(e=>{(0,o.tooltip)(t,n.get(e?"Hide Setting":"Show Setting"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2HiWx":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils"),a=t("./progress");r.default=function(t){return e=>({...t,mounted:t=>{const{option:r,template:{$progress:n,$video:i},events:{proxy:s,loadImg:l}}=e;let c=null,u=!1,p=!1;s(n,"mousemove",(async s=>{if(!u){u=!0;const t=await l(r.thumbnails.url);c=t,p=!0}p&&((0,o.setStyle)(t,"display","flex"),function(s){const{width:l}=(0,a.getPosFromEvent)(e,s),{url:u,number:p,column:d,width:f,height:h}=r.thumbnails,m=f??c.naturalWidth/d,g=h??m/(i.videoWidth/i.videoHeight),v=n.clientWidth/p,y=Math.floor(l/v),b=Math.ceil(y/d)-1,x=y%d??d-1;(0,o.setStyle)(t,"backgroundImage",`url(${u})`),(0,o.setStyle)(t,"height",`${g}px`),(0,o.setStyle)(t,"width",`${m}px`),(0,o.setStyle)(t,"backgroundPosition",`-${x*m}px -${b*g}px`),l<=m/2?(0,o.setStyle)(t,"left",0):l>n.clientWidth-m/2?(0,o.setStyle)(t,"left",n.clientWidth-m+"px"):(0,o.setStyle)(t,"left",l-m/2+"px")}(s))})),s(n,"mouseleave",(()=>{(0,o.setStyle)(t,"display","none")})),e.on("hover",(e=>{e||(0,o.setStyle)(t,"display","none")}))}})}},{"../utils":"h3rH9","./progress":"aBBSH","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],c1GeG:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:a}=e;(0,o.append)(t,a.screenshot),r(t,"click",(()=>{e.screenshot()}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fiwRm:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,mounted:t=>{const r=(0,o.append)(t,''),a=(0,o.append)(t,'');e.on("loop",(n=>{n&&n.length?((0,o.setStyle)(t,"display","flex"),(0,o.setStyle)(r,"left",`calc(${n[0]/e.duration*100}% - ${r.clientWidth}px)`),(0,o.setStyle)(a,"left",n[1]/e.duration*100+"%")):(0,o.setStyle)(t,"display","none")}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6GRju":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:a}=e;(0,o.append)(t,a.airplay),r(t,"click",(()=>e.airplay()))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7iUum":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("../utils/component"),i=o.interopDefault(n),s=t("./playbackRate"),l=o.interopDefault(s),c=t("./aspectRatio"),u=o.interopDefault(c),p=t("./flip"),d=o.interopDefault(p),f=t("./info"),h=o.interopDefault(f),m=t("./version"),g=o.interopDefault(m),v=t("./close"),y=o.interopDefault(v);class b extends i.default{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,a.isMobile||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:o}}=this.art;t.playbackRate&&this.add((0,l.default)({name:"playbackRate",index:10})),t.aspectRatio&&this.add((0,u.default)({name:"aspectRatio",index:20})),t.flip&&this.add((0,d.default)({name:"flip",index:30})),this.add((0,h.default)({name:"info",index:40})),this.add((0,g.default)({name:"version",index:50})),this.add((0,y.default)({name:"close",index:60}));for(let e=0;e{if(t.preventDefault(),!this.art.constructor.CONTEXTMENU)return;this.show=!0;const e=t.clientX,n=t.clientY,{height:i,width:s,left:l,top:c}=r.getBoundingClientRect(),{height:u,width:p}=o.getBoundingClientRect();let d=e-l,f=n-c;e+p>l+s&&(d=s-p),n+u>c+i&&(f=i-u),(0,a.setStyles)(o,{top:`${f}px`,left:`${d}px`})})),e(r,"click",(t=>{(0,a.includeFromEvent)(t,o)||(this.show=!1)})),this.art.on("blur",(()=>{this.show=!1}))}}r.default=b},{"../utils":"h3rH9","../utils/component":"guki8","./playbackRate":"f1W36","./aspectRatio":"afxZC","./flip":"9jCuX","./info":"k8wIZ","./version":"bb0TU","./close":"9zTkI","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f1W36:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:a}}=e,n=a.map((t=>`${1===t?r.get("Normal"):t.toFixed(1)}`)).join("");return{...t,html:`${r.get("Play Speed")}: ${n}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.playbackRate=Number(o),t.show=!1)},mounted:t=>{const r=(0,o.query)('[data-value="1"]',t);r&&(0,o.inverseClass)(r,"art-current"),e.on("video:ratechange",(()=>{const r=(0,o.queryAll)("span",t).find((t=>Number(t.dataset.value)===e.playbackRate));r&&(0,o.inverseClass)(r,"art-current")}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],afxZC:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:a}}=e,n=a.map((t=>`${"default"===t?r.get("Default"):t}`)).join("");return{...t,html:`${r.get("Aspect Ratio")}: ${n}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.aspectRatio=o,t.show=!1)},mounted:t=>{const r=(0,o.query)('[data-value="default"]',t);r&&(0,o.inverseClass)(r,"art-current"),e.on("aspectRatio",(e=>{const r=(0,o.queryAll)("span",t).find((t=>t.dataset.value===e));r&&(0,o.inverseClass)(r,"art-current")}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9jCuX":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>{const{i18n:r,constructor:{FLIP:a}}=e,n=a.map((t=>`${r.get((0,o.capitalize)(t))}`)).join("");return{...t,html:`${r.get("Video Flip")}: ${n}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.flip=o.toLowerCase(),t.show=!1)},mounted:t=>{const r=(0,o.query)('[data-value="normal"]',t);r&&(0,o.inverseClass)(r,"art-current"),e.on("flip",(e=>{const r=(0,o.queryAll)("span",t).find((t=>t.dataset.value===e));r&&(0,o.inverseClass)(r,"art-current")}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],k8wIZ:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return e=>({...t,html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],bb0TU:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return{...t,html:'ArtPlayer 5.1.0'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9zTkI":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return e=>({...t,html:e.i18n.get("Close"),click:t=>{t.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hD2Lg:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./utils"),n=t("./utils/component"),i=o.interopDefault(n);class s extends i.default{constructor(t){super(t),this.name="info",a.isMobile||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:o,$video:n}}=this.art;t(o,"click",(()=>{this.show=!1}));let i=null;const s=(0,a.queryAll)("[data-video]",r)??[];this.art.on("destroy",(()=>clearTimeout(i))),function t(){for(let t=0;tnull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",(()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))}))}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(t,e){const{$subtitle:r}=this.art.template;return"object"==typeof t?(0,a.setStyles)(r,t):(0,a.setStyle)(r,t,e)}update(){const{$subtitle:t}=this.art.template;t.innerHTML="",this.activeCue&&(this.art.option.subtitle.escape?t.innerHTML=this.activeCue.text.split(/\r?\n/).map((t=>`

${(0,a.escape)(t)}

`)).join(""):t.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(t,e={}){const{i18n:r,notice:o,option:a}=this.art,n={...a.subtitle,...e,url:t},i=await this.init(n);return e.name&&(o.show=`${r.get("Switch Subtitle")}: ${e.name}`),i}createTrack(t,e){const{template:r,proxy:o}=this.art,{$video:n,$track:i}=r,s=(0,a.createElement)("track");s.default=!0,s.kind=t,s.src=e,s.track.mode="hidden",this.eventDestroy(),(0,a.remove)(i),(0,a.append)(n,s),r.$track=s,this.eventDestroy=o(this.textTrack,"cuechange",(()=>this.update()))}async init(t){const{notice:e,template:{$subtitle:r}}=this.art;if((0,l.default)(t,u.default.subtitle),t.url)return this.style(t.style),fetch(t.url).then((t=>t.arrayBuffer())).then((e=>{const r=new TextDecoder(t.encoding).decode(e);switch(this.art.emit("subtitleLoad",t.url),t.type??(0,a.getExt)(t.url)){case"srt":{const e=(0,a.srtToVtt)(r),o=t.onVttLoad(e);return(0,a.vttToBlob)(o)}case"ass":{const e=(0,a.assToVtt)(r),o=t.onVttLoad(e);return(0,a.vttToBlob)(o)}case"vtt":{const e=t.onVttLoad(r);return(0,a.vttToBlob)(e)}default:return t.url}})).then((t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t),this.art.emit("subtitleSwitch",t)),t))).catch((t=>{throw r.innerHTML="",e.show=t,t}))}}r.default=p},{"./utils":"h3rH9","./utils/component":"guki8","option-validator":"bAWi2","./scheme":"AdvwB","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1Epl5":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils/error"),n=t("./clickInit"),i=o.interopDefault(n),s=t("./hoverInit"),l=o.interopDefault(s),c=t("./moveInit"),u=o.interopDefault(c),p=t("./resizeInit"),d=o.interopDefault(p),f=t("./gestureInit"),h=o.interopDefault(f),m=t("./viewInit"),g=o.interopDefault(m),v=t("./documentInit"),y=o.interopDefault(v),b=t("./updateInit"),x=o.interopDefault(b);r.default=class{constructor(t){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,i.default)(t,this),(0,l.default)(t,this),(0,u.default)(t,this),(0,d.default)(t,this),(0,h.default)(t,this),(0,g.default)(t,this),(0,y.default)(t,this),(0,x.default)(t,this)}proxy(t,e,r,o={}){if(Array.isArray(e))return e.map((e=>this.proxy(t,e,r,o)));t.addEventListener(e,r,o);const a=()=>t.removeEventListener(e,r,o);return this.destroyEvents.push(a),a}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}loadImg(t){return new Promise(((e,r)=>{let o;if(t instanceof HTMLImageElement)o=t;else{if("string"!=typeof t)return r(new(0,a.ArtPlayerError)("Unable to get Image"));o=new Image,o.src=t}if(o.complete)return e(o);this.proxy(o,"load",(()=>e(o))),this.proxy(o,"error",(()=>r(new(0,a.ArtPlayerError)(`Failed to load Image: ${o.src}`))))}))}remove(t){const e=this.destroyEvents.indexOf(t);e>-1&&(t(),this.destroyEvents.splice(e,1))}destroy(){for(let t=0;t{(0,o.includeFromEvent)(e,a)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}));let i=0;e.proxy(n,"click",(e=>{const a=Date.now(),{MOBILE_CLICK_PLAY:n,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r;a-i<=s?(t.emit("dblclick",e),o.isMobile?!t.isLock&&l&&t.toggle():c&&(t.fullscreen=!t.fullscreen)):(t.emit("click",e),o.isMobile?!t.isLock&&n&&t.toggle():t.toggle()),i=a}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kpTJf:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t,e){const{$player:r}=t.template;e.hover(r,(e=>{(0,o.addClass)(r,"art-hover"),t.emit("hover",!0,e)}),(e=>{(0,o.removeClass)(r,"art-hover"),t.emit("hover",!1,e)}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],ef6qz:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",(e=>{t.emit("mousemove",e)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9TXOX":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t,e){const{option:r,constructor:a}=t;t.on("resize",(()=>{const{aspectRatio:e,notice:o}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,o.show=""}));const n=(0,o.debounce)((()=>t.emit("resize")),a.RESIZE_TIME);e.proxy(window,["orientationchange","resize"],(()=>n())),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",(()=>n()))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dePMU:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils"),a=t("../control/progress");function n(t,e,r,o){var a=e-o,n=r-t,i=0;if(Math.abs(n)<2&&Math.abs(a)<2)return i;var s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,a);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:((s>=135&&s<=180)??(s>=-180&&s<-135))&&(i=3),i}r.default=function(t,e){if(o.isMobile&&!t.option.isLive){const{$video:r,$progress:i}=t.template;let s=null,l=!1,c=0,u=0,p=0;const d=e=>{if(1===e.touches.length&&!t.isLock){s===i&&(0,a.setCurrentTime)(t,e),l=!0;const{pageX:r,pageY:o}=e.touches[0];c=r,u=o,p=t.currentTime}},f=e=>{if(1===e.touches.length&&l&&t.duration){const{pageX:a,pageY:i}=e.touches[0],l=n(c,u,a,i),d=[3,4].includes(l),f=[1,2].includes(l);if((d&&!t.isRotate)??(f&&t.isRotate)){const e=(0,o.clamp)((a-c)/t.width,-1,1),n=(0,o.clamp)((i-u)/t.height,-1,1),l=t.isRotate?n:e,d=s===r?t.constructor.TOUCH_MOVE_RATIO:1,f=(0,o.clamp)(p+t.duration*l*d,0,t.duration);t.seek=f,t.emit("setBar","played",(0,o.clamp)(f/t.duration,0,1)),t.notice.show=`${(0,o.secondToTime)(f)} / ${(0,o.secondToTime)(t.duration)}`}}},h=()=>{l&&(c=0,u=0,p=0,l=!1,s=null)};e.proxy(i,"touchstart",(t=>{s=i,d(t)})),e.proxy(r,"touchstart",(t=>{s=r,d(t)})),e.proxy(r,"touchmove",f),e.proxy(i,"touchmove",f),e.proxy(document,"touchend",h)}}},{"../utils":"h3rH9","../control/progress":"aBBSH","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hDyWF:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t,e){const{option:r,constructor:a,template:{$container:n}}=t,i=(0,o.throttle)((()=>{t.emit("view",(0,o.isInViewport)(n,a.SCROLL_GAP))}),a.SCROLL_TIME);e.proxy(window,"scroll",(()=>i())),t.on("view",(e=>{r.autoMini&&(t.mini=!e)}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7RjDP":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t,e){e.proxy(document,"mousemove",(e=>{t.emit("document:mousemove",e)})),e.proxy(document,"mouseup",(e=>{t.emit("document:mouseup",e)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8SmBT":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",(()=>{cancelAnimationFrame(e)}))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],eTow4:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("./utils");r.default=class{constructor(t){this.art=t,this.keys={},t.option.hotkey&&!o.isMobile&&this.init()}init(){const{proxy:t,constructor:e}=this.art;this.add(27,(()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)})),this.add(32,(()=>{this.art.toggle()})),this.add(37,(()=>{this.art.backward=e.SEEK_STEP})),this.add(38,(()=>{this.art.volume+=e.VOLUME_STEP})),this.add(39,(()=>{this.art.forward=e.SEEK_STEP})),this.add(40,(()=>{this.art.volume-=e.VOLUME_STEP})),t(window,"keydown",(t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r){const e=this.keys[t.keyCode];if(e){t.preventDefault();for(let r=0;r{a.innerText="",(0,o.removeClass)(r,"art-notice-show")}),e.NOTICE_TIME)):(0,o.removeClass)(r,"art-notice-show")}}},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2etr0":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./utils"),n=t("./utils/component"),i=o.interopDefault(n);class s extends i.default{constructor(t){super(t),this.name="mask";const{template:e,icons:r,events:o}=t,n=(0,a.append)(e.$state,r.state),i=(0,a.append)(e.$state,r.error);(0,a.setStyle)(i,"display","none"),t.on("destroy",(()=>{(0,a.setStyle)(n,"display","none"),(0,a.setStyle)(i,"display",null)})),o.proxy(e.$state,"click",(()=>t.play()))}}r.default=s},{"./utils":"h3rH9","./utils/component":"guki8","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6dYSr":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("bundle-text:./loading.svg"),i=o.interopDefault(n),s=t("bundle-text:./state.svg"),l=o.interopDefault(s),c=t("bundle-text:./check.svg"),u=o.interopDefault(c),p=t("bundle-text:./play.svg"),d=o.interopDefault(p),f=t("bundle-text:./pause.svg"),h=o.interopDefault(f),m=t("bundle-text:./volume.svg"),g=o.interopDefault(m),v=t("bundle-text:./volume-close.svg"),y=o.interopDefault(v),b=t("bundle-text:./screenshot.svg"),x=o.interopDefault(b),w=t("bundle-text:./setting.svg"),j=o.interopDefault(w),k=t("bundle-text:./arrow-left.svg"),S=o.interopDefault(k),$=t("bundle-text:./arrow-right.svg"),I=o.interopDefault($),T=t("bundle-text:./playback-rate.svg"),E=o.interopDefault(T),O=t("bundle-text:./aspect-ratio.svg"),M=o.interopDefault(O),F=t("bundle-text:./config.svg"),C=o.interopDefault(F),D=t("bundle-text:./pip.svg"),H=o.interopDefault(D),B=t("bundle-text:./lock.svg"),A=o.interopDefault(B),R=t("bundle-text:./unlock.svg"),z=o.interopDefault(R),L=t("bundle-text:./fullscreen-off.svg"),P=o.interopDefault(L),N=t("bundle-text:./fullscreen-on.svg"),_=o.interopDefault(N),Z=t("bundle-text:./fullscreen-web-off.svg"),V=o.interopDefault(Z),q=t("bundle-text:./fullscreen-web-on.svg"),W=o.interopDefault(q),U=t("bundle-text:./switch-on.svg"),Y=o.interopDefault(U),X=t("bundle-text:./switch-off.svg"),G=o.interopDefault(X),K=t("bundle-text:./flip.svg"),J=o.interopDefault(K),Q=t("bundle-text:./error.svg"),tt=o.interopDefault(Q),et=t("bundle-text:./close.svg"),rt=o.interopDefault(et),ot=t("bundle-text:./airplay.svg"),at=o.interopDefault(ot);r.default=class{constructor(t){const e={loading:i.default,state:l.default,play:d.default,pause:h.default,check:u.default,volume:g.default,volumeClose:y.default,screenshot:x.default,setting:j.default,pip:H.default,arrowLeft:S.default,arrowRight:I.default,playbackRate:E.default,aspectRatio:M.default,config:C.default,lock:A.default,flip:J.default,unlock:z.default,fullscreenOff:P.default,fullscreenOn:_.default,fullscreenWebOff:V.default,fullscreenWebOn:W.default,switchOn:Y.default,switchOff:G.default,error:tt.default,close:rt.default,airplay:at.default,...t.option.icons};for(const t in e)(0,a.def)(this,t,{get:()=>(0,a.getIcon)(t,e[t])})}}},{"../utils":"h3rH9","bundle-text:./loading.svg":"fY5Gt","bundle-text:./state.svg":"iNfLt","bundle-text:./check.svg":"jtE9u","bundle-text:./play.svg":"elgfY","bundle-text:./pause.svg":"eKokJ","bundle-text:./volume.svg":"hNB4y","bundle-text:./volume-close.svg":"i9vta","bundle-text:./screenshot.svg":"kB3Mf","bundle-text:./setting.svg":"3MONs","bundle-text:./arrow-left.svg":"iMCpk","bundle-text:./arrow-right.svg":"3oe4L","bundle-text:./playback-rate.svg":"liE22","bundle-text:./aspect-ratio.svg":"8HqYc","bundle-text:./config.svg":"hYAAH","bundle-text:./pip.svg":"jmNrH","bundle-text:./lock.svg":"cIqko","bundle-text:./unlock.svg":"65zy4","bundle-text:./fullscreen-off.svg":"jaJRT","bundle-text:./fullscreen-on.svg":"cRY1X","bundle-text:./fullscreen-web-off.svg":"3aVGL","bundle-text:./fullscreen-web-on.svg":"4DiVn","bundle-text:./switch-on.svg":"kwdKE","bundle-text:./switch-off.svg":"bWfXZ","bundle-text:./flip.svg":"h3zZ9","bundle-text:./error.svg":"7Oyth","bundle-text:./close.svg":"U5Jcy","bundle-text:./airplay.svg":"jK5Fx","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fY5Gt:[function(t,e,r){e.exports=''},{}],iNfLt:[function(t,e,r){e.exports=''},{}],jtE9u:[function(t,e,r){e.exports=''},{}],elgfY:[function(t,e,r){e.exports=''},{}],eKokJ:[function(t,e,r){e.exports=''},{}],hNB4y:[function(t,e,r){e.exports=''},{}],i9vta:[function(t,e,r){e.exports=''},{}],kB3Mf:[function(t,e,r){e.exports=''},{}],"3MONs":[function(t,e,r){e.exports=''},{}],iMCpk:[function(t,e,r){e.exports=''},{}],"3oe4L":[function(t,e,r){e.exports=''},{}],liE22:[function(t,e,r){e.exports=''},{}],"8HqYc":[function(t,e,r){e.exports=''},{}],hYAAH:[function(t,e,r){e.exports=''},{}],jmNrH:[function(t,e,r){e.exports=''},{}],cIqko:[function(t,e,r){e.exports=''},{}],"65zy4":[function(t,e,r){e.exports=''},{}],jaJRT:[function(t,e,r){e.exports=''},{}],cRY1X:[function(t,e,r){e.exports=''},{}],"3aVGL":[function(t,e,r){e.exports=''},{}],"4DiVn":[function(t,e,r){e.exports=''},{}],kwdKE:[function(t,e,r){e.exports=''},{}],bWfXZ:[function(t,e,r){e.exports=''},{}],h3zZ9:[function(t,e,r){e.exports=''},{}],"7Oyth":[function(t,e,r){e.exports=''},{}],U5Jcy:[function(t,e,r){e.exports=''},{}],jK5Fx:[function(t,e,r){e.exports=''},{}],bRHiA:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./flip"),n=o.interopDefault(a),i=t("./aspectRatio"),s=o.interopDefault(i),l=t("./playbackRate"),c=o.interopDefault(l),u=t("./subtitleOffset"),p=o.interopDefault(u),d=t("../utils/component"),f=o.interopDefault(d),h=t("../utils/error"),m=t("../utils");class g extends f.default{constructor(t){super(t);const{option:e,controls:r,template:{$setting:o}}=t;this.name="setting",this.$parent=o,this.option=[],this.events=[],this.cache=new Map,e.setting&&(this.init(),t.on("blur",(()=>{this.show&&(this.show=!1,this.render(this.option))})),t.on("focus",(t=>{const e=(0,m.includeFromEvent)(t,r.setting),o=(0,m.includeFromEvent)(t,this.$parent);!this.show||e||o||(this.show=!1,this.render(this.option))})))}static makeRecursion(t,e,r){for(let o=0;o'),i=(0,m.createElement)("div");(0,m.addClass)(i,"art-setting-item-left-icon"),(0,m.append)(i,e.arrowLeft),(0,m.append)(n,i),(0,m.append)(n,t.$parentItem.html);const s=r(a,"click",(()=>this.render(t.$parentList)));return this.events.push(s),a}creatItem(t,e){const{icons:r,proxy:o,constructor:a}=this.art,n=(0,m.createElement)("div");(0,m.addClass)(n,"art-setting-item"),(0,m.setStyle)(n,"height",`${a.SETTING_ITEM_HEIGHT}px`),(0,m.isStringOrNumber)(e.name)&&(n.dataset.name=e.name),(0,m.isStringOrNumber)(e.value)&&(n.dataset.value=e.value);const i=(0,m.append)(n,'
'),s=(0,m.append)(n,'
'),l=(0,m.createElement)("div");switch((0,m.addClass)(l,"art-setting-item-left-icon"),t){case"switch":case"range":(0,m.append)(l,(0,m.isStringOrNumber)(e.icon)??e.icon instanceof Element?e.icon:r.config);break;case"selector":e.selector&&e.selector.length?(0,m.append)(l,(0,m.isStringOrNumber)(e.icon)??e.icon instanceof Element?e.icon:r.config):(0,m.append)(l,r.check)}(0,m.append)(i,l),e.$icon=l,(0,m.def)(e,"icon",{configurable:!0,get:()=>l.innerHTML,set(t){(0,m.isStringOrNumber)(t)&&(l.innerHTML=t)}});const c=(0,m.createElement)("div");(0,m.addClass)(c,"art-setting-item-left-text"),(0,m.append)(c,e.html??""),(0,m.append)(i,c),e.$html=c,(0,m.def)(e,"html",{configurable:!0,get:()=>c.innerHTML,set(t){(0,m.isStringOrNumber)(t)&&(c.innerHTML=t)}});const u=(0,m.createElement)("div");switch((0,m.addClass)(u,"art-setting-item-right-tooltip"),(0,m.append)(u,e.tooltip??""),(0,m.append)(s,u),e.$tooltip=u,(0,m.def)(e,"tooltip",{configurable:!0,get:()=>u.innerHTML,set(t){(0,m.isStringOrNumber)(t)&&(u.innerHTML=t)}}),t){case"switch":{const t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");const o=(0,m.append)(t,r.switchOn),a=(0,m.append)(t,r.switchOff);(0,m.setStyle)(e.switch?a:o,"display","none"),(0,m.append)(s,t),e.$switch=e.switch,(0,m.def)(e,"switch",{configurable:!0,get:()=>e.$switch,set(t){e.$switch=t,t?((0,m.setStyle)(a,"display","none"),(0,m.setStyle)(o,"display",null)):((0,m.setStyle)(a,"display",null),(0,m.setStyle)(o,"display","none"))}});break}case"range":{const t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");const r=(0,m.append)(t,'');r.value=e.range[0]??0,r.min=e.range[1]??0,r.max=e.range[2]??10,r.step=e.range[3]??1,(0,m.addClass)(r,"art-setting-range"),(0,m.append)(s,t),e.$range=r,(0,m.def)(e,"range",{configurable:!0,get:()=>r.valueAsNumber,set(t){r.value=Number(t)}})}break;case"selector":if(e.selector&&e.selector.length){const t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon"),(0,m.append)(t,r.arrowRight),(0,m.append)(s,t)}}switch(t){case"switch":if(e.onSwitch){const t=o(n,"click",(async t=>{e.switch=await e.onSwitch.call(this.art,e,n,t)}));this.events.push(t)}break;case"range":if(e.$range){if(e.onRange){const t=o(e.$range,"change",(async t=>{e.tooltip=await e.onRange.call(this.art,e,n,t)}));this.events.push(t)}if(e.onChange){const t=o(e.$range,"input",(async t=>{e.tooltip=await e.onChange.call(this.art,e,n,t)}));this.events.push(t)}}break;case"selector":{const t=o(n,"click",(async t=>{if(e.selector&&e.selector.length)this.render(e.selector,e.width);else{(0,m.inverseClass)(n,"art-current");for(let t=0;tc?((0,m.setStyle)(a,"left",null),(0,m.setStyle)(a,"right",null)):((0,m.setStyle)(a,"left",`${u}px`),(0,m.setStyle)(a,"right","auto"))}}render(t,e){const{constructor:r}=this.art;if(this.cache.has(t)){const e=this.cache.get(t);(0,m.inverseClass)(e,"art-current"),(0,m.setStyle)(this.$parent,"width",`${e.dataset.width}px`),(0,m.setStyle)(this.$parent,"height",`${e.dataset.height}px`),this.updateStyle(Number(e.dataset.width))}else{const o=(0,m.createElement)("div");(0,m.addClass)(o,"art-setting-panel"),o.dataset.width=e??r.SETTING_WIDTH,o.dataset.height=t.length*r.SETTING_ITEM_HEIGHT,t[0]&&t[0].$parentItem&&((0,m.append)(o,this.creatHeader(t[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let e=0;et.dataset.value===a));n&&(0,o.inverseClass)(n,"art-current")}return{width:a,name:"flip",html:e.get("Video Flip"),tooltip:e.get((0,o.capitalize)(t.flip)),icon:r.flip,selector:n.map((r=>({value:r,name:`aspect-ratio-${r}`,default:r===t.flip,html:e.get((0,o.capitalize)(r))}))),onSelect:e=>(t.flip=e.value,e.html),mounted:(e,r)=>{i(e,r.$tooltip,t.flip),t.on("flip",(()=>{i(e,r.$tooltip,t.flip)}))}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5lAsp":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:n}}=t;function i(t){return"default"===t?e.get("Default"):t}function s(t,e,r){e&&(e.innerText=i(r));const a=(0,o.queryAll)(".art-setting-item",t).find((t=>t.dataset.value===r));a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(t.aspectRatio),selector:n.map((e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:i(e)}))),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:(e,r)=>{s(e,r.$tooltip,t.aspectRatio),t.on("aspectRatio",(()=>{s(e,r.$tooltip,t.aspectRatio)}))}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],e6hsR:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:n}}=t;function i(t){return 1===t?e.get("Normal"):t.toFixed(1)}function s(t,e,r){e&&(e.innerText=i(r));const a=(0,o.queryAll)(".art-setting-item",t).find((t=>Number(t.dataset.value)===r));a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"playback-rate",html:e.get("Play Speed"),tooltip:i(t.playbackRate),icon:r.playbackRate,selector:n.map((e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.playbackRate,html:i(e)}))),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:(e,r)=>{s(e,r.$tooltip,t.playbackRate),t.on("video:ratechange",(()=>{s(e,r.$tooltip,t.playbackRate)}))}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fFNEr:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){const{i18n:e,icons:r,constructor:o}=t;return{width:o.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-5,5,.1],onChange:e=>(t.subtitleOffset=e.range,e.range+"s")}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f2Thp:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(t){try{const e=JSON.parse(window.localStorage.getItem(this.name))??{};return t?e[t]:e}catch(e){return t?this.settings[t]:this.settings}}set(t,e){try{const r=Object.assign({},this.get(),{[t]:e});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[t]=e}}del(t){try{const e=this.get();delete e[t],window.localStorage.setItem(this.name,JSON.stringify(e))}catch(e){delete this.settings[t]}}clear(){try{window.localStorage.removeItem(this.name)}catch(t){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"96ThS":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("./miniProgressBar"),i=o.interopDefault(n),s=t("./autoOrientation"),l=o.interopDefault(s),c=t("./autoPlayback"),u=o.interopDefault(c),p=t("./fastForward"),d=o.interopDefault(p),f=t("./lock"),h=o.interopDefault(f);r.default=class{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(i.default),e.lock&&a.isMobile&&this.add(h.default),e.autoPlayback&&!e.isLive&&this.add(u.default),e.autoOrientation&&a.isMobile&&this.add(l.default),e.fastForward&&a.isMobile&&!e.isLive&&this.add(d.default);for(let t=0;t{t.layers.add({name:"mini-progress-bar",mounted(e){t.on("destroy",(()=>{e.style.display="none"})),t.constructor.USE_RAF?t.on("raf",(()=>{e.style.width=100*t.played+"%"})):t.on("video:timeupdate",(()=>{e.style.width=100*t.played+"%"})),t.on("setBar",((t,r)=>{"played"===t&&(e.style.width=100*r+"%")}))}})})),{name:"mini-progress-bar"}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2O9qO":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{constructor:e,template:{$player:r,$video:a}}=t;return t.on("fullscreenWeb",(n=>{if(n){const{videoWidth:n,videoHeight:i}=a,{clientWidth:s,clientHeight:l}=document.documentElement;((n>i&&sl))&&setTimeout((()=>{(0,o.setStyle)(r,"width",`${l}px`),(0,o.setStyle)(r,"height",`${s}px`),(0,o.setStyle)(r,"transform-origin","0 0"),(0,o.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,o.addClass)(r,"art-auto-orientation"),t.isRotate=!0,t.emit("resize")}),e.AUTO_ORIENTATION_TIME)}else(0,o.hasClass)(r,"art-auto-orientation")&&((0,o.removeClass)(r,"art-auto-orientation"),t.isRotate=!1,t.emit("resize"))})),t.on("fullscreen",(async t=>{const e=screen.orientation.type;if(t){const{videoWidth:t,videoHeight:n}=a,{clientWidth:i,clientHeight:s}=document.documentElement;if((t>n&&is)){const t=e.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(t),(0,o.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,o.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(e),(0,o.removeClass)(r,"art-auto-orientation-fullscreen"))})),{name:"autoOrientation",get state(){return(0,o.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iiOc1:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,icons:r,storage:a,constructor:n,proxy:i,template:{$poster:s}}=t,l=t.layers.add({name:"auto-playback",html:'
'}),c=(0,o.query)(".art-auto-playback-last",l),u=(0,o.query)(".art-auto-playback-jump",l),p=(0,o.query)(".art-auto-playback-close",l);return t.on("video:timeupdate",(()=>{if(t.playing){const e=a.get("times")??{},r=Object.keys(e);r.length>n.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id??t.option.url]=t.currentTime,a.set("times",e)}})),t.on("ready",(()=>{const d=(a.get("times")??{})[t.option.id??t.option.url];d&&d>=n.AUTO_PLAYBACK_MIN&&((0,o.append)(p,r.close),(0,o.setStyle)(l,"display","flex"),c.innerText=`${e.get("Last Seen")} ${(0,o.secondToTime)(d)}`,u.innerText=e.get("Jump Play"),i(p,"click",(()=>{(0,o.setStyle)(l,"display","none")})),i(u,"click",(()=>{t.seek=d,t.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")})),t.once("video:timeupdate",(()=>{setTimeout((()=>{(0,o.setStyle)(l,"display","none")}),n.AUTO_PLAYBACK_TIMEOUT)})))})),{name:"auto-playback",get times(){return a.get("times")??{}},clear:()=>a.del("times"),delete(t){const e=a.get("times")??{};return delete e[t],a.set("times",e),e}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],d9NUE:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{constructor:e,proxy:r,template:{$player:a,$video:n}}=t;let i=null,s=!1,l=1;const c=()=>{clearTimeout(i),s&&(s=!1,t.playbackRate=l,(0,o.removeClass)(a,"art-fast-forward"))};return r(n,"touchstart",(r=>{1===r.touches.length&&t.playing&&!t.isLock&&(i=setTimeout((()=>{s=!0,l=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")}),e.FAST_FORWARD_TIME))})),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5dnKh":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{layers:e,icons:r,template:{$player:a}}=t;return e.add({name:"lock",mounted(e){const a=(0,o.append)(e,r.lock),n=(0,o.append)(e,r.unlock);(0,o.setStyle)(a,"display","none"),t.on("lock",(t=>{t?((0,o.setStyle)(a,"display","inline-flex"),(0,o.setStyle)(n,"display","none")):((0,o.setStyle)(a,"display","none"),(0,o.setStyle)(n,"display","inline-flex"))}))},click(){(0,o.hasClass)(a,"art-lock")?((0,o.removeClass)(a,"art-lock"),this.isLock=!1,t.emit("lock",!1)):((0,o.addClass)(a,"art-lock"),this.isLock=!0,t.emit("lock",!0))}}),{name:"lock",get state(){return(0,o.hasClass)(a,"art-lock")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}]},["abjMI"],"abjMI","parcelRequireb749"); \ No newline at end of file diff --git a/docs/compiled/artplayer.legacy.js b/docs/compiled/artplayer.legacy.js index b31e0bbd3..2e8ea74cb 100644 --- a/docs/compiled/artplayer.legacy.js +++ b/docs/compiled/artplayer.legacy.js @@ -4,56 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof a[n]&&a[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -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=s[t]=new c.Module(t);e[t][0].call(p.exports,f,p,p.exports,this)}return s[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=s,c.parent=i,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 ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c0)||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.0"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2023-08-26 13:44: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,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:{},escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:m.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}}]),r}(h.default);if(er.DEBUG=!1,er.CONTEXTMENU=!0,er.NOTICE_TIME=2e3,er.SETTING_WIDTH=250,er.SETTING_ITEM_WIDTH=200,er.SETTING_ITEM_HEIGHT=35,er.RESIZE_TIME=200,er.SCROLL_TIME=200,er.SCROLL_GAP=50,er.AUTO_PLAYBACK_MAX=10,er.AUTO_PLAYBACK_MIN=5,er.AUTO_PLAYBACK_TIMEOUT=3e3,er.RECONNECT_TIME_MAX=5,er.RECONNECT_SLEEP_TIME=1e3,er.CONTROL_HIDE_TIME=3e3,er.DBCLICK_TIME=300,er.DBCLICK_FULLSCREEN=!0,er.MOBILE_DBCLICK_PLAY=!0,er.MOBILE_CLICK_PLAY=!1,er.AUTO_ORIENTATION_TIME=200,er.INFO_LOOP_TIME=1e3,er.FAST_FORWARD_VALUE=3,er.FAST_FORWARD_TIME=1e3,er.TOUCH_MOVE_RATIO=.5,er.VOLUME_STEP=.1,er.SEEK_STEP=5,er.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],er.ASPECT_RATIO=["default","4:3","16:9"],er.FLIP=["normal","horizontal","vertical"],er.FULLSCREEN_WEB_IN_BODY=!1,er.LOG_VERSION=!0,er.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){var en=m.createElement("style");en.id="artplayer-style",en.textContent=u.default,document.head.appendChild(en)}"undefined"!=typeof window&&(window.Artplayer=er),setTimeout(function(){er.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(er.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")})},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","bundle-text:./style/index.less":"3eiHP","option-validator":"8OeHO","./utils/emitter":"2V7i9","./utils":"7MU7R","./scheme":"39ygm","./config":"emMME","./template":"gqSBs","./i18n":"7iXtC","./player":"j7piB","./control":"7z0K5","./contextmenu":"5RLZo","./info":"6JYu5","./subtitle":"WYfF6","./events":"47RGg","./hotkey":"gszG1","./layer":"dImgv","./loading":"6vtvO","./notice":"3Z2RQ","./mask":"hUoLo","./icons":"4Bz82","./setting":"hGnnd","./storage":"8dSC3","./plugins":"gv8Rm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.defineInteropFlag(r),n.export(r,"_assert_this_initialized",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||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})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_class_call_check",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;r1?n-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function u(e,t){var r;return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),null!==(r=e.lastElementChild)&&void 0!==r?r:e.lastChild}function p(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function d(e,t){for(var r in t)f(e,r,t[r]);return e}function h(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function m(e){return Array.from(e.parentElement.children).filter(function(t){return t!==e})}function v(e,t){m(e).forEach(function(e){return l(e,t)}),s(e,t)}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,"hint--".concat(r)))}function _(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e.getBoundingClientRect(),a=null!==(t=window.innerHeight)&&void 0!==t?t:document.documentElement.clientHeight,i=null!==(r=window.innerWidth)&&void 0!==r?r:document.documentElement.clientWidth,s=o.top-n<=a&&o.top+o.height+n>=0,l=o.left-n<=i+n&&o.left+o.width+n>=0;return s&&l}function y(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function b(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=w("i");return s(r,"art-icon"),s(r,"art-icon-".concat(e)),u(r,t),r}},{"./compatibility":"f9Vc8","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],f9Vc8:[function(e,t,r){var n,o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",function(){return a}),o.export(r,"isSafari",function(){return i}),o.export(r,"isWechat",function(){return s}),o.export(r,"isIE",function(){return l}),o.export(r,"isAndroid",function(){return c}),o.export(r,"isIOS",function(){return u}),o.export(r,"isIOS13",function(){return p}),o.export(r,"isMobile",function(){return f});var a="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(a),s=/MicroMessenger/i.test(a),l=/MSIE|Trident/i.test(a),c=/android/i.test(a),u=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,p=null!=u?u:a.includes("Macintosh")&&navigator.maxTouchPoints>=1,f=null!==(n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))&&void 0!==n?n:p},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6WanZ":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ArtPlayerError",function(){return c}),n.export(r,"errorHandle",function(){return u});var o=e("@swc/helpers/_/_assert_this_initialized"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_wrap_native_super"),l=e("@swc/helpers/_/_create_super"),c=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,l._)(r);function r(e,n){var i;return(0,a._)(this,r),i=t.call(this,e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace((0,o._)(i),null!=n?n:i.constructor),i.name="ArtPlayerError",i}return r}((0,s._)(Error));function u(e,t){if(!e)throw new c(t);return e}},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_wrap_native_super":"hNYY1","@swc/helpers/_/_create_super":"86fte","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hNYY1:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_wrap_native_super",function(){return l}),n.export(r,"_",function(){return l});var o=e("./_construct.js"),a=e("./_get_prototype_of.js"),i=e("./_is_native_function.js"),s=e("./_set_prototype_of.js");function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||!(0,i._is_native_function)(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,o._construct)(e,arguments,(0,a._get_prototype_of)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s._set_prototype_of)(r,e)})(e)}},{"./_construct.js":"ljlHN","./_get_prototype_of.js":"dAKgy","./_is_native_function.js":"fIKaN","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ljlHN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_construct",function(){return i}),n.export(r,"_",function(){return i});var o=e("./_is_native_reflect_construct.js"),a=e("./_set_prototype_of.js");function i(e,t,r){return(i=(0,o._is_native_reflect_construct)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,a._set_prototype_of)(o,r.prototype),o}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"7fioR","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fIKaN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return -1!==Function.toString.call(e).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_is_native_function",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cZfjQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"))}function a(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function i(e){var t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/[:.]/).map(function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;// eslint-disable-next-line no-nested-ternary -return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)}).join("")}return"WEBVTT\n\n".concat(e.split(/\r?\n/).map(function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(function(e){return e.trim()}).join("\n")}:null}).filter(function(e){return e}).map(function(e,t){return e?"".concat(t+1,"\n").concat(e.start," --> ").concat(e.end,"\n").concat(e.text):""}).filter(function(e){return e.trim()}).join("\n\n"))}n.defineInteropFlag(r),n.export(r,"srtToVtt",function(){return o}),n.export(r,"vttToBlob",function(){return a}),n.export(r,"assToVtt",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l2mTb:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}n.defineInteropFlag(r),n.export(r,"getExt",function(){return function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}}),n.export(r,"download",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5EnnX":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"def",function(){return a}),n.export(r,"has",function(){return s}),n.export(r,"get",function(){return l}),n.export(r,"mergeDeep",function(){return function e(){for(var t=arguments.length,r=Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}function a(e,t){var r;return function(){for(var n=arguments.length,o=Array(n),a=0;a0?[t,r,n]:[r,n]).map(function(e){return e<10?"0".concat(e):String(e)}).join(":")}function c(e){var t;return e.replace(/[&<>'"]/g,function(e){return null!==(t=({"&":"&","<":"<",">":">","'":"'",'"':"""})[e])&&void 0!==t?t:e})}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"39ygm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ComponentOption",function(){return h});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils"),s="array",l="boolean",c="string",u="number",p="object",f="function";function d(e,t,r){var n,o;return(0,i.errorHandle)((o=t===c,o),"".concat(r.join(".")," require '").concat(c,"' or 'Element' type"))}var h={html:d,disable:"?".concat(l),name:"?".concat(c),index:"?".concat(u),style:"?".concat(p),click:"?".concat(f),mounted:"?".concat(f),tooltip:"?".concat(c,"|").concat(u),width:"?".concat(u),selector:"?".concat(s),onSelect:"?".concat(f),switch:"?".concat(l),onSwitch:"?".concat(f),range:"?".concat(s),onRange:"?".concat(f),onChange:"?".concat(f)};r.default={id:c,container:d,url:c,poster:c,type:c,theme:c,lang:c,volume:u,isLive:l,muted:l,autoplay:l,autoSize:l,autoMini:l,loop:l,flip:l,playbackRate:l,aspectRatio:l,screenshot:l,setting:l,hotkey:l,pip:l,mutex:l,backdrop:l,fullscreen:l,fullscreenWeb:l,subtitleOffset:l,miniProgressBar:l,useSSR:l,playsInline:l,lock:l,fastForward:l,autoPlayback:l,autoOrientation:l,airplay:l,plugins:[f],layers:[h],contextmenu:[h],settings:[h],controls:[(0,a._)((0,o._)({},h),{position:function(e,t,r){var n=["top","left","right"];return(0,i.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(l),html:c,url:c}],highlight:[{time:u,text:c}],thumbnails:{url:c,number:u,column:u,width:u,height:u},subtitle:{url:c,type:c,style:p,escape:l,encoding:c,onVttLoad:f},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_object_spread",function(){return a}),n.export(r,"_",function(){return a});var o=e("./_define_property.js");function a(e){for(var t=1;t
Player version:
5.1.0
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
'}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","./utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7iXtC":[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/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("../utils"),s=e("./zh-cn"),l=n.interopDefault(s),c=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.languages={"zh-cn":l.default},this.language={},this.update(t.option.i18n)}return(0,a._)(e,[{key:"init",value:function(){var e,t=this.art.option.lang.toLowerCase();this.language=null!==(e=this.languages[t])&&void 0!==e?e:{}}},{key:"get",value:function(e){var t;return null!==(t=this.language[e])&&void 0!==t?t:e}},{key:"update",value:function(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","../utils":"7MU7R","./zh-cn":"5mkZy","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5mkZy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n={"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":"隔空播放不可用"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],j7piB:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return ew});var o=e("@swc/helpers/_/_class_call_check"),a=e("./urlMix"),i=n.interopDefault(a),s=e("./attrMix"),l=n.interopDefault(s),c=e("./playMix"),u=n.interopDefault(c),p=e("./pauseMix"),f=n.interopDefault(p),d=e("./toggleMix"),h=n.interopDefault(d),m=e("./seekMix"),v=n.interopDefault(m),g=e("./volumeMix"),_=n.interopDefault(g),y=e("./currentTimeMix"),b=n.interopDefault(y),w=e("./durationMix"),x=n.interopDefault(w),j=e("./switchMix"),k=n.interopDefault(j),M=e("./playbackRateMix"),I=n.interopDefault(M),S=e("./aspectRatioMix"),D=n.interopDefault(S),T=e("./screenshotMix"),F=n.interopDefault(T),R=e("./fullscreenMix"),E=n.interopDefault(R),O=e("./fullscreenWebMix"),C=n.interopDefault(O),W=e("./pipMix"),A=n.interopDefault(W),P=e("./loadedMix"),z=n.interopDefault(P),L=e("./playedMix"),$=n.interopDefault(L),H=e("./playingMix"),N=n.interopDefault(H),U=e("./autoSizeMix"),V=n.interopDefault(U),B=e("./rectMix"),q=n.interopDefault(B),Y=e("./flipMix"),J=n.interopDefault(Y),X=e("./miniMix"),G=n.interopDefault(X),K=e("./loopMix"),Z=n.interopDefault(K),Q=e("./posterMix"),ee=n.interopDefault(Q),et=e("./autoHeightMix"),er=n.interopDefault(et),en=e("./cssVarMix"),eo=n.interopDefault(en),ea=e("./themeMix"),ei=n.interopDefault(ea),es=e("./typeMix"),el=n.interopDefault(es),ec=e("./stateMix"),eu=n.interopDefault(ec),ep=e("./subtitleOffsetMix"),ef=n.interopDefault(ep),ed=e("./airplayMix"),eh=n.interopDefault(ed),em=e("./qualityMix"),ev=n.interopDefault(em),eg=e("./optionInit"),e_=n.interopDefault(eg),ey=e("./eventInit"),eb=n.interopDefault(ey),ew=function e(t){(0,o._)(this,e),(0,i.default)(t),(0,l.default)(t),(0,u.default)(t),(0,f.default)(t),(0,h.default)(t),(0,v.default)(t),(0,_.default)(t),(0,b.default)(t),(0,x.default)(t),(0,k.default)(t),(0,I.default)(t),(0,D.default)(t),(0,F.default)(t),(0,E.default)(t),(0,C.default)(t),(0,A.default)(t),(0,z.default)(t),(0,$.default)(t),(0,N.default)(t),(0,V.default)(t),(0,q.default)(t),(0,J.default)(t),(0,G.default)(t),(0,Z.default)(t),(0,ee.default)(t),(0,er.default)(t),(0,eo.default)(t),(0,ei.default)(t),(0,el.default)(t),(0,eu.default)(t),(0,ef.default)(t),(0,eh.default)(t),(0,ev.default)(t),(0,eb.default)(t),(0,e_.default)(t)}},{"@swc/helpers/_/_class_call_check":"9iJMm","./urlMix":"bnOAX","./attrMix":"YLwHz","./playMix":"ktu66","./pauseMix":"6JstV","./toggleMix":"cotiM","./seekMix":"8DVLx","./volumeMix":"9fjEr","./currentTimeMix":"fniLa","./durationMix":"2WMs4","./switchMix":"5XnRj","./playbackRateMix":"atzXU","./aspectRatioMix":"e67kx","./screenshotMix":"7FJKj","./fullscreenMix":"1hnoY","./fullscreenWebMix":"aLUYJ","./pipMix":"jJ7PZ","./loadedMix":"3RcYf","./playedMix":"hpdzI","./playingMix":"dQpMB","./autoSizeMix":"i3W5n","./rectMix":"eA2QA","./flipMix":"8B7eY","./miniMix":"f1BFf","./loopMix":"iaeBy","./posterMix":"3Bs5U","./autoHeightMix":"gRfBQ","./cssVarMix":"6gWkU","./themeMix":"6YX9w","./typeMix":"cBZG8","./stateMix":"bpFKI","./subtitleOffsetMix":"hyhz8","./airplayMix":"5fLM6","./qualityMix":"jj5tM","./optionInit":"PZTTa","./eventInit":"cKj2D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bnOAX:[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/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.option,r=e.template.$video;(0,i.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,o._)(function(){var o,s,l,c;return(0,a._)(this,function(a){switch(a.label){case 0:if(!n)return[3,4];if(o=e.url,l=null!==(s=t.type)&&void 0!==s?s:(0,i.getExt)(n),c=t.customType[l],!(l&&c))return[3,2];return[4,(0,i.sleep)()];case 1:return a.sent(),e.loading.show=!0,c.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,a.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",function(){e.emit("restart",n)})),[3,6];case 4:return[4,(0,i.sleep)()];case 5:a.sent(),e.loading.show=!0,a.label=6;case 6:return[2]}})})()}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@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,a,i){try{var s=e[a](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator}),n.export(r,"_ts_generator",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** *//* global Reflect, Promise */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return i}),n.export(r,"__assign",function(){return s}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return c}),n.export(r,"__param",function(){return u}),n.export(r,"__esDecorate",function(){return p}),n.export(r,"__runInitializers",function(){return f}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return h}),n.export(r,"__metadata",function(){return m}),n.export(r,"__awaiter",function(){return v}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return _}),n.export(r,"__exportStar",function(){return y}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return w}),/** @deprecated */n.export(r,"__spread",function(){return x}),/** @deprecated */n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return k}),n.export(r,"__await",function(){return M}),n.export(r,"__asyncGenerator",function(){return I}),n.export(r,"__asyncDelegator",function(){return S}),n.export(r,"__asyncValues",function(){return D}),n.export(r,"__makeTemplateObject",function(){return T}),n.export(r,"__importStar",function(){return R}),n.export(r,"__importDefault",function(){return E}),n.export(r,"__classPrivateFieldGet",function(){return O}),n.export(r,"__classPrivateFieldSet",function(){return C}),n.export(r,"__classPrivateFieldIn",function(){return W});var o=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function u(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var v=(0,r[d])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=i(v.get))&&(p.get=s),(s=i(v.set))&&(p.set=s),(s=i(v.init))&&o.push(s)}else(s=i(v))&&("field"===l?o.push(s):p[c]=s)}u&&Object.defineProperty(u,n.name,p),f=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function x(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var r;(r=o[e](t)).value instanceof M?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:M(e[n](t)),done:!1}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function R(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&_(t,e,r);return F(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function W(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],YLwHz:[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("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"attr",{value:function(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ktu66:[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/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.i18n,r=e.notice,n=e.option,s=e.constructor.instances,l=e.template.$video;(0,i.def)(e,"play",{value:/*#__PURE__*/(0,o._)(function(){var o,i,c;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,l.play()];case 1:if(o=a.sent(),r.show=t.get("Play"),e.emit("play"),n.mutex)for(i=0;iu?((0,o.setStyle)(a,"width","".concat(u*c,"px")),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","".concat(l/u,"px")),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===n?t.get("Default"):n),e.emit("aspectRatio",n)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7FJKj":[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/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.notice,r=e.template.$video,n=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:function(){return new Promise(function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),e(n.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}}),(0,i.def)(e,"getBlobUrl",{value:function(){return new Promise(function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),n.toBlob(function(t){e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}}),(0,i.def)(e,"screenshot",{value:/*#__PURE__*/(0,o._)(function(){var t;return(0,a._)(this,function(n){switch(n.label){case 0:return[4,e.getDataURL()];case 1:return t=n.sent(),(0,i.download)(t,"artplayer_".concat((0,i.secondToTime)(r.currentTime),".png")),e.emit("screenshot",t),[2,t]}})})})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1hnoY":[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"),a=e("@swc/helpers/_/_ts_generator"),i=e("../libs/screenfull"),s=n.interopDefault(i),l=e("../utils");function c(e){var t=e.i18n,r=e.notice,n=e.template,i=n.$video,c=n.$player,u=function(e){(0,s.default).on("change",function(){e.emit("fullscreen",s.default.isFullscreen)}),(0,l.def)(e,"fullscreen",{get:function(){return s.default.isFullscreen},set:function(t){return(0,o._)(function(){return(0,a._)(this,function(r){switch(r.label){case 0:if(!t)return[3,2];return e.state="fullscreen",[4,(0,s.default).request(c)];case 1:return r.sent(),(0,l.addClass)(c,"art-fullscreen"),[3,4];case 2:return[4,(0,s.default).exit()];case 3:r.sent(),(0,l.removeClass)(c,"art-fullscreen"),r.label=4;case 4:return e.emit("resize"),[2]}})})()}})},p=function(e){(0,l.def)(e,"fullscreen",{get:function(){return i.webkitDisplayingFullscreen},set:function(t){t?(e.state="fullscreen",i.webkitEnterFullscreen(),e.emit("fullscreen",!0)):(i.webkitExitFullscreen(),e.emit("fullscreen",!1)),e.emit("resize")}})};e.once("video:loadedmetadata",function(){var n;s.default.isEnabled?u(e):(null!==(n=document.fullscreenEnabled)&&void 0!==n?n:i.webkitSupportsFullscreen)?p(e):(0,l.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),// Asynchronous setting -(0,l.def)(e,"fullscreen",(0,l.get)(e,"fullscreen"))})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../libs/screenfull":"cM8lD","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cM8lD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("@swc/helpers/_/_sliced_to_array"),o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],// New WebKit -["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],// Old WebKit -["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=function(){if("undefined"==typeof document)return!1;var e=o[0],t={},r=!0,a=!1,i=void 0;try{for(var s,l=o[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,n._)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return!1}(),i={change:a.fullscreenchange,error:a.fullscreenerror},s={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r,n){var o=function(){s.off("change",o),r()};s.on("change",o);var i=e[a.requestFullscreen](t);i instanceof Promise&&i.then(o).catch(n)})},exit:function(){return new Promise(function(e,t){if(!s.isFullscreen){e();return}var r=function(){s.off("change",r),e()};s.on("change",r);var n=document[a.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})},toggle:function(e,t){return s.isFullscreen?s.exit():s.request(e,t)},onchange:function(e){s.on("change",e)},onerror:function(e){s.on("error",e)},on:function(e,t){var r=i[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=i[e];r&&document.removeEventListener(r,t,!1)},raw:a};Object.defineProperties(s,{isFullscreen:{get:function(){return!!document[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[a.fullscreenEnabled]}}}),a||(s={isEnabled:!1}),r.default=s},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_sliced_to_array",function(){return l}),n.export(r,"_",function(){return l});var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),i=e("./_non_iterable_rest.js"),s=e("./_unsupported_iterable_to_array.js");function l(e,t){return(0,o._array_with_holes)(e)||(0,a._iterable_to_array_limit)(e,t)||(0,s._unsupported_iterable_to_array)(e,t)||(0,i._non_iterable_rest)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(r),n.export(r,"_array_with_holes",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],loYCM:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw n}}return a}}n.defineInteropFlag(r),n.export(r,"_iterable_to_array_limit",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_rest",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],aLUYJ:[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("../utils");function a(e){var t=e.constructor,r=e.template,n=r.$container,a=r.$player,i="";(0,o.def)(e,"fullscreenWeb",{get:function(){return(0,o.hasClass)(a,"art-fullscreen-web")},set:function(r){r?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(n,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jJ7PZ:[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("../utils");function a(e){var t,r,n,a,i=e.i18n,s=e.notice,l=e.template.$video;document.pictureInPictureEnabled?(t=e.template.$video,r=e.proxy,n=e.notice,t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch(function(e){throw n.show=e,e})):document.exitPictureInPicture().catch(function(e){throw n.show=e,e})}}),r(t,"enterpictureinpicture",function(){e.emit("pip",!0)}),r(t,"leavepictureinpicture",function(){e.emit("pip",!1)})):l.webkitSupportsPresentationMode?((a=e.template.$video).webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:function(){return"picture-in-picture"===a.webkitPresentationMode},set:function(t){t?(e.state="pip",a.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(a.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})):(0,o.def)(e,"pip",{get:function(){return!1},set:function(){s.show=i.get("PIP Not Supported")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3RcYf":[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("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,o.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hpdzI:[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("../utils");function a(e){(0,o.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dQpMB:[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("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"playing",{get:function(){return!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i3W5n:[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("../utils");function a(e){var t=e.template,r=t.$container,n=t.$player,a=t.$video;(0,o.def)(e,"autoSize",{value:function(){var t=a.videoWidth,i=a.videoHeight,s=r.getBoundingClientRect(),l=s.width,c=s.height,u=t/i;l/c>u?((0,o.setStyle)(n,"width","".concat(c*u/l*100,"%")),(0,o.setStyle)(n,"height","100%")):((0,o.setStyle)(n,"width","100%"),(0,o.setStyle)(n,"height","".concat(l/u/c*100,"%"))),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eA2QA:[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("../utils");function a(e){(0,o.def)(e,"rect",{get:function(){return e.template.$player.getBoundingClientRect()}});for(var t=["bottom","height","left","right","top","width"],r=0;r');(0,o.append)(d,t.close),r(d,"click",p);var h=(0,o.append)(i,'
'),m=(0,o.append)(h,t.play),v=(0,o.append)(h,t.pause);return r(m,"click",function(){return e.play()}),r(v,"click",function(){return e.pause()}),f(m,v),e.on("video:playing",function(){return f(m,v)}),e.on("video:pause",function(){return f(m,v)}),e.on("video:timeupdate",function(){return f(m,v)}),r(i,"mousedown",function(e){l=0===e.button,c=e.pageX,u=e.pageY}),e.on("document:mousemove",function(e){if(l){(0,o.addClass)(i,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,o.setStyle)(i,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}}),e.on("document:mouseup",function(){if(l){l=!1,(0,o.removeClass)(i,"art-mini-droging");var e=i.getBoundingClientRect();n.set("left",e.left),n.set("top",e.top),(0,o.setStyle)(i,"left","".concat(e.left,"px")),(0,o.setStyle)(i,"top","".concat(e.top,"px")),(0,o.setStyle)(i,"transform",null)}}),i}(),m=n.get("top"),v=n.get("left");m&&v?((0,o.setStyle)(h,"top","".concat(m,"px")),(0,o.setStyle)(h,"left","".concat(v,"px")),(0,o.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iaeBy:[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("../utils");function a(e){var t=[];(0,o.def)(e,"loop",{get:function(){return t},set:function(r){if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){var n=(0,o.clamp)(r[0],0,Math.min(r[1],e.duration)),a=(0,o.clamp)(r[1],n,e.duration);t=a-n>=1?[n,a]:[]}else t=[];e.emit("loop",t)}}),e.on("video:timeupdate",function(){t.length&&e.currentTime { -// }); -e.on("video:canplay",function(){m=0,e.loading.show=!1}),e.once("video:canplay",function(){e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")}),// art.on('video:canplaythrough', () => { -// }); -// art.on('video:durationchange', () => { -// }); -// art.on('video:emptied', () => { -// }); -e.on("video:ended",function(){i.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)}),e.on("video:error",(t=(0,o._)(function(t){return(0,a._)(this,function(o){switch(o.label){case 0:if(!(m { -// }); -e.on("video:loadedmetadata",function(){e.emit("resize"),l.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",function(){e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",function(){e.controls.show=!0,e.mask.show=!0}),e.on("video:play",function(){e.mask.show=!1,(0,l.setStyle)(h,"display","none")}),e.on("video:playing",function(){e.mask.show=!1}),e.on("video:progress",function(){e.playing&&(e.loading.show=!1)}),// art.on('video:ratechange', () => { -// }); -e.on("video:seeked",function(){e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",function(){e.loading.show=!0,e.mask.show=!1}),// art.on('video:stalled', () => { -// }); -// art.on('video:suspend', () => { -// }); -e.on("video:timeupdate",function(){e.mask.show=!1}),// art.on('video:volumechange', () => { -// }); -e.on("video:waiting",function(){e.loading.show=!0,e.mask.show=!1})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../config":"emMME","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7z0K5":[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/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_get"),s=e("@swc/helpers/_/_get_prototype_of"),l=e("@swc/helpers/_/_inherits"),c=e("@swc/helpers/_/_create_super"),u=e("../utils"),p=e("../utils/component"),f=n.interopDefault(p),d=e("./fullscreen"),h=n.interopDefault(d),m=e("./fullscreenWeb"),v=n.interopDefault(m),g=e("./pip"),_=n.interopDefault(g),y=e("./playAndPause"),b=n.interopDefault(y),w=e("./progress"),x=n.interopDefault(w),j=e("./time"),k=n.interopDefault(j),M=e("./volume"),I=n.interopDefault(M),S=e("./setting"),D=n.interopDefault(S),T=e("./thumbnails"),F=n.interopDefault(T),R=e("./screenshot"),E=n.interopDefault(R),O=e("./loop"),C=n.interopDefault(O),W=e("./airplay"),A=n.interopDefault(W),P=/*#__PURE__*/function(e){(0,l._)(r,e);var t=(0,c._)(r);function r(e){(0,o._)(this,r),(n=t.call(this,e)).name="control";var n,a=e.proxy,i=e.constructor,s=e.template.$player,l=Date.now();return a(s,["click","mousemove","touchstart","touchmove"],function(){n.show=!0,(0,u.removeClass)(s,"art-hide-cursor"),(0,u.addClass)(s,"art-hover"),l=Date.now()}),e.on("video:timeupdate",function(){!e.isInput&&e.playing&&n.show&&Date.now()-l>=i.CONTROL_HIDE_TIME&&(n.show=!1,(0,u.addClass)(s,"art-hide-cursor"),(0,u.removeClass)(s,"art-hover"))}),n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,x.default)({name:"progress",position:"top",index:10})),!t.thumbnails.url||t.isLive||u.isMobile||this.add((0,F.default)({name:"thumbnails",position:"top",index:20})),this.add((0,C.default)({name:"loop",position:"top",index:30})),this.add((0,b.default)({name:"playAndPause",position:"left",index:10})),this.add((0,I.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,k.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,u.sleep)().then(function(){e.art.quality=t.quality}),t.screenshot&&!u.isMobile&&this.add((0,E.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,D.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,_.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,A.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,v.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,h.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(h.dataset.index)});v?v.insertAdjacentElement("beforebegin",h):(0,l.append)(this.$parent,h),s.html&&(0,l.append)(h,s.html),s.style&&(0,l.setStyles)(h,s.style),s.tooltip&&(0,l.tooltip)(h,s.tooltip);var g=[];if(s.click){var _=this.art.events.proxy(h,"click",function(e){e.preventDefault(),s.click.call(i.art,i,e)});g.push(_)}return s.selector&&["left","right"].includes(s.position)&&this.addSelector(s,h,g),this[c]=h,this.cache.set(c,{$ref:h,events:g,option:s}),s.mounted&&s.mounted.call(this.art,h),h}}},{key:"addSelector",value:function(e,t,r){var n,a=this.art.events,i=a.hover,u=a.proxy;(0,l.addClass)(t,"art-control-selector");var p=(0,l.createElement)("div");(0,l.addClass)(p,"art-selector-value"),(0,l.append)(p,e.html),t.innerText="",(0,l.append)(t,p);var f=e.selector.map(function(e,t){return'
').concat(e.html,"
")}).join(""),d=(0,l.createElement)("div");(0,l.addClass)(d,"art-selector-list"),(0,l.append)(d,f),(0,l.append)(t,d);var h=function(){var e=(0,l.getStyle)(t,"width"),r=(0,l.getStyle)(d,"width");d.style.left="".concat(e/2-r/2,"px")};i(t,h);var m=this,v=u(d,"click",(n=(0,o._)(function(t){var r,n,o,a,i,u;return(0,s._)(this,function(s){switch(s.label){case 0:if(!(n=(null!==(r=t.composedPath())&&void 0!==r?r:[]).find(function(e){return(0,l.hasClass)(e,"art-selector-item")})))return[2];if((0,l.inverseClass)(n,"art-current"),o=Number(n.dataset.index),i=null!==(a=e.selector[o])&&void 0!==a?a:{},p.innerText=n.innerText,!e.onSelect)return[3,2];return[4,e.onSelect.call(m.art,i,n,t)];case 1:u=s.sent(),(0,c.isStringOrNumber)(u)&&(p.innerHTML=u),s.label=2;case 2:return h(),[2]}})}),function(e){return n.apply(this,arguments)}));r.push(v)}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,u.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r
',mounted:function(e){var o=!1,a=(0,i.query)(".art-progress-hover",e),u=(0,i.query)(".art-progress-loaded",e),p=(0,i.query)(".art-progress-played",e),f=(0,i.query)(".art-progress-highlight",e),d=(0,i.query)(".art-progress-indicator",e),h=(0,i.query)(".art-progress-tip",e);function m(e,t){"loaded"===e&&(0,i.setStyle)(u,"width","".concat(100*t,"%")),"played"===e&&((0,i.setStyle)(p,"width","".concat(100*t,"%")),(0,i.setStyle)(d,"left","".concat(100*t,"%")))}r.indicator?(0,i.append)(d,r.indicator):(0,i.setStyle)(d,"backgroundColor","var(--art-theme)"),t.on("video:loadedmetadata",function(){for(var e=0;e');(0,i.append)(f,a)}}),m("loaded",t.loaded),t.on("setBar",function(e,t){m(e,t)}),t.on("video:progress",function(){m("loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",function(){m("played",t.played)}):t.on("video:timeupdate",function(){m("played",t.played)}),t.on("video:ended",function(){m("played",1)}),i.isMobile||(c(e,"click",function(e){e.target!==d&&l(t,e)}),c(e,"mousemove",function(r){var n,o,l,c,u,p,d,m;(n=s(t,r).width,(0,i.setStyle)(a,"width","".concat(n,"px")),(0,i.setStyle)(a,"display","flex"),(0,i.setStyle)(h,"display","flex"),(0,i.includeFromEvent)(r,f))?(o=s(t,r).width,l=r.target.dataset.text,h.innerHTML=l,o<=(c=h.clientWidth)/2?(0,i.setStyle)(h,"left",0):o>e.clientWidth-c/2?(0,i.setStyle)(h,"left","".concat(e.clientWidth-c,"px")):(0,i.setStyle)(h,"left","".concat(o-c/2,"px"))):(p=(u=s(t,r)).width,d=u.time,h.innerHTML=d,p<=(m=h.clientWidth)/2?(0,i.setStyle)(h,"left",0):p>e.clientWidth-m/2?(0,i.setStyle)(h,"left","".concat(e.clientWidth-m,"px")):(0,i.setStyle)(h,"left","".concat(p-m/2,"px")))}),c(e,"mouseleave",function(){(0,i.setStyle)(h,"display","none"),(0,i.setStyle)(a,"display","none")}),c(e,"mousedown",function(e){o=0===e.button}),t.on("document:mousemove",function(e){if(o){var r=s(t,e),n=r.second;m("played",r.percentage),t.seek=n}}),t.on("document:mouseup",function(){o&&(o=!1)}))}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l3dNa:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,i.secondToTime)(t.currentTime)," / ").concat((0,i.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o'),l=(0,i.append)(s,'
'),c=(0,i.append)(l,'
'),u=(0,i.append)(l,'
'),p=(0,i.append)(u,'
'),f=(0,i.append)(p,'
'),d=(0,i.append)(u,'
');function h(e){var t=u.getBoundingClientRect(),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){var e;if(null!==(e=t.muted)&&void 0!==e?e:0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(a,"display","flex"),(0,i.setStyle)(d,"top","100%"),(0,i.setStyle)(f,"top","100%"),c.innerText=0;else{var r=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(a,"display","none"),(0,i.setStyle)(d,"top","".concat(100-r,"%")),(0,i.setStyle)(f,"top","".concat(100-r,"%")),c.innerText=Math.floor(r)}}if(m(),t.on("video:volumechange",m),r(o,"click",function(){t.muted=!0}),r(a,"click",function(){t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{var v=!1;r(u,"mousedown",function(e){v=0===e.button,t.volume=h(e)}),t.on("document:mousemove",function(e){v&&(t.muted=!1,t.volume=h(e))}),t.on("document:mouseup",function(){v&&(v=!1)})}}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2XGYu":[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,i.append)(e,n.setting),r(e,"click",function(){t.setting.toggle(),t.setting.updateStyle()}),t.on("setting",function(t){(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dc68e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("@swc/helpers/_/_ts_generator"),l=e("../utils"),c=e("./progress");function u(e){return function(t){return(0,i._)((0,a._)({},e),{mounted:function(e){var r,n=t.option,a=t.template,i=a.$progress,u=a.$video,p=t.events,f=p.proxy,d=p.loadImg,h=null,m=!1,v=!1;f(i,"mousemove",(r=(0,o._)(function(r){return(0,s._)(this,function(o){switch(o.label){case 0:if(m)return[3,2];return m=!0,[4,d(n.thumbnails.url)];case 1:h=o.sent(),v=!0,o.label=2;case 2:if(v){var a,s,p,f,g,_,y,b,w,x,j,k;(0,l.setStyle)(e,"display","flex"),s=(0,c.getPosFromEvent)(t,r).width,f=(p=n.thumbnails).url,g=p.number,_=p.column,y=p.width,b=p.height,w=null!=y?y:h.naturalWidth/_,x=null!=b?b:w/(u.videoWidth/u.videoHeight),k=(j=Math.floor(s/(i.clientWidth/g)))%_,(0,l.setStyle)(e,"backgroundImage","url(".concat(f,")")),(0,l.setStyle)(e,"height","".concat(x,"px")),(0,l.setStyle)(e,"width","".concat(w,"px")),(0,l.setStyle)(e,"backgroundPosition","-".concat(k*w,"px -").concat((Math.ceil(j/_)-1)*x,"px")),s<=w/2?(0,l.setStyle)(e,"left",0):s>i.clientWidth-w/2?(0,l.setStyle)(e,"left","".concat(i.clientWidth-w,"px")):(0,l.setStyle)(e,"left","".concat(s-w/2,"px"))}return[2]}})}),function(e){return r.apply(this,arguments)})),f(i,"mouseleave",function(){(0,l.setStyle)(e,"display","none")}),t.on("hover",function(t){t||(0,l.setStyle)(e,"display","none")})}})}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","./progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],idjoR:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.screenshot),r(e,"click",function(){t.screenshot()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7Yi5T":[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{mounted:function(e){var r=(0,i.append)(e,''),n=(0,i.append)(e,'');t.on("loop",function(o){o&&o.length?((0,i.setStyle)(e,"display","flex"),(0,i.setStyle)(r,"left","calc(".concat(o[0]/t.duration*100,"% - ").concat(r.clientWidth,"px)")),(0,i.setStyle)(n,"left","".concat(o[1]/t.duration*100,"%"))):(0,i.setStyle)(e,"display","none")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],huCXW:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.airplay),r(e,"click",function(){return t.airplay()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5RLZo":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("../utils"),c=e("../utils/component"),u=n.interopDefault(c),p=e("./playbackRate"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./flip"),v=n.interopDefault(m),g=e("./info"),_=n.interopDefault(g),y=e("./version"),b=n.interopDefault(y),w=e("./close"),x=n.interopDefault(w),j=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="contextmenu",n.$parent=e.template.$contextmenu,l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,i=o.$contextmenu;r.playbackRate&&this.add((0,f.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,h.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,v.default)({name:"flip",index:30})),this.add((0,_.default)({name:"info",index:40})),this.add((0,b.default)({name:"version",index:50})),this.add((0,x.default)({name:"close",index:60}));for(var s=0;su+c&&(m=c-h),n+d>p+s&&(v=s-d),(0,l.setStyles)(i,{top:"".concat(v,"px"),left:"".concat(m,"px")})}}),n(a,"click",function(t){(0,l.includeFromEvent)(t,i)||(e.show=!1)}),this.art.on("blur",function(){e.show=!1})}}]),r}(u.default)},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","../utils":"7MU7R","../utils/component":"2dsXg","./playbackRate":"7w1iV","./aspectRatio":"cJDR0","./flip":"cpqHQ","./info":"FMfqg","./version":"a9IHg","./close":"9PxVB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7w1iV":[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map(function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",function(){var r=(0,i.queryAll)("span",e).find(function(e){return Number(e.dataset.value)===t.playbackRate});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cJDR0:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map(function(e){return'').concat("default"===e?r.get("Default"):e,"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cpqHQ:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map(function(e){return'').concat(r.get((0,i.capitalize)(e)),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],FMfqg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a9IHg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return(0,a._)((0,o._)({},e),{html:'ArtPlayer 5.1.0'})}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9PxVB":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6JYu5":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("./utils"),c=e("./utils/component"),u=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="info",l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e,t=this,r=this.art,n=r.proxy,o=r.constructor,a=r.template,i=a.$infoPanel,s=a.$infoClose,c=a.$video;n(s,"click",function(){t.show=!1});var u=null,p=null!==(e=(0,l.queryAll)("[data-video]",i))&&void 0!==e?e:[];this.art.on("destroy",function(){return clearTimeout(u)}),function e(){for(var t=0;t".concat((0,f.escape)(e),"

")}).join(""):e.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,o._)(function(){var n,o,a,i,s,u;return(0,p._)(this,function(p){switch(p.label){case 0:return o=(n=r.art).i18n,a=n.notice,i=n.option,s=(0,c._)((0,l._)({},i.subtitle,t),{url:e}),[4,r.init(s)];case 1:return u=p.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,u]}})})()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,i=o.$video,s=o.$track,l=(0,f.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.track.mode="hidden",this.eventDestroy(),(0,f.remove)(s),(0,f.append)(i,l),o.$track=l,this.eventDestroy=a(this.textTrack,"cuechange",function(){return r.update()})}},{key:"init",value:function(e){var t=this;return(0,o._)(function(){var r,n,o;return(0,p._)(this,function(a){return(n=(r=t.art).notice,o=r.template.$subtitle,(0,v.default)(e,_.default.subtitle),e.url)?(t.style(e.style),[2,fetch(e.url).then(function(e){return e.arrayBuffer()}).then(function(r){var n,o=new TextDecoder(e.encoding).decode(r);switch(t.art.emit("subtitleLoad",e.url),null!==(n=e.type)&&void 0!==n?n:(0,f.getExt)(e.url)){case"srt":var a=(0,f.srtToVtt)(o),i=e.onVttLoad(a);return(0,f.vttToBlob)(i);case"ass":var s=(0,f.assToVtt)(o),l=e.onVttLoad(s);return(0,f.vttToBlob)(l);case"vtt":var c=e.onVttLoad(o);return(0,f.vttToBlob)(c);default:return e.url}}).then(function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e),t.art.emit("subtitleSwitch",e)),e}).catch(function(e){throw o.innerHTML="",n.show=e,e})]):[2]})})()}}]),r}(h.default)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_create_super":"86fte","@swc/helpers/_/_ts_generator":"6Xyd0","./utils":"7MU7R","./utils/component":"2dsXg","option-validator":"8OeHO","./scheme":"39ygm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"47RGg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("../utils/error"),s=e("./clickInit"),l=n.interopDefault(s),c=e("./hoverInit"),u=n.interopDefault(c),p=e("./moveInit"),f=n.interopDefault(p),d=e("./resizeInit"),h=n.interopDefault(d),m=e("./gestureInit"),v=n.interopDefault(m),g=e("./viewInit"),_=n.interopDefault(g),y=e("./documentInit"),b=n.interopDefault(y),w=e("./updateInit"),x=n.interopDefault(w),j=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,l.default)(t,this),(0,u.default)(t,this),(0,f.default)(t,this),(0,h.default)(t,this),(0,v.default)(t,this),(0,_.default)(t,this),(0,b.default)(t,this),(0,x.default)(t,this)}return(0,a._)(e,[{key:"proxy",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this;if(Array.isArray(t))return t.map(function(t){return o.proxy(e,t,r,n)});e.addEventListener(t,r,n);var a=function(){return e.removeEventListener(t,r,n)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"loadImg",value:function(e){var t=this;return new Promise(function(r,n){var o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return n(new i.ArtPlayerError("Unable to get Image"));(o=new Image).src=e}if(o.complete)return r(o);t.proxy(o,"load",function(){return r(o)}),t.proxy(o,"error",function(){return n(new i.ArtPlayerError("Failed to load Image: ".concat(o.src)))})})}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;eMath.abs(a)&&2>Math.abs(o))return i;var s=180*Math.atan2(o,a)/Math.PI;return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:s>=135&&s<=180&&(i=3),i}(c,u,i,f),h=[3,4].includes(d),m=[1,2].includes(d);if(null!==(r=h&&!e.isRotate)&&void 0!==r?r:m&&e.isRotate){var v=(0,o.clamp)((i-c)/e.width,-1,1),g=(0,o.clamp)((f-u)/e.height,-1,1),_=e.isRotate?g:v,y=s===n?e.constructor.TOUCH_MOVE_RATIO:1,b=(0,o.clamp)(p+e.duration*_*y,0,e.duration);e.seek=b,e.emit("setBar","played",(0,o.clamp)(b/e.duration,0,1)),e.notice.show="".concat((0,o.secondToTime)(b)," / ").concat((0,o.secondToTime)(e.duration))}}};t.proxy(i,"touchstart",function(e){s=i,f(e)}),t.proxy(n,"touchstart",function(e){s=n,f(e)}),t.proxy(n,"touchmove",d),t.proxy(i,"touchmove",d),t.proxy(document,"touchend",function(){l&&(c=0,u=0,p=0,l=!1,s=null)})}}},{"../utils":"7MU7R","../control/progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jT4ny:[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("../utils");function a(e,t){var r=e.option,n=e.constructor,a=e.template.$container,i=(0,o.throttle)(function(){e.emit("view",(0,o.isInViewport)(a,n.SCROLL_GAP))},n.SCROLL_TIME);t.proxy(window,"scroll",function(){return i()}),e.on("view",function(t){r.autoMini&&(e.mini=!t)})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],qu07O:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",function(t){e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",function(t){e.emit("document:mouseup",t)})}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9LDSG":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",function(){cancelAnimationFrame(t)})}}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gszG1:[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/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("./utils"),s=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.keys={},t.option.hotkey&&!i.isMobile&&this.init()}return(0,a._)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add(27,function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)}),this.add(32,function(){e.art.toggle()}),this.add(37,function(){e.art.backward=n.SEEK_STEP}),this.add(38,function(){e.art.volume+=n.VOLUME_STEP}),this.add(39,function(){e.art.forward=n.SEEK_STEP}),this.add(40,function(){e.art.volume-=n.VOLUME_STEP}),r(window,"keydown",function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n){var o=e.keys[t.keyCode];if(o){t.preventDefault();for(var a=0;a'},{}],fRhwm:[function(e,t,r){t.exports=''},{}],"4tFZV":[function(e,t,r){t.exports=''},{}],a8x3K:[function(e,t,r){t.exports=''},{}],e0utR:[function(e,t,r){t.exports=''},{}],"69Sc6":[function(e,t,r){t.exports=''},{}],"72xuc":[function(e,t,r){t.exports=''},{}],"85cgQ":[function(e,t,r){t.exports=''},{}],"1Qm4Q":[function(e,t,r){t.exports=''},{}],fpGzT:[function(e,t,r){t.exports=''},{}],jlMSj:[function(e,t,r){t.exports=''},{}],"7sEdH":[function(e,t,r){t.exports=''},{}],eHsVM:[function(e,t,r){t.exports=''},{}],"2f6qz":[function(e,t,r){t.exports=''},{}],cy2gj:[function(e,t,r){t.exports=''},{}],hGnnd:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_inherits"),l=e("@swc/helpers/_/_to_consumable_array"),c=e("@swc/helpers/_/_create_super"),u=e("@swc/helpers/_/_ts_generator"),p=e("./flip"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./playbackRate"),v=n.interopDefault(m),g=e("./subtitleOffset"),_=n.interopDefault(g),y=e("../utils/component"),b=n.interopDefault(y),w=e("../utils/error"),x=e("../utils"),j=/*#__PURE__*/function(e){(0,s._)(r,e);var t=(0,c._)(r);function r(e){(0,a._)(this,r),n=t.call(this,e);var n,o=e.option,i=e.controls,s=e.template.$setting;return n.name="setting",n.$parent=s,n.option=[],n.events=[],n.cache=new Map,o.setting&&(n.init(),e.on("blur",function(){n.show&&(n.show=!1,n.render(n.option))}),e.on("focus",function(e){var t=(0,x.includeFromEvent)(e,i.setting),r=(0,x.includeFromEvent)(e,n.$parent);!n.show||t||r||(n.show=!1,n.render(n.option))})),n}return(0,i._)(r,[{key:"defaultSettings",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,v.default)(this.art)),t.aspectRatio&&e.push((0,h.default)(this.art)),t.flip&&e.push((0,f.default)(this.art)),t.subtitleOffset&&e.push((0,_.default)(this.art)),e}},{key:"init",value:function(){var e=this.art.option,t=(0,l._)(this.defaultSettings).concat((0,l._)(e.settings));this.option=r.makeRecursion(t),this.destroy(),this.render(this.option)}},{key:"destroy",value:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r'),l=(0,x.createElement)("div");(0,x.addClass)(l,"art-setting-item-left-icon"),(0,x.append)(l,n.arrowLeft),(0,x.append)(s,l),(0,x.append)(s,e.$parentItem.html);var c=o(i,"click",function(){return t.render(e.$parentList)});return this.events.push(c),i}},{key:"creatItem",value:function(e,t){var r=this.art,n=r.icons,a=r.proxy,i=r.constructor,s=(0,x.createElement)("div");(0,x.addClass)(s,"art-setting-item"),(0,x.setStyle)(s,"height","".concat(i.SETTING_ITEM_HEIGHT,"px")),(0,x.isStringOrNumber)(t.name)&&(s.dataset.name=t.name),(0,x.isStringOrNumber)(t.value)&&(s.dataset.value=t.value);var l=(0,x.append)(s,'
'),c=(0,x.append)(s,'
'),p=(0,x.createElement)("div");switch((0,x.addClass)(p,"art-setting-item-left-icon"),e){case"switch":case"range":(0,x.append)(p,(null!==(g=(0,x.isStringOrNumber)(t.icon))&&void 0!==g?g:t.icon instanceof Element)?t.icon:n.config);break;case"selector":t.selector&&t.selector.length?(0,x.append)(p,(null!==(_=(0,x.isStringOrNumber)(t.icon))&&void 0!==_?_:t.icon instanceof Element)?t.icon:n.config):(0,x.append)(p,n.check)}(0,x.append)(l,p),t.$icon=p,(0,x.def)(t,"icon",{configurable:!0,get:function(){return p.innerHTML},set:function(e){(0,x.isStringOrNumber)(e)&&(p.innerHTML=e)}});var f=(0,x.createElement)("div");(0,x.addClass)(f,"art-setting-item-left-text"),(0,x.append)(f,null!==(y=t.html)&&void 0!==y?y:""),(0,x.append)(l,f),t.$html=f,(0,x.def)(t,"html",{configurable:!0,get:function(){return f.innerHTML},set:function(e){(0,x.isStringOrNumber)(e)&&(f.innerHTML=e)}});var d=(0,x.createElement)("div");switch((0,x.addClass)(d,"art-setting-item-right-tooltip"),(0,x.append)(d,null!==(b=t.tooltip)&&void 0!==b?b:""),(0,x.append)(c,d),t.$tooltip=d,(0,x.def)(t,"tooltip",{configurable:!0,get:function(){return d.innerHTML},set:function(e){(0,x.isStringOrNumber)(e)&&(d.innerHTML=e)}}),e){case"switch":var h=(0,x.createElement)("div");(0,x.addClass)(h,"art-setting-item-right-icon");var m=(0,x.append)(h,n.switchOn),v=(0,x.append)(h,n.switchOff);(0,x.setStyle)(t.switch?v:m,"display","none"),(0,x.append)(c,h),t.$switch=t.switch,(0,x.def)(t,"switch",{configurable:!0,get:function(){return t.$switch},set:function(e){t.$switch=e,e?((0,x.setStyle)(v,"display","none"),(0,x.setStyle)(m,"display",null)):((0,x.setStyle)(v,"display",null),(0,x.setStyle)(m,"display","none"))}});break;case"range":var g,_,y,b,w,j,k,M,I=(0,x.createElement)("div");(0,x.addClass)(I,"art-setting-item-right-icon");var S=(0,x.append)(I,'');S.value=null!==(w=t.range[0])&&void 0!==w?w:0,S.min=null!==(j=t.range[1])&&void 0!==j?j:0,S.max=null!==(k=t.range[2])&&void 0!==k?k:10,S.step=null!==(M=t.range[3])&&void 0!==M?M:1,(0,x.addClass)(S,"art-setting-range"),(0,x.append)(c,I),t.$range=S,(0,x.def)(t,"range",{configurable:!0,get:function(){return S.valueAsNumber},set:function(e){S.value=Number(e)}});break;case"selector":if(t.selector&&t.selector.length){var D=(0,x.createElement)("div");(0,x.addClass)(D,"art-setting-item-right-icon"),(0,x.append)(D,n.arrowRight),(0,x.append)(c,D)}}switch(e){case"switch":if(t.onSwitch){var T,F=this,R=a(s,"click",(T=(0,o._)(function(e){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,t.onSwitch.call(F.art,t,s,e)];case 1:return t.switch=r.sent(),[2]}})}),function(e){return T.apply(this,arguments)}));this.events.push(R)}break;case"range":if(t.$range){if(t.onRange){var E,O=this,C=a(t.$range,"change",(E=(0,o._)(function(e){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,t.onRange.call(O.art,t,s,e)];case 1:return t.tooltip=r.sent(),[2]}})}),function(e){return E.apply(this,arguments)}));this.events.push(C)}if(t.onChange){var W,A=this,P=a(t.$range,"input",(W=(0,o._)(function(e){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,t.onChange.call(A.art,t,s,e)];case 1:return t.tooltip=r.sent(),[2]}})}),function(e){return W.apply(this,arguments)}));this.events.push(P)}}break;case"selector":var z,L=this,$=a(s,"click",(z=(0,o._)(function(e){var r,n,o;return(0,u._)(this,function(a){switch(a.label){case 0:if(!(t.selector&&t.selector.length))return[3,1];return L.render(t.selector,t.width),[3,3];case 1:for((0,x.inverseClass)(s,"art-current"),r=0;rd?((0,x.setStyle)(i,"left",null),(0,x.setStyle)(i,"right",null)):((0,x.setStyle)(i,"left","".concat(h,"px")),(0,x.setStyle)(i,"right","auto"))}}},{key:"render",value:function(e,t){var r=this.art.constructor;if(this.cache.has(e)){var n=this.cache.get(e);(0,x.inverseClass)(n,"art-current"),(0,x.setStyle)(this.$parent,"width","".concat(n.dataset.width,"px")),(0,x.setStyle)(this.$parent,"height","".concat(n.dataset.height,"px")),this.updateStyle(Number(n.dataset.width))}else{var o=(0,x.createElement)("div");(0,x.addClass)(o,"art-setting-panel"),o.dataset.width=null!=t?t:r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0].$parentItem&&((0,x.append)(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(var a=0;ao&&cn&&c
'}),c=(0,o.query)(".art-auto-playback-last",l),u=(0,o.query)(".art-auto-playback-jump",l),p=(0,o.query)(".art-auto-playback-close",l);return e.on("video:timeupdate",function(){if(e.playing){var t,r,o=null!==(t=n.get("times"))&&void 0!==t?t:{},i=Object.keys(o);i.length>a.AUTO_PLAYBACK_MAX&&delete o[i[0]],o[null!==(r=e.option.id)&&void 0!==r?r:e.option.url]=e.currentTime,n.set("times",o)}}),e.on("ready",function(){var f,d,h=(null!==(f=n.get("times"))&&void 0!==f?f:{})[null!==(d=e.option.id)&&void 0!==d?d:e.option.url];h&&h>=a.AUTO_PLAYBACK_MIN&&((0,o.append)(p,r.close),(0,o.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,o.secondToTime)(h)),u.innerText=t.get("Jump Play"),i(p,"click",function(){(0,o.setStyle)(l,"display","none")}),i(u,"click",function(){e.seek=h,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",function(){setTimeout(function(){(0,o.setStyle)(l,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}),{name:"auto-playback",get times(){var f;return null!==(f=n.get("times"))&&void 0!==f?f:{}},clear:function(){return n.del("times")},delete:function(e){var t,r=null!==(t=n.get("times"))&&void 0!==t?t:{};return delete r[e],n.set("times",r),r}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],giGC3:[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("../utils");function a(e){var t=e.constructor,r=e.proxy,n=e.template,a=n.$player,i=n.$video,s=null,l=!1,c=1,u=function(){clearTimeout(s),l&&(l=!1,e.playbackRate=c,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",function(r){1===r.touches.length&&e.playing&&!e.isLock&&(s=setTimeout(function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],e0Ov6:[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("../utils");function a(e){var t=e.layers,r=e.icons,n=e.template.$player;return t.add({name:"lock",mounted:function(t){var n=(0,o.append)(t,r.lock),a=(0,o.append)(t,r.unlock);(0,o.setStyle)(n,"display","none"),e.on("lock",function(e){e?((0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(a,"display","none")):((0,o.setStyle)(n,"display","none"),(0,o.setStyle)(a,"display","inline-flex"))})},click:function(){(0,o.hasClass)(n,"art-lock")?((0,o.removeClass)(n,"art-lock"),this.isLock=!1,e.emit("lock",!1)):((0,o.addClass)(n,"art-lock"),this.isLock=!0,e.emit("lock",!0))}}),{name:"lock",get state(){return(0,o.hasClass)(n,"art-lock")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["4Be4O"],"4Be4O","parcelRequire4dc0"); \ No newline at end of file +!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=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 a[n]}}),a[n]=c;for(var u=0;u ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c0&&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.0"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2023-08-26 16:47:28"}},{key:"config",get:function(){return k.default}},{key:"utils",get:function(){return _}},{key:"scheme",get:function(){return w.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 S.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,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:{},escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:_.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}}]),r}(b.default);if(ie.DEBUG=!1,ie.CONTEXTMENU=!0,ie.NOTICE_TIME=2e3,ie.SETTING_WIDTH=250,ie.SETTING_ITEM_WIDTH=200,ie.SETTING_ITEM_HEIGHT=35,ie.RESIZE_TIME=200,ie.SCROLL_TIME=200,ie.SCROLL_GAP=50,ie.AUTO_PLAYBACK_MAX=10,ie.AUTO_PLAYBACK_MIN=5,ie.AUTO_PLAYBACK_TIMEOUT=3e3,ie.RECONNECT_TIME_MAX=5,ie.RECONNECT_SLEEP_TIME=1e3,ie.CONTROL_HIDE_TIME=3e3,ie.DBCLICK_TIME=300,ie.DBCLICK_FULLSCREEN=!0,ie.MOBILE_DBCLICK_PLAY=!0,ie.MOBILE_CLICK_PLAY=!1,ie.AUTO_ORIENTATION_TIME=200,ie.INFO_LOOP_TIME=1e3,ie.FAST_FORWARD_VALUE=3,ie.FAST_FORWARD_TIME=1e3,ie.TOUCH_MOVE_RATIO=.5,ie.VOLUME_STEP=.1,ie.SEEK_STEP=5,ie.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],ie.ASPECT_RATIO=["default","4:3","16:9"],ie.FLIP=["normal","horizontal","vertical"],ie.FULLSCREEN_WEB_IN_BODY=!1,ie.LOG_VERSION=!0,ie.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){var le=_.createElement("style");le.id="artplayer-style",le.textContent=m.default,document.head.appendChild(le)}"undefined"!=typeof window&&(window.Artplayer=ie),setTimeout((function(){ie.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(ie.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")}))},{"@swc/helpers/src/_assert_this_initialized.mjs":"9qUyT","@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_create_super.mjs":"hOJPY","bundle-text:./style/index.less":"7Efch","option-validator":"8OeHO","./utils/emitter":"23yIZ","./utils":"7esST","./scheme":"hYXnH","./config":"1lpcp","./template":"aRbVP","./i18n":"d1hXD","./player":"aUXOX","./control":"7Cphn","./contextmenu":"aH04y","./info":"kEevD","./subtitle":"14H9c","./events":"9biZS","./hotkey":"bCoXC","./layer":"eQf6l","./loading":"gzHl5","./notice":"gdkSy","./mask":"kH8gp","./icons":"1Mh7c","./setting":"2lyD4","./storage":"38YEE","./plugins":"b3Yxu","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9qUyT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_assert_this_initialized.js")},{"../esm/_assert_this_initialized.js":"jTlDX","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],jTlDX:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.defineInteropFlag(r),n.export(r,"_assert_this_initialized",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hTt7M:[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})}},{}],"9WMH2":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_class_call_check.js")},{"../esm/_class_call_check.js":"dRqgV","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],dRqgV:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_class_call_check",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9mRre":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_create_class.js")},{"../esm/_create_class.js":"8RAzW","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8RAzW":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:document).querySelector(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function i(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function u(e,t){var r;return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),null!==(r=e.lastElementChild)&&void 0!==r?r:e.lastChild}function p(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function d(e,t){for(var r in t)f(e,r,t[r]);return e}function h(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function m(e){return Array.from(e.parentElement.children).filter((function(t){return t!==e}))}function v(e,t){m(e).forEach((function(e){return l(e,t)})),i(e,t)}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";o.isMobile||(e.setAttribute("aria-label",t),i(e,"hint--rounded"),i(e,"hint--".concat(r)))}function y(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e.getBoundingClientRect(),a=null!==(t=window.innerHeight)&&void 0!==t?t:document.documentElement.clientHeight,s=null!==(r=window.innerWidth)&&void 0!==r?r:document.documentElement.clientWidth,i=o.top-n<=a&&o.top+o.height+n>=0,l=o.left-n<=s+n&&o.left+o.width+n>=0;return i&&l}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function _(e,t){return t.parentNode.replaceChild(e,t),e}function j(e){return document.createElement(e)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=j("i");return i(r,"art-icon"),i(r,"art-icon-".concat(e)),u(r,t),r}},{"./compatibility":"g6fxC","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],g6fxC:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"userAgent",(function(){return a})),n.export(r,"isSafari",(function(){return s})),n.export(r,"isWechat",(function(){return i})),n.export(r,"isIE",(function(){return l})),n.export(r,"isAndroid",(function(){return c})),n.export(r,"isIOS",(function(){return u})),n.export(r,"isIOS13",(function(){return p})),n.export(r,"isMobile",(function(){return f}));var o,a="undefined"!=typeof navigator?navigator.userAgent:"",s=/^((?!chrome|android).)*safari/i.test(a),i=/MicroMessenger/i.test(a),l=/MSIE|Trident/i.test(a),c=/android/i.test(a),u=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,p=null!=u?u:a.includes("Macintosh")&&navigator.maxTouchPoints>=1,f=null!==(o=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))&&void 0!==o?o:p},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],d6sk8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ArtPlayerError",(function(){return h})),n.export(r,"errorHandle",(function(){return m}));var o=e("@swc/helpers/src/_assert_this_initialized.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_class_call_check.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_inherits.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_wrap_native_super.mjs"),p=n.interopDefault(u),f=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(f),h=function(e){"use strict";(0,c.default)(r,e);var t=(0,d.default)(r);function r(e,n){var o;return(0,i.default)(this,r),o=t.call(this,e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace((0,a.default)(o),null!=n?n:o.constructor),o.name="ArtPlayerError",o}return r}((0,p.default)(Error));function m(e,t){if(!e)throw new h(t);return e}},{"@swc/helpers/src/_assert_this_initialized.mjs":"9qUyT","@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_wrap_native_super.mjs":"fTSjM","@swc/helpers/src/_create_super.mjs":"hOJPY","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],fTSjM:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_wrap_native_super.js")},{"../esm/_wrap_native_super.js":"1PJxD","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"1PJxD":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_wrap_native_super",(function(){return l})),n.export(r,"_",(function(){return l}));var o=e("./_construct.js"),a=e("./_get_prototype_of.js"),s=e("./_is_native_function.js"),i=e("./_set_prototype_of.js");function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!(0,s._is_native_function)(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,o._construct)(e,arguments,(0,a._get_prototype_of)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i._set_prototype_of)(r,e)},l(e)}},{"./_construct.js":"8tOYA","./_get_prototype_of.js":"2mh6E","./_is_native_function.js":"aYK5s","./_set_prototype_of.js":"eAgjA","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8tOYA":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_construct",(function(){return s})),n.export(r,"_",(function(){return s}));var o=e("./_is_native_reflect_construct.js"),a=e("./_set_prototype_of.js");function s(e,t,r){return s=(0,o._is_native_reflect_construct)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,a._set_prototype_of)(o,r.prototype),o},s.apply(null,arguments)}},{"./_is_native_reflect_construct.js":"M5rXK","./_set_prototype_of.js":"eAgjA","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],aYK5s:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return-1!==Function.toString.call(e).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_is_native_function",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],gOgPD:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat((t=e,t.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var t}function a(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){var t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/[:.]/).map((function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)})).join("")}return"WEBVTT\n\n".concat(e.split(/\r?\n/).map((function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((function(e){return e.trim()})).join("\n")}:null})).filter((function(e){return e})).map((function(e,t){return e?"".concat(t+1,"\n").concat(e.start," --\x3e ").concat(e.end,"\n").concat(e.text):""})).filter((function(e){return e.trim()})).join("\n\n"))}n.defineInteropFlag(r),n.export(r,"srtToVtt",(function(){return o})),n.export(r,"vttToBlob",(function(){return a})),n.export(r,"assToVtt",(function(){return s}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8pVuv":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e.includes("?")?o(e.split("?")[0]):e.includes("#")?o(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function a(e,t){var r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}n.defineInteropFlag(r),n.export(r,"getExt",(function(){return o})),n.export(r,"download",(function(){return a}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],iCvtI:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"def",(function(){return s})),n.export(r,"has",(function(){return l})),n.export(r,"get",(function(){return c})),n.export(r,"mergeDeep",(function(){return u}));var o=e("@swc/helpers/src/_to_consumable_array.mjs"),a=n.interopDefault(o),s=Object.defineProperty,i=Object.prototype.hasOwnProperty;function l(e,t){return i.call(e,t)}function c(e,t){return Object.getOwnPropertyDescriptor(e,t)}function u(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(t){return setTimeout(t,e)}))}function a(e,t){var r;return function(){for(var n=arguments.length,o=new Array(n),a=0;a0?[t,r,n]:[r,n]).map((function(e){return e<10?"0".concat(e):String(e)})).join(":")}function u(e){var t;return e.replace(/[&<>'"]/g,(function(e){return null!==(t={"&":"&","<":"<",">":">","'":"'",'"':"""}[e])&&void 0!==t?t:e}))}},{"@swc/helpers/src/_type_of.mjs":"d3zJ2","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hYXnH:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ComponentOption",(function(){return v}));var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils"),c="array",u="boolean",p="string",f="number",d="object",h="function";function m(e,t,r){var n,o;return(0,l.errorHandle)(null!==(o=null!==(n=t===p)&&void 0!==n?n:t===f)&&void 0!==o?o:e instanceof Element,"".concat(r.join(".")," require '").concat(p,"' or 'Element' type"))}var v={html:m,disable:"?".concat(u),name:"?".concat(p),index:"?".concat(f),style:"?".concat(d),click:"?".concat(h),mounted:"?".concat(h),tooltip:"?".concat(p,"|").concat(f),width:"?".concat(f),selector:"?".concat(c),onSelect:"?".concat(h),switch:"?".concat(u),onSwitch:"?".concat(h),range:"?".concat(c),onRange:"?".concat(h),onChange:"?".concat(h)};r.default={id:p,container:m,url:p,poster:p,type:p,theme:p,lang:p,volume:f,isLive:u,muted:u,autoplay:u,autoSize:u,autoMini:u,loop:u,flip:u,playbackRate:u,aspectRatio:u,screenshot:u,setting:u,hotkey:u,pip:u,mutex:u,backdrop:u,fullscreen:u,fullscreenWeb:u,subtitleOffset:u,miniProgressBar:u,useSSR:u,playsInline:u,lock:u,fastForward:u,autoPlayback:u,autoOrientation:u,airplay:u,plugins:[h],layers:[v],contextmenu:[v],settings:[v],controls:[(0,i.default)((0,a.default)({},v),{position:function(e,t,r){var n=["top","left","right"];return(0,l.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(u),html:p,url:p}],highlight:[{time:f,text:p}],thumbnails:{url:p,number:f,column:f,width:f,height:f},subtitle:{url:p,type:p,style:d,escape:u,encoding:p,onVttLoad:h},moreVideoAttr:d,i18n:d,icons:d,cssVar:d,customType:d}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],cCKRq:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_object_spread.js")},{"../esm/_object_spread.js":"g42Vq","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],g42Vq:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_object_spread",(function(){return a})),n.export(r,"_",(function(){return a}));var o=e("./_define_property.js");function a(e){for(var t=1;t
Player version:
5.1.0
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
'}}]),e}()},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","./utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],d1hXD:[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/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("../utils"),c=e("./zh-cn"),u=n.interopDefault(c),p=function(){"use strict";function e(t){(0,a.default)(this,e),this.art=t,this.languages={"zh-cn":u.default},this.language={},this.update(t.option.i18n)}return(0,i.default)(e,[{key:"init",value:function(){var e,t=this.art.option.lang.toLowerCase();this.language=null!==(e=this.languages[t])&&void 0!==e?e:{}}},{key:"get",value:function(e){var t;return null!==(t=this.language[e])&&void 0!==t?t:e}},{key:"update",value:function(e){this.languages=(0,l.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","../utils":"7esST","./zh-cn":"32rfy","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"32rfy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n={"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":"隔空播放不可用"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],aUXOX:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return we}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("./urlMix"),i=n.interopDefault(s),l=e("./attrMix"),c=n.interopDefault(l),u=e("./playMix"),p=n.interopDefault(u),f=e("./pauseMix"),d=n.interopDefault(f),h=e("./toggleMix"),m=n.interopDefault(h),v=e("./seekMix"),g=n.interopDefault(v),y=e("./volumeMix"),b=n.interopDefault(y),_=e("./currentTimeMix"),j=n.interopDefault(_),w=e("./durationMix"),x=n.interopDefault(w),k=e("./switchMix"),T=n.interopDefault(k),S=e("./playbackRateMix"),M=n.interopDefault(S),I=e("./aspectRatioMix"),D=n.interopDefault(I),E=e("./screenshotMix"),F=n.interopDefault(E),C=e("./fullscreenMix"),O=n.interopDefault(C),P=e("./fullscreenWebMix"),R=n.interopDefault(P),z=e("./pipMix"),A=n.interopDefault(z),$=e("./loadedMix"),H=n.interopDefault($),L=e("./playedMix"),V=n.interopDefault(L),q=e("./playingMix"),N=n.interopDefault(q),W=e("./autoSizeMix"),B=n.interopDefault(W),Y=e("./rectMix"),U=n.interopDefault(Y),X=e("./flipMix"),K=n.interopDefault(X),G=e("./miniMix"),J=n.interopDefault(G),Q=e("./loopMix"),Z=n.interopDefault(Q),ee=e("./posterMix"),te=n.interopDefault(ee),re=e("./autoHeightMix"),ne=n.interopDefault(re),oe=e("./cssVarMix"),ae=n.interopDefault(oe),se=e("./themeMix"),ie=n.interopDefault(se),le=e("./typeMix"),ce=n.interopDefault(le),ue=e("./stateMix"),pe=n.interopDefault(ue),fe=e("./subtitleOffsetMix"),de=n.interopDefault(fe),he=e("./airplayMix"),me=n.interopDefault(he),ve=e("./qualityMix"),ge=n.interopDefault(ve),ye=e("./optionInit"),be=n.interopDefault(ye),_e=e("./eventInit"),je=n.interopDefault(_e),we=function e(t){"use strict";(0,a.default)(this,e),(0,i.default)(t),(0,c.default)(t),(0,p.default)(t),(0,d.default)(t),(0,m.default)(t),(0,g.default)(t),(0,b.default)(t),(0,j.default)(t),(0,x.default)(t),(0,T.default)(t),(0,M.default)(t),(0,D.default)(t),(0,F.default)(t),(0,O.default)(t),(0,R.default)(t),(0,A.default)(t),(0,H.default)(t),(0,V.default)(t),(0,N.default)(t),(0,B.default)(t),(0,U.default)(t),(0,K.default)(t),(0,J.default)(t),(0,Z.default)(t),(0,te.default)(t),(0,ne.default)(t),(0,ae.default)(t),(0,ie.default)(t),(0,ce.default)(t),(0,pe.default)(t),(0,de.default)(t),(0,me.default)(t),(0,ge.default)(t),(0,je.default)(t),(0,be.default)(t)}},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","./urlMix":"94qAG","./attrMix":"gbKEc","./playMix":"4YToo","./pauseMix":"jJnYm","./toggleMix":"atYsy","./seekMix":"lsslL","./volumeMix":"cSjxV","./currentTimeMix":"7NYVK","./durationMix":"fW8lt","./switchMix":"j5YX9","./playbackRateMix":"Pz0cc","./aspectRatioMix":"ef8Wu","./screenshotMix":"ca8va","./fullscreenMix":"alRzX","./fullscreenWebMix":"4er6h","./pipMix":"jBv10","./loadedMix":"hQUyr","./playedMix":"8OMWK","./playingMix":"btSPR","./autoSizeMix":"dQH4Z","./rectMix":"hPGBy","./flipMix":"aVvjy","./miniMix":"juvfl","./loopMix":"llm7W","./posterMix":"2UAdD","./autoHeightMix":"377XR","./cssVarMix":"afCNS","./themeMix":"7l7GX","./typeMix":"3Vlhc","./stateMix":"ey2W0","./subtitleOffsetMix":"kDZ8v","./airplayMix":"bXTl1","./qualityMix":"hzrnC","./optionInit":"g9kWX","./eventInit":"lgPrh","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"94qAG":[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){var t=e.option,r=e.template.$video;(0,l.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,a.default)((function(){var o,a,s,c;return(0,i.default)(this,(function(i){switch(i.label){case 0:return n?(o=e.url,s=null!==(a=t.type)&&void 0!==a?a:(0,l.getExt)(n),c=t.customType[s],s&&c?[4,(0,l.sleep)()]:[3,2]):[3,4];case 1:return i.sent(),e.loading.show=!0,c.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,i.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",(function(){e.emit("restart",n)}))),[3,6];case 4:return[4,(0,l.sleep)()];case 5:i.sent(),e.loading.show=!0,i.label=6;case 6:return[2]}}))}))()}})}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"3zxnc":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_async_to_generator.js")},{"../esm/_async_to_generator.js":"eFkS8","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],eFkS8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var s=e.apply(t,r);function i(e){o(s,n,a,i,l,"next",e)}function l(e){o(s,n,a,i,l,"throw",e)}i(void 0)}))}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",(function(){return a})),n.export(r,"_",(function(){return a}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"1EjHr":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_ts_generator.js")},{"../esm/_ts_generator.js":"7FJ4U","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7FJ4U":[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:"jXHB6","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],jXHB6:[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 l})),n.export(r,"__rest",(function(){return c})),n.export(r,"__decorate",(function(){return u})),n.export(r,"__param",(function(){return p})),n.export(r,"__esDecorate",(function(){return f})),n.export(r,"__runInitializers",(function(){return d})),n.export(r,"__propKey",(function(){return h})),n.export(r,"__setFunctionName",(function(){return m})),n.export(r,"__metadata",(function(){return v})),n.export(r,"__awaiter",(function(){return g})),n.export(r,"__generator",(function(){return y})),n.export(r,"__createBinding",(function(){return b})),n.export(r,"__exportStar",(function(){return _})),n.export(r,"__values",(function(){return j})),n.export(r,"__read",(function(){return w})),n.export(r,"__spread",(function(){return x})),n.export(r,"__spreadArrays",(function(){return k})),n.export(r,"__spreadArray",(function(){return T})),n.export(r,"__await",(function(){return S})),n.export(r,"__asyncGenerator",(function(){return M})),n.export(r,"__asyncDelegator",(function(){return I})),n.export(r,"__asyncValues",(function(){return D})),n.export(r,"__makeTemplateObject",(function(){return E})),n.export(r,"__importStar",(function(){return C})),n.export(r,"__importDefault",(function(){return O})),n.export(r,"__classPrivateFieldGet",(function(){return P})),n.export(r,"__classPrivateFieldSet",(function(){return R})),n.export(r,"__classPrivateFieldIn",(function(){return z}));var o=e("@swc/helpers/src/_type_of.mjs"),a=n.interopDefault(o),s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},s(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;i--)(o=e[i])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function p(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var v=(0,r[d])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(i=s(v.get))&&(p.get=i),(i=s(v.set))&&(p.set=i),(i=s(v.init))&&o.push(i)}else(i=s(v))&&("field"===l?o.push(i):p[c]=i)}u&&Object.defineProperty(u,n.name,p),f=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return s}function x(){for(var e=[],t=0;t1||i(e,t)}))})}function i(e,t){try{(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}var r}function l(e){i("next",e)}function c(e){i("throw",e)}function u(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=j(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return F(t,e),t}function O(e){return e&&e.__esModule?e:{default:e}}function P(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function R(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function z(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/src/_type_of.mjs":"d3zJ2","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],gbKEc:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$video;(0,n.def)(e,"attr",{value:function(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4YToo":[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){var t=e.i18n,r=e.notice,n=e.option,o=e.constructor.instances,s=e.template.$video;(0,l.def)(e,"play",{value:(0,a.default)((function(){var a,l,c;return(0,i.default)(this,(function(i){switch(i.label){case 0:return[4,s.play()];case 1:if(a=i.sent(),r.show=t.get("Play"),e.emit("play"),n.mutex)for(l=0;lp?((0,n.setStyle)(a,"width","".concat(p*c,"px")),(0,n.setStyle)(a,"height","100%"),(0,n.setStyle)(a,"margin","0 auto")):((0,n.setStyle)(a,"width","100%"),(0,n.setStyle)(a,"height","".concat(l/p,"px")),(0,n.setStyle)(a,"margin","auto 0")),s.dataset.aspectRatio=o}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===o?t.get("Default"):o),e.emit("aspectRatio",o)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],ca8va:[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){var t=e.notice,r=e.template.$video,n=(0,l.createElement)("canvas");(0,l.def)(e,"getDataURL",{value:function(){return new Promise((function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),e(n.toDataURL("image/png"))}catch(e){t.show=e,o(e)}}))}}),(0,l.def)(e,"getBlobUrl",{value:function(){return new Promise((function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),n.toBlob((function(t){e(URL.createObjectURL(t))}))}catch(e){t.show=e,o(e)}}))}}),(0,l.def)(e,"screenshot",{value:(0,a.default)((function(){var t;return(0,i.default)(this,(function(n){switch(n.label){case 0:return[4,e.getDataURL()];case 1:return t=n.sent(),(0,l.download)(t,"artplayer_".concat((0,l.secondToTime)(r.currentTime),".png")),e.emit("screenshot",t),[2,t]}}))}))})}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],alRzX:[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../libs/screenfull"),c=n.interopDefault(l),u=e("../utils");r.default=function(e){var t=e.i18n,r=e.notice,n=e.template,o=n.$video,s=n.$player;e.once("video:loadedmetadata",(function(){var n;c.default.isEnabled?function(e){c.default.on("change",(function(){e.emit("fullscreen",c.default.isFullscreen)})),(0,u.def)(e,"fullscreen",{get:function(){return c.default.isFullscreen},set:function(t){return(0,a.default)((function(){return(0,i.default)(this,(function(r){switch(r.label){case 0:return t?(e.state="fullscreen",[4,c.default.request(s)]):[3,2];case 1:return r.sent(),(0,u.addClass)(s,"art-fullscreen"),[3,4];case 2:return[4,c.default.exit()];case 3:r.sent(),(0,u.removeClass)(s,"art-fullscreen"),r.label=4;case 4:return e.emit("resize"),[2]}}))}))()}})}(e):(null!==(n=document.fullscreenEnabled)&&void 0!==n?n:o.webkitSupportsFullscreen)?function(e){(0,u.def)(e,"fullscreen",{get:function(){return o.webkitDisplayingFullscreen},set:function(t){t?(e.state="fullscreen",o.webkitEnterFullscreen(),e.emit("fullscreen",!0)):(o.webkitExitFullscreen(),e.emit("fullscreen",!1)),e.emit("resize")}})}(e):(0,u.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),(0,u.def)(e,"fullscreen",(0,u.get)(e,"fullscreen"))}))}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../libs/screenfull":"4g0Hw","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4g0Hw":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_sliced_to_array.mjs"),a=n.interopDefault(o),s=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=function(){if("undefined"==typeof document)return!1;var e=s[0],t={},r=!0,n=!1,o=void 0;try{for(var i,l=s[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var c=i.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,a.default)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){n=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw o}}return!1}(),l={change:i.fullscreenchange,error:i.fullscreenerror},c={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r,n){var o=function(){c.off("change",o),r()};c.on("change",o);var a=e[i.requestFullscreen](t);a instanceof Promise&&a.then(o).catch(n)}))},exit:function(){return new Promise((function(e,t){if(c.isFullscreen){var r=function(){c.off("change",r),e()};c.on("change",r);var n=document[i.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)}else e()}))},toggle:function(e,t){return c.isFullscreen?c.exit():c.request(e,t)},onchange:function(e){c.on("change",e)},onerror:function(e){c.on("error",e)},on:function(e,t){var r=l[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=l[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(document[i.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[i.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[i.fullscreenEnabled])}}}),i||(c={isEnabled:!1}),r.default=c},{"@swc/helpers/src/_sliced_to_array.mjs":"23lI8","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"23lI8":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_sliced_to_array.js")},{"../esm/_sliced_to_array.js":"8wTBg","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8wTBg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_sliced_to_array",(function(){return l})),n.export(r,"_",(function(){return l}));var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),s=e("./_non_iterable_rest.js"),i=e("./_unsupported_iterable_to_array.js");function l(e,t){return(0,o._array_with_holes)(e)||(0,a._iterable_to_array_limit)(e,t)||(0,i._unsupported_iterable_to_array)(e,t)||(0,s._non_iterable_rest)()}},{"./_array_with_holes.js":"4ct5h","./_iterable_to_array_limit.js":"eV4uK","./_non_iterable_rest.js":"bXqZd","./_unsupported_iterable_to_array.js":"2OTAn","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4ct5h":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(r),n.export(r,"_array_with_holes",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],eV4uK:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}n.defineInteropFlag(r),n.export(r,"_iterable_to_array_limit",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],bXqZd:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_rest",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4er6h":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.constructor,r=e.template,o=r.$container,a=r.$player,s="";(0,n.def)(e,"fullscreenWeb",{get:function(){return(0,n.hasClass)(a,"art-fullscreen-web")},set:function(r){r?(s=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,n.append)(document.body,a),e.state="fullscreenWeb",(0,n.setStyle)(a,"width","100%"),(0,n.setStyle)(a,"height","100%"),(0,n.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,n.append)(o,a),s&&(a.style.cssText=s,s=""),(0,n.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],jBv10:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.i18n,r=e.notice,o=e.template.$video;document.pictureInPictureEnabled?function(e){var t=e.template.$video,r=e.proxy,o=e.notice;t.disablePictureInPicture=!1,(0,n.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch((function(e){throw o.show=e,e}))):document.exitPictureInPicture().catch((function(e){throw o.show=e,e}))}}),r(t,"enterpictureinpicture",(function(){e.emit("pip",!0)})),r(t,"leavepictureinpicture",(function(){e.emit("pip",!1)}))}(e):o.webkitSupportsPresentationMode?function(e){var t=e.template.$video;t.webkitSetPresentationMode("inline"),(0,n.def)(e,"pip",{get:function(){return"picture-in-picture"===t.webkitPresentationMode},set:function(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}(e):(0,n.def)(e,"pip",{get:function(){return!1},set:function(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hQUyr:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$video;(0,n.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,n.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8OMWK":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){(0,n.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],btSPR:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$video;(0,n.def)(e,"playing",{get:function(){return!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],dQH4Z:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template,r=t.$container,o=t.$player,a=t.$video;(0,n.def)(e,"autoSize",{value:function(){var t=a.videoWidth,s=a.videoHeight,i=r.getBoundingClientRect(),l=i.width,c=i.height,u=t/s;if(l/c>u){var p=c*u/l*100;(0,n.setStyle)(o,"width","".concat(p,"%")),(0,n.setStyle)(o,"height","100%")}else{var f=l/u/c*100;(0,n.setStyle)(o,"width","100%"),(0,n.setStyle)(o,"height","".concat(f,"%"))}e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hPGBy:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=function(t){var o=r[t];(0,n.def)(e,o,{get:function(){return e.rect[o]}})};(0,n.def)(e,"rect",{get:function(){return e.template.$player.getBoundingClientRect()}});for(var r=["bottom","height","left","right","top","width"],o=0;o');(0,n.append)(d,t.close),r(d,"click",p);var h=(0,n.append)(s,'
'),m=(0,n.append)(h,t.play),v=(0,n.append)(h,t.pause);return r(m,"click",(function(){return e.play()})),r(v,"click",(function(){return e.pause()})),f(m,v),e.on("video:playing",(function(){return f(m,v)})),e.on("video:pause",(function(){return f(m,v)})),e.on("video:timeupdate",(function(){return f(m,v)})),r(s,"mousedown",(function(e){l=0===e.button,c=e.pageX,u=e.pageY})),e.on("document:mousemove",(function(e){if(l){(0,n.addClass)(s,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,n.setStyle)(s,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}})),e.on("document:mouseup",(function(){if(l){l=!1,(0,n.removeClass)(s,"art-mini-droging");var e=s.getBoundingClientRect();o.set("left",e.left),o.set("top",e.top),(0,n.setStyle)(s,"left","".concat(e.left,"px")),(0,n.setStyle)(s,"top","".concat(e.top,"px")),(0,n.setStyle)(s,"transform",null)}})),s}(),m=o.get("top"),v=o.get("left");m&&v?((0,n.setStyle)(h,"top","".concat(m,"px")),(0,n.setStyle)(h,"left","".concat(v,"px")),(0,n.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],llm7W:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=[];(0,n.def)(e,"loop",{get:function(){return t},set:function(r){if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){var o=(0,n.clamp)(r[0],0,Math.min(r[1],e.duration)),a=(0,n.clamp)(r[1],o,e.duration);t=a-o>=1?[o,a]:[]}else t=[];e.emit("loop",t)}}),e.on("video:timeupdate",(function(){var r;t.length&&(null!==(r=e.currentTimet[1])&&(e.seek=t[0])}))}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"2UAdD":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$poster;(0,n.def)(e,"poster",{get:function(){try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set:function(e){(0,n.setStyle)(t,"backgroundImage","url(".concat(e,")"))}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"377XR":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template,r=t.$container,o=t.$video;(0,n.def)(e,"autoHeight",{value:function(){var t=r.clientWidth,a=o.videoHeight*(t/o.videoWidth);(0,n.setStyle)(r,"height",a+"px"),e.emit("autoHeight",a)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],afCNS:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$player;(0,n.def)(e,"cssVar",{value:function(e,r){return r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7l7GX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){(0,n.def)(e,"theme",{get:function(){return e.cssVar("--art-theme")},set:function(t){e.cssVar("--art-theme",t)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"3Vlhc":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){(0,n.def)(e,"type",{get:function(){return e.option.type},set:function(t){e.option.type=t}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],ey2W0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t,r=["mini","pip","fullscreen","fullscreenWeb"];(0,n.def)(e,"state",{get:function(){return null!==(t=r.find((function(t){return e[t]})))&&void 0!==t?t:"standard"},set:function(t){for(var n=0;n=s.CONTROL_HIDE_TIME&&(n.show=!1,(0,v.addClass)(i,"art-hide-cursor"),(0,v.removeClass)(i,"art-hover"))})),n.init(),n}return(0,i.default)(r,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,I.default)({name:"progress",position:"top",index:10})),!t.thumbnails.url||t.isLive||v.isMobile||this.add((0,z.default)({name:"thumbnails",position:"top",index:20})),this.add((0,L.default)({name:"loop",position:"top",index:30})),this.add((0,S.default)({name:"playAndPause",position:"left",index:10})),this.add((0,C.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,E.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,v.sleep)().then((function(){e.art.quality=t.quality})),t.screenshot&&!v.isMobile&&this.add((0,$.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,P.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,k.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,q.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,w.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,_.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(c.dataset.index)}));d?d.insertAdjacentElement("beforebegin",c):(0,f.append)(this.$parent,c),a.html&&(0,f.append)(c,a.html),a.style&&(0,f.setStyles)(c,a.style),a.tooltip&&(0,f.tooltip)(c,a.tooltip);var m=[];if(a.click){var y=this.art.events.proxy(c,"click",(function(e){e.preventDefault(),a.click.call(o.art,o,e)}));m.push(y)}return a.selector&&["left","right"].includes(a.position)&&this.addSelector(a,c,m),this[i]=c,this.cache.set(i,{$ref:c,events:m,option:a}),a.mounted&&a.mounted.call(this.art,c),c}}},{key:"addSelector",value:function(e,t,r){var n=this.art.events,o=n.hover,s=n.proxy;(0,f.addClass)(t,"art-control-selector");var i=(0,f.createElement)("div");(0,f.addClass)(i,"art-selector-value"),(0,f.append)(i,e.html),t.innerText="",(0,f.append)(t,i);var l=e.selector.map((function(e,t){return'
').concat(e.html,"
")})).join(""),c=(0,f.createElement)("div");(0,f.addClass)(c,"art-selector-list"),(0,f.append)(c,l),(0,f.append)(t,c);var u=function(){var e=(0,f.getStyle)(t,"width")/2-(0,f.getStyle)(c,"width")/2;c.style.left="".concat(e,"px")};o(t,u);var h,m=this,v=s(c,"click",(h=(0,a.default)((function(t){var r,n,o,a,s,l,c;return(0,p.default)(this,(function(p){switch(p.label){case 0:return n=null!==(r=t.composedPath())&&void 0!==r?r:[],(o=n.find((function(e){return(0,f.hasClass)(e,"art-selector-item")})))?((0,f.inverseClass)(o,"art-current"),a=Number(o.dataset.index),l=null!==(s=e.selector[a])&&void 0!==s?s:{},i.innerText=o.innerText,e.onSelect?[4,e.onSelect.call(m.art,l,o,t)]:[3,2]):[2];case 1:c=p.sent(),(0,d.isStringOrNumber)(c)&&(i.innerHTML=c),p.label=2;case 2:return u(),[2]}}))})),function(e){return h.apply(this,arguments)}));r.push(v)}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,h.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r
',mounted:function(e){var a=!1,s=(0,l.query)(".art-progress-hover",e),i=(0,l.query)(".art-progress-loaded",e),p=(0,l.query)(".art-progress-played",e),f=(0,l.query)(".art-progress-highlight",e),d=(0,l.query)(".art-progress-indicator",e),h=(0,l.query)(".art-progress-tip",e);function m(e,t){"loaded"===e&&(0,l.setStyle)(i,"width","".concat(100*t,"%")),"played"===e&&((0,l.setStyle)(p,"width","".concat(100*t,"%")),(0,l.setStyle)(d,"left","".concat(100*t,"%")))}r.indicator?(0,l.append)(d,r.indicator):(0,l.setStyle)(d,"backgroundColor","var(--art-theme)"),t.on("video:loadedmetadata",(function(){for(var e=0;e');(0,l.append)(f,a)}})),m("loaded",t.loaded),t.on("setBar",(function(e,t){m(e,t)})),t.on("video:progress",(function(){m("loaded",t.loaded)})),t.constructor.USE_RAF?t.on("raf",(function(){m("played",t.played)})):t.on("video:timeupdate",(function(){m("played",t.played)})),t.on("video:ended",(function(){m("played",1)})),l.isMobile||(o(e,"click",(function(e){e.target!==d&&u(t,e)})),o(e,"mousemove",(function(r){!function(e){var r=c(t,e).width;(0,l.setStyle)(s,"width","".concat(r,"px")),(0,l.setStyle)(s,"display","flex")}(r),(0,l.setStyle)(h,"display","flex"),(0,l.includeFromEvent)(r,f)?function(r){var n=c(t,r).width,o=r.target.dataset.text;h.innerHTML=o;var a=h.clientWidth;n<=a/2?(0,l.setStyle)(h,"left",0):n>e.clientWidth-a/2?(0,l.setStyle)(h,"left","".concat(e.clientWidth-a,"px")):(0,l.setStyle)(h,"left","".concat(n-a/2,"px"))}(r):function(r){var n=c(t,r),o=n.width,a=n.time;h.innerHTML=a;var s=h.clientWidth;o<=s/2?(0,l.setStyle)(h,"left",0):o>e.clientWidth-s/2?(0,l.setStyle)(h,"left","".concat(e.clientWidth-s,"px")):(0,l.setStyle)(h,"left","".concat(o-s/2,"px"))}(r)})),o(e,"mouseleave",(function(){(0,l.setStyle)(h,"display","none"),(0,l.setStyle)(s,"display","none")})),o(e,"mousedown",(function(e){a=0===e.button})),t.on("document:mousemove",(function(e){if(a){var r=c(t,e),n=r.second;m("played",r.percentage),t.seek=n}})),t.on("document:mouseup",(function(){a&&(a=!1)})))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],i5g4S:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{style:l.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,l.secondToTime)(t.currentTime)," / ").concat((0,l.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o'),i=(0,l.append)(s,'
'),c=(0,l.append)(i,'
'),u=(0,l.append)(i,'
'),p=(0,l.append)(u,'
'),f=(0,l.append)(p,'
'),d=(0,l.append)(u,'
');function h(e){var t=u.getBoundingClientRect(),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){var e;if(null!==(e=t.muted)&&void 0!==e?e:0===t.volume)(0,l.setStyle)(o,"display","none"),(0,l.setStyle)(a,"display","flex"),(0,l.setStyle)(d,"top","100%"),(0,l.setStyle)(f,"top","100%"),c.innerText=0;else{var r=100*t.volume;(0,l.setStyle)(o,"display","flex"),(0,l.setStyle)(a,"display","none"),(0,l.setStyle)(d,"top","".concat(100-r,"%")),(0,l.setStyle)(f,"top","".concat(100-r,"%")),c.innerText=Math.floor(r)}}if(m(),t.on("video:volumechange",m),r(o,"click",(function(){t.muted=!0})),r(a,"click",(function(){t.muted=!1})),l.isMobile)(0,l.setStyle)(s,"display","none");else{var v=!1;r(u,"mousedown",(function(e){v=0===e.button,t.volume=h(e)})),t.on("document:mousemove",(function(e){v&&(t.muted=!1,t.volume=h(e))})),t.on("document:mouseup",(function(){v&&(v=!1)}))}}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],k1U7y:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,l.append)(e,n.setting),r(e,"click",(function(){t.setting.toggle(),t.setting.updateStyle()})),t.on("setting",(function(t){(0,l.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"2jVZH":[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_object_spread_props.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_ts_generator.mjs"),p=n.interopDefault(u),f=e("../utils"),d=e("./progress");r.default=function(e){return function(t){return(0,c.default)((0,i.default)({},e),{mounted:function(e){var r,n=t.option,o=t.template,s=o.$progress,i=o.$video,l=t.events,c=l.proxy,u=l.loadImg,h=null,m=!1,v=!1;c(s,"mousemove",(r=(0,a.default)((function(r){var o;return(0,p.default)(this,(function(a){switch(a.label){case 0:return m?[3,2]:(m=!0,[4,u(n.thumbnails.url)]);case 1:o=a.sent(),h=o,v=!0,a.label=2;case 2:return v&&((0,f.setStyle)(e,"display","flex"),function(r){var o,a=(0,d.getPosFromEvent)(t,r).width,l=n.thumbnails,c=l.url,u=l.number,p=l.column,m=l.width,v=l.height,g=null!=m?m:h.naturalWidth/p,y=null!=v?v:g/(i.videoWidth/i.videoHeight),b=s.clientWidth/u,_=Math.floor(a/b),j=Math.ceil(_/p)-1,w=null!==(o=_%p)&&void 0!==o?o:p-1;(0,f.setStyle)(e,"backgroundImage","url(".concat(c,")")),(0,f.setStyle)(e,"height","".concat(y,"px")),(0,f.setStyle)(e,"width","".concat(g,"px")),(0,f.setStyle)(e,"backgroundPosition","-".concat(w*g,"px -").concat(j*y,"px")),a<=g/2?(0,f.setStyle)(e,"left",0):a>s.clientWidth-g/2?(0,f.setStyle)(e,"left","".concat(s.clientWidth-g,"px")):(0,f.setStyle)(e,"left","".concat(a-g/2,"px"))}(r)),[2]}}))})),function(e){return r.apply(this,arguments)})),c(s,"mouseleave",(function(){(0,f.setStyle)(e,"display","none")})),t.on("hover",(function(t){t||(0,f.setStyle)(e,"display","none")}))}})}}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","./progress":"EmoUd","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],eocyV:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,l.append)(e,n.screenshot),r(e,"click",(function(){t.screenshot()}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"57tCE":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{mounted:function(e){var r=(0,l.append)(e,''),n=(0,l.append)(e,'');t.on("loop",(function(o){o&&o.length?((0,l.setStyle)(e,"display","flex"),(0,l.setStyle)(r,"left","calc(".concat(o[0]/t.duration*100,"% - ").concat(r.clientWidth,"px)")),(0,l.setStyle)(n,"left","".concat(o[1]/t.duration*100,"%"))):(0,l.setStyle)(e,"display","none")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],Dlr2L:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,l.append)(e,n.airplay),r(e,"click",(function(){return t.airplay()}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],aH04y:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return M}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_inherits.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_create_super.mjs"),p=n.interopDefault(u),f=e("../utils"),d=e("../utils/component"),h=n.interopDefault(d),m=e("./playbackRate"),v=n.interopDefault(m),g=e("./aspectRatio"),y=n.interopDefault(g),b=e("./flip"),_=n.interopDefault(b),j=e("./info"),w=n.interopDefault(j),x=e("./version"),k=n.interopDefault(x),T=e("./close"),S=n.interopDefault(T),M=function(e){"use strict";(0,c.default)(r,e);var t=(0,p.default)(r);function r(e){var n;return(0,a.default)(this,r),(n=t.call(this,e)).name="contextmenu",n.$parent=e.template.$contextmenu,f.isMobile||n.init(),n}return(0,i.default)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,s=o.$contextmenu;r.playbackRate&&this.add((0,v.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,y.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,_.default)({name:"flip",index:30})),this.add((0,w.default)({name:"info",index:40})),this.add((0,k.default)({name:"version",index:50})),this.add((0,S.default)({name:"close",index:60}));for(var i=0;ic+l&&(m=l-h),n+d>u+i&&(v=i-d),(0,f.setStyles)(s,{top:"".concat(v,"px"),left:"".concat(m,"px")})}})),n(a,"click",(function(t){(0,f.includeFromEvent)(t,s)||(e.show=!1)})),this.art.on("blur",(function(){e.show=!1}))}}]),r}(h.default)},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_create_super.mjs":"hOJPY","../utils":"7esST","../utils/component":"cVtDw","./playbackRate":"7PKBT","./aspectRatio":"21e5i","./flip":"5paZL","./info":"9tDwX","./version":"7YY7g","./close":"5kAbg","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7PKBT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map((function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")})).join("");return(0,i.default)((0,a.default)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,l.query)('[data-value="1"]',e);r&&(0,l.inverseClass)(r,"art-current"),t.on("video:ratechange",(function(){var r=(0,l.queryAll)("span",e).find((function(e){return Number(e.dataset.value)===t.playbackRate}));r&&(0,l.inverseClass)(r,"art-current")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"21e5i":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map((function(e){return'').concat("default"===e?r.get("Default"):e,"")})).join("");return(0,i.default)((0,a.default)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,l.query)('[data-value="default"]',e);r&&(0,l.inverseClass)(r,"art-current"),t.on("aspectRatio",(function(t){var r=(0,l.queryAll)("span",e).find((function(e){return e.dataset.value===t}));r&&(0,l.inverseClass)(r,"art-current")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"5paZL":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map((function(e){return'').concat(r.get((0,l.capitalize)(e)),"")})).join("");return(0,i.default)((0,a.default)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,l.query)('[data-value="normal"]',e);r&&(0,l.inverseClass)(r,"art-current"),t.on("flip",(function(t){var r=(0,l.queryAll)("span",e).find((function(e){return e.dataset.value===t}));r&&(0,l.inverseClass)(r,"art-current")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9tDwX":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s);r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7YY7g":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s);r.default=function(e){return(0,i.default)((0,a.default)({},e),{html:'ArtPlayer 5.1.0'})}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"5kAbg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s);r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],kEevD:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return h}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_inherits.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_create_super.mjs"),p=n.interopDefault(u),f=e("./utils"),d=e("./utils/component"),h=function(e){"use strict";(0,c.default)(r,e);var t=(0,p.default)(r);function r(e){var n;return(0,a.default)(this,r),(n=t.call(this,e)).name="info",f.isMobile||n.init(),n}return(0,i.default)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor,o=t.template,a=o.$infoPanel,s=o.$infoClose,i=o.$video;r(s,"click",(function(){e.show=!1}));var l,c=null,u=null!==(l=(0,f.queryAll)("[data-video]",a))&&void 0!==l?l:[];this.art.on("destroy",(function(){return clearTimeout(c)})),function e(){for(var t=0;t".concat((0,_.escape)(e),"

")})).join(""):e.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,a.default)((function(){var n,o,a,s,i,l;return(0,b.default)(this,(function(c){switch(c.label){case 0:return n=r.art,o=n.i18n,a=n.notice,s=n.option,i=(0,m.default)((0,d.default)({},s.subtitle,t),{url:e}),[4,r.init(i)];case 1:return l=c.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,l]}}))}))()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,s=o.$video,i=o.$track,l=(0,_.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.track.mode="hidden",this.eventDestroy(),(0,_.remove)(i),(0,_.append)(s,l),o.$track=l,this.eventDestroy=a(this.textTrack,"cuechange",(function(){return r.update()}))}},{key:"init",value:function(e){var t=this;return(0,a.default)((function(){var r,n,o;return(0,b.default)(this,(function(a){return r=t.art,n=r.notice,o=r.template.$subtitle,(0,k.default)(e,S.default.subtitle),e.url?(t.style(e.style),[2,fetch(e.url).then((function(e){return e.arrayBuffer()})).then((function(r){var n,o=new TextDecoder(e.encoding).decode(r);switch(t.art.emit("subtitleLoad",e.url),null!==(n=e.type)&&void 0!==n?n:(0,_.getExt)(e.url)){case"srt":var a=(0,_.srtToVtt)(o),s=e.onVttLoad(a);return(0,_.vttToBlob)(s);case"ass":var i=(0,_.assToVtt)(o),l=e.onVttLoad(i);return(0,_.vttToBlob)(l);case"vtt":var c=e.onVttLoad(o);return(0,_.vttToBlob)(c);default:return e.url}})).then((function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e),t.art.emit("subtitleSwitch",e)),e})).catch((function(e){throw o.innerHTML="",n.show=e,e}))]):[2]}))}))()}}]),r}(w.default)},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@swc/helpers/src/_create_super.mjs":"hOJPY","@swc/helpers/src/_ts_generator.mjs":"1EjHr","./utils":"7esST","./utils/component":"cVtDw","option-validator":"8OeHO","./scheme":"hYXnH","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9biZS":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return T}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("../utils/error"),c=e("./clickInit"),u=n.interopDefault(c),p=e("./hoverInit"),f=n.interopDefault(p),d=e("./moveInit"),h=n.interopDefault(d),m=e("./resizeInit"),v=n.interopDefault(m),g=e("./gestureInit"),y=n.interopDefault(g),b=e("./viewInit"),_=n.interopDefault(b),j=e("./documentInit"),w=n.interopDefault(j),x=e("./updateInit"),k=n.interopDefault(x),T=function(){"use strict";function e(t){(0,a.default)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,u.default)(t,this),(0,f.default)(t,this),(0,h.default)(t,this),(0,v.default)(t,this),(0,y.default)(t,this),(0,_.default)(t,this),(0,w.default)(t,this),(0,k.default)(t,this)}return(0,i.default)(e,[{key:"proxy",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this;if(Array.isArray(t))return t.map((function(t){return o.proxy(e,t,r,n)}));e.addEventListener(t,r,n);var a=function(){return e.removeEventListener(t,r,n)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"loadImg",value:function(e){var t=this;return new Promise((function(r,n){var o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return n(new(0,l.ArtPlayerError)("Unable to get Image"));(o=new Image).src=e}if(o.complete)return r(o);t.proxy(o,"load",(function(){return r(o)})),t.proxy(o,"error",(function(){return n(new(0,l.ArtPlayerError)("Failed to load Image: ".concat(o.src)))}))}))}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;e=-45&&l<45?s=4:l>=45&&l<135?s=1:l>=-135&&l<-45?s=2:(null!==(i=l>=135&&l<=180)&&void 0!==i?i:l>=-180&&l<-135)&&(s=3),s}r.default=function(e,t){if(n.isMobile&&!e.option.isLive){var r=e.template,s=r.$video,i=r.$progress,l=null,c=!1,u=0,p=0,f=0,d=function(t){if(1===t.touches.length&&!e.isLock){l===i&&(0,o.setCurrentTime)(e,t),c=!0;var r=t.touches[0],n=r.pageX,a=r.pageY;u=n,p=a,f=e.currentTime}},h=function(t){if(1===t.touches.length&&c&&e.duration){var r,o=t.touches[0],i=o.pageX,d=o.pageY,h=a(u,p,i,d),m=[3,4].includes(h),v=[1,2].includes(h);if(null!==(r=m&&!e.isRotate)&&void 0!==r?r:v&&e.isRotate){var g=(0,n.clamp)((i-u)/e.width,-1,1),y=(0,n.clamp)((d-p)/e.height,-1,1),b=e.isRotate?y:g,_=l===s?e.constructor.TOUCH_MOVE_RATIO:1,j=(0,n.clamp)(f+e.duration*b*_,0,e.duration);e.seek=j,e.emit("setBar","played",(0,n.clamp)(j/e.duration,0,1)),e.notice.show="".concat((0,n.secondToTime)(j)," / ").concat((0,n.secondToTime)(e.duration))}}};t.proxy(i,"touchstart",(function(e){l=i,d(e)})),t.proxy(s,"touchstart",(function(e){l=s,d(e)})),t.proxy(s,"touchmove",h),t.proxy(i,"touchmove",h),t.proxy(document,"touchend",(function(){c&&(u=0,p=0,f=0,c=!1,l=null)}))}}},{"../utils":"7esST","../control/progress":"EmoUd","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],goqLs:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e,t){var r=e.option,o=e.constructor,a=e.template.$container,s=(0,n.throttle)((function(){e.emit("view",(0,n.isInViewport)(a,o.SCROLL_GAP))}),o.SCROLL_TIME);t.proxy(window,"scroll",(function(){return s()})),e.on("view",(function(t){r.autoMini&&(e.mini=!t)}))}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7eAOV":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e,t){t.proxy(document,"mousemove",(function(t){e.emit("document:mousemove",t)})),t.proxy(document,"mouseup",(function(t){e.emit("document:mouseup",t)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],ioax6:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",(function(){cancelAnimationFrame(t)}))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],bCoXC:[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/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("./utils"),c=function(){"use strict";function e(t){(0,a.default)(this,e),this.art=t,this.keys={},t.option.hotkey&&!l.isMobile&&this.init()}return(0,i.default)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add(27,(function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)})),this.add(32,(function(){e.art.toggle()})),this.add(37,(function(){e.art.backward=n.SEEK_STEP})),this.add(38,(function(){e.art.volume+=n.VOLUME_STEP})),this.add(39,(function(){e.art.forward=n.SEEK_STEP})),this.add(40,(function(){e.art.volume-=n.VOLUME_STEP})),r(window,"keydown",(function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n){var o=e.keys[t.keyCode];if(o){t.preventDefault();for(var a=0;a'},{}],aoLmP:[function(e,t,r){t.exports=''},{}],"7BoWr":[function(e,t,r){t.exports=''},{}],bkCtG:[function(e,t,r){t.exports=''},{}],d9cJz:[function(e,t,r){t.exports=''},{}],bEc44:[function(e,t,r){t.exports=''},{}],jiUYL:[function(e,t,r){t.exports=''},{}],a8WfT:[function(e,t,r){t.exports=''},{}],iJ2rM:[function(e,t,r){t.exports=''},{}],"80RaN":[function(e,t,r){t.exports=''},{}],fHsvm:[function(e,t,r){t.exports=''},{}],dwdtS:[function(e,t,r){t.exports=''},{}],kYWrM:[function(e,t,r){t.exports=''},{}],d9UhH:[function(e,t,r){t.exports=''},{}],e4ZLS:[function(e,t,r){t.exports=''},{}],"2lyD4":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return E}));var o=e("@swc/helpers/src/_async_to_generator.mjs"),a=n.interopDefault(o),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/_to_consumable_array.mjs"),d=n.interopDefault(f),h=e("@swc/helpers/src/_create_super.mjs"),m=n.interopDefault(h),v=e("@swc/helpers/src/_ts_generator.mjs"),g=n.interopDefault(v),y=e("./flip"),b=n.interopDefault(y),_=e("./aspectRatio"),j=n.interopDefault(_),w=e("./playbackRate"),x=n.interopDefault(w),k=e("./subtitleOffset"),T=n.interopDefault(k),S=e("../utils/component"),M=n.interopDefault(S),I=e("../utils/error"),D=e("../utils"),E=function(e){"use strict";(0,p.default)(r,e);var t=(0,m.default)(r);function r(e){var n;(0,i.default)(this,r),n=t.call(this,e);var o=e.option,a=e.controls,s=e.template.$setting;return n.name="setting",n.$parent=s,n.option=[],n.events=[],n.cache=new Map,o.setting&&(n.init(),e.on("blur",(function(){n.show&&(n.show=!1,n.render(n.option))})),e.on("focus",(function(e){var t=(0,D.includeFromEvent)(e,a.setting),r=(0,D.includeFromEvent)(e,n.$parent);!n.show||t||r||(n.show=!1,n.render(n.option))}))),n}return(0,c.default)(r,[{key:"defaultSettings",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,x.default)(this.art)),t.aspectRatio&&e.push((0,j.default)(this.art)),t.flip&&e.push((0,b.default)(this.art)),t.subtitleOffset&&e.push((0,T.default)(this.art)),e}},{key:"init",value:function(){var e=this.art.option,t=(0,d.default)(this.defaultSettings).concat((0,d.default)(e.settings));this.option=r.makeRecursion(t),this.destroy(),this.render(this.option)}},{key:"destroy",value:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r'),l=(0,D.createElement)("div");(0,D.addClass)(l,"art-setting-item-left-icon"),(0,D.append)(l,n.arrowLeft),(0,D.append)(i,l),(0,D.append)(i,e.$parentItem.html);var c=o(s,"click",(function(){return t.render(e.$parentList)}));return this.events.push(c),s}},{key:"creatItem",value:function(e,t){var r=this.art,n=r.icons,o=r.proxy,s=r.constructor,i=(0,D.createElement)("div");(0,D.addClass)(i,"art-setting-item"),(0,D.setStyle)(i,"height","".concat(s.SETTING_ITEM_HEIGHT,"px")),(0,D.isStringOrNumber)(t.name)&&(i.dataset.name=t.name),(0,D.isStringOrNumber)(t.value)&&(i.dataset.value=t.value);var l=(0,D.append)(i,'
'),c=(0,D.append)(i,'
'),u=(0,D.createElement)("div");switch((0,D.addClass)(u,"art-setting-item-left-icon"),e){case"switch":case"range":var p;(0,D.append)(u,(null!==(p=(0,D.isStringOrNumber)(t.icon))&&void 0!==p?p:t.icon instanceof Element)?t.icon:n.config);break;case"selector":var f;t.selector&&t.selector.length?(0,D.append)(u,(null!==(f=(0,D.isStringOrNumber)(t.icon))&&void 0!==f?f:t.icon instanceof Element)?t.icon:n.config):(0,D.append)(u,n.check)}(0,D.append)(l,u),t.$icon=u,(0,D.def)(t,"icon",{configurable:!0,get:function(){return u.innerHTML},set:function(e){(0,D.isStringOrNumber)(e)&&(u.innerHTML=e)}});var d,h=(0,D.createElement)("div");(0,D.addClass)(h,"art-setting-item-left-text"),(0,D.append)(h,null!==(d=t.html)&&void 0!==d?d:""),(0,D.append)(l,h),t.$html=h,(0,D.def)(t,"html",{configurable:!0,get:function(){return h.innerHTML},set:function(e){(0,D.isStringOrNumber)(e)&&(h.innerHTML=e)}});var m,v,y=(0,D.createElement)("div");switch((0,D.addClass)(y,"art-setting-item-right-tooltip"),(0,D.append)(y,null!==(m=t.tooltip)&&void 0!==m?m:""),(0,D.append)(c,y),t.$tooltip=y,(0,D.def)(t,"tooltip",{configurable:!0,get:function(){return y.innerHTML},set:function(e){(0,D.isStringOrNumber)(e)&&(y.innerHTML=e)}}),e){case"switch":var b=(0,D.createElement)("div");(0,D.addClass)(b,"art-setting-item-right-icon");var _=(0,D.append)(b,n.switchOn),j=(0,D.append)(b,n.switchOff);(0,D.setStyle)(t.switch?j:_,"display","none"),(0,D.append)(c,b),t.$switch=t.switch,(0,D.def)(t,"switch",{configurable:!0,get:function(){return t.$switch},set:function(e){t.$switch=e,e?((0,D.setStyle)(j,"display","none"),(0,D.setStyle)(_,"display",null)):((0,D.setStyle)(j,"display",null),(0,D.setStyle)(_,"display","none"))}});break;case"range":var w=(0,D.createElement)("div");(0,D.addClass)(w,"art-setting-item-right-icon");var x,k,T,S,M=(0,D.append)(w,'');M.value=null!==(x=t.range[0])&&void 0!==x?x:0,M.min=null!==(k=t.range[1])&&void 0!==k?k:0,M.max=null!==(T=t.range[2])&&void 0!==T?T:10,M.step=null!==(S=t.range[3])&&void 0!==S?S:1,(0,D.addClass)(M,"art-setting-range"),(0,D.append)(c,w),t.$range=M,(0,D.def)(t,"range",{configurable:!0,get:function(){return M.valueAsNumber},set:function(e){M.value=Number(e)}});break;case"selector":if(t.selector&&t.selector.length){var I=(0,D.createElement)("div");(0,D.addClass)(I,"art-setting-item-right-icon"),(0,D.append)(I,n.arrowRight),(0,D.append)(c,I)}}switch(e){case"switch":if(t.onSwitch){var E=this,F=o(i,"click",(v=(0,a.default)((function(e){return(0,g.default)(this,(function(r){switch(r.label){case 0:return[4,t.onSwitch.call(E.art,t,i,e)];case 1:return t.switch=r.sent(),[2]}}))})),function(e){return v.apply(this,arguments)}));this.events.push(F)}break;case"range":if(t.$range){if(t.onRange){var C=this,O=o(t.$range,"change",function(){var e=(0,a.default)((function(e){return(0,g.default)(this,(function(r){switch(r.label){case 0:return[4,t.onRange.call(C.art,t,i,e)];case 1:return t.tooltip=r.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}());this.events.push(O)}if(t.onChange){var P=this,R=o(t.$range,"input",function(){var e=(0,a.default)((function(e){return(0,g.default)(this,(function(r){switch(r.label){case 0:return[4,t.onChange.call(P.art,t,i,e)];case 1:return t.tooltip=r.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}());this.events.push(R)}}break;case"selector":var z=this,A=o(i,"click",function(){var e=(0,a.default)((function(e){var r,n,o;return(0,g.default)(this,(function(a){switch(a.label){case 0:return t.selector&&t.selector.length?(z.render(t.selector,t.width),[3,3]):[3,1];case 1:for((0,D.inverseClass)(i,"art-current"),r=0;rp.width?((0,D.setStyle)(s,"left",null),(0,D.setStyle)(s,"right",null)):((0,D.setStyle)(s,"left","".concat(f,"px")),(0,D.setStyle)(s,"right","auto"))}}},{key:"render",value:function(e,t){var r=this.art.constructor;if(this.cache.has(e)){var n=this.cache.get(e);(0,D.inverseClass)(n,"art-current"),(0,D.setStyle)(this.$parent,"width","".concat(n.dataset.width,"px")),(0,D.setStyle)(this.$parent,"height","".concat(n.dataset.height,"px")),this.updateStyle(Number(n.dataset.width))}else{var o=(0,D.createElement)("div");(0,D.addClass)(o,"art-setting-panel"),o.dataset.width=null!=t?t:r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0].$parentItem&&((0,D.append)(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(var a=0;ai&&up)&&setTimeout((function(){(0,l.setStyle)(o,"width","".concat(p,"px")),(0,l.setStyle)(o,"height","".concat(u,"px")),(0,l.setStyle)(o,"transform-origin","0 0"),(0,l.setStyle)(o,"transform","rotate(90deg) translate(0, -".concat(u,"px)")),(0,l.addClass)(o,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")}),r.AUTO_ORIENTATION_TIME)}else(0,l.hasClass)(o,"art-auto-orientation")&&((0,l.removeClass)(o,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))})),e.on("fullscreen",(t=(0,a.default)((function(e){var t,r,n,a,c,u,p,f;return(0,i.default)(this,(function(i){switch(i.label){case 0:return t=screen.orientation.type,e?(r=s.videoWidth,n=s.videoHeight,a=document.documentElement,c=a.clientWidth,u=a.clientHeight,(null!==(p=r>n&&cu)?(f=t.startsWith("portrait")?"landscape":"portrait",[4,screen.orientation.lock(f)]):[3,2]):[3,3];case 1:i.sent(),(0,l.addClass)(o,"art-auto-orientation-fullscreen"),i.label=2;case 2:return[3,5];case 3:return(0,l.hasClass)(o,"art-auto-orientation-fullscreen")?[4,screen.orientation.lock(t)]:[3,5];case 4:i.sent(),(0,l.removeClass)(o,"art-auto-orientation-fullscreen"),i.label=5;case 5:return[2]}}))})),function(e){return t.apply(this,arguments)})),{name:"autoOrientation",get state(){return(0,l.hasClass)(o,"art-auto-orientation")}}}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"6nThf":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.i18n,r=e.icons,o=e.storage,a=e.constructor,s=e.proxy,i=e.template.$poster,l=e.layers.add({name:"auto-playback",html:'
'}),c=(0,n.query)(".art-auto-playback-last",l),u=(0,n.query)(".art-auto-playback-jump",l),p=(0,n.query)(".art-auto-playback-close",l);return e.on("video:timeupdate",(function(){if(e.playing){var t,r,n=null!==(t=o.get("times"))&&void 0!==t?t:{},s=Object.keys(n);s.length>a.AUTO_PLAYBACK_MAX&&delete n[s[0]],n[null!==(r=e.option.id)&&void 0!==r?r:e.option.url]=e.currentTime,o.set("times",n)}})),e.on("ready",(function(){var f,d,h=(null!==(f=o.get("times"))&&void 0!==f?f:{})[null!==(d=e.option.id)&&void 0!==d?d:e.option.url];h&&h>=a.AUTO_PLAYBACK_MIN&&((0,n.append)(p,r.close),(0,n.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,n.secondToTime)(h)),u.innerText=t.get("Jump Play"),s(p,"click",(function(){(0,n.setStyle)(l,"display","none")})),s(u,"click",(function(){e.seek=h,e.play(),(0,n.setStyle)(i,"display","none"),(0,n.setStyle)(l,"display","none")})),e.once("video:timeupdate",(function(){setTimeout((function(){(0,n.setStyle)(l,"display","none")}),a.AUTO_PLAYBACK_TIMEOUT)})))})),{name:"auto-playback",get times(){var e;return null!==(e=o.get("times"))&&void 0!==e?e:{}},clear:function(){return o.del("times")},delete:function(e){var t,r=null!==(t=o.get("times"))&&void 0!==t?t:{};return delete r[e],o.set("times",r),r}}}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],foG6r:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.constructor,r=e.proxy,o=e.template,a=o.$player,s=o.$video,i=null,l=!1,c=1,u=function(){clearTimeout(i),l&&(l=!1,e.playbackRate=c,(0,n.removeClass)(a,"art-fast-forward"))};return r(s,"touchstart",(function(r){1===r.touches.length&&e.playing&&!e.isLock&&(i=setTimeout((function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,n.addClass)(a,"art-fast-forward")}),t.FAST_FORWARD_TIME))})),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,n.hasClass)(a,"art-fast-forward")}}}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"1zrgm":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.layers,r=e.icons,o=e.template.$player;return t.add({name:"lock",mounted:function(t){var o=(0,n.append)(t,r.lock),a=(0,n.append)(t,r.unlock);(0,n.setStyle)(o,"display","none"),e.on("lock",(function(e){e?((0,n.setStyle)(o,"display","inline-flex"),(0,n.setStyle)(a,"display","none")):((0,n.setStyle)(o,"display","none"),(0,n.setStyle)(a,"display","inline-flex"))}))},click:function(){(0,n.hasClass)(o,"art-lock")?((0,n.removeClass)(o,"art-lock"),this.isLock=!1,e.emit("lock",!1)):((0,n.addClass)(o,"art-lock"),this.isLock=!0,e.emit("lock",!0))}}),{name:"lock",get state(){return(0,n.hasClass)(o,"art-lock")}}}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}]},["7Csdv"],"7Csdv","parcelRequireb749"); \ No newline at end of file diff --git a/docs/document/404.html b/docs/document/404.html index e5ed16731..a91a32442 100644 --- a/docs/document/404.html +++ b/docs/document/404.html @@ -16,7 +16,7 @@
Skip to content

404

PAGE NOT FOUND

But if you don't change your direction, and if you keep looking, you may end up where you are heading.
- + \ No newline at end of file diff --git a/docs/document/advanced/built-in.html b/docs/document/advanced/built-in.html index f08a9ed0c..207d32cbb 100644 --- a/docs/document/advanced/built-in.html +++ b/docs/document/advanced/built-in.html @@ -205,7 +205,7 @@ art.on('ready', () => { art.plugins.add(myPlugin); }); - + \ No newline at end of file diff --git a/docs/document/advanced/class.html b/docs/document/advanced/class.html index b565e660f..94fef404b 100644 --- a/docs/document/advanced/class.html +++ b/docs/document/advanced/class.html @@ -26,7 +26,7 @@ }); console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

▶ Run Code
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

▶ Run Code
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

▶ Run Code
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

▶ Run Code
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

▶ Run Code
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

▶ Run Code
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

▶ Run Code
js
console.info(Artplayer.option);
- + \ No newline at end of file diff --git a/docs/document/advanced/event.html b/docs/document/advanced/event.html index 67395e7fa..0d8e7886f 100644 --- a/docs/document/advanced/event.html +++ b/docs/document/advanced/event.html @@ -373,7 +373,7 @@ art.on('muted', (state) => { console.log(state); });

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

- + \ No newline at end of file diff --git a/docs/document/advanced/global.html b/docs/document/advanced/global.html index c690ef3e6..f77305f2d 100644 --- a/docs/document/advanced/global.html +++ b/docs/document/advanced/global.html @@ -235,7 +235,7 @@ url: '/assets/sample/video.mp4', miniProgressBar: true, }); - + \ No newline at end of file diff --git a/docs/document/advanced/plugin.html b/docs/document/advanced/plugin.html index 8b0091cc1..4583fd1ea 100644 --- a/docs/document/advanced/plugin.html +++ b/docs/document/advanced/plugin.html @@ -117,7 +117,7 @@ }) ], }); - + \ No newline at end of file diff --git a/docs/document/advanced/property.html b/docs/document/advanced/property.html index 4d285b8b9..5965ba6b9 100644 --- a/docs/document/advanced/property.html +++ b/docs/document/advanced/property.html @@ -410,7 +410,7 @@ ]; }, 3000); }) - + \ No newline at end of file diff --git a/docs/document/assets/en_index.md.b7470e87.js b/docs/document/assets/en_index.md.8bbfdcd3.js similarity index 97% rename from docs/document/assets/en_index.md.b7470e87.js rename to docs/document/assets/en_index.md.8bbfdcd3.js index 805436c57..4392daf88 100644 --- a/docs/document/assets/en_index.md.b7470e87.js +++ b/docs/document/assets/en_index.md.8bbfdcd3.js @@ -1,4 +1,4 @@ -import{_ as s,o as n,c as a,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"Install","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1683042244000}'),p={name:"en/index.md"},e=l(`

Important Note

The English document has not yet been completed, everything is subject to the Chinese document.

Install ​

Install ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Use ​

js
import Artplayer from 'artplayer';
+import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"Install","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1683042244000}'),p={name:"en/index.md"},e=l(`

Important Note

The English document has not yet been completed, everything is subject to the Chinese document.

Install ​

Install ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Use ​

js
import Artplayer from 'artplayer';
 
 const art = new Artplayer({
     container: '.artplayer-app',
@@ -17,7 +17,7 @@ import{_ as s,o as n,c as a,S as l}from"./chunks/framework.532b6b18.js";const C=
     <body>
         <div class="artplayer-app"></div>
     </body>
-</html>

Tip

The size of the player depends on the size of the container, so your container must have a size

The following links can see more use examples

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

Tip

The size of the player depends on the size of the container, so your container must have a size

The following links can see more use examples

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -81,7 +81,7 @@ import{_ as s,o as n,c as a,S as l}from"./chunks/framework.532b6b18.js";const C=
     },
   },
 };
-</script>

Tip

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Tip

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -164,4 +164,4 @@ import{_ as s,o as n,c as a,S as l}from"./chunks/framework.532b6b18.js";const C=
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

Old browsers ​

Production builds of artplayer.js are only compatible with the last major version of Chrome: last 1 Chrome version

For older browsers, use the artplayer.legacy.js file, compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you want to be compatible with older browsers, please modify the following configuration and build it yourself:

Build configuration: /scripts/build.js

Reference documents: browserslist

`,36),o=[e];function t(r,c,i,y,F,D){return n(),a("div",null,o)}const u=s(p,[["render",t]]);export{C as __pageData,u as default}; +const art8 = new Artplayer(option);

Old browsers ​

Production builds of artplayer.js are only compatible with the last major version of Chrome: last 1 Chrome version

For older browsers, use the artplayer.legacy.js file, compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you want to be compatible with older browsers, please modify the following configuration and build it yourself:

Build configuration: /scripts/build.js

Reference documents: browserslist

`,36),o=[e];function t(r,c,i,y,F,D){return a(),n("div",null,o)}const u=s(p,[["render",t]]);export{C as __pageData,u as default}; diff --git a/docs/document/assets/en_index.md.b7470e87.lean.js b/docs/document/assets/en_index.md.8bbfdcd3.lean.js similarity index 68% rename from docs/document/assets/en_index.md.b7470e87.lean.js rename to docs/document/assets/en_index.md.8bbfdcd3.lean.js index 4fec10a9c..624e3eb14 100644 --- a/docs/document/assets/en_index.md.b7470e87.lean.js +++ b/docs/document/assets/en_index.md.8bbfdcd3.lean.js @@ -1 +1 @@ -import{_ as s,o as n,c as a,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"Install","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1683042244000}'),p={name:"en/index.md"},e=l("",36),o=[e];function t(r,c,i,y,F,D){return n(),a("div",null,o)}const u=s(p,[["render",t]]);export{C as __pageData,u as default}; +import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"Install","description":"","frontmatter":{},"headers":[],"relativePath":"en/index.md","filePath":"en/index.md","lastUpdated":1683042244000}'),p={name:"en/index.md"},e=l("",36),o=[e];function t(r,c,i,y,F,D){return a(),n("div",null,o)}const u=s(p,[["render",t]]);export{C as __pageData,u as default}; diff --git a/docs/document/assets/en_plugin_ads.md.befac096.js b/docs/document/assets/en_plugin_ads.md.4b93a290.js similarity index 96% rename from docs/document/assets/en_plugin_ads.md.befac096.js rename to docs/document/assets/en_plugin_ads.md.4b93a290.js index 207bad8e3..0767edf29 100644 --- a/docs/document/assets/en_plugin_ads.md.befac096.js +++ b/docs/document/assets/en_plugin_ads.md.4b93a290.js @@ -1,4 +1,4 @@ -import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";const u=JSON.parse('{"title":"视频广告","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/ads.md","filePath":"en/plugin/ads.md","lastUpdated":1673692792000}'),e={name:"en/plugin/ads.md"},o=s('

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

',8),r=p("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-ads/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
+import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";const u=JSON.parse('{"title":"视频广告","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/ads.md","filePath":"en/plugin/ads.md","lastUpdated":1673692792000}'),e={name:"en/plugin/ads.md"},o=s('

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

',8),r=p("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-ads/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
diff --git a/docs/document/assets/en_plugin_ads.md.befac096.lean.js b/docs/document/assets/en_plugin_ads.md.4b93a290.lean.js
similarity index 100%
rename from docs/document/assets/en_plugin_ads.md.befac096.lean.js
rename to docs/document/assets/en_plugin_ads.md.4b93a290.lean.js
diff --git a/docs/document/assets/en_plugin_control-ui.md.e406c573.js b/docs/document/assets/en_plugin_control-ui.md.182a9399.js
similarity index 95%
rename from docs/document/assets/en_plugin_control-ui.md.e406c573.js
rename to docs/document/assets/en_plugin_control-ui.md.182a9399.js
index a165cb7bf..cab7cd007 100644
--- a/docs/document/assets/en_plugin_control-ui.md.e406c573.js
+++ b/docs/document/assets/en_plugin_control-ui.md.182a9399.js
@@ -1,4 +1,4 @@
-import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/control-ui.md","filePath":"en/plugin/control-ui.md","lastUpdated":1673692792000}'),e={name:"en/plugin/control-ui.md"},o=s('

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

',8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/control-ui.md","filePath":"en/plugin/control-ui.md","lastUpdated":1673692792000}'),e={name:"en/plugin/control-ui.md"},o=s('

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

',8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -24,4 +24,4 @@ import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";c
     plugins: [
         artplayerPluginControl(),
     ],
-});
`,1),y=[o,r,t,c,i];function D(F,C,d,b,u,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; +});
`,1),y=[o,r,t,c,i];function D(F,C,d,u,b,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; diff --git a/docs/document/assets/en_plugin_control-ui.md.e406c573.lean.js b/docs/document/assets/en_plugin_control-ui.md.182a9399.lean.js similarity index 90% rename from docs/document/assets/en_plugin_control-ui.md.e406c573.lean.js rename to docs/document/assets/en_plugin_control-ui.md.182a9399.lean.js index f93b901d5..6df3cce55 100644 --- a/docs/document/assets/en_plugin_control-ui.md.e406c573.lean.js +++ b/docs/document/assets/en_plugin_control-ui.md.182a9399.lean.js @@ -1 +1 @@ -import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/control-ui.md","filePath":"en/plugin/control-ui.md","lastUpdated":1673692792000}'),e={name:"en/plugin/control-ui.md"},o=s("",8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s("",4),c=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),i=s("",1),y=[o,r,t,c,i];function D(F,C,d,b,u,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; +import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/control-ui.md","filePath":"en/plugin/control-ui.md","lastUpdated":1673692792000}'),e={name:"en/plugin/control-ui.md"},o=s("",8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s("",4),c=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),i=s("",1),y=[o,r,t,c,i];function D(F,C,d,u,b,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; diff --git a/docs/document/assets/en_plugin_dash-quality.md.860e10ea.js b/docs/document/assets/en_plugin_dash-quality.md.ed691a8e.js similarity index 86% rename from docs/document/assets/en_plugin_dash-quality.md.860e10ea.js rename to docs/document/assets/en_plugin_dash-quality.md.ed691a8e.js index 68f5343c9..c51d157a2 100644 --- a/docs/document/assets/en_plugin_dash-quality.md.860e10ea.js +++ b/docs/document/assets/en_plugin_dash-quality.md.ed691a8e.js @@ -1 +1 @@ -import{_ as a,o as s,c as e,S as l}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"Dash 画质","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/dash-quality.md","filePath":"en/plugin/dash-quality.md","lastUpdated":1676696783000}'),n={name:"en/plugin/dash-quality.md"},t=l('

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
',7),p=[t];function i(r,o,d,c,u,h){return s(),e("div",null,p)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as e,S as l}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"Dash 画质","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/dash-quality.md","filePath":"en/plugin/dash-quality.md","lastUpdated":1676696783000}'),n={name:"en/plugin/dash-quality.md"},t=l('

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
',7),p=[t];function i(r,o,d,c,u,h){return s(),e("div",null,p)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/en_plugin_dash-quality.md.860e10ea.lean.js b/docs/document/assets/en_plugin_dash-quality.md.ed691a8e.lean.js similarity index 100% rename from docs/document/assets/en_plugin_dash-quality.md.860e10ea.lean.js rename to docs/document/assets/en_plugin_dash-quality.md.ed691a8e.lean.js diff --git a/docs/document/assets/en_plugin_hls-quality.md.56c0c32b.js b/docs/document/assets/en_plugin_hls-quality.md.8a5de55a.js similarity index 84% rename from docs/document/assets/en_plugin_hls-quality.md.56c0c32b.js rename to docs/document/assets/en_plugin_hls-quality.md.8a5de55a.js index 79fd0d4dd..f19de9d5e 100644 --- a/docs/document/assets/en_plugin_hls-quality.md.56c0c32b.js +++ b/docs/document/assets/en_plugin_hls-quality.md.8a5de55a.js @@ -1 +1 @@ -import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/hls-quality.md","filePath":"en/plugin/hls-quality.md","lastUpdated":1673692792000}'),n={name:"en/plugin/hls-quality.md"},t=e('

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
',7),p=[t];function r(i,o,c,d,u,h){return s(),l("div",null,p)}const m=a(n,[["render",r]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/hls-quality.md","filePath":"en/plugin/hls-quality.md","lastUpdated":1673692792000}'),n={name:"en/plugin/hls-quality.md"},p=e('

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
',7),t=[p];function i(r,o,c,d,u,h){return s(),l("div",null,t)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/en_plugin_hls-quality.md.56c0c32b.lean.js b/docs/document/assets/en_plugin_hls-quality.md.8a5de55a.lean.js similarity index 58% rename from docs/document/assets/en_plugin_hls-quality.md.56c0c32b.lean.js rename to docs/document/assets/en_plugin_hls-quality.md.8a5de55a.lean.js index f1a4468c3..147b011d0 100644 --- a/docs/document/assets/en_plugin_hls-quality.md.56c0c32b.lean.js +++ b/docs/document/assets/en_plugin_hls-quality.md.8a5de55a.lean.js @@ -1 +1 @@ -import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/hls-quality.md","filePath":"en/plugin/hls-quality.md","lastUpdated":1673692792000}'),n={name:"en/plugin/hls-quality.md"},t=e("",7),p=[t];function r(i,o,c,d,u,h){return s(),l("div",null,p)}const m=a(n,[["render",r]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/hls-quality.md","filePath":"en/plugin/hls-quality.md","lastUpdated":1673692792000}'),n={name:"en/plugin/hls-quality.md"},p=e("",7),t=[p];function i(r,o,c,d,u,h){return s(),l("div",null,t)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/en_plugin_iframe.md.73c6f82c.js b/docs/document/assets/en_plugin_iframe.md.ae3ab65b.js similarity index 98% rename from docs/document/assets/en_plugin_iframe.md.73c6f82c.js rename to docs/document/assets/en_plugin_iframe.md.ae3ab65b.js index 3466809e9..146987a9a 100644 --- a/docs/document/assets/en_plugin_iframe.md.73c6f82c.js +++ b/docs/document/assets/en_plugin_iframe.md.ae3ab65b.js @@ -1,4 +1,4 @@ -import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=JSON.parse('{"title":"Iframe 控制","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/iframe.md","filePath":"en/plugin/iframe.md","lastUpdated":1680272727000}'),p={name:"en/plugin/iframe.md"},o=l(`

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
+import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=JSON.parse('{"title":"Iframe 控制","description":"","frontmatter":{},"headers":[],"relativePath":"en/plugin/iframe.md","filePath":"en/plugin/iframe.md","lastUpdated":1680272727000}'),p={name:"en/plugin/iframe.md"},o=l(`

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
@@ -83,7 +83,7 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=
         type: 'currentTime',
         data: art.currentTime,
     });
-});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
+});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
diff --git a/docs/document/assets/en_plugin_iframe.md.73c6f82c.lean.js b/docs/document/assets/en_plugin_iframe.md.ae3ab65b.lean.js
similarity index 100%
rename from docs/document/assets/en_plugin_iframe.md.73c6f82c.lean.js
rename to docs/document/assets/en_plugin_iframe.md.ae3ab65b.lean.js
diff --git a/docs/document/assets/en_start_i18n.md.ecd3bff6.js b/docs/document/assets/en_start_i18n.md.63002da5.js
similarity index 99%
rename from docs/document/assets/en_start_i18n.md.ecd3bff6.js
rename to docs/document/assets/en_start_i18n.md.63002da5.js
index ed18d1c00..9fd62ad4f 100644
--- a/docs/document/assets/en_start_i18n.md.ecd3bff6.js
+++ b/docs/document/assets/en_start_i18n.md.63002da5.js
@@ -2,7 +2,7 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

Import language ​

The language files before packaging are stored in: artplayer/src/i18n/*.js, welcome to add your language

The packaged language files are stored in: artplayer/dist/i18n/*.js

Manually imported languages are: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

Import language ​

The language files before packaging are stored in: artplayer/src/i18n/*.js, welcome to add your language

The packaged language files are stored in: artplayer/dist/i18n/*.js

Manually imported languages are: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
diff --git a/docs/document/assets/en_start_i18n.md.ecd3bff6.lean.js b/docs/document/assets/en_start_i18n.md.63002da5.lean.js
similarity index 100%
rename from docs/document/assets/en_start_i18n.md.ecd3bff6.lean.js
rename to docs/document/assets/en_start_i18n.md.63002da5.lean.js
diff --git a/docs/document/assets/index.md.08abc06e.js b/docs/document/assets/index.md.48e77311.js
similarity index 97%
rename from docs/document/assets/index.md.08abc06e.js
rename to docs/document/assets/index.md.48e77311.js
index 98c930932..6538edbca 100644
--- a/docs/document/assets/index.md.08abc06e.js
+++ b/docs/document/assets/index.md.48e77311.js
@@ -1,4 +1,4 @@
-import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1683042244000}'),p={name:"index.md"},e=l(`

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

js
import Artplayer from 'artplayer';
+import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1683042244000}'),p={name:"index.md"},e=l(`

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

js
import Artplayer from 'artplayer';
 
 const art = new Artplayer({
     container: '.artplayer-app',
@@ -17,7 +17,7 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=
     <body>
         <div class="artplayer-app"></div>
     </body>
-</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -81,7 +81,7 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=
     },
   },
 };
-</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -164,4 +164,4 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

`,35),o=[e];function t(r,c,y,i,F,D){return a(),n("div",null,o)}const u=s(p,[["render",t]]);export{C as __pageData,u as default}; +const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

`,35),o=[e];function t(r,c,y,i,F,D){return a(),n("div",null,o)}const A=s(p,[["render",t]]);export{C as __pageData,A as default}; diff --git a/docs/document/assets/index.md.08abc06e.lean.js b/docs/document/assets/index.md.48e77311.lean.js similarity index 83% rename from docs/document/assets/index.md.08abc06e.lean.js rename to docs/document/assets/index.md.48e77311.lean.js index f11d5a9db..888f53199 100644 --- a/docs/document/assets/index.md.08abc06e.lean.js +++ b/docs/document/assets/index.md.48e77311.lean.js @@ -1 +1 @@ -import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1683042244000}'),p={name:"index.md"},e=l("",35),o=[e];function t(r,c,y,i,F,D){return a(),n("div",null,o)}const u=s(p,[["render",t]]);export{C as __pageData,u as default}; +import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const C=JSON.parse('{"title":"安装使用","description":"","frontmatter":{},"headers":[],"relativePath":"index.md","filePath":"index.md","lastUpdated":1683042244000}'),p={name:"index.md"},e=l("",35),o=[e];function t(r,c,y,i,F,D){return a(),n("div",null,o)}const A=s(p,[["render",t]]);export{C as __pageData,A as default}; diff --git a/docs/document/assets/plugin_ads.md.b618e99d.js b/docs/document/assets/plugin_ads.md.12a970af.js similarity index 96% rename from docs/document/assets/plugin_ads.md.b618e99d.js rename to docs/document/assets/plugin_ads.md.12a970af.js index b15e9e7c5..d48b25046 100644 --- a/docs/document/assets/plugin_ads.md.b618e99d.js +++ b/docs/document/assets/plugin_ads.md.12a970af.js @@ -1,4 +1,4 @@ -import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";const u=JSON.parse('{"title":"视频广告","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/ads.md","filePath":"plugin/ads.md","lastUpdated":1673441101000}'),e={name:"plugin/ads.md"},o=s('

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

',8),r=p("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-ads/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
+import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";const u=JSON.parse('{"title":"视频广告","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/ads.md","filePath":"plugin/ads.md","lastUpdated":1673441101000}'),e={name:"plugin/ads.md"},o=s('

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

',8),r=p("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-ads/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -45,4 +45,4 @@ import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";c
 // Ad skipped
 art.on('artplayerPluginAds:skip', (ads) => {
     console.info(ads);
-});
`,1),c=[o,r,t];function i(y,D,F,C,b,d){return n(),l("div",null,c)}const m=a(e,[["render",i]]);export{u as __pageData,m as default}; +});
`,1),c=[o,r,t];function i(D,y,F,C,b,d){return n(),l("div",null,c)}const m=a(e,[["render",i]]);export{u as __pageData,m as default}; diff --git a/docs/document/assets/plugin_ads.md.b618e99d.lean.js b/docs/document/assets/plugin_ads.md.12a970af.lean.js similarity index 88% rename from docs/document/assets/plugin_ads.md.b618e99d.lean.js rename to docs/document/assets/plugin_ads.md.12a970af.lean.js index 7641fb731..46aed9454 100644 --- a/docs/document/assets/plugin_ads.md.b618e99d.lean.js +++ b/docs/document/assets/plugin_ads.md.12a970af.lean.js @@ -1 +1 @@ -import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";const u=JSON.parse('{"title":"视频广告","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/ads.md","filePath":"plugin/ads.md","lastUpdated":1673441101000}'),e={name:"plugin/ads.md"},o=s("",8),r=p("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-ads/index.js"}," ▶ Run Code ",-1),t=s("",1),c=[o,r,t];function i(y,D,F,C,b,d){return n(),l("div",null,c)}const m=a(e,[["render",i]]);export{u as __pageData,m as default}; +import{_ as a,o as n,c as l,S as s,k as p}from"./chunks/framework.532b6b18.js";const u=JSON.parse('{"title":"视频广告","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/ads.md","filePath":"plugin/ads.md","lastUpdated":1673441101000}'),e={name:"plugin/ads.md"},o=s("",8),r=p("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-ads/index.js"}," ▶ Run Code ",-1),t=s("",1),c=[o,r,t];function i(D,y,F,C,b,d){return n(),l("div",null,c)}const m=a(e,[["render",i]]);export{u as __pageData,m as default}; diff --git a/docs/document/assets/plugin_control-ui.md.df3e6fc8.js b/docs/document/assets/plugin_control-ui.md.cf85aeee.js similarity index 95% rename from docs/document/assets/plugin_control-ui.md.df3e6fc8.js rename to docs/document/assets/plugin_control-ui.md.cf85aeee.js index 01ef9dbf0..68f2d594f 100644 --- a/docs/document/assets/plugin_control-ui.md.df3e6fc8.js +++ b/docs/document/assets/plugin_control-ui.md.cf85aeee.js @@ -1,4 +1,4 @@ -import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/control-ui.md","filePath":"plugin/control-ui.md","lastUpdated":1673441101000}'),e={name:"plugin/control-ui.md"},o=s('

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

',8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
+import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/control-ui.md","filePath":"plugin/control-ui.md","lastUpdated":1673441101000}'),e={name:"plugin/control-ui.md"},o=s('

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

',8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s(`
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -24,4 +24,4 @@ import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";c
     plugins: [
         artplayerPluginControl(),
     ],
-});
`,1),y=[o,r,t,c,i];function D(F,C,d,u,b,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; +});
`,1),y=[o,r,t,c,i];function D(F,C,d,b,u,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; diff --git a/docs/document/assets/plugin_control-ui.md.df3e6fc8.lean.js b/docs/document/assets/plugin_control-ui.md.cf85aeee.lean.js similarity index 90% rename from docs/document/assets/plugin_control-ui.md.df3e6fc8.lean.js rename to docs/document/assets/plugin_control-ui.md.cf85aeee.lean.js index 5ad1f1a82..60eb2b898 100644 --- a/docs/document/assets/plugin_control-ui.md.df3e6fc8.lean.js +++ b/docs/document/assets/plugin_control-ui.md.cf85aeee.lean.js @@ -1 +1 @@ -import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/control-ui.md","filePath":"plugin/control-ui.md","lastUpdated":1673441101000}'),e={name:"plugin/control-ui.md"},o=s("",8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s("",4),c=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),i=s("",1),y=[o,r,t,c,i];function D(F,C,d,u,b,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; +import{_ as n,o as l,c as p,S as s,k as a}from"./chunks/framework.532b6b18.js";const h=JSON.parse('{"title":"控制器皮肤","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/control-ui.md","filePath":"plugin/control-ui.md","lastUpdated":1673441101000}'),e={name:"plugin/control-ui.md"},o=s("",8),r=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),t=s("",4),c=a("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-control/index.js"}," ▶ Run Code ",-1),i=s("",1),y=[o,r,t,c,i];function D(F,C,d,b,u,A){return l(),p("div",null,y)}const g=n(e,[["render",D]]);export{h as __pageData,g as default}; diff --git a/docs/document/assets/plugin_danmuku.md.759290da.js b/docs/document/assets/plugin_danmuku.md.fa90b3e1.js similarity index 99% rename from docs/document/assets/plugin_danmuku.md.759290da.js rename to docs/document/assets/plugin_danmuku.md.fa90b3e1.js index 60e90d922..9f3f81a83 100644 --- a/docs/document/assets/plugin_danmuku.md.759290da.js +++ b/docs/document/assets/plugin_danmuku.md.fa90b3e1.js @@ -1,4 +1,4 @@ -import{_ as a,o as l,c as p,S as s,k as n}from"./chunks/framework.532b6b18.js";const V=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1683036652000}'),o={name:"plugin/danmuku.md"},e=s(`

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

选项 ​

js
{
+import{_ as a,o as l,c as p,S as s,k as n}from"./chunks/framework.532b6b18.js";const I=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1683036652000}'),o={name:"plugin/danmuku.md"},e=s(`

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

选项 ​

js
{
     danmuku: [], // 弹幕库,支持数组, xml 地址, Promise返回数组
     speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
     opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
@@ -281,4 +281,4 @@ import{_ as a,o as l,c as p,S as s,k as n}from"./chunks/framework.532b6b18.js";c
 
 art.on('artplayerPluginDanmuku:destroy', () => {
     console.info('弹幕销毁');
-});
`,3),P=[e,r,c,t,D,F,y,i,C,A,u,b,m,d,h,g,_,E,k,v,f];function T(x,B,q,S,w,j){return l(),p("div",null,P)}const I=a(o,[["render",T]]);export{V as __pageData,I as default}; +});
`,3),P=[e,r,c,t,D,F,y,i,C,A,u,b,m,d,h,g,_,E,k,v,f];function T(x,B,q,S,j,w){return l(),p("div",null,P)}const V=a(o,[["render",T]]);export{I as __pageData,V as default}; diff --git a/docs/document/assets/plugin_danmuku.md.759290da.lean.js b/docs/document/assets/plugin_danmuku.md.fa90b3e1.lean.js similarity index 89% rename from docs/document/assets/plugin_danmuku.md.759290da.lean.js rename to docs/document/assets/plugin_danmuku.md.fa90b3e1.lean.js index a4a68bc28..3b0ca970e 100644 --- a/docs/document/assets/plugin_danmuku.md.759290da.lean.js +++ b/docs/document/assets/plugin_danmuku.md.fa90b3e1.lean.js @@ -1 +1 @@ -import{_ as a,o as l,c as p,S as s,k as n}from"./chunks/framework.532b6b18.js";const V=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1683036652000}'),o={name:"plugin/danmuku.md"},e=s("",10),r=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),c=s("",2),t=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),D=s("",2),F=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),y=s("",3),i=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),C=s("",3),A=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),u=s("",3),b=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),m=s("",4),d=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),h=s("",3),g=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),_=s("",3),E=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),k=s("",3),v=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),f=s("",3),P=[e,r,c,t,D,F,y,i,C,A,u,b,m,d,h,g,_,E,k,v,f];function T(x,B,q,S,w,j){return l(),p("div",null,P)}const I=a(o,[["render",T]]);export{V as __pageData,I as default}; +import{_ as a,o as l,c as p,S as s,k as n}from"./chunks/framework.532b6b18.js";const I=JSON.parse('{"title":"弹幕库","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/danmuku.md","filePath":"plugin/danmuku.md","lastUpdated":1683036652000}'),o={name:"plugin/danmuku.md"},e=s("",10),r=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),c=s("",2),t=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),D=s("",2),F=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),y=s("",3),i=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),C=s("",3),A=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),u=s("",3),b=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),m=s("",4),d=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),h=s("",3),g=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),_=s("",3),E=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),k=s("",3),v=n("div",{className:"run-code","data-libs":"./uncompiled/artplayer-plugin-danmuku/index.js"}," ▶ Run Code ",-1),f=s("",3),P=[e,r,c,t,D,F,y,i,C,A,u,b,m,d,h,g,_,E,k,v,f];function T(x,B,q,S,j,w){return l(),p("div",null,P)}const V=a(o,[["render",T]]);export{I as __pageData,V as default}; diff --git a/docs/document/assets/plugin_dash-quality.md.05e051af.js b/docs/document/assets/plugin_dash-quality.md.90dd7335.js similarity index 86% rename from docs/document/assets/plugin_dash-quality.md.05e051af.js rename to docs/document/assets/plugin_dash-quality.md.90dd7335.js index b11688335..5b3e2decd 100644 --- a/docs/document/assets/plugin_dash-quality.md.05e051af.js +++ b/docs/document/assets/plugin_dash-quality.md.90dd7335.js @@ -1 +1 @@ -import{_ as a,o as s,c as e,S as l}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"Dash 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/dash-quality.md","filePath":"plugin/dash-quality.md","lastUpdated":1676696783000}'),n={name:"plugin/dash-quality.md"},t=l('

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
',7),p=[t];function i(r,o,d,c,u,h){return s(),e("div",null,p)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as e,S as l}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"Dash 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/dash-quality.md","filePath":"plugin/dash-quality.md","lastUpdated":1676696783000}'),n={name:"plugin/dash-quality.md"},t=l('

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
',7),p=[t];function i(r,o,c,d,u,h){return s(),e("div",null,p)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/plugin_dash-quality.md.05e051af.lean.js b/docs/document/assets/plugin_dash-quality.md.90dd7335.lean.js similarity index 85% rename from docs/document/assets/plugin_dash-quality.md.05e051af.lean.js rename to docs/document/assets/plugin_dash-quality.md.90dd7335.lean.js index 11dcc5f5e..950e01361 100644 --- a/docs/document/assets/plugin_dash-quality.md.05e051af.lean.js +++ b/docs/document/assets/plugin_dash-quality.md.90dd7335.lean.js @@ -1 +1 @@ -import{_ as a,o as s,c as e,S as l}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"Dash 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/dash-quality.md","filePath":"plugin/dash-quality.md","lastUpdated":1676696783000}'),n={name:"plugin/dash-quality.md"},t=l("",7),p=[t];function i(r,o,d,c,u,h){return s(),e("div",null,p)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as e,S as l}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"Dash 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/dash-quality.md","filePath":"plugin/dash-quality.md","lastUpdated":1676696783000}'),n={name:"plugin/dash-quality.md"},t=l("",7),p=[t];function i(r,o,c,d,u,h){return s(),e("div",null,p)}const m=a(n,[["render",i]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/plugin_hls-quality.md.c46a810d.js b/docs/document/assets/plugin_hls-quality.md.b494718c.js similarity index 87% rename from docs/document/assets/plugin_hls-quality.md.c46a810d.js rename to docs/document/assets/plugin_hls-quality.md.b494718c.js index 040b72c45..80b736ac4 100644 --- a/docs/document/assets/plugin_hls-quality.md.c46a810d.js +++ b/docs/document/assets/plugin_hls-quality.md.b494718c.js @@ -1 +1 @@ -import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/hls-quality.md","filePath":"plugin/hls-quality.md","lastUpdated":1673441101000}'),n={name:"plugin/hls-quality.md"},t=e('

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
',7),p=[t];function r(i,o,c,d,u,b){return s(),l("div",null,p)}const m=a(n,[["render",r]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/hls-quality.md","filePath":"plugin/hls-quality.md","lastUpdated":1673441101000}'),n={name:"plugin/hls-quality.md"},t=e('

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
',7),p=[t];function r(i,o,c,d,u,h){return s(),l("div",null,p)}const m=a(n,[["render",r]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/plugin_hls-quality.md.c46a810d.lean.js b/docs/document/assets/plugin_hls-quality.md.b494718c.lean.js similarity index 85% rename from docs/document/assets/plugin_hls-quality.md.c46a810d.lean.js rename to docs/document/assets/plugin_hls-quality.md.b494718c.lean.js index e1d6dbcd5..cd01cb1a8 100644 --- a/docs/document/assets/plugin_hls-quality.md.c46a810d.lean.js +++ b/docs/document/assets/plugin_hls-quality.md.b494718c.lean.js @@ -1 +1 @@ -import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/hls-quality.md","filePath":"plugin/hls-quality.md","lastUpdated":1673441101000}'),n={name:"plugin/hls-quality.md"},t=e("",7),p=[t];function r(i,o,c,d,u,b){return s(),l("div",null,p)}const m=a(n,[["render",r]]);export{y as __pageData,m as default}; +import{_ as a,o as s,c as l,S as e}from"./chunks/framework.532b6b18.js";const y=JSON.parse('{"title":"HLS 画质","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/hls-quality.md","filePath":"plugin/hls-quality.md","lastUpdated":1673441101000}'),n={name:"plugin/hls-quality.md"},t=e("",7),p=[t];function r(i,o,c,d,u,h){return s(),l("div",null,p)}const m=a(n,[["render",r]]);export{y as __pageData,m as default}; diff --git a/docs/document/assets/plugin_iframe.md.7a8d5df0.js b/docs/document/assets/plugin_iframe.md.62b646f4.js similarity index 98% rename from docs/document/assets/plugin_iframe.md.7a8d5df0.js rename to docs/document/assets/plugin_iframe.md.62b646f4.js index 52caf4baf..c42f4c118 100644 --- a/docs/document/assets/plugin_iframe.md.7a8d5df0.js +++ b/docs/document/assets/plugin_iframe.md.62b646f4.js @@ -1,4 +1,4 @@ -import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=JSON.parse('{"title":"Iframe 控制","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/iframe.md","filePath":"plugin/iframe.md","lastUpdated":1680272727000}'),p={name:"plugin/iframe.md"},o=l(`

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
+import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=JSON.parse('{"title":"Iframe 控制","description":"","frontmatter":{},"headers":[],"relativePath":"plugin/iframe.md","filePath":"plugin/iframe.md","lastUpdated":1680272727000}'),p={name:"plugin/iframe.md"},o=l(`

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
@@ -83,7 +83,7 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=
         type: 'currentTime',
         data: art.currentTime,
     });
-});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
+});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
diff --git a/docs/document/assets/plugin_iframe.md.7a8d5df0.lean.js b/docs/document/assets/plugin_iframe.md.62b646f4.lean.js
similarity index 100%
rename from docs/document/assets/plugin_iframe.md.7a8d5df0.lean.js
rename to docs/document/assets/plugin_iframe.md.62b646f4.lean.js
diff --git a/docs/document/assets/start_i18n.md.a28cf138.js b/docs/document/assets/start_i18n.md.7503329d.js
similarity index 98%
rename from docs/document/assets/start_i18n.md.a28cf138.js
rename to docs/document/assets/start_i18n.md.7503329d.js
index e93bcae3e..5723b1868 100644
--- a/docs/document/assets/start_i18n.md.a28cf138.js
+++ b/docs/document/assets/start_i18n.md.7503329d.js
@@ -2,7 +2,7 @@ import{_ as s,o as a,c as n,S as l}from"./chunks/framework.532b6b18.js";const A=
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     lang: 'zh-cn', // or 'en'
-});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

手动导入的语言有: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

手动导入的语言有: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
diff --git a/docs/document/assets/start_i18n.md.a28cf138.lean.js b/docs/document/assets/start_i18n.md.7503329d.lean.js
similarity index 100%
rename from docs/document/assets/start_i18n.md.a28cf138.lean.js
rename to docs/document/assets/start_i18n.md.7503329d.lean.js
diff --git a/docs/document/component/contextmenu.html b/docs/document/component/contextmenu.html
index 3bb9c3f81..abbada3e6 100644
--- a/docs/document/component/contextmenu.html
+++ b/docs/document/component/contextmenu.html
@@ -101,7 +101,7 @@
         })
     }, 3000);
 });
- + \ No newline at end of file diff --git a/docs/document/component/controls.html b/docs/document/component/controls.html index c58a499a7..516397e5c 100644 --- a/docs/document/component/controls.html +++ b/docs/document/component/controls.html @@ -148,7 +148,7 @@ }); }, 3000); });
- + \ No newline at end of file diff --git a/docs/document/component/layers.html b/docs/document/component/layers.html index 1a90f6dc6..779483bb2 100644 --- a/docs/document/component/layers.html +++ b/docs/document/component/layers.html @@ -120,7 +120,7 @@ }); }, 3000); });
- + \ No newline at end of file diff --git a/docs/document/component/setting.html b/docs/document/component/setting.html index b0d808f53..a22acc9b6 100644 --- a/docs/document/component/setting.html +++ b/docs/document/component/setting.html @@ -225,7 +225,7 @@ }); }, 3000); }); - + \ No newline at end of file diff --git a/docs/document/en/advanced/built-in.html b/docs/document/en/advanced/built-in.html index 610985553..292924534 100644 --- a/docs/document/en/advanced/built-in.html +++ b/docs/document/en/advanced/built-in.html @@ -205,7 +205,7 @@ art.on('ready', () => { art.plugins.add(myPlugin); }); - + \ No newline at end of file diff --git a/docs/document/en/advanced/class.html b/docs/document/en/advanced/class.html index 3e0db3f36..18b4d9f94 100644 --- a/docs/document/en/advanced/class.html +++ b/docs/document/en/advanced/class.html @@ -26,7 +26,7 @@ }); console.info([...Artplayer.instances]);

version ​

返回播放器的版本信息

▶ Run Code
js
console.info(Artplayer.version);

env ​

返回播放器的环境变量

▶ Run Code
js
console.info(Artplayer.env);

build ​

返回播放器的打包时间

▶ Run Code
js
console.info(Artplayer.build);

config ​

返回视频的默认配置

▶ Run Code
js
console.info(Artplayer.config);

utils ​

返回播放器的工具函数集合

▶ Run Code
js
console.info(Artplayer.utils);

全部工具函数请参考以下地址:

artplayer/types/utils.d.ts

scheme ​

返回播放器选项的校验方案

▶ Run Code
js
console.info(Artplayer.scheme);

Emitter ​

返回事件分发器的构造函数

▶ Run Code
js
console.info(Artplayer.Emitter);

validator ​

返回选项的校验函数

▶ Run Code
js
console.info(Artplayer.validator);

kindOf ​

返回类型检测的函数工具

▶ Run Code
js
console.info(Artplayer.kindOf);

html ​

返回播放器所需的 html 字符串

▶ Run Code
js
console.info(Artplayer.html);

option ​

返回播放器的默认选项

▶ Run Code
js
console.info(Artplayer.option);
- + \ No newline at end of file diff --git a/docs/document/en/advanced/event.html b/docs/document/en/advanced/event.html index db815f4b4..5c46a49c2 100644 --- a/docs/document/en/advanced/event.html +++ b/docs/document/en/advanced/event.html @@ -373,7 +373,7 @@ art.on('muted', (state) => { console.log(state); });

video:canplay ​

浏览器可以播放媒体文件了,但估计没有足够的数据来支撑播放到结束,不必停下来进一步缓冲内容

video:canplaythrough ​

浏览器估计它可以在不停止内容缓冲的情况下播放媒体直到结束

video:complete ​

OfflineAudioContext 渲染完成

video:durationchange ​

duration 属性的值改变时触发

video:emptied ​

媒体内容变为空;例如,当这个 media 已经加载完成(或者部分加载完成),则发送此事件,并调用 load() 方法重新加载它

video:ended ​

视频停止播放,因为 media 已经到达结束点

video:error ​

获取媒体数据时出错,或者资源类型不是受支持的媒体格式

video:loadeddata ​

media 中的首帧已经完成加载

video:loadedmetadata ​

已加载元数据

video:pause ​

播放已暂停

video:play ​

播放已开始

video:playing ​

由于缺乏数据而暂停或延迟后,播放准备开始

video:progress ​

在浏览器加载资源时周期性触发

video:ratechange ​

播放速率发生变化

video:seeked ​

跳帧(seek)操作完成

video:seeking ​

跳帧(seek)操作开始

video:stalled ​

用户代理(user agent)正在尝试获取媒体数据,但数据意外未出现

video:suspend ​

媒体数据加载已暂停

video:timeupdate ​

currentTime 属性指定的时间发生变化

video:volumechange ​

音量发生变化

video:waiting ​

由于暂时缺少数据,播放已停止

- + \ No newline at end of file diff --git a/docs/document/en/advanced/global.html b/docs/document/en/advanced/global.html index 7b9ad24d0..292354080 100644 --- a/docs/document/en/advanced/global.html +++ b/docs/document/en/advanced/global.html @@ -235,7 +235,7 @@ url: '/assets/sample/video.mp4', miniProgressBar: true, }); - + \ No newline at end of file diff --git a/docs/document/en/advanced/plugin.html b/docs/document/en/advanced/plugin.html index bf7743c23..210f4f15b 100644 --- a/docs/document/en/advanced/plugin.html +++ b/docs/document/en/advanced/plugin.html @@ -117,7 +117,7 @@ }) ], }); - + \ No newline at end of file diff --git a/docs/document/en/advanced/property.html b/docs/document/en/advanced/property.html index 3b8d07c5e..7f0e643fd 100644 --- a/docs/document/en/advanced/property.html +++ b/docs/document/en/advanced/property.html @@ -401,7 +401,7 @@ ]; }, 3000); }) - + \ No newline at end of file diff --git a/docs/document/en/component/contextmenu.html b/docs/document/en/component/contextmenu.html index 49b4b955e..6c53e3d20 100644 --- a/docs/document/en/component/contextmenu.html +++ b/docs/document/en/component/contextmenu.html @@ -101,7 +101,7 @@ }) }, 3000); }); - + \ No newline at end of file diff --git a/docs/document/en/component/controls.html b/docs/document/en/component/controls.html index ff3b98167..8d2b3f21d 100644 --- a/docs/document/en/component/controls.html +++ b/docs/document/en/component/controls.html @@ -148,7 +148,7 @@ }); }, 3000); }); - + \ No newline at end of file diff --git a/docs/document/en/component/layers.html b/docs/document/en/component/layers.html index e2fe06a13..a5c3f6d6b 100644 --- a/docs/document/en/component/layers.html +++ b/docs/document/en/component/layers.html @@ -120,7 +120,7 @@ }); }, 3000); }); - + \ No newline at end of file diff --git a/docs/document/en/component/setting.html b/docs/document/en/component/setting.html index b05e8567b..cae08a2c4 100644 --- a/docs/document/en/component/setting.html +++ b/docs/document/en/component/setting.html @@ -225,7 +225,7 @@ }); }, 3000); }); - + \ No newline at end of file diff --git a/docs/document/en/index.html b/docs/document/en/index.html index 68642386f..5ff7ec5f3 100644 --- a/docs/document/en/index.html +++ b/docs/document/en/index.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

Important Note

The English document has not yet been completed, everything is subject to the Chinese document.

Install ​

Install ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Use ​

js
import Artplayer from 'artplayer';
+    
Skip to content
On this page

Important Note

The English document has not yet been completed, everything is subject to the Chinese document.

Install ​

Install ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

Use ​

js
import Artplayer from 'artplayer';
 
 const art = new Artplayer({
     container: '.artplayer-app',
@@ -37,7 +37,7 @@
     <body>
         <div class="artplayer-app"></div>
     </body>
-</html>

Tip

The size of the player depends on the size of the container, so your container must have a size

The following links can see more use examples

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

Tip

The size of the player depends on the size of the container, so your container must have a size

The following links can see more use examples

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -101,7 +101,7 @@
     },
   },
 };
-</script>

Tip

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Tip

Modifying option directly in Vue.js will not change the player

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -184,8 +184,8 @@
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

Old browsers ​

Production builds of artplayer.js are only compatible with the last major version of Chrome: last 1 Chrome version

For older browsers, use the artplayer.legacy.js file, compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you want to be compatible with older browsers, please modify the following configuration and build it yourself:

Build configuration: /scripts/build.js

Reference documents: browserslist

- +const art8 = new Artplayer(option);

Old browsers ​

Production builds of artplayer.js are only compatible with the last major version of Chrome: last 1 Chrome version

For older browsers, use the artplayer.legacy.js file, compatible up to: IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

If you want to be compatible with older browsers, please modify the following configuration and build it yourself:

Build configuration: /scripts/build.js

Reference documents: browserslist

+ \ No newline at end of file diff --git a/docs/document/en/library/dash.html b/docs/document/en/library/dash.html index 2c0191b7c..bb5f6aa37 100644 --- a/docs/document/en/library/dash.html +++ b/docs/document/en/library/dash.html @@ -42,7 +42,7 @@ art.on('ready', () => { console.info(art.dash); }); - + \ No newline at end of file diff --git a/docs/document/en/library/flv.html b/docs/document/en/library/flv.html index 9a7f59f26..d20444be0 100644 --- a/docs/document/en/library/flv.html +++ b/docs/document/en/library/flv.html @@ -43,7 +43,7 @@ art.on('ready', () => { console.info(art.flv); }); - + \ No newline at end of file diff --git a/docs/document/en/library/hls.html b/docs/document/en/library/hls.html index 53a4f227c..a039871cc 100644 --- a/docs/document/en/library/hls.html +++ b/docs/document/en/library/hls.html @@ -45,7 +45,7 @@ art.on('ready', () => { console.info(art.hls); }); - + \ No newline at end of file diff --git a/docs/document/en/plugin/ads.html b/docs/document/en/plugin/ads.html index c39a43b6b..c4560facb 100644 --- a/docs/document/en/plugin/ads.html +++ b/docs/document/en/plugin/ads.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content
On this page

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -66,7 +66,7 @@
 art.on('artplayerPluginAds:skip', (ads) => {
     console.info(ads);
 });
- + \ No newline at end of file diff --git a/docs/document/en/plugin/control-ui.html b/docs/document/en/plugin/control-ui.html index 46b3111cb..7ed3e8872 100644 --- a/docs/document/en/plugin/control-ui.html +++ b/docs/document/en/plugin/control-ui.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content
On this page

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -45,7 +45,7 @@
         artplayerPluginControl(),
     ],
 });
- + \ No newline at end of file diff --git a/docs/document/en/plugin/dash-quality.html b/docs/document/en/plugin/dash-quality.html index 91e793b52..d1ca9dafd 100644 --- a/docs/document/en/plugin/dash-quality.html +++ b/docs/document/en/plugin/dash-quality.html @@ -11,15 +11,15 @@ - + -
Skip to content
On this page

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
- +
Skip to content
On this page

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
+ \ No newline at end of file diff --git a/docs/document/en/plugin/hls-quality.html b/docs/document/en/plugin/hls-quality.html index ec485f791..ed641930f 100644 --- a/docs/document/en/plugin/hls-quality.html +++ b/docs/document/en/plugin/hls-quality.html @@ -11,15 +11,15 @@ - + -
Skip to content
On this page

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
- +
Skip to content
On this page

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
+ \ No newline at end of file diff --git a/docs/document/en/plugin/iframe.html b/docs/document/en/plugin/iframe.html index 7d6ccb58d..675260cda 100644 --- a/docs/document/en/plugin/iframe.html +++ b/docs/document/en/plugin/iframe.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
+    
Skip to content
On this page

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
@@ -103,7 +103,7 @@
         type: 'currentTime',
         data: art.currentTime,
     });
-});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
+});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
@@ -184,7 +184,7 @@
         </script>
     </body>
 </html>
- + \ No newline at end of file diff --git a/docs/document/en/start/i18n.html b/docs/document/en/start/i18n.html index 45a243397..70026a63e 100644 --- a/docs/document/en/start/i18n.html +++ b/docs/document/en/start/i18n.html @@ -11,7 +11,7 @@ - + @@ -22,7 +22,7 @@ container: '.artplayer-app', url: '/assets/sample/video.mp4', lang: 'zh-cn', // or 'en' -});

Import language ​

The language files before packaging are stored in: artplayer/src/i18n/*.js, welcome to add your language

The packaged language files are stored in: artplayer/dist/i18n/*.js

Manually imported languages are: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

Import language ​

The language files before packaging are stored in: artplayer/src/i18n/*.js, welcome to add your language

The packaged language files are stored in: artplayer/dist/i18n/*.js

Manually imported languages are: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
@@ -70,7 +70,7 @@
         },
     },
 });
- + \ No newline at end of file diff --git a/docs/document/en/start/option.html b/docs/document/en/start/option.html index a384c3d50..35acefd66 100644 --- a/docs/document/en/start/option.html +++ b/docs/document/en/start/option.html @@ -398,7 +398,7 @@ // }, });
- + \ No newline at end of file diff --git a/docs/document/hashmap.json b/docs/document/hashmap.json index 91dd05c3e..cc94e5e48 100644 --- a/docs/document/hashmap.json +++ b/docs/document/hashmap.json @@ -1 +1 @@ -{"advanced_class.md":"e446539f","advanced_plugin.md":"b71cd634","advanced_built-in.md":"2ab1addc","advanced_global.md":"7dd7211c","advanced_event.md":"d7901aca","component_contextmenu.md":"fd4c8f42","component_layers.md":"1b88e508","component_controls.md":"5efc46cb","en_advanced_class.md":"a47f0b69","en_advanced_built-in.md":"3d9da76b","component_setting.md":"b02da861","advanced_property.md":"cb0d16e0","en_advanced_plugin.md":"db33d004","en_advanced_global.md":"15418f1d","en_component_contextmenu.md":"dac57cfb","en_advanced_event.md":"6b9d4f68","en_component_layers.md":"446fcd07","en_component_controls.md":"c066e6b8","en_library_dash.md":"d2caad85","en_library_flv.md":"7a295dcf","en_component_setting.md":"f8787f3a","en_library_hls.md":"adcf9c67","en_start_i18n.md":"ecd3bff6","en_plugin_ads.md":"befac096","en_plugin_dash-quality.md":"860e10ea","en_plugin_hls-quality.md":"56c0c32b","en_plugin_control-ui.md":"e406c573","en_index.md":"b7470e87","plugin_ads.md":"b618e99d","plugin_control-ui.md":"df3e6fc8","library_flv.md":"a74cc017","index.md":"08abc06e","library_hls.md":"29fb7b0e","library_dash.md":"6145d438","en_plugin_iframe.md":"73c6f82c","en_advanced_property.md":"15b8758c","plugin_dash-quality.md":"05e051af","plugin_hls-quality.md":"c46a810d","plugin_iframe.md":"7a8d5df0","start_i18n.md":"a28cf138","en_start_option.md":"096c4d13","plugin_danmuku.md":"759290da","start_option.md":"81dcd571"} +{"advanced_class.md":"e446539f","advanced_built-in.md":"2ab1addc","advanced_plugin.md":"b71cd634","advanced_global.md":"7dd7211c","component_contextmenu.md":"fd4c8f42","component_controls.md":"5efc46cb","advanced_event.md":"d7901aca","component_layers.md":"1b88e508","en_advanced_class.md":"a47f0b69","component_setting.md":"b02da861","en_advanced_built-in.md":"3d9da76b","advanced_property.md":"cb0d16e0","en_advanced_plugin.md":"db33d004","en_advanced_global.md":"15418f1d","en_advanced_event.md":"6b9d4f68","en_component_contextmenu.md":"dac57cfb","en_component_controls.md":"c066e6b8","en_component_layers.md":"446fcd07","en_plugin_control-ui.md":"182a9399","en_plugin_ads.md":"4b93a290","en_library_hls.md":"adcf9c67","en_library_dash.md":"d2caad85","en_plugin_hls-quality.md":"8a5de55a","en_plugin_dash-quality.md":"ed691a8e","en_library_flv.md":"7a295dcf","en_index.md":"8bbfdcd3","en_component_setting.md":"f8787f3a","en_advanced_property.md":"15b8758c","en_start_i18n.md":"63002da5","en_plugin_iframe.md":"ae3ab65b","library_dash.md":"6145d438","library_hls.md":"29fb7b0e","library_flv.md":"a74cc017","index.md":"48e77311","plugin_ads.md":"12a970af","plugin_control-ui.md":"cf85aeee","plugin_hls-quality.md":"b494718c","plugin_dash-quality.md":"90dd7335","start_i18n.md":"7503329d","en_start_option.md":"096c4d13","plugin_iframe.md":"62b646f4","plugin_danmuku.md":"fa90b3e1","start_option.md":"81dcd571"} diff --git a/docs/document/index.html b/docs/document/index.html index b00108b87..e5ddd75ea 100644 --- a/docs/document/index.html +++ b/docs/document/index.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

js
import Artplayer from 'artplayer';
+    
Skip to content
On this page

安装使用 ​

安装 ​

bash
npm install artplayer
bash
yarn add artplayer
bash
pnpm add artplayer
html
<script src="path/to/artplayer.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.js
bash
https://unpkg.com/artplayer/dist/artplayer.js

使用 ​

js
import Artplayer from 'artplayer';
 
 const art = new Artplayer({
     container: '.artplayer-app',
@@ -37,7 +37,7 @@
     <body>
         <div class="artplayer-app"></div>
     </body>
-</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
+</html>

提示

播放器的尺寸依赖于容器 container 的尺寸,所以你的容器 container 必须是有尺寸的

以下链接可以看到更多的使用例子

/packages/artplayer-template

Vue.js ​

vue
<template>
   <div ref="artRef"></div>
 </template>
 
@@ -101,7 +101,7 @@
     },
   },
 };
-</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
+</script>

Artplayer 非响应式:

在 Vue.js 里直接修改 option 是不会改变播放器的

React.js ​

jsx
import { useEffect, useRef } from 'react';
 import Artplayer from 'artplayer';
 
 export default function Player({ option, getInstance, ...rest }) {
@@ -184,8 +184,8 @@
 
 option.volume = 0.5;
 
-const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

- +const art8 = new Artplayer(option);

古老的浏览器 ​

生产构建的 artplayer.js 只兼容最新一个主版本的 Chrome:last 1 Chrome version

对于古老的浏览器,可以使用 artplayer.legacy.js 文件,可以兼容到:IE 11

js
import Artplayer from 'artplayer/dist/artplayer.legacy.js';
bash
https://cdn.jsdelivr.net/npm/artplayer/dist/artplayer.legacy.js
bash
https://unpkg.com/artplayer/dist/artplayer.legacy.js

假如你要兼容更古老的浏览器时,请修改以下配置然后自行构建:

构建配置:scripts/build.js

参考文档:browserslist

+ \ No newline at end of file diff --git a/docs/document/library/dash.html b/docs/document/library/dash.html index 8135c274a..307201d3d 100644 --- a/docs/document/library/dash.html +++ b/docs/document/library/dash.html @@ -42,7 +42,7 @@ art.on('ready', () => { console.info(art.dash); });
- + \ No newline at end of file diff --git a/docs/document/library/flv.html b/docs/document/library/flv.html index 921d0c20a..e6e580faf 100644 --- a/docs/document/library/flv.html +++ b/docs/document/library/flv.html @@ -43,7 +43,7 @@ art.on('ready', () => { console.info(art.flv); }); - + \ No newline at end of file diff --git a/docs/document/library/hls.html b/docs/document/library/hls.html index 9344f0dc4..32a8b54d2 100644 --- a/docs/document/library/hls.html +++ b/docs/document/library/hls.html @@ -45,7 +45,7 @@ art.on('ready', () => { console.info(art.hls); }); - + \ No newline at end of file diff --git a/docs/document/plugin/ads.html b/docs/document/plugin/ads.html index d8287e56c..430fc5c58 100644 --- a/docs/document/plugin/ads.html +++ b/docs/document/plugin/ads.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content
On this page

视频广告 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-ads
bash
yarn add artplayer-plugin-ads
bash
pnpm add artplayer-plugin-ads
html
<script src="path/to/artplayer-plugin-ads.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-ads/dist/artplayer-plugin-ads.js
bash
https://unpkg.com/artplayer-plugin-ads/dist/artplayer-plugin-ads.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     autoSize: true,
@@ -66,7 +66,7 @@
 art.on('artplayerPluginAds:skip', (ads) => {
     console.info(ads);
 });
- + \ No newline at end of file diff --git a/docs/document/plugin/control-ui.html b/docs/document/plugin/control-ui.html index ff61116c2..cefa33b31 100644 --- a/docs/document/plugin/control-ui.html +++ b/docs/document/plugin/control-ui.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
+    
Skip to content
On this page

控制器皮肤 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-control
bash
yarn add artplayer-plugin-control
bash
pnpm add artplayer-plugin-control
html
<script src="path/to/artplayer-plugin-control.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-control/dist/artplayer-plugin-control.js
bash
https://unpkg.com/artplayer-plugin-control/dist/artplayer-plugin-control.js

使用 ​

▶ Run Code
js
var art = new Artplayer({
     container: '.artplayer-app',
     url: '/assets/sample/video.mp4',
     fullscreen: true,
@@ -45,7 +45,7 @@
         artplayerPluginControl(),
     ],
 });
- + \ No newline at end of file diff --git a/docs/document/plugin/danmuku.html b/docs/document/plugin/danmuku.html index 5b9a40231..897d3d319 100644 --- a/docs/document/plugin/danmuku.html +++ b/docs/document/plugin/danmuku.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

选项 ​

js
{
+    
Skip to content
On this page

弹幕库 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-danmuku
bash
yarn add artplayer-plugin-danmuku
bash
pnpm add artplayer-plugin-danmuku
html
<script src="path/to/artplayer-plugin-danmuku.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js
bash
https://unpkg.com/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.js

选项 ​

js
{
     danmuku: [], // 弹幕库,支持数组, xml 地址, Promise返回数组
     speed: 5, // 弹幕持续时间,单位秒,范围在[1 ~ 10]
     opacity: 1, // 弹幕透明度,范围在[0 ~ 1]
@@ -302,7 +302,7 @@
 art.on('artplayerPluginDanmuku:destroy', () => {
     console.info('弹幕销毁');
 });
- + \ No newline at end of file diff --git a/docs/document/plugin/dash-quality.html b/docs/document/plugin/dash-quality.html index 92e611ffa..3899e4a06 100644 --- a/docs/document/plugin/dash-quality.html +++ b/docs/document/plugin/dash-quality.html @@ -11,15 +11,15 @@ - + -
Skip to content
On this page

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
- +
Skip to content
On this page

Dash 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-dash-quality
bash
yarn add artplayer-plugin-dash-quality
bash
pnpm add artplayer-plugin-dash-quality
html
<script src="path/to/artplayer-plugin-dash-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
bash
https://unpkg.com/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js
+ \ No newline at end of file diff --git a/docs/document/plugin/hls-quality.html b/docs/document/plugin/hls-quality.html index 0208647c8..e32b774c4 100644 --- a/docs/document/plugin/hls-quality.html +++ b/docs/document/plugin/hls-quality.html @@ -11,15 +11,15 @@ - + -
Skip to content
On this page

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
- +
Skip to content
On this page

HLS 画质 ​

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-hls-quality
bash
yarn add artplayer-plugin-hls-quality
bash
pnpm add artplayer-plugin-hls-quality
html
<script src="path/to/artplayer-plugin-hls-quality.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
bash
https://unpkg.com/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js
+ \ No newline at end of file diff --git a/docs/document/plugin/iframe.html b/docs/document/plugin/iframe.html index b219c6cb8..6b9547f12 100644 --- a/docs/document/plugin/iframe.html +++ b/docs/document/plugin/iframe.html @@ -11,14 +11,14 @@ - + -
Skip to content
On this page

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
+    
Skip to content
On this page

Iframe 控制 ​

说明 ​

通过该插件,你可以轻松在 index.html 里控制跨域 iframe.html 页面里的播放器,如在 index.html 里通过代码控制 iframe.html 播放器的功能,或者获取 iframe.html 播放器的值

演示 ​

👉 查看完整演示

安装 ​

bash
npm install artplayer-plugin-iframe
bash
yarn add artplayer-plugin-iframe
bash
pnpm add artplayer-plugin-iframe
html
<script src="path/to/artplayer-plugin-iframe.js"></script>

CDN ​

bash
https://cdn.jsdelivr.net/npm/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js
bash
https://unpkg.com/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js

使用 ​

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
@@ -103,7 +103,7 @@
         type: 'currentTime',
         data: art.currentTime,
     });
-});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
+});

例子 ​

最常遇到的问题是,播放器在 iframe.html 里进行网页全屏,但在 index.html 是不生效的,这时候只要监听 iframe.html 里的 fullscreenWeb 事件并通知到 index.html 即可

html
<!DOCTYPE html>
 <html>
     <head>
         <title>ArtPlayer</title>
@@ -184,7 +184,7 @@
         </script>
     </body>
 </html>
- + \ No newline at end of file diff --git a/docs/document/start/i18n.html b/docs/document/start/i18n.html index 491597250..f1b61aa1d 100644 --- a/docs/document/start/i18n.html +++ b/docs/document/start/i18n.html @@ -11,7 +11,7 @@ - + @@ -22,7 +22,7 @@ container: '.artplayer-app', url: '/assets/sample/video.mp4', lang: 'zh-cn', // or 'en' -});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

手动导入的语言有: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
+});

导入语言 ​

打包前的语言文件存放于: artplayer/src/i18n/*.js, 欢迎来添加你的语言

打包后的语言文件存放于: artplayer/dist/i18n/*.js

手动导入的语言有: cs, es, fa, fr, id, pl, ru, zh-tw

js
import id from 'artplayer/dist/i18n/id.js';
 import zhTw from 'artplayer/dist/i18n/zh-tw.js';
 
 var art = new Artplayer({
@@ -70,7 +70,7 @@
         },
     },
 });
- + \ No newline at end of file diff --git a/docs/document/start/option.html b/docs/document/start/option.html index 611cafe58..512d93d66 100644 --- a/docs/document/start/option.html +++ b/docs/document/start/option.html @@ -398,7 +398,7 @@ // }, });
- + \ No newline at end of file diff --git a/i18n/cs.js b/i18n/cs.js new file mode 100644 index 000000000..e617889c5 --- /dev/null +++ b/i18n/cs.js @@ -0,0 +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" +} + +export default cs; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-cs'] = cs; +} \ No newline at end of file diff --git a/i18n/es.js b/i18n/es.js new file mode 100644 index 000000000..00d96adcd --- /dev/null +++ b/i18n/es.js @@ -0,0 +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" +} + +export default es; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-es'] = es; +} \ No newline at end of file diff --git a/i18n/fa.js b/i18n/fa.js new file mode 100644 index 000000000..fba62b29c --- /dev/null +++ b/i18n/fa.js @@ -0,0 +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": "عدم پشتیبانی از ایرپلی" +} + +export default fa; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-fa'] = fa; +} \ No newline at end of file diff --git a/i18n/fr.js b/i18n/fr.js new file mode 100644 index 000000000..91ea12c05 --- /dev/null +++ b/i18n/fr.js @@ -0,0 +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" +} + +export default fr; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-fr'] = fr; +} \ No newline at end of file diff --git a/i18n/id.js b/i18n/id.js new file mode 100644 index 000000000..cb9f210ac --- /dev/null +++ b/i18n/id.js @@ -0,0 +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" +} + +export default id; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-id'] = id; +} \ No newline at end of file diff --git a/i18n/index.js b/i18n/index.js new file mode 100644 index 000000000..fb0715be2 --- /dev/null +++ b/i18n/index.js @@ -0,0 +1,30 @@ +import { mergeDeep } from '../utils'; +import zhCn from './zh-cn'; + +export default class I18n { + constructor(art) { + this.art = art; + + this.languages = { + 'zh-cn': zhCn, + }; + + this.language = {}; + + this.update(art.option.i18n); + } + + init() { + const lang = this.art.option.lang.toLowerCase(); + this.language = this.languages[lang] ?? {}; + } + + get(key) { + return this.language[key] ?? key; + } + + update(value) { + this.languages = mergeDeep(this.languages, value); + this.init(); + } +} diff --git a/i18n/pl.js b/i18n/pl.js new file mode 100644 index 000000000..7b6711494 --- /dev/null +++ b/i18n/pl.js @@ -0,0 +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" +} + +export default pl; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-pl'] = pl; +} \ No newline at end of file diff --git a/i18n/ru.js b/i18n/ru.js new file mode 100644 index 000000000..5a1a120cb --- /dev/null +++ b/i18n/ru.js @@ -0,0 +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 недоступен" +} + +export default ru; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-ru'] = ru; +} \ No newline at end of file diff --git a/i18n/tr.js b/i18n/tr.js new file mode 100644 index 000000000..4adce12a2 --- /dev/null +++ b/i18n/tr.js @@ -0,0 +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" +} + +export default tr; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-tr'] = tr; +} \ No newline at end of file diff --git a/i18n/zh-cn.js b/i18n/zh-cn.js new file mode 100644 index 000000000..5a76b7341 --- /dev/null +++ b/i18n/zh-cn.js @@ -0,0 +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": "隔空播放不可用" +} + +export default zhCn; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-zh-cn'] = zhCn; +} \ No newline at end of file diff --git a/i18n/zh-tw.js b/i18n/zh-tw.js new file mode 100644 index 000000000..3b91a6a77 --- /dev/null +++ b/i18n/zh-tw.js @@ -0,0 +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": "隔空播放不可用" +} + +export default zhTw; + +if (typeof window !== 'undefined') { + window['artplayer-i18n-zh-tw'] = zhTw; +} \ No newline at end of file diff --git a/lerna-debug.log b/lerna-debug.log index f24903db2..eba1d7eb7 100644 --- a/lerna-debug.log +++ b/lerna-debug.log @@ -33,75 +33,70 @@ 22 silly hasDependencyInstalled artplayer-packages @parcel/reporter-cli 23 silly hasDependencyInstalled artplayer-packages @parcel/transformer-inline-string 24 silly hasDependencyInstalled artplayer-packages @parcel/transformer-less -25 silly hasDependencyInstalled artplayer-packages @parcel/transformer-vue -26 silly hasDependencyInstalled artplayer-packages artplayer -27 silly hasDependencyInstalled artplayer-packages cpy -28 silly hasDependencyInstalled artplayer-packages cross-env -29 silly hasDependencyInstalled artplayer-packages cross-spawn -30 silly hasDependencyInstalled artplayer-packages eslint -31 silly hasDependencyInstalled artplayer-packages glob -32 silly hasDependencyInstalled artplayer-packages lerna -33 silly hasDependencyInstalled artplayer-packages prettier -34 silly hasDependencyInstalled artplayer-packages prompts -35 silly hasDependencyInstalled artplayer-packages servor -36 silly hasDependencyInstalled artplayer-packages workbox-build -37 silly hasDependencyInstalled artplayer-packages flexsearch -38 silly hasDependencyInstalled artplayer-packages markdown-it -39 silly hasDependencyInstalled artplayer-packages vitepress -40 silly hasDependencyInstalled artplayer-packages vitepress-plugin-search -41 silly hasDependencyInstalled artplayer-packages vue -42 silly hasDependencyInstalled artplayer-packages option-validator -43 silly root dependencies {} -44 silly leaf dependencies {} -45 info Installing external dependencies -46 verbose actions 2 actions, concurrency 8 -47 info hoist Installing hoisted dependencies into root -48 silly npmInstallDependencies artplayer-packages [ -48 silly npmInstallDependencies '@babel/eslint-parser@^7.22.11', -48 silly npmInstallDependencies '@babel/preset-react@^7.22.5', -48 silly npmInstallDependencies '@parcel/config-default@^2.9.3', -48 silly npmInstallDependencies '@parcel/core@^2.9.3', -48 silly npmInstallDependencies '@parcel/optimizer-data-url@^2.9.3', -48 silly npmInstallDependencies '@parcel/reporter-cli@^2.9.3', -48 silly npmInstallDependencies '@parcel/transformer-inline-string@^2.9.3', -48 silly npmInstallDependencies '@parcel/transformer-less@^2.9.3', -48 silly npmInstallDependencies '@parcel/transformer-vue@^2.9.3', -48 silly npmInstallDependencies 'artplayer@latest', -48 silly npmInstallDependencies 'cpy@^10.1.0', -48 silly npmInstallDependencies 'cross-env@^7.0.3', -48 silly npmInstallDependencies 'cross-spawn@^7.0.3', -48 silly npmInstallDependencies 'eslint@^8.48.0', -48 silly npmInstallDependencies 'glob@^10.3.3', -48 silly npmInstallDependencies 'lerna@^6.6.2', -48 silly npmInstallDependencies 'prettier@^3.0.2', -48 silly npmInstallDependencies 'prompts@^2.4.2', -48 silly npmInstallDependencies 'servor@^4.0.2', -48 silly npmInstallDependencies 'workbox-build@^7.0.0', -48 silly npmInstallDependencies 'flexsearch@^0.7.31', -48 silly npmInstallDependencies 'markdown-it@^13.0.1', -48 silly npmInstallDependencies 'vitepress@^1.0.0-alpha.73', -48 silly npmInstallDependencies 'vitepress-plugin-search@^1.0.4-alpha.20', -48 silly npmInstallDependencies 'vue@^3.2.47', -48 silly npmInstallDependencies 'option-validator@^2.0.6' -48 silly npmInstallDependencies ] -49 silly npmInstallDependencies backup /Users/zhaohaiwei/Desktop/github/ArtPlayer/package.json -50 info hoist Pruning hoisted dependencies -51 silly prune [ -51 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/flexsearch', -51 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/markdown-it', -51 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress', -51 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress-plugin-search', -51 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vue', -51 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer/node_modules/option-validator' -51 silly prune ] -52 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/flexsearch -53 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/markdown-it -54 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress -55 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress-plugin-search -56 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vue -57 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer/node_modules/option-validator -58 verbose prune /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer/node_modules/option-validator -59 error AssertionError [ERR_ASSERTION]: rimraf: callback function required -59 error at rimraf (/Users/zhaohaiwei/Desktop/github/ArtPlayer/node_modules/rimraf/rimraf.js:56:10) -59 error at rimrafDir (/Users/zhaohaiwei/Desktop/github/ArtPlayer/node_modules/@lerna/legacy-package-management/dist/index.js:3575:56) -59 error at concurrency (/Users/zhaohaiwei/Desktop/github/ArtPlayer/node_modules/@lerna/legacy-package-management/dist/index.js:4371:42) +25 silly hasDependencyInstalled artplayer-packages cpy +26 silly hasDependencyInstalled artplayer-packages cross-env +27 silly hasDependencyInstalled artplayer-packages cross-spawn +28 silly hasDependencyInstalled artplayer-packages eslint +29 silly hasDependencyInstalled artplayer-packages glob +30 silly hasDependencyInstalled artplayer-packages lerna +31 silly hasDependencyInstalled artplayer-packages prettier +32 silly hasDependencyInstalled artplayer-packages prompts +33 silly hasDependencyInstalled artplayer-packages servor +34 silly hasDependencyInstalled artplayer-packages workbox-build +35 silly hasDependencyInstalled artplayer-packages flexsearch +36 silly hasDependencyInstalled artplayer-packages markdown-it +37 silly hasDependencyInstalled artplayer-packages vitepress +38 silly hasDependencyInstalled artplayer-packages vitepress-plugin-search +39 silly hasDependencyInstalled artplayer-packages vue +40 silly hasDependencyInstalled artplayer-packages option-validator +41 silly root dependencies {} +42 silly leaf dependencies {} +43 info Installing external dependencies +44 verbose actions 2 actions, concurrency 8 +45 info hoist Installing hoisted dependencies into root +46 silly npmInstallDependencies artplayer-packages [ +46 silly npmInstallDependencies '@babel/eslint-parser@^7.22.11', +46 silly npmInstallDependencies '@babel/preset-react@^7.22.5', +46 silly npmInstallDependencies '@parcel/config-default@2.8.3', +46 silly npmInstallDependencies '@parcel/core@2.8.3', +46 silly npmInstallDependencies '@parcel/optimizer-data-url@2.8.3', +46 silly npmInstallDependencies '@parcel/reporter-cli@2.8.3', +46 silly npmInstallDependencies '@parcel/transformer-inline-string@2.8.3', +46 silly npmInstallDependencies '@parcel/transformer-less@2.8.3', +46 silly npmInstallDependencies 'cpy@^10.1.0', +46 silly npmInstallDependencies 'cross-env@^7.0.3', +46 silly npmInstallDependencies 'cross-spawn@^7.0.3', +46 silly npmInstallDependencies 'eslint@^8.48.0', +46 silly npmInstallDependencies 'glob@^10.3.3', +46 silly npmInstallDependencies 'lerna@^6.6.2', +46 silly npmInstallDependencies 'prettier@^3.0.2', +46 silly npmInstallDependencies 'prompts@^2.4.2', +46 silly npmInstallDependencies 'servor@^4.0.2', +46 silly npmInstallDependencies 'workbox-build@^7.0.0', +46 silly npmInstallDependencies 'flexsearch@^0.7.31', +46 silly npmInstallDependencies 'markdown-it@^13.0.1', +46 silly npmInstallDependencies 'vitepress@^1.0.0-alpha.73', +46 silly npmInstallDependencies 'vitepress-plugin-search@^1.0.4-alpha.20', +46 silly npmInstallDependencies 'vue@^3.2.47', +46 silly npmInstallDependencies 'option-validator@^2.0.6' +46 silly npmInstallDependencies ] +47 silly npmInstallDependencies backup /Users/zhaohaiwei/Desktop/github/ArtPlayer/package.json +48 info hoist Pruning hoisted dependencies +49 silly prune [ +49 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/flexsearch', +49 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/markdown-it', +49 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress', +49 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress-plugin-search', +49 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vue', +49 silly prune '/Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer/node_modules/option-validator' +49 silly prune ] +50 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/flexsearch +51 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/markdown-it +52 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress +53 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vitepress-plugin-search +54 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer-vitepress/node_modules/vue +55 silly rimrafDir /Users/zhaohaiwei/Desktop/github/ArtPlayer/packages/artplayer/node_modules/option-validator +56 error AssertionError [ERR_ASSERTION]: rimraf: callback function required +56 error at rimraf (/Users/zhaohaiwei/Desktop/github/ArtPlayer/node_modules/rimraf/rimraf.js:56:10) +56 error at rimrafDir (/Users/zhaohaiwei/Desktop/github/ArtPlayer/node_modules/@lerna/legacy-package-management/dist/index.js:3575:56) +56 error at concurrency (/Users/zhaohaiwei/Desktop/github/ArtPlayer/node_modules/@lerna/legacy-package-management/dist/index.js:4371:42) diff --git a/package.json b/package.json index b31fcf4ef..bb1f740c8 100644 --- a/package.json +++ b/package.json @@ -34,14 +34,12 @@ "dependencies": { "@babel/eslint-parser": "^7.22.11", "@babel/preset-react": "^7.22.5", - "@parcel/config-default": "^2.9.3", - "@parcel/core": "^2.9.3", - "@parcel/optimizer-data-url": "^2.9.3", - "@parcel/reporter-cli": "^2.9.3", - "@parcel/transformer-inline-string": "^2.9.3", - "@parcel/transformer-less": "^2.9.3", - "@parcel/transformer-vue": "^2.9.3", - "artplayer": "latest", + "@parcel/config-default": "2.8.3", + "@parcel/core": "2.8.3", + "@parcel/optimizer-data-url": "2.8.3", + "@parcel/reporter-cli": "2.8.3", + "@parcel/transformer-inline-string": "2.8.3", + "@parcel/transformer-less": "2.8.3", "cpy": "^10.1.0", "cross-env": "^7.0.3", "cross-spawn": "^7.0.3", diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js index 0fe41a104..c5e66adba 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.js @@ -4,28 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,n,l,t,i){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var i="function"==typeof a[t]&&a[t];if(!l&&i)return i(n,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(r)return r(n,!0);// Try the node require function if it exists. -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;sr);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),i=t[0],a=t[1]/100;l(i+a>=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,v=null,x=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 C(){j||(j=!0,function(){n.template.$ads=u(l,'
'),y=u(n.template.$ads,e.video?``:`
${e.html}
`),x=u(n.template.$ads,'
'),u(x,d),g=s(".artplayer-plugin-ads-close",f=u(n.template.$ads,`
-
${e.playDuration<=0?e.i18n.close:P(e.playDuration,e.i18n.canBeClosed)}
-
${P(e.totalDuration,e.i18n.countdown)}
-
`)),m=s(".artplayer-plugin-ads-countdown",f),e.playDuration>=e.totalDuration&&c(g,"display","none"),n.proxy(g,"click",()=>{D&&$()}),v=u(n.template.$ads,`
-
${e.i18n.detail}
-
-
-
`);let r=s(".artplayer-plugin-ads-detail",v),p=s(".artplayer-plugin-ads-muted",v),h=s(".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){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(v,"display","flex"),c(x,"display","none")})):(k(),c(f,"display","flex"),c(v,"display","flex"),c(x,"display","none")),n.proxy(document,"visibilitychange",()=>{document.hidden?A():k()}))}return n.on("ready",()=>{n.once("play",C),n.once("video:playing",C)}),{name:"artplayerPluginAds",skip:$,pause:A,play:k}}}if(r.env="production",r.version="2.0.0",r.build="2023-08-26 13:44:44","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){let e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=r)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l){n.exports=".artplayer-plugin-ads{z-index:150;width:100%;height:100%;color:#fff;background-color:#000;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{width:100%;height:100%;justify-content:center;align-items:center;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach(function(l){"default"===l||"__esModule"===l||n.hasOwnProperty(l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})}),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0"); \ No newline at end of file +!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{!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,'
'),y=u(n.template.$ads,e.video?``:`
${e.html}
`),x=u(n.template.$ads,'
'),u(x,d),f=u(n.template.$ads,`
${e.playDuration<=0?e.i18n.close:$(e.playDuration,e.i18n.canBeClosed)}
${$(e.totalDuration,e.i18n.countdown)}
`),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,`
${e.i18n.detail}
`);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,r.env="production",r.version="2.0.0",r.build="2023-08-26 16:47:27","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){const e=document.createElement("style");e.id="artplayer-plugin-ads",e.textContent=a.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginAds=r)},{"bundle-text:./style.less":"jDrWj","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jDrWj:[function(e,n,l){n.exports=".artplayer-plugin-ads{z-index:150;width:100%;height:100%;color:#fff;background-color:#000;font-size:13px;line-height:1;position:absolute;inset:0;overflow:hidden}.artplayer-plugin-ads .artplayer-plugin-ads-html{width:100%;height:100%;justify-content:center;align-items:center;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-video{width:100%;height:100%}.artplayer-plugin-ads .artplayer-plugin-ads-timer{display:none;position:absolute;top:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-timer>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:#00000080;border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}"},{}],"9pCYc":[function(e,n,l){l.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},l.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},l.exportAll=function(e,n){return Object.keys(e).forEach((function(l){"default"===l||"__esModule"===l||n.hasOwnProperty(l)||Object.defineProperty(n,l,{enumerable:!0,get:function(){return e[l]}})})),n},l.export=function(e,n,l){Object.defineProperty(e,n,{enumerable:!0,get:l})}},{}]},["hUYA0"],"hUYA0","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js index 2b7bc8d54..338246bcc 100644 --- a/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js +++ b/packages/artplayer-plugin-ads/dist/artplayer-plugin-ads.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,n,t,r,l){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var l="function"==typeof i[r]&&i[r];if(!t&&l)return l(n,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(n,!0);// Try the node require function if it exists. -if(s&&"string"==typeof n)return s(n);var p=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=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,d=s.volume,p=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,w=null,j=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?j.innerHTML=C(n,e.i18n.canBeClosed):(j.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,'
'),b=h(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),O=h(n.template.$ads,'
'),h(O,f),j=v(".artplayer-plugin-ads-close",w=h(n.template.$ads,'
'.concat(e.playDuration<=0?e.i18n.close:C(e.playDuration,e.i18n.canBeClosed),'
').concat(C(e.totalDuration,e.i18n.countdown),"
"))),_=v(".artplayer-plugin-ads-countdown",w),e.playDuration>=e.totalDuration&&x(j,"display","none"),n.proxy(j,"click",function(){M&&L()});var t=v(".artplayer-plugin-ads-detail",D=h(n.template.$ads,'
'.concat(e.i18n.detail,'
'))),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,d),o=h(r,p);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(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")})):(T(),x(w,"display","flex"),x(D,"display","flex"),x(O,"display","none")),n.proxy(document,"visibilitychange",function(){document.hidden?F():T()}))}return n.on("ready",function(){n.once("play",U),n.once("video:playing",U)}),{name:"artplayerPluginAds",skip:L,pause:F,play:T}}}if(o.env="production",o.version="2.0.0",o.build="2023-08-26 13:44:46","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var s=document.createElement("style");s.id="artplayer-plugin-ads",s.textContent=a.default,document.head.appendChild(s)}"undefined"!=typeof window&&(window.artplayerPluginAds=o)},{"@swc/helpers/_/_object_spread":"9agdF","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"_object_spread",function(){return i}),r.export(t,"_",function(){return i});var l=e("./_define_property.js");function i(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0"); \ No newline at end of file +!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=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,j=null,w=null,_=0,D=null,O=!1,P=!1,k=!1;function I(e,n){return n.replace("%s",e)}function L(){O=!0,n.play(),e.video&&v.pause(),m(n.template.$ads,"display","none"),n.emit("artplayerPluginAds:skip",e)}function A(){O||(D=setTimeout((function(){_+=1;var n=e.playDuration-_;n>=1?x.innerHTML=I(n,e.i18n.canBeClosed):(x.innerHTML=e.i18n.close,k||(k=!0)),b.innerHTML=I(e.totalDuration-_,e.i18n.countdown),_>=e.totalDuration?L():A()}),1e3))}function M(){O||clearTimeout(D)}function C(){P||(P=!0,function(){n.template.$ads=g(t,'
'),v=g(n.template.$ads,e.video?''):'
'.concat(e.html,"
")),w=g(n.template.$ads,'
'),g(w,p),h=g(n.template.$ads,'
'.concat(e.playDuration<=0?e.i18n.close:I(e.playDuration,e.i18n.canBeClosed),'
').concat(I(e.totalDuration,e.i18n.countdown),"
")),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&&L()})),j=g(n.template.$ads,'
'.concat(e.i18n.detail,'
'));var r=y(".artplayer-plugin-ads-detail",j),i=y(".artplayer-plugin-ads-muted",j),s=y(".artplayer-plugin-ads-fullscreen",j);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),_=g(s,d);m(_,"display","none"),n.proxy(s,"click",(function(){n.fullscreen=!n.fullscreen,n.fullscreen?(m(f,"display","inline-flex"),m(_,"display","none")):(m(f,"display","none"),m(_,"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",L),n.proxy(v,"loadedmetadata",(function(){A(),v.play(),m(h,"display","flex"),m(j,"display","flex"),m(w,"display","none")}))):(A(),m(h,"display","flex"),m(j,"display","flex"),m(w,"display","none")),n.proxy(document,"visibilitychange",(function(){document.hidden?M():A()})))}return n.on("ready",(function(){n.once("play",C),n.once("video:playing",C)})),{name:"artplayerPluginAds",skip:L,pause:M,play:A}}}if(t.default=s,s.env="production",s.version="2.0.0",s.build="2023-08-26 16:47:27","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-ads")){var d=document.createElement("style");d.id="artplayer-plugin-ads",d.textContent=o.default,document.head.appendChild(d)}"undefined"!=typeof window&&(window.artplayerPluginAds=s)},{"@swc/helpers/src/_object_spread.mjs":"1LSQ7","bundle-text:./style.less":"1LZhU","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1LSQ7":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"default",(function(){return l._}));var l=e("../esm/_object_spread.js")},{"../esm/_object_spread.js":"9agdF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,n,t){var r=e("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(t),r.export(t,"_object_spread",(function(){return i})),r.export(t,"_",(function(){return i}));var l=e("./_define_property.js");function i(e){for(var n=1;ndiv{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control{display:none;position:absolute;bottom:10px;right:10px}.artplayer-plugin-ads .artplayer-plugin-ads-control>div{cursor:pointer;background-color:rgba(0,0,0,.5);border-radius:15px;align-items:center;margin-left:5px;padding:5px 10px;display:flex}.artplayer-plugin-ads .artplayer-plugin-ads-control .art-icon svg{width:20px;height:20px}.artplayer-plugin-ads .artplayer-plugin-ads-loading{width:100%;height:100%;justify-content:center;align-items:center;display:flex;position:absolute;top:0;bottom:0;left:0;right:0}"},{}]},["69VIU"],"69VIU","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-plugin-control/dist/artplayer-plugin-control.js b/packages/artplayer-plugin-control/dist/artplayer-plugin-control.js index 5e6dd673b..a13b4d2d1 100644 --- a/packages/artplayer-plugin-control/dist/artplayer-plugin-control.js +++ b/packages/artplayer-plugin-control/dist/artplayer-plugin-control.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,o,n){/* eslint-disable no-undef */var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof l[o]&&l[o],i=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof l[o]&&l[o];if(!r&&n)return n(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -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(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=a,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var c=0;ca);var n=e("bundle-text:./style.less"),l=o.interopDefault(n);function a(){return e=>{!function(e){let{version:t,utils:{errorHandle:r}}=e.constructor,o=t.split(".").map(Number),n=o[0],l=o[1]/100;r(n+l>=5,`Artplayer.js@${t} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(e);let{template:{$bottom:t,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:l,removeClass:i,hasClass:u,isMobile:p}}}=e;if(p)return;let c="artplayer-plugin-control";l(r,c);let d=o(t,'
'),s=o(t,'
'),f=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t{d.innerText=n(e.currentTime),s.innerText=n(e.duration)});return{name:"artplayerPluginControl",get enable(){return u(r,c)},set enable(state){state?l(r,c):i(r,c)}}}}if(a.env="production",a.version="2.0.0",a.build="2023-08-26 13:44:42","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){let e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=l.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(e,t,r){t.exports=".artplayer-plugin-control{--art-control-height:46px;--art-control-icon-scale:1.1}.artplayer-plugin-control .apa-control-current,.artplayer-plugin-control .apa-control-duration{display:flex}.artplayer-plugin-control .art-control-time,.artplayer-plugin-control .art-controls-center{display:none}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control .art-bottom{height:70px;width:400px;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;align-items:center;margin-left:-200px;inset:auto auto 10px 50%;overflow:visible;box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%}.artplayer-plugin-control .art-bottom .art-controls{width:100%}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;font-size:12px;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[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})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0"); \ No newline at end of file +!function(e,t,r,o,n){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},a="function"==typeof l[o]&&l[o],i=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){var n="function"==typeof l[o]&&l[o];if(!r&&n)return n(t,!0);if(a)return a(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=a,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return l[o]}}),l[o]=p;for(var c=0;c{!function(e){const{version:t,utils:{errorHandle:r}}=e.constructor,o=t.split(".").map(Number);r(o[0]+o[1]/100>=5,`Artplayer.js@${t} is not compatible the artplayerPluginControl@${a.version}. Please update it to version Artplayer.js@5.x.x`)}(e);const{template:{$bottom:t,$player:r},constructor:{utils:{append:o,secondToTime:n,addClass:l,removeClass:i,hasClass:u,isMobile:p}}}=e;if(p)return;const c="artplayer-plugin-control";l(r,c);const d=o(t,'
'),s=o(t,'
'),f=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t{d.innerText=n(e.currentTime),s.innerText=n(e.duration)}));return{name:"artplayerPluginControl",get enable(){return u(r,c)},set enable(e){e?l(r,c):i(r,c)}}}}if(r.default=a,a.env="production",a.version="2.0.0",a.build="2023-08-26 16:47:26","undefined"!=typeof document&&!document.getElementById("artplayer-plugin-control")){const e=document.createElement("style");e.id="artplayer-plugin-control",e.textContent=l.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.artplayerPluginControl=a)},{"bundle-text:./style.less":"klrMD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],klrMD:[function(e,t,r){t.exports=".artplayer-plugin-control{--art-control-height:46px;--art-control-icon-scale:1.1}.artplayer-plugin-control .apa-control-current,.artplayer-plugin-control .apa-control-duration{display:flex}.artplayer-plugin-control .art-control-time,.artplayer-plugin-control .art-controls-center{display:none}.artplayer-plugin-control .art-settings{bottom:85px}.artplayer-plugin-control .art-bottom{height:70px;width:400px;-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3;background-image:none;border-radius:10px;align-items:center;margin-left:-200px;inset:auto auto 10px 50%;overflow:visible;box-shadow:0 10px 15px -3px #0003,0 4px 6px -4px #0003}.artplayer-plugin-control .art-bottom .art-progress{width:70%}.artplayer-plugin-control .art-bottom .art-controls{width:100%}.artplayer-plugin-control .art-bottom .apa-control-current,.artplayer-plugin-control .art-bottom .apa-control-duration{width:15%;justify-content:center;font-size:12px;line-height:1;display:flex;position:absolute;top:10px}.artplayer-plugin-control .art-bottom .apa-control-current{left:0}.artplayer-plugin-control .art-bottom .apa-control-duration{right:0}.apa-control-current,.apa-control-duration{display:none}"},{}],"9pCYc":[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})}},{}]},["16V0T"],"16V0T","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-plugin-control/dist/artplayer-plugin-control.legacy.js b/packages/artplayer-plugin-control/dist/artplayer-plugin-control.legacy.js index 54bde0a10..c83690b3e 100644 --- a/packages/artplayer-plugin-control/dist/artplayer-plugin-control.legacy.js +++ b/packages/artplayer-plugin-control/dist/artplayer-plugin-control.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,o,n){/* eslint-disable no-undef */var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},l="function"==typeof a[o]&&a[o],i=l.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function p(t,r){if(!i[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof a[o]&&a[o];if(!r&&n)return n(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -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(r){var o=e[t][1][r];return null!=o?o:r},s.cache={};var d=i[t]=new p.Module(t);e[t][0].call(d.exports,s,d,d.exports,this)}return i[t].exports;function s(e){var t=s.resolve(e);return!1===t?{}:p(t)}}p.isParcelRequire=!0,p.Module=function(e){this.id=e,this.bundle=p,this.exports={}},p.modules=e,p.cache=i,p.parent=l,p.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(p,"root",{get:function(){return a[o]}}),a[o]=p;for(var c=0;c=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginControl@").concat(l.version,". Please update it to version Artplayer.js@5.x.x"));var t,r,o,n=e.template,a=n.$bottom,i=n.$player,u=e.constructor.utils,p=u.append,c=u.secondToTime,d=u.addClass,s=u.removeClass,f=u.hasClass;if(!u.isMobile){var y="artplayer-plugin-control";d(i,y);for(var g=p(a,'
'),b=p(a,'
'),m=["video:loadedmetadata","video:timeupdate","video:progress"],x=0;x=5,"Artplayer.js@".concat(r," is not compatible the artplayerPluginControl@").concat(l.version,". Please update it to version Artplayer.js@5.x.x"))}(e);var t=e.template,r=t.$bottom,o=t.$player,n=e.constructor.utils,a=n.append,i=n.secondToTime,u=n.addClass,p=n.removeClass,c=n.hasClass;if(!n.isMobile){var d="artplayer-plugin-control";u(o,d);for(var s=a(r,'
'),f=a(r,'
'),y=["video:loadedmetadata","video:timeupdate","video:progress"],g=0;g numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(t,e,i,r,n){/* eslint-disable no-undef */var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof a[r]&&a[r],o=s.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,i){if(!o[e]){if(!t[e]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof a[r]&&a[r];if(!i&&n)return n(e,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(s)return s(e,!0);// Try the node require function if it exists. -if(l&&"string"==typeof e)return l(e);var d=Error("Cannot find module '"+e+"'");throw d.code="MODULE_NOT_FOUND",d}p.resolve=function(i){var r=t[e][1][i];return null!=r?r:i},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,i){t[e]=[function(t,e){e.exports=i},{}]},Object.defineProperty(u,"root",{get:function(){return a[r]}}),a[r]=u;for(var d=0;dd);var n=t("./danmuku"),a=r.interopDefault(n),s=t("./setting"),o=r.interopDefault(s),l=t("./heatmap"),u=r.interopDefault(l);function d(t){return e=>{!function(t){let{version:e,utils:{errorHandle:i}}=t.constructor,r=e.split(".").map(Number),n=r[0],a=r[1]/100;i(n+a>=5,`Artplayer.js@${e} 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上`)}(e);let i=new a.default(e,t);return(0,o.default)(e,i),t.heatmap&&(0,u.default)(e,i,t.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),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}d.env="production",d.version="5.0.1",d.build="2023-08-26 13:44:38","undefined"!=typeof window&&(window.artplayerPluginDanmuku=d)},{"./danmuku":"4ns48","./setting":"lO8OT","./heatmap":"8AxLD","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4ns48":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i);var n=t("./bilibili"),a=t("./getDanmuTop"),s=r.interopDefault(a);class o{constructor(e,i){let{constructor:r,template:n}=e;if(this.utils=r.utils,this.validator=r.validator,this.$danmuku=n.$danmuku,this.$player=n.$player,this.art=e,this.danmus=[],this.queue=[],this.option={},this.$refs=[],this.isStop=!1,this.isHide=!1,this.timer=null,this.config(i),this.option.useWorker)try{this.worker=new Worker(t("e55e9b30c441298a"))}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(){let{clamp:t}=this.utils,e=this.option.margin[0],{clientHeight:i}=this.$player;if("number"==typeof e)return t(e,0,i);if("string"==typeof e&&e.endsWith("%")){let r=parseFloat(e)/100;return t(i*r,0,i)}return o.option.margin[0]}get marginBottom(){let{clamp:t}=this.utils,e=this.option.margin[1],{clientHeight:i}=this.$player;if("number"==typeof e)return t(e,0,i);if("string"==typeof e&&e.endsWith("%")){let r=parseFloat(e)/100;return t(i*r,0,i)}return o.option.margin[1]}filter(t,e){return this.queue.filter(e=>e.$state===t).map(e)}getLeft(t){let e=t.getBoundingClientRect();return this.isRotate?e.top:e.left}getRef(){let t=this.$refs.pop();if(t)return t;let e=document.createElement("div");return e.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; - `,e}getReady(){let{currentTime:t}=this.art;return this.queue.filter(e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1)}getEmits(){let t=[],{clientWidth:e}=this.$player,i=this.getLeft(this.$player);return this.filter("emit",r=>{let n=r.$ref.offsetTop,a=this.getLeft(r.$ref)-i,s=r.$ref.clientHeight,o=r.$ref.clientWidth,l=a+o,u=e-l,d=l/r.$restTime,m={};m.top=n,m.left=a,m.height=s,m.width=o,m.right=u,m.speed=d,m.distance=l,m.time=r.$restTime,m.mode=r.mode,t.push(m)}),t}getFontSize(t){let{clamp:e}=this.utils,{clientHeight:i}=this.$player;if("number"==typeof t)return e(t,12,i);if("string"==typeof t&&t.endsWith("%")){let r=parseFloat(t)/100;return e(i*r,12,i)}return o.option.fontSize}postMessage(t={}){return new Promise(e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=i=>{let{data:r}=i;r.id===t.id&&e(r)};else{let i=(0,s.default)(t);e({top:i})}})}async load(){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,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(t=>this.emit(t))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){let{clamp:e}=this.utils;return this.option=Object.assign({},o.option,this.option,t),this.validator(this.option,o.scheme),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(Math.floor(this.option.lockTime),0,60),this.option.maxLength=e(this.option.maxLength,0,500),this.option.minWidth=e(this.option.minWidth,0,500),this.option.maxWidth=e(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){let{clientWidth:t}=this.$player;return this.filter("stop",e=>{if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){let i=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`}}),this}suspend(){let{clientWidth:t}=this.$player;return this.filter("emit",e=>{if(e.$state="stop",0===e.mode){let i=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-i}px)`,e.$ref.style.transition="transform 0s linear 0s"}}),this}reset(){return this.queue.forEach(t=>this.makeWait(t)),this}update(){return this.timer=window.requestAnimationFrame(async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",t=>{let e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)});let t=this.getReady(),{clientWidth:e,clientHeight:i}=this.$player;for(let r=0;rthis.makeWait(t)),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)&&(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+.5,void 0===t.mode&&(t.mode=this.option.mode),void 0===t.color&&(t.color=this.option.color),this.queue.push({...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0})),this}destroy(){this.stop(),this.worker&&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),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}i.default=o},{"./bilibili":"f83sx","./getDanmuTop":"jPSuD",e55e9b30c441298a:"fXq73","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function a(t){if("string"!=typeof t)return[];let e=t.matchAll(/(?.+?)<\/d>/gs);return Array.from(e).map(t=>{let e=t.groups.p.split(",");if(!(e.length>=8))return null;{let i=t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&");return{text:i,time:Number(e[0]),mode:n(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}}).filter(Boolean)}function s(t){return fetch(t).then(t=>t.text()).then(t=>a(t))}r.defineInteropFlag(i),r.export(i,"getMode",()=>n),r.export(i,"bilibiliDanmuParseFromXml",()=>a),r.export(i,"bilibiliDanmuParseFromUrl",()=>s)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,i){i.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},i.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.exportAll=function(t,e){return Object.keys(t).forEach(function(i){"default"===i||"__esModule"===i||e.hasOwnProperty(i)||Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[i]}})}),e},i.export=function(t,e,i){Object.defineProperty(t,e,{enumerable:!0,get:i})}},{}],jPSuD:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");function n({target:t,emits:e,clientWidth:i,clientHeight:r,marginBottom:n,marginTop:a,antiOverlap:s}){let o=e.filter(e=>e.mode===t.mode&&e.top<=r-n).sort((t,e)=>t.top-e.top);if(0===o.length)return a;o.unshift({top:0,left:0,right:0,height:a,width:i,speed:0,distance:i}),o.push({top:r-n,left:0,right:0,height:n,width:i,speed:0,distance:i});for(let e=1;e=t.height)return n}let l=[];for(let t=1;te.every(e=>{if(ie.time}));return e&&e[0]?e[0].top:void 0}case 1:return}else{switch(t.mode){case 0:l.sort((t,e)=>{let i=Math.min(...e.map(t=>t.right)),r=Math.min(...t.map(t=>t.right));return i*e.length-r*t.length});break;case 1:l.sort((t,e)=>{let i=Math.max(...e.map(t=>t.width)),r=Math.max(...t.map(t=>t.width));return r*t.length-i*e.length})}return l[0][0].top}}r.defineInteropFlag(i),r.export(i,"default",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fXq73:[function(t,e,i){e.exports="data:application/javascript,onmessage%3De%3D%3E%7Blet%7Bdata%3At%7D%3De%2Ch%3Dfunction%28%7Btarget%3Ae%2Cemits%3At%2CclientWidth%3Ah%2CclientHeight%3Ai%2CmarginBottom%3Ar%2CmarginTop%3As%2CantiOverlap%3An%7D%29%7Blet%20l%3Dt.filter%28t%3D%3Et.mode%3D%3D%3De.mode%26%26t.top%3C%3Di-r%29.sort%28%28e%2Ct%29%3D%3Ee.top-t.top%29%3Bif%280%3D%3D%3Dl.length%29return%20s%3Bl.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3Ah%2Cspeed%3A0%2Cdistance%3Ah%7D%29%2Cl.push%28%7Btop%3Ai-r%2Cleft%3A0%2Cright%3A0%2Cheight%3Ar%2Cwidth%3Ah%2Cspeed%3A0%2Cdistance%3Ah%7D%29%3Bfor%28let%20t%3D1%3Bt%3Cl.length%3Bt%2B%3D1%29%7Blet%20h%3Dl%5Bt%5D%2Ci%3Dl%5Bt-1%5D%2Cr%3Di.top%2Bi.height%2Cs%3Dh.top-r%3Bif%28s%3E%3De.height%29return%20r%7Dlet%20p%3D%5B%5D%3Bfor%28let%20e%3D1%3Be%3Cl.length-1%3Be%2B%3D1%29%7Blet%20t%3Dl%5Be%5D%3Bif%28p.length%29%7Blet%20e%3Dp%5Bp.length-1%5D%3Be%5B0%5D.top%3D%3D%3Dt.top%3Fe.push%28t%29%3Ap.push%28%5Bt%5D%29%7Delse%20p.push%28%5Bt%5D%29%7Dif%28n%29switch%28e.mode%29%7Bcase%200%3A%7Blet%20t%3Dp.find%28t%3D%3Et.every%28t%3D%3E%7Bif%28h%3Ct.distance%29return%211%3Bif%28e.speed%3Ct.speed%29return%210%3Blet%20i%3Dt.right%2F%28e.speed-t.speed%29%3Breturn%20i%3Et.time%7D%29%29%3Breturn%20t%26%26t%5B0%5D%3Ft%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7Delse%7Bswitch%28e.mode%29%7Bcase%200%3Ap.sort%28%28e%2Ct%29%3D%3E%7Blet%20h%3DMath.min%28...t.map%28e%3D%3Ee.right%29%29%2Ci%3DMath.min%28...e.map%28e%3D%3Ee.right%29%29%3Breturn%20h%2at.length-i%2ae.length%7D%29%3Bbreak%3Bcase%201%3Ap.sort%28%28e%2Ct%29%3D%3E%7Blet%20h%3DMath.max%28...t.map%28e%3D%3Ee.width%29%29%2Ci%3DMath.max%28...e.map%28e%3D%3Ee.width%29%29%3Breturn%20i%2ae.length-h%2at.length%7D%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7D%7D%28t%29%3Bself.postMessage%28%7Btop%3Ah%2Cid%3At.id%7D%29%7D%3B"},{}],lO8OT:[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"default",()=>f);var n=t("bundle-text:./style.less"),a=r.interopDefault(n),s=t("bundle-text:./img/danmu-on.svg"),o=r.interopDefault(s),l=t("bundle-text:./img/danmu-off.svg"),u=r.interopDefault(l),d=t("bundle-text:./img/danmu-config.svg"),m=r.interopDefault(d),p=t("bundle-text:./img/danmu-style.svg"),h=r.interopDefault(p);function f(t,e){let{option:i}=e,{template:{$controlsCenter:r,$player:n},constructor:{SETTING_ITEM_WIDTH:a,utils:{removeClass:s,addClass:l,append:d,setStyle:p,tooltip:f,query:c,inverseClass:g,getIcon:y}}}=t;p(r,"display","flex");let k=y("danmu-on",o.default),x=y("danmu-off",u.default),b=y("danmu-config",m.default),v=y("danmu-style",h.default);!function(){let a=["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"].map(t=>{let e=i.color===t?" art-current":"";return`
`}),o=d(r,` -
-
-
-
-
-
模式
-
-
滚动
-
静止
-
-
颜色
-
- ${a.join("")} -
-
-
-
- -
-
发送
-
- `),u=c(".art-danmuku-style",o),m=c(".art-danmuku-input",o),h=c(".art-danmuku-send",o),f=c(".art-danmuku-style-panel-inner",o),y=c(".art-danmuku-style-panel-modes",o),k=c(".art-danmuku-style-panel-colors",o),x=i.mount||d(n,'
');t.option.backdrop&&l(f,"art-backdrop-filter"),i.theme&&l(o,`art-danmuku-theme-${i.theme}`);let b=null,w=i.mode,$=i.color;function D(){let r={mode:w,color:$,border:!0,text:m.value.trim()};null===b&&i.beforeEmit(r)&&(m.value="",e.emit(r),l(h,"art-disabled"),function t(e){e<=0?(b=null,h.innerText="发送",s(h,"art-disabled")):(h.innerText=e,b=setTimeout(()=>t(e-1),1e3))}(i.lockTime),t.emit("artplayerPluginDanmuku:emit",r))}function B(){r.clientWidth{"Enter"===t.key&&(t.preventDefault(),D())}),t.proxy(y,"click",t=>{let{dataset:e}=t.target;e.mode&&(w=Number(e.mode),g(t.target,"art-current"))}),t.proxy(k,"click",t=>{let{dataset:e}=t.target;e.color&&($=e.color,g(t.target,"art-current"))}),B(),t.on("resize",()=>{t.isInput||B()}),t.on("destroy",()=>{i.mount&&o.parentElement===i.mount&&i.mount.removeChild(o)})}(),t.controls.add({position:"right",name:"danmuku",click:function(){e.isHide?(e.show(),t.notice.show="弹幕显示",p(k,"display",null),p(x,"display","none")):(e.hide(),t.notice.show="弹幕隐藏",p(k,"display","none"),p(x,"display",null))},mounted(e){d(e,k),d(e,x),f(e,"弹幕开关"),p(x,"display","none"),t.on("artplayerPluginDanmuku:hide",()=>{p(k,"display","none"),p(x,"display",null)}),t.on("artplayerPluginDanmuku:show",()=>{p(k,"display",null),p(x,"display","none")})}}),t.setting.add({width:260,name:"danmuku",html:"弹幕设置",tooltip:"更多",icon:b,selector:[{width:a,html:"播放速度",icon:"",tooltip:"适中",selector:[{html:"极慢",time:10},{html:"较慢",time:7.5},{default:!0,html:"适中",time:5},{html:"较快",time:2.5},{html:"极快",time:1}],onSelect:function(t){return e.config({speed:t.time}),t.html}},{width:a,html:"字体大小",icon:"",tooltip:"适中",selector:[{html:"极小",fontSize:"4%"},{html:"较小",fontSize:"5%"},{default:!0,html:"适中",fontSize:"6%"},{html:"较大",fontSize:"7%"},{html:"极大",fontSize:"8%"}],onSelect:function(t){return e.config({fontSize:t.fontSize}),t.html}},{width:a,html:"不透明度",icon:"",tooltip:"100%",selector:[{default:!0,opacity:1,html:"100%"},{opacity:.75,html:"75%"},{opacity:.5,html:"50%"},{opacity:.25,html:"25%"},{opacity:0,html:"0%"}],onSelect:function(t){return e.config({opacity:t.opacity}),t.html}},{width:a,html:"显示范围",icon:"",tooltip:"3/4",selector:[{html:"1/4",margin:[10,"75%"]},{html:"半屏",margin:[10,"50%"]},{default:!0,html:"3/4",margin:[10,"25%"]},{html:"满屏",margin:[10,10]}],onSelect:function(t){return e.config({margin:t.margin}),t.html}},{html:"弹幕防重叠",icon:"",tooltip:i.antiOverlap?"开启":"关闭",switch:i.antiOverlap,onSwitch:t=>(e.config({antiOverlap:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)},{html:"同步视频速度",icon:"",tooltip:i.synchronousPlayback?"开启":"关闭",switch:i.synchronousPlayback,onSwitch:t=>(e.config({synchronousPlayback:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)}]})}if("undefined"!=typeof document&&!document.getElementById("artplayer-plugin-danmuku")){let t=document.createElement("style");t.id="artplayer-plugin-danmuku",t.textContent=a.default,document.head.appendChild(t)}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/danmu-on.svg":"4KfW9","bundle-text:./img/danmu-off.svg":"9UR3U","bundle-text:./img/danmu-config.svg":"4MPCW","bundle-text:./img/danmu-style.svg":"7lV5Q","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,i){e.exports='.art-danmuku-emitter{height:32px;width:100%;max-width:100%;background-color:#ffffff4d;border-radius:5px;font-size:12px;line-height:1;display:flex;position:relative}.art-danmuku-emitter .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}.art-danmuku-emitter .art-danmuku-left{border-radius:3px 0 0 3px;flex:1;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style{width:32px;justify-content:center;align-items:center;display:flex;position:relative}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{z-index:999;width:200px;padding-bottom:10px;display:none;position:absolute;bottom:30px;left:-85px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner{background-color:#000000e6;border-radius:3px;flex-direction:column;padding:10px 10px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-title{margin-bottom:10px;font-size:13px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes{justify-content:space-between;margin-bottom:15px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode{width:47%;cursor:pointer;color:#fff;border:1px solid #fff;justify-content:center;padding:5px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode.art-current{background-color:#00a1d6;border:1px solid #00a1d6}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors{flex-wrap:wrap;justify-content:space-between;gap:5px;margin-bottom:10px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color{cursor:pointer;width:20px;height:20px;border:1px solid #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current{position:relative;box-shadow:0 0 2px #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current:before{content:"";width:100%;height:100%;border:2px solid #000;position:absolute;inset:0}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style:hover .art-danmuku-style-panel{display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon{opacity:.75;cursor:pointer}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon:hover{opacity:1}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input{width:100%;color:#fff;background-color:#0000;border:none;outline:none;flex:1;padding:0 10px 0 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#ffffff80}.art-danmuku-emitter .art-danmuku-send{width:50px;cursor:pointer;background-color:#00a1d6;border-radius:0 5px 5px 0;justify-content:center;align-items:center;display:flex}.art-danmuku-emitter .art-danmuku-send:hover{background-color:#00b5e5}.art-danmuku-emitter .art-danmuku-send.art-disabled{opacity:.5;pointer-events:none}.art-danmuku-emitter.art-danmuku-mount{max-width:100%!important}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{left:0}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-send{width:60px}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left{background:#f4f4f4;border:1px solid #dadada}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-style .art-icon svg{fill:#666}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input{color:#000}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#00000080}.art-layer-danmuku-emitter{z-index:99;width:100%;position:absolute;bottom:-40px;left:0;right:0}'},{}],"4KfW9":[function(t,e,i){e.exports=''},{}],"9UR3U":[function(t,e,i){e.exports=''},{}],"4MPCW":[function(t,e,i){e.exports=''},{}],"7lV5Q":[function(t,e,i){e.exports=''},{}],"8AxLD":[function(t,e,i){var r=t("@parcel/transformer-js/src/esmodule-helpers.js");r.defineInteropFlag(i),r.export(i,"default",()=>s);let n={map:(t,e,i,r,n)=>(t-e)*(n-r)/(i-e)+r,range(t,e,i){let r=Math.round(t/i)*i;return Array.from({length:Math.floor((e-t)/i)},(t,e)=>e*i+r)}},a=(t,e)=>{let i=e[0]-t[0],r=e[1]-t[1];return{length:Math.sqrt(Math.pow(i,2)+Math.pow(r,2)),angle:Math.atan2(r,i)}};function s(t,e,i){let{query:r}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(s){let o=null,l=null;function u(u=[]){if(o=null,l=null,s.innerHTML="",!t.duration||t.option.isLive)return;let d={w:s.offsetWidth,h:s.offsetHeight},m={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"==typeof i&&Object.assign(m,i);let p=[];if(Array.isArray(u)&&u.length)p=[...u];else{let i=t.duration/d.w;for(let t=0;t<=d.w;t+=m.sampling){let r=e.danmus.filter(({time:e})=>e>t*i&&e<=(t+m.sampling)*i).length;p.push([t,r])}}if(0===p.length)return;let h=p[p.length-1],f=h[0],c=h[1];f!==d.w&&p.push([d.w,c]);let g=p.map(t=>t[1]),y=(Math.min(...g)+Math.max(...g))/2;for(let t=0;ty?1+m.scale:1-m.scale)+m.minHeight}let k=(t,e,i,r)=>{let s=a(e||t,i||t),o=n.map(Math.cos(s.angle)*m.flattening,0,1,1,0),l=s.angle*o+(r?Math.PI:0),u=s.length*m.smoothing,d=t[0]+Math.cos(l)*u,p=t[1]+Math.sin(l)*u;return[d,p]},x=(t,e,i)=>{let r=k(i[e-1],i[e-2],t),n=k(t,i[e-1],i[e+1],!0),a=e===i.length-1?" z":"";return`C ${r[0]},${r[1]} ${n[0]},${n[1]} ${t[0]},${t[1]}${a}`},b=p.map(t=>{let e=n.map(t[0],m.xMin,m.xMax,0,d.w),i=n.map(t[1],m.yMin,m.yMax,d.h,0);return[e,i]}),v=b.reduce((t,e,i,r)=>0===i?`M ${r[r.length-1][0]},${d.h} L ${e[0]},${d.h} L ${e[0]},${e[1]}`:`${t} ${x(e,i,r)}`,"");s.innerHTML=` - - - - - - - - - - - - `,o=r("#heatmap-start",s),l=r("#heatmap-stop",s),o.setAttribute("offset",`${100*t.played}%`),l.setAttribute("offset",`${100*t.played}%`)}t.on("video:timeupdate",()=>{o&&l&&(o.setAttribute("offset",`${100*t.played}%`),l.setAttribute("offset",`${100*t.played}%`))}),t.on("setBar",(t,e)=>{o&&l&&"played"===t&&(o.setAttribute("offset",`${100*e}%`),l.setAttribute("offset",`${100*e}%`))}),t.on("ready",()=>u()),t.on("resize",()=>u()),t.on("artplayerPluginDanmuku:loaded",()=>u()),t.on("artplayerPluginDanmuku:points",t=>u(t))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0"); \ No newline at end of file +!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{!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,d.env="production",d.version="5.0.1",d.build="2023-08-26 16:47:25","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("85d40535eae5f839"))}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 JhengHei", Arial, Helvetica, sans-serif;\n text-shadow: rgb(0, 0, 0) 1px 0px 1px, rgb(0, 0, 0) 0px 1px 1px, rgb(0, 0, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}getReady(){const{currentTime:t}=this.art;return this.queue.filter((e=>"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1))}getEmits(){const t=[],{clientWidth:e}=this.$player,n=this.getLeft(this.$player);return this.filter("emit",(i=>{const r=i.$ref.offsetTop,a=this.getLeft(i.$ref)-n,s=i.$ref.clientHeight,o=i.$ref.clientWidth,l=a+o,u=e-l,d=l/i.$restTime,m={};m.top=r,m.left=a,m.height=s,m.width=o,m.right=u,m.speed=d,m.distance=l,m.time=i.$restTime,m.mode=i.mode,t.push(m)})),t}getFontSize(t){const{clamp:e}=this.utils,{clientHeight:n}=this.$player;if("number"==typeof t)return e(t,12,n);if("string"==typeof t&&t.endsWith("%")){return e(n*(parseFloat(t)/100),12,n)}return o.option.fontSize}postMessage(t={}){return new Promise((e=>{if(this.option.useWorker&&this.worker&&this.worker.postMessage)t.id=Date.now(),this.worker.postMessage(t),this.worker.onmessage=n=>{const{data:i}=n;i.id===t.id&&e(i)};else{const n=(0,s.default)(t);e({top:n})}}))}async load(){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,r.bilibiliDanmuParseFromUrl)(this.option.danmuku):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((t=>this.emit(t)))}catch(t){throw this.art.emit("artplayerPluginDanmuku:error",t),t}return this}config(t){const{clamp:e}=this.utils;return this.option=Object.assign({},o.option,this.option,t),this.validator(this.option,o.scheme),this.option.speed=e(this.option.speed,1,10),this.option.opacity=e(this.option.opacity,0,1),this.option.lockTime=e(Math.floor(this.option.lockTime),0,60),this.option.maxLength=e(this.option.maxLength,0,500),this.option.minWidth=e(this.option.minWidth,0,500),this.option.maxWidth=e(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}makeWait(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}continue(){const{clientWidth:t}=this.$player;return this.filter("stop",(e=>{switch(e.$state="emit",e.$lastStartTime=Date.now(),e.mode){case 0:{const n=t+e.$ref.clientWidth;e.$ref.style.transform=`translateX(${-n}px)`,e.$ref.style.transition=`transform ${e.$restTime}s linear 0s`;break}}})),this}suspend(){const{clientWidth:t}=this.$player;return this.filter("emit",(e=>{switch(e.$state="stop",e.mode){case 0:{const n=t-(this.getLeft(e.$ref)-this.getLeft(this.$player));e.$ref.style.transform=`translateX(${-n}px)`,e.$ref.style.transition="transform 0s linear 0s";break}}})),this}reset(){return this.queue.forEach((t=>this.makeWait(t))),this}update(){return this.timer=window.requestAnimationFrame((async()=>{if(this.art.playing&&!this.isHide){this.filter("emit",(t=>{const e=(Date.now()-t.$lastStartTime)/1e3;t.$restTime-=e,t.$lastStartTime=Date.now(),t.$restTime<=0&&this.makeWait(t)}));const t=this.getReady(),{clientWidth:e,clientHeight:n}=this.$player;for(let i=0;ithis.makeWait(t))),this.$danmuku.style.display="none",this.art.emit("artplayerPluginDanmuku:hide"),this}emit(t){return this.validator(t,{text:"string",mode:"number|undefined",color:"string|undefined",time:"number|undefined",border:"boolean|undefined"}),t.text.trim()&&this.option.filter(t)?(t.time?t.time=this.utils.clamp(t.time,0,1/0):t.time=this.art.currentTime+.5,void 0===t.mode&&(t.mode=this.option.mode),void 0===t.color&&(t.color=this.option.color),this.queue.push({...t,$state:"wait",$ref:null,$restTime:0,$lastStartTime:0}),this):this}destroy(){this.stop(),this.worker&&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),this.art.off("video:waiting",this.stop),this.art.off("resize",this.reset),this.art.off("destroy",this.destroy),this.art.emit("artplayerPluginDanmuku:destroy")}}n.default=o},{"./bilibili":"f83sx","./getDanmuTop":"jPSuD","85d40535eae5f839":"fXq73","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f83sx:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");function r(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function a(t){if("string"!=typeof t)return[];const e=t.matchAll(/(?.+?)<\/d>/gs);return Array.from(e).map((t=>{const e=t.groups.p.split(",");if(e.length>=8){return{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:r(Number(e[1])),fontSize:Number(e[2]),color:`#${Number(e[3]).toString(16)}`,timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}}return null})).filter(Boolean)}function s(t){return fetch(t).then((t=>t.text())).then((t=>a(t)))}i.defineInteropFlag(n),i.export(n,"getMode",(()=>r)),i.export(n,"bilibiliDanmuParseFromXml",(()=>a)),i.export(n,"bilibiliDanmuParseFromUrl",(()=>s))},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9pCYc":[function(t,e,n){n.interopDefault=function(t){return t&&t.__esModule?t:{default:t}},n.defineInteropFlag=function(t){Object.defineProperty(t,"__esModule",{value:!0})},n.exportAll=function(t,e){return Object.keys(t).forEach((function(n){"default"===n||"__esModule"===n||e.hasOwnProperty(n)||Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[n]}})})),e},n.export=function(t,e,n){Object.defineProperty(t,e,{enumerable:!0,get:n})}},{}],jPSuD:[function(t,e,n){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n),n.default=function({target:t,emits:e,clientWidth:n,clientHeight:i,marginBottom:r,marginTop:a,antiOverlap:s}){const o=e.filter((e=>e.mode===t.mode&&e.top<=i-r)).sort(((t,e)=>t.top-e.top));if(0===o.length)return a;o.unshift({top:0,left:0,right:0,height:a,width:n,speed:0,distance:n}),o.push({top:i-r,left:0,right:0,height:r,width:n,speed:0,distance:n});for(let e=1;e=t.height)return r}const l=[];for(let t=1;t{const n=Math.min(...e.map((t=>t.right))),i=Math.min(...t.map((t=>t.right)));return n*e.length-i*t.length}));break;case 1:l.sort(((t,e)=>{const n=Math.max(...e.map((t=>t.width)));return Math.max(...t.map((t=>t.width)))*t.length-n*e.length}))}return l[0][0].top}switch(t.mode){case 0:{const e=l.find((e=>e.every((e=>{if(ne.time}))));return e&&e[0]?e[0].top:void 0}case 1:return}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fXq73:[function(t,e,n){e.exports="data:application/javascript,function%20getDanmuTop%28%7Btarget%3At%2Cemits%3Ae%2CclientWidth%3An%2CclientHeight%3Ai%2CmarginBottom%3As%2CmarginTop%3Ah%2CantiOverlap%3Ao%7D%29%7Bconst%20r%3De.filter%28%28e%3D%3Ee.mode%3D%3D%3Dt.mode%26%26e.top%3C%3Di-s%29%29.sort%28%28%28t%2Ce%29%3D%3Et.top-e.top%29%29%3Bif%280%3D%3D%3Dr.length%29return%20h%3Br.unshift%28%7Btop%3A0%2Cleft%3A0%2Cright%3A0%2Cheight%3Ah%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%2Cr.push%28%7Btop%3Ai-s%2Cleft%3A0%2Cright%3A0%2Cheight%3As%2Cwidth%3An%2Cspeed%3A0%2Cdistance%3An%7D%29%3Bfor%28let%20e%3D1%3Be%3Cr.length%3Be%2B%3D1%29%7Bconst%20n%3Dr%5Be%5D%2Ci%3Dr%5Be-1%5D%2Cs%3Di.top%2Bi.height%3Bif%28n.top-s%3E%3Dt.height%29return%20s%7Dconst%20p%3D%5B%5D%3Bfor%28let%20t%3D1%3Bt%3Cr.length-1%3Bt%2B%3D1%29%7Bconst%20e%3Dr%5Bt%5D%3Bif%28p.length%29%7Bconst%20t%3Dp%5Bp.length-1%5D%3Bt%5B0%5D.top%3D%3D%3De.top%3Ft.push%28e%29%3Ap.push%28%5Be%5D%29%7Delse%20p.push%28%5Be%5D%29%7Dif%28%21o%29%7Bswitch%28t.mode%29%7Bcase%200%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.min%28...e.map%28%28t%3D%3Et.right%29%29%29%2Ci%3DMath.min%28...t.map%28%28t%3D%3Et.right%29%29%29%3Breturn%20n%2ae.length-i%2at.length%7D%29%29%3Bbreak%3Bcase%201%3Ap.sort%28%28%28t%2Ce%29%3D%3E%7Bconst%20n%3DMath.max%28...e.map%28%28t%3D%3Et.width%29%29%29%3Breturn%20Math.max%28...t.map%28%28t%3D%3Et.width%29%29%29%2at.length-n%2ae.length%7D%29%29%7Dreturn%20p%5B0%5D%5B0%5D.top%7Dswitch%28t.mode%29%7Bcase%200%3A%7Bconst%20e%3Dp.find%28%28e%3D%3Ee.every%28%28e%3D%3E%7Bif%28n%3Ce.distance%29return%211%3Bif%28t.speed%3Ce.speed%29return%210%3Breturn%20e.right%2F%28t.speed-e.speed%29%3Ee.time%7D%29%29%29%29%3Breturn%20e%26%26e%5B0%5D%3Fe%5B0%5D.top%3Avoid%200%7Dcase%201%3Areturn%7D%7Donmessage%3Dt%3D%3E%7Bconst%7Bdata%3Ae%7D%3Dt%2Cn%3DgetDanmuTop%28e%29%3Bself.postMessage%28%7Btop%3An%2Cid%3Ae.id%7D%29%7D%3B"},{}],lO8OT:[function(t,e,n){var i=t("@parcel/transformer-js/src/esmodule-helpers.js");i.defineInteropFlag(n);var r=t("bundle-text:./style.less"),a=i.interopDefault(r),s=t("bundle-text:./img/danmu-on.svg"),o=i.interopDefault(s),l=t("bundle-text:./img/danmu-off.svg"),u=i.interopDefault(l),d=t("bundle-text:./img/danmu-config.svg"),m=i.interopDefault(d),p=t("bundle-text:./img/danmu-style.svg"),h=i.interopDefault(p);if(n.default=function(t,e){const{option:n}=e,{template:{$controlsCenter:i,$player:r},constructor:{SETTING_ITEM_WIDTH:a,utils:{removeClass:s,addClass:l,append:d,setStyle:p,tooltip:c,query:f,inverseClass:g,getIcon:y}}}=t;p(i,"display","flex");const k=y("danmu-on",o.default),x=y("danmu-off",u.default),b=y("danmu-config",m.default),v=y("danmu-style",h.default);!function(){const a=["#FE0302","#FF7204","#FFAA02","#FFD302","#FFFF00","#A0EE00","#00CD00","#019899","#4266BE","#89D5FF","#CC0273","#222222","#9B9B9B","#FFFFFF"].map((t=>`
`)),o=d(i,`
模式
滚动
静止
颜色
${a.join("")}
发送
`),u=f(".art-danmuku-style",o),m=f(".art-danmuku-input",o),h=f(".art-danmuku-send",o),c=f(".art-danmuku-style-panel-inner",o),y=f(".art-danmuku-style-panel-modes",o),k=f(".art-danmuku-style-panel-colors",o),x=n.mount||d(r,'
');t.option.backdrop&&l(c,"art-backdrop-filter"),n.theme&&l(o,`art-danmuku-theme-${n.theme}`);let b=null,w=n.mode,$=n.color;function D(t){t<=0?(b=null,h.innerText="发送",s(h,"art-disabled")):(h.innerText=t,b=setTimeout((()=>D(t-1)),1e3))}function B(){const i={mode:w,color:$,border:!0,text:m.value.trim()};null===b&&n.beforeEmit(i)&&(m.value="",e.emit(i),l(h,"art-disabled"),D(n.lockTime),t.emit("artplayerPluginDanmuku:emit",i))}function M(){i.clientWidth{"Enter"===t.key&&(t.preventDefault(),B())})),t.proxy(y,"click",(t=>{const{dataset:e}=t.target;e.mode&&(w=Number(e.mode),g(t.target,"art-current"))})),t.proxy(k,"click",(t=>{const{dataset:e}=t.target;e.color&&($=e.color,g(t.target,"art-current"))})),M(),t.on("resize",(()=>{t.isInput||M()})),t.on("destroy",(()=>{n.mount&&o.parentElement===n.mount&&n.mount.removeChild(o)}))}(),t.controls.add({position:"right",name:"danmuku",click:function(){e.isHide?(e.show(),t.notice.show="弹幕显示",p(k,"display",null),p(x,"display","none")):(e.hide(),t.notice.show="弹幕隐藏",p(k,"display","none"),p(x,"display",null))},mounted(e){d(e,k),d(e,x),c(e,"弹幕开关"),p(x,"display","none"),t.on("artplayerPluginDanmuku:hide",(()=>{p(k,"display","none"),p(x,"display",null)})),t.on("artplayerPluginDanmuku:show",(()=>{p(k,"display",null),p(x,"display","none")}))}}),t.setting.add({width:260,name:"danmuku",html:"弹幕设置",tooltip:"更多",icon:b,selector:[{width:a,html:"播放速度",icon:"",tooltip:"适中",selector:[{html:"极慢",time:10},{html:"较慢",time:7.5},{default:!0,html:"适中",time:5},{html:"较快",time:2.5},{html:"极快",time:1}],onSelect:function(t){return e.config({speed:t.time}),t.html}},{width:a,html:"字体大小",icon:"",tooltip:"适中",selector:[{html:"极小",fontSize:"4%"},{html:"较小",fontSize:"5%"},{default:!0,html:"适中",fontSize:"6%"},{html:"较大",fontSize:"7%"},{html:"极大",fontSize:"8%"}],onSelect:function(t){return e.config({fontSize:t.fontSize}),t.html}},{width:a,html:"不透明度",icon:"",tooltip:"100%",selector:[{default:!0,opacity:1,html:"100%"},{opacity:.75,html:"75%"},{opacity:.5,html:"50%"},{opacity:.25,html:"25%"},{opacity:0,html:"0%"}],onSelect:function(t){return e.config({opacity:t.opacity}),t.html}},{width:a,html:"显示范围",icon:"",tooltip:"3/4",selector:[{html:"1/4",margin:[10,"75%"]},{html:"半屏",margin:[10,"50%"]},{default:!0,html:"3/4",margin:[10,"25%"]},{html:"满屏",margin:[10,10]}],onSelect:function(t){return e.config({margin:t.margin}),t.html}},{html:"弹幕防重叠",icon:"",tooltip:n.antiOverlap?"开启":"关闭",switch:n.antiOverlap,onSwitch:t=>(e.config({antiOverlap:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)},{html:"同步视频速度",icon:"",tooltip:n.synchronousPlayback?"开启":"关闭",switch:n.synchronousPlayback,onSwitch:t=>(e.config({synchronousPlayback:!t.switch}),t.tooltip=t.switch?"关闭":"开启",!t.switch)}]})},"undefined"!=typeof document&&!document.getElementById("artplayer-plugin-danmuku")){const t=document.createElement("style");t.id="artplayer-plugin-danmuku",t.textContent=a.default,document.head.appendChild(t)}},{"bundle-text:./style.less":"hViDo","bundle-text:./img/danmu-on.svg":"4KfW9","bundle-text:./img/danmu-off.svg":"9UR3U","bundle-text:./img/danmu-config.svg":"4MPCW","bundle-text:./img/danmu-style.svg":"7lV5Q","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hViDo:[function(t,e,n){e.exports='.art-danmuku-emitter{height:32px;width:100%;max-width:100%;background-color:#ffffff4d;border-radius:5px;font-size:12px;line-height:1;display:flex;position:relative}.art-danmuku-emitter .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000b3!important}.art-danmuku-emitter .art-danmuku-left{border-radius:3px 0 0 3px;flex:1;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style{width:32px;justify-content:center;align-items:center;display:flex;position:relative}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{z-index:999;width:200px;padding-bottom:10px;display:none;position:absolute;bottom:30px;left:-85px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner{background-color:#000000e6;border-radius:3px;flex-direction:column;padding:10px 10px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-title{margin-bottom:10px;font-size:13px}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes{justify-content:space-between;margin-bottom:15px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode{width:47%;cursor:pointer;color:#fff;border:1px solid #fff;justify-content:center;padding:5px 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-modes .art-danmuku-style-panel-mode.art-current{background-color:#00a1d6;border:1px solid #00a1d6}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors{flex-wrap:wrap;justify-content:space-between;gap:5px;margin-bottom:10px;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color{cursor:pointer;width:20px;height:20px;border:1px solid #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current{position:relative;box-shadow:0 0 2px #fff}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel .art-danmuku-style-panel-inner .art-danmuku-style-panel-colors .art-danmuku-style-panel-color.art-current:before{content:"";width:100%;height:100%;border:2px solid #000;position:absolute;inset:0}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style:hover .art-danmuku-style-panel{display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon{opacity:.75;cursor:pointer}.art-danmuku-emitter .art-danmuku-left .art-danmuku-style .art-icon:hover{opacity:1}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input{width:100%;color:#fff;background-color:#0000;border:none;outline:none;flex:1;padding:0 10px 0 0;display:flex}.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#ffffff80}.art-danmuku-emitter .art-danmuku-send{width:50px;cursor:pointer;background-color:#00a1d6;border-radius:0 5px 5px 0;justify-content:center;align-items:center;display:flex}.art-danmuku-emitter .art-danmuku-send:hover{background-color:#00b5e5}.art-danmuku-emitter .art-danmuku-send.art-disabled{opacity:.5;pointer-events:none}.art-danmuku-emitter.art-danmuku-mount{max-width:100%!important}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-left .art-danmuku-style .art-danmuku-style-panel{left:0}.art-danmuku-emitter.art-danmuku-mount .art-danmuku-send{width:60px}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left{background:#f4f4f4;border:1px solid #dadada}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-style .art-icon svg{fill:#666}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input{color:#000}.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::placeholder,.art-danmuku-emitter.art-danmuku-mount.art-danmuku-theme-light .art-danmuku-left .art-danmuku-input::-webkit-input-placeholder{color:#00000080}.art-layer-danmuku-emitter{z-index:99;width:100%;position:absolute;bottom:-40px;left:0;right:0}'},{}],"4KfW9":[function(t,e,n){e.exports=''},{}],"9UR3U":[function(t,e,n){e.exports=''},{}],"4MPCW":[function(t,e,n){e.exports=''},{}],"7lV5Q":[function(t,e,n){e.exports=''},{}],"8AxLD":[function(t,e,n){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(n);const i={map:(t,e,n,i,r)=>(t-e)*(r-i)/(n-e)+i,range(t,e,n){const i=Math.round(t/n)*n;return Array.from({length:Math.floor((e-t)/n)},((t,e)=>e*n+i))}};n.default=function(t,e,n){const{query:r}=t.constructor.utils;t.controls.add({name:"heatmap",position:"top",html:"",style:{position:"absolute",top:"-100px",left:"0px",right:"0px",height:"100px",width:"100%",pointerEvents:"none"},mounted(a){let s=null,o=null;function l(l=[]){if(s=null,o=null,a.innerHTML="",!t.duration||t.option.isLive)return;const u={w:a.offsetWidth,h:a.offsetHeight},d={xMin:0,xMax:u.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*u.h),sampling:Math.floor(u.w/100),smoothing:.2,flattening:.2};"object"==typeof n&&Object.assign(d,n);let m=[];if(Array.isArray(l)&&l.length)m=[...l];else{const n=t.duration/u.w;for(let t=0;t<=u.w;t+=d.sampling){const i=e.danmus.filter((({time:e})=>e>t*n&&e<=(t+d.sampling)*n)).length;m.push([t,i])}}if(0===m.length)return;const p=m[m.length-1],h=p[0],c=p[1];h!==u.w&&m.push([u.w,c]);const f=m.map((t=>t[1])),g=(Math.min(...f)+Math.max(...f))/2;for(let t=0;tg?1+d.scale:1-d.scale)+d.minHeight}const y=(t,e,n,r)=>{const a=((t,e)=>{const n=e[0]-t[0],i=e[1]-t[1];return{length:Math.sqrt(Math.pow(n,2)+Math.pow(i,2)),angle:Math.atan2(i,n)}})(e||t,n||t),s=i.map(Math.cos(a.angle)*d.flattening,0,1,1,0),o=a.angle*s+(r?Math.PI:0),l=a.length*d.smoothing;return[t[0]+Math.cos(o)*l,t[1]+Math.sin(o)*l]},k=m.map((t=>[i.map(t[0],d.xMin,d.xMax,0,u.w),i.map(t[1],d.yMin,d.yMax,u.h,0)])).reduce(((t,e,n,i)=>0===n?`M ${i[i.length-1][0]},${u.h} L ${e[0]},${u.h} L ${e[0]},${e[1]}`:`${t} ${((t,e,n)=>{const i=y(n[e-1],n[e-2],t),r=y(t,n[e-1],n[e+1],!0),a=e===n.length-1?" z":"";return`C ${i[0]},${i[1]} ${r[0]},${r[1]} ${t[0]},${t[1]}${a}`})(e,n,i)}`),"");a.innerHTML=``,s=r("#heatmap-start",a),o=r("#heatmap-stop",a),s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%")}t.on("video:timeupdate",(()=>{s&&o&&(s.setAttribute("offset",100*t.played+"%"),o.setAttribute("offset",100*t.played+"%"))})),t.on("setBar",((t,e)=>{s&&o&&"played"===t&&(s.setAttribute("offset",100*e+"%"),o.setAttribute("offset",100*e+"%"))})),t.on("ready",(()=>l())),t.on("resize",(()=>l())),t.on("artplayerPluginDanmuku:loaded",(()=>l())),t.on("artplayerPluginDanmuku:points",(t=>l(t)))}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["bgm6t"],"bgm6t","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js index f31294a29..743519ed9 100644 --- a/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js +++ b/packages/artplayer-plugin-danmuku/dist/artplayer-plugin-danmuku.legacy.js @@ -4,35 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(t,e,r,n,a){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var a="function"==typeof o[n]&&o[n];if(!r&&a)return a(e,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(e,!0);// Try the node require function if it exists. -if(s&&"string"==typeof e)return s(e);var c=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=5,"Artplayer.js@".concat(n," 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上"));var r,n,a,i=new o.default(e,t);return(0,u.default)(e,i),t.heatmap&&(0,l.default)(e,i,t.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),get option(){return i.option},get isHide(){return i.isHide},get isStop(){return i.isStop}}}}c.env="production",c.version="5.0.1",c.build="2023-08-26 13:44:41","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 d});var a=t("@swc/helpers/_/_async_to_generator"),o=t("@swc/helpers/_/_class_call_check"),i=t("@swc/helpers/_/_create_class"),u=t("@swc/helpers/_/_object_spread"),s=t("@swc/helpers/_/_object_spread_props"),l=t("@swc/helpers/_/_ts_generator"),c=t("./bilibili"),p=t("./getDanmuTop"),f=n.interopDefault(p),d=/*#__PURE__*/function(){function e(r,n){(0,o._)(this,e);var a=r.constructor,i=r.template;if(this.utils=a.utils,this.validator=a.validator,this.$danmuku=i.$danmuku,this.$player=i.$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("e55e9b30c441298a"))}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,i._)(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, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}},{key:"getReady",value:function(){var t=this.art.currentTime;return this.queue.filter(function(e){return"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1})}},{key:"getEmits",value:function(){var t=this,e=[],r=this.$player.clientWidth,n=this.getLeft(this.$player);return this.filter("emit",function(a){var o=a.$ref.offsetTop,i=t.getLeft(a.$ref)-n,u=a.$ref.clientHeight,s=a.$ref.clientWidth,l=i+s,c=r-l,p=l/a.$restTime,f={};f.top=o,f.left=i,f.height=u,f.width=s,f.right=c,f.speed=p,f.distance=l,f.time=a.$restTime,f.mode=a.mode,e.push(f)}),e}},{key:"getFontSize",value:function(t){var r=this.utils.clamp,n=this.$player.clientHeight;return"number"==typeof t?r(t,12,n):"string"==typeof t&&t.endsWith("%")?r(n*(parseFloat(t)/100),12,n):e.option.fontSize}},{key:"postMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this;return new Promise(function(r){e.option.useWorker&&e.worker&&e.worker.postMessage?(t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var n=e.data;n.id===t.id&&r(n)}):r({top:(0,f.default)(t)})})}},{key:"load",value:function(){var t=this;return(0,a._)(function(){var e;return(0,l._)(this,function(r){switch(r.label){case 0:if(r.trys.push([0,8,,9]),"function"!=typeof t.option.danmuku)return[3,2];return[4,t.option.danmuku()];case 1:case 3:case 5:return t.danmus=r.sent(),[3,7];case 2:if("function"!=typeof t.option.danmuku.then)return[3,4];return[4,t.option.danmuku];case 4:if("string"!=typeof t.option.danmuku)return[3,6];return[4,(0,c.bilibiliDanmuParseFromUrl)(t.option.danmuku)];case 6:t.danmus=t.option.danmuku,r.label=7;case 7:return t.utils.errorHandle(Array.isArray(t.danmus),"Danmuku need return an array as result"),t.art.emit("artplayerPluginDanmuku:loaded",t.danmus),t.queue=[],t.$danmuku.innerText="",t.danmus.forEach(function(e){return t.emit(e)}),[3,9];case 8:throw e=r.sent(),t.art.emit("artplayerPluginDanmuku:error",e),e;case 9:return[2,t]}})})()}},{key:"config",value:function(t){var r=this.utils.clamp;return this.option=Object.assign({},e.option,this.option,t),this.validator(this.option,e.scheme),this.option.speed=r(this.option.speed,1,10),this.option.opacity=r(this.option.opacity,0,1),this.option.lockTime=r(Math.floor(this.option.lockTime),0,60),this.option.maxLength=r(this.option.maxLength,0,500),this.option.minWidth=r(this.option.minWidth,0,500),this.option.maxWidth=r(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}},{key:"makeWait",value:function(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}},{key:"continue",value:function(){var t=this.$player.clientWidth;return this.filter("stop",function(e){if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){var r=t+e.$ref.clientWidth;e.$ref.style.transform="translateX(".concat(-r,"px)"),e.$ref.style.transition="transform ".concat(e.$restTime,"s linear 0s")}}),this}},{key:"suspend",value:function(){var t=this,e=this.$player.clientWidth;return this.filter("emit",function(r){if(r.$state="stop",0===r.mode){var n=e-(t.getLeft(r.$ref)-t.getLeft(t.$player));r.$ref.style.transform="translateX(".concat(-n,"px)"),r.$ref.style.transition="transform 0s linear 0s"}}),this}},{key:"reset",value:function(){var t=this;return this.queue.forEach(function(e){return t.makeWait(e)}),this}},{key:"update",value:function(){var t=this;return this.timer=window.requestAnimationFrame(/*#__PURE__*/(0,a._)(function(){var e,r,n,a,o,i,u,s,c;return(0,l._)(this,function(l){switch(l.label){case 0:if(!(t.art.playing&&!t.isHide))return[3,4];t.filter("emit",function(e){var r=(Date.now()-e.$lastStartTime)/1e3;e.$restTime-=r,e.$lastStartTime=Date.now(),e.$restTime<=0&&t.makeWait(e)}),e=t.getReady(),n=(r=t.$player).clientWidth,a=r.clientHeight,o=0,l.label=1;case 1:if(!(oe.indexOf(n)&&(r[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var a=0,n=Object.getOwnPropertySymbols(t);ae.indexOf(n[a])&&Object.prototype.propertyIsEnumerable.call(t,n[a])&&(r[n[a]]=t[n[a]]);return r}function l(t,e,r,n){var a,o=arguments.length,i=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(t,e,r,n);else for(var u=t.length-1;u>=0;u--)(a=t[u])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i}function c(t,e){return function(r,n){e(r,n,t)}}function p(t,e,r,n,a,o){function i(t){if(void 0!==t&&"function"!=typeof t)throw TypeError("Function expected");return t}for(var u,s=n.kind,l="getter"===s?"get":"setter"===s?"set":"value",c=!e&&t?n.static?t:t.prototype:null,p=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var m={};for(var h in n)m[h]="access"===h?{}:n[h];for(var h in n.access)m.access[h]=n.access[h];m.addInitializer=function(t){if(f)throw TypeError("Cannot add initializers after decoration has completed");o.push(i(t||null))};var y=(0,r[d])("accessor"===s?{get:p.get,set:p.set}:p[l],m);if("accessor"===s){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw TypeError("Object expected");(u=i(y.get))&&(p.get=u),(u=i(y.set))&&(p.set=u),(u=i(y.init))&&a.push(u)}else(u=i(y))&&("field"===s?a.push(u):p[l]=u)}c&&Object.defineProperty(c,n.name,p),f=!0}function f(t,e,r){for(var n=arguments.length>2,a=0;a0&&a[a.length-1])&&(6===u[0]||2===u[0])){i=0;continue}if(3===u[0]&&(!a||u[1]>a[0]&&u[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function _(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,a,o=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function x(){for(var t=[],e=0;e1||u(t,e)})})}function u(t,e){try{var r;(r=a[t](e)).value instanceof j?Promise.resolve(r.value.v).then(s,l):c(o[0][2],r)}catch(t){c(o[0][3],t)}}function s(t){u("next",t)}function l(t){u("throw",t)}function c(t,e){t(e),o.shift(),o.length&&u(o[0][0],o[0][1])}}function B(t){var e,r;return e={},n("next"),n("throw",function(t){throw t}),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,a){e[n]=t[n]?function(e){return(r=!r)?{value:j(t[n](e)),done:!1}:a?a(e):e}:a}}function O(t){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=k(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise(function(n,a){!function(t,e,r,n){Promise.resolve(n).then(function(e){t({value:e,done:r})},e)}(n,a,(e=t[r](e)).done,e.value)})}}}function S(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var $=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function F(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&v(e,t,r);return $(e,t),e}function A(t){return t&&t.__esModule?t:{default:t}}function P(t,e,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function M(t,e,r,n,a){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!a)throw TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(t,r):a?a.value=r:e.set(t,r),r}function T(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function o(t){return"string"!=typeof t?[]:Array.from(t.matchAll(RegExp('(?.+?)<\\/d>',"gs"))).map(function(t){var e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:a(Number(e[1])),fontSize:Number(e[2]),color:"#".concat(Number(e[3]).toString(16)),timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null}).filter(Boolean)}function i(t){return fetch(t).then(function(t){return t.text()}).then(function(t){return o(t)})}n.defineInteropFlag(r),n.export(r,"getMode",function(){return a}),n.export(r,"bilibiliDanmuParseFromXml",function(){return o}),n.export(r,"bilibiliDanmuParseFromUrl",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fdr65:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return o});var a=t("@swc/helpers/_/_to_consumable_array");function o(t){var e=t.target,r=t.emits,n=t.clientWidth,o=t.clientHeight,i=t.marginBottom,u=t.marginTop,s=t.antiOverlap,l=r.filter(function(t){return t.mode===e.mode&&t.top<=o-i}).sort(function(t,e){return t.top-e.top});if(0===l.length)return u;l.unshift({top:0,left:0,right:0,height:u,width:n,speed:0,distance:n}),l.push({top:o-i,left:0,right:0,height:i,width:n,speed:0,distance:n});for(var c=1;c=e.height)return d}for(var m=[],h=1;ht.time)})});return v&&v[0]?v[0].top:void 0;case 1:return}else{switch(e.mode){case 0:m.sort(function(t,e){var r,n,o=(r=Math).min.apply(r,(0,a._)(e.map(function(t){return t.right}))),i=(n=Math).min.apply(n,(0,a._)(t.map(function(t){return t.right})));return o*e.length-i*t.length});break;case 1:m.sort(function(t,e){var r,n,o=(r=Math).max.apply(r,(0,a._)(e.map(function(t){return t.width})));return(n=Math).max.apply(n,(0,a._)(t.map(function(t){return t.width})))*t.length-o*e.length})}return m[0][0].top}}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iwLF0:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",function(){return s}),n.export(r,"_",function(){return s});var a=t("./_array_without_holes.js"),o=t("./_iterable_to_array.js"),i=t("./_non_iterable_spread.js"),u=t("./_unsupported_iterable_to_array.js");function s(t){return(0,a._array_without_holes)(t)||(0,o._iterable_to_array)(t)||(0,u._unsupported_iterable_to_array)(t)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",function(){return o}),n.export(r,"_",function(){return o});var a=t("./_array_like_to_array.js");function o(t){if(Array.isArray(t))return(0,a._array_like_to_array)(t)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r
')}),i=h(a,'
模式
滚动
静止
颜色
').concat(n.join(""),'
发送
')),u=v(".art-danmuku-style",i),s=v(".art-danmuku-input",i),l=v(".art-danmuku-send",i),c=v(".art-danmuku-style-panel-inner",i),p=v(".art-danmuku-style-panel-modes",i),d=v(".art-danmuku-style-panel-colors",i),g=r.mount||h(o,'
');t.option.backdrop&&m(c,"art-backdrop-filter"),r.theme&&m(i,"art-danmuku-theme-".concat(r.theme));var k=null,_=r.mode,x=r.color;function w(){var n={mode:_,color:x,border:!0,text:s.value.trim()};null===k&&r.beforeEmit(n)&&(s.value="",e.emit(n),m(l,"art-disabled"),function t(e){e<=0?(k=null,l.innerText="发送",f(l,"art-disabled")):(l.innerText=e,k=setTimeout(function(){return t(e-1)},1e3))}(r.lockTime),t.emit("artplayerPluginDanmuku:emit",n))}function j(){a.clientWidth0&&void 0!==arguments[0]?arguments[0]:[];if(s=null,l=null,u.innerHTML="",t.duration&&!t.option.isLive){var d={w:u.offsetWidth,h:u.offsetHeight},m={xMin:0,xMax:d.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*d.h),sampling:Math.floor(d.w/100),smoothing:.2,flattening:.2};"object"==typeof r&&Object.assign(m,r);var h=[];if(Array.isArray(f)&&f.length)h=(0,a._)(f);else for(var y=function(t){var r=e.danmus.filter(function(e){var r=e.time;return r>t*g&&r<=(t+m.sampling)*g}).length;h.push([t,r])},g=t.duration/d.w,v=0;v<=d.w;v+=m.sampling)y(v);if(0!==h.length){var b=h[h.length-1],k=b[0],_=b[1];k!==d.w&&h.push([d.w,_]);for(var x=h.map(function(t){return t[1]}),w=((c=Math).min.apply(c,(0,a._)(x))+(p=Math).max.apply(p,(0,a._)(x)))/2,D=0;Dw?1+m.scale:1-m.scale)+m.minHeight}var B=function(t,e,r,n){var a=i(e||t,r||t),u=o.map(Math.cos(a.angle)*m.flattening,0,1,1,0),s=a.angle*u+(n?Math.PI:0),l=a.length*m.smoothing;return[t[0]+Math.cos(s)*l,t[1]+Math.sin(s)*l]},O=function(t,e,r){var n=B(r[e-1],r[e-2],t),a=B(t,r[e-1],r[e+1],!0),o=e===r.length-1?" z":"";return"C ".concat(n[0],",").concat(n[1]," ").concat(a[0],",").concat(a[1]," ").concat(t[0],",").concat(t[1]).concat(o)},S=h.map(function(t){return[o.map(t[0],m.xMin,m.xMax,0,d.w),o.map(t[1],m.yMin,m.yMax,d.h,0)]}).reduce(function(t,e,r,n){return 0===r?"M ".concat(n[n.length-1][0],",").concat(d.h," L ").concat(e[0],",").concat(d.h," L ").concat(e[0],",").concat(e[1]):"".concat(t," ").concat(O(e,r,n))},"");u.innerHTML=''),s=n("#heatmap-start",u),l=n("#heatmap-stop",u),s.setAttribute("offset","".concat(100*t.played,"%")),l.setAttribute("offset","".concat(100*t.played,"%"))}}}t.on("video:timeupdate",function(){s&&l&&(s.setAttribute("offset","".concat(100*t.played,"%")),l.setAttribute("offset","".concat(100*t.played,"%")))}),t.on("setBar",function(t,e){s&&l&&"played"===t&&(s.setAttribute("offset","".concat(100*e,"%")),l.setAttribute("offset","".concat(100*e,"%")))}),t.on("ready",function(){return c()}),t.on("resize",function(){return c()}),t.on("artplayerPluginDanmuku:loaded",function(){return c()}),t.on("artplayerPluginDanmuku:points",function(t){return c(t)})}})}},{"@swc/helpers/_/_to_consumable_array":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); \ No newline at end of file +!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],s=i.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function l(e,r){if(!s[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(u&&"string"==typeof e)return u(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=s[e]=new l.Module(e);t[e][0].call(p.exports,f,p,p.exports,this)}return s[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=s,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=5,"Artplayer.js@".concat(r," 不兼容该弹幕库,请更新到 Artplayer.js@5.x.x 版本以上"))}(e);var r=new(0,o.default)(e,t);return(0,s.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,c.env="production",c.version="5.0.1",c.build="2023-08-26 16:47:25","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"),s=n.interopDefault(i),u=t("@swc/helpers/src/_create_class.mjs"),l=n.interopDefault(u),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,s.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("85d40535eae5f839"))}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, 0) 0px -1px 1px, rgb(0, 0, 0) -1px 0px 1px;\n ',e}},{key:"getReady",value:function(){var t=this.art.currentTime;return this.queue.filter((function(e){return"ready"===e.$state||"wait"===e.$state&&t+.1>=e.time&&e.time>=t-.1}))}},{key:"getEmits",value:function(){var t=this,e=[],r=this.$player.clientWidth,n=this.getLeft(this.$player);return this.filter("emit",(function(a){var o=a.$ref.offsetTop,i=t.getLeft(a.$ref)-n,s=a.$ref.clientHeight,u=a.$ref.clientWidth,l=i+u,c=r-l,p=l/a.$restTime,f={};f.top=o,f.left=i,f.height=s,f.width=u,f.right=c,f.speed=p,f.distance=l,f.time=a.$restTime,f.mode=a.mode,e.push(f)})),e}},{key:"getFontSize",value:function(t){var r=this.utils.clamp,n=this.$player.clientHeight;return"number"==typeof t?r(t,12,n):"string"==typeof t&&t.endsWith("%")?r(n*(parseFloat(t)/100),12,n):e.option.fontSize}},{key:"postMessage",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this;return new Promise((function(r){if(e.option.useWorker&&e.worker&&e.worker.postMessage)t.id=Date.now(),e.worker.postMessage(t),e.worker.onmessage=function(e){var n=e.data;n.id===t.id&&r(n)};else{var n=(0,v.default)(t);r({top:n})}}))}},{key:"load",value:function(){var t=this;return(0,o.default)((function(){var e;return(0,h.default)(this,(function(r){switch(r.label){case 0:return r.trys.push([0,8,,9]),"function"!=typeof t.option.danmuku?[3,2]:[4,t.option.danmuku()];case 1:return t.danmus=r.sent(),[3,7];case 2:return"function"!=typeof t.option.danmuku.then?[3,4]:[4,t.option.danmuku];case 3:return t.danmus=r.sent(),[3,7];case 4:return"string"!=typeof t.option.danmuku?[3,6]:[4,(0,y.bilibiliDanmuParseFromUrl)(t.option.danmuku)];case 5:return t.danmus=r.sent(),[3,7];case 6:t.danmus=t.option.danmuku,r.label=7;case 7:return t.utils.errorHandle(Array.isArray(t.danmus),"Danmuku need return an array as result"),t.art.emit("artplayerPluginDanmuku:loaded",t.danmus),t.queue=[],t.$danmuku.innerText="",t.danmus.forEach((function(e){return t.emit(e)})),[3,9];case 8:throw e=r.sent(),t.art.emit("artplayerPluginDanmuku:error",e),e;case 9:return[2,t]}}))}))()}},{key:"config",value:function(t){var r=this.utils.clamp;return this.option=Object.assign({},e.option,this.option,t),this.validator(this.option,e.scheme),this.option.speed=r(this.option.speed,1,10),this.option.opacity=r(this.option.opacity,0,1),this.option.lockTime=r(Math.floor(this.option.lockTime),0,60),this.option.maxLength=r(this.option.maxLength,0,500),this.option.minWidth=r(this.option.minWidth,0,500),this.option.maxWidth=r(this.option.maxWidth,0,1/0),t.fontSize&&(this.option.fontSize=this.getFontSize(this.option.fontSize),this.reset()),this.art.emit("artplayerPluginDanmuku:config",this.option),this}},{key:"makeWait",value:function(t){t.$state="wait",t.$ref&&(t.$ref.style.visibility="hidden",t.$ref.style.marginLeft="0px",t.$ref.style.transform="translateX(0px)",t.$ref.style.transition="transform 0s linear 0s",this.$refs.push(t.$ref),t.$ref=null)}},{key:"continue",value:function(){var t=this.$player.clientWidth;return this.filter("stop",(function(e){if(e.$state="emit",e.$lastStartTime=Date.now(),0===e.mode){var r=t+e.$ref.clientWidth;e.$ref.style.transform="translateX(".concat(-r,"px)"),e.$ref.style.transition="transform ".concat(e.$restTime,"s linear 0s")}})),this}},{key:"suspend",value:function(){var t=this,e=this.$player.clientWidth;return this.filter("emit",(function(r){if(r.$state="stop",0===r.mode){var n=e-(t.getLeft(r.$ref)-t.getLeft(t.$player));r.$ref.style.transform="translateX(".concat(-n,"px)"),r.$ref.style.transition="transform 0s linear 0s"}})),this}},{key:"reset",value:function(){var t=this;return this.queue.forEach((function(e){return t.makeWait(e)})),this}},{key:"update",value:function(){var t=this;return this.timer=window.requestAnimationFrame((0,o.default)((function(){var e,r,n,a,o,i,s,u,l;return(0,h.default)(this,(function(c){switch(c.label){case 0:if(!t.art.playing||t.isHide)return[3,4];t.filter("emit",(function(e){var r=(Date.now()-e.$lastStartTime)/1e3;e.$restTime-=r,e.$lastStartTime=Date.now(),e.$restTime<=0&&t.makeWait(e)})),e=t.getReady(),r=t.$player,n=r.clientWidth,a=r.clientHeight,o=0,c.label=1;case 1:return o=0;s--)(a=t[s])&&(i=(o<3?a(i):o>3?a(e,r,i):a(e,r))||i);return o>3&&i&&Object.defineProperty(e,r,i),i}function p(t,e){return function(r,n){e(r,n,t)}}function f(t,e,r,n,a,o){function i(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var s,u=n.kind,l="getter"===u?"get":"setter"===u?"set":"value",c=!e&&t?n.static?t:t.prototype:null,p=e||(c?Object.getOwnPropertyDescriptor(c,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var m={};for(var h in n)m[h]="access"===h?{}:n[h];for(var h in n.access)m.access[h]=n.access[h];m.addInitializer=function(t){if(f)throw new TypeError("Cannot add initializers after decoration has completed");o.push(i(t||null))};var y=(0,r[d])("accessor"===u?{get:p.get,set:p.set}:p[l],m);if("accessor"===u){if(void 0===y)continue;if(null===y||"object"!=typeof y)throw new TypeError("Object expected");(s=i(y.get))&&(p.get=s),(s=i(y.set))&&(p.set=s),(s=i(y.init))&&a.push(s)}else(s=i(y))&&("field"===u?a.push(s):p[l]=s)}c&&Object.defineProperty(c,n.name,p),f=!0}function d(t,e,r){for(var n=arguments.length>2,a=0;a0&&a[a.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!a||s[1]>a[0]&&s[1]=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,a,o=r.call(t),i=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(t){a={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(a)throw a.error}}return i}function x(){for(var t=[],e=0;e1||s(t,e)}))})}function s(t,e){try{(r=a[t](e)).value instanceof C?Promise.resolve(r.value.v).then(u,l):c(o[0][2],r)}catch(t){c(o[0][3],t)}var r}function u(t){s("next",t)}function l(t){s("throw",t)}function c(t,e){t(e),o.shift(),o.length&&s(o[0][0],o[0][1])}}function O(t){var e,r;return e={},n("next"),n("throw",(function(t){throw t})),n("return"),e[Symbol.iterator]=function(){return this},e;function n(n,a){e[n]=t[n]?function(e){return(r=!r)?{value:C(t[n](e)),done:!1}:a?a(e):e}:a}}function B(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=k(t),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(r){e[r]=t[r]&&function(e){return new Promise((function(n,a){(function(t,e,r,n){Promise.resolve(n).then((function(e){t({value:e,done:r})}),e)})(n,a,(e=t[r](e)).done,e.value)}))}}}function A(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var $=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function F(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&b(e,t,r);return $(e,t),e}function P(t){return t&&t.__esModule?t:{default:t}}function W(t,e,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(t):n?n.value:e.get(t)}function T(t,e,r,n,a){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!a)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?a.call(t,r):a?a.value=r:e.set(t,r),r}function M(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}},{"@swc/helpers/src/_type_of.mjs":"78qx0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"78qx0":[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return a._}));var a=t("../esm/_type_of.js")},{"../esm/_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t&&"undefined"!=typeof Symbol&&t.constructor===Symbol?"symbol":typeof t}n.defineInteropFlag(r),n.export(r,"_type_of",(function(){return a})),n.export(r,"_",(function(){return a}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],kMsXR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){switch(t){case 1:case 2:case 3:default:return 0;case 4:case 5:return 1}}function o(t){if("string"!=typeof t)return[];var e=t.matchAll(RegExp('(?.+?)<\\/d>',"gs"));return Array.from(e).map((function(t){var e=t.groups.p.split(",");return e.length>=8?{text:t.groups.text.trim().replaceAll(""",'"').replaceAll("'","'").replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"),time:Number(e[0]),mode:a(Number(e[1])),fontSize:Number(e[2]),color:"#".concat(Number(e[3]).toString(16)),timestamp:Number(e[4]),pool:Number(e[5]),userID:e[6],rowID:Number(e[7])}:null})).filter(Boolean)}function i(t){return fetch(t).then((function(t){return t.text()})).then((function(t){return o(t)}))}n.defineInteropFlag(r),n.export(r,"getMode",(function(){return a})),n.export(r,"bilibiliDanmuParseFromXml",(function(){return o})),n.export(r,"bilibiliDanmuParseFromUrl",(function(){return i}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fdr65:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var a=t("@swc/helpers/src/_to_consumable_array.mjs"),o=n.interopDefault(a);r.default=function(t){var e=t.target,r=t.emits,n=t.clientWidth,a=t.clientHeight,i=t.marginBottom,s=t.marginTop,u=t.antiOverlap,l=r.filter((function(t){return t.mode===e.mode&&t.top<=a-i})).sort((function(t,e){return t.top-e.top}));if(0===l.length)return s;l.unshift({top:0,left:0,right:0,height:s,width:n,speed:0,distance:n}),l.push({top:a-i,left:0,right:0,height:i,width:n,speed:0,distance:n});for(var c=1;c=e.height)return d}for(var m=[],h=1;ht.time)}))}));return v&&v[0]?v[0].top:void 0;case 1:return}}},{"@swc/helpers/src/_to_consumable_array.mjs":"inwWM","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],inwWM:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return a._}));var a=t("../esm/_to_consumable_array.js")},{"../esm/_to_consumable_array.js":"iwLF0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iwLF0:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_to_consumable_array",(function(){return u})),n.export(r,"_",(function(){return u}));var a=t("./_array_without_holes.js"),o=t("./_iterable_to_array.js"),i=t("./_non_iterable_spread.js"),s=t("./_unsupported_iterable_to_array.js");function u(t){return(0,a._array_without_holes)(t)||(0,o._iterable_to_array)(t)||(0,s._unsupported_iterable_to_array)(t)||(0,i._non_iterable_spread)()}},{"./_array_without_holes.js":"cuL6A","./_iterable_to_array.js":"2thrs","./_non_iterable_spread.js":"a8nO2","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cuL6A:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_array_without_holes",(function(){return o})),n.export(r,"_",(function(){return o}));var a=t("./_array_like_to_array.js");function o(t){if(Array.isArray(t))return(0,a._array_like_to_array)(t)}},{"./_array_like_to_array.js":"djwRR","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],djwRR:[function(t,e,r){var n=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r
')})),i=h(a,'
模式
滚动
静止
颜色
').concat(n.join(""),'
发送
')),s=v(".art-danmuku-style",i),u=v(".art-danmuku-input",i),l=v(".art-danmuku-send",i),c=v(".art-danmuku-style-panel-inner",i),p=v(".art-danmuku-style-panel-modes",i),d=v(".art-danmuku-style-panel-colors",i),g=r.mount||h(o,'
');t.option.backdrop&&m(c,"art-backdrop-filter"),r.theme&&m(i,"art-danmuku-theme-".concat(r.theme));var _=null,k=r.mode,w=r.color;function x(t){t<=0?(_=null,l.innerText="发送",f(l,"art-disabled")):(l.innerText=t,_=setTimeout((function(){return x(t-1)}),1e3))}function D(){var n={mode:k,color:w,border:!0,text:u.value.trim()};null===_&&r.beforeEmit(n)&&(u.value="",e.emit(n),m(l,"art-disabled"),x(r.lockTime),t.emit("artplayerPluginDanmuku:emit",n))}function C(){a.clientWidth0&&void 0!==arguments[0]?arguments[0]:[];if(s=null,u=null,a.innerHTML="",t.duration&&!t.option.isLive){var f={w:a.offsetWidth,h:a.offsetHeight},d={xMin:0,xMax:f.w,yMin:0,yMax:128,scale:.25,opacity:.2,minHeight:Math.floor(.05*f.h),sampling:Math.floor(f.w/100),smoothing:.2,flattening:.2};"object"==typeof r&&Object.assign(d,r);var m=[];if(Array.isArray(p)&&p.length)m=(0,o.default)(p);else for(var h=function(t){var r=e.danmus.filter((function(e){var r=e.time;return r>t*y&&r<=(t+d.sampling)*y})).length;m.push([t,r])},y=t.duration/f.w,g=0;g<=f.w;g+=d.sampling)h(g);if(0!==m.length){var v=m[m.length-1],b=v[0],_=v[1];b!==f.w&&m.push([f.w,_]);for(var k=m.map((function(t){return t[1]})),w=((l=Math).min.apply(l,(0,o.default)(k))+(c=Math).max.apply(c,(0,o.default)(k)))/2,x=0;xw?1+d.scale:1-d.scale)+d.minHeight}var C=function(t,e,r,n){var a,o,s,u,l=(a=e||t,s=(o=r||t)[0]-a[0],u=o[1]-a[1],{length:Math.sqrt(Math.pow(s,2)+Math.pow(u,2)),angle:Math.atan2(u,s)}),c=i(Math.cos(l.angle)*d.flattening,0,1,1,0),p=l.angle*c+(n?Math.PI:0),f=l.length*d.smoothing;return[t[0]+Math.cos(p)*f,t[1]+Math.sin(p)*f]},S=m.map((function(t){return[i(t[0],d.xMin,d.xMax,0,f.w),i(t[1],d.yMin,d.yMax,f.h,0)]})).reduce((function(t,e,r,n){return 0===r?"M ".concat(n[n.length-1][0],",").concat(f.h," L ").concat(e[0],",").concat(f.h," L ").concat(e[0],",").concat(e[1]):"".concat(t," ").concat(function(t,e,r){var n=C(r[e-1],r[e-2],t),a=C(t,r[e-1],r[e+1],!0),o=e===r.length-1?" z":"";return"C ".concat(n[0],",").concat(n[1]," ").concat(a[0],",").concat(a[1]," ").concat(t[0],",").concat(t[1]).concat(o)}(e,r,n))}),"");a.innerHTML=''),s=n("#heatmap-start",a),u=n("#heatmap-stop",a),s.setAttribute("offset","".concat(100*t.played,"%")),u.setAttribute("offset","".concat(100*t.played,"%"))}}}t.on("video:timeupdate",(function(){s&&u&&(s.setAttribute("offset","".concat(100*t.played,"%")),u.setAttribute("offset","".concat(100*t.played,"%")))})),t.on("setBar",(function(t,e){s&&u&&"played"===t&&(s.setAttribute("offset","".concat(100*e,"%")),u.setAttribute("offset","".concat(100*e,"%")))})),t.on("ready",(function(){return l()})),t.on("resize",(function(){return l()})),t.on("artplayerPluginDanmuku:loaded",(function(){return l()})),t.on("artplayerPluginDanmuku:points",(function(t){return l(t)}))}})}},{"@swc/helpers/src/_to_consumable_array.mjs":"inwWM","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["40mNk"],"40mNk","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js b/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js index e8d19590e..7556338b4 100644 --- a/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js +++ b/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -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;sa);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),r=o[0],i=o[1]/100;n(r+i>=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"}}}a.env="production",a.version="2.0.0",a.build="2023-08-26 13:44:37","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=''},{}],"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"); \ No newline at end of file +!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],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 r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);if(a)return a(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 o=e[t][1][n];return null!=o?o:n},c.cache={};var f=u[t]=new d.Module(t);e[t][0].call(f.exports,c,f,f.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=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{!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",u=e.title||"Quality",l=r.getBitrateInfoListFor("video"),d=r.getQualityFor("video"),s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=r.getSettings(),c=l[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:l.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:u,icon:i.default,width:200,selector:l.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,a.env="production",a.version="2.0.0",a.build="2023-08-26 16:47:24","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=''},{}],"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"); \ No newline at end of file diff --git a/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.legacy.js b/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.legacy.js index 61a718c7a..3f8521b81 100644 --- a/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.legacy.js +++ b/packages/artplayer-plugin-dash-quality/dist/artplayer-plugin-dash-quality.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(u)return u(t,!0);// Try the node require function if it exists. -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=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(),v=f[c],g=(null==h?void 0:null===(n=h.streaming)||void 0===n?void 0:null===(o=n.abr)||void 0===o?void 0:null===(r=o.autoSwitchBitrate)||void 0===r?void 0:r.video)?d:p(v),m={streaming:{abr:{autoSwitchBitrate:{}}}};e.control&&t.controls.update({name:"dash-quality",position:"right",html:g,style:{padding:"0 10px"},selector:f.map(function(e,t){return{html:p(e),level:t,default:v===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:g,html:s,icon:i.default,width:200,selector:f.map(function(e,t){return{html:p(e),level:t,default:v===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"}}}u.env="production",u.version="2.0.0",u.build="2023-08-26 13:44:38","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=''},{}],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"); \ No newline at end of file +!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=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,u.env="production",u.version="2.0.0",u.build="2023-08-26 16:47:25","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=''},{}],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"); \ No newline at end of file diff --git a/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js b/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js index 4a8b67400..d751689c8 100644 --- a/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js +++ b/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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 f(t,n){if(!u[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof l[o]&&l[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -if(s&&"string"==typeof t)return s(t);var a=Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}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 l[o]}}),l[o]=f;for(var a=0;ai);var r=e("bundle-text:./image.svg"),l=o.interopDefault(r);function i(e){return t=>{!function(e){let{version:t,utils:{errorHandle:n}}=e.constructor,o=t.split(".").map(Number),r=o[0],l=o[1]/100;n(r+l>=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 r(){let r=t.hls||window.hls;o(r&&r.media===n,'Cannot find instance of HLS from "art.hls" or "window.hls"');let i=e.auto||"Auto",u=e.title||"Quality",s=e.getResolution||(e=>(e.height||"Unknown ")+"P"),f=r.levels[r.currentLevel],a=f?s(f):i;e.control&&t.controls.update({name:"hls-quality",position:"right",html:a,style:{padding:"0 10px"},selector:r.levels.map((e,t)=>({html:s(e),level:e.level||t,default:f===e})),onSelect:e=>(r.currentLevel=e.level,t.loading.show=!0,e.html)}),e.setting&&t.setting.update({name:"hls-quality",tooltip:a,html:u,icon:l.default,width:200,selector:r.levels.map((e,t)=>({html:s(e),level:e.level||t,default:f===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"}}}i.env="production",i.version="2.0.0",i.build="2023-08-26 13:44:35","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=''},{}],"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"); \ No newline at end of file +!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{!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,i.env="production",i.version="2.0.0",i.build="2023-08-26 16:47:24","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=''},{}],"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"); \ No newline at end of file diff --git a/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.legacy.js b/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.legacy.js index c4f5a430d..7430877a7 100644 --- a/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.legacy.js +++ b/packages/artplayer-plugin-hls-quality/dist/artplayer-plugin-hls-quality.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,r,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof l[r]&&l[r];if(!n&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -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=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"}}}i.env="production",i.version="2.0.0",i.build="2023-08-26 13:44:36","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=''},{}],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"); \ No newline at end of file +!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=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,i.env="production",i.version="2.0.0",i.build="2023-08-26 16:47:24","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=''},{}],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"); \ No newline at end of file diff --git a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js index 7ce95407e..c0318a224 100644 --- a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js +++ b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.js @@ -4,23 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,s){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var s="function"==typeof o[n]&&o[n];if(!r&&s)return s(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -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;lnull,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":"9pCYc"}],"9pCYc":[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})}},{}]},["aFKtw"],"aFKtw","parcelRequire4dc0"); \ No newline at end of file +!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;cnull,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"); \ No newline at end of file diff --git a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js index f2e592210..c1e9d3087 100644 --- a/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js +++ b/packages/artplayer-plugin-iframe/dist/artplayer-plugin-iframe.legacy.js @@ -4,34 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */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||{},s="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(t,r){if(!c[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -if(s&&"string"==typeof t)return s(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 u.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?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=e,u.cache=c,u.parent=a,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 f=0;ft.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function u(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}function f(e,t){return function(r,n){t(r,n,e)}}function l(e,t,r,n,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,s=n.kind,u="getter"===s?"get":"setter"===s?"set":"value",f=!t&&e?n.static?e:e.prototype:null,l=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var m=(0,r[d])("accessor"===s?{get:l.get,set:l.set}:l[u],y);if("accessor"===s){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw TypeError("Object expected");(c=a(m.get))&&(l.get=c),(c=a(m.set))&&(l.set=c),(c=a(m.init))&&o.push(c)}else(c=a(m))&&("field"===s?o.push(c):l[u]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}function j(){for(var e=[],t=0;t1||c(e,t)})})}function c(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(s,u):f(i[0][2],r)}catch(e){f(i[0][3],e)}}function s(e){c("next",e)}function u(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function M(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function k(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function S(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&v(t,e,r);return I(t,e),t}function D(e){return e&&e.__esModule?e:{default:e}}function F(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function A(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function C(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["akNoT"],"akNoT","parcelRequire4dc0"); \ No newline at end of file +!function(e,r,t,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 u(r,t){if(!i[r]){if(!e[r]){var o="function"==typeof s[n]&&s[n];if(!t&&o)return o(r,!0);if(a)return a(r,!0);if(c&&"string"==typeof r)return c(r);var f=new 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=i[r]=new u.Module(r);e[r][0].call(l.exports,p,l,l.exports,this)}return i[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=i,u.parent=a,u.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]},Object.defineProperty(u,"root",{get:function(){return s[n]}}),s[n]=u;for(var f=0;f=0;i--)(o=e[i])&&(a=(s<3?o(a):s>3?o(r,t,a):o(r,t))||a);return s>3&&a&&Object.defineProperty(r,t,a),a}function l(e,r){return function(t,n){r(t,n,e)}}function p(e,r,t,n,o,s){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,c=n.kind,u="getter"===c?"get":"setter"===c?"set":"value",f=!r&&e?n.static?e:e.prototype:null,l=r||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=t.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");s.push(a(e||null))};var m=(0,t[d])("accessor"===c?{get:l.get,set:l.set}:l[u],y);if("accessor"===c){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(i=a(m.get))&&(l.get=i),(i=a(m.set))&&(l.set=i),(i=a(m.init))&&o.push(i)}else(i=a(m))&&("field"===c?o.push(i):l[u]=i)}f&&Object.defineProperty(f,n.name,l),p=!0}function d(e,r,t){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function g(e,r){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var n,o,s=t.call(e),a=[];try{for(;(void 0===r||r-- >0)&&!(n=s.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(t=s.return)&&t.call(s)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],r=0;r1||i(e,r)}))})}function i(e,r){try{(t=o[e](r)).value instanceof E?Promise.resolve(t.value.v).then(c,u):f(s[0][2],t)}catch(e){f(s[0][3],e)}var t}function c(e){i("next",e)}function u(e){i("throw",e)}function f(e,r){e(r),s.shift(),s.length&&i(s[0][0],s[0][1])}}function k(e){var r,t;return r={},n("next"),n("throw",(function(e){throw e})),n("return"),r[Symbol.iterator]=function(){return this},r;function n(n,o){r[n]=e[n]?function(r){return(t=!t)?{value:E(e[n](r)),done:!1}:o?o(r):r}:o}}function M(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,t=e[Symbol.asyncIterator];return t?t.call(e):(e=j(e),r={},n("next"),n("throw"),n("return"),r[Symbol.asyncIterator]=function(){return this},r);function n(t){r[t]=e[t]&&function(r){return new Promise((function(n,o){(function(e,r,t,n){Promise.resolve(n).then((function(r){e({value:r,done:t})}),r)})(n,o,(r=e[t](r)).done,r.value)}))}}}function T(e,r){return Object.defineProperty?Object.defineProperty(e,"raw",{value:r}):e.raw=r,e}var D=Object.create?function(e,r){Object.defineProperty(e,"default",{enumerable:!0,value:r})}:function(e,r){e.default=r};function S(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)"default"!==t&&Object.prototype.hasOwnProperty.call(e,t)&&w(r,e,t);return D(r,e),r}function F(e){return e&&e.__esModule?e:{default:e}}function W(e,r,t,n){if("a"===t&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof r?e!==r||!n:!r.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===t?n:"a"===t?n.call(e):n?n.value:r.get(e)}function C(e,r,t,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof r?e!==r||!o:!r.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,t):o?o.value=t:r.set(e,t),t}function A(e,r){if(null===r||"object"!=typeof r&&"function"!=typeof r)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?r===e:e.has(r)}},{"@swc/helpers/src/_type_of.mjs":"78qx0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"78qx0":[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(t),n.export(t,"default",(function(){return o._}));var o=e("../esm/_type_of.js")},{"../esm/_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,r,t){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(t),n.export(t,"_type_of",(function(){return o})),n.export(t,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["akNoT"],"akNoT","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js index 0da2874f2..3fb59673b 100644 --- a/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js +++ b/packages/artplayer-plugin-vtt-thumbnail/dist/artplayer-plugin-vtt-thumbnail.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,r,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -if(f&&"string"==typeof t)return f(t);var s=Error("Cannot find module '"+t+"'");throw s.code="MODULE_NOT_FOUND",s}p.resolve=function(n){var r=e[t][1][n];return null!=r?r:n},p.cache={};var d=u[t]=new a.Module(t);e[t][0].call(d.exports,p,d,d.exports,this)}return u[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=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;sl);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"}}}l.env="production",l.version="1.0.0",l.build="2023-08-26 13:44:31","undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=l)},{"./getVttArray":"4IFMi","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IFMi":[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(),n=t.split(/[\n\r]/gm).filter(e=>e.trim()),r=[];for(let t=1;t ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(u),a=/(.*)#(\w{4})=(.*)/i,s=l.match(a),d=Math.floor(o(f[1])),p=Math.floor(o(f[2])),c=e.split("/");c.pop(),c.push(s[1]);let h=c.join("/"),m={start:d,end:p,url:h},g=s[2].split(""),y=s[3].split(",");for(let e=0;ei)},{"@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"); \ No newline at end of file +!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{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,l.env="production",l.version="1.0.0",l.build="2023-08-26 16:47:22","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 ?)((?:[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])),p=e.split("/");p.pop(),p.push(a[1]);const h={start:c,end:d,url:p.join("/")},m=a[2].split(""),g=a[3].split(",");for(let e=0;e numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */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],c=u.cache||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(t,r){if(!c[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(u)return u(t,!0);// Try the node require function if it exists. -if(a&&"string"==typeof t)return a(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 s=c[t]=new f.Module(t);e[t][0].call(s.exports,p,s,s.exports,this)}return c[t].exports;function p(e){var t=p.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=c,f.parent=u,f.register=function(t,r){e[t]=[function(e,t){t.exports=r},{}]},Object.defineProperty(f,"root",{get:function(){return i[n]}}),i[n]=f;for(var l=0;l=e.start&&c<=e.end}))?(n(e,"backgroundImage","url(".concat(s.url,")")),n(e,"height","".concat(s.h,"px")),n(e,"width","".concat(s.w,"px")),n(e,"backgroundPosition","-".concat(s.x,"px -").concat(s.y,"px")),f<=s.w/2?n(e,"left",0):f>a.clientWidth-s.w/2?n(e,"left","".concat(a.clientWidth-s.w,"px")):n(e,"left","".concat(f-s.w/2,"px")),[2]):[2,n(e,"display","none")]})}),function(e){return r.apply(this,arguments)})),f(a,"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)}}a.env="production",a.version="1.0.0",a.build="2023-08-26 13:44:32","undefined"!=typeof window&&(window.artplayerPluginVttThumbnail=a)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","./getVttArray":"iUpz3","@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,u){try{var c=e[i](u),a=c.value}catch(e){r(e);return}c.done?t(a):Promise.resolve(a).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var u=e.apply(t,r);function c(e){o(u,n,i,c,a,"next",e)}function a(e){o(u,n,i,c,a,"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||"__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})}},{}],"6Xyd0":[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:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** *//* global Reflect, Promise */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return u}),n.export(r,"__assign",function(){return c}),n.export(r,"__rest",function(){return a}),n.export(r,"__decorate",function(){return f}),n.export(r,"__param",function(){return l}),n.export(r,"__esDecorate",function(){return s}),n.export(r,"__runInitializers",function(){return p}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return y}),n.export(r,"__metadata",function(){return h}),n.export(r,"__awaiter",function(){return _}),n.export(r,"__generator",function(){return v}),n.export(r,"__createBinding",function(){return m}),n.export(r,"__exportStar",function(){return b}),n.export(r,"__values",function(){return g}),n.export(r,"__read",function(){return w}),/** @deprecated */n.export(r,"__spread",function(){return x}),/** @deprecated */n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return O}),n.export(r,"__await",function(){return P}),n.export(r,"__asyncGenerator",function(){return S}),n.export(r,"__asyncDelegator",function(){return T}),n.export(r,"__asyncValues",function(){return I}),n.export(r,"__makeTemplateObject",function(){return E}),n.export(r,"__importStar",function(){return F}),n.export(r,"__importDefault",function(){return M}),n.export(r,"__classPrivateFieldGet",function(){return W}),n.export(r,"__classPrivateFieldSet",function(){return k}),n.export(r,"__classPrivateFieldIn",function(){return N});var o=e("@swc/helpers/_/_type_of"),i=function(e,t){return(i=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function u(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var c=function(){return(c=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function f(e,t,r,n){var o,i=arguments.length,u=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function s(e,t,r,n,o,i){function u(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var c,a=n.kind,f="getter"===a?"get":"setter"===a?"set":"value",l=!t&&e?n.static?e:e.prototype:null,s=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw TypeError("Cannot add initializers after decoration has completed");i.push(u(e||null))};var _=(0,r[d])("accessor"===a?{get:s.get,set:s.set}:s[f],y);if("accessor"===a){if(void 0===_)continue;if(null===_||"object"!=typeof _)throw TypeError("Object expected");(c=u(_.get))&&(s.get=c),(c=u(_.set))&&(s.set=c),(c=u(_.init))&&o.push(c)}else(c=u(_))&&("field"===a?o.push(c):s[f]=c)}l&&Object.defineProperty(l,n.name,s),p=!0}function p(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===c[0]||2===c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function x(){for(var e=[],t=0;t1||c(e,t)})})}function c(e,t){try{var r;(r=o[e](t)).value instanceof P?Promise.resolve(r.value.v).then(a,f):l(i[0][2],r)}catch(e){l(i[0][3],e)}}function a(e){c("next",e)}function f(e){c("throw",e)}function l(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function T(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:P(e[n](t)),done:!1}:o?o(t):t}:o}}function I(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=g(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var D=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function F(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&m(t,e,r);return D(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function W(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function k(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function N(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iUpz3:[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");function u(e){var t,r,n,o=e.split("."),i=o[0].split(":")||[],u=Number((t=o[1]||"0",r=3,n="0",t.length>r?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))))/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+u}function c(){return a.apply(this,arguments)}function a(){return(a=(0,o._)(function(){var e,t,r,n,o,c,a,f,l,s,p,d,y,h,_,v,m,b=arguments;return(0,i._)(this,function(i){switch(i.label){case 0:return e=b.length>0&&void 0!==b[0]?b[0]:"",[4,fetch(e)];case 1:return[4,i.sent().text()];case 2:for(n=1,t=i.sent().split(/[\n\r]/gm).filter(function(e){return e.trim()}),r=[];n ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=o.match(a),l=/(.*)#(\w{4})=(.*)/i,s=c.match(l),p=Math.floor(u(f[1])),d=Math.floor(u(f[2])),(y=e.split("/")).pop(),y.push(s[1]),h={start:p,end:d,url:y.join("/")},_=s[2].split(""),v=s[3].split(","),m=0;m<_.length;m++)h[_[m]]=v[m];r.push(h)}return[2,r]}})})).apply(this,arguments)}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["2Oq25"],"2Oq25","parcelRequire4dc0"); \ No newline at end of file +!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],c=u.cache||{},a="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(u)return u(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}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=u,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=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")),s<=f.w/2?o(e,"left",0):s>a.clientWidth-f.w/2?o(e,"left","".concat(a.clientWidth-f.w,"px")):o(e,"left","".concat(s-f.w/2,"px")),[2]):[2,o(e,"display","none")]}))}));return function(e){return r.apply(this,arguments)}}()),f(a,"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,f.env="production",f.version="1.0.0",f.build="2023-08-26 16:47:23","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){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_async_to_generator.js")},{"../esm/_async_to_generator.js":"eONSn","@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,u){try{var c=e[i](u),a=c.value}catch(e){return void r(e)}c.done?t(a):Promise.resolve(a).then(n,o)}function i(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var u=e.apply(t,r);function c(e){o(u,n,i,c,a,"next",e)}function a(e){o(u,n,i,c,a,"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||"__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._}));var o=e("../esm/_ts_generator.js")},{"../esm/_ts_generator.js":"6Xyd0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",(function(){return o.__generator})),n.export(r,"_ts_generator",(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 c})),n.export(r,"__assign",(function(){return a})),n.export(r,"__rest",(function(){return s})),n.export(r,"__decorate",(function(){return f})),n.export(r,"__param",(function(){return l})),n.export(r,"__esDecorate",(function(){return p})),n.export(r,"__runInitializers",(function(){return d})),n.export(r,"__propKey",(function(){return y})),n.export(r,"__setFunctionName",(function(){return h})),n.export(r,"__metadata",(function(){return m})),n.export(r,"__awaiter",(function(){return _})),n.export(r,"__generator",(function(){return v})),n.export(r,"__createBinding",(function(){return b})),n.export(r,"__exportStar",(function(){return g})),n.export(r,"__values",(function(){return w})),n.export(r,"__read",(function(){return j})),n.export(r,"__spread",(function(){return x})),n.export(r,"__spreadArrays",(function(){return O})),n.export(r,"__spreadArray",(function(){return P})),n.export(r,"__await",(function(){return S})),n.export(r,"__asyncGenerator",(function(){return D})),n.export(r,"__asyncDelegator",(function(){return I})),n.export(r,"__asyncValues",(function(){return T})),n.export(r,"__makeTemplateObject",(function(){return E})),n.export(r,"__importStar",(function(){return W})),n.export(r,"__importDefault",(function(){return M})),n.export(r,"__classPrivateFieldGet",(function(){return k})),n.export(r,"__classPrivateFieldSet",(function(){return C})),n.export(r,"__classPrivateFieldIn",(function(){return q}));var o=e("@swc/helpers/src/_type_of.mjs"),i=n.interopDefault(o),u=function(e,t){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},u(e,t)};function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}u(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var a=function(){return a=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;c--)(o=e[c])&&(u=(i<3?o(u):i>3?o(t,r,u):o(t,r))||u);return i>3&&u&&Object.defineProperty(t,r,u),u}function l(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,i){function u(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var c,a=n.kind,s="getter"===a?"get":"setter"===a?"set":"value",f=!t&&e?n.static?e:e.prototype:null,l=t||(f?Object.getOwnPropertyDescriptor(f,n.name):{}),p=!1,d=r.length-1;d>=0;d--){var y={};for(var h in n)y[h]="access"===h?{}:n[h];for(var h in n.access)y.access[h]=n.access[h];y.addInitializer=function(e){if(p)throw new TypeError("Cannot add initializers after decoration has completed");i.push(u(e||null))};var m=(0,r[d])("accessor"===a?{get:l.get,set:l.set}:l[s],y);if("accessor"===a){if(void 0===m)continue;if(null===m||"object"!=typeof m)throw new TypeError("Object expected");(c=u(m.get))&&(l.get=c),(c=u(m.set))&&(l.set=c),(c=u(m.init))&&o.push(c)}else(c=u(m))&&("field"===a?o.push(c):l[s]=c)}f&&Object.defineProperty(f,n.name,l),p=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==c[0]&&2!==c[0])){u=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function j(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),u=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)u.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return u}function x(){for(var e=[],t=0;t1||c(e,t)}))})}function c(e,t){try{(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(a,s):f(i[0][2],r)}catch(e){f(i[0][3],e)}var r}function a(e){c("next",e)}function s(e){c("throw",e)}function f(e,t){e(t),i.shift(),i.length&&c(i[0][0],i[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function T(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=w(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function W(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return F(t,e),t}function M(e){return e&&e.__esModule?e:{default:e}}function k(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function q(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/src/_type_of.mjs":"78qx0","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"78qx0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_type_of.js")},{"../esm/_type_of.js":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],felZi:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e&&"undefined"!=typeof Symbol&&e.constructor===Symbol?"symbol":typeof e}n.defineInteropFlag(r),n.export(r,"_type_of",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iUpz3:[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"),c=n.interopDefault(u);function a(e){var t,r,n,o=e.split("."),i=o[0].split(":")||[],u=(t=o[1]||"0",r=3,n="0",t.length>r?String(t):((r-=t.length)>n.length&&(n+=n.repeat(r/n.length)),String(t)+n.slice(0,r))),c=Number(u)/1e3;return 3600*Number(i[i.length-3]||0)+60*Number(i[i.length-2]||0)+Number(i[i.length-1]||0)+c}function s(){return s=(0,i.default)((function(){var e,t,r,n,o,i,u,s,f,l,p,d,y,h,m,_,v,b,g,w=arguments;return(0,c.default)(this,(function(c){switch(c.label){case 0:return e=w.length>0&&void 0!==w[0]?w[0]:"",[4,fetch(e)];case 1:return[4,c.sent().text()];case 2:for(t=c.sent(),r=t.split(/[\n\r]/gm).filter((function(e){return e.trim()})),n=[],o=1;o ?)((?:[0-9]{2}:)?(?:[0-9]{2}:)?[0-9]{2}(?:.[0-9]{3})?)/,f=i.match(s),l=/(.*)#(\w{4})=(.*)/i,p=u.match(l),d=Math.floor(a(f[1])),y=Math.floor(a(f[2])),(h=e.split("/")).pop(),h.push(p[1]),m=h.join("/"),_={start:d,end:y,url:m},v=p[2].split(""),b=p[3].split(","),g=0;g numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,i,n,o){/* eslint-disable no-undef */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||{},a="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function h(t,i){if(!l[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof r[n]&&r[n];if(!i&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(s)return s(t,!0);// Try the node require function if it exists. -if(a&&"string"==typeof t)return a(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 h.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?{}:h(t)}}h.isParcelRequire=!0,h.Module=function(e){this.id=e,this.bundle=h,this.exports={}},h.modules=e,h.cache=l,h.parent=s,h.register=function(t,i){e[t]=[function(e,t){t.exports=i},{}]},Object.defineProperty(h,"root",{get:function(){return r[n]}}),r[n]=h;for(var d=0;d{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(),a=l.getContext("2d");this.emit("canvas",l);let h=r.map((i,n)=>()=>new Promise(r=>{this.video.oncanplay=()=>{a.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)(h).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({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i}))}creatCanvas(){let{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");let e=document.createElement("a"),t=`${(0,s.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",l.ondragover),this.option.fileInput.removeEventListener("drop",l.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=l,window.ArtplayerToolThumbnail=l},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i),i.default=class{on(e,t,i){let n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){let n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){let i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e))}function r(e){return e.reduce((e,t)=>e.then(t),Promise.resolve())}function s(e){let t=e.split(".");return t.pop(),t.join(".")}function l(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}n.defineInteropFlag(i),n.export(i,"sleep",()=>o),n.export(i,"runPromisesInSeries",()=>r),n.export(i,"getFileName",()=>s),n.export(i,"clamp",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0"); \ No newline at end of file +!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{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({time:e-r/2,x:o%n*t,y:Math.floor(o/n)*i})))}creatCanvas(){const{number:e,width:t,height:i,column:n}=this.option,o=document.createElement("canvas"),r=o.getContext("2d");return o.width=t*n,o.height=Math.ceil(e/n)*i+30,r.fillStyle="black",r.fillRect(0,0,o.width,o.height),r.font="14px Georgia",r.fillStyle="#fff",r.fillText(`From: https://artplayer.org/, Number: ${e}, Width: ${t}, Height: ${i}, Column: ${n}`,10,o.height-11),o}download(){this.errorHandle(this.file&&this.thumbnailUrl,"Download does not seem to be ready, please create preview first"),this.errorHandle(!this.processing,"There is currently a task in progress, please wait a moment...");const e=document.createElement("a"),t=`${(0,s.getFileName)(this.file.name)}.png`;return e.download=t,e.href=this.thumbnailUrl,document.body.appendChild(e),e.click(),document.body.removeChild(e),this.emit("download",t),this}errorHandle(e,t){if(!e)throw this.emit("error",t),new Error(t)}destroy(){this.option.fileInput.removeEventListener("change",this.inputChange),this.option.fileInput.removeEventListener("dragover",l.ondragover),this.option.fileInput.removeEventListener("drop",l.ondrop),document.body.removeChild(this.video),this.videoUrl&&URL.revokeObjectURL(this.videoUrl),this.thumbnailUrl&&URL.revokeObjectURL(this.thumbnailUrl),this.emit("destroy")}}i.default=l,window.ArtplayerToolThumbnail=l},{"./emitter":"f2NWK","./utils":"kQTVz","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f2NWK:[function(e,t,i){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(i);i.default=class{on(e,t,i){const n=this.e||(this.e={});return(n[e]||(n[e]=[])).push({fn:t,ctx:i}),this}once(e,t,i){const n=this;function o(...r){n.off(e,o),t.apply(i,r)}return o._=t,this.on(e,o,i)}emit(e,...t){const i=((this.e||(this.e={}))[e]||[]).slice();for(let e=0;esetTimeout(t,e)))}function r(e){return e.reduce(((e,t)=>e.then(t)),Promise.resolve())}function s(e){const t=e.split(".");return t.pop(),t.join(".")}function l(e,t,i){return Math.max(Math.min(e,Math.max(t,i)),Math.min(t,i))}n.defineInteropFlag(i),n.export(i,"sleep",(()=>o)),n.export(i,"runPromisesInSeries",(()=>r)),n.export(i,"getFileName",(()=>s)),n.export(i,"clamp",(()=>l))},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["eoujN"],"eoujN","parcelRequire4dc0"); \ No newline at end of file diff --git a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js index 94c4de130..56d5fff17 100644 --- a/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js +++ b/packages/artplayer-tool-thumbnail/dist/artplayer-tool-thumbnail.legacy.js @@ -4,21 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[n]&&i[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(s)return s(t,!0);// Try the node require function if it exists. -if(l&&"string"==typeof t)return l(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 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;c0&&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=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,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(),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.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",t.message),t})}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,i=e.begin,s=this.duration/t,a=[i+s];a.length1?t-1:0),n=1;n0&&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,s.default)(e)),e.ondrop=e.ondrop.bind((0,s.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,c.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,s=r.width,i=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,_.clamp)(o,10,1e3),this.option.width=(0,_.clamp)(s,10,1e3),this.option.column=(0,_.clamp)(i,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,_.sleep)(1e3).then((function(){return e.start()}));var t=this.option,r=t.width,n=t.number,o=t.begin,s=t.end,i=this.video.videoHeight/this.video.videoWidth*r;this.option.height=i,this.option.begin=(0,_.clamp)(o,0,this.video.duration),this.option.end=(0,_.clamp)(s||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(),c=l.getContext("2d");this.emit("canvas",l);var u=a.map((function(t,o){return function(){return new Promise((function(s){e.video.oncanplay=function(){c.drawImage(e.video,t.x,t.y,r,i),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.oncanplay=null,s()}))},e.video.currentTime=t.time}))}}));return this.processing=!0,(0,_.runPromisesInSeries)(u).then((function(){e.processing=!1,e.emit("done")})).catch((function(t){throw e.processing=!1,e.emit("error",t.message),t}))}},{key:"creatScreenshotDate",value:function(){for(var e=this.option,t=e.number,r=e.width,n=e.height,o=e.column,s=e.begin,i=this.duration/t,a=[s+i];a.length1?t-1:0),n=1;n numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,a,o){/* eslint-disable no-undef */var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},n="function"==typeof i[a]&&i[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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[a]&&i[a];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(n)return n(t,!0);// Try the node require function if it exists. -if(l&&"string"==typeof t)return l(t);var p=Error("Cannot find module '"+t+"'");throw p.code="MODULE_NOT_FOUND",p}d.resolve=function(r){var a=e[t][1][r];return null!=a?a:r},d.cache={};var u=s[t]=new c.Module(t);e[t][0].call(u.exports,d,u,u.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 i[a]}}),i[a]=c;for(var p=0;pt.call(this,this)),X.DEBUG){let e=e=>console.log(`[ART.${this.id}] -> ${e}`);e("Version@"+X.version),e("Env@"+X.env),e("Build@"+X.build);for(let t=0;te("Event@"+t.type))}Z.push(this)}static get instances(){return Z}static get version(){return"5.1.0"}static get env(){return"production"}static get build(){return"2023-08-26 13:44:46"}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:{},escape:!0,encoding:"utf-8",onVttLoad:e=>e},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(e=!0){this.events.destroy(),this.template.destroy(e),Z.splice(Z.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(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.SCROLL_TIME=200,X.SCROLL_GAP=50,X.AUTO_PLAYBACK_MAX=10,X.AUTO_PLAYBACK_MIN=5,X.AUTO_PLAYBACK_TIMEOUT=3e3,X.RECONNECT_TIME_MAX=5,X.RECONNECT_SLEEP_TIME=1e3,X.CONTROL_HIDE_TIME=3e3,X.DBCLICK_TIME=300,X.DBCLICK_FULLSCREEN=!0,X.MOBILE_DBCLICK_PLAY=!0,X.MOBILE_CLICK_PLAY=!1,X.AUTO_ORIENTATION_TIME=200,X.INFO_LOOP_TIME=1e3,X.FAST_FORWARD_VALUE=3,X.FAST_FORWARD_TIME=1e3,X.TOUCH_MOVE_RATIO=.5,X.VOLUME_STEP=.1,X.SEEK_STEP=5,X.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],X.ASPECT_RATIO=["default","4:3","16:9"],X.FLIP=["normal","horizontal","vertical"],X.FULLSCREEN_WEB_IN_BODY=!1,X.LOG_VERSION=!0,X.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){let e=p.createElement("style");e.id="artplayer-style",e.textContent=i.default,document.head.appendChild(e)}"undefined"!=typeof window&&(window.Artplayer=X),setTimeout(()=>{X.LOG_VERSION&&console.log(`%c ArtPlayer %c ${X.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")})},{"bundle-text:./style/index.less":"0016T","option-validator":"bAWi2","./utils/emitter":"66mFZ","./utils":"71aH7","./scheme":"AKEiO","./config":"lyjeQ","./template":"X13Zf","./i18n":"3jKkj","./player":"a90nx","./control":"8Z0Uf","./contextmenu":"2KYsr","./info":"02ajl","./subtitle":"eSWto","./events":"jo4S1","./hotkey":"6NoFy","./layer":"6G6hZ","./loading":"3dsEe","./notice":"dWGTw","./mask":"5POkG","./icons":"6OeNg","./setting":"3eYNH","./storage":"2aaJe","./plugins":"8MTUM","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"0016T":[function(e,t,r){t.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#fff3;--art-hover-color:#ffffff80;--art-loaded-color:#fff3;--art-loop-color:#ffffffbf;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-loop-width:2px;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#00000080;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{width:100%;height:100%;zoom:1;text-align:left;direction:ltr;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;width:100%;height:100%;cursor:pointer;position:absolute;inset:0}.art-poster{z-index:11;width:100%;height:100%;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;width:100%;height:100%;opacity:0;pointer-events:none;justify-content:flex-end;gap:var(--art-bottom-gap);padding:0 var(--art-padding);transition:opacity var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;width:100%;height:100%;width:0%;background-color:var(--art-hover-color);display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;width:100%;height:100%;width:0%;background-color:var(--art-loaded-color);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;width:100%;height:100%;width:0%;background-color:var(--art-theme);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;width:100%;height:100%;pointer-events:auto;width:var(--art-highlight-width);transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;bottom:10px;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom .art-progress .art-control-loop{z-index:0;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-loop .art-loop-point{z-index:0;width:100%;height:100%;width:var(--art-loop-width);background-color:var(--art-loop-color);transform:translateX(calc(var(--art-loop-width)/-2))scaleY(1.5);position:absolute;inset:0 0 0 0%}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{height:100%;flex:1;justify-content:center;align-items:center;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{height:100%;width:100%;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{width:100%;cursor:pointer;flex:1;justify-content:center;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{width:2px;border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;width:100%;height:100%;background-color:var(--art-theme);position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);transform-origin:100% 100%;max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transform:scale(var(--art-settings-scale));transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{min-width:32px;height:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{height:3px;width:80px;appearance:none;background-color:#fff3;outline:none}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{width:250px;text-overflow:ellipsis;white-space:nowrap;user-select:all;overflow:hidden}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;width:320px;height:180px;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;width:100%;height:100%;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-mini-progress-bar{z-index:0;width:100%;height:100%;height:var(--art-mini-progress-height);background-color:var(--art-theme);display:flex;position:absolute;inset:auto 0 0}.art-video-player .art-layer-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-lock .art-layer-mini-progress-bar{display:flex!important}.art-video-player.art-control-show .art-layer-mini-progress-bar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{width:100%;flex-shrink:0;justify-content:center;align-items:center;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000001;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(e,t,r){t.exports=function(){function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}var t=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=e(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===a(r)?"generatorfunction":"function";if(Array.isArray?Array.isArray(r):r instanceof Array)return"array";if(r.constructor&&"function"==typeof r.constructor.isBuffer&&r.constructor.isBuffer(r))return"buffer";if(function(e){try{if("number"==typeof e.length&&"function"==typeof e.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(r instanceof Date||"function"==typeof r.toDateString&&"function"==typeof r.getDate&&"function"==typeof r.setDate)return"date";if(r instanceof Error||"string"==typeof r.message&&r.constructor&&"number"==typeof r.constructor.stackTraceLimit)return"error";if(r instanceof RegExp||"string"==typeof r.flags&&"boolean"==typeof r.ignoreCase&&"boolean"==typeof r.multiline&&"boolean"==typeof r.global)return"regexp";switch(a(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if("function"==typeof r.throw&&"function"==typeof r.return&&"function"==typeof r.next)return"generator";switch(o=t.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function a(e){return e.constructor?e.constructor.name:null}function o(e,t){var a=2i),a.export(r,"queryAll",()=>n),a.export(r,"addClass",()=>s),a.export(r,"removeClass",()=>l),a.export(r,"hasClass",()=>c),a.export(r,"append",()=>p),a.export(r,"remove",()=>u),a.export(r,"setStyle",()=>d),a.export(r,"setStyles",()=>f),a.export(r,"getStyle",()=>h),a.export(r,"sublings",()=>m),a.export(r,"inverseClass",()=>g),a.export(r,"tooltip",()=>v),a.export(r,"isInViewport",()=>y),a.export(r,"includeFromEvent",()=>b),a.export(r,"replaceElement",()=>x),a.export(r,"createElement",()=>w),a.export(r,"getIcon",()=>j);var o=e("./compatibility");function i(e,t=document){return t.querySelector(e)}function n(e,t=document){return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function p(e,t){return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),e.lastElementChild??e.lastChild}function u(e){return e.parentNode.removeChild(e)}function d(e,t,r){return e.style[t]=r,e}function f(e,t){for(let r in t)d(e,r,t[r]);return e}function h(e,t,r=!0){let a=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(a):a}function m(e){return Array.from(e.parentElement.children).filter(t=>t!==e)}function g(e,t){m(e).forEach(e=>l(e,t)),s(e,t)}function v(e,t,r="top"){o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,`hint--${r}`))}function y(e,t=0){let r=e.getBoundingClientRect(),a=window.innerHeight??document.documentElement.clientHeight,o=window.innerWidth??document.documentElement.clientWidth,i=r.top-t<=a&&r.top+r.height+t>=0,n=r.left-t<=o+t&&r.left+r.width+t>=0;return i&&n}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function x(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function j(e="",t=""){let r=w("i");return s(r,"art-icon"),s(r,`art-icon-${e}`),p(r,t),r}},{"./compatibility":"6ZTr6","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6ZTr6":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"userAgent",()=>o),a.export(r,"isSafari",()=>i),a.export(r,"isWechat",()=>n),a.export(r,"isIE",()=>s),a.export(r,"isAndroid",()=>l),a.export(r,"isIOS",()=>c),a.export(r,"isIOS13",()=>p),a.export(r,"isMobile",()=>u);let o="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(o),n=/MicroMessenger/i.test(o),s=/MSIE|Trident/i.test(o),l=/android/i.test(o),c=/iPad|iPhone|iPod/i.test(o)&&!window.MSStream,p=c??(o.includes("Macintosh")&&navigator.maxTouchPoints>=1),u=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(o)??p},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hwmZz:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ArtPlayerError",()=>o),a.export(r,"errorHandle",()=>i);class o extends Error{constructor(e,t){super(e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t??this.constructor),this.name="ArtPlayerError"}}function i(e,t){if(!e)throw new o(t);return e}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],inzwq:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(e,t,r)=>{let a=r.slice(0,3);return 1===r.length&&(a=r+"00"),2===r.length&&(a=r+"0"),`${t},${a}`}).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"))}function i(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function n(e){let t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(e=""){return e.split(/[:.]/).map((e,t,r)=>{if(t===r.length-1){if(1===e.length)return`.${e}00`;if(2===e.length)return`.${e}0`}else if(1===e.length)return(0===t?"0":":0")+e;// eslint-disable-next-line no-nested-ternary -return 0===t?e:t===r.length-1?`.${e}`:`:${e}`}).join("")}return`WEBVTT - -${e.split(/\r?\n/).map(e=>{let a=e.match(t);return a?{start:r(a[1].trim()),end:r(a[2].trim()),text:a[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(e=>e.trim()).join("\n")}:null}).filter(e=>e).map((e,t)=>e?`${t+1} -${e.start} --> ${e.end} -${e.text}`:"").filter(e=>e.trim()).join("\n\n")}`}a.defineInteropFlag(r),a.export(r,"srtToVtt",()=>o),a.export(r,"vttToBlob",()=>i),a.export(r,"assToVtt",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6b7Ip":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}a.defineInteropFlag(r),a.export(r,"getExt",()=>function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}),a.export(r,"download",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5NSdr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"def",()=>o),a.export(r,"has",()=>n),a.export(r,"get",()=>s),a.export(r,"mergeDeep",()=>function e(...t){let r=e=>e&&"object"==typeof e&&!Array.isArray(e);return t.reduce((t,a)=>(Object.keys(a).forEach(o=>{let i=t[o],n=a[o];Array.isArray(i)&&Array.isArray(n)?t[o]=i.concat(...n):r(i)&&r(n)?t[o]=e(i,n):t[o]=n}),t),{})});let o=Object.defineProperty,{hasOwnProperty:i}=Object.prototype;function n(e,t){return i.call(e,t)}function s(e,t){return Object.getOwnPropertyDescriptor(e,t)}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],epmNy:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e=0){return new Promise(t=>setTimeout(t,e))}function i(e,t){let r;return function(...a){clearTimeout(r),r=setTimeout(()=>(r=null,e.apply(this,a)),t)}}function n(e,t){let r=!1;return function(...a){r||(e.apply(this,a),r=!0,setTimeout(function(){r=!1},t))}}a.defineInteropFlag(r),a.export(r,"sleep",()=>o),a.export(r,"debounce",()=>i),a.export(r,"throttle",()=>n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gapRl:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r){return Math.max(Math.min(e,Math.max(t,r)),Math.min(t,r))}function i(e){return e.charAt(0).toUpperCase()+e.slice(1)}function n(e){return["string","number"].includes(typeof e)}function s(e){if(!e)return"00:00";let t=Math.floor(e/3600),r=Math.floor((e-3600*t)/60),a=Math.floor(e-3600*t-60*r);return(t>0?[t,r,a]:[r,a]).map(e=>e<10?`0${e}`:String(e)).join(":")}function l(e){return e.replace(/[&<>'"]/g,e=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[e]??e)}a.defineInteropFlag(r),a.export(r,"clamp",()=>o),a.export(r,"capitalize",()=>i),a.export(r,"isStringOrNumber",()=>n),a.export(r,"secondToTime",()=>s),a.export(r,"escape",()=>l)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],AKEiO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"ComponentOption",()=>d);var o=e("../utils");let i="array",n="boolean",s="string",l="number",c="object",p="function";function u(e,t,r){return(0,o.errorHandle)((t===s)??t===l??e instanceof Element,`${r.join(".")} require '${s}' or 'Element' type`)}let d={html:u,disable:`?${n}`,name:`?${s}`,index:`?${l}`,style:`?${c}`,click:`?${p}`,mounted:`?${p}`,tooltip:`?${s}|${l}`,width:`?${l}`,selector:`?${i}`,onSelect:`?${p}`,switch:`?${n}`,onSwitch:`?${p}`,range:`?${i}`,onRange:`?${p}`,onChange:`?${p}`};r.default={id:s,container:u,url:s,poster:s,type:s,theme:s,lang:s,volume:l,isLive:n,muted:n,autoplay:n,autoSize:n,autoMini:n,loop:n,flip:n,playbackRate:n,aspectRatio:n,screenshot:n,setting:n,hotkey:n,pip:n,mutex:n,backdrop:n,fullscreen:n,fullscreenWeb:n,subtitleOffset:n,miniProgressBar:n,useSSR:n,playsInline:n,lock:n,fastForward:n,autoPlayback:n,autoOrientation:n,airplay:n,plugins:[p],layers:[d],contextmenu:[d],settings:[d],controls:[{...d,position:(e,t,r)=>{let a=["top","left","right"];return(0,o.errorHandle)(a.includes(e),`${r.join(".")} only accept ${a.toString()} as parameters`)}}],quality:[{default:`?${n}`,html:s,url:s}],highlight:[{time:l,text:s}],thumbnails:{url:s,number:l,column:l,width:l,height:l},subtitle:{url:s,type:s,style:c,escape:n,encoding:s,onVttLoad:p},moreVideoAttr:c,i18n:c,icons:c,cssVar:c,customType:c}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lyjeQ:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],X13Zf:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");class o{constructor(e){this.art=e;let{option:t,constructor:r}=e;t.container instanceof Element?this.$container=t.container:(this.$container=(0,a.query)(t.container),(0,a.errorHandle)(this.$container,`No container element found by ${t.container}`));let o=this.$container.tagName.toLowerCase();(0,a.errorHandle)("div"===o,`Unsupported container element type, only support 'div' but got '${o}'`),(0,a.errorHandle)(r.instances.every(e=>e.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=e.id,this.$original=this.$container.cloneNode(!0),this.init()}static get html(){return` -
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Player version:
-
5.1.0
-
-
-
Video url:
-
-
-
-
Video volume:
-
-
-
-
Video time:
-
-
-
-
Video duration:
-
-
-
-
Video resolution:
-
- x -
-
-
-
[x]
-
-
-
- `}query(e){return(0,a.query)(e,this.$container)}init(){let{option:e}=this.art;e.useSSR||(this.$container.innerHTML=o.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),e.backdrop&&(0,a.addClass)(this.$player,"art-backdrop"),a.isMobile&&(0,a.addClass)(this.$player,"art-mobile")}destroy(e){e?(0,a.replaceElement)(this.$original,this.$container):(0,a.addClass)(this.$player,"art-destroy")}}r.default=o},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3jKkj":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./zh-cn"),n=a.interopDefault(i);r.default=class{constructor(e){this.art=e,this.languages={"zh-cn":n.default},this.language={},this.update(e.option.i18n)}init(){let e=this.art.option.lang.toLowerCase();this.language=this.languages[e]??{}}get(e){return this.language[e]??e}update(e){this.languages=(0,o.mergeDeep)(this.languages,e),this.init()}}},{"../utils":"71aH7","./zh-cn":"5Y91w","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5Y91w":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a={"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":"隔空播放不可用"};r.default=a,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=a)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],a90nx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./urlMix"),i=a.interopDefault(o),n=e("./attrMix"),s=a.interopDefault(n),l=e("./playMix"),c=a.interopDefault(l),p=e("./pauseMix"),u=a.interopDefault(p),d=e("./toggleMix"),f=a.interopDefault(d),h=e("./seekMix"),m=a.interopDefault(h),g=e("./volumeMix"),v=a.interopDefault(g),y=e("./currentTimeMix"),b=a.interopDefault(y),x=e("./durationMix"),w=a.interopDefault(x),j=e("./switchMix"),k=a.interopDefault(j),C=e("./playbackRateMix"),S=a.interopDefault(C),I=e("./aspectRatioMix"),T=a.interopDefault(I),$=e("./screenshotMix"),E=a.interopDefault($),M=e("./fullscreenMix"),F=a.interopDefault(M),D=e("./fullscreenWebMix"),H=a.interopDefault(D),z=e("./pipMix"),A=a.interopDefault(z),O=e("./loadedMix"),R=a.interopDefault(O),Y=e("./playedMix"),P=a.interopDefault(Y),L=e("./playingMix"),V=a.interopDefault(L),N=e("./autoSizeMix"),_=a.interopDefault(N),q=e("./rectMix"),B=a.interopDefault(q),W=e("./flipMix"),U=a.interopDefault(W),G=e("./miniMix"),K=a.interopDefault(G),Z=e("./loopMix"),X=a.interopDefault(Z),Q=e("./posterMix"),J=a.interopDefault(Q),ee=e("./autoHeightMix"),et=a.interopDefault(ee),er=e("./cssVarMix"),ea=a.interopDefault(er),eo=e("./themeMix"),ei=a.interopDefault(eo),en=e("./typeMix"),es=a.interopDefault(en),el=e("./stateMix"),ec=a.interopDefault(el),ep=e("./subtitleOffsetMix"),eu=a.interopDefault(ep),ed=e("./airplayMix"),ef=a.interopDefault(ed),eh=e("./qualityMix"),em=a.interopDefault(eh),eg=e("./optionInit"),ev=a.interopDefault(eg),ey=e("./eventInit"),eb=a.interopDefault(ey);r.default=class{constructor(e){(0,i.default)(e),(0,s.default)(e),(0,c.default)(e),(0,u.default)(e),(0,f.default)(e),(0,m.default)(e),(0,v.default)(e),(0,b.default)(e),(0,w.default)(e),(0,k.default)(e),(0,S.default)(e),(0,T.default)(e),(0,E.default)(e),(0,F.default)(e),(0,H.default)(e),(0,A.default)(e),(0,R.default)(e),(0,P.default)(e),(0,V.default)(e),(0,_.default)(e),(0,B.default)(e),(0,U.default)(e),(0,K.default)(e),(0,X.default)(e),(0,J.default)(e),(0,et.default)(e),(0,ea.default)(e),(0,ei.default)(e),(0,es.default)(e),(0,ec.default)(e),(0,eu.default)(e),(0,ef.default)(e),(0,em.default)(e),(0,eb.default)(e),(0,ev.default)(e)}}},{"./urlMix":"kQoac","./attrMix":"deCma","./playMix":"fOJuP","./pauseMix":"fzHAy","./toggleMix":"cBHxQ","./seekMix":"koAPr","./volumeMix":"6eyuR","./currentTimeMix":"faaWv","./durationMix":"5y91K","./switchMix":"iceD8","./playbackRateMix":"keKwh","./aspectRatioMix":"jihET","./screenshotMix":"36kPY","./fullscreenMix":"2GYOJ","./fullscreenWebMix":"5aYAP","./pipMix":"7EnIB","./loadedMix":"3N9mP","./playedMix":"et96R","./playingMix":"9DzzM","./autoSizeMix":"i1LDY","./rectMix":"IqARI","./flipMix":"7E7Vs","./miniMix":"gpugx","./loopMix":"f1hVG","./posterMix":"1SuFS","./autoHeightMix":"8x4te","./cssVarMix":"1CaTA","./themeMix":"2FqhO","./typeMix":"1fQQs","./stateMix":"iBOQW","./subtitleOffsetMix":"6vlBV","./airplayMix":"eftqT","./qualityMix":"5SdyX","./optionInit":"fCWZK","./eventInit":"f8Lv3","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kQoac:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,template:{$video:r}}=e;(0,o.def)(e,"url",{get:()=>r.src,async set(a){if(a){let i=e.url,n=t.type??(0,o.getExt)(a),s=t.customType[n];n&&s?(await (0,o.sleep)(),e.loading.show=!0,s.call(e,r,a,e)):(URL.revokeObjectURL(i),r.src=a),i!==e.url&&(e.option.url=a,e.isReady&&i&&e.once("video:canplay",()=>{e.emit("restart",a)}))}else await (0,o.sleep)(),e.loading.show=!0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],deCma:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t}}=e;(0,o.def)(e,"attr",{value(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fOJuP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,option:a,constructor:{instances:i},template:{$video:n}}=e;(0,o.def)(e,"play",{value:async function(){let o=await n.play();if(r.show=t.get("Play"),e.emit("play"),a.mutex)for(let t=0;ti);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"pause",{value(){let o=t.pause();return a.show=r.get("Pause"),e.emit("pause"),o}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cBHxQ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"toggle",{value:()=>e.playing?e.pause():e.play()})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],koAPr:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t}=e;(0,o.def)(e,"seek",{set(r){e.currentTime=r,e.emit("seek",e.currentTime),e.duration&&(t.show=`${(0,o.secondToTime)(e.currentTime)} / ${(0,o.secondToTime)(e.duration)}`)}}),(0,o.def)(e,"forward",{set(t){e.seek=e.currentTime+t}}),(0,o.def)(e,"backward",{set(t){e.seek=e.currentTime-t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6eyuR":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a,storage:i}=e;(0,o.def)(e,"volume",{get:()=>t.volume??0,set:e=>{t.volume=(0,o.clamp)(e,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*t.volume,10)}`,0!==t.volume&&i.set("volume",t.volume)}}),(0,o.def)(e,"muted",{get:()=>t.muted,set:r=>{t.muted=r,e.emit("muted",r)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],faaWv:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"currentTime",{get:()=>t.currentTime??0,set:r=>{Number.isNaN(r=parseFloat(r))||(t.currentTime=(0,o.clamp)(r,0,e.duration))}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5y91K":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"duration",{get:()=>{let{duration:t}=e.template.$video;return t===1/0?0:t??0}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iceD8:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){function t(t,r){return new Promise((a,o)=>{if(t===e.url)return;let{playing:i,aspectRatio:n,playbackRate:s}=e;e.pause(),e.url=t,e.notice.show="",e.once("video:error",o),e.once("video:canplay",async()=>{e.playbackRate=s,e.aspectRatio=n,e.currentTime=r,i&&await e.play(),e.notice.show="",a()})})}(0,o.def)(e,"switchQuality",{value:r=>t(r,e.currentTime)}),(0,o.def)(e,"switchUrl",{value:e=>t(e,0)}),(0,o.def)(e,"switch",{set:e.switchUrl})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],keKwh:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$video:t},i18n:r,notice:a}=e;(0,o.def)(e,"playbackRate",{get:()=>t.playbackRate,set(o){o?o!==t.playbackRate&&(t.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`):e.playbackRate=1}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jihET:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a,$player:i}}=e;(0,o.def)(e,"aspectRatio",{get:()=>i.dataset.aspectRatio??"default",set(n){if(n||(n="default"),"default"===n)(0,o.setStyle)(a,"width",null),(0,o.setStyle)(a,"height",null),(0,o.setStyle)(a,"margin",null),delete i.dataset.aspectRatio;else{let e=n.split(":").map(Number),{clientWidth:t,clientHeight:r}=i,s=t/r,l=e[0]/e[1];s>l?((0,o.setStyle)(a,"width",`${l*r}px`),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height",`${t/l}px`),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show=`${t.get("Aspect Ratio")}: ${"default"===n?t.get("Default"):n}`,e.emit("aspectRatio",n)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"36kPY":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{notice:t,template:{$video:r}}=e,a=(0,o.createElement)("canvas");(0,o.def)(e,"getDataURL",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),e(a.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"getBlobUrl",{value:()=>new Promise((e,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob(t=>{e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}),(0,o.def)(e,"screenshot",{value:async()=>{let t=await e.getDataURL();return(0,o.download)(t,`artplayer_${(0,o.secondToTime)(r.currentTime)}.png`),e.emit("screenshot",t),t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2GYOJ":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../libs/screenfull"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,template:{$video:a,$player:o}}=e,s=e=>{(0,i.default).on("change",()=>{e.emit("fullscreen",i.default.isFullscreen)}),(0,n.def)(e,"fullscreen",{get:()=>i.default.isFullscreen,async set(t){t?(e.state="fullscreen",await (0,i.default).request(o),(0,n.addClass)(o,"art-fullscreen")):(await (0,i.default).exit(),(0,n.removeClass)(o,"art-fullscreen")),e.emit("resize")}})},l=e=>{(0,n.def)(e,"fullscreen",{get:()=>a.webkitDisplayingFullscreen,set(t){t?(e.state="fullscreen",a.webkitEnterFullscreen(),e.emit("fullscreen",!0)):(a.webkitExitFullscreen(),e.emit("fullscreen",!1)),e.emit("resize")}})};e.once("video:loadedmetadata",()=>{i.default.isEnabled?s(e):document.fullscreenEnabled??a.webkitSupportsFullscreen?l(e):(0,n.def)(e,"fullscreen",{get:()=>!1,set(){r.show=t.get("Fullscreen Not Supported")}}),// Asynchronous setting -(0,n.def)(e,"fullscreen",(0,n.get)(e,"fullscreen"))})}},{"../libs/screenfull":"8v40z","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8v40z":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);let a=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],// New WebKit -["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],// Old WebKit -["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],o=(()=>{if("undefined"==typeof document)return!1;let e=a[0],t={};for(let r of a){let a=r[1];if(a in document){for(let[a,o]of r.entries())t[e[a]]=o;return t}}return!1})(),i={change:o.fullscreenchange,error:o.fullscreenerror},n={request:(e=document.documentElement,t)=>new Promise((r,a)=>{let i=()=>{n.off("change",i),r()};n.on("change",i);let s=e[o.requestFullscreen](t);s instanceof Promise&&s.then(i).catch(a)}),exit:()=>new Promise((e,t)=>{if(!n.isFullscreen){e();return}let r=()=>{n.off("change",r),e()};n.on("change",r);let a=document[o.exitFullscreen]();a instanceof Promise&&a.then(r).catch(t)}),toggle:(e,t)=>n.isFullscreen?n.exit():n.request(e,t),onchange(e){n.on("change",e)},onerror(e){n.on("error",e)},on(e,t){let r=i[e];r&&document.addEventListener(r,t,!1)},off(e,t){let r=i[e];r&&document.removeEventListener(r,t,!1)},raw:o};Object.defineProperties(n,{isFullscreen:{get:()=>!!document[o.fullscreenElement]},element:{enumerable:!0,get:()=>document[o.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>!!document[o.fullscreenEnabled]}}),o||(n={isEnabled:!1}),r.default=n},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5aYAP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$container:r,$player:a}}=e,i="";(0,o.def)(e,"fullscreenWeb",{get:()=>(0,o.hasClass)(a,"art-fullscreen-web"),set(n){n?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(r,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7EnIB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,notice:r,template:{$video:a}}=e;document.pictureInPictureEnabled?function(e){let{template:{$video:t},proxy:r,notice:a}=e;t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(e.state="pip",t.requestPictureInPicture().catch(e=>{throw a.show=e,e})):document.exitPictureInPicture().catch(e=>{throw a.show=e,e})}}),r(t,"enterpictureinpicture",()=>{e.emit("pip",!0)}),r(t,"leavepictureinpicture",()=>{e.emit("pip",!1)})}(e):a.webkitSupportsPresentationMode?function(e){let{$video:t}=e.template;t.webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:()=>"picture-in-picture"===t.webkitPresentationMode,set(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}(e):(0,o.def)(e,"pip",{get:()=>!1,set(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"3N9mP":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"loaded",{get:()=>e.loadedTime/t.duration}),(0,o.def)(e,"loadedTime",{get:()=>t.buffered.length?t.buffered.end(t.buffered.length-1):0})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],et96R:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"played",{get:()=>e.currentTime/e.duration})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"9DzzM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$video:t}=e.template;(0,o.def)(e,"playing",{get:()=>!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],i1LDY:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$container:t,$player:r,$video:a}=e.template;(0,o.def)(e,"autoSize",{value(){let{videoWidth:i,videoHeight:n}=a,{width:s,height:l}=t.getBoundingClientRect(),c=i/n;s/l>c?((0,o.setStyle)(r,"width",`${l*c/s*100}%`),(0,o.setStyle)(r,"height","100%")):((0,o.setStyle)(r,"width","100%"),(0,o.setStyle)(r,"height",`${s/c/l*100}%`)),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],IqARI:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"rect",{get:()=>e.template.$player.getBoundingClientRect()});let t=["bottom","height","left","right","top","width"];for(let r=0;re.rect[a]})}(0,o.def)(e,"x",{get:()=>e.left+window.pageXOffset}),(0,o.def)(e,"y",{get:()=>e.top+window.pageYOffset})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7E7Vs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$player:t},i18n:r,notice:a}=e;(0,o.def)(e,"flip",{get:()=>t.dataset.flip??"normal",set(i){i||(i="normal"),"normal"===i?delete t.dataset.flip:t.dataset.flip=i,a.show=`${r.get("Video Flip")}: ${r.get((0,o.capitalize)(i))}`,e.emit("flip",i)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gpugx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{icons:t,proxy:r,storage:a,template:{$player:i,$video:n}}=e,s=!1,l=0,c=0;function p(){let{$mini:t}=e.template;t&&((0,o.removeClass)(i,"art-mini"),(0,o.setStyle)(t,"display","none"),i.prepend(n),e.emit("mini",!1))}function u(t,r){e.playing?((0,o.setStyle)(t,"display","none"),(0,o.setStyle)(r,"display","flex")):((0,o.setStyle)(t,"display","flex"),(0,o.setStyle)(r,"display","none"))}function d(){let{$mini:t}=e.template,r=t.getBoundingClientRect(),i=window.innerHeight-r.height-50,n=window.innerWidth-r.width-50;a.set("top",i),a.set("left",n),(0,o.setStyle)(t,"top",`${i}px`),(0,o.setStyle)(t,"left",`${n}px`)}(0,o.def)(e,"mini",{get:()=>(0,o.hasClass)(i,"art-mini"),set(f){if(f){e.state="mini",(0,o.addClass)(i,"art-mini");let f=function(){let{$mini:i}=e.template;if(i)return(0,o.append)(i,n),(0,o.setStyle)(i,"display","flex");{let i=(0,o.createElement)("div");(0,o.addClass)(i,"art-mini-popup"),(0,o.append)(document.body,i),e.template.$mini=i,(0,o.append)(i,n);let d=(0,o.append)(i,'
');(0,o.append)(d,t.close),r(d,"click",p);let f=(0,o.append)(i,'
'),h=(0,o.append)(f,t.play),m=(0,o.append)(f,t.pause);return r(h,"click",()=>e.play()),r(m,"click",()=>e.pause()),u(h,m),e.on("video:playing",()=>u(h,m)),e.on("video:pause",()=>u(h,m)),e.on("video:timeupdate",()=>u(h,m)),r(i,"mousedown",e=>{s=0===e.button,l=e.pageX,c=e.pageY}),e.on("document:mousemove",e=>{if(s){(0,o.addClass)(i,"art-mini-droging");let t=e.pageX-l,r=e.pageY-c;(0,o.setStyle)(i,"transform",`translate(${t}px, ${r}px)`)}}),e.on("document:mouseup",()=>{if(s){s=!1,(0,o.removeClass)(i,"art-mini-droging");let e=i.getBoundingClientRect();a.set("left",e.left),a.set("top",e.top),(0,o.setStyle)(i,"left",`${e.left}px`),(0,o.setStyle)(i,"top",`${e.top}px`),(0,o.setStyle)(i,"transform",null)}}),i}}(),h=a.get("top"),m=a.get("left");h&&m?((0,o.setStyle)(f,"top",`${h}px`),(0,o.setStyle)(f,"left",`${m}px`),(0,o.isInViewport)(f)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f1hVG:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let t=[];(0,o.def)(e,"loop",{get:()=>t,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){let a=(0,o.clamp)(r[0],0,Math.min(r[1],e.duration)),i=(0,o.clamp)(r[1],a,e.duration);t=i-a>=1?[a,i]:[]}else t=[];e.emit("loop",t)}}),e.on("video:timeupdate",()=>{t.length&&((e.currentTimet[1])&&(e.seek=t[0])})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1SuFS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$poster:t}}=e;(0,o.def)(e,"poster",{get:()=>{try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set(e){(0,o.setStyle)(t,"backgroundImage",`url(${e})`)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8x4te":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{template:{$container:t,$video:r}}=e;(0,o.def)(e,"autoHeight",{value(){let{clientWidth:a}=t,{videoHeight:i,videoWidth:n}=r,s=i*(a/n);(0,o.setStyle)(t,"height",s+"px"),e.emit("autoHeight",s)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1CaTA":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{$player:t}=e.template;(0,o.def)(e,"cssVar",{value:(e,r)=>r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2FqhO":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"theme",{get:()=>e.cssVar("--art-theme"),set(t){e.cssVar("--art-theme",t)}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1fQQs":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"type",{get:()=>e.option.type,set(t){e.option.type=t}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],iBOQW:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let t=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(e,"state",{get:()=>t.find(t=>e[t])??"standard",set(r){for(let a=0;ai);var o=e("../utils");function i(e){let{clamp:t}=e.constructor.utils,{notice:r,template:a,i18n:i}=e,n=0,s=[];e.on("subtitle:switch",()=>{s=[]}),(0,o.def)(e,"subtitleOffset",{get:()=>n,set(o){if(a.$track&&a.$track.track){let l=Array.from(a.$track.track.cues);n=t(o,-5,5);for(let r=0;ri);var o=e("../utils");function i(e){let{i18n:t,notice:r,proxy:a,template:{$video:i}}=e,n=!0;window.WebKitPlaybackTargetAvailabilityEvent&&i.webkitShowPlaybackTargetPicker?a(i,"webkitplaybacktargetavailabilitychanged",e=>{switch(e.availability){case"available":n=!0;break;case"not-available":n=!1}}):n=!1,(0,o.def)(e,"airplay",{value(){n?(i.webkitShowPlaybackTargetPicker(),e.emit("airplay")):r.show=t.get("AirPlay Not Available")}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5SdyX":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){(0,o.def)(e,"quality",{set(t){let{controls:r,notice:a,i18n:o}=e,i=t.find(e=>e.default)??t[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:i?i.html:"",selector:t,async onSelect(t){await e.switchQuality(t.url),a.show=`${o.get("Switch Video")}: ${t.html}`}})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fCWZK:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{option:t,storage:r,template:{$video:a,$poster:i}}=e;for(let r in t.moreVideoAttr)e.attr(r,t.moreVideoAttr[r]);t.muted&&(e.muted=t.muted),t.volume&&(a.volume=(0,o.clamp)(t.volume,0,1));let n=r.get("volume");for(let r in"number"==typeof n&&(a.volume=(0,o.clamp)(n,0,1)),t.poster&&(0,o.setStyle)(i,"backgroundImage",`url(${t.poster})`),t.autoplay&&(a.autoplay=t.autoplay),t.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),t.theme&&(t.cssVar["--art-theme"]=t.theme),t.cssVar)e.cssVar(r,t.cssVar[r]);e.url=t.url}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],f8Lv3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>s);var o=e("../config"),i=a.interopDefault(o),n=e("../utils");function s(e){let{i18n:t,notice:r,option:a,constructor:o,proxy:s,template:{$player:l,$video:c,$poster:p}}=e,u=0;for(let t=0;t{e.emit(`video:${t.type}`,t)});// art.on('video:abort', () => { -// }); -e.on("video:canplay",()=>{u=0,e.loading.show=!1}),e.once("video:canplay",()=>{e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")}),// art.on('video:canplaythrough', () => { -// }); -// art.on('video:durationchange', () => { -// }); -// art.on('video:emptied', () => { -// }); -e.on("video:ended",()=>{a.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)}),e.on("video:error",async i=>{u { -// }); -e.on("video:loadedmetadata",()=>{e.emit("resize"),n.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",()=>{e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",()=>{e.controls.show=!0,e.mask.show=!0}),e.on("video:play",()=>{e.mask.show=!1,(0,n.setStyle)(p,"display","none")}),e.on("video:playing",()=>{e.mask.show=!1}),e.on("video:progress",()=>{e.playing&&(e.loading.show=!1)}),// art.on('video:ratechange', () => { -// }); -e.on("video:seeked",()=>{e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",()=>{e.loading.show=!0,e.mask.show=!1}),// art.on('video:stalled', () => { -// }); -// art.on('video:suspend', () => { -// }); -e.on("video:timeupdate",()=>{e.mask.show=!1}),// art.on('video:volumechange', () => { -// }); -e.on("video:waiting",()=>{e.loading.show=!0,e.mask.show=!1})}},{"../config":"lyjeQ","../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8Z0Uf":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("../utils/component"),n=a.interopDefault(i),s=e("./fullscreen"),l=a.interopDefault(s),c=e("./fullscreenWeb"),p=a.interopDefault(c),u=e("./pip"),d=a.interopDefault(u),f=e("./playAndPause"),h=a.interopDefault(f),m=e("./progress"),g=a.interopDefault(m),v=e("./time"),y=a.interopDefault(v),b=e("./volume"),x=a.interopDefault(b),w=e("./setting"),j=a.interopDefault(w),k=e("./thumbnails"),C=a.interopDefault(k),S=e("./screenshot"),I=a.interopDefault(S),T=e("./loop"),$=a.interopDefault(T),E=e("./airplay"),M=a.interopDefault(E);class F extends n.default{constructor(e){super(e),this.name="control";let{proxy:t,constructor:r,template:{$player:a}}=e,i=Date.now();t(a,["click","mousemove","touchstart","touchmove"],()=>{this.show=!0,(0,o.removeClass)(a,"art-hide-cursor"),(0,o.addClass)(a,"art-hover"),i=Date.now()}),e.on("video:timeupdate",()=>{!e.isInput&&e.playing&&this.show&&Date.now()-i>=r.CONTROL_HIDE_TIME&&(this.show=!1,(0,o.addClass)(a,"art-hide-cursor"),(0,o.removeClass)(a,"art-hover"))}),this.init()}init(){let{option:e}=this.art;e.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),!e.thumbnails.url||e.isLive||o.isMobile||this.add((0,C.default)({name:"thumbnails",position:"top",index:20})),this.add((0,$.default)({name:"loop",position:"top",index:30})),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),e.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),e.quality.length&&(0,o.sleep)().then(()=>{this.art.quality=e.quality}),e.screenshot&&!o.isMobile&&this.add((0,I.default)({name:"screenshot",position:"right",index:20})),e.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),e.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),e.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,M.default)({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&this.add((0,p.default)({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let t=0;tNumber(e.dataset.index)>=Number(i.dataset.index));p?p.insertAdjacentElement("beforebegin",i):(0,o.append)(this.$parent,i),t.html&&(0,o.append)(i,t.html),t.style&&(0,o.setStyles)(i,t.style),t.tooltip&&(0,o.tooltip)(i,t.tooltip);let u=[];if(t.click){let e=this.art.events.proxy(i,"click",e=>{e.preventDefault(),t.click.call(this.art,this,e)});u.push(e)}return t.selector&&["left","right"].includes(t.position)&&this.addSelector(t,i,u),this[r]=i,this.cache.set(r,{$ref:i,events:u,option:t}),t.mounted&&t.mounted.call(this.art,i),i}addSelector(e,t,r){let{hover:a,proxy:n}=this.art.events;(0,o.addClass)(t,"art-control-selector");let s=(0,o.createElement)("div");(0,o.addClass)(s,"art-selector-value"),(0,o.append)(s,e.html),t.innerText="",(0,o.append)(t,s);let l=e.selector.map((e,t)=>`
${e.html}
`).join(""),c=(0,o.createElement)("div");(0,o.addClass)(c,"art-selector-list"),(0,o.append)(c,l),(0,o.append)(t,c);let p=()=>{let e=(0,o.getStyle)(t,"width"),r=(0,o.getStyle)(c,"width");c.style.left=`${e/2-r/2}px`};a(t,p);let u=n(c,"click",async t=>{let r=t.composedPath()??[],a=r.find(e=>(0,o.hasClass)(e,"art-selector-item"));if(!a)return;(0,o.inverseClass)(a,"art-current");let n=Number(a.dataset.index),l=e.selector[n]??{};if(s.innerText=a.innerText,e.onSelect){let r=await e.onSelect.call(this.art,l,a,t);(0,i.isStringOrNumber)(r)&&(s.innerHTML=r)}p()});r.push(u)}remove(e){let t=this.cache.get(e);(0,n.errorHandle)(t,`Can't find [${e}] from the [${this.name}]`),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenOn),s=(0,o.append)(e,a.fullscreenOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreen=!t.fullscreen}),t.on("fullscreen",t=>{t?((0,o.tooltip)(e,i.get("Exit Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03jeB":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Web Fullscreen"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.fullscreenWebOn),s=(0,o.append)(e,a.fullscreenWebOff);(0,o.setStyle)(s,"display","none"),r(e,"click",()=>{t.fullscreenWeb=!t.fullscreenWeb}),t.on("fullscreenWeb",t=>{t?((0,o.tooltip)(e,i.get("Exit Web Fullscreen")),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(e,i.get("Web Fullscreen")),(0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],u8l8e:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("PIP Mode"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.pip),r(e,"click",()=>{t.pip=!t.pip}),t.on("pip",t=>{(0,o.tooltip)(e,i.get(t?"Exit PIP Mode":"PIP Mode"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ebXtb:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a,i18n:i}=t,n=(0,o.append)(e,a.play),s=(0,o.append)(e,a.pause);function l(){(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(s,"display","none")}function c(){(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(s,"display","flex")}(0,o.tooltip)(n,i.get("Play")),(0,o.tooltip)(s,i.get("Pause")),r(n,"click",()=>{t.play()}),r(s,"click",()=>{t.pause()}),t.playing?c():l(),t.on("video:playing",()=>{c()}),t.on("video:pause",()=>{l()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],bgoVP:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"getPosFromEvent",()=>i),a.export(r,"setCurrentTime",()=>n),a.export(r,"default",()=>s);var o=e("../utils");function i(e,t){let{$progress:r}=e.template,{left:a}=r.getBoundingClientRect(),i=o.isMobile?t.touches[0].clientX:t.clientX,n=(0,o.clamp)(i-a,0,r.clientWidth),s=n/r.clientWidth*e.duration,l=(0,o.secondToTime)(s),c=(0,o.clamp)(n/r.clientWidth,0,1);return{second:s,time:l,width:n,percentage:c}}function n(e,t){if(e.isRotate){let r=t.touches[0].clientY/e.height,a=r*e.duration;e.emit("setBar","played",r),e.seek=a}else{let{second:r,percentage:a}=i(e,t);e.emit("setBar","played",a),e.seek=r}}function s(e){return t=>{let{icons:r,option:a,proxy:s}=t;return{...e,html:` -
-
-
-
-
-
-
-
- `,mounted:e=>{let l=!1,c=(0,o.query)(".art-progress-hover",e),p=(0,o.query)(".art-progress-loaded",e),u=(0,o.query)(".art-progress-played",e),d=(0,o.query)(".art-progress-highlight",e),f=(0,o.query)(".art-progress-indicator",e),h=(0,o.query)(".art-progress-tip",e);function m(e,t){"loaded"===e&&(0,o.setStyle)(p,"width",`${100*t}%`),"played"===e&&((0,o.setStyle)(u,"width",`${100*t}%`),(0,o.setStyle)(f,"left",`${100*t}%`))}r.indicator?(0,o.append)(f,r.indicator):(0,o.setStyle)(f,"backgroundColor","var(--art-theme)"),t.on("video:loadedmetadata",()=>{for(let e=0;e`;(0,o.append)(d,n)}}),m("loaded",t.loaded),t.on("setBar",(e,t)=>{m(e,t)}),t.on("video:progress",()=>{m("loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",()=>{m("played",t.played)}):t.on("video:timeupdate",()=>{m("played",t.played)}),t.on("video:ended",()=>{m("played",1)}),o.isMobile||(s(e,"click",e=>{e.target!==f&&n(t,e)}),s(e,"mousemove",r=>{(function(e){let{width:r}=i(t,e);(0,o.setStyle)(c,"width",`${r}px`),(0,o.setStyle)(c,"display","flex")})(r),(0,o.setStyle)(h,"display","flex"),(0,o.includeFromEvent)(r,d)?function(r){let{width:a}=i(t,r),{text:n}=r.target.dataset;h.innerHTML=n;let s=h.clientWidth;a<=s/2?(0,o.setStyle)(h,"left",0):a>e.clientWidth-s/2?(0,o.setStyle)(h,"left",`${e.clientWidth-s}px`):(0,o.setStyle)(h,"left",`${a-s/2}px`)}(r):function(r){let{width:a,time:n}=i(t,r);h.innerHTML=n;let s=h.clientWidth;a<=s/2?(0,o.setStyle)(h,"left",0):a>e.clientWidth-s/2?(0,o.setStyle)(h,"left",`${e.clientWidth-s}px`):(0,o.setStyle)(h,"left",`${a-s/2}px`)}(r)}),s(e,"mouseleave",()=>{(0,o.setStyle)(h,"display","none"),(0,o.setStyle)(c,"display","none")}),s(e,"mousedown",e=>{l=0===e.button}),t.on("document:mousemove",e=>{if(l){let{second:r,percentage:a}=i(t,e);m("played",a),t.seek=r}}),t.on("document:mouseup",()=>{l&&(l=!1)}))}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ikc2j:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,style:o.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:e=>{function r(){let r=`${(0,o.secondToTime)(t.currentTime)} / ${(0,o.secondToTime)(t.duration)}`;r!==e.innerText&&(e.innerText=r)}r();let a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;ei);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let{proxy:r,icons:a}=t,i=(0,o.append)(e,a.volume),n=(0,o.append)(e,a.volumeClose),s=(0,o.append)(e,'
'),l=(0,o.append)(s,'
'),c=(0,o.append)(l,'
'),p=(0,o.append)(l,'
'),u=(0,o.append)(p,'
'),d=(0,o.append)(u,'
'),f=(0,o.append)(p,'
');function h(e){let{top:t,height:r}=p.getBoundingClientRect();return 1-(e.clientY-t)/r}function m(){if(t.muted??0===t.volume)(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(f,"top","100%"),(0,o.setStyle)(d,"top","100%"),c.innerText=0;else{let e=100*t.volume;(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(f,"top",`${100-e}%`),(0,o.setStyle)(d,"top",`${100-e}%`),c.innerText=Math.floor(e)}}if(m(),t.on("video:volumechange",m),r(i,"click",()=>{t.muted=!0}),r(n,"click",()=>{t.muted=!1}),o.isMobile)(0,o.setStyle)(s,"display","none");else{let e=!1;r(p,"mousedown",r=>{e=0===r.button,t.volume=h(r)}),t.on("document:mousemove",r=>{e&&(t.muted=!1,t.volume=h(r))}),t.on("document:mouseup",()=>{e&&(e=!1)})}}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"03o9l":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Show Setting"),mounted:e=>{let{proxy:r,icons:a,i18n:i}=t;(0,o.append)(e,a.setting),r(e,"click",()=>{t.setting.toggle(),t.setting.updateStyle()}),t.on("setting",t=>{(0,o.tooltip)(e,i.get(t?"Hide Setting":"Show Setting"))})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eCVx2:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>n);var o=e("../utils"),i=e("./progress");function n(e){return t=>({...e,mounted:e=>{let{option:r,template:{$progress:a,$video:n},events:{proxy:s,loadImg:l}}=t,c=null,p=!1,u=!1;s(a,"mousemove",async s=>{if(!p){p=!0;let e=await l(r.thumbnails.url);c=e,u=!0}u&&((0,o.setStyle)(e,"display","flex"),function(s){let{width:l}=(0,i.getPosFromEvent)(t,s),{url:p,number:u,column:d,width:f,height:h}=r.thumbnails,m=f??c.naturalWidth/d,g=h??m/(n.videoWidth/n.videoHeight),v=a.clientWidth/u,y=Math.floor(l/v);(0,o.setStyle)(e,"backgroundImage",`url(${p})`),(0,o.setStyle)(e,"height",`${g}px`),(0,o.setStyle)(e,"width",`${m}px`),(0,o.setStyle)(e,"backgroundPosition",`-${((y%d)??d-1)*m}px -${(Math.ceil(y/d)-1)*g}px`),l<=m/2?(0,o.setStyle)(e,"left",0):l>a.clientWidth-m/2?(0,o.setStyle)(e,"left",`${a.clientWidth-m}px`):(0,o.setStyle)(e,"left",`${l-m/2}px`)}(s))}),s(a,"mouseleave",()=>{(0,o.setStyle)(e,"display","none")}),t.on("hover",t=>{t||(0,o.setStyle)(e,"display","none")})}})}},{"../utils":"71aH7","./progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4KCF5":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("Screenshot"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.screenshot),r(e,"click",()=>{t.screenshot()})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2hIff":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,mounted:e=>{let r=(0,o.append)(e,''),a=(0,o.append)(e,'');t.on("loop",i=>{i&&i.length?((0,o.setStyle)(e,"display","flex"),(0,o.setStyle)(r,"left",`calc(${i[0]/t.duration*100}% - ${r.clientWidth}px)`),(0,o.setStyle)(a,"left",`${i[1]/t.duration*100}%`)):(0,o.setStyle)(e,"display","none")})}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4IS2d":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>({...e,tooltip:t.i18n.get("AirPlay"),mounted:e=>{let{proxy:r,icons:a}=t;(0,o.append)(e,a.airplay),r(e,"click",()=>t.airplay())}})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2KYsr":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("../utils/component"),n=a.interopDefault(i),s=e("./playbackRate"),l=a.interopDefault(s),c=e("./aspectRatio"),p=a.interopDefault(c),u=e("./flip"),d=a.interopDefault(u),f=e("./info"),h=a.interopDefault(f),m=e("./version"),g=a.interopDefault(m),v=e("./close"),y=a.interopDefault(v);class b extends n.default{constructor(e){super(e),this.name="contextmenu",this.$parent=e.template.$contextmenu,o.isMobile||this.init()}init(){let{option:e,proxy:t,template:{$player:r,$contextmenu:a}}=this.art;e.playbackRate&&this.add((0,l.default)({name:"playbackRate",index:10})),e.aspectRatio&&this.add((0,p.default)({name:"aspectRatio",index:20})),e.flip&&this.add((0,d.default)({name:"flip",index:30})),this.add((0,h.default)({name:"info",index:40})),this.add((0,g.default)({name:"version",index:50})),this.add((0,y.default)({name:"close",index:60}));for(let t=0;t{if(e.preventDefault(),!this.art.constructor.CONTEXTMENU)return;this.show=!0;let t=e.clientX,i=e.clientY,{height:n,width:s,left:l,top:c}=r.getBoundingClientRect(),{height:p,width:u}=a.getBoundingClientRect(),d=t-l,f=i-c;t+u>l+s&&(d=s-u),i+p>c+n&&(f=n-p),(0,o.setStyles)(a,{top:`${f}px`,left:`${d}px`})}),t(r,"click",e=>{(0,o.includeFromEvent)(e,a)||(this.show=!1)}),this.art.on("blur",()=>{this.show=!1})}}r.default=b},{"../utils":"71aH7","../utils/component":"18nVI","./playbackRate":"69eLi","./aspectRatio":"lUefg","./flip":"kysiM","./info":"gqIgJ","./version":"kRU7C","./close":"jQ8Pm","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"69eLi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{PLAYBACK_RATE:a}}=t,i=a.map(e=>`${1===e?r.get("Normal"):e.toFixed(1)}`).join("");return{...e,html:`${r.get("Play Speed")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.playbackRate=Number(a),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="1"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("video:ratechange",()=>{let r=(0,o.queryAll)("span",e).find(e=>Number(e.dataset.value)===t.playbackRate);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],lUefg:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{ASPECT_RATIO:a}}=t,i=a.map(e=>`${"default"===e?r.get("Default"):e}`).join("");return{...e,html:`${r.get("Aspect Ratio")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.aspectRatio=a,e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="default"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("aspectRatio",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kysiM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){return t=>{let{i18n:r,constructor:{FLIP:a}}=t,i=a.map(e=>`${r.get((0,o.capitalize)(e))}`).join("");return{...e,html:`${r.get("Video Flip")}: ${i}`,click:(e,r)=>{let{value:a}=r.target.dataset;a&&(t.flip=a.toLowerCase(),e.show=!1)},mounted:e=>{let r=(0,o.query)('[data-value="normal"]',e);r&&(0,o.inverseClass)(r,"art-current"),t.on("flip",t=>{let r=(0,o.queryAll)("span",e).find(e=>e.dataset.value===t);r&&(0,o.inverseClass)(r,"art-current")})}}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],gqIgJ:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Video Info"),click:e=>{t.info.show=!0,e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],kRU7C:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return{...e,html:'ArtPlayer 5.1.0'}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jQ8Pm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return t=>({...e,html:t.i18n.get("Close"),click:e=>{e.show=!1}})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"02ajl":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="info",o.isMobile||this.init()}init(){let{proxy:e,constructor:t,template:{$infoPanel:r,$infoClose:a,$video:i}}=this.art;e(a,"click",()=>{this.show=!1});let n=null,s=(0,o.queryAll)("[data-video]",r)??[];this.art.on("destroy",()=>clearTimeout(n)),function e(){for(let e=0;enull,this.init(e.option.subtitle);let t=!1;e.on("video:timeupdate",()=>{if(!this.url)return;let e=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof e&&e!==t&&(t=e,this.createTrack(e?"subtitles":"metadata",this.url))})}get url(){return this.art.template.$track.src}set url(e){this.switch(e)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(e,t){let{$subtitle:r}=this.art.template;return"object"==typeof e?(0,o.setStyles)(r,e):(0,o.setStyle)(r,e,t)}update(){let{$subtitle:e}=this.art.template;e.innerHTML="",this.activeCue&&(this.art.option.subtitle.escape?e.innerHTML=this.activeCue.text.split(/\r?\n/).map(e=>`

${(0,o.escape)(e)}

`).join(""):e.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(e,t={}){let{i18n:r,notice:a,option:o}=this.art,i={...o.subtitle,...t,url:e},n=await this.init(i);return t.name&&(a.show=`${r.get("Switch Subtitle")}: ${t.name}`),n}createTrack(e,t){let{template:r,proxy:a}=this.art,{$video:i,$track:n}=r,s=(0,o.createElement)("track");s.default=!0,s.kind=e,s.src=t,s.track.mode="hidden",this.eventDestroy(),(0,o.remove)(n),(0,o.append)(i,s),r.$track=s,this.eventDestroy=a(this.textTrack,"cuechange",()=>this.update())}async init(e){let{notice:t,template:{$subtitle:r}}=this.art;if((0,l.default)(e,p.default.subtitle),e.url)return this.style(e.style),fetch(e.url).then(e=>e.arrayBuffer()).then(t=>{let r=new TextDecoder(e.encoding),a=r.decode(t);switch(this.art.emit("subtitleLoad",e.url),e.type??(0,o.getExt)(e.url)){case"srt":{let t=(0,o.srtToVtt)(a),r=e.onVttLoad(t);return(0,o.vttToBlob)(r)}case"ass":{let t=(0,o.assToVtt)(a),r=e.onVttLoad(t);return(0,o.vttToBlob)(r)}case"vtt":{let t=e.onVttLoad(a);return(0,o.vttToBlob)(t)}default:return e.url}}).then(e=>(r.innerHTML="",this.url===e||(URL.revokeObjectURL(this.url),this.createTrack("metadata",e),this.art.emit("subtitleSwitch",e)),e)).catch(e=>{throw r.innerHTML="",t.show=e,e})}}r.default=u},{"./utils":"71aH7","./utils/component":"18nVI","option-validator":"bAWi2","./scheme":"AKEiO","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],jo4S1:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils/error"),i=e("./clickInit"),n=a.interopDefault(i),s=e("./hoverInit"),l=a.interopDefault(s),c=e("./moveInit"),p=a.interopDefault(c),u=e("./resizeInit"),d=a.interopDefault(u),f=e("./gestureInit"),h=a.interopDefault(f),m=e("./viewInit"),g=a.interopDefault(m),v=e("./documentInit"),y=a.interopDefault(v),b=e("./updateInit"),x=a.interopDefault(b);r.default=class{constructor(e){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,n.default)(e,this),(0,l.default)(e,this),(0,p.default)(e,this),(0,d.default)(e,this),(0,h.default)(e,this),(0,g.default)(e,this),(0,y.default)(e,this),(0,x.default)(e,this)}proxy(e,t,r,a={}){if(Array.isArray(t))return t.map(t=>this.proxy(e,t,r,a));e.addEventListener(t,r,a);let o=()=>e.removeEventListener(t,r,a);return this.destroyEvents.push(o),o}hover(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}loadImg(e){return new Promise((t,r)=>{let a;if(e instanceof HTMLImageElement)a=e;else{if("string"!=typeof e)return r(new o.ArtPlayerError("Unable to get Image"));(a=new Image).src=e}if(a.complete)return t(a);this.proxy(a,"load",()=>t(a)),this.proxy(a,"error",()=>r(new o.ArtPlayerError(`Failed to load Image: ${a.src}`)))})}remove(e){let t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}destroy(){for(let e=0;ei);var o=e("../utils");function i(e,t){let{constructor:r,template:{$player:a,$video:i}}=e;t.proxy(document,["click","contextmenu"],t=>{(0,o.includeFromEvent)(t,a)?(e.isInput="INPUT"===t.target.tagName,e.isFocus=!0,e.emit("focus",t)):(e.isInput=!1,e.isFocus=!1,e.emit("blur",t))});let n=0;t.proxy(i,"click",t=>{let a=Date.now(),{MOBILE_CLICK_PLAY:i,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r;a-n<=s?(e.emit("dblclick",t),o.isMobile?!e.isLock&&l&&e.toggle():c&&(e.fullscreen=!e.fullscreen)):(e.emit("click",t),o.isMobile?!e.isLock&&i&&e.toggle():e.toggle()),n=a})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"4jWHi":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{$player:r}=e.template;t.hover(r,t=>{(0,o.addClass)(r,"art-hover"),e.emit("hover",!0,t)},t=>{(0,o.removeClass)(r,"art-hover"),e.emit("hover",!1,t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eqaUm:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){let{$player:r}=e.template;t.proxy(r,"mousemove",t=>{e.emit("mousemove",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],eDXPO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a}=e;e.on("resize",()=>{let{aspectRatio:t,notice:a}=e;"standard"===e.state&&r.autoSize&&e.autoSize(),e.aspectRatio=t,a.show=""});let i=(0,o.debounce)(()=>e.emit("resize"),a.RESIZE_TIME);t.proxy(window,["orientationchange","resize"],()=>i()),screen&&screen.orientation&&screen.orientation.onchange&&t.proxy(screen.orientation,"change",()=>i())}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"95GtS":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>n);var o=e("../utils"),i=e("../control/progress");function n(e,t){if(o.isMobile&&!e.option.isLive){let{$video:r,$progress:a}=e.template,n=null,s=!1,l=0,c=0,p=0,u=t=>{if(1===t.touches.length&&!e.isLock){n===a&&(0,i.setCurrentTime)(e,t),s=!0;let{pageX:r,pageY:o}=t.touches[0];l=r,c=o,p=e.currentTime}},d=t=>{if(1===t.touches.length&&s&&e.duration){let{pageX:a,pageY:i}=t.touches[0],s=function(e,t,r,a){var o=t-a,i=r-e,n=0;if(2>Math.abs(i)&&2>Math.abs(o))return n;var s=180*Math.atan2(o,i)/Math.PI;return s>=-45&&s<45?n=4:s>=45&&s<135?n=1:s>=-135&&s<-45?n=2:((s>=135&&s<=180)??(s>=-180&&s<-135))&&(n=3),n}(l,c,a,i),u=[3,4].includes(s),d=[1,2].includes(s),f=(u&&!e.isRotate)??(d&&e.isRotate);if(f){let t=(0,o.clamp)((a-l)/e.width,-1,1),s=(0,o.clamp)((i-c)/e.height,-1,1),u=e.isRotate?s:t,d=n===r?e.constructor.TOUCH_MOVE_RATIO:1,f=(0,o.clamp)(p+e.duration*u*d,0,e.duration);e.seek=f,e.emit("setBar","played",(0,o.clamp)(f/e.duration,0,1)),e.notice.show=`${(0,o.secondToTime)(f)} / ${(0,o.secondToTime)(e.duration)}`}}};t.proxy(a,"touchstart",e=>{n=a,u(e)}),t.proxy(r,"touchstart",e=>{n=r,u(e)}),t.proxy(r,"touchmove",d),t.proxy(a,"touchmove",d),t.proxy(document,"touchend",()=>{s&&(l=0,c=0,p=0,s=!1,n=null)})}}},{"../utils":"71aH7","../control/progress":"bgoVP","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],InUBx:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e,t){let{option:r,constructor:a,template:{$container:i}}=e,n=(0,o.throttle)(()=>{e.emit("view",(0,o.isInViewport)(i,a.SCROLL_GAP))},a.SCROLL_TIME);t.proxy(window,"scroll",()=>n()),e.on("view",t=>{r.autoMini&&(e.mini=!t)})}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hoLfM:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",t=>{e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",t=>{e.emit("document:mouseup",t)})}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cl8m3:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){let t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",()=>{cancelAnimationFrame(t)})}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6NoFy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var a=e("./utils");r.default=class{constructor(e){this.art=e,this.keys={},e.option.hotkey&&!a.isMobile&&this.init()}init(){let{proxy:e,constructor:t}=this.art;this.add(27,()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)}),this.add(32,()=>{this.art.toggle()}),this.add(37,()=>{this.art.backward=t.SEEK_STEP}),this.add(38,()=>{this.art.volume+=t.VOLUME_STEP}),this.add(39,()=>{this.art.forward=t.SEEK_STEP}),this.add(40,()=>{this.art.volume-=t.VOLUME_STEP}),e(window,"keydown",e=>{if(this.art.isFocus){let t=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==t&&"TEXTAREA"!==t&&""!==r&&"true"!==r){let t=this.keys[e.keyCode];if(t){e.preventDefault();for(let r=0;r{o.innerText="",(0,a.removeClass)(r,"art-notice-show")},t.NOTICE_TIME)):(0,a.removeClass)(r,"art-notice-show")}}},{"./utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"5POkG":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./utils"),i=e("./utils/component"),n=a.interopDefault(i);class s extends n.default{constructor(e){super(e),this.name="mask";let{template:t,icons:r,events:a}=e,i=(0,o.append)(t.$state,r.state),n=(0,o.append)(t.$state,r.error);(0,o.setStyle)(n,"display","none"),e.on("destroy",()=>{(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(n,"display",null)}),a.proxy(t.$state,"click",()=>e.play())}}r.default=s},{"./utils":"71aH7","./utils/component":"18nVI","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"6OeNg":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("bundle-text:./loading.svg"),n=a.interopDefault(i),s=e("bundle-text:./state.svg"),l=a.interopDefault(s),c=e("bundle-text:./check.svg"),p=a.interopDefault(c),u=e("bundle-text:./play.svg"),d=a.interopDefault(u),f=e("bundle-text:./pause.svg"),h=a.interopDefault(f),m=e("bundle-text:./volume.svg"),g=a.interopDefault(m),v=e("bundle-text:./volume-close.svg"),y=a.interopDefault(v),b=e("bundle-text:./screenshot.svg"),x=a.interopDefault(b),w=e("bundle-text:./setting.svg"),j=a.interopDefault(w),k=e("bundle-text:./arrow-left.svg"),C=a.interopDefault(k),S=e("bundle-text:./arrow-right.svg"),I=a.interopDefault(S),T=e("bundle-text:./playback-rate.svg"),$=a.interopDefault(T),E=e("bundle-text:./aspect-ratio.svg"),M=a.interopDefault(E),F=e("bundle-text:./config.svg"),D=a.interopDefault(F),H=e("bundle-text:./pip.svg"),z=a.interopDefault(H),A=e("bundle-text:./lock.svg"),O=a.interopDefault(A),R=e("bundle-text:./unlock.svg"),Y=a.interopDefault(R),P=e("bundle-text:./fullscreen-off.svg"),L=a.interopDefault(P),V=e("bundle-text:./fullscreen-on.svg"),N=a.interopDefault(V),_=e("bundle-text:./fullscreen-web-off.svg"),q=a.interopDefault(_),B=e("bundle-text:./fullscreen-web-on.svg"),W=a.interopDefault(B),U=e("bundle-text:./switch-on.svg"),G=a.interopDefault(U),K=e("bundle-text:./switch-off.svg"),Z=a.interopDefault(K),X=e("bundle-text:./flip.svg"),Q=a.interopDefault(X),J=e("bundle-text:./error.svg"),ee=a.interopDefault(J),et=e("bundle-text:./close.svg"),er=a.interopDefault(et),ea=e("bundle-text:./airplay.svg"),eo=a.interopDefault(ea);r.default=class{constructor(e){let t={loading:n.default,state:l.default,play:d.default,pause:h.default,check:p.default,volume:g.default,volumeClose:y.default,screenshot:x.default,setting:j.default,pip:z.default,arrowLeft:C.default,arrowRight:I.default,playbackRate:$.default,aspectRatio:M.default,config:D.default,lock:O.default,flip:Q.default,unlock:Y.default,fullscreenOff:L.default,fullscreenOn:N.default,fullscreenWebOff:q.default,fullscreenWebOn:W.default,switchOn:G.default,switchOff:Z.default,error:ee.default,close:er.default,airplay:eo.default,...e.option.icons};for(let e in t)(0,o.def)(this,e,{get:()=>(0,o.getIcon)(e,t[e])})}}},{"../utils":"71aH7","bundle-text:./loading.svg":"7tDub","bundle-text:./state.svg":"1ElZc","bundle-text:./check.svg":"lmgoP","bundle-text:./play.svg":"lVWoQ","bundle-text:./pause.svg":"5Mnax","bundle-text:./volume.svg":"w3eIa","bundle-text:./volume-close.svg":"rHjo1","bundle-text:./screenshot.svg":"2KcqM","bundle-text:./setting.svg":"8rQMV","bundle-text:./arrow-left.svg":"kqGBE","bundle-text:./arrow-right.svg":"aFjpC","bundle-text:./playback-rate.svg":"lx7ZM","bundle-text:./aspect-ratio.svg":"2sEjf","bundle-text:./config.svg":"fQTgE","bundle-text:./pip.svg":"2CaxO","bundle-text:./lock.svg":"aCGnW","bundle-text:./unlock.svg":"bTrAV","bundle-text:./fullscreen-off.svg":"bA3p0","bundle-text:./fullscreen-on.svg":"fTuY8","bundle-text:./fullscreen-web-off.svg":"tvKf4","bundle-text:./fullscreen-web-on.svg":"1F1oB","bundle-text:./switch-on.svg":"7qNHs","bundle-text:./switch-off.svg":"28aV8","bundle-text:./flip.svg":"1uXI6","bundle-text:./error.svg":"9f4dh","bundle-text:./close.svg":"4nTtS","bundle-text:./airplay.svg":"cDPXC","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"7tDub":[function(e,t,r){t.exports=''},{}],"1ElZc":[function(e,t,r){t.exports=''},{}],lmgoP:[function(e,t,r){t.exports=''},{}],lVWoQ:[function(e,t,r){t.exports=''},{}],"5Mnax":[function(e,t,r){t.exports=''},{}],w3eIa:[function(e,t,r){t.exports=''},{}],rHjo1:[function(e,t,r){t.exports=''},{}],"2KcqM":[function(e,t,r){t.exports=''},{}],"8rQMV":[function(e,t,r){t.exports=''},{}],kqGBE:[function(e,t,r){t.exports=''},{}],aFjpC:[function(e,t,r){t.exports=''},{}],lx7ZM:[function(e,t,r){t.exports=''},{}],"2sEjf":[function(e,t,r){t.exports=''},{}],fQTgE:[function(e,t,r){t.exports=''},{}],"2CaxO":[function(e,t,r){t.exports=''},{}],aCGnW:[function(e,t,r){t.exports=''},{}],bTrAV:[function(e,t,r){t.exports=''},{}],bA3p0:[function(e,t,r){t.exports=''},{}],fTuY8:[function(e,t,r){t.exports=''},{}],tvKf4:[function(e,t,r){t.exports=''},{}],"1F1oB":[function(e,t,r){t.exports=''},{}],"7qNHs":[function(e,t,r){t.exports=''},{}],"28aV8":[function(e,t,r){t.exports=''},{}],"1uXI6":[function(e,t,r){t.exports=''},{}],"9f4dh":[function(e,t,r){t.exports=''},{}],"4nTtS":[function(e,t,r){t.exports=''},{}],cDPXC:[function(e,t,r){t.exports=''},{}],"3eYNH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("./flip"),i=a.interopDefault(o),n=e("./aspectRatio"),s=a.interopDefault(n),l=e("./playbackRate"),c=a.interopDefault(l),p=e("./subtitleOffset"),u=a.interopDefault(p),d=e("../utils/component"),f=a.interopDefault(d),h=e("../utils/error"),m=e("../utils");class g extends f.default{constructor(e){super(e);let{option:t,controls:r,template:{$setting:a}}=e;this.name="setting",this.$parent=a,this.option=[],this.events=[],this.cache=new Map,t.setting&&(this.init(),e.on("blur",()=>{this.show&&(this.show=!1,this.render(this.option))}),e.on("focus",e=>{let t=(0,m.includeFromEvent)(e,r.setting),a=(0,m.includeFromEvent)(e,this.$parent);!this.show||t||a||(this.show=!1,this.render(this.option))}))}static makeRecursion(e,t,r){for(let a=0;a
'),n=(0,m.createElement)("div");(0,m.addClass)(n,"art-setting-item-left-icon"),(0,m.append)(n,t.arrowLeft),(0,m.append)(i,n),(0,m.append)(i,e.$parentItem.html);let s=r(o,"click",()=>this.render(e.$parentList));return this.events.push(s),o}creatItem(e,t){let{icons:r,proxy:a,constructor:o}=this.art,i=(0,m.createElement)("div");(0,m.addClass)(i,"art-setting-item"),(0,m.setStyle)(i,"height",`${o.SETTING_ITEM_HEIGHT}px`),(0,m.isStringOrNumber)(t.name)&&(i.dataset.name=t.name),(0,m.isStringOrNumber)(t.value)&&(i.dataset.value=t.value);let n=(0,m.append)(i,'
'),s=(0,m.append)(i,'
'),l=(0,m.createElement)("div");switch((0,m.addClass)(l,"art-setting-item-left-icon"),e){case"switch":case"range":(0,m.append)(l,(0,m.isStringOrNumber)(t.icon)??t.icon instanceof Element?t.icon:r.config);break;case"selector":t.selector&&t.selector.length?(0,m.append)(l,(0,m.isStringOrNumber)(t.icon)??t.icon instanceof Element?t.icon:r.config):(0,m.append)(l,r.check)}(0,m.append)(n,l),t.$icon=l,(0,m.def)(t,"icon",{configurable:!0,get:()=>l.innerHTML,set(e){(0,m.isStringOrNumber)(e)&&(l.innerHTML=e)}});let c=(0,m.createElement)("div");(0,m.addClass)(c,"art-setting-item-left-text"),(0,m.append)(c,t.html??""),(0,m.append)(n,c),t.$html=c,(0,m.def)(t,"html",{configurable:!0,get:()=>c.innerHTML,set(e){(0,m.isStringOrNumber)(e)&&(c.innerHTML=e)}});let p=(0,m.createElement)("div");switch((0,m.addClass)(p,"art-setting-item-right-tooltip"),(0,m.append)(p,t.tooltip??""),(0,m.append)(s,p),t.$tooltip=p,(0,m.def)(t,"tooltip",{configurable:!0,get:()=>p.innerHTML,set(e){(0,m.isStringOrNumber)(e)&&(p.innerHTML=e)}}),e){case"switch":{let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon");let a=(0,m.append)(e,r.switchOn),o=(0,m.append)(e,r.switchOff);(0,m.setStyle)(t.switch?o:a,"display","none"),(0,m.append)(s,e),t.$switch=t.switch,(0,m.def)(t,"switch",{configurable:!0,get:()=>t.$switch,set(e){t.$switch=e,e?((0,m.setStyle)(o,"display","none"),(0,m.setStyle)(a,"display",null)):((0,m.setStyle)(o,"display",null),(0,m.setStyle)(a,"display","none"))}});break}case"range":{let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon");let r=(0,m.append)(e,'');r.value=t.range[0]??0,r.min=t.range[1]??0,r.max=t.range[2]??10,r.step=t.range[3]??1,(0,m.addClass)(r,"art-setting-range"),(0,m.append)(s,e),t.$range=r,(0,m.def)(t,"range",{configurable:!0,get:()=>r.valueAsNumber,set(e){r.value=Number(e)}})}break;case"selector":if(t.selector&&t.selector.length){let e=(0,m.createElement)("div");(0,m.addClass)(e,"art-setting-item-right-icon"),(0,m.append)(e,r.arrowRight),(0,m.append)(s,e)}}switch(e){case"switch":if(t.onSwitch){let e=a(i,"click",async e=>{t.switch=await t.onSwitch.call(this.art,t,i,e)});this.events.push(e)}break;case"range":if(t.$range){if(t.onRange){let e=a(t.$range,"change",async e=>{t.tooltip=await t.onRange.call(this.art,t,i,e)});this.events.push(e)}if(t.onChange){let e=a(t.$range,"input",async e=>{t.tooltip=await t.onChange.call(this.art,t,i,e)});this.events.push(e)}}break;case"selector":{let e=a(i,"click",async e=>{if(t.selector&&t.selector.length)this.render(t.selector,t.width);else{(0,m.inverseClass)(i,"art-current");for(let e=0;ec?((0,m.setStyle)(o,"left",null),(0,m.setStyle)(o,"right",null)):((0,m.setStyle)(o,"left",`${p}px`),(0,m.setStyle)(o,"right","auto"))}}render(e,t){let{constructor:r}=this.art;if(this.cache.has(e)){let t=this.cache.get(e);(0,m.inverseClass)(t,"art-current"),(0,m.setStyle)(this.$parent,"width",`${t.dataset.width}px`),(0,m.setStyle)(this.$parent,"height",`${t.dataset.height}px`),this.updateStyle(Number(t.dataset.width))}else{let a=(0,m.createElement)("div");(0,m.addClass)(a,"art-setting-panel"),a.dataset.width=t??r.SETTING_WIDTH,a.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0].$parentItem&&((0,m.append)(a,this.creatHeader(e[0])),a.dataset.height=Number(a.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let t=0;ti);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,FLIP:i}}=e;function n(e,r,a){r&&(r.innerText=t.get((0,o.capitalize)(a)));let i=(0,o.queryAll)(".art-setting-item",e).find(e=>e.dataset.value===a);i&&(0,o.inverseClass)(i,"art-current")}return{width:a,name:"flip",html:t.get("Video Flip"),tooltip:t.get((0,o.capitalize)(e.flip)),icon:r.flip,selector:i.map(r=>({value:r,name:`aspect-ratio-${r}`,default:r===e.flip,html:t.get((0,o.capitalize)(r))})),onSelect:t=>(e.flip=t.value,t.html),mounted:(t,r)=>{n(t,r.$tooltip,e.flip),e.on("flip",()=>{n(t,r.$tooltip,e.flip)})}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"84NBV":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:i}}=e;function n(e){return"default"===e?t.get("Default"):e}function s(e,t,r){t&&(t.innerText=n(r));let a=(0,o.queryAll)(".art-setting-item",e).find(e=>e.dataset.value===r);a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"aspect-ratio",html:t.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:n(e.aspectRatio),selector:i.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.aspectRatio,html:n(t)})),onSelect:t=>(e.aspectRatio=t.value,t.html),mounted:(t,r)=>{s(t,r.$tooltip,e.aspectRatio),e.on("aspectRatio",()=>{s(t,r.$tooltip,e.aspectRatio)})}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],aetWt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:i}}=e;function n(e){return 1===e?t.get("Normal"):e.toFixed(1)}function s(e,t,r){t&&(t.innerText=n(r));let a=(0,o.queryAll)(".art-setting-item",e).find(e=>Number(e.dataset.value)===r);a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"playback-rate",html:t.get("Play Speed"),tooltip:n(e.playbackRate),icon:r.playbackRate,selector:i.map(t=>({value:t,name:`aspect-ratio-${t}`,default:t===e.playbackRate,html:n(t)})),onSelect:t=>(e.playbackRate=t.value,t.html),mounted:(t,r)=>{s(t,r.$tooltip,e.playbackRate),e.on("video:ratechange",()=>{s(t,r.$tooltip,e.playbackRate)})}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],fIBkO:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){let{i18n:t,icons:r,constructor:a}=e;return{width:a.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:t.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-5,5,.1],onChange:t=>(e.subtitleOffset=t.range,t.range+"s")}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"2aaJe":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(e){try{let t=JSON.parse(window.localStorage.getItem(this.name))??{};return e?t[e]:t}catch(t){return e?this.settings[e]:this.settings}}set(e,t){try{let r=Object.assign({},this.get(),{[e]:t});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[e]=t}}del(e){try{let t=this.get();delete t[e],window.localStorage.setItem(this.name,JSON.stringify(t))}catch(t){delete this.settings[e]}}clear(){try{window.localStorage.removeItem(this.name)}catch(e){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"8MTUM":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r);var o=e("../utils"),i=e("./miniProgressBar"),n=a.interopDefault(i),s=e("./autoOrientation"),l=a.interopDefault(s),c=e("./autoPlayback"),p=a.interopDefault(c),u=e("./fastForward"),d=a.interopDefault(u),f=e("./lock"),h=a.interopDefault(f);r.default=class{constructor(e){this.art=e,this.id=0;let{option:t}=e;t.miniProgressBar&&!t.isLive&&this.add(n.default),t.lock&&o.isMobile&&this.add(h.default),t.autoPlayback&&!t.isLive&&this.add(p.default),t.autoOrientation&&o.isMobile&&this.add(l.default),t.fastForward&&o.isMobile&&!t.isLive&&this.add(d.default);for(let e=0;e{e.layers.add({name:"mini-progress-bar",mounted(t){e.on("destroy",()=>{t.style.display="none"}),e.constructor.USE_RAF?e.on("raf",()=>{t.style.width=`${100*e.played}%`}):e.on("video:timeupdate",()=>{t.style.width=`${100*e.played}%`}),e.on("setBar",(e,r)=>{"played"===e&&(t.style.width=`${100*r}%`)})}})}),{name:"mini-progress-bar"}}a.defineInteropFlag(r),a.export(r,"default",()=>o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],ePEg5:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,template:{$player:r,$video:a}}=e;return e.on("fullscreenWeb",i=>{if(i){let{videoWidth:i,videoHeight:n}=a,{clientWidth:s,clientHeight:l}=document.documentElement;((i>n&&sl))&&setTimeout(()=>{(0,o.setStyle)(r,"width",`${l}px`),(0,o.setStyle)(r,"height",`${s}px`),(0,o.setStyle)(r,"transform-origin","0 0"),(0,o.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,o.addClass)(r,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")},t.AUTO_ORIENTATION_TIME)}else(0,o.hasClass)(r,"art-auto-orientation")&&((0,o.removeClass)(r,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))}),e.on("fullscreen",async e=>{let t=screen.orientation.type;if(e){let{videoWidth:e,videoHeight:i}=a,{clientWidth:n,clientHeight:s}=document.documentElement;if((e>i&&ns)){let e=t.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(e),(0,o.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,o.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(t),(0,o.removeClass)(r,"art-auto-orientation-fullscreen"))}),{name:"autoOrientation",get state(){return(0,o.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],cVO99:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{i18n:t,icons:r,storage:a,constructor:i,proxy:n,template:{$poster:s}}=e,l=e.layers.add({name:"auto-playback",html:` -
-
-
- `}),c=(0,o.query)(".art-auto-playback-last",l),p=(0,o.query)(".art-auto-playback-jump",l),u=(0,o.query)(".art-auto-playback-close",l);return e.on("video:timeupdate",()=>{if(e.playing){let t=a.get("times")??{},r=Object.keys(t);r.length>i.AUTO_PLAYBACK_MAX&&delete t[r[0]],t[e.option.id??e.option.url]=e.currentTime,a.set("times",t)}}),e.on("ready",()=>{let d=a.get("times")??{},f=d[e.option.id??e.option.url];f&&f>=i.AUTO_PLAYBACK_MIN&&((0,o.append)(u,r.close),(0,o.setStyle)(l,"display","flex"),c.innerText=`${t.get("Last Seen")} ${(0,o.secondToTime)(f)}`,p.innerText=t.get("Jump Play"),n(u,"click",()=>{(0,o.setStyle)(l,"display","none")}),n(p,"click",()=>{e.seek=f,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",()=>{setTimeout(()=>{(0,o.setStyle)(l,"display","none")},i.AUTO_PLAYBACK_TIMEOUT)}))}),{name:"auto-playback",get times(){return a.get("times")??{}},clear:()=>a.del("times"),delete(e){let t=a.get("times")??{};return delete t[e],a.set("times",t),t}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],hFDwt:[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{constructor:t,proxy:r,template:{$player:a,$video:i}}=e,n=null,s=!1,l=1,c=()=>{clearTimeout(n),s&&(s=!1,e.playbackRate=l,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",r=>{1===r.touches.length&&e.playing&&!e.isLock&&(n=setTimeout(()=>{s=!0,l=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}],"1hsTH":[function(e,t,r){var a=e("@parcel/transformer-js/src/esmodule-helpers.js");a.defineInteropFlag(r),a.export(r,"default",()=>i);var o=e("../utils");function i(e){let{layers:t,icons:r,template:{$player:a}}=e;return t.add({name:"lock",mounted(t){let a=(0,o.append)(t,r.lock),i=(0,o.append)(t,r.unlock);(0,o.setStyle)(a,"display","none"),e.on("lock",e=>{e?((0,o.setStyle)(a,"display","inline-flex"),(0,o.setStyle)(i,"display","none")):((0,o.setStyle)(a,"display","none"),(0,o.setStyle)(i,"display","inline-flex"))})},click(){(0,o.hasClass)(a,"art-lock")?((0,o.removeClass)(a,"art-lock"),this.isLock=!1,e.emit("lock",!1)):((0,o.addClass)(a,"art-lock"),this.isLock=!0,e.emit("lock",!0))}}),{name:"lock",get state(){return(0,o.hasClass)(a,"art-lock")}}}},{"../utils":"71aH7","@parcel/transformer-js/src/esmodule-helpers.js":"9pCYc"}]},["5lTcX"],"5lTcX","parcelRequire4dc0"); \ No newline at end of file +!function(t,e,r,o,a){var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof n[o]&&n[o],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 a="function"==typeof n[o]&&n[o];if(!r&&a)return a(e,!0);if(i)return i(e,!0);if(l&&"string"==typeof e)return l(e);var u=new Error("Cannot find module '"+e+"'");throw u.code="MODULE_NOT_FOUND",u}d.resolve=function(r){var o=t[e][1][r];return null!=o?o:r},d.cache={};var p=s[e]=new c.Module(e);t[e][0].call(p.exports,d,p,p.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[o]}}),n[o]=c;for(var u=0;ue.call(this,this))),K.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t("Version@"+K.version),t("Env@"+K.env),t("Build@"+K.build);for(let e=0;et("Event@"+e.type)))}G.push(this)}static get instances(){return G}static get version(){return"5.1.0"}static get env(){return"production"}static get build(){return"2023-08-26 16:47:28"}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:{},escape:!0,encoding:"utf-8",onVttLoad:t=>t},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(t=!0){this.events.destroy(),this.template.destroy(t),G.splice(G.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}if(r.default=K,K.DEBUG=!1,K.CONTEXTMENU=!0,K.NOTICE_TIME=2e3,K.SETTING_WIDTH=250,K.SETTING_ITEM_WIDTH=200,K.SETTING_ITEM_HEIGHT=35,K.RESIZE_TIME=200,K.SCROLL_TIME=200,K.SCROLL_GAP=50,K.AUTO_PLAYBACK_MAX=10,K.AUTO_PLAYBACK_MIN=5,K.AUTO_PLAYBACK_TIMEOUT=3e3,K.RECONNECT_TIME_MAX=5,K.RECONNECT_SLEEP_TIME=1e3,K.CONTROL_HIDE_TIME=3e3,K.DBCLICK_TIME=300,K.DBCLICK_FULLSCREEN=!0,K.MOBILE_DBCLICK_PLAY=!0,K.MOBILE_CLICK_PLAY=!1,K.AUTO_ORIENTATION_TIME=200,K.INFO_LOOP_TIME=1e3,K.FAST_FORWARD_VALUE=3,K.FAST_FORWARD_TIME=1e3,K.TOUCH_MOVE_RATIO=.5,K.VOLUME_STEP=.1,K.SEEK_STEP=5,K.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],K.ASPECT_RATIO=["default","4:3","16:9"],K.FLIP=["normal","horizontal","vertical"],K.FULLSCREEN_WEB_IN_BODY=!1,K.LOG_VERSION=!0,K.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){const t=u.createElement("style");t.id="artplayer-style",t.textContent=n.default,document.head.appendChild(t)}"undefined"!=typeof window&&(window.Artplayer=K),setTimeout((()=>{K.LOG_VERSION&&console.log(`%c ArtPlayer %c ${K.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")}))},{"bundle-text:./style/index.less":"kfOe8","option-validator":"bAWi2","./utils/emitter":"2bGVu","./utils":"h3rH9","./scheme":"AdvwB","./config":"9Xmqu","./template":"2gKYH","./i18n":"1AdeF","./player":"556MW","./control":"14IBq","./contextmenu":"7iUum","./info":"hD2Lg","./subtitle":"lum0D","./events":"1Epl5","./hotkey":"eTow4","./layer":"4fDoD","./loading":"fE0Sp","./notice":"9PuGy","./mask":"2etr0","./icons":"6dYSr","./setting":"bRHiA","./storage":"f2Thp","./plugins":"96ThS","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kfOe8:[function(t,e,r){e.exports='.art-video-player{--art-theme:red;--art-font-color:#fff;--art-background-color:#000;--art-text-shadow-color:#00000080;--art-transition-duration:.2s;--art-padding:10px;--art-border-radius:3px;--art-progress-height:6px;--art-progress-color:#fff3;--art-hover-color:#ffffff80;--art-loaded-color:#fff3;--art-loop-color:#ffffffbf;--art-state-size:80px;--art-state-opacity:.8;--art-bottom-height:100px;--art-bottom-offset:20px;--art-bottom-gap:5px;--art-highlight-width:8px;--art-highlight-color:#ffffff80;--art-loop-width:2px;--art-control-height:46px;--art-control-opacity:.75;--art-control-icon-size:36px;--art-control-icon-scale:1.1;--art-volume-height:120px;--art-volume-handle-size:14px;--art-lock-size:36px;--art-indicator-scale:0;--art-indicator-size:16px;--art-fullscreen-web-index:9999;--art-settings-icon-size:24px;--art-settings-max-height:300px;--art-selector-max-height:300px;--art-contextmenus-min-width:250px;--art-subtitle-font-size:20px;--art-subtitle-gap:5px;--art-subtitle-bottom:15px;--art-subtitle-border:#000;--art-widget-background:#000000d9;--art-tip-background:#00000080;--art-scrollbar-size:4px;--art-scrollbar-background:#ffffff40;--art-scrollbar-background-hover:#ffffff80;--art-mini-progress-height:2px}.art-bg-cover{background-position:50%;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x}.art-backdrop-filter{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.art-video-player{width:100%;height:100%;zoom:1;text-align:left;direction:ltr;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);-webkit-tap-highlight-color:#0000;-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none;outline:0;margin:0 auto;padding:0;font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;font-size:14px;line-height:1.3;position:relative}.art-video-player *,.art-video-player :before,.art-video-player :after{box-sizing:border-box;margin:0;padding:0}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{justify-content:center;align-items:center;line-height:1;display:flex}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{-webkit-backdrop-filter:saturate(180%)blur(20px);backdrop-filter:saturate(180%)blur(20px);background-color:#000000bf!important}.art-video{z-index:10;width:100%;height:100%;cursor:pointer;position:absolute;inset:0}.art-poster{z-index:11;width:100%;height:100%;pointer-events:none;background-position:50%;background-repeat:no-repeat;background-size:cover;position:absolute;inset:0}.art-video-player .art-subtitle{z-index:20;width:100%;text-align:center;pointer-events:none;justify-content:center;align-items:center;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration)ease;text-shadow:var(--art-subtitle-border)1px 0 1px,var(--art-subtitle-border)0 1px 1px,var(--art-subtitle-border)-1px 0 1px,var(--art-subtitle-border)0 -1px 1px,var(--art-subtitle-border)1px 1px 1px,var(--art-subtitle-border)-1px -1px 1px,var(--art-subtitle-border)1px -1px 1px,var(--art-subtitle-border)-1px 1px 1px;flex-direction:column;padding:0 5%;display:none;position:absolute}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-control-height) + var(--art-subtitle-bottom))}.art-danmuku{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0;overflow:hidden}.art-video-player .art-layers{z-index:40;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{z-index:50;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:flex;position:absolute;inset:0}.art-video-player .art-mask .art-state{opacity:0;width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;display:flex;transform:scale(2)}.art-video-player.art-mask-show .art-state{cursor:pointer;pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{z-index:70;width:100%;height:100%;pointer-events:none;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player .art-bottom{z-index:60;width:100%;height:100%;opacity:0;pointer-events:none;justify-content:flex-end;gap:var(--art-bottom-gap);padding:0 var(--art-padding);transition:opacity var(--art-transition-duration)ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(#0000,#0006,#000);background-position:bottom;background-repeat:repeat-x;flex-direction:column;display:flex;position:absolute;inset:0;overflow:hidden}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration)ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{z-index:0;pointer-events:auto;position:relative}.art-bottom .art-progress .art-control-progress{cursor:pointer;height:var(--art-progress-height);justify-content:center;align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{height:50%;width:100%;transition:height var(--art-transition-duration)ease;background-color:var(--art-progress-color);align-items:center;display:flex;position:relative}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{z-index:0;width:100%;height:100%;width:0%;background-color:var(--art-hover-color);display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{z-index:10;width:100%;height:100%;width:0%;background-color:var(--art-loaded-color);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{z-index:20;width:100%;height:100%;width:0%;background-color:var(--art-theme);position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{z-index:30;width:100%;height:100%;pointer-events:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{z-index:0;width:100%;height:100%;pointer-events:auto;width:var(--art-highlight-width);transform:translateX(calc(var(--art-highlight-width)/-2));background-color:var(--art-highlight-color);position:absolute;inset:0 auto 0 0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{z-index:40;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size)/-2);transition:transform var(--art-transition-duration)ease;border-radius:50%;justify-content:center;align-items:center;display:flex;position:absolute;left:0}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{z-index:50;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);padding:3px 5px;font-size:12px;line-height:1;display:none;position:absolute;top:-25px;left:0}.art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-bottom .art-progress .art-control-thumbnails{border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);display:none;position:absolute;bottom:10px;left:0;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom .art-progress .art-control-loop{z-index:0;width:100%;height:100%;pointer-events:none;display:none;position:absolute;inset:0}.art-bottom .art-progress .art-control-loop .art-loop-point{z-index:0;width:100%;height:100%;width:var(--art-loop-width);background-color:var(--art-loop-color);transform:translateX(calc(var(--art-loop-width)/-2))scaleY(1.5);position:absolute;inset:0 0 0 0%}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-controls{z-index:10;pointer-events:auto;height:var(--art-control-height);justify-content:space-between;align-items:center;display:flex;position:relative}.art-controls .art-controls-left,.art-controls .art-controls-right{height:100%;display:flex}.art-controls .art-controls-center{height:100%;flex:1;justify-content:center;align-items:center;padding:0 10px;display:none}.art-controls .art-controls-right{justify-content:flex-end}.art-controls .art-control{cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration)ease;flex-shrink:0;justify-content:center;align-items:center;display:flex}.art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration)ease}.art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale)*.8))}.art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{text-align:center;cursor:default;opacity:0;pointer-events:none;left:0;right:0;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:all var(--art-transition-duration)ease;justify-content:center;align-items:center;padding:0 5px;font-size:12px;display:flex;position:absolute;transform:translateY(10px)}.art-control-volume .art-volume-panel .art-volume-inner{height:100%;width:100%;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);flex-direction:column;align-items:center;gap:10px;padding:10px 0 12px;display:flex}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{width:100%;cursor:pointer;flex:1;justify-content:center;display:flex;position:relative}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{width:2px;border-radius:var(--art-border-radius);background-color:#ffffff40;justify-content:center;display:flex;position:relative;overflow:hidden}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{z-index:0;width:100%;height:100%;background-color:var(--art-theme);position:absolute;inset:0}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size)/-2);background-color:var(--art-theme);transition:transform var(--art-transition-duration)ease;border-radius:100%;flex-shrink:0;position:absolute;transform:scale(1)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel{opacity:1;pointer-events:auto;transform:translateY(0)}.art-video-player .art-notice{z-index:80;width:100%;height:100%;height:auto;padding:var(--art-padding);pointer-events:none;display:none;position:absolute;inset:0 0 auto}.art-video-player .art-notice .art-notice-inner{border-radius:var(--art-border-radius);background-color:var(--art-tip-background);padding:5px;line-height:1;display:inline-flex}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{z-index:120;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width);flex-direction:column;padding:5px 0;font-size:12px;display:none;position:absolute}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;border-bottom:1px solid #ffffff1a;padding:10px 15px;display:flex}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{z-index:90;border-radius:var(--art-border-radius);transform-origin:100% 100%;max-height:var(--art-settings-max-height);left:auto;right:var(--art-padding);bottom:var(--art-control-height);transform:scale(var(--art-settings-scale));transition:all var(--art-transition-duration)ease;background-color:var(--art-widget-background);flex-direction:column;display:none;position:absolute;overflow:hidden auto}.art-video-player .art-settings .art-setting-panel{flex-direction:column;display:none}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{cursor:pointer;transition:background-color var(--art-transition-duration)ease;justify-content:space-between;align-items:center;padding:0 5px;display:flex;overflow:hidden}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{justify-content:center;align-items:center;gap:5px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{height:var(--art-settings-icon-size);width:var(--art-settings-icon-size);justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{justify-content:center;align-items:center;gap:5px;font-size:12px;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{min-width:32px;height:24px;justify-content:center;align-items:center;display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{height:3px;width:80px;appearance:none;background-color:#fff3;outline:none}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid #ffffff1a}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{left:var(--art-padding);top:var(--art-padding);z-index:100;border-radius:var(--art-border-radius);background-color:var(--art-widget-background);padding:10px;font-size:12px;display:none;position:absolute}.art-video-player .art-info .art-info-panel{flex-direction:column;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item{align-items:center;gap:5px;display:flex}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{width:250px;text-overflow:ellipsis;white-space:nowrap;user-select:all;overflow:hidden}.art-video-player .art-info .art-info-close{cursor:pointer;position:absolute;top:5px;right:5px}.art-video-player.art-info-show .art-info{display:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-control-height:60px;--art-control-icon-scale:1.3}.art-fullscreen-web{--art-control-height:60px;--art-control-icon-scale:1.3;z-index:var(--art-fullscreen-web-index);width:100%;height:100%;position:fixed;inset:0}.art-mini-popup{z-index:9999;width:320px;height:180px;border-radius:var(--art-border-radius);cursor:move;user-select:none;background:#000;transition:opacity .2s;position:fixed;overflow:hidden;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{z-index:20;cursor:pointer;opacity:0;transition:opacity .2s;position:absolute;top:10px;right:10px}.art-mini-popup .art-mini-state{z-index:30;width:100%;height:100%;pointer-events:none;opacity:0;background-color:#00000040;justify-content:center;align-items:center;transition:opacity .2s;display:flex;position:absolute;inset:0}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;pointer-events:auto;transition:transform .2s;transform:scale(3)}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-droging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:hover .art-mini-state{opacity:1}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-mini-progress-bar{z-index:0;width:100%;height:100%;height:var(--art-mini-progress-height);background-color:var(--art-theme);display:flex;position:absolute;inset:auto 0 0}.art-video-player .art-layer-lock{height:var(--art-lock-size);width:var(--art-lock-size);top:50%;left:var(--art-padding);background-color:var(--art-tip-background);border-radius:50%;justify-content:center;align-items:center;display:none;position:absolute;transform:translateY(-50%)}.art-video-player .art-layer-auto-playback{border-radius:var(--art-border-radius);left:var(--art-padding);bottom:calc(var(--art-control-height) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background);align-items:center;gap:10px;padding:10px;line-height:1;display:none;position:absolute}.art-video-player .art-layer-auto-playback .art-auto-playback-close{cursor:pointer;justify-content:center;align-items:center;display:flex}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-bottom{display:none!important}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-lock .art-layer-mini-progress-bar{display:flex!important}.art-video-player.art-control-show .art-layer-mini-progress-bar{display:none}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{position:relative}.art-control-selector .art-selector-list{text-align:center;border-radius:var(--art-border-radius);opacity:0;pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:all var(--art-transition-duration)ease;flex-direction:column;align-items:center;display:flex;position:absolute;overflow:hidden auto;transform:translateY(10px)}.art-control-selector .art-selector-list .art-selector-item{width:100%;flex-shrink:0;justify-content:center;align-items:center;padding:10px 15px;line-height:1;display:flex}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover .art-selector-list{opacity:1;pointer-events:auto;transform:translateY(0)}[class*=hint--]{font-style:normal;display:inline-block;position:relative}[class*=hint--]:before,[class*=hint--]:after{visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;transition:all .3s;position:absolute;transform:translate(0,0)}[class*=hint--]:hover:before,[class*=hint--]:hover:after{visibility:visible;opacity:1;transition-delay:.1s}[class*=hint--]:before{content:"";z-index:1000001;background:0 0;border:6px solid #0000;position:absolute}[class*=hint--]:after{color:#fff;white-space:nowrap;background:#000;padding:8px 10px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;line-height:12px}[class*=hint--][aria-label]:after{content:attr(aria-label)}[class*=hint--][data-hint]:after{content:attr(data-hint)}[aria-label=""]:before,[aria-label=""]:after,[data-hint=""]:before,[data-hint=""]:after{display:none!important}.hint--top-left:before,.hint--top-right:before,.hint--top:before{border-top-color:#000}.hint--bottom-left:before,.hint--bottom-right:before,.hint--bottom:before{border-bottom-color:#000}.hint--left:before{border-left-color:#000}.hint--right:before{border-right-color:#000}.hint--top:before{margin-bottom:-11px}.hint--top:before,.hint--top:after{bottom:100%;left:50%}.hint--top:before{left:calc(50% - 6px)}.hint--top:after{transform:translate(-50%)}.hint--top:hover:before{transform:translateY(-8px)}.hint--top:hover:after{transform:translate(-50%)translateY(-8px)}.hint--bottom:before{margin-top:-11px}.hint--bottom:before,.hint--bottom:after{top:100%;left:50%}.hint--bottom:before{left:calc(50% - 6px)}.hint--bottom:after{transform:translate(-50%)}.hint--bottom:hover:before{transform:translateY(8px)}.hint--bottom:hover:after{transform:translate(-50%)translateY(8px)}.hint--right:before{margin-bottom:-6px;margin-left:-11px}.hint--right:after{margin-bottom:-14px}.hint--right:before,.hint--right:after{bottom:50%;left:100%}.hint--right:hover:before,.hint--right:hover:after{transform:translate(8px)}.hint--left:before{margin-bottom:-6px;margin-right:-11px}.hint--left:after{margin-bottom:-14px}.hint--left:before,.hint--left:after{bottom:50%;right:100%}.hint--left:hover:before,.hint--left:hover:after{transform:translate(-8px)}.hint--top-left:before{margin-bottom:-11px}.hint--top-left:before,.hint--top-left:after{bottom:100%;left:50%}.hint--top-left:before{left:calc(50% - 6px)}.hint--top-left:after{margin-left:12px;transform:translate(-100%)}.hint--top-left:hover:before{transform:translateY(-8px)}.hint--top-left:hover:after{transform:translate(-100%)translateY(-8px)}.hint--top-right:before{margin-bottom:-11px}.hint--top-right:before,.hint--top-right:after{bottom:100%;left:50%}.hint--top-right:before{left:calc(50% - 6px)}.hint--top-right:after{margin-left:-12px;transform:translate(0)}.hint--top-right:hover:before,.hint--top-right:hover:after{transform:translateY(-8px)}.hint--bottom-left:before{margin-top:-11px}.hint--bottom-left:before,.hint--bottom-left:after{top:100%;left:50%}.hint--bottom-left:before{left:calc(50% - 6px)}.hint--bottom-left:after{margin-left:12px;transform:translate(-100%)}.hint--bottom-left:hover:before{transform:translateY(8px)}.hint--bottom-left:hover:after{transform:translate(-100%)translateY(8px)}.hint--bottom-right:before{margin-top:-11px}.hint--bottom-right:before,.hint--bottom-right:after{top:100%;left:50%}.hint--bottom-right:before{left:calc(50% - 6px)}.hint--bottom-right:after{margin-left:-12px;transform:translate(0)}.hint--bottom-right:hover:before,.hint--bottom-right:hover:after{transform:translateY(8px)}.hint--small:after,.hint--medium:after,.hint--large:after{white-space:normal;word-wrap:break-word;line-height:1.4em}.hint--small:after{width:80px}.hint--medium:after{width:150px}.hint--large:after{width:300px}[class*=hint--]:after{text-shadow:0 -1px #000;box-shadow:4px 4px 8px #0000004d}.hint--error:after{text-shadow:0 -1px #592726;background-color:#b34e4d}.hint--error.hint--top-left:before,.hint--error.hint--top-right:before,.hint--error.hint--top:before{border-top-color:#b34e4d}.hint--error.hint--bottom-left:before,.hint--error.hint--bottom-right:before,.hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.hint--error.hint--left:before{border-left-color:#b34e4d}.hint--error.hint--right:before{border-right-color:#b34e4d}.hint--warning:after{text-shadow:0 -1px #6c5328;background-color:#c09854}.hint--warning.hint--top-left:before,.hint--warning.hint--top-right:before,.hint--warning.hint--top:before{border-top-color:#c09854}.hint--warning.hint--bottom-left:before,.hint--warning.hint--bottom-right:before,.hint--warning.hint--bottom:before{border-bottom-color:#c09854}.hint--warning.hint--left:before{border-left-color:#c09854}.hint--warning.hint--right:before{border-right-color:#c09854}.hint--info:after{text-shadow:0 -1px #1a3c4d;background-color:#3986ac}.hint--info.hint--top-left:before,.hint--info.hint--top-right:before,.hint--info.hint--top:before{border-top-color:#3986ac}.hint--info.hint--bottom-left:before,.hint--info.hint--bottom-right:before,.hint--info.hint--bottom:before{border-bottom-color:#3986ac}.hint--info.hint--left:before{border-left-color:#3986ac}.hint--info.hint--right:before{border-right-color:#3986ac}.hint--success:after{text-shadow:0 -1px #1a321a;background-color:#458746}.hint--success.hint--top-left:before,.hint--success.hint--top-right:before,.hint--success.hint--top:before{border-top-color:#458746}.hint--success.hint--bottom-left:before,.hint--success.hint--bottom-right:before,.hint--success.hint--bottom:before{border-bottom-color:#458746}.hint--success.hint--left:before{border-left-color:#458746}.hint--success.hint--right:before{border-right-color:#458746}.hint--always:after,.hint--always:before{opacity:1;visibility:visible}.hint--always.hint--top:before{transform:translateY(-8px)}.hint--always.hint--top:after{transform:translate(-50%)translateY(-8px)}.hint--always.hint--top-left:before{transform:translateY(-8px)}.hint--always.hint--top-left:after{transform:translate(-100%)translateY(-8px)}.hint--always.hint--top-right:before,.hint--always.hint--top-right:after{transform:translateY(-8px)}.hint--always.hint--bottom:before{transform:translateY(8px)}.hint--always.hint--bottom:after{transform:translate(-50%)translateY(8px)}.hint--always.hint--bottom-left:before{transform:translateY(8px)}.hint--always.hint--bottom-left:after{transform:translate(-100%)translateY(8px)}.hint--always.hint--bottom-right:before,.hint--always.hint--bottom-right:after{transform:translateY(8px)}.hint--always.hint--left:before,.hint--always.hint--left:after{transform:translate(-8px)}.hint--always.hint--right:before,.hint--always.hint--right:after{transform:translate(8px)}.hint--rounded:after{border-radius:4px}.hint--no-animate:before,.hint--no-animate:after{transition-duration:0s}.hint--bounce:before,.hint--bounce:after{-webkit-transition:opacity .3s,visibility .3s,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s,visibility .3s,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s,visibility .3s,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.hint--no-shadow:before,.hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap:10px;--art-control-height:38px;--art-control-icon-scale:1;--art-state-size:60px;--art-settings-max-height:180px;--art-selector-max-height:180px;--art-indicator-scale:1;--art-control-opacity:1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding)/-1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding)/-1)}'},{}],bAWi2:[function(t,e,r){e.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var a=t(r);if("boolean"===a)return"boolean";if("string"===a)return"string";if("number"===a)return"number";if("symbol"===a)return"symbol";if("function"===a)return function(t){return"GeneratorFunction"===o(t)}(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(t){if(-1!==t.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(o(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(a=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return a.slice(8,-1).toLowerCase().replace(/\s/g,"")};function o(t){return t.constructor?t.constructor.name:null}function a(t,e){var o=2n)),o.export(r,"queryAll",(()=>i)),o.export(r,"addClass",(()=>s)),o.export(r,"removeClass",(()=>l)),o.export(r,"hasClass",(()=>c)),o.export(r,"append",(()=>u)),o.export(r,"remove",(()=>p)),o.export(r,"setStyle",(()=>d)),o.export(r,"setStyles",(()=>f)),o.export(r,"getStyle",(()=>h)),o.export(r,"sublings",(()=>m)),o.export(r,"inverseClass",(()=>g)),o.export(r,"tooltip",(()=>v)),o.export(r,"isInViewport",(()=>y)),o.export(r,"includeFromEvent",(()=>b)),o.export(r,"replaceElement",(()=>x)),o.export(r,"createElement",(()=>w)),o.export(r,"getIcon",(()=>j));var a=t("./compatibility");function n(t,e=document){return e.querySelector(t)}function i(t,e=document){return Array.from(e.querySelectorAll(t))}function s(t,e){return t.classList.add(e)}function l(t,e){return t.classList.remove(e)}function c(t,e){return t.classList.contains(e)}function u(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild??t.lastChild}function p(t){return t.parentNode.removeChild(t)}function d(t,e,r){return t.style[e]=r,t}function f(t,e){for(const r in e)d(t,r,e[r]);return t}function h(t,e,r=!0){const o=window.getComputedStyle(t,null).getPropertyValue(e);return r?parseFloat(o):o}function m(t){return Array.from(t.parentElement.children).filter((e=>e!==t))}function g(t,e){m(t).forEach((t=>l(t,e))),s(t,e)}function v(t,e,r="top"){a.isMobile||(t.setAttribute("aria-label",e),s(t,"hint--rounded"),s(t,`hint--${r}`))}function y(t,e=0){const r=t.getBoundingClientRect(),o=window.innerHeight??document.documentElement.clientHeight,a=window.innerWidth??document.documentElement.clientWidth,n=r.top-e<=o&&r.top+r.height+e>=0,i=r.left-e<=a+e&&r.left+r.width+e>=0;return n&&i}function b(t,e){return t.composedPath&&t.composedPath().indexOf(e)>-1}function x(t,e){return e.parentNode.replaceChild(t,e),t}function w(t){return document.createElement(t)}function j(t="",e=""){const r=w("i");return s(r,"art-icon"),s(r,`art-icon-${t}`),u(r,e),r}},{"./compatibility":"luXC1","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],luXC1:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",(()=>a)),o.export(r,"isSafari",(()=>n)),o.export(r,"isWechat",(()=>i)),o.export(r,"isIE",(()=>s)),o.export(r,"isAndroid",(()=>l)),o.export(r,"isIOS",(()=>c)),o.export(r,"isIOS13",(()=>u)),o.export(r,"isMobile",(()=>p));const a="undefined"!=typeof navigator?navigator.userAgent:"",n=/^((?!chrome|android).)*safari/i.test(a),i=/MicroMessenger/i.test(a),s=/MSIE|Trident/i.test(a),l=/android/i.test(a),c=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,u=c??(a.includes("Macintosh")&&navigator.maxTouchPoints>=1),p=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)??u},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2nFlF":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ArtPlayerError",(()=>a)),o.export(r,"errorHandle",(()=>n));class a extends Error{constructor(t,e){super(t),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,e??this.constructor),this.name="ArtPlayerError"}}function n(t,e){if(!t)throw new a(e);return t}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],yqFoT:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,((t,e,r)=>{let o=r.slice(0,3);return 1===r.length&&(o=r+"00"),2===r.length&&(o=r+"0"),`${e},${o}`}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var e}function n(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function i(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map(((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`})).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map((t=>{const o=t.match(e);return o?{start:r(o[1].trim()),end:r(o[2].trim()),text:o[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((t=>t.trim())).join("\n")}:null})).filter((t=>t)).map(((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"")).filter((t=>t.trim())).join("\n\n")}`}o.defineInteropFlag(r),o.export(r,"srtToVtt",(()=>a)),o.export(r,"vttToBlob",(()=>n)),o.export(r,"assToVtt",(()=>i))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1VRQn":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t){return t.includes("?")?a(t.split("?")[0]):t.includes("#")?a(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function n(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}o.defineInteropFlag(r),o.export(r,"getExt",(()=>a)),o.export(r,"download",(()=>n))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3weX2":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"def",(()=>a)),o.export(r,"has",(()=>i)),o.export(r,"get",(()=>s)),o.export(r,"mergeDeep",(()=>l));const a=Object.defineProperty,{hasOwnProperty:n}=Object.prototype;function i(t,e){return n.call(t,e)}function s(t,e){return Object.getOwnPropertyDescriptor(t,e)}function l(...t){const e=t=>t&&"object"==typeof t&&!Array.isArray(t);return t.reduce(((t,r)=>(Object.keys(r).forEach((o=>{const a=t[o],n=r[o];Array.isArray(a)&&Array.isArray(n)?t[o]=a.concat(...n):e(a)&&e(n)?t[o]=l(a,n):t[o]=n})),t)),{})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7kBIx":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t=0){return new Promise((e=>setTimeout(e,t)))}function n(t,e){let r;return function(...o){clearTimeout(r),r=setTimeout((()=>(r=null,t.apply(this,o))),e)}}function i(t,e){let r=!1;return function(...o){r||(t.apply(this,o),r=!0,setTimeout((function(){r=!1}),e))}}o.defineInteropFlag(r),o.export(r,"sleep",(()=>a)),o.export(r,"debounce",(()=>n)),o.export(r,"throttle",(()=>i))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"13atT":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");function a(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function n(t){return t.charAt(0).toUpperCase()+t.slice(1)}function i(t){return["string","number"].includes(typeof t)}function s(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),o=Math.floor(t-3600*e-60*r);return(e>0?[e,r,o]:[r,o]).map((t=>t<10?`0${t}`:String(t))).join(":")}function l(t){return t.replace(/[&<>'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'",'"':"""}[t]??t)))}o.defineInteropFlag(r),o.export(r,"clamp",(()=>a)),o.export(r,"capitalize",(()=>n)),o.export(r,"isStringOrNumber",(()=>i)),o.export(r,"secondToTime",(()=>s)),o.export(r,"escape",(()=>l))},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],AdvwB:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"ComponentOption",(()=>d));var a=t("../utils");const n="array",i="boolean",s="string",l="number",c="object",u="function";function p(t,e,r){return(0,a.errorHandle)(e===s??e===l??t instanceof Element,`${r.join(".")} require '${s}' or 'Element' type`)}const d={html:p,disable:`?${i}`,name:`?${s}`,index:`?${l}`,style:`?${c}`,click:`?${u}`,mounted:`?${u}`,tooltip:`?${s}|${l}`,width:`?${l}`,selector:`?${n}`,onSelect:`?${u}`,switch:`?${i}`,onSwitch:`?${u}`,range:`?${n}`,onRange:`?${u}`,onChange:`?${u}`};r.default={id:s,container:p,url:s,poster:s,type:s,theme:s,lang:s,volume:l,isLive:i,muted:i,autoplay:i,autoSize:i,autoMini:i,loop:i,flip:i,playbackRate:i,aspectRatio:i,screenshot:i,setting:i,hotkey:i,pip:i,mutex:i,backdrop:i,fullscreen:i,fullscreenWeb:i,subtitleOffset:i,miniProgressBar:i,useSSR:i,playsInline:i,lock:i,fastForward:i,autoPlayback:i,autoOrientation:i,airplay:i,plugins:[u],layers:[d],contextmenu:[d],settings:[d],controls:[{...d,position:(t,e,r)=>{const o=["top","left","right"];return(0,a.errorHandle)(o.includes(t),`${r.join(".")} only accept ${o.toString()} as parameters`)}}],quality:[{default:`?${i}`,html:s,url:s}],highlight:[{time:l,text:s}],thumbnails:{url:s,number:l,column:l,width:l,height:l},subtitle:{url:s,type:s,style:c,escape:i,encoding:s,onVttLoad:u},moreVideoAttr:c,i18n:c,icons:c,cssVar:c,customType:c}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9Xmqu":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default={propertys:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2gKYH":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("./utils");class a{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=(0,o.query)(e.container),(0,o.errorHandle)(this.$container,`No container element found by ${e.container}`));const a=this.$container.tagName.toLowerCase();(0,o.errorHandle)("div"===a,`Unsupported container element type, only support 'div' but got '${a}'`),(0,o.errorHandle)(r.instances.every((t=>t.template.$container!==this.$container)),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),this.$container.dataset.artId=t.id,this.$original=this.$container.cloneNode(!0),this.init()}static get html(){return'
Player version:
5.1.0
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
'}query(t){return(0,o.query)(t,this.$container)}init(){const{option:t}=this.art;t.useSSR||(this.$container.innerHTML=a.html),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),this.$track=this.query("track"),this.$poster=this.query(".art-poster"),this.$subtitle=this.query(".art-subtitle"),this.$danmuku=this.query(".art-danmuku"),this.$bottom=this.query(".art-bottom"),this.$progress=this.query(".art-progress"),this.$controls=this.query(".art-controls"),this.$controlsLeft=this.query(".art-controls-left"),this.$controlsCenter=this.query(".art-controls-center"),this.$controlsRight=this.query(".art-controls-right"),this.$layer=this.query(".art-layers"),this.$loading=this.query(".art-loading"),this.$notice=this.query(".art-notice"),this.$noticeInner=this.query(".art-notice-inner"),this.$mask=this.query(".art-mask"),this.$state=this.query(".art-state"),this.$setting=this.query(".art-settings"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$contextmenu=this.query(".art-contextmenus"),t.backdrop&&(0,o.addClass)(this.$player,"art-backdrop"),o.isMobile&&(0,o.addClass)(this.$player,"art-mobile")}destroy(t){t?(0,o.replaceElement)(this.$original,this.$container):(0,o.addClass)(this.$player,"art-destroy")}}r.default=a},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1AdeF":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("./zh-cn"),i=o.interopDefault(n);r.default=class{constructor(t){this.art=t,this.languages={"zh-cn":i.default},this.language={},this.update(t.option.i18n)}init(){const t=this.art.option.lang.toLowerCase();this.language=this.languages[t]??{}}get(t){return this.language[t]??t}update(t){this.languages=(0,a.mergeDeep)(this.languages,t),this.init()}}},{"../utils":"h3rH9","./zh-cn":"3ZSKq","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3ZSKq":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);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":"隔空播放不可用"};r.default=o,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=o)},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"556MW":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./urlMix"),n=o.interopDefault(a),i=t("./attrMix"),s=o.interopDefault(i),l=t("./playMix"),c=o.interopDefault(l),u=t("./pauseMix"),p=o.interopDefault(u),d=t("./toggleMix"),f=o.interopDefault(d),h=t("./seekMix"),m=o.interopDefault(h),g=t("./volumeMix"),v=o.interopDefault(g),y=t("./currentTimeMix"),b=o.interopDefault(y),x=t("./durationMix"),w=o.interopDefault(x),j=t("./switchMix"),k=o.interopDefault(j),S=t("./playbackRateMix"),$=o.interopDefault(S),I=t("./aspectRatioMix"),T=o.interopDefault(I),E=t("./screenshotMix"),O=o.interopDefault(E),M=t("./fullscreenMix"),F=o.interopDefault(M),C=t("./fullscreenWebMix"),D=o.interopDefault(C),H=t("./pipMix"),B=o.interopDefault(H),A=t("./loadedMix"),R=o.interopDefault(A),z=t("./playedMix"),L=o.interopDefault(z),P=t("./playingMix"),N=o.interopDefault(P),_=t("./autoSizeMix"),Z=o.interopDefault(_),V=t("./rectMix"),q=o.interopDefault(V),W=t("./flipMix"),U=o.interopDefault(W),Y=t("./miniMix"),X=o.interopDefault(Y),G=t("./loopMix"),K=o.interopDefault(G),J=t("./posterMix"),Q=o.interopDefault(J),tt=t("./autoHeightMix"),et=o.interopDefault(tt),rt=t("./cssVarMix"),ot=o.interopDefault(rt),at=t("./themeMix"),nt=o.interopDefault(at),it=t("./typeMix"),st=o.interopDefault(it),lt=t("./stateMix"),ct=o.interopDefault(lt),ut=t("./subtitleOffsetMix"),pt=o.interopDefault(ut),dt=t("./airplayMix"),ft=o.interopDefault(dt),ht=t("./qualityMix"),mt=o.interopDefault(ht),gt=t("./optionInit"),vt=o.interopDefault(gt),yt=t("./eventInit"),bt=o.interopDefault(yt);r.default=class{constructor(t){(0,n.default)(t),(0,s.default)(t),(0,c.default)(t),(0,p.default)(t),(0,f.default)(t),(0,m.default)(t),(0,v.default)(t),(0,b.default)(t),(0,w.default)(t),(0,k.default)(t),(0,$.default)(t),(0,T.default)(t),(0,O.default)(t),(0,F.default)(t),(0,D.default)(t),(0,B.default)(t),(0,R.default)(t),(0,L.default)(t),(0,N.default)(t),(0,Z.default)(t),(0,q.default)(t),(0,U.default)(t),(0,X.default)(t),(0,K.default)(t),(0,Q.default)(t),(0,et.default)(t),(0,ot.default)(t),(0,nt.default)(t),(0,st.default)(t),(0,ct.default)(t),(0,pt.default)(t),(0,ft.default)(t),(0,mt.default)(t),(0,bt.default)(t),(0,vt.default)(t)}}},{"./urlMix":"2mRAc","./attrMix":"2EA19","./playMix":"fD2Tc","./pauseMix":"c3LGJ","./toggleMix":"fVsAa","./seekMix":"dmROF","./volumeMix":"9jtfB","./currentTimeMix":"7NCDR","./durationMix":"YS7JL","./switchMix":"dzUqN","./playbackRateMix":"5I2mT","./aspectRatioMix":"7m6R8","./screenshotMix":"2dgtR","./fullscreenMix":"fKDW8","./fullscreenWebMix":"lNvYI","./pipMix":"8j7oC","./loadedMix":"dwVOT","./playedMix":"dDeLx","./playingMix":"ceoBp","./autoSizeMix":"lcWXX","./rectMix":"f7y88","./flipMix":"l4qt5","./miniMix":"9ZPBQ","./loopMix":"d89IV","./posterMix":"5K8hA","./autoHeightMix":"3T5ls","./cssVarMix":"6KfHs","./themeMix":"7lcSc","./typeMix":"8JgTw","./stateMix":"cebt1","./subtitleOffsetMix":"hJvIy","./airplayMix":"4Tp0U","./qualityMix":"3wZgN","./optionInit":"iPdgW","./eventInit":"3mj0J","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2mRAc":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{option:e,template:{$video:r}}=t;(0,o.def)(t,"url",{get:()=>r.src,async set(a){if(a){const n=t.url,i=e.type??(0,o.getExt)(a),s=e.customType[i];i&&s?(await(0,o.sleep)(),t.loading.show=!0,s.call(t,r,a,t)):(URL.revokeObjectURL(n),r.src=a),n!==t.url&&(t.option.url=a,t.isReady&&n&&t.once("video:canplay",(()=>{t.emit("restart",a)})))}else await(0,o.sleep)(),t.loading.show=!0}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2EA19":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$video:e}}=t;(0,o.def)(t,"attr",{value(t,r){if(void 0===r)return e[t];e[t]=r}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fD2Tc:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,notice:r,option:a,constructor:{instances:n},template:{$video:i}}=t;(0,o.def)(t,"play",{value:async function(){const o=await i.play();if(r.show=e.get("Play"),t.emit("play"),a.mutex)for(let e=0;et.playing?t.pause():t.play()})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dmROF:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{notice:e}=t;(0,o.def)(t,"seek",{set(r){t.currentTime=r,t.emit("seek",t.currentTime),t.duration&&(e.show=`${(0,o.secondToTime)(t.currentTime)} / ${(0,o.secondToTime)(t.duration)}`)}}),(0,o.def)(t,"forward",{set(e){t.seek=t.currentTime+e}}),(0,o.def)(t,"backward",{set(e){t.seek=t.currentTime-e}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9jtfB":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$video:e},i18n:r,notice:a,storage:n}=t;(0,o.def)(t,"volume",{get:()=>e.volume??0,set:t=>{e.volume=(0,o.clamp)(t,0,1),a.show=`${r.get("Volume")}: ${parseInt(100*e.volume,10)}`,0!==e.volume&&n.set("volume",e.volume)}}),(0,o.def)(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7NCDR":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$video:e}=t.template;(0,o.def)(t,"currentTime",{get:()=>e.currentTime??0,set:r=>{r=parseFloat(r),Number.isNaN(r)||(e.currentTime=(0,o.clamp)(r,0,t.duration))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],YS7JL:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e??0}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dzUqN:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){function e(e,r){return new Promise(((o,a)=>{if(e===t.url)return;const{playing:n,aspectRatio:i,playbackRate:s}=t;t.pause(),t.url=e,t.notice.show="",t.once("video:error",a),t.once("video:canplay",(async()=>{t.playbackRate=s,t.aspectRatio=i,t.currentTime=r,n&&await t.play(),t.notice.show="",o()}))}))}(0,o.def)(t,"switchQuality",{value:r=>e(r,t.currentTime)}),(0,o.def)(t,"switchUrl",{value:t=>e(t,0)}),(0,o.def)(t,"switch",{set:t.switchUrl})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5I2mT":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$video:e},i18n:r,notice:a}=t;(0,o.def)(t,"playbackRate",{get:()=>e.playbackRate,set(o){if(o){if(o===e.playbackRate)return;e.playbackRate=o,a.show=`${r.get("Rate")}: ${1===o?r.get("Normal"):`${o}x`}`}else t.playbackRate=1}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7m6R8":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,notice:r,template:{$video:a,$player:n}}=t;(0,o.def)(t,"aspectRatio",{get:()=>n.dataset.aspectRatio??"default",set(i){if(i||(i="default"),"default"===i)(0,o.setStyle)(a,"width",null),(0,o.setStyle)(a,"height",null),(0,o.setStyle)(a,"margin",null),delete n.dataset.aspectRatio;else{const t=i.split(":").map(Number),{clientWidth:e,clientHeight:r}=n,s=e/r,l=t[0]/t[1];s>l?((0,o.setStyle)(a,"width",l*r+"px"),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height",e/l+"px"),(0,o.setStyle)(a,"margin","auto 0")),n.dataset.aspectRatio=i}r.show=`${e.get("Aspect Ratio")}: ${"default"===i?e.get("Default"):i}`,t.emit("aspectRatio",i)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2dgtR":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{notice:e,template:{$video:r}}=t,a=(0,o.createElement)("canvas");(0,o.def)(t,"getDataURL",{value:()=>new Promise(((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),t(a.toDataURL("image/png"))}catch(t){e.show=t,o(t)}}))}),(0,o.def)(t,"getBlobUrl",{value:()=>new Promise(((t,o)=>{try{a.width=r.videoWidth,a.height=r.videoHeight,a.getContext("2d").drawImage(r,0,0),a.toBlob((e=>{t(URL.createObjectURL(e))}))}catch(t){e.show=t,o(t)}}))}),(0,o.def)(t,"screenshot",{value:async()=>{const e=await t.getDataURL();return(0,o.download)(e,`artplayer_${(0,o.secondToTime)(r.currentTime)}.png`),t.emit("screenshot",e),e}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fKDW8:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../libs/screenfull"),n=o.interopDefault(a),i=t("../utils");r.default=function(t){const{i18n:e,notice:r,template:{$video:o,$player:a}}=t;t.once("video:loadedmetadata",(()=>{n.default.isEnabled?(t=>{n.default.on("change",(()=>{t.emit("fullscreen",n.default.isFullscreen)})),(0,i.def)(t,"fullscreen",{get:()=>n.default.isFullscreen,async set(e){e?(t.state="fullscreen",await n.default.request(a),(0,i.addClass)(a,"art-fullscreen")):(await n.default.exit(),(0,i.removeClass)(a,"art-fullscreen")),t.emit("resize")}})})(t):document.fullscreenEnabled??o.webkitSupportsFullscreen?(t=>{(0,i.def)(t,"fullscreen",{get:()=>o.webkitDisplayingFullscreen,set(e){e?(t.state="fullscreen",o.webkitEnterFullscreen(),t.emit("fullscreen",!0)):(o.webkitExitFullscreen(),t.emit("fullscreen",!1)),t.emit("resize")}})})(t):(0,i.def)(t,"fullscreen",{get:()=>!1,set(){r.show=e.get("Fullscreen Not Supported")}}),(0,i.def)(t,"fullscreen",(0,i.get)(t,"fullscreen"))}))}},{"../libs/screenfull":"lUahW","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lUahW:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);const o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=(()=>{if("undefined"==typeof document)return!1;const t=o[0],e={};for(const r of o){if(r[1]in document){for(const[o,a]of r.entries())e[t[o]]=a;return e}}return!1})(),n={change:a.fullscreenchange,error:a.fullscreenerror};let i={request:(t=document.documentElement,e)=>new Promise(((r,o)=>{const n=()=>{i.off("change",n),r()};i.on("change",n);const s=t[a.requestFullscreen](e);s instanceof Promise&&s.then(n).catch(o)})),exit:()=>new Promise(((t,e)=>{if(!i.isFullscreen)return void t();const r=()=>{i.off("change",r),t()};i.on("change",r);const o=document[a.exitFullscreen]();o instanceof Promise&&o.then(r).catch(e)})),toggle:(t,e)=>i.isFullscreen?i.exit():i.request(t,e),onchange(t){i.on("change",t)},onerror(t){i.on("error",t)},on(t,e){const r=n[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=n[t];r&&document.removeEventListener(r,e,!1)},raw:a};Object.defineProperties(i,{isFullscreen:{get:()=>Boolean(document[a.fullscreenElement])},element:{enumerable:!0,get:()=>document[a.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[a.fullscreenEnabled])}}),a||(i={isEnabled:!1}),r.default=i},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lNvYI:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{constructor:e,template:{$container:r,$player:a}}=t;let n="";(0,o.def)(t,"fullscreenWeb",{get:()=>(0,o.hasClass)(a,"art-fullscreen-web"),set(i){i?(n=a.style.cssText,e.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),t.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!0)):(e.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(r,a),n&&(a.style.cssText=n,n=""),(0,o.removeClass)(a,"art-fullscreen-web"),t.emit("fullscreenWeb",!1)),t.emit("resize")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8j7oC":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,notice:r,template:{$video:a}}=t;document.pictureInPictureEnabled?function(t){const{template:{$video:e},proxy:r,notice:a}=t;e.disablePictureInPicture=!1,(0,o.def)(t,"pip",{get:()=>document.pictureInPictureElement,set(r){r?(t.state="pip",e.requestPictureInPicture().catch((t=>{throw a.show=t,t}))):document.exitPictureInPicture().catch((t=>{throw a.show=t,t}))}}),r(e,"enterpictureinpicture",(()=>{t.emit("pip",!0)})),r(e,"leavepictureinpicture",(()=>{t.emit("pip",!1)}))}(t):a.webkitSupportsPresentationMode?function(t){const{$video:e}=t.template;e.webkitSetPresentationMode("inline"),(0,o.def)(t,"pip",{get:()=>"picture-in-picture"===e.webkitPresentationMode,set(r){r?(t.state="pip",e.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(e.webkitSetPresentationMode("inline"),t.emit("pip",!1))}})}(t):(0,o.def)(t,"pip",{get:()=>!1,set(){r.show=e.get("PIP Not Supported")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dwVOT:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$video:e}=t.template;(0,o.def)(t,"loaded",{get:()=>t.loadedTime/e.duration}),(0,o.def)(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dDeLx:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"played",{get:()=>t.currentTime/t.duration})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],ceoBp:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$video:e}=t.template;(0,o.def)(t,"playing",{get:()=>!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],lcWXX:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$container:e,$player:r,$video:a}=t.template;(0,o.def)(t,"autoSize",{value(){const{videoWidth:n,videoHeight:i}=a,{width:s,height:l}=e.getBoundingClientRect(),c=n/i;if(s/l>c){const t=l*c/s*100;(0,o.setStyle)(r,"width",`${t}%`),(0,o.setStyle)(r,"height","100%")}else{const t=s/c/l*100;(0,o.setStyle)(r,"width","100%"),(0,o.setStyle)(r,"height",`${t}%`)}t.emit("autoSize",{width:t.width,height:t.height})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f7y88:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"rect",{get:()=>t.template.$player.getBoundingClientRect()});const e=["bottom","height","left","right","top","width"];for(let r=0;rt.rect[a]})}(0,o.def)(t,"x",{get:()=>t.left+window.pageXOffset}),(0,o.def)(t,"y",{get:()=>t.top+window.pageYOffset})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],l4qt5:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$player:e},i18n:r,notice:a}=t;(0,o.def)(t,"flip",{get:()=>e.dataset.flip??"normal",set(n){n||(n="normal"),"normal"===n?delete e.dataset.flip:e.dataset.flip=n,a.show=`${r.get("Video Flip")}: ${r.get((0,o.capitalize)(n))}`,t.emit("flip",n)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9ZPBQ":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{icons:e,proxy:r,storage:a,template:{$player:n,$video:i}}=t;let s=!1,l=0,c=0;function u(){const{$mini:e}=t.template;e&&((0,o.removeClass)(n,"art-mini"),(0,o.setStyle)(e,"display","none"),n.prepend(i),t.emit("mini",!1))}function p(e,r){t.playing?((0,o.setStyle)(e,"display","none"),(0,o.setStyle)(r,"display","flex")):((0,o.setStyle)(e,"display","flex"),(0,o.setStyle)(r,"display","none"))}function d(){const{$mini:e}=t.template,r=e.getBoundingClientRect(),n=window.innerHeight-r.height-50,i=window.innerWidth-r.width-50;a.set("top",n),a.set("left",i),(0,o.setStyle)(e,"top",`${n}px`),(0,o.setStyle)(e,"left",`${i}px`)}(0,o.def)(t,"mini",{get:()=>(0,o.hasClass)(n,"art-mini"),set(f){if(f){t.state="mini",(0,o.addClass)(n,"art-mini");const f=function(){const{$mini:n}=t.template;if(n)return(0,o.append)(n,i),(0,o.setStyle)(n,"display","flex");{const n=(0,o.createElement)("div");(0,o.addClass)(n,"art-mini-popup"),(0,o.append)(document.body,n),t.template.$mini=n,(0,o.append)(n,i);const d=(0,o.append)(n,'
');(0,o.append)(d,e.close),r(d,"click",u);const f=(0,o.append)(n,'
'),h=(0,o.append)(f,e.play),m=(0,o.append)(f,e.pause);return r(h,"click",(()=>t.play())),r(m,"click",(()=>t.pause())),p(h,m),t.on("video:playing",(()=>p(h,m))),t.on("video:pause",(()=>p(h,m))),t.on("video:timeupdate",(()=>p(h,m))),r(n,"mousedown",(t=>{s=0===t.button,l=t.pageX,c=t.pageY})),t.on("document:mousemove",(t=>{if(s){(0,o.addClass)(n,"art-mini-droging");const e=t.pageX-l,r=t.pageY-c;(0,o.setStyle)(n,"transform",`translate(${e}px, ${r}px)`)}})),t.on("document:mouseup",(()=>{if(s){s=!1,(0,o.removeClass)(n,"art-mini-droging");const t=n.getBoundingClientRect();a.set("left",t.left),a.set("top",t.top),(0,o.setStyle)(n,"left",`${t.left}px`),(0,o.setStyle)(n,"top",`${t.top}px`),(0,o.setStyle)(n,"transform",null)}})),n}}(),h=a.get("top"),m=a.get("left");h&&m?((0,o.setStyle)(f,"top",`${h}px`),(0,o.setStyle)(f,"left",`${m}px`),(0,o.isInViewport)(f)||d()):d(),t.emit("mini",!0)}else u()}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],d89IV:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){let e=[];(0,o.def)(t,"loop",{get:()=>e,set:r=>{if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){const a=(0,o.clamp)(r[0],0,Math.min(r[1],t.duration)),n=(0,o.clamp)(r[1],a,t.duration);e=n-a>=1?[a,n]:[]}else e=[];t.emit("loop",e)}}),t.on("video:timeupdate",(()=>{e.length&&(t.currentTimee[1])&&(t.seek=e[0])}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5K8hA":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$poster:e}}=t;(0,o.def)(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){(0,o.setStyle)(e,"backgroundImage",`url(${t})`)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3T5ls":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{template:{$container:e,$video:r}}=t;(0,o.def)(t,"autoHeight",{value(){const{clientWidth:a}=e,{videoHeight:n,videoWidth:i}=r,s=n*(a/i);(0,o.setStyle)(e,"height",s+"px"),t.emit("autoHeight",s)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6KfHs":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{$player:e}=t.template;(0,o.def)(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7lcSc":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8JgTw":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],cebt1:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];(0,o.def)(t,"state",{get:()=>e.find((e=>t[e]))??"standard",set(r){for(let o=0;o{s=[]})),(0,o.def)(t,"subtitleOffset",{get:()=>i,set(o){if(a.$track&&a.$track.track){const l=Array.from(a.$track.track.cues);i=e(o,-5,5);for(let r=0;r{switch(t.availability){case"available":i=!0;break;case"not-available":i=!1}})):i=!1,(0,o.def)(t,"airplay",{value(){i?(n.webkitShowPlaybackTargetPicker(),t.emit("airplay")):r.show=e.get("AirPlay Not Available")}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3wZgN":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){(0,o.def)(t,"quality",{set(e){const{controls:r,notice:o,i18n:a}=t,n=e.find((t=>t.default))??e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:n?n.html:"",selector:e,async onSelect(e){await t.switchQuality(e.url),o.show=`${a.get("Switch Video")}: ${e.html}`}})}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iPdgW:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{option:e,storage:r,template:{$video:a,$poster:n}}=t;for(const r in e.moreVideoAttr)t.attr(r,e.moreVideoAttr[r]);e.muted&&(t.muted=e.muted),e.volume&&(a.volume=(0,o.clamp)(e.volume,0,1));const i=r.get("volume");"number"==typeof i&&(a.volume=(0,o.clamp)(i,0,1)),e.poster&&(0,o.setStyle)(n,"backgroundImage",`url(${e.poster})`),e.autoplay&&(a.autoplay=e.autoplay),e.playsInline&&(a.playsInline=!0,a["webkit-playsinline"]=!0),e.theme&&(e.cssVar["--art-theme"]=e.theme);for(const r in e.cssVar)t.cssVar(r,e.cssVar[r]);t.url=e.url}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"3mj0J":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../config"),n=o.interopDefault(a),i=t("../utils");r.default=function(t){const{i18n:e,notice:r,option:o,constructor:a,proxy:s,template:{$player:l,$video:c,$poster:u}}=t;let p=0;for(let e=0;e{t.emit(`video:${e.type}`,e)}));t.on("video:canplay",(()=>{p=0,t.loading.show=!1})),t.once("video:canplay",(()=>{t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.isReady=!0,t.emit("ready")})),t.on("video:ended",(()=>{o.loop?(t.seek=0,t.play(),t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)})),t.on("video:error",(async n=>{p{t.emit("resize"),i.isMobile&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0)})),t.on("video:loadstart",(()=>{t.loading.show=!0,t.mask.show=!1,t.controls.show=!0})),t.on("video:pause",(()=>{t.controls.show=!0,t.mask.show=!0})),t.on("video:play",(()=>{t.mask.show=!1,(0,i.setStyle)(u,"display","none")})),t.on("video:playing",(()=>{t.mask.show=!1})),t.on("video:progress",(()=>{t.playing&&(t.loading.show=!1)})),t.on("video:seeked",(()=>{t.loading.show=!1,t.mask.show=!0})),t.on("video:seeking",(()=>{t.loading.show=!0,t.mask.show=!1})),t.on("video:timeupdate",(()=>{t.mask.show=!1})),t.on("video:waiting",(()=>{t.loading.show=!0,t.mask.show=!1}))}},{"../config":"9Xmqu","../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"14IBq":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("../utils/component"),i=o.interopDefault(n),s=t("./fullscreen"),l=o.interopDefault(s),c=t("./fullscreenWeb"),u=o.interopDefault(c),p=t("./pip"),d=o.interopDefault(p),f=t("./playAndPause"),h=o.interopDefault(f),m=t("./progress"),g=o.interopDefault(m),v=t("./time"),y=o.interopDefault(v),b=t("./volume"),x=o.interopDefault(b),w=t("./setting"),j=o.interopDefault(w),k=t("./thumbnails"),S=o.interopDefault(k),$=t("./screenshot"),I=o.interopDefault($),T=t("./loop"),E=o.interopDefault(T),O=t("./airplay"),M=o.interopDefault(O);class F extends i.default{constructor(t){super(t),this.name="control";const{proxy:e,constructor:r,template:{$player:o}}=t;let n=Date.now();e(o,["click","mousemove","touchstart","touchmove"],(()=>{this.show=!0,(0,a.removeClass)(o,"art-hide-cursor"),(0,a.addClass)(o,"art-hover"),n=Date.now()})),t.on("video:timeupdate",(()=>{!t.isInput&&t.playing&&this.show&&Date.now()-n>=r.CONTROL_HIDE_TIME&&(this.show=!1,(0,a.addClass)(o,"art-hide-cursor"),(0,a.removeClass)(o,"art-hover"))})),this.init()}init(){const{option:t}=this.art;t.isLive||this.add((0,g.default)({name:"progress",position:"top",index:10})),!t.thumbnails.url||t.isLive||a.isMobile||this.add((0,S.default)({name:"thumbnails",position:"top",index:20})),this.add((0,E.default)({name:"loop",position:"top",index:30})),this.add((0,h.default)({name:"playAndPause",position:"left",index:10})),this.add((0,x.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,y.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,a.sleep)().then((()=>{this.art.quality=t.quality})),t.screenshot&&!a.isMobile&&this.add((0,I.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,j.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,d.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,M.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,u.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,l.default)({name:"fullscreen",position:"right",index:70}));for(let e=0;eNumber(t.dataset.index)>=Number(n.dataset.index)));u?u.insertAdjacentElement("beforebegin",n):(0,a.append)(this.$parent,n),e.html&&(0,a.append)(n,e.html),e.style&&(0,a.setStyles)(n,e.style),e.tooltip&&(0,a.tooltip)(n,e.tooltip);const p=[];if(e.click){const t=this.art.events.proxy(n,"click",(t=>{t.preventDefault(),e.click.call(this.art,this,t)}));p.push(t)}return e.selector&&["left","right"].includes(e.position)&&this.addSelector(e,n,p),this[r]=n,this.cache.set(r,{$ref:n,events:p,option:e}),e.mounted&&e.mounted.call(this.art,n),n}addSelector(t,e,r){const{hover:o,proxy:i}=this.art.events;(0,a.addClass)(e,"art-control-selector");const s=(0,a.createElement)("div");(0,a.addClass)(s,"art-selector-value"),(0,a.append)(s,t.html),e.innerText="",(0,a.append)(e,s);const l=t.selector.map(((t,e)=>`
${t.html}
`)).join(""),c=(0,a.createElement)("div");(0,a.addClass)(c,"art-selector-list"),(0,a.append)(c,l),(0,a.append)(e,c);const u=()=>{const t=(0,a.getStyle)(e,"width")/2-(0,a.getStyle)(c,"width")/2;c.style.left=`${t}px`};o(e,u);const p=i(c,"click",(async e=>{const r=(e.composedPath()??[]).find((t=>(0,a.hasClass)(t,"art-selector-item")));if(!r)return;(0,a.inverseClass)(r,"art-current");const o=Number(r.dataset.index),i=t.selector[o]??{};if(s.innerText=r.innerText,t.onSelect){const o=await t.onSelect.call(this.art,i,r,e);(0,n.isStringOrNumber)(o)&&(s.innerHTML=o)}u()}));r.push(p)}remove(t){const e=this.cache.get(t);(0,i.errorHandle)(e,`Can't find [${t}] from the [${this.name}]`),e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);for(let t=0;t({...t,tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e,i=(0,o.append)(t,a.fullscreenOn),s=(0,o.append)(t,a.fullscreenOff);(0,o.setStyle)(s,"display","none"),r(t,"click",(()=>{e.fullscreen=!e.fullscreen})),e.on("fullscreen",(e=>{e?((0,o.tooltip)(t,n.get("Exit Fullscreen")),(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(t,n.get("Fullscreen")),(0,o.setStyle)(i,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"66eEC":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e,i=(0,o.append)(t,a.fullscreenWebOn),s=(0,o.append)(t,a.fullscreenWebOff);(0,o.setStyle)(s,"display","none"),r(t,"click",(()=>{e.fullscreenWeb=!e.fullscreenWeb})),e.on("fullscreenWeb",(e=>{e?((0,o.tooltip)(t,n.get("Exit Web Fullscreen")),(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(s,"display","inline-flex")):((0,o.tooltip)(t,n.get("Web Fullscreen")),(0,o.setStyle)(i,"display","inline-flex"),(0,o.setStyle)(s,"display","none"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kCFkA:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e;(0,o.append)(t,a.pip),r(t,"click",(()=>{e.pip=!e.pip})),e.on("pip",(e=>{(0,o.tooltip)(t,n.get(e?"Exit PIP Mode":"PIP Mode"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iRhgD:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,mounted:t=>{const{proxy:r,icons:a,i18n:n}=e,i=(0,o.append)(t,a.play),s=(0,o.append)(t,a.pause);function l(){(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(s,"display","none")}function c(){(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(s,"display","flex")}(0,o.tooltip)(i,n.get("Play")),(0,o.tooltip)(s,n.get("Pause")),r(i,"click",(()=>{e.play()})),r(s,"click",(()=>{e.pause()})),e.playing?c():l(),e.on("video:playing",(()=>{c()})),e.on("video:pause",(()=>{l()}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],aBBSH:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"getPosFromEvent",(()=>n)),o.export(r,"setCurrentTime",(()=>i));var a=t("../utils");function n(t,e){const{$progress:r}=t.template,{left:o}=r.getBoundingClientRect(),n=a.isMobile?e.touches[0].clientX:e.clientX,i=(0,a.clamp)(n-o,0,r.clientWidth),s=i/r.clientWidth*t.duration;return{second:s,time:(0,a.secondToTime)(s),width:i,percentage:(0,a.clamp)(i/r.clientWidth,0,1)}}function i(t,e){if(t.isRotate){const r=e.touches[0].clientY/t.height,o=r*t.duration;t.emit("setBar","played",r),t.seek=o}else{const{second:r,percentage:o}=n(t,e);t.emit("setBar","played",o),t.seek=r}}r.default=function(t){return e=>{const{icons:r,option:o,proxy:s}=e;return{...t,html:'
',mounted:t=>{let l=!1;const c=(0,a.query)(".art-progress-hover",t),u=(0,a.query)(".art-progress-loaded",t),p=(0,a.query)(".art-progress-played",t),d=(0,a.query)(".art-progress-highlight",t),f=(0,a.query)(".art-progress-indicator",t),h=(0,a.query)(".art-progress-tip",t);function m(t,e){"loaded"===t&&(0,a.setStyle)(u,"width",100*e+"%"),"played"===t&&((0,a.setStyle)(p,"width",100*e+"%"),(0,a.setStyle)(f,"left",100*e+"%"))}r.indicator?(0,a.append)(f,r.indicator):(0,a.setStyle)(f,"backgroundColor","var(--art-theme)"),e.on("video:loadedmetadata",(()=>{for(let t=0;t`;(0,a.append)(d,i)}})),m("loaded",e.loaded),e.on("setBar",((t,e)=>{m(t,e)})),e.on("video:progress",(()=>{m("loaded",e.loaded)})),e.constructor.USE_RAF?e.on("raf",(()=>{m("played",e.played)})):e.on("video:timeupdate",(()=>{m("played",e.played)})),e.on("video:ended",(()=>{m("played",1)})),a.isMobile||(s(t,"click",(t=>{t.target!==f&&i(e,t)})),s(t,"mousemove",(r=>{!function(t){const{width:r}=n(e,t);(0,a.setStyle)(c,"width",`${r}px`),(0,a.setStyle)(c,"display","flex")}(r),(0,a.setStyle)(h,"display","flex"),(0,a.includeFromEvent)(r,d)?function(r){const{width:o}=n(e,r),{text:i}=r.target.dataset;h.innerHTML=i;const s=h.clientWidth;o<=s/2?(0,a.setStyle)(h,"left",0):o>t.clientWidth-s/2?(0,a.setStyle)(h,"left",t.clientWidth-s+"px"):(0,a.setStyle)(h,"left",o-s/2+"px")}(r):function(r){const{width:o,time:i}=n(e,r);h.innerHTML=i;const s=h.clientWidth;o<=s/2?(0,a.setStyle)(h,"left",0):o>t.clientWidth-s/2?(0,a.setStyle)(h,"left",t.clientWidth-s+"px"):(0,a.setStyle)(h,"left",o-s/2+"px")}(r)})),s(t,"mouseleave",(()=>{(0,a.setStyle)(h,"display","none"),(0,a.setStyle)(c,"display","none")})),s(t,"mousedown",(t=>{l=0===t.button})),e.on("document:mousemove",(t=>{if(l){const{second:r,percentage:o}=n(e,t);m("played",o),e.seek=r}})),e.on("document:mouseup",(()=>{l&&(l=!1)})))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7H0CE":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,style:o.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{function r(){const r=`${(0,o.secondToTime)(e.currentTime)} / ${(0,o.secondToTime)(e.duration)}`;r!==t.innerText&&(t.innerText=r)}r();const a=["video:loadedmetadata","video:timeupdate","video:progress"];for(let t=0;t({...t,mounted:t=>{const{proxy:r,icons:a}=e,n=(0,o.append)(t,a.volume),i=(0,o.append)(t,a.volumeClose),s=(0,o.append)(t,'
'),l=(0,o.append)(s,'
'),c=(0,o.append)(l,'
'),u=(0,o.append)(l,'
'),p=(0,o.append)(u,'
'),d=(0,o.append)(p,'
'),f=(0,o.append)(u,'
');function h(t){const{top:e,height:r}=u.getBoundingClientRect();return 1-(t.clientY-e)/r}function m(){if(e.muted??0===e.volume)(0,o.setStyle)(n,"display","none"),(0,o.setStyle)(i,"display","flex"),(0,o.setStyle)(f,"top","100%"),(0,o.setStyle)(d,"top","100%"),c.innerText=0;else{const t=100*e.volume;(0,o.setStyle)(n,"display","flex"),(0,o.setStyle)(i,"display","none"),(0,o.setStyle)(f,"top",100-t+"%"),(0,o.setStyle)(d,"top",100-t+"%"),c.innerText=Math.floor(t)}}if(m(),e.on("video:volumechange",m),r(n,"click",(()=>{e.muted=!0})),r(i,"click",(()=>{e.muted=!1})),o.isMobile)(0,o.setStyle)(s,"display","none");else{let t=!1;r(u,"mousedown",(r=>{t=0===r.button,e.volume=h(r)})),e.on("document:mousemove",(r=>{t&&(e.muted=!1,e.volume=h(r))})),e.on("document:mouseup",(()=>{t&&(t=!1)}))}}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8BrCu":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{proxy:r,icons:a,i18n:n}=e;(0,o.append)(t,a.setting),r(t,"click",(()=>{e.setting.toggle(),e.setting.updateStyle()})),e.on("setting",(e=>{(0,o.tooltip)(t,n.get(e?"Hide Setting":"Show Setting"))}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2HiWx":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils"),a=t("./progress");r.default=function(t){return e=>({...t,mounted:t=>{const{option:r,template:{$progress:n,$video:i},events:{proxy:s,loadImg:l}}=e;let c=null,u=!1,p=!1;s(n,"mousemove",(async s=>{if(!u){u=!0;const t=await l(r.thumbnails.url);c=t,p=!0}p&&((0,o.setStyle)(t,"display","flex"),function(s){const{width:l}=(0,a.getPosFromEvent)(e,s),{url:u,number:p,column:d,width:f,height:h}=r.thumbnails,m=f??c.naturalWidth/d,g=h??m/(i.videoWidth/i.videoHeight),v=n.clientWidth/p,y=Math.floor(l/v),b=Math.ceil(y/d)-1,x=y%d??d-1;(0,o.setStyle)(t,"backgroundImage",`url(${u})`),(0,o.setStyle)(t,"height",`${g}px`),(0,o.setStyle)(t,"width",`${m}px`),(0,o.setStyle)(t,"backgroundPosition",`-${x*m}px -${b*g}px`),l<=m/2?(0,o.setStyle)(t,"left",0):l>n.clientWidth-m/2?(0,o.setStyle)(t,"left",n.clientWidth-m+"px"):(0,o.setStyle)(t,"left",l-m/2+"px")}(s))})),s(n,"mouseleave",(()=>{(0,o.setStyle)(t,"display","none")})),e.on("hover",(e=>{e||(0,o.setStyle)(t,"display","none")}))}})}},{"../utils":"h3rH9","./progress":"aBBSH","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],c1GeG:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r,icons:a}=e;(0,o.append)(t,a.screenshot),r(t,"click",(()=>{e.screenshot()}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fiwRm:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,mounted:t=>{const r=(0,o.append)(t,''),a=(0,o.append)(t,'');e.on("loop",(n=>{n&&n.length?((0,o.setStyle)(t,"display","flex"),(0,o.setStyle)(r,"left",`calc(${n[0]/e.duration*100}% - ${r.clientWidth}px)`),(0,o.setStyle)(a,"left",n[1]/e.duration*100+"%")):(0,o.setStyle)(t,"display","none")}))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6GRju":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>({...t,tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r,icons:a}=e;(0,o.append)(t,a.airplay),r(t,"click",(()=>e.airplay()))}})}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7iUum":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("../utils/component"),i=o.interopDefault(n),s=t("./playbackRate"),l=o.interopDefault(s),c=t("./aspectRatio"),u=o.interopDefault(c),p=t("./flip"),d=o.interopDefault(p),f=t("./info"),h=o.interopDefault(f),m=t("./version"),g=o.interopDefault(m),v=t("./close"),y=o.interopDefault(v);class b extends i.default{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,a.isMobile||this.init()}init(){const{option:t,proxy:e,template:{$player:r,$contextmenu:o}}=this.art;t.playbackRate&&this.add((0,l.default)({name:"playbackRate",index:10})),t.aspectRatio&&this.add((0,u.default)({name:"aspectRatio",index:20})),t.flip&&this.add((0,d.default)({name:"flip",index:30})),this.add((0,h.default)({name:"info",index:40})),this.add((0,g.default)({name:"version",index:50})),this.add((0,y.default)({name:"close",index:60}));for(let e=0;e{if(t.preventDefault(),!this.art.constructor.CONTEXTMENU)return;this.show=!0;const e=t.clientX,n=t.clientY,{height:i,width:s,left:l,top:c}=r.getBoundingClientRect(),{height:u,width:p}=o.getBoundingClientRect();let d=e-l,f=n-c;e+p>l+s&&(d=s-p),n+u>c+i&&(f=i-u),(0,a.setStyles)(o,{top:`${f}px`,left:`${d}px`})})),e(r,"click",(t=>{(0,a.includeFromEvent)(t,o)||(this.show=!1)})),this.art.on("blur",(()=>{this.show=!1}))}}r.default=b},{"../utils":"h3rH9","../utils/component":"guki8","./playbackRate":"f1W36","./aspectRatio":"afxZC","./flip":"9jCuX","./info":"k8wIZ","./version":"bb0TU","./close":"9zTkI","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f1W36:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:a}}=e,n=a.map((t=>`${1===t?r.get("Normal"):t.toFixed(1)}`)).join("");return{...t,html:`${r.get("Play Speed")}: ${n}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.playbackRate=Number(o),t.show=!1)},mounted:t=>{const r=(0,o.query)('[data-value="1"]',t);r&&(0,o.inverseClass)(r,"art-current"),e.on("video:ratechange",(()=>{const r=(0,o.queryAll)("span",t).find((t=>Number(t.dataset.value)===e.playbackRate));r&&(0,o.inverseClass)(r,"art-current")}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],afxZC:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:a}}=e,n=a.map((t=>`${"default"===t?r.get("Default"):t}`)).join("");return{...t,html:`${r.get("Aspect Ratio")}: ${n}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.aspectRatio=o,t.show=!1)},mounted:t=>{const r=(0,o.query)('[data-value="default"]',t);r&&(0,o.inverseClass)(r,"art-current"),e.on("aspectRatio",(e=>{const r=(0,o.queryAll)("span",t).find((t=>t.dataset.value===e));r&&(0,o.inverseClass)(r,"art-current")}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9jCuX":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){return e=>{const{i18n:r,constructor:{FLIP:a}}=e,n=a.map((t=>`${r.get((0,o.capitalize)(t))}`)).join("");return{...t,html:`${r.get("Video Flip")}: ${n}`,click:(t,r)=>{const{value:o}=r.target.dataset;o&&(e.flip=o.toLowerCase(),t.show=!1)},mounted:t=>{const r=(0,o.query)('[data-value="normal"]',t);r&&(0,o.inverseClass)(r,"art-current"),e.on("flip",(e=>{const r=(0,o.queryAll)("span",t).find((t=>t.dataset.value===e));r&&(0,o.inverseClass)(r,"art-current")}))}}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],k8wIZ:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return e=>({...t,html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],bb0TU:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return{...t,html:'ArtPlayer 5.1.0'}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9zTkI":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){return e=>({...t,html:e.i18n.get("Close"),click:t=>{t.show=!1}})}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hD2Lg:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./utils"),n=t("./utils/component"),i=o.interopDefault(n);class s extends i.default{constructor(t){super(t),this.name="info",a.isMobile||this.init()}init(){const{proxy:t,constructor:e,template:{$infoPanel:r,$infoClose:o,$video:n}}=this.art;t(o,"click",(()=>{this.show=!1}));let i=null;const s=(0,a.queryAll)("[data-video]",r)??[];this.art.on("destroy",(()=>clearTimeout(i))),function t(){for(let t=0;tnull,this.init(t.option.subtitle);let e=!1;t.on("video:timeupdate",(()=>{if(!this.url)return;const t=this.art.template.$video.webkitDisplayingFullscreen;"boolean"==typeof t&&t!==e&&(e=t,this.createTrack(t?"subtitles":"metadata",this.url))}))}get url(){return this.art.template.$track.src}set url(t){this.switch(t)}get textTrack(){return this.art.template.$video.textTracks[0]}get activeCue(){return this.textTrack.activeCues[0]}style(t,e){const{$subtitle:r}=this.art.template;return"object"==typeof t?(0,a.setStyles)(r,t):(0,a.setStyle)(r,t,e)}update(){const{$subtitle:t}=this.art.template;t.innerHTML="",this.activeCue&&(this.art.option.subtitle.escape?t.innerHTML=this.activeCue.text.split(/\r?\n/).map((t=>`

${(0,a.escape)(t)}

`)).join(""):t.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}async switch(t,e={}){const{i18n:r,notice:o,option:a}=this.art,n={...a.subtitle,...e,url:t},i=await this.init(n);return e.name&&(o.show=`${r.get("Switch Subtitle")}: ${e.name}`),i}createTrack(t,e){const{template:r,proxy:o}=this.art,{$video:n,$track:i}=r,s=(0,a.createElement)("track");s.default=!0,s.kind=t,s.src=e,s.track.mode="hidden",this.eventDestroy(),(0,a.remove)(i),(0,a.append)(n,s),r.$track=s,this.eventDestroy=o(this.textTrack,"cuechange",(()=>this.update()))}async init(t){const{notice:e,template:{$subtitle:r}}=this.art;if((0,l.default)(t,u.default.subtitle),t.url)return this.style(t.style),fetch(t.url).then((t=>t.arrayBuffer())).then((e=>{const r=new TextDecoder(t.encoding).decode(e);switch(this.art.emit("subtitleLoad",t.url),t.type??(0,a.getExt)(t.url)){case"srt":{const e=(0,a.srtToVtt)(r),o=t.onVttLoad(e);return(0,a.vttToBlob)(o)}case"ass":{const e=(0,a.assToVtt)(r),o=t.onVttLoad(e);return(0,a.vttToBlob)(o)}case"vtt":{const e=t.onVttLoad(r);return(0,a.vttToBlob)(e)}default:return t.url}})).then((t=>(r.innerHTML="",this.url===t||(URL.revokeObjectURL(this.url),this.createTrack("metadata",t),this.art.emit("subtitleSwitch",t)),t))).catch((t=>{throw r.innerHTML="",e.show=t,t}))}}r.default=p},{"./utils":"h3rH9","./utils/component":"guki8","option-validator":"bAWi2","./scheme":"AdvwB","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"1Epl5":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils/error"),n=t("./clickInit"),i=o.interopDefault(n),s=t("./hoverInit"),l=o.interopDefault(s),c=t("./moveInit"),u=o.interopDefault(c),p=t("./resizeInit"),d=o.interopDefault(p),f=t("./gestureInit"),h=o.interopDefault(f),m=t("./viewInit"),g=o.interopDefault(m),v=t("./documentInit"),y=o.interopDefault(v),b=t("./updateInit"),x=o.interopDefault(b);r.default=class{constructor(t){this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,i.default)(t,this),(0,l.default)(t,this),(0,u.default)(t,this),(0,d.default)(t,this),(0,h.default)(t,this),(0,g.default)(t,this),(0,y.default)(t,this),(0,x.default)(t,this)}proxy(t,e,r,o={}){if(Array.isArray(e))return e.map((e=>this.proxy(t,e,r,o)));t.addEventListener(e,r,o);const a=()=>t.removeEventListener(e,r,o);return this.destroyEvents.push(a),a}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}loadImg(t){return new Promise(((e,r)=>{let o;if(t instanceof HTMLImageElement)o=t;else{if("string"!=typeof t)return r(new(0,a.ArtPlayerError)("Unable to get Image"));o=new Image,o.src=t}if(o.complete)return e(o);this.proxy(o,"load",(()=>e(o))),this.proxy(o,"error",(()=>r(new(0,a.ArtPlayerError)(`Failed to load Image: ${o.src}`))))}))}remove(t){const e=this.destroyEvents.indexOf(t);e>-1&&(t(),this.destroyEvents.splice(e,1))}destroy(){for(let t=0;t{(0,o.includeFromEvent)(e,a)?(t.isInput="INPUT"===e.target.tagName,t.isFocus=!0,t.emit("focus",e)):(t.isInput=!1,t.isFocus=!1,t.emit("blur",e))}));let i=0;e.proxy(n,"click",(e=>{const a=Date.now(),{MOBILE_CLICK_PLAY:n,DBCLICK_TIME:s,MOBILE_DBCLICK_PLAY:l,DBCLICK_FULLSCREEN:c}=r;a-i<=s?(t.emit("dblclick",e),o.isMobile?!t.isLock&&l&&t.toggle():c&&(t.fullscreen=!t.fullscreen)):(t.emit("click",e),o.isMobile?!t.isLock&&n&&t.toggle():t.toggle()),i=a}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],kpTJf:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t,e){const{$player:r}=t.template;e.hover(r,(e=>{(0,o.addClass)(r,"art-hover"),t.emit("hover",!0,e)}),(e=>{(0,o.removeClass)(r,"art-hover"),t.emit("hover",!1,e)}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],ef6qz:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",(e=>{t.emit("mousemove",e)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"9TXOX":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t,e){const{option:r,constructor:a}=t;t.on("resize",(()=>{const{aspectRatio:e,notice:o}=t;"standard"===t.state&&r.autoSize&&t.autoSize(),t.aspectRatio=e,o.show=""}));const n=(0,o.debounce)((()=>t.emit("resize")),a.RESIZE_TIME);e.proxy(window,["orientationchange","resize"],(()=>n())),screen&&screen.orientation&&screen.orientation.onchange&&e.proxy(screen.orientation,"change",(()=>n()))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],dePMU:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils"),a=t("../control/progress");function n(t,e,r,o){var a=e-o,n=r-t,i=0;if(Math.abs(n)<2&&Math.abs(a)<2)return i;var s=function(t,e){return 180*Math.atan2(e,t)/Math.PI}(n,a);return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:((s>=135&&s<=180)??(s>=-180&&s<-135))&&(i=3),i}r.default=function(t,e){if(o.isMobile&&!t.option.isLive){const{$video:r,$progress:i}=t.template;let s=null,l=!1,c=0,u=0,p=0;const d=e=>{if(1===e.touches.length&&!t.isLock){s===i&&(0,a.setCurrentTime)(t,e),l=!0;const{pageX:r,pageY:o}=e.touches[0];c=r,u=o,p=t.currentTime}},f=e=>{if(1===e.touches.length&&l&&t.duration){const{pageX:a,pageY:i}=e.touches[0],l=n(c,u,a,i),d=[3,4].includes(l),f=[1,2].includes(l);if((d&&!t.isRotate)??(f&&t.isRotate)){const e=(0,o.clamp)((a-c)/t.width,-1,1),n=(0,o.clamp)((i-u)/t.height,-1,1),l=t.isRotate?n:e,d=s===r?t.constructor.TOUCH_MOVE_RATIO:1,f=(0,o.clamp)(p+t.duration*l*d,0,t.duration);t.seek=f,t.emit("setBar","played",(0,o.clamp)(f/t.duration,0,1)),t.notice.show=`${(0,o.secondToTime)(f)} / ${(0,o.secondToTime)(t.duration)}`}}},h=()=>{l&&(c=0,u=0,p=0,l=!1,s=null)};e.proxy(i,"touchstart",(t=>{s=i,d(t)})),e.proxy(r,"touchstart",(t=>{s=r,d(t)})),e.proxy(r,"touchmove",f),e.proxy(i,"touchmove",f),e.proxy(document,"touchend",h)}}},{"../utils":"h3rH9","../control/progress":"aBBSH","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],hDyWF:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t,e){const{option:r,constructor:a,template:{$container:n}}=t,i=(0,o.throttle)((()=>{t.emit("view",(0,o.isInViewport)(n,a.SCROLL_GAP))}),a.SCROLL_TIME);e.proxy(window,"scroll",(()=>i())),t.on("view",(e=>{r.autoMini&&(t.mini=!e)}))}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"7RjDP":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t,e){e.proxy(document,"mousemove",(e=>{t.emit("document:mousemove",e)})),e.proxy(document,"mouseup",(e=>{t.emit("document:mouseup",e)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"8SmBT":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){if(t.constructor.USE_RAF){let e=null;!function r(){t.playing&&t.emit("raf"),t.isDestroy||(e=requestAnimationFrame(r))}(),t.on("destroy",(()=>{cancelAnimationFrame(e)}))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],eTow4:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("./utils");r.default=class{constructor(t){this.art=t,this.keys={},t.option.hotkey&&!o.isMobile&&this.init()}init(){const{proxy:t,constructor:e}=this.art;this.add(27,(()=>{this.art.fullscreenWeb&&(this.art.fullscreenWeb=!1)})),this.add(32,(()=>{this.art.toggle()})),this.add(37,(()=>{this.art.backward=e.SEEK_STEP})),this.add(38,(()=>{this.art.volume+=e.VOLUME_STEP})),this.add(39,(()=>{this.art.forward=e.SEEK_STEP})),this.add(40,(()=>{this.art.volume-=e.VOLUME_STEP})),t(window,"keydown",(t=>{if(this.art.isFocus){const e=document.activeElement.tagName.toUpperCase(),r=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==r&&"true"!==r){const e=this.keys[t.keyCode];if(e){t.preventDefault();for(let r=0;r{a.innerText="",(0,o.removeClass)(r,"art-notice-show")}),e.NOTICE_TIME)):(0,o.removeClass)(r,"art-notice-show")}}},{"./utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2etr0":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./utils"),n=t("./utils/component"),i=o.interopDefault(n);class s extends i.default{constructor(t){super(t),this.name="mask";const{template:e,icons:r,events:o}=t,n=(0,a.append)(e.$state,r.state),i=(0,a.append)(e.$state,r.error);(0,a.setStyle)(i,"display","none"),t.on("destroy",(()=>{(0,a.setStyle)(n,"display","none"),(0,a.setStyle)(i,"display",null)})),o.proxy(e.$state,"click",(()=>t.play()))}}r.default=s},{"./utils":"h3rH9","./utils/component":"guki8","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"6dYSr":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("bundle-text:./loading.svg"),i=o.interopDefault(n),s=t("bundle-text:./state.svg"),l=o.interopDefault(s),c=t("bundle-text:./check.svg"),u=o.interopDefault(c),p=t("bundle-text:./play.svg"),d=o.interopDefault(p),f=t("bundle-text:./pause.svg"),h=o.interopDefault(f),m=t("bundle-text:./volume.svg"),g=o.interopDefault(m),v=t("bundle-text:./volume-close.svg"),y=o.interopDefault(v),b=t("bundle-text:./screenshot.svg"),x=o.interopDefault(b),w=t("bundle-text:./setting.svg"),j=o.interopDefault(w),k=t("bundle-text:./arrow-left.svg"),S=o.interopDefault(k),$=t("bundle-text:./arrow-right.svg"),I=o.interopDefault($),T=t("bundle-text:./playback-rate.svg"),E=o.interopDefault(T),O=t("bundle-text:./aspect-ratio.svg"),M=o.interopDefault(O),F=t("bundle-text:./config.svg"),C=o.interopDefault(F),D=t("bundle-text:./pip.svg"),H=o.interopDefault(D),B=t("bundle-text:./lock.svg"),A=o.interopDefault(B),R=t("bundle-text:./unlock.svg"),z=o.interopDefault(R),L=t("bundle-text:./fullscreen-off.svg"),P=o.interopDefault(L),N=t("bundle-text:./fullscreen-on.svg"),_=o.interopDefault(N),Z=t("bundle-text:./fullscreen-web-off.svg"),V=o.interopDefault(Z),q=t("bundle-text:./fullscreen-web-on.svg"),W=o.interopDefault(q),U=t("bundle-text:./switch-on.svg"),Y=o.interopDefault(U),X=t("bundle-text:./switch-off.svg"),G=o.interopDefault(X),K=t("bundle-text:./flip.svg"),J=o.interopDefault(K),Q=t("bundle-text:./error.svg"),tt=o.interopDefault(Q),et=t("bundle-text:./close.svg"),rt=o.interopDefault(et),ot=t("bundle-text:./airplay.svg"),at=o.interopDefault(ot);r.default=class{constructor(t){const e={loading:i.default,state:l.default,play:d.default,pause:h.default,check:u.default,volume:g.default,volumeClose:y.default,screenshot:x.default,setting:j.default,pip:H.default,arrowLeft:S.default,arrowRight:I.default,playbackRate:E.default,aspectRatio:M.default,config:C.default,lock:A.default,flip:J.default,unlock:z.default,fullscreenOff:P.default,fullscreenOn:_.default,fullscreenWebOff:V.default,fullscreenWebOn:W.default,switchOn:Y.default,switchOff:G.default,error:tt.default,close:rt.default,airplay:at.default,...t.option.icons};for(const t in e)(0,a.def)(this,t,{get:()=>(0,a.getIcon)(t,e[t])})}}},{"../utils":"h3rH9","bundle-text:./loading.svg":"fY5Gt","bundle-text:./state.svg":"iNfLt","bundle-text:./check.svg":"jtE9u","bundle-text:./play.svg":"elgfY","bundle-text:./pause.svg":"eKokJ","bundle-text:./volume.svg":"hNB4y","bundle-text:./volume-close.svg":"i9vta","bundle-text:./screenshot.svg":"kB3Mf","bundle-text:./setting.svg":"3MONs","bundle-text:./arrow-left.svg":"iMCpk","bundle-text:./arrow-right.svg":"3oe4L","bundle-text:./playback-rate.svg":"liE22","bundle-text:./aspect-ratio.svg":"8HqYc","bundle-text:./config.svg":"hYAAH","bundle-text:./pip.svg":"jmNrH","bundle-text:./lock.svg":"cIqko","bundle-text:./unlock.svg":"65zy4","bundle-text:./fullscreen-off.svg":"jaJRT","bundle-text:./fullscreen-on.svg":"cRY1X","bundle-text:./fullscreen-web-off.svg":"3aVGL","bundle-text:./fullscreen-web-on.svg":"4DiVn","bundle-text:./switch-on.svg":"kwdKE","bundle-text:./switch-off.svg":"bWfXZ","bundle-text:./flip.svg":"h3zZ9","bundle-text:./error.svg":"7Oyth","bundle-text:./close.svg":"U5Jcy","bundle-text:./airplay.svg":"jK5Fx","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fY5Gt:[function(t,e,r){e.exports=''},{}],iNfLt:[function(t,e,r){e.exports=''},{}],jtE9u:[function(t,e,r){e.exports=''},{}],elgfY:[function(t,e,r){e.exports=''},{}],eKokJ:[function(t,e,r){e.exports=''},{}],hNB4y:[function(t,e,r){e.exports=''},{}],i9vta:[function(t,e,r){e.exports=''},{}],kB3Mf:[function(t,e,r){e.exports=''},{}],"3MONs":[function(t,e,r){e.exports=''},{}],iMCpk:[function(t,e,r){e.exports=''},{}],"3oe4L":[function(t,e,r){e.exports=''},{}],liE22:[function(t,e,r){e.exports=''},{}],"8HqYc":[function(t,e,r){e.exports=''},{}],hYAAH:[function(t,e,r){e.exports=''},{}],jmNrH:[function(t,e,r){e.exports=''},{}],cIqko:[function(t,e,r){e.exports=''},{}],"65zy4":[function(t,e,r){e.exports=''},{}],jaJRT:[function(t,e,r){e.exports=''},{}],cRY1X:[function(t,e,r){e.exports=''},{}],"3aVGL":[function(t,e,r){e.exports=''},{}],"4DiVn":[function(t,e,r){e.exports=''},{}],kwdKE:[function(t,e,r){e.exports=''},{}],bWfXZ:[function(t,e,r){e.exports=''},{}],h3zZ9:[function(t,e,r){e.exports=''},{}],"7Oyth":[function(t,e,r){e.exports=''},{}],U5Jcy:[function(t,e,r){e.exports=''},{}],jK5Fx:[function(t,e,r){e.exports=''},{}],bRHiA:[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("./flip"),n=o.interopDefault(a),i=t("./aspectRatio"),s=o.interopDefault(i),l=t("./playbackRate"),c=o.interopDefault(l),u=t("./subtitleOffset"),p=o.interopDefault(u),d=t("../utils/component"),f=o.interopDefault(d),h=t("../utils/error"),m=t("../utils");class g extends f.default{constructor(t){super(t);const{option:e,controls:r,template:{$setting:o}}=t;this.name="setting",this.$parent=o,this.option=[],this.events=[],this.cache=new Map,e.setting&&(this.init(),t.on("blur",(()=>{this.show&&(this.show=!1,this.render(this.option))})),t.on("focus",(t=>{const e=(0,m.includeFromEvent)(t,r.setting),o=(0,m.includeFromEvent)(t,this.$parent);!this.show||e||o||(this.show=!1,this.render(this.option))})))}static makeRecursion(t,e,r){for(let o=0;o
'),i=(0,m.createElement)("div");(0,m.addClass)(i,"art-setting-item-left-icon"),(0,m.append)(i,e.arrowLeft),(0,m.append)(n,i),(0,m.append)(n,t.$parentItem.html);const s=r(a,"click",(()=>this.render(t.$parentList)));return this.events.push(s),a}creatItem(t,e){const{icons:r,proxy:o,constructor:a}=this.art,n=(0,m.createElement)("div");(0,m.addClass)(n,"art-setting-item"),(0,m.setStyle)(n,"height",`${a.SETTING_ITEM_HEIGHT}px`),(0,m.isStringOrNumber)(e.name)&&(n.dataset.name=e.name),(0,m.isStringOrNumber)(e.value)&&(n.dataset.value=e.value);const i=(0,m.append)(n,'
'),s=(0,m.append)(n,'
'),l=(0,m.createElement)("div");switch((0,m.addClass)(l,"art-setting-item-left-icon"),t){case"switch":case"range":(0,m.append)(l,(0,m.isStringOrNumber)(e.icon)??e.icon instanceof Element?e.icon:r.config);break;case"selector":e.selector&&e.selector.length?(0,m.append)(l,(0,m.isStringOrNumber)(e.icon)??e.icon instanceof Element?e.icon:r.config):(0,m.append)(l,r.check)}(0,m.append)(i,l),e.$icon=l,(0,m.def)(e,"icon",{configurable:!0,get:()=>l.innerHTML,set(t){(0,m.isStringOrNumber)(t)&&(l.innerHTML=t)}});const c=(0,m.createElement)("div");(0,m.addClass)(c,"art-setting-item-left-text"),(0,m.append)(c,e.html??""),(0,m.append)(i,c),e.$html=c,(0,m.def)(e,"html",{configurable:!0,get:()=>c.innerHTML,set(t){(0,m.isStringOrNumber)(t)&&(c.innerHTML=t)}});const u=(0,m.createElement)("div");switch((0,m.addClass)(u,"art-setting-item-right-tooltip"),(0,m.append)(u,e.tooltip??""),(0,m.append)(s,u),e.$tooltip=u,(0,m.def)(e,"tooltip",{configurable:!0,get:()=>u.innerHTML,set(t){(0,m.isStringOrNumber)(t)&&(u.innerHTML=t)}}),t){case"switch":{const t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");const o=(0,m.append)(t,r.switchOn),a=(0,m.append)(t,r.switchOff);(0,m.setStyle)(e.switch?a:o,"display","none"),(0,m.append)(s,t),e.$switch=e.switch,(0,m.def)(e,"switch",{configurable:!0,get:()=>e.$switch,set(t){e.$switch=t,t?((0,m.setStyle)(a,"display","none"),(0,m.setStyle)(o,"display",null)):((0,m.setStyle)(a,"display",null),(0,m.setStyle)(o,"display","none"))}});break}case"range":{const t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon");const r=(0,m.append)(t,'');r.value=e.range[0]??0,r.min=e.range[1]??0,r.max=e.range[2]??10,r.step=e.range[3]??1,(0,m.addClass)(r,"art-setting-range"),(0,m.append)(s,t),e.$range=r,(0,m.def)(e,"range",{configurable:!0,get:()=>r.valueAsNumber,set(t){r.value=Number(t)}})}break;case"selector":if(e.selector&&e.selector.length){const t=(0,m.createElement)("div");(0,m.addClass)(t,"art-setting-item-right-icon"),(0,m.append)(t,r.arrowRight),(0,m.append)(s,t)}}switch(t){case"switch":if(e.onSwitch){const t=o(n,"click",(async t=>{e.switch=await e.onSwitch.call(this.art,e,n,t)}));this.events.push(t)}break;case"range":if(e.$range){if(e.onRange){const t=o(e.$range,"change",(async t=>{e.tooltip=await e.onRange.call(this.art,e,n,t)}));this.events.push(t)}if(e.onChange){const t=o(e.$range,"input",(async t=>{e.tooltip=await e.onChange.call(this.art,e,n,t)}));this.events.push(t)}}break;case"selector":{const t=o(n,"click",(async t=>{if(e.selector&&e.selector.length)this.render(e.selector,e.width);else{(0,m.inverseClass)(n,"art-current");for(let t=0;tc?((0,m.setStyle)(a,"left",null),(0,m.setStyle)(a,"right",null)):((0,m.setStyle)(a,"left",`${u}px`),(0,m.setStyle)(a,"right","auto"))}}render(t,e){const{constructor:r}=this.art;if(this.cache.has(t)){const e=this.cache.get(t);(0,m.inverseClass)(e,"art-current"),(0,m.setStyle)(this.$parent,"width",`${e.dataset.width}px`),(0,m.setStyle)(this.$parent,"height",`${e.dataset.height}px`),this.updateStyle(Number(e.dataset.width))}else{const o=(0,m.createElement)("div");(0,m.addClass)(o,"art-setting-panel"),o.dataset.width=e??r.SETTING_WIDTH,o.dataset.height=t.length*r.SETTING_ITEM_HEIGHT,t[0]&&t[0].$parentItem&&((0,m.append)(o,this.creatHeader(t[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(let e=0;et.dataset.value===a));n&&(0,o.inverseClass)(n,"art-current")}return{width:a,name:"flip",html:e.get("Video Flip"),tooltip:e.get((0,o.capitalize)(t.flip)),icon:r.flip,selector:n.map((r=>({value:r,name:`aspect-ratio-${r}`,default:r===t.flip,html:e.get((0,o.capitalize)(r))}))),onSelect:e=>(t.flip=e.value,e.html),mounted:(e,r)=>{i(e,r.$tooltip,t.flip),t.on("flip",(()=>{i(e,r.$tooltip,t.flip)}))}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5lAsp":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,ASPECT_RATIO:n}}=t;function i(t){return"default"===t?e.get("Default"):t}function s(t,e,r){e&&(e.innerText=i(r));const a=(0,o.queryAll)(".art-setting-item",t).find((t=>t.dataset.value===r));a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(t.aspectRatio),selector:n.map((e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:i(e)}))),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:(e,r)=>{s(e,r.$tooltip,t.aspectRatio),t.on("aspectRatio",(()=>{s(e,r.$tooltip,t.aspectRatio)}))}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],e6hsR:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:a,PLAYBACK_RATE:n}}=t;function i(t){return 1===t?e.get("Normal"):t.toFixed(1)}function s(t,e,r){e&&(e.innerText=i(r));const a=(0,o.queryAll)(".art-setting-item",t).find((t=>Number(t.dataset.value)===r));a&&(0,o.inverseClass)(a,"art-current")}return{width:a,name:"playback-rate",html:e.get("Play Speed"),tooltip:i(t.playbackRate),icon:r.playbackRate,selector:n.map((e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.playbackRate,html:i(e)}))),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:(e,r)=>{s(e,r.$tooltip,t.playbackRate),t.on("video:ratechange",(()=>{s(e,r.$tooltip,t.playbackRate)}))}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],fFNEr:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(t){const{i18n:e,icons:r,constructor:o}=t;return{width:o.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-5,5,.1],onChange:e=>(t.subtitleOffset=e.range,e.range+"s")}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],f2Thp:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);r.default=class{constructor(){this.name="artplayer_settings",this.settings={}}get(t){try{const e=JSON.parse(window.localStorage.getItem(this.name))??{};return t?e[t]:e}catch(e){return t?this.settings[t]:this.settings}}set(t,e){try{const r=Object.assign({},this.get(),{[t]:e});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[t]=e}}del(t){try{const e=this.get();delete e[t],window.localStorage.setItem(this.name,JSON.stringify(e))}catch(e){delete this.settings[t]}}clear(){try{window.localStorage.removeItem(this.name)}catch(t){this.settings={}}}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"96ThS":[function(t,e,r){var o=t("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r);var a=t("../utils"),n=t("./miniProgressBar"),i=o.interopDefault(n),s=t("./autoOrientation"),l=o.interopDefault(s),c=t("./autoPlayback"),u=o.interopDefault(c),p=t("./fastForward"),d=o.interopDefault(p),f=t("./lock"),h=o.interopDefault(f);r.default=class{constructor(t){this.art=t,this.id=0;const{option:e}=t;e.miniProgressBar&&!e.isLive&&this.add(i.default),e.lock&&a.isMobile&&this.add(h.default),e.autoPlayback&&!e.isLive&&this.add(u.default),e.autoOrientation&&a.isMobile&&this.add(l.default),e.fastForward&&a.isMobile&&!e.isLive&&this.add(d.default);for(let t=0;t{t.layers.add({name:"mini-progress-bar",mounted(e){t.on("destroy",(()=>{e.style.display="none"})),t.constructor.USE_RAF?t.on("raf",(()=>{e.style.width=100*t.played+"%"})):t.on("video:timeupdate",(()=>{e.style.width=100*t.played+"%"})),t.on("setBar",((t,r)=>{"played"===t&&(e.style.width=100*r+"%")}))}})})),{name:"mini-progress-bar"}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"2O9qO":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{constructor:e,template:{$player:r,$video:a}}=t;return t.on("fullscreenWeb",(n=>{if(n){const{videoWidth:n,videoHeight:i}=a,{clientWidth:s,clientHeight:l}=document.documentElement;((n>i&&sl))&&setTimeout((()=>{(0,o.setStyle)(r,"width",`${l}px`),(0,o.setStyle)(r,"height",`${s}px`),(0,o.setStyle)(r,"transform-origin","0 0"),(0,o.setStyle)(r,"transform",`rotate(90deg) translate(0, -${s}px)`),(0,o.addClass)(r,"art-auto-orientation"),t.isRotate=!0,t.emit("resize")}),e.AUTO_ORIENTATION_TIME)}else(0,o.hasClass)(r,"art-auto-orientation")&&((0,o.removeClass)(r,"art-auto-orientation"),t.isRotate=!1,t.emit("resize"))})),t.on("fullscreen",(async t=>{const e=screen.orientation.type;if(t){const{videoWidth:t,videoHeight:n}=a,{clientWidth:i,clientHeight:s}=document.documentElement;if((t>n&&is)){const t=e.startsWith("portrait")?"landscape":"portrait";await screen.orientation.lock(t),(0,o.addClass)(r,"art-auto-orientation-fullscreen")}}else(0,o.hasClass)(r,"art-auto-orientation-fullscreen")&&(await screen.orientation.lock(e),(0,o.removeClass)(r,"art-auto-orientation-fullscreen"))})),{name:"autoOrientation",get state(){return(0,o.hasClass)(r,"art-auto-orientation")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],iiOc1:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{i18n:e,icons:r,storage:a,constructor:n,proxy:i,template:{$poster:s}}=t,l=t.layers.add({name:"auto-playback",html:'
'}),c=(0,o.query)(".art-auto-playback-last",l),u=(0,o.query)(".art-auto-playback-jump",l),p=(0,o.query)(".art-auto-playback-close",l);return t.on("video:timeupdate",(()=>{if(t.playing){const e=a.get("times")??{},r=Object.keys(e);r.length>n.AUTO_PLAYBACK_MAX&&delete e[r[0]],e[t.option.id??t.option.url]=t.currentTime,a.set("times",e)}})),t.on("ready",(()=>{const d=(a.get("times")??{})[t.option.id??t.option.url];d&&d>=n.AUTO_PLAYBACK_MIN&&((0,o.append)(p,r.close),(0,o.setStyle)(l,"display","flex"),c.innerText=`${e.get("Last Seen")} ${(0,o.secondToTime)(d)}`,u.innerText=e.get("Jump Play"),i(p,"click",(()=>{(0,o.setStyle)(l,"display","none")})),i(u,"click",(()=>{t.seek=d,t.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")})),t.once("video:timeupdate",(()=>{setTimeout((()=>{(0,o.setStyle)(l,"display","none")}),n.AUTO_PLAYBACK_TIMEOUT)})))})),{name:"auto-playback",get times(){return a.get("times")??{}},clear:()=>a.del("times"),delete(t){const e=a.get("times")??{};return delete e[t],a.set("times",e),e}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],d9NUE:[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{constructor:e,proxy:r,template:{$player:a,$video:n}}=t;let i=null,s=!1,l=1;const c=()=>{clearTimeout(i),s&&(s=!1,t.playbackRate=l,(0,o.removeClass)(a,"art-fast-forward"))};return r(n,"touchstart",(r=>{1===r.touches.length&&t.playing&&!t.isLock&&(i=setTimeout((()=>{s=!0,l=t.playbackRate,t.playbackRate=e.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")}),e.FAST_FORWARD_TIME))})),r(document,"touchmove",c),r(document,"touchend",c),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}],"5dnKh":[function(t,e,r){t("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var o=t("../utils");r.default=function(t){const{layers:e,icons:r,template:{$player:a}}=t;return e.add({name:"lock",mounted(e){const a=(0,o.append)(e,r.lock),n=(0,o.append)(e,r.unlock);(0,o.setStyle)(a,"display","none"),t.on("lock",(t=>{t?((0,o.setStyle)(a,"display","inline-flex"),(0,o.setStyle)(n,"display","none")):((0,o.setStyle)(a,"display","none"),(0,o.setStyle)(n,"display","inline-flex"))}))},click(){(0,o.hasClass)(a,"art-lock")?((0,o.removeClass)(a,"art-lock"),this.isLock=!1,t.emit("lock",!1)):((0,o.addClass)(a,"art-lock"),this.isLock=!0,t.emit("lock",!0))}}),{name:"lock",get state(){return(0,o.hasClass)(a,"art-lock")}}}},{"../utils":"h3rH9","@parcel/transformer-js/src/esmodule-helpers.js":"guZOB"}]},["abjMI"],"abjMI","parcelRequireb749"); \ No newline at end of file diff --git a/packages/artplayer/dist/artplayer.legacy.js b/packages/artplayer/dist/artplayer.legacy.js index b31e0bbd3..2e8ea74cb 100644 --- a/packages/artplayer/dist/artplayer.legacy.js +++ b/packages/artplayer/dist/artplayer.legacy.js @@ -4,56 +4,4 @@ * (c) 2017-2023 Harvey Zack * Released under the MIT License. */ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,r,n,o){/* eslint-disable no-undef */var a="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},i="function"==typeof a[n]&&a[n],s=i.cache||{},l="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function c(t,r){if(!s[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof a[n]&&a[n];if(!r&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(i)return i(t,!0);// Try the node require function if it exists. -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=s[t]=new c.Module(t);e[t][0].call(p.exports,f,p,p.exports,this)}return s[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=s,c.parent=i,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 ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c0)||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.0"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2023-08-26 13:44: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,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:{},escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:m.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}}]),r}(h.default);if(er.DEBUG=!1,er.CONTEXTMENU=!0,er.NOTICE_TIME=2e3,er.SETTING_WIDTH=250,er.SETTING_ITEM_WIDTH=200,er.SETTING_ITEM_HEIGHT=35,er.RESIZE_TIME=200,er.SCROLL_TIME=200,er.SCROLL_GAP=50,er.AUTO_PLAYBACK_MAX=10,er.AUTO_PLAYBACK_MIN=5,er.AUTO_PLAYBACK_TIMEOUT=3e3,er.RECONNECT_TIME_MAX=5,er.RECONNECT_SLEEP_TIME=1e3,er.CONTROL_HIDE_TIME=3e3,er.DBCLICK_TIME=300,er.DBCLICK_FULLSCREEN=!0,er.MOBILE_DBCLICK_PLAY=!0,er.MOBILE_CLICK_PLAY=!1,er.AUTO_ORIENTATION_TIME=200,er.INFO_LOOP_TIME=1e3,er.FAST_FORWARD_VALUE=3,er.FAST_FORWARD_TIME=1e3,er.TOUCH_MOVE_RATIO=.5,er.VOLUME_STEP=.1,er.SEEK_STEP=5,er.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],er.ASPECT_RATIO=["default","4:3","16:9"],er.FLIP=["normal","horizontal","vertical"],er.FULLSCREEN_WEB_IN_BODY=!1,er.LOG_VERSION=!0,er.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){var en=m.createElement("style");en.id="artplayer-style",en.textContent=u.default,document.head.appendChild(en)}"undefined"!=typeof window&&(window.Artplayer=er),setTimeout(function(){er.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(er.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")})},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","bundle-text:./style/index.less":"3eiHP","option-validator":"8OeHO","./utils/emitter":"2V7i9","./utils":"7MU7R","./scheme":"39ygm","./config":"emMME","./template":"gqSBs","./i18n":"7iXtC","./player":"j7piB","./control":"7z0K5","./contextmenu":"5RLZo","./info":"6JYu5","./subtitle":"WYfF6","./events":"47RGg","./hotkey":"gszG1","./layer":"dImgv","./loading":"6vtvO","./notice":"3Z2RQ","./mask":"hUoLo","./icons":"4Bz82","./setting":"hGnnd","./storage":"8dSC3","./plugins":"gv8Rm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jgeid:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.defineInteropFlag(r),n.export(r,"_assert_this_initialized",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iWrD0:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||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})}},{}],"9iJMm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_class_call_check",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"21IOT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;r1?n-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function s(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function u(e,t){var r;return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),null!==(r=e.lastElementChild)&&void 0!==r?r:e.lastChild}function p(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function d(e,t){for(var r in t)f(e,r,t[r]);return e}function h(e,t){var r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function m(e){return Array.from(e.parentElement.children).filter(function(t){return t!==e})}function v(e,t){m(e).forEach(function(e){return l(e,t)}),s(e,t)}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";o.isMobile||(e.setAttribute("aria-label",t),s(e,"hint--rounded"),s(e,"hint--".concat(r)))}function _(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e.getBoundingClientRect(),a=null!==(t=window.innerHeight)&&void 0!==t?t:document.documentElement.clientHeight,i=null!==(r=window.innerWidth)&&void 0!==r?r:document.documentElement.clientWidth,s=o.top-n<=a&&o.top+o.height+n>=0,l=o.left-n<=i+n&&o.left+o.width+n>=0;return s&&l}function y(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function b(e,t){return t.parentNode.replaceChild(e,t),e}function w(e){return document.createElement(e)}function x(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=w("i");return s(r,"art-icon"),s(r,"art-icon-".concat(e)),u(r,t),r}},{"./compatibility":"f9Vc8","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],f9Vc8:[function(e,t,r){var n,o=e("@parcel/transformer-js/src/esmodule-helpers.js");o.defineInteropFlag(r),o.export(r,"userAgent",function(){return a}),o.export(r,"isSafari",function(){return i}),o.export(r,"isWechat",function(){return s}),o.export(r,"isIE",function(){return l}),o.export(r,"isAndroid",function(){return c}),o.export(r,"isIOS",function(){return u}),o.export(r,"isIOS13",function(){return p}),o.export(r,"isMobile",function(){return f});var a="undefined"!=typeof navigator?navigator.userAgent:"",i=/^((?!chrome|android).)*safari/i.test(a),s=/MicroMessenger/i.test(a),l=/MSIE|Trident/i.test(a),c=/android/i.test(a),u=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,p=null!=u?u:a.includes("Macintosh")&&navigator.maxTouchPoints>=1,f=null!==(n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))&&void 0!==n?n:p},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6WanZ":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ArtPlayerError",function(){return c}),n.export(r,"errorHandle",function(){return u});var o=e("@swc/helpers/_/_assert_this_initialized"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_wrap_native_super"),l=e("@swc/helpers/_/_create_super"),c=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,l._)(r);function r(e,n){var i;return(0,a._)(this,r),i=t.call(this,e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace((0,o._)(i),null!=n?n:i.constructor),i.name="ArtPlayerError",i}return r}((0,s._)(Error));function u(e,t){if(!e)throw new c(t);return e}},{"@swc/helpers/_/_assert_this_initialized":"jgeid","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_wrap_native_super":"hNYY1","@swc/helpers/_/_create_super":"86fte","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hNYY1:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_wrap_native_super",function(){return l}),n.export(r,"_",function(){return l});var o=e("./_construct.js"),a=e("./_get_prototype_of.js"),i=e("./_is_native_function.js"),s=e("./_set_prototype_of.js");function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||!(0,i._is_native_function)(e))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,o._construct)(e,arguments,(0,a._get_prototype_of)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,s._set_prototype_of)(r,e)})(e)}},{"./_construct.js":"ljlHN","./_get_prototype_of.js":"dAKgy","./_is_native_function.js":"fIKaN","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ljlHN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_construct",function(){return i}),n.export(r,"_",function(){return i});var o=e("./_is_native_reflect_construct.js"),a=e("./_set_prototype_of.js");function i(e,t,r){return(i=(0,o._is_native_reflect_construct)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,a._set_prototype_of)(o,r.prototype),o}).apply(null,arguments)}},{"./_is_native_reflect_construct.js":"7fioR","./_set_prototype_of.js":"j4HiF","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],fIKaN:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return -1!==Function.toString.call(e).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_is_native_function",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cZfjQ:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat(e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"))}function a(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function i(e){var t=RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.split(/[:.]/).map(function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;// eslint-disable-next-line no-nested-ternary -return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)}).join("")}return"WEBVTT\n\n".concat(e.split(/\r?\n/).map(function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(function(e){return e.trim()}).join("\n")}:null}).filter(function(e){return e}).map(function(e,t){return e?"".concat(t+1,"\n").concat(e.start," --> ").concat(e.end,"\n").concat(e.text):""}).filter(function(e){return e.trim()}).join("\n\n"))}n.defineInteropFlag(r),n.export(r,"srtToVtt",function(){return o}),n.export(r,"vttToBlob",function(){return a}),n.export(r,"assToVtt",function(){return i})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l2mTb:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}n.defineInteropFlag(r),n.export(r,"getExt",function(){return function e(t){return t.includes("?")?e(t.split("?")[0]):t.includes("#")?e(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}}),n.export(r,"download",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5EnnX":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"def",function(){return a}),n.export(r,"has",function(){return s}),n.export(r,"get",function(){return l}),n.export(r,"mergeDeep",function(){return function e(){for(var t=arguments.length,r=Array(t),n=0;ne.length)&&(t=e.length);for(var r=0,n=Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise(function(t){return setTimeout(t,e)})}function a(e,t){var r;return function(){for(var n=arguments.length,o=Array(n),a=0;a0?[t,r,n]:[r,n]).map(function(e){return e<10?"0".concat(e):String(e)}).join(":")}function c(e){var t;return e.replace(/[&<>'"]/g,function(e){return null!==(t=({"&":"&","<":"<",">":">","'":"'",'"':"""})[e])&&void 0!==t?t:e})}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"39ygm":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ComponentOption",function(){return h});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils"),s="array",l="boolean",c="string",u="number",p="object",f="function";function d(e,t,r){var n,o;return(0,i.errorHandle)((o=t===c,o),"".concat(r.join(".")," require '").concat(c,"' or 'Element' type"))}var h={html:d,disable:"?".concat(l),name:"?".concat(c),index:"?".concat(u),style:"?".concat(p),click:"?".concat(f),mounted:"?".concat(f),tooltip:"?".concat(c,"|").concat(u),width:"?".concat(u),selector:"?".concat(s),onSelect:"?".concat(f),switch:"?".concat(l),onSwitch:"?".concat(f),range:"?".concat(s),onRange:"?".concat(f),onChange:"?".concat(f)};r.default={id:c,container:d,url:c,poster:c,type:c,theme:c,lang:c,volume:u,isLive:l,muted:l,autoplay:l,autoSize:l,autoMini:l,loop:l,flip:l,playbackRate:l,aspectRatio:l,screenshot:l,setting:l,hotkey:l,pip:l,mutex:l,backdrop:l,fullscreen:l,fullscreenWeb:l,subtitleOffset:l,miniProgressBar:l,useSSR:l,playsInline:l,lock:l,fastForward:l,autoPlayback:l,autoOrientation:l,airplay:l,plugins:[f],layers:[h],contextmenu:[h],settings:[h],controls:[(0,a._)((0,o._)({},h),{position:function(e,t,r){var n=["top","left","right"];return(0,i.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(l),html:c,url:c}],highlight:[{time:u,text:c}],thumbnails:{url:c,number:u,column:u,width:u,height:u},subtitle:{url:c,type:c,style:p,escape:l,encoding:c,onVttLoad:f},moreVideoAttr:p,i18n:p,icons:p,cssVar:p,customType:p}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9agdF":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_object_spread",function(){return a}),n.export(r,"_",function(){return a});var o=e("./_define_property.js");function a(e){for(var t=1;t
Player version:
5.1.0
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
'}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","./utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7iXtC":[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/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("../utils"),s=e("./zh-cn"),l=n.interopDefault(s),c=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.languages={"zh-cn":l.default},this.language={},this.update(t.option.i18n)}return(0,a._)(e,[{key:"init",value:function(){var e,t=this.art.option.lang.toLowerCase();this.language=null!==(e=this.languages[t])&&void 0!==e?e:{}}},{key:"get",value:function(e){var t;return null!==(t=this.language[e])&&void 0!==t?t:e}},{key:"update",value:function(e){this.languages=(0,i.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","../utils":"7MU7R","./zh-cn":"5mkZy","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5mkZy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n={"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":"隔空播放不可用"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],j7piB:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return ew});var o=e("@swc/helpers/_/_class_call_check"),a=e("./urlMix"),i=n.interopDefault(a),s=e("./attrMix"),l=n.interopDefault(s),c=e("./playMix"),u=n.interopDefault(c),p=e("./pauseMix"),f=n.interopDefault(p),d=e("./toggleMix"),h=n.interopDefault(d),m=e("./seekMix"),v=n.interopDefault(m),g=e("./volumeMix"),_=n.interopDefault(g),y=e("./currentTimeMix"),b=n.interopDefault(y),w=e("./durationMix"),x=n.interopDefault(w),j=e("./switchMix"),k=n.interopDefault(j),M=e("./playbackRateMix"),I=n.interopDefault(M),S=e("./aspectRatioMix"),D=n.interopDefault(S),T=e("./screenshotMix"),F=n.interopDefault(T),R=e("./fullscreenMix"),E=n.interopDefault(R),O=e("./fullscreenWebMix"),C=n.interopDefault(O),W=e("./pipMix"),A=n.interopDefault(W),P=e("./loadedMix"),z=n.interopDefault(P),L=e("./playedMix"),$=n.interopDefault(L),H=e("./playingMix"),N=n.interopDefault(H),U=e("./autoSizeMix"),V=n.interopDefault(U),B=e("./rectMix"),q=n.interopDefault(B),Y=e("./flipMix"),J=n.interopDefault(Y),X=e("./miniMix"),G=n.interopDefault(X),K=e("./loopMix"),Z=n.interopDefault(K),Q=e("./posterMix"),ee=n.interopDefault(Q),et=e("./autoHeightMix"),er=n.interopDefault(et),en=e("./cssVarMix"),eo=n.interopDefault(en),ea=e("./themeMix"),ei=n.interopDefault(ea),es=e("./typeMix"),el=n.interopDefault(es),ec=e("./stateMix"),eu=n.interopDefault(ec),ep=e("./subtitleOffsetMix"),ef=n.interopDefault(ep),ed=e("./airplayMix"),eh=n.interopDefault(ed),em=e("./qualityMix"),ev=n.interopDefault(em),eg=e("./optionInit"),e_=n.interopDefault(eg),ey=e("./eventInit"),eb=n.interopDefault(ey),ew=function e(t){(0,o._)(this,e),(0,i.default)(t),(0,l.default)(t),(0,u.default)(t),(0,f.default)(t),(0,h.default)(t),(0,v.default)(t),(0,_.default)(t),(0,b.default)(t),(0,x.default)(t),(0,k.default)(t),(0,I.default)(t),(0,D.default)(t),(0,F.default)(t),(0,E.default)(t),(0,C.default)(t),(0,A.default)(t),(0,z.default)(t),(0,$.default)(t),(0,N.default)(t),(0,V.default)(t),(0,q.default)(t),(0,J.default)(t),(0,G.default)(t),(0,Z.default)(t),(0,ee.default)(t),(0,er.default)(t),(0,eo.default)(t),(0,ei.default)(t),(0,el.default)(t),(0,eu.default)(t),(0,ef.default)(t),(0,eh.default)(t),(0,ev.default)(t),(0,eb.default)(t),(0,e_.default)(t)}},{"@swc/helpers/_/_class_call_check":"9iJMm","./urlMix":"bnOAX","./attrMix":"YLwHz","./playMix":"ktu66","./pauseMix":"6JstV","./toggleMix":"cotiM","./seekMix":"8DVLx","./volumeMix":"9fjEr","./currentTimeMix":"fniLa","./durationMix":"2WMs4","./switchMix":"5XnRj","./playbackRateMix":"atzXU","./aspectRatioMix":"e67kx","./screenshotMix":"7FJKj","./fullscreenMix":"1hnoY","./fullscreenWebMix":"aLUYJ","./pipMix":"jJ7PZ","./loadedMix":"3RcYf","./playedMix":"hpdzI","./playingMix":"dQpMB","./autoSizeMix":"i3W5n","./rectMix":"eA2QA","./flipMix":"8B7eY","./miniMix":"f1BFf","./loopMix":"iaeBy","./posterMix":"3Bs5U","./autoHeightMix":"gRfBQ","./cssVarMix":"6gWkU","./themeMix":"6YX9w","./typeMix":"cBZG8","./stateMix":"bpFKI","./subtitleOffsetMix":"hyhz8","./airplayMix":"5fLM6","./qualityMix":"jj5tM","./optionInit":"PZTTa","./eventInit":"cKj2D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],bnOAX:[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/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.option,r=e.template.$video;(0,i.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,o._)(function(){var o,s,l,c;return(0,a._)(this,function(a){switch(a.label){case 0:if(!n)return[3,4];if(o=e.url,l=null!==(s=t.type)&&void 0!==s?s:(0,i.getExt)(n),c=t.customType[l],!(l&&c))return[3,2];return[4,(0,i.sleep)()];case 1:return a.sent(),e.loading.show=!0,c.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,a.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",function(){e.emit("restart",n)})),[3,6];case 4:return[4,(0,i.sleep)()];case 5:a.sent(),e.loading.show=!0,a.label=6;case 6:return[2]}})})()}})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@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,a,i){try{var s=e[a](i),l=s.value}catch(e){r(e);return}s.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise(function(n,a){var i=e.apply(t,r);function s(e){o(i,n,a,s,l,"next",e)}function l(e){o(i,n,a,s,l,"throw",e)}s(void 0)})}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",function(){return a}),n.export(r,"_",function(){return a})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6Xyd0":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_",function(){return o.__generator}),n.export(r,"_ts_generator",function(){return o.__generator});var o=e("tslib")},{tslib:"c0d7h","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],c0d7h:[function(e,t,r){/****************************************************************************** -Copyright (c) Microsoft Corporation. - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR -OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THIS SOFTWARE. -***************************************************************************** *//* global Reflect, Promise */var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"__extends",function(){return i}),n.export(r,"__assign",function(){return s}),n.export(r,"__rest",function(){return l}),n.export(r,"__decorate",function(){return c}),n.export(r,"__param",function(){return u}),n.export(r,"__esDecorate",function(){return p}),n.export(r,"__runInitializers",function(){return f}),n.export(r,"__propKey",function(){return d}),n.export(r,"__setFunctionName",function(){return h}),n.export(r,"__metadata",function(){return m}),n.export(r,"__awaiter",function(){return v}),n.export(r,"__generator",function(){return g}),n.export(r,"__createBinding",function(){return _}),n.export(r,"__exportStar",function(){return y}),n.export(r,"__values",function(){return b}),n.export(r,"__read",function(){return w}),/** @deprecated */n.export(r,"__spread",function(){return x}),/** @deprecated */n.export(r,"__spreadArrays",function(){return j}),n.export(r,"__spreadArray",function(){return k}),n.export(r,"__await",function(){return M}),n.export(r,"__asyncGenerator",function(){return I}),n.export(r,"__asyncDelegator",function(){return S}),n.export(r,"__asyncValues",function(){return D}),n.export(r,"__makeTemplateObject",function(){return T}),n.export(r,"__importStar",function(){return R}),n.export(r,"__importDefault",function(){return E}),n.export(r,"__classPrivateFieldGet",function(){return O}),n.export(r,"__classPrivateFieldSet",function(){return C}),n.export(r,"__classPrivateFieldIn",function(){return W});var o=e("@swc/helpers/_/_type_of"),a=function(e,t){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var s=function(){return(s=Object.assign||function(e){for(var t,r=1,n=arguments.length;rt.indexOf(n)&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,n=Object.getOwnPropertySymbols(e);ot.indexOf(n[o])&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function c(e,t,r,n){var o,a=arguments.length,i=a<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)i=Reflect.decorate(e,t,r,n);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(i=(a<3?o(i):a>3?o(t,r,i):o(t,r))||i);return a>3&&i&&Object.defineProperty(t,r,i),i}function u(e,t){return function(r,n){t(r,n,e)}}function p(e,t,r,n,o,a){function i(e){if(void 0!==e&&"function"!=typeof e)throw TypeError("Function expected");return e}for(var s,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(f)throw TypeError("Cannot add initializers after decoration has completed");a.push(i(e||null))};var v=(0,r[d])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw TypeError("Object expected");(s=i(v.get))&&(p.get=s),(s=i(v.set))&&(p.set=s),(s=i(v.init))&&o.push(s)}else(s=i(v))&&("field"===l?o.push(s):p[c]=s)}u&&Object.defineProperty(u,n.name,p),f=!0}function f(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])&&(6===s[0]||2===s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)i.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return i}function x(){for(var e=[],t=0;t1||s(e,t)})})}function s(e,t){try{var r;(r=o[e](t)).value instanceof M?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}}function l(e){s("next",e)}function c(e){s("throw",e)}function u(e,t){e(t),a.shift(),a.length&&s(a[0][0],a[0][1])}}function S(e){var t,r;return t={},n("next"),n("throw",function(e){throw e}),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:M(e[n](t)),done:!1}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=b(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise(function(n,o){!function(e,t,r,n){Promise.resolve(n).then(function(t){e({value:t,done:r})},t)}(n,o,(t=e[r](t)).done,t.value)})}}}function T(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function R(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&_(t,e,r);return F(t,e),t}function E(e){return e&&e.__esModule?e:{default:e}}function O(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function C(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function W(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/_/_type_of":"felZi","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],YLwHz:[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("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"attr",{value:function(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],ktu66:[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/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.i18n,r=e.notice,n=e.option,s=e.constructor.instances,l=e.template.$video;(0,i.def)(e,"play",{value:/*#__PURE__*/(0,o._)(function(){var o,i,c;return(0,a._)(this,function(a){switch(a.label){case 0:return[4,l.play()];case 1:if(o=a.sent(),r.show=t.get("Play"),e.emit("play"),n.mutex)for(i=0;iu?((0,o.setStyle)(a,"width","".concat(u*c,"px")),(0,o.setStyle)(a,"height","100%"),(0,o.setStyle)(a,"margin","0 auto")):((0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","".concat(l/u,"px")),(0,o.setStyle)(a,"margin","auto 0")),i.dataset.aspectRatio=n}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===n?t.get("Default"):n),e.emit("aspectRatio",n)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7FJKj":[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/_/_async_to_generator"),a=e("@swc/helpers/_/_ts_generator"),i=e("../utils");function s(e){var t=e.notice,r=e.template.$video,n=(0,i.createElement)("canvas");(0,i.def)(e,"getDataURL",{value:function(){return new Promise(function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),e(n.toDataURL("image/png"))}catch(e){t.show=e,o(e)}})}}),(0,i.def)(e,"getBlobUrl",{value:function(){return new Promise(function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),n.toBlob(function(t){e(URL.createObjectURL(t))})}catch(e){t.show=e,o(e)}})}}),(0,i.def)(e,"screenshot",{value:/*#__PURE__*/(0,o._)(function(){var t;return(0,a._)(this,function(n){switch(n.label){case 0:return[4,e.getDataURL()];case 1:return t=n.sent(),(0,i.download)(t,"artplayer_".concat((0,i.secondToTime)(r.currentTime),".png")),e.emit("screenshot",t),[2,t]}})})})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"1hnoY":[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"),a=e("@swc/helpers/_/_ts_generator"),i=e("../libs/screenfull"),s=n.interopDefault(i),l=e("../utils");function c(e){var t=e.i18n,r=e.notice,n=e.template,i=n.$video,c=n.$player,u=function(e){(0,s.default).on("change",function(){e.emit("fullscreen",s.default.isFullscreen)}),(0,l.def)(e,"fullscreen",{get:function(){return s.default.isFullscreen},set:function(t){return(0,o._)(function(){return(0,a._)(this,function(r){switch(r.label){case 0:if(!t)return[3,2];return e.state="fullscreen",[4,(0,s.default).request(c)];case 1:return r.sent(),(0,l.addClass)(c,"art-fullscreen"),[3,4];case 2:return[4,(0,s.default).exit()];case 3:r.sent(),(0,l.removeClass)(c,"art-fullscreen"),r.label=4;case 4:return e.emit("resize"),[2]}})})()}})},p=function(e){(0,l.def)(e,"fullscreen",{get:function(){return i.webkitDisplayingFullscreen},set:function(t){t?(e.state="fullscreen",i.webkitEnterFullscreen(),e.emit("fullscreen",!0)):(i.webkitExitFullscreen(),e.emit("fullscreen",!1)),e.emit("resize")}})};e.once("video:loadedmetadata",function(){var n;s.default.isEnabled?u(e):(null!==(n=document.fullscreenEnabled)&&void 0!==n?n:i.webkitSupportsFullscreen)?p(e):(0,l.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),// Asynchronous setting -(0,l.def)(e,"fullscreen",(0,l.get)(e,"fullscreen"))})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../libs/screenfull":"cM8lD","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cM8lD:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("@swc/helpers/_/_sliced_to_array"),o=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],// New WebKit -["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],// Old WebKit -["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],a=function(){if("undefined"==typeof document)return!1;var e=o[0],t={},r=!0,a=!1,i=void 0;try{for(var s,l=o[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,n._)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){a=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(a)throw i}}return!1}(),i={change:a.fullscreenchange,error:a.fullscreenerror},s={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise(function(r,n){var o=function(){s.off("change",o),r()};s.on("change",o);var i=e[a.requestFullscreen](t);i instanceof Promise&&i.then(o).catch(n)})},exit:function(){return new Promise(function(e,t){if(!s.isFullscreen){e();return}var r=function(){s.off("change",r),e()};s.on("change",r);var n=document[a.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)})},toggle:function(e,t){return s.isFullscreen?s.exit():s.request(e,t)},onchange:function(e){s.on("change",e)},onerror:function(e){s.on("error",e)},on:function(e,t){var r=i[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=i[e];r&&document.removeEventListener(r,t,!1)},raw:a};Object.defineProperties(s,{isFullscreen:{get:function(){return!!document[a.fullscreenElement]}},element:{enumerable:!0,get:function(){return document[a.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return!!document[a.fullscreenEnabled]}}}),a||(s={isEnabled:!1}),r.default=s},{"@swc/helpers/_/_sliced_to_array":"uVQht","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],uVQht:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_sliced_to_array",function(){return l}),n.export(r,"_",function(){return l});var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),i=e("./_non_iterable_rest.js"),s=e("./_unsupported_iterable_to_array.js");function l(e,t){return(0,o._array_with_holes)(e)||(0,a._iterable_to_array_limit)(e,t)||(0,s._unsupported_iterable_to_array)(e,t)||(0,i._non_iterable_rest)()}},{"./_array_with_holes.js":"hF14e","./_iterable_to_array_limit.js":"loYCM","./_non_iterable_rest.js":"2Mjp1","./_unsupported_iterable_to_array.js":"5m31D","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hF14e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(r),n.export(r,"_array_with_holes",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],loYCM:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r,n,o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var a=[],i=!0,s=!1;try{for(o=o.call(e);!(i=(r=o.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(e){s=!0,n=e}finally{try{i||null==o.return||o.return()}finally{if(s)throw n}}return a}}n.defineInteropFlag(r),n.export(r,"_iterable_to_array_limit",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2Mjp1":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_rest",function(){return o}),n.export(r,"_",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],aLUYJ:[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("../utils");function a(e){var t=e.constructor,r=e.template,n=r.$container,a=r.$player,i="";(0,o.def)(e,"fullscreenWeb",{get:function(){return(0,o.hasClass)(a,"art-fullscreen-web")},set:function(r){r?(i=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(document.body,a),e.state="fullscreenWeb",(0,o.setStyle)(a,"width","100%"),(0,o.setStyle)(a,"height","100%"),(0,o.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,o.append)(n,a),i&&(a.style.cssText=i,i=""),(0,o.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jJ7PZ:[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("../utils");function a(e){var t,r,n,a,i=e.i18n,s=e.notice,l=e.template.$video;document.pictureInPictureEnabled?(t=e.template.$video,r=e.proxy,n=e.notice,t.disablePictureInPicture=!1,(0,o.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch(function(e){throw n.show=e,e})):document.exitPictureInPicture().catch(function(e){throw n.show=e,e})}}),r(t,"enterpictureinpicture",function(){e.emit("pip",!0)}),r(t,"leavepictureinpicture",function(){e.emit("pip",!1)})):l.webkitSupportsPresentationMode?((a=e.template.$video).webkitSetPresentationMode("inline"),(0,o.def)(e,"pip",{get:function(){return"picture-in-picture"===a.webkitPresentationMode},set:function(t){t?(e.state="pip",a.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(a.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})):(0,o.def)(e,"pip",{get:function(){return!1},set:function(){s.show=i.get("PIP Not Supported")}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"3RcYf":[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("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,o.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],hpdzI:[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("../utils");function a(e){(0,o.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dQpMB:[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("../utils");function a(e){var t=e.template.$video;(0,o.def)(e,"playing",{get:function(){return!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],i3W5n:[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("../utils");function a(e){var t=e.template,r=t.$container,n=t.$player,a=t.$video;(0,o.def)(e,"autoSize",{value:function(){var t=a.videoWidth,i=a.videoHeight,s=r.getBoundingClientRect(),l=s.width,c=s.height,u=t/i;l/c>u?((0,o.setStyle)(n,"width","".concat(c*u/l*100,"%")),(0,o.setStyle)(n,"height","100%")):((0,o.setStyle)(n,"width","100%"),(0,o.setStyle)(n,"height","".concat(l/u/c*100,"%"))),e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],eA2QA:[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("../utils");function a(e){(0,o.def)(e,"rect",{get:function(){return e.template.$player.getBoundingClientRect()}});for(var t=["bottom","height","left","right","top","width"],r=0;r
');(0,o.append)(d,t.close),r(d,"click",p);var h=(0,o.append)(i,'
'),m=(0,o.append)(h,t.play),v=(0,o.append)(h,t.pause);return r(m,"click",function(){return e.play()}),r(v,"click",function(){return e.pause()}),f(m,v),e.on("video:playing",function(){return f(m,v)}),e.on("video:pause",function(){return f(m,v)}),e.on("video:timeupdate",function(){return f(m,v)}),r(i,"mousedown",function(e){l=0===e.button,c=e.pageX,u=e.pageY}),e.on("document:mousemove",function(e){if(l){(0,o.addClass)(i,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,o.setStyle)(i,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}}),e.on("document:mouseup",function(){if(l){l=!1,(0,o.removeClass)(i,"art-mini-droging");var e=i.getBoundingClientRect();n.set("left",e.left),n.set("top",e.top),(0,o.setStyle)(i,"left","".concat(e.left,"px")),(0,o.setStyle)(i,"top","".concat(e.top,"px")),(0,o.setStyle)(i,"transform",null)}}),i}(),m=n.get("top"),v=n.get("left");m&&v?((0,o.setStyle)(h,"top","".concat(m,"px")),(0,o.setStyle)(h,"left","".concat(v,"px")),(0,o.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],iaeBy:[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("../utils");function a(e){var t=[];(0,o.def)(e,"loop",{get:function(){return t},set:function(r){if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){var n=(0,o.clamp)(r[0],0,Math.min(r[1],e.duration)),a=(0,o.clamp)(r[1],n,e.duration);t=a-n>=1?[n,a]:[]}else t=[];e.emit("loop",t)}}),e.on("video:timeupdate",function(){t.length&&e.currentTime { -// }); -e.on("video:canplay",function(){m=0,e.loading.show=!1}),e.once("video:canplay",function(){e.loading.show=!1,e.controls.show=!0,e.mask.show=!0,e.isReady=!0,e.emit("ready")}),// art.on('video:canplaythrough', () => { -// }); -// art.on('video:durationchange', () => { -// }); -// art.on('video:emptied', () => { -// }); -e.on("video:ended",function(){i.loop?(e.seek=0,e.play(),e.controls.show=!1,e.mask.show=!1):(e.controls.show=!0,e.mask.show=!0)}),e.on("video:error",(t=(0,o._)(function(t){return(0,a._)(this,function(o){switch(o.label){case 0:if(!(m { -// }); -e.on("video:loadedmetadata",function(){e.emit("resize"),l.isMobile&&(e.loading.show=!1,e.controls.show=!0,e.mask.show=!0)}),e.on("video:loadstart",function(){e.loading.show=!0,e.mask.show=!1,e.controls.show=!0}),e.on("video:pause",function(){e.controls.show=!0,e.mask.show=!0}),e.on("video:play",function(){e.mask.show=!1,(0,l.setStyle)(h,"display","none")}),e.on("video:playing",function(){e.mask.show=!1}),e.on("video:progress",function(){e.playing&&(e.loading.show=!1)}),// art.on('video:ratechange', () => { -// }); -e.on("video:seeked",function(){e.loading.show=!1,e.mask.show=!0}),e.on("video:seeking",function(){e.loading.show=!0,e.mask.show=!1}),// art.on('video:stalled', () => { -// }); -// art.on('video:suspend', () => { -// }); -e.on("video:timeupdate",function(){e.mask.show=!1}),// art.on('video:volumechange', () => { -// }); -e.on("video:waiting",function(){e.loading.show=!0,e.mask.show=!1})}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_ts_generator":"6Xyd0","../config":"emMME","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7z0K5":[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/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_get"),s=e("@swc/helpers/_/_get_prototype_of"),l=e("@swc/helpers/_/_inherits"),c=e("@swc/helpers/_/_create_super"),u=e("../utils"),p=e("../utils/component"),f=n.interopDefault(p),d=e("./fullscreen"),h=n.interopDefault(d),m=e("./fullscreenWeb"),v=n.interopDefault(m),g=e("./pip"),_=n.interopDefault(g),y=e("./playAndPause"),b=n.interopDefault(y),w=e("./progress"),x=n.interopDefault(w),j=e("./time"),k=n.interopDefault(j),M=e("./volume"),I=n.interopDefault(M),S=e("./setting"),D=n.interopDefault(S),T=e("./thumbnails"),F=n.interopDefault(T),R=e("./screenshot"),E=n.interopDefault(R),O=e("./loop"),C=n.interopDefault(O),W=e("./airplay"),A=n.interopDefault(W),P=/*#__PURE__*/function(e){(0,l._)(r,e);var t=(0,c._)(r);function r(e){(0,o._)(this,r),(n=t.call(this,e)).name="control";var n,a=e.proxy,i=e.constructor,s=e.template.$player,l=Date.now();return a(s,["click","mousemove","touchstart","touchmove"],function(){n.show=!0,(0,u.removeClass)(s,"art-hide-cursor"),(0,u.addClass)(s,"art-hover"),l=Date.now()}),e.on("video:timeupdate",function(){!e.isInput&&e.playing&&n.show&&Date.now()-l>=i.CONTROL_HIDE_TIME&&(n.show=!1,(0,u.addClass)(s,"art-hide-cursor"),(0,u.removeClass)(s,"art-hover"))}),n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,x.default)({name:"progress",position:"top",index:10})),!t.thumbnails.url||t.isLive||u.isMobile||this.add((0,F.default)({name:"thumbnails",position:"top",index:20})),this.add((0,C.default)({name:"loop",position:"top",index:30})),this.add((0,b.default)({name:"playAndPause",position:"left",index:10})),this.add((0,I.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,k.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,u.sleep)().then(function(){e.art.quality=t.quality}),t.screenshot&&!u.isMobile&&this.add((0,E.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,D.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,_.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,A.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,v.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,h.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(h.dataset.index)});v?v.insertAdjacentElement("beforebegin",h):(0,l.append)(this.$parent,h),s.html&&(0,l.append)(h,s.html),s.style&&(0,l.setStyles)(h,s.style),s.tooltip&&(0,l.tooltip)(h,s.tooltip);var g=[];if(s.click){var _=this.art.events.proxy(h,"click",function(e){e.preventDefault(),s.click.call(i.art,i,e)});g.push(_)}return s.selector&&["left","right"].includes(s.position)&&this.addSelector(s,h,g),this[c]=h,this.cache.set(c,{$ref:h,events:g,option:s}),s.mounted&&s.mounted.call(this.art,h),h}}},{key:"addSelector",value:function(e,t,r){var n,a=this.art.events,i=a.hover,u=a.proxy;(0,l.addClass)(t,"art-control-selector");var p=(0,l.createElement)("div");(0,l.addClass)(p,"art-selector-value"),(0,l.append)(p,e.html),t.innerText="",(0,l.append)(t,p);var f=e.selector.map(function(e,t){return'
').concat(e.html,"
")}).join(""),d=(0,l.createElement)("div");(0,l.addClass)(d,"art-selector-list"),(0,l.append)(d,f),(0,l.append)(t,d);var h=function(){var e=(0,l.getStyle)(t,"width"),r=(0,l.getStyle)(d,"width");d.style.left="".concat(e/2-r/2,"px")};i(t,h);var m=this,v=u(d,"click",(n=(0,o._)(function(t){var r,n,o,a,i,u;return(0,s._)(this,function(s){switch(s.label){case 0:if(!(n=(null!==(r=t.composedPath())&&void 0!==r?r:[]).find(function(e){return(0,l.hasClass)(e,"art-selector-item")})))return[2];if((0,l.inverseClass)(n,"art-current"),o=Number(n.dataset.index),i=null!==(a=e.selector[o])&&void 0!==a?a:{},p.innerText=n.innerText,!e.onSelect)return[3,2];return[4,e.onSelect.call(m.art,i,n,t)];case 1:u=s.sent(),(0,c.isStringOrNumber)(u)&&(p.innerHTML=u),s.label=2;case 2:return h(),[2]}})}),function(e){return n.apply(this,arguments)}));r.push(v)}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,u.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r
',mounted:function(e){var o=!1,a=(0,i.query)(".art-progress-hover",e),u=(0,i.query)(".art-progress-loaded",e),p=(0,i.query)(".art-progress-played",e),f=(0,i.query)(".art-progress-highlight",e),d=(0,i.query)(".art-progress-indicator",e),h=(0,i.query)(".art-progress-tip",e);function m(e,t){"loaded"===e&&(0,i.setStyle)(u,"width","".concat(100*t,"%")),"played"===e&&((0,i.setStyle)(p,"width","".concat(100*t,"%")),(0,i.setStyle)(d,"left","".concat(100*t,"%")))}r.indicator?(0,i.append)(d,r.indicator):(0,i.setStyle)(d,"backgroundColor","var(--art-theme)"),t.on("video:loadedmetadata",function(){for(var e=0;e');(0,i.append)(f,a)}}),m("loaded",t.loaded),t.on("setBar",function(e,t){m(e,t)}),t.on("video:progress",function(){m("loaded",t.loaded)}),t.constructor.USE_RAF?t.on("raf",function(){m("played",t.played)}):t.on("video:timeupdate",function(){m("played",t.played)}),t.on("video:ended",function(){m("played",1)}),i.isMobile||(c(e,"click",function(e){e.target!==d&&l(t,e)}),c(e,"mousemove",function(r){var n,o,l,c,u,p,d,m;(n=s(t,r).width,(0,i.setStyle)(a,"width","".concat(n,"px")),(0,i.setStyle)(a,"display","flex"),(0,i.setStyle)(h,"display","flex"),(0,i.includeFromEvent)(r,f))?(o=s(t,r).width,l=r.target.dataset.text,h.innerHTML=l,o<=(c=h.clientWidth)/2?(0,i.setStyle)(h,"left",0):o>e.clientWidth-c/2?(0,i.setStyle)(h,"left","".concat(e.clientWidth-c,"px")):(0,i.setStyle)(h,"left","".concat(o-c/2,"px"))):(p=(u=s(t,r)).width,d=u.time,h.innerHTML=d,p<=(m=h.clientWidth)/2?(0,i.setStyle)(h,"left",0):p>e.clientWidth-m/2?(0,i.setStyle)(h,"left","".concat(e.clientWidth-m,"px")):(0,i.setStyle)(h,"left","".concat(p-m/2,"px")))}),c(e,"mouseleave",function(){(0,i.setStyle)(h,"display","none"),(0,i.setStyle)(a,"display","none")}),c(e,"mousedown",function(e){o=0===e.button}),t.on("document:mousemove",function(e){if(o){var r=s(t,e),n=r.second;m("played",r.percentage),t.seek=n}}),t.on("document:mouseup",function(){o&&(o=!1)}))}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],l3dNa:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{style:i.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,i.secondToTime)(t.currentTime)," / ").concat((0,i.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o
'),l=(0,i.append)(s,'
'),c=(0,i.append)(l,'
'),u=(0,i.append)(l,'
'),p=(0,i.append)(u,'
'),f=(0,i.append)(p,'
'),d=(0,i.append)(u,'
');function h(e){var t=u.getBoundingClientRect(),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){var e;if(null!==(e=t.muted)&&void 0!==e?e:0===t.volume)(0,i.setStyle)(o,"display","none"),(0,i.setStyle)(a,"display","flex"),(0,i.setStyle)(d,"top","100%"),(0,i.setStyle)(f,"top","100%"),c.innerText=0;else{var r=100*t.volume;(0,i.setStyle)(o,"display","flex"),(0,i.setStyle)(a,"display","none"),(0,i.setStyle)(d,"top","".concat(100-r,"%")),(0,i.setStyle)(f,"top","".concat(100-r,"%")),c.innerText=Math.floor(r)}}if(m(),t.on("video:volumechange",m),r(o,"click",function(){t.muted=!0}),r(a,"click",function(){t.muted=!1}),i.isMobile)(0,i.setStyle)(s,"display","none");else{var v=!1;r(u,"mousedown",function(e){v=0===e.button,t.volume=h(e)}),t.on("document:mousemove",function(e){v&&(t.muted=!1,t.volume=h(e))}),t.on("document:mouseup",function(){v&&(v=!1)})}}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"2XGYu":[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,i.append)(e,n.setting),r(e,"click",function(){t.setting.toggle(),t.setting.updateStyle()}),t.on("setting",function(t){(0,i.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],dc68e:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_object_spread"),i=e("@swc/helpers/_/_object_spread_props"),s=e("@swc/helpers/_/_ts_generator"),l=e("../utils"),c=e("./progress");function u(e){return function(t){return(0,i._)((0,a._)({},e),{mounted:function(e){var r,n=t.option,a=t.template,i=a.$progress,u=a.$video,p=t.events,f=p.proxy,d=p.loadImg,h=null,m=!1,v=!1;f(i,"mousemove",(r=(0,o._)(function(r){return(0,s._)(this,function(o){switch(o.label){case 0:if(m)return[3,2];return m=!0,[4,d(n.thumbnails.url)];case 1:h=o.sent(),v=!0,o.label=2;case 2:if(v){var a,s,p,f,g,_,y,b,w,x,j,k;(0,l.setStyle)(e,"display","flex"),s=(0,c.getPosFromEvent)(t,r).width,f=(p=n.thumbnails).url,g=p.number,_=p.column,y=p.width,b=p.height,w=null!=y?y:h.naturalWidth/_,x=null!=b?b:w/(u.videoWidth/u.videoHeight),k=(j=Math.floor(s/(i.clientWidth/g)))%_,(0,l.setStyle)(e,"backgroundImage","url(".concat(f,")")),(0,l.setStyle)(e,"height","".concat(x,"px")),(0,l.setStyle)(e,"width","".concat(w,"px")),(0,l.setStyle)(e,"backgroundPosition","-".concat(k*w,"px -").concat((Math.ceil(j/_)-1)*x,"px")),s<=w/2?(0,l.setStyle)(e,"left",0):s>i.clientWidth-w/2?(0,l.setStyle)(e,"left","".concat(i.clientWidth-w,"px")):(0,l.setStyle)(e,"left","".concat(s-w/2,"px"))}return[2]}})}),function(e){return r.apply(this,arguments)})),f(i,"mouseleave",function(){(0,l.setStyle)(e,"display","none")}),t.on("hover",function(t){t||(0,l.setStyle)(e,"display","none")})}})}}},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_ts_generator":"6Xyd0","../utils":"7MU7R","./progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],idjoR:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.screenshot),r(e,"click",function(){t.screenshot()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7Yi5T":[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{mounted:function(e){var r=(0,i.append)(e,''),n=(0,i.append)(e,'');t.on("loop",function(o){o&&o.length?((0,i.setStyle)(e,"display","flex"),(0,i.setStyle)(r,"left","calc(".concat(o[0]/t.duration*100,"% - ").concat(r.clientWidth,"px)")),(0,i.setStyle)(n,"left","".concat(o[1]/t.duration*100,"%"))):(0,i.setStyle)(e,"display","none")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],huCXW:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){return(0,a._)((0,o._)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,i.append)(e,n.airplay),r(e,"click",function(){return t.airplay()})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"5RLZo":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("../utils"),c=e("../utils/component"),u=n.interopDefault(c),p=e("./playbackRate"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./flip"),v=n.interopDefault(m),g=e("./info"),_=n.interopDefault(g),y=e("./version"),b=n.interopDefault(y),w=e("./close"),x=n.interopDefault(w),j=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="contextmenu",n.$parent=e.template.$contextmenu,l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,i=o.$contextmenu;r.playbackRate&&this.add((0,f.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,h.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,v.default)({name:"flip",index:30})),this.add((0,_.default)({name:"info",index:40})),this.add((0,b.default)({name:"version",index:50})),this.add((0,x.default)({name:"close",index:60}));for(var s=0;su+c&&(m=c-h),n+d>p+s&&(v=s-d),(0,l.setStyles)(i,{top:"".concat(v,"px"),left:"".concat(m,"px")})}}),n(a,"click",function(t){(0,l.includeFromEvent)(t,i)||(e.show=!1)}),this.art.on("blur",function(){e.show=!1})}}]),r}(u.default)},{"@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_create_super":"86fte","../utils":"7MU7R","../utils/component":"2dsXg","./playbackRate":"7w1iV","./aspectRatio":"cJDR0","./flip":"cpqHQ","./info":"FMfqg","./version":"a9IHg","./close":"9PxVB","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"7w1iV":[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map(function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="1"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("video:ratechange",function(){var r=(0,i.queryAll)("span",e).find(function(e){return Number(e.dataset.value)===t.playbackRate});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cJDR0:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map(function(e){return'').concat("default"===e?r.get("Default"):e,"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="default"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("aspectRatio",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],cpqHQ:[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/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props"),i=e("../utils");function s(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map(function(e){return'').concat(r.get((0,i.capitalize)(e)),"")}).join("");return(0,a._)((0,o._)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,i.query)('[data-value="normal"]',e);r&&(0,i.inverseClass)(r,"art-current"),t.on("flip",function(t){var r=(0,i.queryAll)("span",e).find(function(e){return e.dataset.value===t});r&&(0,i.inverseClass)(r,"art-current")})}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],FMfqg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],a9IHg:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return(0,a._)((0,o._)({},e),{html:'ArtPlayer 5.1.0'})}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9PxVB":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return i});var o=e("@swc/helpers/_/_object_spread"),a=e("@swc/helpers/_/_object_spread_props");function i(e){return function(t){return(0,a._)((0,o._)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"6JYu5":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return u});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("@swc/helpers/_/_inherits"),s=e("@swc/helpers/_/_create_super"),l=e("./utils"),c=e("./utils/component"),u=/*#__PURE__*/function(e){(0,i._)(r,e);var t=(0,s._)(r);function r(e){var n;return(0,o._)(this,r),(n=t.call(this,e)).name="info",l.isMobile||n.init(),n}return(0,a._)(r,[{key:"init",value:function(){var e,t=this,r=this.art,n=r.proxy,o=r.constructor,a=r.template,i=a.$infoPanel,s=a.$infoClose,c=a.$video;n(s,"click",function(){t.show=!1});var u=null,p=null!==(e=(0,l.queryAll)("[data-video]",i))&&void 0!==e?e:[];this.art.on("destroy",function(){return clearTimeout(u)}),function e(){for(var t=0;t".concat((0,f.escape)(e),"

")}).join(""):e.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,o._)(function(){var n,o,a,i,s,u;return(0,p._)(this,function(p){switch(p.label){case 0:return o=(n=r.art).i18n,a=n.notice,i=n.option,s=(0,c._)((0,l._)({},i.subtitle,t),{url:e}),[4,r.init(s)];case 1:return u=p.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,u]}})})()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,i=o.$video,s=o.$track,l=(0,f.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.track.mode="hidden",this.eventDestroy(),(0,f.remove)(s),(0,f.append)(i,l),o.$track=l,this.eventDestroy=a(this.textTrack,"cuechange",function(){return r.update()})}},{key:"init",value:function(e){var t=this;return(0,o._)(function(){var r,n,o;return(0,p._)(this,function(a){return(n=(r=t.art).notice,o=r.template.$subtitle,(0,v.default)(e,_.default.subtitle),e.url)?(t.style(e.style),[2,fetch(e.url).then(function(e){return e.arrayBuffer()}).then(function(r){var n,o=new TextDecoder(e.encoding).decode(r);switch(t.art.emit("subtitleLoad",e.url),null!==(n=e.type)&&void 0!==n?n:(0,f.getExt)(e.url)){case"srt":var a=(0,f.srtToVtt)(o),i=e.onVttLoad(a);return(0,f.vttToBlob)(i);case"ass":var s=(0,f.assToVtt)(o),l=e.onVttLoad(s);return(0,f.vttToBlob)(l);case"vtt":var c=e.onVttLoad(o);return(0,f.vttToBlob)(c);default:return e.url}}).then(function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e),t.art.emit("subtitleSwitch",e)),e}).catch(function(e){throw o.innerHTML="",n.show=e,e})]):[2]})})()}}]),r}(h.default)},{"@swc/helpers/_/_async_to_generator":"eONSn","@swc/helpers/_/_class_call_check":"9iJMm","@swc/helpers/_/_create_class":"21IOT","@swc/helpers/_/_inherits":"3pfgY","@swc/helpers/_/_object_spread":"9agdF","@swc/helpers/_/_object_spread_props":"gJNH2","@swc/helpers/_/_create_super":"86fte","@swc/helpers/_/_ts_generator":"6Xyd0","./utils":"7MU7R","./utils/component":"2dsXg","option-validator":"8OeHO","./scheme":"39ygm","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"47RGg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("../utils/error"),s=e("./clickInit"),l=n.interopDefault(s),c=e("./hoverInit"),u=n.interopDefault(c),p=e("./moveInit"),f=n.interopDefault(p),d=e("./resizeInit"),h=n.interopDefault(d),m=e("./gestureInit"),v=n.interopDefault(m),g=e("./viewInit"),_=n.interopDefault(g),y=e("./documentInit"),b=n.interopDefault(y),w=e("./updateInit"),x=n.interopDefault(w),j=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,l.default)(t,this),(0,u.default)(t,this),(0,f.default)(t,this),(0,h.default)(t,this),(0,v.default)(t,this),(0,_.default)(t,this),(0,b.default)(t,this),(0,x.default)(t,this)}return(0,a._)(e,[{key:"proxy",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this;if(Array.isArray(t))return t.map(function(t){return o.proxy(e,t,r,n)});e.addEventListener(t,r,n);var a=function(){return e.removeEventListener(t,r,n)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"loadImg",value:function(e){var t=this;return new Promise(function(r,n){var o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return n(new i.ArtPlayerError("Unable to get Image"));(o=new Image).src=e}if(o.complete)return r(o);t.proxy(o,"load",function(){return r(o)}),t.proxy(o,"error",function(){return n(new i.ArtPlayerError("Failed to load Image: ".concat(o.src)))})})}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;eMath.abs(a)&&2>Math.abs(o))return i;var s=180*Math.atan2(o,a)/Math.PI;return s>=-45&&s<45?i=4:s>=45&&s<135?i=1:s>=-135&&s<-45?i=2:s>=135&&s<=180&&(i=3),i}(c,u,i,f),h=[3,4].includes(d),m=[1,2].includes(d);if(null!==(r=h&&!e.isRotate)&&void 0!==r?r:m&&e.isRotate){var v=(0,o.clamp)((i-c)/e.width,-1,1),g=(0,o.clamp)((f-u)/e.height,-1,1),_=e.isRotate?g:v,y=s===n?e.constructor.TOUCH_MOVE_RATIO:1,b=(0,o.clamp)(p+e.duration*_*y,0,e.duration);e.seek=b,e.emit("setBar","played",(0,o.clamp)(b/e.duration,0,1)),e.notice.show="".concat((0,o.secondToTime)(b)," / ").concat((0,o.secondToTime)(e.duration))}}};t.proxy(i,"touchstart",function(e){s=i,f(e)}),t.proxy(n,"touchstart",function(e){s=n,f(e)}),t.proxy(n,"touchmove",d),t.proxy(i,"touchmove",d),t.proxy(document,"touchend",function(){l&&(c=0,u=0,p=0,l=!1,s=null)})}}},{"../utils":"7MU7R","../control/progress":"fVfii","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],jT4ny:[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("../utils");function a(e,t){var r=e.option,n=e.constructor,a=e.template.$container,i=(0,o.throttle)(function(){e.emit("view",(0,o.isInViewport)(a,n.SCROLL_GAP))},n.SCROLL_TIME);t.proxy(window,"scroll",function(){return i()}),e.on("view",function(t){r.autoMini&&(e.mini=!t)})}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],qu07O:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){t.proxy(document,"mousemove",function(t){e.emit("document:mousemove",t)}),t.proxy(document,"mouseup",function(t){e.emit("document:mouseup",t)})}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],"9LDSG":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",function(){cancelAnimationFrame(t)})}}n.defineInteropFlag(r),n.export(r,"default",function(){return o})},{"@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],gszG1:[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/_/_class_call_check"),a=e("@swc/helpers/_/_create_class"),i=e("./utils"),s=/*#__PURE__*/function(){function e(t){(0,o._)(this,e),this.art=t,this.keys={},t.option.hotkey&&!i.isMobile&&this.init()}return(0,a._)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add(27,function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)}),this.add(32,function(){e.art.toggle()}),this.add(37,function(){e.art.backward=n.SEEK_STEP}),this.add(38,function(){e.art.volume+=n.VOLUME_STEP}),this.add(39,function(){e.art.forward=n.SEEK_STEP}),this.add(40,function(){e.art.volume-=n.VOLUME_STEP}),r(window,"keydown",function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n){var o=e.keys[t.keyCode];if(o){t.preventDefault();for(var a=0;a'},{}],fRhwm:[function(e,t,r){t.exports=''},{}],"4tFZV":[function(e,t,r){t.exports=''},{}],a8x3K:[function(e,t,r){t.exports=''},{}],e0utR:[function(e,t,r){t.exports=''},{}],"69Sc6":[function(e,t,r){t.exports=''},{}],"72xuc":[function(e,t,r){t.exports=''},{}],"85cgQ":[function(e,t,r){t.exports=''},{}],"1Qm4Q":[function(e,t,r){t.exports=''},{}],fpGzT:[function(e,t,r){t.exports=''},{}],jlMSj:[function(e,t,r){t.exports=''},{}],"7sEdH":[function(e,t,r){t.exports=''},{}],eHsVM:[function(e,t,r){t.exports=''},{}],"2f6qz":[function(e,t,r){t.exports=''},{}],cy2gj:[function(e,t,r){t.exports=''},{}],hGnnd:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",function(){return j});var o=e("@swc/helpers/_/_async_to_generator"),a=e("@swc/helpers/_/_class_call_check"),i=e("@swc/helpers/_/_create_class"),s=e("@swc/helpers/_/_inherits"),l=e("@swc/helpers/_/_to_consumable_array"),c=e("@swc/helpers/_/_create_super"),u=e("@swc/helpers/_/_ts_generator"),p=e("./flip"),f=n.interopDefault(p),d=e("./aspectRatio"),h=n.interopDefault(d),m=e("./playbackRate"),v=n.interopDefault(m),g=e("./subtitleOffset"),_=n.interopDefault(g),y=e("../utils/component"),b=n.interopDefault(y),w=e("../utils/error"),x=e("../utils"),j=/*#__PURE__*/function(e){(0,s._)(r,e);var t=(0,c._)(r);function r(e){(0,a._)(this,r),n=t.call(this,e);var n,o=e.option,i=e.controls,s=e.template.$setting;return n.name="setting",n.$parent=s,n.option=[],n.events=[],n.cache=new Map,o.setting&&(n.init(),e.on("blur",function(){n.show&&(n.show=!1,n.render(n.option))}),e.on("focus",function(e){var t=(0,x.includeFromEvent)(e,i.setting),r=(0,x.includeFromEvent)(e,n.$parent);!n.show||t||r||(n.show=!1,n.render(n.option))})),n}return(0,i._)(r,[{key:"defaultSettings",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,v.default)(this.art)),t.aspectRatio&&e.push((0,h.default)(this.art)),t.flip&&e.push((0,f.default)(this.art)),t.subtitleOffset&&e.push((0,_.default)(this.art)),e}},{key:"init",value:function(){var e=this.art.option,t=(0,l._)(this.defaultSettings).concat((0,l._)(e.settings));this.option=r.makeRecursion(t),this.destroy(),this.render(this.option)}},{key:"destroy",value:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r
'),l=(0,x.createElement)("div");(0,x.addClass)(l,"art-setting-item-left-icon"),(0,x.append)(l,n.arrowLeft),(0,x.append)(s,l),(0,x.append)(s,e.$parentItem.html);var c=o(i,"click",function(){return t.render(e.$parentList)});return this.events.push(c),i}},{key:"creatItem",value:function(e,t){var r=this.art,n=r.icons,a=r.proxy,i=r.constructor,s=(0,x.createElement)("div");(0,x.addClass)(s,"art-setting-item"),(0,x.setStyle)(s,"height","".concat(i.SETTING_ITEM_HEIGHT,"px")),(0,x.isStringOrNumber)(t.name)&&(s.dataset.name=t.name),(0,x.isStringOrNumber)(t.value)&&(s.dataset.value=t.value);var l=(0,x.append)(s,'
'),c=(0,x.append)(s,'
'),p=(0,x.createElement)("div");switch((0,x.addClass)(p,"art-setting-item-left-icon"),e){case"switch":case"range":(0,x.append)(p,(null!==(g=(0,x.isStringOrNumber)(t.icon))&&void 0!==g?g:t.icon instanceof Element)?t.icon:n.config);break;case"selector":t.selector&&t.selector.length?(0,x.append)(p,(null!==(_=(0,x.isStringOrNumber)(t.icon))&&void 0!==_?_:t.icon instanceof Element)?t.icon:n.config):(0,x.append)(p,n.check)}(0,x.append)(l,p),t.$icon=p,(0,x.def)(t,"icon",{configurable:!0,get:function(){return p.innerHTML},set:function(e){(0,x.isStringOrNumber)(e)&&(p.innerHTML=e)}});var f=(0,x.createElement)("div");(0,x.addClass)(f,"art-setting-item-left-text"),(0,x.append)(f,null!==(y=t.html)&&void 0!==y?y:""),(0,x.append)(l,f),t.$html=f,(0,x.def)(t,"html",{configurable:!0,get:function(){return f.innerHTML},set:function(e){(0,x.isStringOrNumber)(e)&&(f.innerHTML=e)}});var d=(0,x.createElement)("div");switch((0,x.addClass)(d,"art-setting-item-right-tooltip"),(0,x.append)(d,null!==(b=t.tooltip)&&void 0!==b?b:""),(0,x.append)(c,d),t.$tooltip=d,(0,x.def)(t,"tooltip",{configurable:!0,get:function(){return d.innerHTML},set:function(e){(0,x.isStringOrNumber)(e)&&(d.innerHTML=e)}}),e){case"switch":var h=(0,x.createElement)("div");(0,x.addClass)(h,"art-setting-item-right-icon");var m=(0,x.append)(h,n.switchOn),v=(0,x.append)(h,n.switchOff);(0,x.setStyle)(t.switch?v:m,"display","none"),(0,x.append)(c,h),t.$switch=t.switch,(0,x.def)(t,"switch",{configurable:!0,get:function(){return t.$switch},set:function(e){t.$switch=e,e?((0,x.setStyle)(v,"display","none"),(0,x.setStyle)(m,"display",null)):((0,x.setStyle)(v,"display",null),(0,x.setStyle)(m,"display","none"))}});break;case"range":var g,_,y,b,w,j,k,M,I=(0,x.createElement)("div");(0,x.addClass)(I,"art-setting-item-right-icon");var S=(0,x.append)(I,'');S.value=null!==(w=t.range[0])&&void 0!==w?w:0,S.min=null!==(j=t.range[1])&&void 0!==j?j:0,S.max=null!==(k=t.range[2])&&void 0!==k?k:10,S.step=null!==(M=t.range[3])&&void 0!==M?M:1,(0,x.addClass)(S,"art-setting-range"),(0,x.append)(c,I),t.$range=S,(0,x.def)(t,"range",{configurable:!0,get:function(){return S.valueAsNumber},set:function(e){S.value=Number(e)}});break;case"selector":if(t.selector&&t.selector.length){var D=(0,x.createElement)("div");(0,x.addClass)(D,"art-setting-item-right-icon"),(0,x.append)(D,n.arrowRight),(0,x.append)(c,D)}}switch(e){case"switch":if(t.onSwitch){var T,F=this,R=a(s,"click",(T=(0,o._)(function(e){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,t.onSwitch.call(F.art,t,s,e)];case 1:return t.switch=r.sent(),[2]}})}),function(e){return T.apply(this,arguments)}));this.events.push(R)}break;case"range":if(t.$range){if(t.onRange){var E,O=this,C=a(t.$range,"change",(E=(0,o._)(function(e){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,t.onRange.call(O.art,t,s,e)];case 1:return t.tooltip=r.sent(),[2]}})}),function(e){return E.apply(this,arguments)}));this.events.push(C)}if(t.onChange){var W,A=this,P=a(t.$range,"input",(W=(0,o._)(function(e){return(0,u._)(this,function(r){switch(r.label){case 0:return[4,t.onChange.call(A.art,t,s,e)];case 1:return t.tooltip=r.sent(),[2]}})}),function(e){return W.apply(this,arguments)}));this.events.push(P)}}break;case"selector":var z,L=this,$=a(s,"click",(z=(0,o._)(function(e){var r,n,o;return(0,u._)(this,function(a){switch(a.label){case 0:if(!(t.selector&&t.selector.length))return[3,1];return L.render(t.selector,t.width),[3,3];case 1:for((0,x.inverseClass)(s,"art-current"),r=0;rd?((0,x.setStyle)(i,"left",null),(0,x.setStyle)(i,"right",null)):((0,x.setStyle)(i,"left","".concat(h,"px")),(0,x.setStyle)(i,"right","auto"))}}},{key:"render",value:function(e,t){var r=this.art.constructor;if(this.cache.has(e)){var n=this.cache.get(e);(0,x.inverseClass)(n,"art-current"),(0,x.setStyle)(this.$parent,"width","".concat(n.dataset.width,"px")),(0,x.setStyle)(this.$parent,"height","".concat(n.dataset.height,"px")),this.updateStyle(Number(n.dataset.width))}else{var o=(0,x.createElement)("div");(0,x.addClass)(o,"art-setting-panel"),o.dataset.width=null!=t?t:r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0].$parentItem&&((0,x.append)(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(var a=0;ao&&cn&&c
'}),c=(0,o.query)(".art-auto-playback-last",l),u=(0,o.query)(".art-auto-playback-jump",l),p=(0,o.query)(".art-auto-playback-close",l);return e.on("video:timeupdate",function(){if(e.playing){var t,r,o=null!==(t=n.get("times"))&&void 0!==t?t:{},i=Object.keys(o);i.length>a.AUTO_PLAYBACK_MAX&&delete o[i[0]],o[null!==(r=e.option.id)&&void 0!==r?r:e.option.url]=e.currentTime,n.set("times",o)}}),e.on("ready",function(){var f,d,h=(null!==(f=n.get("times"))&&void 0!==f?f:{})[null!==(d=e.option.id)&&void 0!==d?d:e.option.url];h&&h>=a.AUTO_PLAYBACK_MIN&&((0,o.append)(p,r.close),(0,o.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,o.secondToTime)(h)),u.innerText=t.get("Jump Play"),i(p,"click",function(){(0,o.setStyle)(l,"display","none")}),i(u,"click",function(){e.seek=h,e.play(),(0,o.setStyle)(s,"display","none"),(0,o.setStyle)(l,"display","none")}),e.once("video:timeupdate",function(){setTimeout(function(){(0,o.setStyle)(l,"display","none")},a.AUTO_PLAYBACK_TIMEOUT)}))}),{name:"auto-playback",get times(){var f;return null!==(f=n.get("times"))&&void 0!==f?f:{}},clear:function(){return n.del("times")},delete:function(e){var t,r=null!==(t=n.get("times"))&&void 0!==t?t:{};return delete r[e],n.set("times",r),r}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],giGC3:[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("../utils");function a(e){var t=e.constructor,r=e.proxy,n=e.template,a=n.$player,i=n.$video,s=null,l=!1,c=1,u=function(){clearTimeout(s),l&&(l=!1,e.playbackRate=c,(0,o.removeClass)(a,"art-fast-forward"))};return r(i,"touchstart",function(r){1===r.touches.length&&e.playing&&!e.isLock&&(s=setTimeout(function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,o.addClass)(a,"art-fast-forward")},t.FAST_FORWARD_TIME))}),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,o.hasClass)(a,"art-fast-forward")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}],e0Ov6:[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("../utils");function a(e){var t=e.layers,r=e.icons,n=e.template.$player;return t.add({name:"lock",mounted:function(t){var n=(0,o.append)(t,r.lock),a=(0,o.append)(t,r.unlock);(0,o.setStyle)(n,"display","none"),e.on("lock",function(e){e?((0,o.setStyle)(n,"display","inline-flex"),(0,o.setStyle)(a,"display","none")):((0,o.setStyle)(n,"display","none"),(0,o.setStyle)(a,"display","inline-flex"))})},click:function(){(0,o.hasClass)(n,"art-lock")?((0,o.removeClass)(n,"art-lock"),this.isLock=!1,e.emit("lock",!1)):((0,o.addClass)(n,"art-lock"),this.isLock=!0,e.emit("lock",!0))}}),{name:"lock",get state(){return(0,o.hasClass)(n,"art-lock")}}}},{"../utils":"7MU7R","@parcel/transformer-js/src/esmodule-helpers.js":"iWrD0"}]},["4Be4O"],"4Be4O","parcelRequire4dc0"); \ No newline at end of file +!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=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 a[n]}}),a[n]=c;for(var u=0;u ").concat(e))};l("Version@"+r.version),l("Env@"+r.env),l("Build@"+r.build);for(var c=0;c0&&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.0"}},{key:"env",get:function(){return"production"}},{key:"build",get:function(){return"2023-08-26 16:47:28"}},{key:"config",get:function(){return k.default}},{key:"utils",get:function(){return _}},{key:"scheme",get:function(){return w.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 S.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,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:{},escape:!0,encoding:"utf-8",onVttLoad:function(e){return e}},moreVideoAttr:{controls:!1,preload:_.isSafari?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:navigator.language.toLowerCase()}}}]),r}(b.default);if(ie.DEBUG=!1,ie.CONTEXTMENU=!0,ie.NOTICE_TIME=2e3,ie.SETTING_WIDTH=250,ie.SETTING_ITEM_WIDTH=200,ie.SETTING_ITEM_HEIGHT=35,ie.RESIZE_TIME=200,ie.SCROLL_TIME=200,ie.SCROLL_GAP=50,ie.AUTO_PLAYBACK_MAX=10,ie.AUTO_PLAYBACK_MIN=5,ie.AUTO_PLAYBACK_TIMEOUT=3e3,ie.RECONNECT_TIME_MAX=5,ie.RECONNECT_SLEEP_TIME=1e3,ie.CONTROL_HIDE_TIME=3e3,ie.DBCLICK_TIME=300,ie.DBCLICK_FULLSCREEN=!0,ie.MOBILE_DBCLICK_PLAY=!0,ie.MOBILE_CLICK_PLAY=!1,ie.AUTO_ORIENTATION_TIME=200,ie.INFO_LOOP_TIME=1e3,ie.FAST_FORWARD_VALUE=3,ie.FAST_FORWARD_TIME=1e3,ie.TOUCH_MOVE_RATIO=.5,ie.VOLUME_STEP=.1,ie.SEEK_STEP=5,ie.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],ie.ASPECT_RATIO=["default","4:3","16:9"],ie.FLIP=["normal","horizontal","vertical"],ie.FULLSCREEN_WEB_IN_BODY=!1,ie.LOG_VERSION=!0,ie.USE_RAF=!1,"undefined"!=typeof document&&!document.getElementById("artplayer-style")){var le=_.createElement("style");le.id="artplayer-style",le.textContent=m.default,document.head.appendChild(le)}"undefined"!=typeof window&&(window.Artplayer=ie),setTimeout((function(){ie.LOG_VERSION&&console.log("%c ArtPlayer %c ".concat(ie.version," %c https://artplayer.org"),"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")}))},{"@swc/helpers/src/_assert_this_initialized.mjs":"9qUyT","@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_create_super.mjs":"hOJPY","bundle-text:./style/index.less":"7Efch","option-validator":"8OeHO","./utils/emitter":"23yIZ","./utils":"7esST","./scheme":"hYXnH","./config":"1lpcp","./template":"aRbVP","./i18n":"d1hXD","./player":"aUXOX","./control":"7Cphn","./contextmenu":"aH04y","./info":"kEevD","./subtitle":"14H9c","./events":"9biZS","./hotkey":"bCoXC","./layer":"eQf6l","./loading":"gzHl5","./notice":"gdkSy","./mask":"kH8gp","./icons":"1Mh7c","./setting":"2lyD4","./storage":"38YEE","./plugins":"b3Yxu","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9qUyT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_assert_this_initialized.js")},{"../esm/_assert_this_initialized.js":"jTlDX","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],jTlDX:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.defineInteropFlag(r),n.export(r,"_assert_this_initialized",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hTt7M:[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})}},{}],"9WMH2":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_class_call_check.js")},{"../esm/_class_call_check.js":"dRqgV","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],dRqgV:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.defineInteropFlag(r),n.export(r,"_class_call_check",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9mRre":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_create_class.js")},{"../esm/_create_class.js":"8RAzW","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8RAzW":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){for(var r=0;r1?t-1:0),n=1;n1&&void 0!==arguments[1]?arguments[1]:document).querySelector(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(t.querySelectorAll(e))}function i(e,t){return e.classList.add(t)}function l(e,t){return e.classList.remove(t)}function c(e,t){return e.classList.contains(t)}function u(e,t){var r;return t instanceof Element?e.appendChild(t):e.insertAdjacentHTML("beforeend",String(t)),null!==(r=e.lastElementChild)&&void 0!==r?r:e.lastChild}function p(e){return e.parentNode.removeChild(e)}function f(e,t,r){return e.style[t]=r,e}function d(e,t){for(var r in t)f(e,r,t[r]);return e}function h(e,t){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=window.getComputedStyle(e,null).getPropertyValue(t);return r?parseFloat(n):n}function m(e){return Array.from(e.parentElement.children).filter((function(t){return t!==e}))}function v(e,t){m(e).forEach((function(e){return l(e,t)})),i(e,t)}function g(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"top";o.isMobile||(e.setAttribute("aria-label",t),i(e,"hint--rounded"),i(e,"hint--".concat(r)))}function y(e){var t,r,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,o=e.getBoundingClientRect(),a=null!==(t=window.innerHeight)&&void 0!==t?t:document.documentElement.clientHeight,s=null!==(r=window.innerWidth)&&void 0!==r?r:document.documentElement.clientWidth,i=o.top-n<=a&&o.top+o.height+n>=0,l=o.left-n<=s+n&&o.left+o.width+n>=0;return i&&l}function b(e,t){return e.composedPath&&e.composedPath().indexOf(t)>-1}function _(e,t){return t.parentNode.replaceChild(e,t),e}function j(e){return document.createElement(e)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=j("i");return i(r,"art-icon"),i(r,"art-icon-".concat(e)),u(r,t),r}},{"./compatibility":"g6fxC","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],g6fxC:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"userAgent",(function(){return a})),n.export(r,"isSafari",(function(){return s})),n.export(r,"isWechat",(function(){return i})),n.export(r,"isIE",(function(){return l})),n.export(r,"isAndroid",(function(){return c})),n.export(r,"isIOS",(function(){return u})),n.export(r,"isIOS13",(function(){return p})),n.export(r,"isMobile",(function(){return f}));var o,a="undefined"!=typeof navigator?navigator.userAgent:"",s=/^((?!chrome|android).)*safari/i.test(a),i=/MicroMessenger/i.test(a),l=/MSIE|Trident/i.test(a),c=/android/i.test(a),u=/iPad|iPhone|iPod/i.test(a)&&!window.MSStream,p=null!=u?u:a.includes("Macintosh")&&navigator.maxTouchPoints>=1,f=null!==(o=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a))&&void 0!==o?o:p},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],d6sk8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ArtPlayerError",(function(){return h})),n.export(r,"errorHandle",(function(){return m}));var o=e("@swc/helpers/src/_assert_this_initialized.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_class_call_check.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_inherits.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_wrap_native_super.mjs"),p=n.interopDefault(u),f=e("@swc/helpers/src/_create_super.mjs"),d=n.interopDefault(f),h=function(e){"use strict";(0,c.default)(r,e);var t=(0,d.default)(r);function r(e,n){var o;return(0,i.default)(this,r),o=t.call(this,e),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace((0,a.default)(o),null!=n?n:o.constructor),o.name="ArtPlayerError",o}return r}((0,p.default)(Error));function m(e,t){if(!e)throw new h(t);return e}},{"@swc/helpers/src/_assert_this_initialized.mjs":"9qUyT","@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_wrap_native_super.mjs":"fTSjM","@swc/helpers/src/_create_super.mjs":"hOJPY","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],fTSjM:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_wrap_native_super.js")},{"../esm/_wrap_native_super.js":"1PJxD","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"1PJxD":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_wrap_native_super",(function(){return l})),n.export(r,"_",(function(){return l}));var o=e("./_construct.js"),a=e("./_get_prototype_of.js"),s=e("./_is_native_function.js"),i=e("./_set_prototype_of.js");function l(e){var t="function"==typeof Map?new Map:void 0;return l=function(e){if(null===e||!(0,s._is_native_function)(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return(0,o._construct)(e,arguments,(0,a._get_prototype_of)(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),(0,i._set_prototype_of)(r,e)},l(e)}},{"./_construct.js":"8tOYA","./_get_prototype_of.js":"2mh6E","./_is_native_function.js":"aYK5s","./_set_prototype_of.js":"eAgjA","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8tOYA":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_construct",(function(){return s})),n.export(r,"_",(function(){return s}));var o=e("./_is_native_reflect_construct.js"),a=e("./_set_prototype_of.js");function s(e,t,r){return s=(0,o._is_native_reflect_construct)()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&(0,a._set_prototype_of)(o,r.prototype),o},s.apply(null,arguments)}},{"./_is_native_reflect_construct.js":"M5rXK","./_set_prototype_of.js":"eAgjA","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],aYK5s:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return-1!==Function.toString.call(e).indexOf("[native code]")}n.defineInteropFlag(r),n.export(r,"_is_native_function",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],gOgPD:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return"WEBVTT \r\n\r\n".concat((t=e,t.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(function(e,t,r){var n=r.slice(0,3);return 1===r.length&&(n=r+"00"),2===r.length&&(n=r+"0"),"".concat(t,",").concat(n)}))).replace(/\{\\([ibu])\}/g,"").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").replace(/{[\s\S]*?}/g,"").concat("\r\n\r\n"));var t}function a(e){return URL.createObjectURL(new Blob([e],{type:"text/vtt"}))}function s(e){var t=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(/[:.]/).map((function(e,t,r){if(t===r.length-1){if(1===e.length)return".".concat(e,"00");if(2===e.length)return".".concat(e,"0")}else if(1===e.length)return(0===t?"0":":0")+e;return 0===t?e:t===r.length-1?".".concat(e):":".concat(e)})).join("")}return"WEBVTT\n\n".concat(e.split(/\r?\n/).map((function(e){var n=e.match(t);return n?{start:r(n[1].trim()),end:r(n[2].trim()),text:n[5].replace(/{[\s\S]*?}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map((function(e){return e.trim()})).join("\n")}:null})).filter((function(e){return e})).map((function(e,t){return e?"".concat(t+1,"\n").concat(e.start," --\x3e ").concat(e.end,"\n").concat(e.text):""})).filter((function(e){return e.trim()})).join("\n\n"))}n.defineInteropFlag(r),n.export(r,"srtToVtt",(function(){return o})),n.export(r,"vttToBlob",(function(){return a})),n.export(r,"assToVtt",(function(){return s}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8pVuv":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){return e.includes("?")?o(e.split("?")[0]):e.includes("#")?o(e.split("#")[0]):e.trim().toLowerCase().split(".").pop()}function a(e,t){var r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}n.defineInteropFlag(r),n.export(r,"getExt",(function(){return o})),n.export(r,"download",(function(){return a}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],iCvtI:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"def",(function(){return s})),n.export(r,"has",(function(){return l})),n.export(r,"get",(function(){return c})),n.export(r,"mergeDeep",(function(){return u}));var o=e("@swc/helpers/src/_to_consumable_array.mjs"),a=n.interopDefault(o),s=Object.defineProperty,i=Object.prototype.hasOwnProperty;function l(e,t){return i.call(e,t)}function c(e,t){return Object.getOwnPropertyDescriptor(e,t)}function u(){for(var e=arguments.length,t=new Array(e),r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(t){return setTimeout(t,e)}))}function a(e,t){var r;return function(){for(var n=arguments.length,o=new Array(n),a=0;a0?[t,r,n]:[r,n]).map((function(e){return e<10?"0".concat(e):String(e)})).join(":")}function u(e){var t;return e.replace(/[&<>'"]/g,(function(e){return null!==(t={"&":"&","<":"<",">":">","'":"'",'"':"""}[e])&&void 0!==t?t:e}))}},{"@swc/helpers/src/_type_of.mjs":"d3zJ2","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hYXnH:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"ComponentOption",(function(){return v}));var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils"),c="array",u="boolean",p="string",f="number",d="object",h="function";function m(e,t,r){var n,o;return(0,l.errorHandle)(null!==(o=null!==(n=t===p)&&void 0!==n?n:t===f)&&void 0!==o?o:e instanceof Element,"".concat(r.join(".")," require '").concat(p,"' or 'Element' type"))}var v={html:m,disable:"?".concat(u),name:"?".concat(p),index:"?".concat(f),style:"?".concat(d),click:"?".concat(h),mounted:"?".concat(h),tooltip:"?".concat(p,"|").concat(f),width:"?".concat(f),selector:"?".concat(c),onSelect:"?".concat(h),switch:"?".concat(u),onSwitch:"?".concat(h),range:"?".concat(c),onRange:"?".concat(h),onChange:"?".concat(h)};r.default={id:p,container:m,url:p,poster:p,type:p,theme:p,lang:p,volume:f,isLive:u,muted:u,autoplay:u,autoSize:u,autoMini:u,loop:u,flip:u,playbackRate:u,aspectRatio:u,screenshot:u,setting:u,hotkey:u,pip:u,mutex:u,backdrop:u,fullscreen:u,fullscreenWeb:u,subtitleOffset:u,miniProgressBar:u,useSSR:u,playsInline:u,lock:u,fastForward:u,autoPlayback:u,autoOrientation:u,airplay:u,plugins:[h],layers:[v],contextmenu:[v],settings:[v],controls:[(0,i.default)((0,a.default)({},v),{position:function(e,t,r){var n=["top","left","right"];return(0,l.errorHandle)(n.includes(e),"".concat(r.join(".")," only accept ").concat(n.toString()," as parameters"))}})],quality:[{default:"?".concat(u),html:p,url:p}],highlight:[{time:f,text:p}],thumbnails:{url:p,number:f,column:f,width:f,height:f},subtitle:{url:p,type:p,style:d,escape:u,encoding:p,onVttLoad:h},moreVideoAttr:d,i18n:d,icons:d,cssVar:d,customType:d}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],cCKRq:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_object_spread.js")},{"../esm/_object_spread.js":"g42Vq","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],g42Vq:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_object_spread",(function(){return a})),n.export(r,"_",(function(){return a}));var o=e("./_define_property.js");function a(e){for(var t=1;t
Player version:
5.1.0
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
'}}]),e}()},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","./utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],d1hXD:[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/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("../utils"),c=e("./zh-cn"),u=n.interopDefault(c),p=function(){"use strict";function e(t){(0,a.default)(this,e),this.art=t,this.languages={"zh-cn":u.default},this.language={},this.update(t.option.i18n)}return(0,i.default)(e,[{key:"init",value:function(){var e,t=this.art.option.lang.toLowerCase();this.language=null!==(e=this.languages[t])&&void 0!==e?e:{}}},{key:"get",value:function(e){var t;return null!==(t=this.language[e])&&void 0!==t?t:e}},{key:"update",value:function(e){this.languages=(0,l.mergeDeep)(this.languages,e),this.init()}}]),e}()},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","../utils":"7esST","./zh-cn":"32rfy","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"32rfy":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n={"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":"隔空播放不可用"};r.default=n,"undefined"!=typeof window&&(window["artplayer-i18n-zh-cn"]=n)},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],aUXOX:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return we}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("./urlMix"),i=n.interopDefault(s),l=e("./attrMix"),c=n.interopDefault(l),u=e("./playMix"),p=n.interopDefault(u),f=e("./pauseMix"),d=n.interopDefault(f),h=e("./toggleMix"),m=n.interopDefault(h),v=e("./seekMix"),g=n.interopDefault(v),y=e("./volumeMix"),b=n.interopDefault(y),_=e("./currentTimeMix"),j=n.interopDefault(_),w=e("./durationMix"),x=n.interopDefault(w),k=e("./switchMix"),T=n.interopDefault(k),S=e("./playbackRateMix"),M=n.interopDefault(S),I=e("./aspectRatioMix"),D=n.interopDefault(I),E=e("./screenshotMix"),F=n.interopDefault(E),C=e("./fullscreenMix"),O=n.interopDefault(C),P=e("./fullscreenWebMix"),R=n.interopDefault(P),z=e("./pipMix"),A=n.interopDefault(z),$=e("./loadedMix"),H=n.interopDefault($),L=e("./playedMix"),V=n.interopDefault(L),q=e("./playingMix"),N=n.interopDefault(q),W=e("./autoSizeMix"),B=n.interopDefault(W),Y=e("./rectMix"),U=n.interopDefault(Y),X=e("./flipMix"),K=n.interopDefault(X),G=e("./miniMix"),J=n.interopDefault(G),Q=e("./loopMix"),Z=n.interopDefault(Q),ee=e("./posterMix"),te=n.interopDefault(ee),re=e("./autoHeightMix"),ne=n.interopDefault(re),oe=e("./cssVarMix"),ae=n.interopDefault(oe),se=e("./themeMix"),ie=n.interopDefault(se),le=e("./typeMix"),ce=n.interopDefault(le),ue=e("./stateMix"),pe=n.interopDefault(ue),fe=e("./subtitleOffsetMix"),de=n.interopDefault(fe),he=e("./airplayMix"),me=n.interopDefault(he),ve=e("./qualityMix"),ge=n.interopDefault(ve),ye=e("./optionInit"),be=n.interopDefault(ye),_e=e("./eventInit"),je=n.interopDefault(_e),we=function e(t){"use strict";(0,a.default)(this,e),(0,i.default)(t),(0,c.default)(t),(0,p.default)(t),(0,d.default)(t),(0,m.default)(t),(0,g.default)(t),(0,b.default)(t),(0,j.default)(t),(0,x.default)(t),(0,T.default)(t),(0,M.default)(t),(0,D.default)(t),(0,F.default)(t),(0,O.default)(t),(0,R.default)(t),(0,A.default)(t),(0,H.default)(t),(0,V.default)(t),(0,N.default)(t),(0,B.default)(t),(0,U.default)(t),(0,K.default)(t),(0,J.default)(t),(0,Z.default)(t),(0,te.default)(t),(0,ne.default)(t),(0,ae.default)(t),(0,ie.default)(t),(0,ce.default)(t),(0,pe.default)(t),(0,de.default)(t),(0,me.default)(t),(0,ge.default)(t),(0,je.default)(t),(0,be.default)(t)}},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","./urlMix":"94qAG","./attrMix":"gbKEc","./playMix":"4YToo","./pauseMix":"jJnYm","./toggleMix":"atYsy","./seekMix":"lsslL","./volumeMix":"cSjxV","./currentTimeMix":"7NYVK","./durationMix":"fW8lt","./switchMix":"j5YX9","./playbackRateMix":"Pz0cc","./aspectRatioMix":"ef8Wu","./screenshotMix":"ca8va","./fullscreenMix":"alRzX","./fullscreenWebMix":"4er6h","./pipMix":"jBv10","./loadedMix":"hQUyr","./playedMix":"8OMWK","./playingMix":"btSPR","./autoSizeMix":"dQH4Z","./rectMix":"hPGBy","./flipMix":"aVvjy","./miniMix":"juvfl","./loopMix":"llm7W","./posterMix":"2UAdD","./autoHeightMix":"377XR","./cssVarMix":"afCNS","./themeMix":"7l7GX","./typeMix":"3Vlhc","./stateMix":"ey2W0","./subtitleOffsetMix":"kDZ8v","./airplayMix":"bXTl1","./qualityMix":"hzrnC","./optionInit":"g9kWX","./eventInit":"lgPrh","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"94qAG":[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){var t=e.option,r=e.template.$video;(0,l.def)(e,"url",{get:function(){return r.src},set:function(n){return(0,a.default)((function(){var o,a,s,c;return(0,i.default)(this,(function(i){switch(i.label){case 0:return n?(o=e.url,s=null!==(a=t.type)&&void 0!==a?a:(0,l.getExt)(n),c=t.customType[s],s&&c?[4,(0,l.sleep)()]:[3,2]):[3,4];case 1:return i.sent(),e.loading.show=!0,c.call(e,r,n,e),[3,3];case 2:URL.revokeObjectURL(o),r.src=n,i.label=3;case 3:return o!==e.url&&(e.option.url=n,e.isReady&&o&&e.once("video:canplay",(function(){e.emit("restart",n)}))),[3,6];case 4:return[4,(0,l.sleep)()];case 5:i.sent(),e.loading.show=!0,i.label=6;case 6:return[2]}}))}))()}})}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"3zxnc":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_async_to_generator.js")},{"../esm/_async_to_generator.js":"eFkS8","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],eFkS8:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t,r,n,o,a,s){try{var i=e[a](s),l=i.value}catch(e){return void r(e)}i.done?t(l):Promise.resolve(l).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,a){var s=e.apply(t,r);function i(e){o(s,n,a,i,l,"next",e)}function l(e){o(s,n,a,i,l,"throw",e)}i(void 0)}))}}n.defineInteropFlag(r),n.export(r,"_async_to_generator",(function(){return a})),n.export(r,"_",(function(){return a}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"1EjHr":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_ts_generator.js")},{"../esm/_ts_generator.js":"7FJ4U","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7FJ4U":[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:"jXHB6","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],jXHB6:[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 l})),n.export(r,"__rest",(function(){return c})),n.export(r,"__decorate",(function(){return u})),n.export(r,"__param",(function(){return p})),n.export(r,"__esDecorate",(function(){return f})),n.export(r,"__runInitializers",(function(){return d})),n.export(r,"__propKey",(function(){return h})),n.export(r,"__setFunctionName",(function(){return m})),n.export(r,"__metadata",(function(){return v})),n.export(r,"__awaiter",(function(){return g})),n.export(r,"__generator",(function(){return y})),n.export(r,"__createBinding",(function(){return b})),n.export(r,"__exportStar",(function(){return _})),n.export(r,"__values",(function(){return j})),n.export(r,"__read",(function(){return w})),n.export(r,"__spread",(function(){return x})),n.export(r,"__spreadArrays",(function(){return k})),n.export(r,"__spreadArray",(function(){return T})),n.export(r,"__await",(function(){return S})),n.export(r,"__asyncGenerator",(function(){return M})),n.export(r,"__asyncDelegator",(function(){return I})),n.export(r,"__asyncValues",(function(){return D})),n.export(r,"__makeTemplateObject",(function(){return E})),n.export(r,"__importStar",(function(){return C})),n.export(r,"__importDefault",(function(){return O})),n.export(r,"__classPrivateFieldGet",(function(){return P})),n.export(r,"__classPrivateFieldSet",(function(){return R})),n.export(r,"__classPrivateFieldIn",(function(){return z}));var o=e("@swc/helpers/src/_type_of.mjs"),a=n.interopDefault(o),s=function(e,t){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},s(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}s(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var l=function(){return l=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=0;i--)(o=e[i])&&(s=(a<3?o(s):a>3?o(t,r,s):o(t,r))||s);return a>3&&s&&Object.defineProperty(t,r,s),s}function p(e,t){return function(r,n){t(r,n,e)}}function f(e,t,r,n,o,a){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var i,l=n.kind,c="getter"===l?"get":"setter"===l?"set":"value",u=!t&&e?n.static?e:e.prototype:null,p=t||(u?Object.getOwnPropertyDescriptor(u,n.name):{}),f=!1,d=r.length-1;d>=0;d--){var h={};for(var m in n)h[m]="access"===m?{}:n[m];for(var m in n.access)h.access[m]=n.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(e||null))};var v=(0,r[d])("accessor"===l?{get:p.get,set:p.set}:p[c],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(i=s(v.get))&&(p.get=i),(i=s(v.set))&&(p.set=i),(i=s(v.init))&&o.push(i)}else(i=s(v))&&("field"===l?o.push(i):p[c]=i)}u&&Object.defineProperty(u,n.name,p),f=!0}function d(e,t,r){for(var n=arguments.length>2,o=0;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function w(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,a=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)s.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(o)throw o.error}}return s}function x(){for(var e=[],t=0;t1||i(e,t)}))})}function i(e,t){try{(r=o[e](t)).value instanceof S?Promise.resolve(r.value.v).then(l,c):u(a[0][2],r)}catch(e){u(a[0][3],e)}var r}function l(e){i("next",e)}function c(e){i("throw",e)}function u(e,t){e(t),a.shift(),a.length&&i(a[0][0],a[0][1])}}function I(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,o){t[n]=e[n]?function(t){return(r=!r)?{value:S(e[n](t)),done:!1}:o?o(t):t}:o}}function D(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=j(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,o){(function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)})(n,o,(t=e[r](t)).done,t.value)}))}}}function E(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var F=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function C(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return F(t,e),t}function O(e){return e&&e.__esModule?e:{default:e}}function P(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function R(e,t,r,n,o){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r}function z(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}},{"@swc/helpers/src/_type_of.mjs":"d3zJ2","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],gbKEc:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$video;(0,n.def)(e,"attr",{value:function(e,r){if(void 0===r)return t[e];t[e]=r}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4YToo":[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){var t=e.i18n,r=e.notice,n=e.option,o=e.constructor.instances,s=e.template.$video;(0,l.def)(e,"play",{value:(0,a.default)((function(){var a,l,c;return(0,i.default)(this,(function(i){switch(i.label){case 0:return[4,s.play()];case 1:if(a=i.sent(),r.show=t.get("Play"),e.emit("play"),n.mutex)for(l=0;lp?((0,n.setStyle)(a,"width","".concat(p*c,"px")),(0,n.setStyle)(a,"height","100%"),(0,n.setStyle)(a,"margin","0 auto")):((0,n.setStyle)(a,"width","100%"),(0,n.setStyle)(a,"height","".concat(l/p,"px")),(0,n.setStyle)(a,"margin","auto 0")),s.dataset.aspectRatio=o}r.show="".concat(t.get("Aspect Ratio"),": ").concat("default"===o?t.get("Default"):o),e.emit("aspectRatio",o)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],ca8va:[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){var t=e.notice,r=e.template.$video,n=(0,l.createElement)("canvas");(0,l.def)(e,"getDataURL",{value:function(){return new Promise((function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),e(n.toDataURL("image/png"))}catch(e){t.show=e,o(e)}}))}}),(0,l.def)(e,"getBlobUrl",{value:function(){return new Promise((function(e,o){try{n.width=r.videoWidth,n.height=r.videoHeight,n.getContext("2d").drawImage(r,0,0),n.toBlob((function(t){e(URL.createObjectURL(t))}))}catch(e){t.show=e,o(e)}}))}}),(0,l.def)(e,"screenshot",{value:(0,a.default)((function(){var t;return(0,i.default)(this,(function(n){switch(n.label){case 0:return[4,e.getDataURL()];case 1:return t=n.sent(),(0,l.download)(t,"artplayer_".concat((0,l.secondToTime)(r.currentTime),".png")),e.emit("screenshot",t),[2,t]}}))}))})}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],alRzX:[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_ts_generator.mjs"),i=n.interopDefault(s),l=e("../libs/screenfull"),c=n.interopDefault(l),u=e("../utils");r.default=function(e){var t=e.i18n,r=e.notice,n=e.template,o=n.$video,s=n.$player;e.once("video:loadedmetadata",(function(){var n;c.default.isEnabled?function(e){c.default.on("change",(function(){e.emit("fullscreen",c.default.isFullscreen)})),(0,u.def)(e,"fullscreen",{get:function(){return c.default.isFullscreen},set:function(t){return(0,a.default)((function(){return(0,i.default)(this,(function(r){switch(r.label){case 0:return t?(e.state="fullscreen",[4,c.default.request(s)]):[3,2];case 1:return r.sent(),(0,u.addClass)(s,"art-fullscreen"),[3,4];case 2:return[4,c.default.exit()];case 3:r.sent(),(0,u.removeClass)(s,"art-fullscreen"),r.label=4;case 4:return e.emit("resize"),[2]}}))}))()}})}(e):(null!==(n=document.fullscreenEnabled)&&void 0!==n?n:o.webkitSupportsFullscreen)?function(e){(0,u.def)(e,"fullscreen",{get:function(){return o.webkitDisplayingFullscreen},set:function(t){t?(e.state="fullscreen",o.webkitEnterFullscreen(),e.emit("fullscreen",!0)):(o.webkitExitFullscreen(),e.emit("fullscreen",!1)),e.emit("resize")}})}(e):(0,u.def)(e,"fullscreen",{get:function(){return!1},set:function(){r.show=t.get("Fullscreen Not Supported")}}),(0,u.def)(e,"fullscreen",(0,u.get)(e,"fullscreen"))}))}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../libs/screenfull":"4g0Hw","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4g0Hw":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_sliced_to_array.mjs"),a=n.interopDefault(o),s=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]],i=function(){if("undefined"==typeof document)return!1;var e=s[0],t={},r=!0,n=!1,o=void 0;try{for(var i,l=s[Symbol.iterator]();!(r=(i=l.next()).done);r=!0){var c=i.value;if(c[1]in document){var u=!0,p=!1,f=void 0;try{for(var d,h=c.entries()[Symbol.iterator]();!(u=(d=h.next()).done);u=!0){var m=(0,a.default)(d.value,2),v=m[0],g=m[1];t[e[v]]=g}}catch(e){p=!0,f=e}finally{try{u||null==h.return||h.return()}finally{if(p)throw f}}return t}}}catch(e){n=!0,o=e}finally{try{r||null==l.return||l.return()}finally{if(n)throw o}}return!1}(),l={change:i.fullscreenchange,error:i.fullscreenerror},c={request:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.documentElement,t=arguments.length>1?arguments[1]:void 0;return new Promise((function(r,n){var o=function(){c.off("change",o),r()};c.on("change",o);var a=e[i.requestFullscreen](t);a instanceof Promise&&a.then(o).catch(n)}))},exit:function(){return new Promise((function(e,t){if(c.isFullscreen){var r=function(){c.off("change",r),e()};c.on("change",r);var n=document[i.exitFullscreen]();n instanceof Promise&&n.then(r).catch(t)}else e()}))},toggle:function(e,t){return c.isFullscreen?c.exit():c.request(e,t)},onchange:function(e){c.on("change",e)},onerror:function(e){c.on("error",e)},on:function(e,t){var r=l[e];r&&document.addEventListener(r,t,!1)},off:function(e,t){var r=l[e];r&&document.removeEventListener(r,t,!1)},raw:i};Object.defineProperties(c,{isFullscreen:{get:function(){return Boolean(document[i.fullscreenElement])}},element:{enumerable:!0,get:function(){return document[i.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(document[i.fullscreenEnabled])}}}),i||(c={isEnabled:!1}),r.default=c},{"@swc/helpers/src/_sliced_to_array.mjs":"23lI8","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"23lI8":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return o._}));var o=e("../esm/_sliced_to_array.js")},{"../esm/_sliced_to_array.js":"8wTBg","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8wTBg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"_sliced_to_array",(function(){return l})),n.export(r,"_",(function(){return l}));var o=e("./_array_with_holes.js"),a=e("./_iterable_to_array_limit.js"),s=e("./_non_iterable_rest.js"),i=e("./_unsupported_iterable_to_array.js");function l(e,t){return(0,o._array_with_holes)(e)||(0,a._iterable_to_array_limit)(e,t)||(0,i._unsupported_iterable_to_array)(e,t)||(0,s._non_iterable_rest)()}},{"./_array_with_holes.js":"4ct5h","./_iterable_to_array_limit.js":"eV4uK","./_non_iterable_rest.js":"bXqZd","./_unsupported_iterable_to_array.js":"2OTAn","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4ct5h":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e){if(Array.isArray(e))return e}n.defineInteropFlag(r),n.export(r,"_array_with_holes",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],eV4uK:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a=[],s=!0,i=!1;try{for(r=r.call(e);!(s=(n=r.next()).done)&&(a.push(n.value),!t||a.length!==t);s=!0);}catch(e){i=!0,o=e}finally{try{s||null==r.return||r.return()}finally{if(i)throw o}}return a}}n.defineInteropFlag(r),n.export(r,"_iterable_to_array_limit",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],bXqZd:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");function o(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.defineInteropFlag(r),n.export(r,"_non_iterable_rest",(function(){return o})),n.export(r,"_",(function(){return o}))},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"4er6h":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.constructor,r=e.template,o=r.$container,a=r.$player,s="";(0,n.def)(e,"fullscreenWeb",{get:function(){return(0,n.hasClass)(a,"art-fullscreen-web")},set:function(r){r?(s=a.style.cssText,t.FULLSCREEN_WEB_IN_BODY&&(0,n.append)(document.body,a),e.state="fullscreenWeb",(0,n.setStyle)(a,"width","100%"),(0,n.setStyle)(a,"height","100%"),(0,n.addClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!0)):(t.FULLSCREEN_WEB_IN_BODY&&(0,n.append)(o,a),s&&(a.style.cssText=s,s=""),(0,n.removeClass)(a,"art-fullscreen-web"),e.emit("fullscreenWeb",!1)),e.emit("resize")}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],jBv10:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.i18n,r=e.notice,o=e.template.$video;document.pictureInPictureEnabled?function(e){var t=e.template.$video,r=e.proxy,o=e.notice;t.disablePictureInPicture=!1,(0,n.def)(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(r){r?(e.state="pip",t.requestPictureInPicture().catch((function(e){throw o.show=e,e}))):document.exitPictureInPicture().catch((function(e){throw o.show=e,e}))}}),r(t,"enterpictureinpicture",(function(){e.emit("pip",!0)})),r(t,"leavepictureinpicture",(function(){e.emit("pip",!1)}))}(e):o.webkitSupportsPresentationMode?function(e){var t=e.template.$video;t.webkitSetPresentationMode("inline"),(0,n.def)(e,"pip",{get:function(){return"picture-in-picture"===t.webkitPresentationMode},set:function(r){r?(e.state="pip",t.webkitSetPresentationMode("picture-in-picture"),e.emit("pip",!0)):(t.webkitSetPresentationMode("inline"),e.emit("pip",!1))}})}(e):(0,n.def)(e,"pip",{get:function(){return!1},set:function(){r.show=t.get("PIP Not Supported")}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hQUyr:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$video;(0,n.def)(e,"loaded",{get:function(){return e.loadedTime/t.duration}}),(0,n.def)(e,"loadedTime",{get:function(){return t.buffered.length?t.buffered.end(t.buffered.length-1):0}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"8OMWK":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){(0,n.def)(e,"played",{get:function(){return e.currentTime/e.duration}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],btSPR:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$video;(0,n.def)(e,"playing",{get:function(){return!!(t.currentTime>0&&!t.paused&&!t.ended&&t.readyState>2)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],dQH4Z:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template,r=t.$container,o=t.$player,a=t.$video;(0,n.def)(e,"autoSize",{value:function(){var t=a.videoWidth,s=a.videoHeight,i=r.getBoundingClientRect(),l=i.width,c=i.height,u=t/s;if(l/c>u){var p=c*u/l*100;(0,n.setStyle)(o,"width","".concat(p,"%")),(0,n.setStyle)(o,"height","100%")}else{var f=l/u/c*100;(0,n.setStyle)(o,"width","100%"),(0,n.setStyle)(o,"height","".concat(f,"%"))}e.emit("autoSize",{width:e.width,height:e.height})}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],hPGBy:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=function(t){var o=r[t];(0,n.def)(e,o,{get:function(){return e.rect[o]}})};(0,n.def)(e,"rect",{get:function(){return e.template.$player.getBoundingClientRect()}});for(var r=["bottom","height","left","right","top","width"],o=0;o
');(0,n.append)(d,t.close),r(d,"click",p);var h=(0,n.append)(s,'
'),m=(0,n.append)(h,t.play),v=(0,n.append)(h,t.pause);return r(m,"click",(function(){return e.play()})),r(v,"click",(function(){return e.pause()})),f(m,v),e.on("video:playing",(function(){return f(m,v)})),e.on("video:pause",(function(){return f(m,v)})),e.on("video:timeupdate",(function(){return f(m,v)})),r(s,"mousedown",(function(e){l=0===e.button,c=e.pageX,u=e.pageY})),e.on("document:mousemove",(function(e){if(l){(0,n.addClass)(s,"art-mini-droging");var t=e.pageX-c,r=e.pageY-u;(0,n.setStyle)(s,"transform","translate(".concat(t,"px, ").concat(r,"px)"))}})),e.on("document:mouseup",(function(){if(l){l=!1,(0,n.removeClass)(s,"art-mini-droging");var e=s.getBoundingClientRect();o.set("left",e.left),o.set("top",e.top),(0,n.setStyle)(s,"left","".concat(e.left,"px")),(0,n.setStyle)(s,"top","".concat(e.top,"px")),(0,n.setStyle)(s,"transform",null)}})),s}(),m=o.get("top"),v=o.get("left");m&&v?((0,n.setStyle)(h,"top","".concat(m,"px")),(0,n.setStyle)(h,"left","".concat(v,"px")),(0,n.isInViewport)(h)||d()):d(),e.emit("mini",!0)}else p()}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],llm7W:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=[];(0,n.def)(e,"loop",{get:function(){return t},set:function(r){if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){var o=(0,n.clamp)(r[0],0,Math.min(r[1],e.duration)),a=(0,n.clamp)(r[1],o,e.duration);t=a-o>=1?[o,a]:[]}else t=[];e.emit("loop",t)}}),e.on("video:timeupdate",(function(){var r;t.length&&(null!==(r=e.currentTimet[1])&&(e.seek=t[0])}))}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"2UAdD":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$poster;(0,n.def)(e,"poster",{get:function(){try{return t.style.backgroundImage.match(/"(.*)"/)[1]}catch(e){return""}},set:function(e){(0,n.setStyle)(t,"backgroundImage","url(".concat(e,")"))}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"377XR":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template,r=t.$container,o=t.$video;(0,n.def)(e,"autoHeight",{value:function(){var t=r.clientWidth,a=o.videoHeight*(t/o.videoWidth);(0,n.setStyle)(r,"height",a+"px"),e.emit("autoHeight",a)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],afCNS:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.template.$player;(0,n.def)(e,"cssVar",{value:function(e,r){return r?t.style.setProperty(e,r):getComputedStyle(t).getPropertyValue(e)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7l7GX":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){(0,n.def)(e,"theme",{get:function(){return e.cssVar("--art-theme")},set:function(t){e.cssVar("--art-theme",t)}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"3Vlhc":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){(0,n.def)(e,"type",{get:function(){return e.option.type},set:function(t){e.option.type=t}})}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],ey2W0:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t,r=["mini","pip","fullscreen","fullscreenWeb"];(0,n.def)(e,"state",{get:function(){return null!==(t=r.find((function(t){return e[t]})))&&void 0!==t?t:"standard"},set:function(t){for(var n=0;n=s.CONTROL_HIDE_TIME&&(n.show=!1,(0,v.addClass)(i,"art-hide-cursor"),(0,v.removeClass)(i,"art-hover"))})),n.init(),n}return(0,i.default)(r,[{key:"init",value:function(){var e=this,t=this.art.option;t.isLive||this.add((0,I.default)({name:"progress",position:"top",index:10})),!t.thumbnails.url||t.isLive||v.isMobile||this.add((0,z.default)({name:"thumbnails",position:"top",index:20})),this.add((0,L.default)({name:"loop",position:"top",index:30})),this.add((0,S.default)({name:"playAndPause",position:"left",index:10})),this.add((0,C.default)({name:"volume",position:"left",index:20})),t.isLive||this.add((0,E.default)({name:"time",position:"left",index:30})),t.quality.length&&(0,v.sleep)().then((function(){e.art.quality=t.quality})),t.screenshot&&!v.isMobile&&this.add((0,$.default)({name:"screenshot",position:"right",index:20})),t.setting&&this.add((0,P.default)({name:"setting",position:"right",index:30})),t.pip&&this.add((0,k.default)({name:"pip",position:"right",index:40})),t.airplay&&window.WebKitPlaybackTargetAvailabilityEvent&&this.add((0,q.default)({name:"airplay",position:"right",index:50})),t.fullscreenWeb&&this.add((0,w.default)({name:"fullscreenWeb",position:"right",index:60})),t.fullscreen&&this.add((0,_.default)({name:"fullscreen",position:"right",index:70}));for(var r=0;r=Number(c.dataset.index)}));d?d.insertAdjacentElement("beforebegin",c):(0,f.append)(this.$parent,c),a.html&&(0,f.append)(c,a.html),a.style&&(0,f.setStyles)(c,a.style),a.tooltip&&(0,f.tooltip)(c,a.tooltip);var m=[];if(a.click){var y=this.art.events.proxy(c,"click",(function(e){e.preventDefault(),a.click.call(o.art,o,e)}));m.push(y)}return a.selector&&["left","right"].includes(a.position)&&this.addSelector(a,c,m),this[i]=c,this.cache.set(i,{$ref:c,events:m,option:a}),a.mounted&&a.mounted.call(this.art,c),c}}},{key:"addSelector",value:function(e,t,r){var n=this.art.events,o=n.hover,s=n.proxy;(0,f.addClass)(t,"art-control-selector");var i=(0,f.createElement)("div");(0,f.addClass)(i,"art-selector-value"),(0,f.append)(i,e.html),t.innerText="",(0,f.append)(t,i);var l=e.selector.map((function(e,t){return'
').concat(e.html,"
")})).join(""),c=(0,f.createElement)("div");(0,f.addClass)(c,"art-selector-list"),(0,f.append)(c,l),(0,f.append)(t,c);var u=function(){var e=(0,f.getStyle)(t,"width")/2-(0,f.getStyle)(c,"width")/2;c.style.left="".concat(e,"px")};o(t,u);var h,m=this,v=s(c,"click",(h=(0,a.default)((function(t){var r,n,o,a,s,l,c;return(0,p.default)(this,(function(p){switch(p.label){case 0:return n=null!==(r=t.composedPath())&&void 0!==r?r:[],(o=n.find((function(e){return(0,f.hasClass)(e,"art-selector-item")})))?((0,f.inverseClass)(o,"art-current"),a=Number(o.dataset.index),l=null!==(s=e.selector[a])&&void 0!==s?s:{},i.innerText=o.innerText,e.onSelect?[4,e.onSelect.call(m.art,l,o,t)]:[3,2]):[2];case 1:c=p.sent(),(0,d.isStringOrNumber)(c)&&(i.innerHTML=c),p.label=2;case 2:return u(),[2]}}))})),function(e){return h.apply(this,arguments)}));r.push(v)}},{key:"remove",value:function(e){var t=this.cache.get(e);(0,h.errorHandle)(t,"Can't find [".concat(e,"] from the [").concat(this.name,"]")),t.option.beforeUnmount&&t.option.beforeUnmount.call(this.art,t.$ref);for(var r=0;r
',mounted:function(e){var a=!1,s=(0,l.query)(".art-progress-hover",e),i=(0,l.query)(".art-progress-loaded",e),p=(0,l.query)(".art-progress-played",e),f=(0,l.query)(".art-progress-highlight",e),d=(0,l.query)(".art-progress-indicator",e),h=(0,l.query)(".art-progress-tip",e);function m(e,t){"loaded"===e&&(0,l.setStyle)(i,"width","".concat(100*t,"%")),"played"===e&&((0,l.setStyle)(p,"width","".concat(100*t,"%")),(0,l.setStyle)(d,"left","".concat(100*t,"%")))}r.indicator?(0,l.append)(d,r.indicator):(0,l.setStyle)(d,"backgroundColor","var(--art-theme)"),t.on("video:loadedmetadata",(function(){for(var e=0;e');(0,l.append)(f,a)}})),m("loaded",t.loaded),t.on("setBar",(function(e,t){m(e,t)})),t.on("video:progress",(function(){m("loaded",t.loaded)})),t.constructor.USE_RAF?t.on("raf",(function(){m("played",t.played)})):t.on("video:timeupdate",(function(){m("played",t.played)})),t.on("video:ended",(function(){m("played",1)})),l.isMobile||(o(e,"click",(function(e){e.target!==d&&u(t,e)})),o(e,"mousemove",(function(r){!function(e){var r=c(t,e).width;(0,l.setStyle)(s,"width","".concat(r,"px")),(0,l.setStyle)(s,"display","flex")}(r),(0,l.setStyle)(h,"display","flex"),(0,l.includeFromEvent)(r,f)?function(r){var n=c(t,r).width,o=r.target.dataset.text;h.innerHTML=o;var a=h.clientWidth;n<=a/2?(0,l.setStyle)(h,"left",0):n>e.clientWidth-a/2?(0,l.setStyle)(h,"left","".concat(e.clientWidth-a,"px")):(0,l.setStyle)(h,"left","".concat(n-a/2,"px"))}(r):function(r){var n=c(t,r),o=n.width,a=n.time;h.innerHTML=a;var s=h.clientWidth;o<=s/2?(0,l.setStyle)(h,"left",0):o>e.clientWidth-s/2?(0,l.setStyle)(h,"left","".concat(e.clientWidth-s,"px")):(0,l.setStyle)(h,"left","".concat(o-s/2,"px"))}(r)})),o(e,"mouseleave",(function(){(0,l.setStyle)(h,"display","none"),(0,l.setStyle)(s,"display","none")})),o(e,"mousedown",(function(e){a=0===e.button})),t.on("document:mousemove",(function(e){if(a){var r=c(t,e),n=r.second;m("played",r.percentage),t.seek=n}})),t.on("document:mouseup",(function(){a&&(a=!1)})))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],i5g4S:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{style:l.isMobile?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:function(e){function r(){var r="".concat((0,l.secondToTime)(t.currentTime)," / ").concat((0,l.secondToTime)(t.duration));r!==e.innerText&&(e.innerText=r)}r();for(var n=["video:loadedmetadata","video:timeupdate","video:progress"],o=0;o
'),i=(0,l.append)(s,'
'),c=(0,l.append)(i,'
'),u=(0,l.append)(i,'
'),p=(0,l.append)(u,'
'),f=(0,l.append)(p,'
'),d=(0,l.append)(u,'
');function h(e){var t=u.getBoundingClientRect(),r=t.top,n=t.height;return 1-(e.clientY-r)/n}function m(){var e;if(null!==(e=t.muted)&&void 0!==e?e:0===t.volume)(0,l.setStyle)(o,"display","none"),(0,l.setStyle)(a,"display","flex"),(0,l.setStyle)(d,"top","100%"),(0,l.setStyle)(f,"top","100%"),c.innerText=0;else{var r=100*t.volume;(0,l.setStyle)(o,"display","flex"),(0,l.setStyle)(a,"display","none"),(0,l.setStyle)(d,"top","".concat(100-r,"%")),(0,l.setStyle)(f,"top","".concat(100-r,"%")),c.innerText=Math.floor(r)}}if(m(),t.on("video:volumechange",m),r(o,"click",(function(){t.muted=!0})),r(a,"click",(function(){t.muted=!1})),l.isMobile)(0,l.setStyle)(s,"display","none");else{var v=!1;r(u,"mousedown",(function(e){v=0===e.button,t.volume=h(e)})),t.on("document:mousemove",(function(e){v&&(t.muted=!1,t.volume=h(e))})),t.on("document:mouseup",(function(){v&&(v=!1)}))}}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],k1U7y:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{tooltip:t.i18n.get("Show Setting"),mounted:function(e){var r=t.proxy,n=t.icons,o=t.i18n;(0,l.append)(e,n.setting),r(e,"click",(function(){t.setting.toggle(),t.setting.updateStyle()})),t.on("setting",(function(t){(0,l.tooltip)(e,o.get(t?"Hide Setting":"Show Setting"))}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"2jVZH":[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"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_object_spread_props.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_ts_generator.mjs"),p=n.interopDefault(u),f=e("../utils"),d=e("./progress");r.default=function(e){return function(t){return(0,c.default)((0,i.default)({},e),{mounted:function(e){var r,n=t.option,o=t.template,s=o.$progress,i=o.$video,l=t.events,c=l.proxy,u=l.loadImg,h=null,m=!1,v=!1;c(s,"mousemove",(r=(0,a.default)((function(r){var o;return(0,p.default)(this,(function(a){switch(a.label){case 0:return m?[3,2]:(m=!0,[4,u(n.thumbnails.url)]);case 1:o=a.sent(),h=o,v=!0,a.label=2;case 2:return v&&((0,f.setStyle)(e,"display","flex"),function(r){var o,a=(0,d.getPosFromEvent)(t,r).width,l=n.thumbnails,c=l.url,u=l.number,p=l.column,m=l.width,v=l.height,g=null!=m?m:h.naturalWidth/p,y=null!=v?v:g/(i.videoWidth/i.videoHeight),b=s.clientWidth/u,_=Math.floor(a/b),j=Math.ceil(_/p)-1,w=null!==(o=_%p)&&void 0!==o?o:p-1;(0,f.setStyle)(e,"backgroundImage","url(".concat(c,")")),(0,f.setStyle)(e,"height","".concat(y,"px")),(0,f.setStyle)(e,"width","".concat(g,"px")),(0,f.setStyle)(e,"backgroundPosition","-".concat(w*g,"px -").concat(j*y,"px")),a<=g/2?(0,f.setStyle)(e,"left",0):a>s.clientWidth-g/2?(0,f.setStyle)(e,"left","".concat(s.clientWidth-g,"px")):(0,f.setStyle)(e,"left","".concat(a-g/2,"px"))}(r)),[2]}}))})),function(e){return r.apply(this,arguments)})),c(s,"mouseleave",(function(){(0,f.setStyle)(e,"display","none")})),t.on("hover",(function(t){t||(0,f.setStyle)(e,"display","none")}))}})}}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","./progress":"EmoUd","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],eocyV:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{tooltip:t.i18n.get("Screenshot"),mounted:function(e){var r=t.proxy,n=t.icons;(0,l.append)(e,n.screenshot),r(e,"click",(function(){t.screenshot()}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"57tCE":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{mounted:function(e){var r=(0,l.append)(e,''),n=(0,l.append)(e,'');t.on("loop",(function(o){o&&o.length?((0,l.setStyle)(e,"display","flex"),(0,l.setStyle)(r,"left","calc(".concat(o[0]/t.duration*100,"% - ").concat(r.clientWidth,"px)")),(0,l.setStyle)(n,"left","".concat(o[1]/t.duration*100,"%"))):(0,l.setStyle)(e,"display","none")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],Dlr2L:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{tooltip:t.i18n.get("AirPlay"),mounted:function(e){var r=t.proxy,n=t.icons;(0,l.append)(e,n.airplay),r(e,"click",(function(){return t.airplay()}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],aH04y:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return M}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_inherits.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_create_super.mjs"),p=n.interopDefault(u),f=e("../utils"),d=e("../utils/component"),h=n.interopDefault(d),m=e("./playbackRate"),v=n.interopDefault(m),g=e("./aspectRatio"),y=n.interopDefault(g),b=e("./flip"),_=n.interopDefault(b),j=e("./info"),w=n.interopDefault(j),x=e("./version"),k=n.interopDefault(x),T=e("./close"),S=n.interopDefault(T),M=function(e){"use strict";(0,c.default)(r,e);var t=(0,p.default)(r);function r(e){var n;return(0,a.default)(this,r),(n=t.call(this,e)).name="contextmenu",n.$parent=e.template.$contextmenu,f.isMobile||n.init(),n}return(0,i.default)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.option,n=t.proxy,o=t.template,a=o.$player,s=o.$contextmenu;r.playbackRate&&this.add((0,v.default)({name:"playbackRate",index:10})),r.aspectRatio&&this.add((0,y.default)({name:"aspectRatio",index:20})),r.flip&&this.add((0,_.default)({name:"flip",index:30})),this.add((0,w.default)({name:"info",index:40})),this.add((0,k.default)({name:"version",index:50})),this.add((0,S.default)({name:"close",index:60}));for(var i=0;ic+l&&(m=l-h),n+d>u+i&&(v=i-d),(0,f.setStyles)(s,{top:"".concat(v,"px"),left:"".concat(m,"px")})}})),n(a,"click",(function(t){(0,f.includeFromEvent)(t,s)||(e.show=!1)})),this.art.on("blur",(function(){e.show=!1}))}}]),r}(h.default)},{"@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_create_super.mjs":"hOJPY","../utils":"7esST","../utils/component":"cVtDw","./playbackRate":"7PKBT","./aspectRatio":"21e5i","./flip":"5paZL","./info":"9tDwX","./version":"7YY7g","./close":"5kAbg","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7PKBT":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){var r=t.i18n,n=t.constructor.PLAYBACK_RATE.map((function(e){return'').concat(1===e?r.get("Normal"):e.toFixed(1),"")})).join("");return(0,i.default)((0,a.default)({},e),{html:"".concat(r.get("Play Speed"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.playbackRate=Number(n),e.show=!1)},mounted:function(e){var r=(0,l.query)('[data-value="1"]',e);r&&(0,l.inverseClass)(r,"art-current"),t.on("video:ratechange",(function(){var r=(0,l.queryAll)("span",e).find((function(e){return Number(e.dataset.value)===t.playbackRate}));r&&(0,l.inverseClass)(r,"art-current")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"21e5i":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){var r=t.i18n,n=t.constructor.ASPECT_RATIO.map((function(e){return'').concat("default"===e?r.get("Default"):e,"")})).join("");return(0,i.default)((0,a.default)({},e),{html:"".concat(r.get("Aspect Ratio"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.aspectRatio=n,e.show=!1)},mounted:function(e){var r=(0,l.query)('[data-value="default"]',e);r&&(0,l.inverseClass)(r,"art-current"),t.on("aspectRatio",(function(t){var r=(0,l.queryAll)("span",e).find((function(e){return e.dataset.value===t}));r&&(0,l.inverseClass)(r,"art-current")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"5paZL":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s),l=e("../utils");r.default=function(e){return function(t){var r=t.i18n,n=t.constructor.FLIP.map((function(e){return'').concat(r.get((0,l.capitalize)(e)),"")})).join("");return(0,i.default)((0,a.default)({},e),{html:"".concat(r.get("Video Flip"),": ").concat(n),click:function(e,r){var n=r.target.dataset.value;n&&(t.flip=n.toLowerCase(),e.show=!1)},mounted:function(e){var r=(0,l.query)('[data-value="normal"]',e);r&&(0,l.inverseClass)(r,"art-current"),t.on("flip",(function(t){var r=(0,l.queryAll)("span",e).find((function(e){return e.dataset.value===t}));r&&(0,l.inverseClass)(r,"art-current")}))}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9tDwX":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s);r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{html:t.i18n.get("Video Info"),click:function(e){t.info.show=!0,e.show=!1}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7YY7g":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s);r.default=function(e){return(0,i.default)((0,a.default)({},e),{html:'ArtPlayer 5.1.0'})}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"5kAbg":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r);var o=e("@swc/helpers/src/_object_spread.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_object_spread_props.mjs"),i=n.interopDefault(s);r.default=function(e){return function(t){return(0,i.default)((0,a.default)({},e),{html:t.i18n.get("Close"),click:function(e){e.show=!1}})}}},{"@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],kEevD:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return h}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("@swc/helpers/src/_inherits.mjs"),c=n.interopDefault(l),u=e("@swc/helpers/src/_create_super.mjs"),p=n.interopDefault(u),f=e("./utils"),d=e("./utils/component"),h=function(e){"use strict";(0,c.default)(r,e);var t=(0,p.default)(r);function r(e){var n;return(0,a.default)(this,r),(n=t.call(this,e)).name="info",f.isMobile||n.init(),n}return(0,i.default)(r,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor,o=t.template,a=o.$infoPanel,s=o.$infoClose,i=o.$video;r(s,"click",(function(){e.show=!1}));var l,c=null,u=null!==(l=(0,f.queryAll)("[data-video]",a))&&void 0!==l?l:[];this.art.on("destroy",(function(){return clearTimeout(c)})),function e(){for(var t=0;t".concat((0,_.escape)(e),"

")})).join(""):e.innerHTML=this.activeCue.text,this.art.emit("subtitleUpdate",this.activeCue.text))}},{key:"switch",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this;return(0,a.default)((function(){var n,o,a,s,i,l;return(0,b.default)(this,(function(c){switch(c.label){case 0:return n=r.art,o=n.i18n,a=n.notice,s=n.option,i=(0,m.default)((0,d.default)({},s.subtitle,t),{url:e}),[4,r.init(i)];case 1:return l=c.sent(),t.name&&(a.show="".concat(o.get("Switch Subtitle"),": ").concat(t.name)),[2,l]}}))}))()}},{key:"createTrack",value:function(e,t){var r=this,n=this.art,o=n.template,a=n.proxy,s=o.$video,i=o.$track,l=(0,_.createElement)("track");l.default=!0,l.kind=e,l.src=t,l.track.mode="hidden",this.eventDestroy(),(0,_.remove)(i),(0,_.append)(s,l),o.$track=l,this.eventDestroy=a(this.textTrack,"cuechange",(function(){return r.update()}))}},{key:"init",value:function(e){var t=this;return(0,a.default)((function(){var r,n,o;return(0,b.default)(this,(function(a){return r=t.art,n=r.notice,o=r.template.$subtitle,(0,k.default)(e,S.default.subtitle),e.url?(t.style(e.style),[2,fetch(e.url).then((function(e){return e.arrayBuffer()})).then((function(r){var n,o=new TextDecoder(e.encoding).decode(r);switch(t.art.emit("subtitleLoad",e.url),null!==(n=e.type)&&void 0!==n?n:(0,_.getExt)(e.url)){case"srt":var a=(0,_.srtToVtt)(o),s=e.onVttLoad(a);return(0,_.vttToBlob)(s);case"ass":var i=(0,_.assToVtt)(o),l=e.onVttLoad(i);return(0,_.vttToBlob)(l);case"vtt":var c=e.onVttLoad(o);return(0,_.vttToBlob)(c);default:return e.url}})).then((function(e){return o.innerHTML="",t.url===e||(URL.revokeObjectURL(t.url),t.createTrack("metadata",e),t.art.emit("subtitleSwitch",e)),e})).catch((function(e){throw o.innerHTML="",n.show=e,e}))]):[2]}))}))()}}]),r}(w.default)},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_class_call_check.mjs":"9WMH2","@swc/helpers/src/_create_class.mjs":"9mRre","@swc/helpers/src/_inherits.mjs":"ccXwm","@swc/helpers/src/_object_spread.mjs":"cCKRq","@swc/helpers/src/_object_spread_props.mjs":"kyFQB","@swc/helpers/src/_create_super.mjs":"hOJPY","@swc/helpers/src/_ts_generator.mjs":"1EjHr","./utils":"7esST","./utils/component":"cVtDw","option-validator":"8OeHO","./scheme":"hYXnH","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"9biZS":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return T}));var o=e("@swc/helpers/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("../utils/error"),c=e("./clickInit"),u=n.interopDefault(c),p=e("./hoverInit"),f=n.interopDefault(p),d=e("./moveInit"),h=n.interopDefault(d),m=e("./resizeInit"),v=n.interopDefault(m),g=e("./gestureInit"),y=n.interopDefault(g),b=e("./viewInit"),_=n.interopDefault(b),j=e("./documentInit"),w=n.interopDefault(j),x=e("./updateInit"),k=n.interopDefault(x),T=function(){"use strict";function e(t){(0,a.default)(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),(0,u.default)(t,this),(0,f.default)(t,this),(0,h.default)(t,this),(0,v.default)(t,this),(0,y.default)(t,this),(0,_.default)(t,this),(0,w.default)(t,this),(0,k.default)(t,this)}return(0,i.default)(e,[{key:"proxy",value:function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=this;if(Array.isArray(t))return t.map((function(t){return o.proxy(e,t,r,n)}));e.addEventListener(t,r,n);var a=function(){return e.removeEventListener(t,r,n)};return this.destroyEvents.push(a),a}},{key:"hover",value:function(e,t,r){t&&this.proxy(e,"mouseenter",t),r&&this.proxy(e,"mouseleave",r)}},{key:"loadImg",value:function(e){var t=this;return new Promise((function(r,n){var o;if(e instanceof HTMLImageElement)o=e;else{if("string"!=typeof e)return n(new(0,l.ArtPlayerError)("Unable to get Image"));(o=new Image).src=e}if(o.complete)return r(o);t.proxy(o,"load",(function(){return r(o)})),t.proxy(o,"error",(function(){return n(new(0,l.ArtPlayerError)("Failed to load Image: ".concat(o.src)))}))}))}},{key:"remove",value:function(e){var t=this.destroyEvents.indexOf(e);t>-1&&(e(),this.destroyEvents.splice(t,1))}},{key:"destroy",value:function(){for(var e=0;e=-45&&l<45?s=4:l>=45&&l<135?s=1:l>=-135&&l<-45?s=2:(null!==(i=l>=135&&l<=180)&&void 0!==i?i:l>=-180&&l<-135)&&(s=3),s}r.default=function(e,t){if(n.isMobile&&!e.option.isLive){var r=e.template,s=r.$video,i=r.$progress,l=null,c=!1,u=0,p=0,f=0,d=function(t){if(1===t.touches.length&&!e.isLock){l===i&&(0,o.setCurrentTime)(e,t),c=!0;var r=t.touches[0],n=r.pageX,a=r.pageY;u=n,p=a,f=e.currentTime}},h=function(t){if(1===t.touches.length&&c&&e.duration){var r,o=t.touches[0],i=o.pageX,d=o.pageY,h=a(u,p,i,d),m=[3,4].includes(h),v=[1,2].includes(h);if(null!==(r=m&&!e.isRotate)&&void 0!==r?r:v&&e.isRotate){var g=(0,n.clamp)((i-u)/e.width,-1,1),y=(0,n.clamp)((d-p)/e.height,-1,1),b=e.isRotate?y:g,_=l===s?e.constructor.TOUCH_MOVE_RATIO:1,j=(0,n.clamp)(f+e.duration*b*_,0,e.duration);e.seek=j,e.emit("setBar","played",(0,n.clamp)(j/e.duration,0,1)),e.notice.show="".concat((0,n.secondToTime)(j)," / ").concat((0,n.secondToTime)(e.duration))}}};t.proxy(i,"touchstart",(function(e){l=i,d(e)})),t.proxy(s,"touchstart",(function(e){l=s,d(e)})),t.proxy(s,"touchmove",h),t.proxy(i,"touchmove",h),t.proxy(document,"touchend",(function(){c&&(u=0,p=0,f=0,c=!1,l=null)}))}}},{"../utils":"7esST","../control/progress":"EmoUd","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],goqLs:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e,t){var r=e.option,o=e.constructor,a=e.template.$container,s=(0,n.throttle)((function(){e.emit("view",(0,n.isInViewport)(a,o.SCROLL_GAP))}),o.SCROLL_TIME);t.proxy(window,"scroll",(function(){return s()})),e.on("view",(function(t){r.autoMini&&(e.mini=!t)}))}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"7eAOV":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e,t){t.proxy(document,"mousemove",(function(t){e.emit("document:mousemove",t)})),t.proxy(document,"mouseup",(function(t){e.emit("document:mouseup",t)}))}},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],ioax6:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r),r.default=function(e){if(e.constructor.USE_RAF){var t=null;!function r(){e.playing&&e.emit("raf"),e.isDestroy||(t=requestAnimationFrame(r))}(),e.on("destroy",(function(){cancelAnimationFrame(t)}))}}},{"@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],bCoXC:[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/src/_class_call_check.mjs"),a=n.interopDefault(o),s=e("@swc/helpers/src/_create_class.mjs"),i=n.interopDefault(s),l=e("./utils"),c=function(){"use strict";function e(t){(0,a.default)(this,e),this.art=t,this.keys={},t.option.hotkey&&!l.isMobile&&this.init()}return(0,i.default)(e,[{key:"init",value:function(){var e=this,t=this.art,r=t.proxy,n=t.constructor;this.add(27,(function(){e.art.fullscreenWeb&&(e.art.fullscreenWeb=!1)})),this.add(32,(function(){e.art.toggle()})),this.add(37,(function(){e.art.backward=n.SEEK_STEP})),this.add(38,(function(){e.art.volume+=n.VOLUME_STEP})),this.add(39,(function(){e.art.forward=n.SEEK_STEP})),this.add(40,(function(){e.art.volume-=n.VOLUME_STEP})),r(window,"keydown",(function(t){if(e.art.isFocus){var r=document.activeElement.tagName.toUpperCase(),n=document.activeElement.getAttribute("contenteditable");if("INPUT"!==r&&"TEXTAREA"!==r&&""!==n&&"true"!==n){var o=e.keys[t.keyCode];if(o){t.preventDefault();for(var a=0;a'},{}],aoLmP:[function(e,t,r){t.exports=''},{}],"7BoWr":[function(e,t,r){t.exports=''},{}],bkCtG:[function(e,t,r){t.exports=''},{}],d9cJz:[function(e,t,r){t.exports=''},{}],bEc44:[function(e,t,r){t.exports=''},{}],jiUYL:[function(e,t,r){t.exports=''},{}],a8WfT:[function(e,t,r){t.exports=''},{}],iJ2rM:[function(e,t,r){t.exports=''},{}],"80RaN":[function(e,t,r){t.exports=''},{}],fHsvm:[function(e,t,r){t.exports=''},{}],dwdtS:[function(e,t,r){t.exports=''},{}],kYWrM:[function(e,t,r){t.exports=''},{}],d9UhH:[function(e,t,r){t.exports=''},{}],e4ZLS:[function(e,t,r){t.exports=''},{}],"2lyD4":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"default",(function(){return E}));var o=e("@swc/helpers/src/_async_to_generator.mjs"),a=n.interopDefault(o),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/_to_consumable_array.mjs"),d=n.interopDefault(f),h=e("@swc/helpers/src/_create_super.mjs"),m=n.interopDefault(h),v=e("@swc/helpers/src/_ts_generator.mjs"),g=n.interopDefault(v),y=e("./flip"),b=n.interopDefault(y),_=e("./aspectRatio"),j=n.interopDefault(_),w=e("./playbackRate"),x=n.interopDefault(w),k=e("./subtitleOffset"),T=n.interopDefault(k),S=e("../utils/component"),M=n.interopDefault(S),I=e("../utils/error"),D=e("../utils"),E=function(e){"use strict";(0,p.default)(r,e);var t=(0,m.default)(r);function r(e){var n;(0,i.default)(this,r),n=t.call(this,e);var o=e.option,a=e.controls,s=e.template.$setting;return n.name="setting",n.$parent=s,n.option=[],n.events=[],n.cache=new Map,o.setting&&(n.init(),e.on("blur",(function(){n.show&&(n.show=!1,n.render(n.option))})),e.on("focus",(function(e){var t=(0,D.includeFromEvent)(e,a.setting),r=(0,D.includeFromEvent)(e,n.$parent);!n.show||t||r||(n.show=!1,n.render(n.option))}))),n}return(0,c.default)(r,[{key:"defaultSettings",get:function(){var e=[],t=this.art.option;return t.playbackRate&&e.push((0,x.default)(this.art)),t.aspectRatio&&e.push((0,j.default)(this.art)),t.flip&&e.push((0,b.default)(this.art)),t.subtitleOffset&&e.push((0,T.default)(this.art)),e}},{key:"init",value:function(){var e=this.art.option,t=(0,d.default)(this.defaultSettings).concat((0,d.default)(e.settings));this.option=r.makeRecursion(t),this.destroy(),this.render(this.option)}},{key:"destroy",value:function(){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.option,r=0;r
'),l=(0,D.createElement)("div");(0,D.addClass)(l,"art-setting-item-left-icon"),(0,D.append)(l,n.arrowLeft),(0,D.append)(i,l),(0,D.append)(i,e.$parentItem.html);var c=o(s,"click",(function(){return t.render(e.$parentList)}));return this.events.push(c),s}},{key:"creatItem",value:function(e,t){var r=this.art,n=r.icons,o=r.proxy,s=r.constructor,i=(0,D.createElement)("div");(0,D.addClass)(i,"art-setting-item"),(0,D.setStyle)(i,"height","".concat(s.SETTING_ITEM_HEIGHT,"px")),(0,D.isStringOrNumber)(t.name)&&(i.dataset.name=t.name),(0,D.isStringOrNumber)(t.value)&&(i.dataset.value=t.value);var l=(0,D.append)(i,'
'),c=(0,D.append)(i,'
'),u=(0,D.createElement)("div");switch((0,D.addClass)(u,"art-setting-item-left-icon"),e){case"switch":case"range":var p;(0,D.append)(u,(null!==(p=(0,D.isStringOrNumber)(t.icon))&&void 0!==p?p:t.icon instanceof Element)?t.icon:n.config);break;case"selector":var f;t.selector&&t.selector.length?(0,D.append)(u,(null!==(f=(0,D.isStringOrNumber)(t.icon))&&void 0!==f?f:t.icon instanceof Element)?t.icon:n.config):(0,D.append)(u,n.check)}(0,D.append)(l,u),t.$icon=u,(0,D.def)(t,"icon",{configurable:!0,get:function(){return u.innerHTML},set:function(e){(0,D.isStringOrNumber)(e)&&(u.innerHTML=e)}});var d,h=(0,D.createElement)("div");(0,D.addClass)(h,"art-setting-item-left-text"),(0,D.append)(h,null!==(d=t.html)&&void 0!==d?d:""),(0,D.append)(l,h),t.$html=h,(0,D.def)(t,"html",{configurable:!0,get:function(){return h.innerHTML},set:function(e){(0,D.isStringOrNumber)(e)&&(h.innerHTML=e)}});var m,v,y=(0,D.createElement)("div");switch((0,D.addClass)(y,"art-setting-item-right-tooltip"),(0,D.append)(y,null!==(m=t.tooltip)&&void 0!==m?m:""),(0,D.append)(c,y),t.$tooltip=y,(0,D.def)(t,"tooltip",{configurable:!0,get:function(){return y.innerHTML},set:function(e){(0,D.isStringOrNumber)(e)&&(y.innerHTML=e)}}),e){case"switch":var b=(0,D.createElement)("div");(0,D.addClass)(b,"art-setting-item-right-icon");var _=(0,D.append)(b,n.switchOn),j=(0,D.append)(b,n.switchOff);(0,D.setStyle)(t.switch?j:_,"display","none"),(0,D.append)(c,b),t.$switch=t.switch,(0,D.def)(t,"switch",{configurable:!0,get:function(){return t.$switch},set:function(e){t.$switch=e,e?((0,D.setStyle)(j,"display","none"),(0,D.setStyle)(_,"display",null)):((0,D.setStyle)(j,"display",null),(0,D.setStyle)(_,"display","none"))}});break;case"range":var w=(0,D.createElement)("div");(0,D.addClass)(w,"art-setting-item-right-icon");var x,k,T,S,M=(0,D.append)(w,'');M.value=null!==(x=t.range[0])&&void 0!==x?x:0,M.min=null!==(k=t.range[1])&&void 0!==k?k:0,M.max=null!==(T=t.range[2])&&void 0!==T?T:10,M.step=null!==(S=t.range[3])&&void 0!==S?S:1,(0,D.addClass)(M,"art-setting-range"),(0,D.append)(c,w),t.$range=M,(0,D.def)(t,"range",{configurable:!0,get:function(){return M.valueAsNumber},set:function(e){M.value=Number(e)}});break;case"selector":if(t.selector&&t.selector.length){var I=(0,D.createElement)("div");(0,D.addClass)(I,"art-setting-item-right-icon"),(0,D.append)(I,n.arrowRight),(0,D.append)(c,I)}}switch(e){case"switch":if(t.onSwitch){var E=this,F=o(i,"click",(v=(0,a.default)((function(e){return(0,g.default)(this,(function(r){switch(r.label){case 0:return[4,t.onSwitch.call(E.art,t,i,e)];case 1:return t.switch=r.sent(),[2]}}))})),function(e){return v.apply(this,arguments)}));this.events.push(F)}break;case"range":if(t.$range){if(t.onRange){var C=this,O=o(t.$range,"change",function(){var e=(0,a.default)((function(e){return(0,g.default)(this,(function(r){switch(r.label){case 0:return[4,t.onRange.call(C.art,t,i,e)];case 1:return t.tooltip=r.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}());this.events.push(O)}if(t.onChange){var P=this,R=o(t.$range,"input",function(){var e=(0,a.default)((function(e){return(0,g.default)(this,(function(r){switch(r.label){case 0:return[4,t.onChange.call(P.art,t,i,e)];case 1:return t.tooltip=r.sent(),[2]}}))}));return function(t){return e.apply(this,arguments)}}());this.events.push(R)}}break;case"selector":var z=this,A=o(i,"click",function(){var e=(0,a.default)((function(e){var r,n,o;return(0,g.default)(this,(function(a){switch(a.label){case 0:return t.selector&&t.selector.length?(z.render(t.selector,t.width),[3,3]):[3,1];case 1:for((0,D.inverseClass)(i,"art-current"),r=0;rp.width?((0,D.setStyle)(s,"left",null),(0,D.setStyle)(s,"right",null)):((0,D.setStyle)(s,"left","".concat(f,"px")),(0,D.setStyle)(s,"right","auto"))}}},{key:"render",value:function(e,t){var r=this.art.constructor;if(this.cache.has(e)){var n=this.cache.get(e);(0,D.inverseClass)(n,"art-current"),(0,D.setStyle)(this.$parent,"width","".concat(n.dataset.width,"px")),(0,D.setStyle)(this.$parent,"height","".concat(n.dataset.height,"px")),this.updateStyle(Number(n.dataset.width))}else{var o=(0,D.createElement)("div");(0,D.addClass)(o,"art-setting-panel"),o.dataset.width=null!=t?t:r.SETTING_WIDTH,o.dataset.height=e.length*r.SETTING_ITEM_HEIGHT,e[0]&&e[0].$parentItem&&((0,D.append)(o,this.creatHeader(e[0])),o.dataset.height=Number(o.dataset.height)+r.SETTING_ITEM_HEIGHT);for(var a=0;ai&&up)&&setTimeout((function(){(0,l.setStyle)(o,"width","".concat(p,"px")),(0,l.setStyle)(o,"height","".concat(u,"px")),(0,l.setStyle)(o,"transform-origin","0 0"),(0,l.setStyle)(o,"transform","rotate(90deg) translate(0, -".concat(u,"px)")),(0,l.addClass)(o,"art-auto-orientation"),e.isRotate=!0,e.emit("resize")}),r.AUTO_ORIENTATION_TIME)}else(0,l.hasClass)(o,"art-auto-orientation")&&((0,l.removeClass)(o,"art-auto-orientation"),e.isRotate=!1,e.emit("resize"))})),e.on("fullscreen",(t=(0,a.default)((function(e){var t,r,n,a,c,u,p,f;return(0,i.default)(this,(function(i){switch(i.label){case 0:return t=screen.orientation.type,e?(r=s.videoWidth,n=s.videoHeight,a=document.documentElement,c=a.clientWidth,u=a.clientHeight,(null!==(p=r>n&&cu)?(f=t.startsWith("portrait")?"landscape":"portrait",[4,screen.orientation.lock(f)]):[3,2]):[3,3];case 1:i.sent(),(0,l.addClass)(o,"art-auto-orientation-fullscreen"),i.label=2;case 2:return[3,5];case 3:return(0,l.hasClass)(o,"art-auto-orientation-fullscreen")?[4,screen.orientation.lock(t)]:[3,5];case 4:i.sent(),(0,l.removeClass)(o,"art-auto-orientation-fullscreen"),i.label=5;case 5:return[2]}}))})),function(e){return t.apply(this,arguments)})),{name:"autoOrientation",get state(){return(0,l.hasClass)(o,"art-auto-orientation")}}}},{"@swc/helpers/src/_async_to_generator.mjs":"3zxnc","@swc/helpers/src/_ts_generator.mjs":"1EjHr","../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"6nThf":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.i18n,r=e.icons,o=e.storage,a=e.constructor,s=e.proxy,i=e.template.$poster,l=e.layers.add({name:"auto-playback",html:'
'}),c=(0,n.query)(".art-auto-playback-last",l),u=(0,n.query)(".art-auto-playback-jump",l),p=(0,n.query)(".art-auto-playback-close",l);return e.on("video:timeupdate",(function(){if(e.playing){var t,r,n=null!==(t=o.get("times"))&&void 0!==t?t:{},s=Object.keys(n);s.length>a.AUTO_PLAYBACK_MAX&&delete n[s[0]],n[null!==(r=e.option.id)&&void 0!==r?r:e.option.url]=e.currentTime,o.set("times",n)}})),e.on("ready",(function(){var f,d,h=(null!==(f=o.get("times"))&&void 0!==f?f:{})[null!==(d=e.option.id)&&void 0!==d?d:e.option.url];h&&h>=a.AUTO_PLAYBACK_MIN&&((0,n.append)(p,r.close),(0,n.setStyle)(l,"display","flex"),c.innerText="".concat(t.get("Last Seen")," ").concat((0,n.secondToTime)(h)),u.innerText=t.get("Jump Play"),s(p,"click",(function(){(0,n.setStyle)(l,"display","none")})),s(u,"click",(function(){e.seek=h,e.play(),(0,n.setStyle)(i,"display","none"),(0,n.setStyle)(l,"display","none")})),e.once("video:timeupdate",(function(){setTimeout((function(){(0,n.setStyle)(l,"display","none")}),a.AUTO_PLAYBACK_TIMEOUT)})))})),{name:"auto-playback",get times(){var e;return null!==(e=o.get("times"))&&void 0!==e?e:{}},clear:function(){return o.del("times")},delete:function(e){var t,r=null!==(t=o.get("times"))&&void 0!==t?t:{};return delete r[e],o.set("times",r),r}}}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],foG6r:[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.constructor,r=e.proxy,o=e.template,a=o.$player,s=o.$video,i=null,l=!1,c=1,u=function(){clearTimeout(i),l&&(l=!1,e.playbackRate=c,(0,n.removeClass)(a,"art-fast-forward"))};return r(s,"touchstart",(function(r){1===r.touches.length&&e.playing&&!e.isLock&&(i=setTimeout((function(){l=!0,c=e.playbackRate,e.playbackRate=t.FAST_FORWARD_VALUE,(0,n.addClass)(a,"art-fast-forward")}),t.FAST_FORWARD_TIME))})),r(document,"touchmove",u),r(document,"touchend",u),{name:"fastForward",get state(){return(0,n.hasClass)(a,"art-fast-forward")}}}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}],"1zrgm":[function(e,t,r){e("@parcel/transformer-js/src/esmodule-helpers.js").defineInteropFlag(r);var n=e("../utils");r.default=function(e){var t=e.layers,r=e.icons,o=e.template.$player;return t.add({name:"lock",mounted:function(t){var o=(0,n.append)(t,r.lock),a=(0,n.append)(t,r.unlock);(0,n.setStyle)(o,"display","none"),e.on("lock",(function(e){e?((0,n.setStyle)(o,"display","inline-flex"),(0,n.setStyle)(a,"display","none")):((0,n.setStyle)(o,"display","none"),(0,n.setStyle)(a,"display","inline-flex"))}))},click:function(){(0,n.hasClass)(o,"art-lock")?((0,n.removeClass)(o,"art-lock"),this.isLock=!1,e.emit("lock",!1)):((0,n.addClass)(o,"art-lock"),this.isLock=!0,e.emit("lock",!0))}}),{name:"lock",get state(){return(0,n.hasClass)(o,"art-lock")}}}},{"../utils":"7esST","@parcel/transformer-js/src/esmodule-helpers.js":"hTt7M"}]},["7Csdv"],"7Csdv","parcelRequireb749"); \ No newline at end of file diff --git a/packages/artplayer/dist/i18n/cs.js b/packages/artplayer/dist/i18n/cs.js index 6ba25865c..56fa85dd6 100644 --- a/packages/artplayer/dist/i18n/cs.js +++ b/packages/artplayer/dist/i18n/cs.js @@ -1,18 +1 @@ -!// modules are defined as an array -// [ module function, map of requires ] -// -// map of requires is short require name -> numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,o,n,r){/* eslint-disable no-undef */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],d=l.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function a(t,o){if(!d[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[n]&&i[n];if(!o&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -if(u&&"string"==typeof t)return u(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=d[t]=new a.Module(t);e[t][0].call(s.exports,c,s,s.exports,this)}return d[t].exports;function c(e){var t=c.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=d,a.parent=l,a.register=function(t,o){e[t]=[function(e,t){t.exports=o},{}]},Object.defineProperty(a,"root",{get:function(){return i[n]}}),i[n]=a;for(var f=0;f numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,o,t,r,n){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var n="function"==typeof i[r]&&i[r];if(!t&&n)return n(o,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(o,!0);// Try the node require function if it exists. -if(u&&"string"==typeof o)return u(o);var c=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 numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!l[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(u)return u(t,!0);// Try the node require function if it exists. -if(f&&"string"==typeof t)return f(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var a=l[t]=new d.Module(t);e[t][0].call(a.exports,s,a,a.exports,this)}return l[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=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 c=0;c numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,r,o){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[r]&&i[r];if(!n&&o)return o(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -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(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 numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,r,i){/* eslint-disable no-undef */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],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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var i="function"==typeof o[r]&&o[r];if(!n&&i)return i(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(t,!0);// Try the node require function if it exists. -if(l&&"string"==typeof t)return l(t);var f=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=a,d.register=function(t,n){e[t]=[function(e,t){t.exports=n},{}]},Object.defineProperty(d,"root",{get:function(){return o[r]}}),o[r]=d;for(var f=0;f numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,n,o,t,r){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[t]&&i[t];if(!o&&r)return r(n,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(n,!0);// Try the node require function if it exists. -if(l&&"string"==typeof n)return l(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=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 numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(l)return l(t,!0);// Try the node require function if it exists. -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 numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,n,t,r,o){/* eslint-disable no-undef */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],l=a.cache||{},u="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function f(n,t){if(!l[n]){if(!e[n]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var o="function"==typeof i[r]&&i[r];if(!t&&o)return o(n,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(a)return a(n,!0);// Try the node require function if it exists. -if(u&&"string"==typeof n)return u(n);var d=Error("Cannot find module '"+n+"'");throw d.code="MODULE_NOT_FOUND",d}s.resolve=function(t){var r=e[n][1][t];return null!=r?r:t},s.cache={};var c=l[n]=new f.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?{}:f(n)}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=l,f.parent=a,f.register=function(n,t){e[n]=[function(e,n){n.exports=t},{}]},Object.defineProperty(f,"root",{get:function(){return i[r]}}),i[r]=f;for(var d=0;d numeric require -// -// anything defined in a previous bundle is accessed via the -// orig method which is the require for previous bundles -function(e,t,n,o,r){/* eslint-disable no-undef */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||{},f="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function d(t,n){if(!l[t]){if(!e[t]){// if we cannot find the module within our internal map or -// cache jump to the current global require ie. the last bundle -// that was added to the page. -var r="function"==typeof i[o]&&i[o];if(!n&&r)return r(t,!0);// If there are other bundles on this page the require from the -// previous one is saved to 'previousRequire'. Repeat this as -// many times as there are bundles until the module is found or -// we exhaust the require chain. -if(u)return u(t,!0);// Try the node require function if it exists. -if(f&&"string"==typeof t)return f(t);var c=Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}s.resolve=function(n){var o=e[t][1][n];return null!=o?o:n},s.cache={};var a=l[t]=new d.Module(t);e[t][0].call(a.exports,s,a,a.exports,this)}return l[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=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 c=0;c