/*! * artplayer-react.js v3.5.13 * Github: https://github.com/zhw2590582/ArtPlayer#readme * (c) 2017-2020 Harvey Zack * Released under the MIT License. */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).ArtplayerReact=e()}(this,(function(){"use strict";var t=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n=0||(o[r]=t[r]);return o};var e=function(e,r){if(null==e)return{};var n,o,i=t(e,r);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i};var r=function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function n(t,e){return t(e={exports:{}},e.exports),e.exports}var o=n((function(t){function e(r){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=e=function(t){return typeof t}:t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}t.exports=e}));var i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function a(t,e){for(var r=0;rB.length&&B.push(t)}function X(t,e,r){return null==t?0:function t(e,r,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var a=!1;if(null===e)a=!0;else switch(i){case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case g:case w:a=!0}}if(a)return n(o,e,""===r?"."+J(e,0):r),1;if(a=0,r=""===r?".":r+":",Array.isArray(e))for(var c=0;c1?e-1:0),n=1;n2?r-2:0),o=2;o2?r-2:0),o=2;o8)throw new Error("warningWithoutStack() currently supports at most 8 arguments.");if(!t){if("undefined"!=typeof console){var i=n.map((function(t){return""+t}));i.unshift("Warning: "+e),Function.prototype.apply.call(console.error,console,i)}try{var a=0,c="Warning: "+e.replace(/%s/g,(function(){return n[a++]}));throw new Error(c)}catch(t){}}},S={};function E(t,e){var r=t.constructor,n=r&&(r.displayName||r.name)||"ReactClass",o=n+"."+e;S[o]||(P(!1,"Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",e,n),S[o]=!0)}var R={isMounted:function(t){return!1},enqueueForceUpdate:function(t,e,r){E(t,"forceUpdate")},enqueueReplaceState:function(t,e,r,n){E(t,"replaceState")},enqueueSetState:function(t,e,r,n){E(t,"setState")}},$={};function C(t,e,r){this.props=t,this.context=e,this.refs=$,this.updater=r||R}Object.freeze($),C.prototype.isReactComponent={},C.prototype.setState=function(t,e){if("object"!=typeof t&&"function"!=typeof t&&null!=t)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")},C.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};var D={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},T=function(t,e){Object.defineProperty(C.prototype,t,{get:function(){j(!1,"%s(...) is deprecated in plain JavaScript React classes. %s",e[0],e[1])}})};for(var A in D)D.hasOwnProperty(A)&&T(A,D[A]);function z(){}function _(t,e,r){this.props=t,this.context=e,this.refs=$,this.updater=r||R}z.prototype=C.prototype;var L=_.prototype=new z;L.constructor=_,e(L,C.prototype),L.isPureReactComponent=!0;var M={current:null},q={current:null},I=/^(.*)[\\\/]/;function F(t){if(null==t)return null;if("number"==typeof t.tag&&P(!1,"Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case a:return"Fragment";case i:return"Portal";case l:return"Profiler";case c:return"StrictMode";case d:return"Suspense";case h:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case u:return"Context.Consumer";case s:return"Context.Provider";case f:return n=t,o=t.render,p="ForwardRef",m=o.displayName||o.name||"",n.displayName||(""!==m?p+"("+m+")":p);case y:return F(t.type);case b:var e=1===(r=t)._status?r._result:null;if(e)return F(e)}var r,n,o,p,m;return null}var N={},W=null;function V(t){W=t}N.getCurrentStack=null,N.getStackAddendum=function(){var t="";if(W){var e=F(W.type),r=W._owner;t+=function(t,e,r){var n="";if(e){var o=e.fileName,i=o.replace(I,"");if(/^index\./.test(i)){var a=o.match(I);if(a){var c=a[1];if(c)i=c.replace(I,"")+"/"+i}}n=" (at "+i+":"+e.lineNumber+")"}else r&&(n=" (created by "+r+")");return"\n in "+(t||"Unknown")+n}(e,W._source,r&&F(r.type))}var n=N.getCurrentStack;return n&&(t+=n()||""),t};var H={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:q,IsSomeRendererActing:{current:!1},assign:e};e(H,{ReactDebugCurrentFrame:N,ReactComponentTreeHook:{}});var B,U,Y=function(t,e){if(!t){for(var r=H.ReactDebugCurrentFrame,n=r.getStackAddendum(),o=arguments.length,i=new Array(o>2?o-2:0),a=2;a1){for(var u=Array(s),p=0;p1){for(var d=Array(f),h=0;h.")}return e}(e);if(!xt[r]){xt[r]=!0;var n="";t&&t._owner&&t._owner!==q.current&&(n=" It was passed a child from "+F(t._owner.type)+"."),V(t),Y(!1,'Each child in a list should have a unique "key" prop.%s%s See https://fb.me/react-warning-keys for more information.',r,n),V(null)}}}function kt(t,e){if("object"==typeof t)if(Array.isArray(t))for(var r=0;r",i=" Did you accidentally export a JSX literal instead of a component?"):c=typeof t,Y(!1,"React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",c,i)}var s=et.apply(this,arguments);if(null==s)return s;if(n)for(var u=2;u is not supported and will be removed in a future major release. Did you mean to render instead?")),r.Provider},set:function(t){r.Provider=t}},_currentValue:{get:function(){return r._currentValue},set:function(t){r._currentValue=t}},_currentValue2:{get:function(){return r._currentValue2},set:function(t){r._currentValue2=t}},_threadCount:{get:function(){return r._threadCount},set:function(t){r._threadCount=t}},Consumer:{get:function(){return n||(n=!0,Y(!1,"Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),r.Consumer}}}),r.Consumer=i,r._currentRenderer=null,r._currentRenderer2=null,r},forwardRef:function(t){return null!=t&&t.$$typeof===y?P(!1,"forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof t?P(!1,"forwardRef requires a render function but was given %s.",null===t?"null":typeof t):0!==t.length&&2!==t.length&&P(!1,"forwardRef render functions accept exactly two parameters: props and ref. %s",1===t.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=t&&(null!=t.defaultProps||null!=t.propTypes)&&P(!1,"forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"),{$$typeof:f,render:t}},lazy:function(t){var e,r,n={$$typeof:b,_ctor:t,_status:-1,_result:null};return Object.defineProperties(n,{defaultProps:{configurable:!0,get:function(){return e},set:function(t){Y(!1,"React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),e=t,Object.defineProperty(n,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return r},set:function(t){Y(!1,"React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),r=t,Object.defineProperty(n,"propTypes",{enumerable:!0})}}}),n},memo:function(t,e){return mt(t)||P(!1,"memo: The first argument must be a component. Instead received: %s",null===t?"null":typeof t),{$$typeof:y,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return vt().useCallback(t,e)},useContext:function(t,e){var r=vt();if(void 0!==e&&Y(!1,"useContext() second argument is reserved for future use in React. Passing it is not supported. You passed: %s.%s",e,"number"==typeof e&&Array.isArray(arguments[2])?"\n\nDid you call array.map(useContext)? Calling Hooks inside a loop is not supported. Learn more at https://fb.me/rules-of-hooks":""),void 0!==t._context){var n=t._context;n.Consumer===t?Y(!1,"Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===t&&Y(!1,"Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return r.useContext(t,e)},useEffect:function(t,e){return vt().useEffect(t,e)},useImperativeHandle:function(t,e,r){return vt().useImperativeHandle(t,e,r)},useDebugValue:function(t,e){return vt().useDebugValue(t,e)},useLayoutEffect:function(t,e){return vt().useLayoutEffect(t,e)},useMemo:function(t,e){return vt().useMemo(t,e)},useReducer:function(t,e,r){return vt().useReducer(t,e,r)},useRef:function(t){return vt().useRef(t)},useState:function(t){return vt().useState(t)},Fragment:a,Profiler:l,StrictMode:c,Suspense:d,createElement:St,cloneElement:function(t,e,r){for(var n=rt.apply(this,arguments),o=2;oobject{display:block;position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1}@supports ((-webkit-backdrop-filter:initial) or (backdrop-filter:initial)){.art-video-player .art-backdrop-filter{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:rgba(0,0,0,.7)!important}}.art-video-player .art-video{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;width:100%;height:100%;background-color:#000;cursor:pointer}.art-video-player .art-subtitle{display:none;position:absolute;z-index:20;bottom:10px;width:100%;padding:0 20px;text-align:center;color:#fff;font-size:20px;pointer-events:none;text-shadow:.5px .5px .5px rgba(0,0,0,.5)}.art-video-player .art-subtitle p{word-break:break-all;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;margin:10px 0 0;line-height:1}.art-video-player.art-subtitle-show .art-subtitle{display:block}.art-video-player.art-control-show .art-subtitle{bottom:50px}.art-video-player .art-danmuku{z-index:30}.art-video-player .art-danmuku,.art-video-player .art-layers{position:absolute;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-layers{display:none;z-index:40}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:block}.art-video-player .art-mask{display:none;z-index:50;left:0;top:0;right:0;bottom:0;width:100%;height:100%;overflow:hidden;pointer-events:none}.art-video-player .art-mask,.art-video-player .art-mask .art-state{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute}.art-video-player .art-mask .art-state{right:30px;bottom:55px;width:60px;height:60px;opacity:.6}.art-video-player.art-mask-show .art-mask,.art-video-player .art-mask .art-state{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-loading{display:none;position:absolute;z-index:70;left:0;top:0;right:0;bottom:0;width:100%;height:100%;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;pointer-events:none}.art-video-player.art-loading-show .art-loading{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-bottom{position:absolute;z-index:60;left:0;right:0;bottom:0;height:100px;padding:55px 10px 0;opacity:0;visibility:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;pointer-events:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAADGCAYAAAAT+OqFAAAAdklEQVQoz42QQQ7AIAgEF/T/D+kbq/RWAlnQyyazA4aoAB4FsBSA/bFjuF1EOL7VbrIrBuusmrt4ZZORfb6ehbWdnRHEIiITaEUKa5EJqUakRSaEYBJSCY2dEstQY7AuxahwXFrvZmWl2rh4JZ07z9dLtesfNj5q0FU3A5ObbwAAAABJRU5ErkJggg==) repeat-x bottom}.art-video-player .art-bottom .art-progress{position:relative;pointer-events:auto}.art-video-player .art-bottom .art-progress .art-control-progress{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:4px;cursor:pointer}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner{position:relative;height:50%;width:100%;background:hsla(0,0%,100%,.2)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{position:absolute;z-index:10;left:0;top:0;right:0;bottom:0;height:100%;width:0;background:hsla(0,0%,100%,.4)}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{position:absolute;z-index:20;left:0;top:0;right:0;bottom:0;height:100%;width:0}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{position:absolute;z-index:30;left:0;top:0;right:0;bottom:0;height:100%;pointer-events:none}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{display:inline-block;position:absolute;left:0;top:0;width:7px;height:100%;background:#fff;pointer-events:auto}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{display:none;position:absolute;z-index:40;top:-5px;left:-6.5px;width:13px;height:13px;border-radius:50%}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator.art-show-indicator{display:block}.art-video-player .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{display:none;position:absolute;z-index:50;top:-25px;left:0;height:20px;padding:0 5px;line-height:20px;color:#fff;font-size:12px;text-align:center;background:rgba(0,0,0,.7);border-radius:3px;font-weight:700;white-space:nowrap}.art-video-player .art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner{height:100%}.art-video-player .art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner .art-progress-indicator,.art-video-player .art-bottom .art-progress .art-control-progress:hover .art-control-progress-inner .art-progress-tip{display:block}.art-video-player .art-bottom .art-progress .art-control-thumbnails{display:none;position:absolute;bottom:8px;left:0;pointer-events:none;background-color:rgba(0,0,0,.7)}.art-video-player .art-bottom .art-progress .art-control-loop{display:none;position:absolute;width:100%;height:100%;left:0;top:0;right:0;bottom:0;pointer-events:none}.art-video-player .art-bottom .art-progress .art-control-loop .art-loop-point{position:absolute;left:0;top:-2px;width:2px;height:8px;background:hsla(0,0%,100%,.75)}.art-video-player .art-bottom .art-controls{position:relative;pointer-events:auto;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;height:40px;padding:5px 0}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-controls .art-controls-left,.art-video-player .art-bottom .art-controls .art-controls-right{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-bottom .art-controls .art-control{opacity:.9;font-size:12px;height:36px;min-width:36px;line-height:36px;text-align:center;cursor:pointer}.art-video-player .art-bottom .art-controls .art-control .art-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;float:left;height:36px;width:36px}.art-video-player .art-bottom .art-controls .art-control:hover{opacity:1}.art-video-player .art-bottom .art-controls .art-control-onlyText{padding:0 10px}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel{position:relative;float:left;width:0;height:100%;-webkit-transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);transition:margin .2s cubic-bezier(.4,0,1,1),width .2s cubic-bezier(.4,0,1,1);overflow:hidden}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle{position:absolute;top:50%;left:0;width:12px;height:12px;border-radius:12px;margin-top:-6px;background:#fff}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{left:-54px;background:#fff}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after{left:6px;background:hsla(0,0%,100%,.2)}.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:after,.art-video-player .art-bottom .art-controls .art-control-volume .art-volume-panel .art-volume-slider-handle:before{content:"";position:absolute;display:block;top:50%;height:3px;margin-top:-2px;width:60px}.art-video-player .art-bottom .art-controls .art-control-volume:hover .art-volume-panel{width:60px}.art-video-player .art-bottom .art-controls .art-control-quality{position:relative;z-index:30}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys{display:none;position:absolute;bottom:35px;width:100px;padding:5px 0;text-align:center;color:#fff;background:rgba(0,0,0,.8);border-radius:3px}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item{height:30px;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5)}.art-video-player .art-bottom .art-controls .art-control-quality .art-qualitys .art-quality-item:hover{background-color:hsla(0,0%,100%,.1)}.art-video-player .art-bottom .art-controls .art-control-quality:hover .art-qualitys{display:block}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1;visibility:visible}.art-video-player.art-destroy .art-progress-indicator,.art-video-player.art-destroy .art-progress-tip,.art-video-player.art-error .art-progress-indicator,.art-video-player.art-error .art-progress-tip{display:none!important}.art-video-player .art-notice{display:none;font-size:14px;position:absolute;z-index:80;left:0;top:0;padding:10px;width:100%;pointer-events:none}.art-video-player .art-notice .art-notice-inner{display:inline-block;padding:5px 10px;color:#fff;background:rgba(0,0,0,.6);border-radius:3px}.art-video-player.art-notice-show .art-notice{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-contextmenus{display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:absolute;z-index:120;left:0;top:0;min-width:200px;padding:5px 0;background:rgba(0,0,0,.9);border-radius:3px}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;font-size:12px;display:block;color:#fff;padding:10px 15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5);border-bottom:1px solid hsla(0,0%,100%,.1)}.art-video-player .art-contextmenus .art-contextmenu a{color:#fff;text-decoration:none}.art-video-player .art-contextmenus .art-contextmenu span{display:inline-block;padding:0 7px}.art-video-player .art-contextmenus .art-contextmenu span.art-current,.art-video-player .art-contextmenus .art-contextmenu span:hover{color:#00c9ff}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:hsla(0,0%,100%,.1)}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus,.art-video-player .art-settings{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-settings{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;position:absolute;z-index:90;left:0;top:0;height:100%;width:100%;opacity:0;visibility:hidden;pointer-events:none;overflow:hidden}.art-video-player .art-settings .art-setting-inner{position:absolute;top:0;right:-300px;bottom:0;width:300px;height:100%;font-size:12px;background:rgba(0,0,0,.9);-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out;overflow:auto}.art-video-player .art-settings .art-setting-inner .art-setting-body{overflow-y:auto;width:100%;height:100%}.art-video-player .art-settings .art-setting-inner .art-setting-body .art-setting{border-bottom:1px solid hsla(0,0%,100%,.1);padding:10px 15px}.art-video-player .art-settings .art-setting-inner .art-setting-body .art-setting .art-setting-header{margin-bottom:5px}.art-video-player .art-settings .art-setting-radio{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-settings .art-setting-radio .art-radio-item{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 2px}.art-video-player .art-settings .art-setting-radio .art-radio-item button{height:22px;width:100%;border:none;outline:none;color:#fff;background:hsla(0,0%,100%,.2);border-radius:2px}.art-video-player .art-settings .art-setting-radio .art-radio-item.current button{background-color:#00a1d6}.art-video-player .art-settings .art-setting-range input{width:100%;height:3px;outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:hsla(0,0%,100%,.5)}.art-video-player .art-settings .art-setting-checkbox{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.art-video-player .art-settings .art-setting-checkbox input{height:14px;width:14px;margin-right:5px}.art-video-player .art-settings .art-setting-upload{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player .art-settings .art-setting-upload .art-upload-btn{width:80px;height:22px;line-height:22px;border:none;outline:none;color:#fff;background:hsla(0,0%,100%,.2);border-radius:2px;text-align:center}.art-video-player .art-settings .art-setting-upload .art-upload-value{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:22px;line-height:22px;padding-left:10px}.art-video-player.art-setting-show .art-settings{opacity:1;visibility:visible;pointer-events:auto}.art-video-player.art-setting-show .art-settings .art-setting-inner{right:0}.art-video-player .art-info{display:none;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;position:absolute;left:10px;top:10px;z-index:100;width:350px;min-height:150px;padding:10px;color:#fff;font-size:12px;font-family:Noto Sans CJK SC DemiLight,Roboto,Segoe UI,Tahoma,Arial,Helvetica,sans-serif;-webkit-font-smoothing:antialiased;background:rgba(0,0,0,.9)}.art-video-player .art-info .art-info-item{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:5px}.art-video-player .art-info .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-item .art-info-content{-webkit-box-flex:1;-ms-flex:1;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:5px}.art-video-player .art-info .art-info-close{position:absolute;top:5px;right:5px;cursor:pointer}.art-video-player.art-info-show .art-info{display:-webkit-box;display:-ms-flexbox;display:flex}.art-video-player.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio] video{-webkit-box-sizing:content-box;box-sizing:content-box;-o-object-fit:fill;object-fit:fill}.art-video-player.art-fullscreen-web{position:fixed;z-index:9999;width:100%!important;height:100%!important;left:0;top:0;right:0;bottom:0}.art-fullscreen-rotate{position:fixed;z-index:9999;width:100%;height:100%;left:0;top:0;right:0;bottom:0;background:#000}.art-video-player .art-mini-header{display:none;position:absolute;z-index:110;left:0;top:0;right:0;height:35px;line-height:35px;color:#fff;background:rgba(0,0,0,.5);-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;opacity:0;visibility:hidden;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.art-video-player .art-mini-header .art-mini-title{-webkit-box-flex:1;-ms-flex:1;flex:1;padding:0 10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:move}.art-video-player .art-mini-header .art-mini-close{width:35px;text-align:center;font-size:22px;cursor:pointer}.art-video-player.art-is-dragging{opacity:.7}.art-video-player.art-mini{position:fixed;z-index:9999;width:400px;height:225px;-webkit-box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 3px 6px 0 rgba(0,0,0,.2);box-shadow:0 2px 5px 0 rgba(0,0,0,.16),0 3px 6px 0 rgba(0,0,0,.2)}.art-video-player.art-mini .art-mini-header{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.art-video-player.art-mini.art-hover .art-mini-header{opacity:1;visibility:visible}.art-video-player.art-mini .art-mask .art-state{position:static}.art-video-player.art-mini .art-bottom,.art-video-player.art-mini .art-contextmenu,.art-video-player.art-mini .art-danmu,.art-video-player.art-mini .art-info,.art-video-player.art-mini .art-layers,.art-video-player.art-mini .art-notice,.art-video-player.art-mini .art-setting,.art-video-player.art-mini .art-subtitle{display:none!important}.art-auto-size{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.art-video-player[data-flip=horizontal] .art-video{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.art-video-player .art-control-selector{position:relative}.art-video-player .art-control-selector .art-selector-list{display:none;position:absolute;bottom:35px;width:100px;padding:5px 0;text-align:center;color:#fff;background:rgba(0,0,0,.8);border-radius:3px}.art-video-player .art-control-selector .art-selector-list .art-selector-item{height:30px;line-height:30px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-shadow:0 0 2px rgba(0,0,0,.5)}.art-video-player .art-control-selector .art-selector-list .art-selector-item:hover{background-color:hsla(0,0%,100%,.1)}.art-video-player .art-control-selector:hover .art-selector-list{display:block}:root{--balloon-color:rgba(16,16,16,0.95);--balloon-font-size:12px;--balloon-move:4px}button[aria-label][data-balloon-pos]{overflow:visible}[aria-label][data-balloon-pos]{position:relative;cursor:pointer}[aria-label][data-balloon-pos]:after{text-indent:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-weight:400;font-style:normal;text-shadow:none;font-size:var(--balloon-font-size);background:var(--balloon-color);border-radius:2px;color:#fff;content:attr(aria-label);padding:.5em 1em;white-space:nowrap;line-height:1.2}[aria-label][data-balloon-pos]:after,[aria-label][data-balloon-pos]:before{opacity:0;pointer-events:none;-webkit-transition:all .18s ease-out .18s;transition:all .18s ease-out .18s;position:absolute;z-index:10}[aria-label][data-balloon-pos]:before{width:0;height:0;border:5px solid transparent;border-top:5px solid var(--balloon-color);content:""}[aria-label][data-balloon-pos]:hover:after,[aria-label][data-balloon-pos]:hover:before{opacity:1;pointer-events:none}[aria-label][data-balloon-pos][data-balloon-pos=up]:after{margin-bottom:10px}[aria-label][data-balloon-pos][data-balloon-pos=up]:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:before{bottom:100%;left:50%;-webkit-transform:translate(-50%,var(--balloon-move));transform:translate(-50%,var(--balloon-move));-webkit-transform-origin:top;transform-origin:top}[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:after,[aria-label][data-balloon-pos][data-balloon-pos=up]:hover:before{-webkit-transform:translate(-50%);transform:translate(-50%)}');var ft=n((function(t,e){t.exports=function(){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 o=t(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 function(t){return"GeneratorFunction"===n(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(n(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(o=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 o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=21?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector(t)}function gt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(e.querySelectorAll(t))}function wt(t,e){return t.classList.add(e)}function xt(t,e){return t.classList.remove(e)}function Ot(t,e){return t.classList.contains(e)}function kt(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function jt(t,e,r){return t.style[e]=r,t}function Pt(t,e){return Object.keys(e).forEach((function(r){jt(t,r,e[r])})),t}function St(t,e){var r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=window.getComputedStyle(t,null).getPropertyValue(e);return r?parseFloat(n):n}function Et(t){return Array.from(t.parentElement.children).filter((function(e){return e!==t}))}function Rt(t,e){Et(t).forEach((function(t){return xt(t,e)})),wt(t,e)}function $t(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up";yt||(t.setAttribute("aria-label",e),t.setAttribute("data-balloon-pos",r))}function Ct(t){var e=t.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,o=e.top<=r&&e.top+e.height>=0,i=e.left<=n&&e.left+e.width>=0;return o&&i}function Dt(t,e){return t.composedPath&&t.composedPath().indexOf(e)>-1}var Tt=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},At=n((function(t){function e(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function r(n,o,i){return e()?t.exports=r=Reflect.construct:t.exports=r=function(t,e,r){var n=[null];n.push.apply(n,e);var o=new(Function.bind.apply(t,n));return r&&p(o,r.prototype),o},r.apply(null,arguments)}t.exports=r})),zt=function(t){function e(t,r){var n;return i(this,e),n=s(this,u(e).call(this,t)),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(l(n),r||n.constructor),n.name="ArtPlayerError",n}return f(e,t),e}(n((function(t){function e(r){var n="function"==typeof Map?new Map:void 0;return t.exports=e=function(t){if(null===t||!Tt(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(t))return n.get(t);n.set(t,e)}function e(){return At(t,arguments,u(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),p(e,t)},e(r)}t.exports=e}))(Error));function _t(t,e){if(!t)throw new zt(e);return t}function Lt(t){return"WEBVTT \r\n\r\n".concat(t.replace(/{[\s\S]*?}/g,"").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").concat("\r\n\r\n"))}function Mt(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function qt(t){var 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(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(/[:.]/).map((function(t,e,r){if(e===r.length-1){if(1===t.length)return".".concat(t,"00");if(2===t.length)return".".concat(t,"0")}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?".".concat(t):":".concat(t)})).join("")}return"WEBVTT\n\n".concat(t.split(/\r?\n/).map((function(t){var n=t.match(e);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(t){return t.trim()})).join("\n")}:null})).filter((function(t){return t})).map((function(t,e){return t?"".concat(e+1,"\n").concat(t.start," --\x3e ").concat(t.end,"\n").concat(t.text):""})).filter((function(t){return t.trim()})).join("\n\n"))}function It(t){return t.includes("?")?It(t.split("?")[0]):t.includes("#")?It(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function Ft(t,e){var r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r),r.click(),document.body.removeChild(r)}var Nt=function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e1?e-1:0),n=1;n0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(e){return setTimeout(e,t)}))}function Qt(t,e,r){var n;function o(){for(var o=arguments.length,i=new Array(o),a=0;a0?[e,r,n]:[r,n]).map((function(t){return t<10?"0".concat(t):String(t)})).join(":")}function ee(t){return t.replace(/[&<>'"]/g,(function(t){return{"&":"&","<":"<",">":">","'":"'",'"':"""}[t]||t}))}var re=Object.freeze({__proto__:null,query:vt,queryAll:gt,addClass:wt,removeClass:xt,hasClass:Ot,append:kt,remove:function(t){return t.parentNode.removeChild(t)},setStyle:jt,setStyles:Pt,getStyle:St,sublings:Et,inverseClass:Rt,tooltip:$t,isInViewport:Ct,includeFromEvent:Dt,ArtPlayerError:zt,errorHandle:_t,srtToVtt:Lt,vttToBlob:Mt,assToVtt:qt,getExt:It,download:Ft,def:Bt,has:Yt,proxyPropertys:Xt,mergeDeep:Jt,sleep:Zt,debounce:Qt,throttle:Gt,clamp:Kt,secondToTime:te,escape:ee,userAgent:ht,isMobile:yt,isSafari:bt,isWechat:mt});function ne(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function oe(t,e,r){return _t("string"===e||t instanceof Element,"".concat(r.join(".")," require 'string' or 'Element' type"))}var ie={html:oe,disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined",selector:"array|undefined",onSelect:"function|undefined"},ae={container:oe,url:"string",poster:"string",title:"string",theme:"string",lang:"string",volume:"number",isLive:"boolean",muted:"boolean",autoplay:"boolean",autoSize:"boolean",autoMini:"boolean",loop:"boolean",flip:"boolean",playbackRate:"boolean",aspectRatio:"boolean",screenshot:"boolean",setting:"boolean",hotkey:"boolean",pip:"boolean",mutex:"boolean",light:"boolean",backdrop:"boolean",fullscreen:"boolean",fullscreenWeb:"boolean",subtitleOffset:"boolean",miniProgressBar:"boolean",localVideo:"boolean",localSubtitle:"boolean",networkMonitor:"boolean",plugins:["function"],whitelist:["string|function|regexp"],layers:[ie],contextmenu:[ie],controls:[function(t){for(var e=1;e-1;case"function":return t(e.userAgent);case"regexp":return t.test(e.userAgent);default:return!1}}))},se=function(){function t(e){var r=this;i(this,t),this.art=e,e.option.container instanceof Element?this.$container=e.option.container:(this.$container=vt(e.option.container),_t(this.$container,"No container element found by ".concat(e.option.container))),_t(e.constructor.instances.every((function(t){return t.template.$container!==r.$container})),"Cannot mount multiple instances on the same dom element"),_t(this.$container.clientWidth&&this.$container.clientHeight,"The width and height of the container cannot be 0"),e.whitelist.state?this.desktop():this.mobile()}return c(t,[{key:"query",value:function(t){return vt(t,this.$container)}},{key:"desktop",value:function(){var t=this.art.option,e=t.theme,r=t.backdrop;this.$container.innerHTML='
Player version:
3.5.13
Video url:
Video volume:
Video time:
Video duration:
Video resolution:
x
[x]
xD7
'),this.$undercover=this.query(".art-undercover"),this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video"),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.$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.$settingInner=this.query(".art-setting-inner"),this.$settingBody=this.query(".art-setting-body"),this.$info=this.query(".art-info"),this.$infoPanel=this.query(".art-info-panel"),this.$infoClose=this.query(".art-info-close"),this.$miniHeader=this.query(".art-mini-header"),this.$miniTitle=this.query(".art-mini-title"),this.$miniClose=this.query(".art-mini-close"),this.$contextmenu=this.query(".art-contextmenus"),r&&(wt(this.$settingInner,"art-backdrop-filter"),wt(this.$info,"art-backdrop-filter"),wt(this.$contextmenu,"art-backdrop-filter")),this.art.isMobile&&wt(this.$container,"art-mobile")}},{key:"mobile",value:function(){this.$container.innerHTML='
',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}},{key:"destroy",value:function(t){t?this.$container.innerHTML="":wt(this.$player,"art-destroy")}}]),t}(),ue={"Video info":"视频统计信息",Close:"关闭","Light Off":"关灯","Light On":"开灯","Video load failed":"视频加载失败",Volume:"音量",Play:"播放",Pause:"暂停",Rate:"速度",Mute:"静音",Flip:"视频翻转",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新连接","Hide subtitle":"隐藏字幕","Show subtitle":"显示字幕","Hide danmu":"隐藏弹幕","Show danmu":"显示弹幕","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":"不支持画中画模式","Local Subtitle":"本地字幕","Local Video":"本地视频","Subtitle offset time":"字幕偏移时间","No subtitles found":"未发现字幕"},pe={"Video info":"影片統計訊息",Close:"關閉","Light Off":"關燈","Light On":"開燈","Video load failed":"影片載入失敗",Volume:"音量",Play:"播放",Pause:"暫停",Rate:"速度",Mute:"靜音",Flip:"影片翻轉",Horizontal:"水平",Vertical:"垂直",Reconnect:"重新連接","Hide subtitle":"隱藏字幕","Show subtitle":"顯示字幕","Hide danmu":"隱藏彈幕","Show danmu":"顯示彈幕","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":"不支持畫中畫模式","Local Subtitle":"本地字幕","Local Video":"本地視頻","Subtitle offset time":"字幕偏移時間","No subtitles found":"未發現字幕"},fe=function(){function t(e){i(this,t),this.art=e,this.languages={"zh-cn":ue,"zh-tw":pe},this.init()}return c(t,[{key:"init",value:function(){var t=this.art.option.lang.toLowerCase();this.language=this.languages[t]||{}}},{key:"get",value:function(t){return this.language[t]||t}},{key:"update",value:function(t){this.languages=Jt(this.languages,t),this.init()}}]),t}();var de=n((function(t){!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},r=t.exports,n=function(){for(var t,r=[["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"]],n=0,o=r.length,i={};nh){var y=h*u/s;jt(n,"width","".concat(100*y,"%")),jt(n,"height","100%"),jt(n,"padding","0 ".concat((p-p*y)/2,"px"))}else{var b=s/h/u;jt(n,"width","100%"),jt(n,"height","".concat(100*b,"%")),jt(n,"padding","".concat((f-f*b)/2,"px 0"))}}o.dataset.aspectRatio=r,a.show="".concat(i.get("Aspect ratio"),": ").concat("default"===r?i.get("Default"):r),t.emit("aspectRatio",r)}else e.aspectRatio&&(jt(n,"width",null),jt(n,"height",null),jt(n,"padding",null),delete o.dataset.aspectRatio,t.emit("aspectRatio"))}}),Bt(e,"aspectRatioReset",{set:function(t){if(t&&e.aspectRatio){var r=e.aspectRatio;e.aspectRatio=r}}})}(e,this),function(t,e){var r=t.option,n=t.notice,o=t.template.$video,i=document.createElement("canvas");Bt(e,"getDataURL",{value:function(){return new Promise((function(t,e){try{i.width=o.videoWidth,i.height=o.videoHeight,i.getContext("2d").drawImage(o,0,0),t(i.toDataURL("image/png"))}catch(t){n.show=t,e(t)}}))}}),Bt(e,"getBlobUrl",{value:function(){return new Promise((function(t,e){try{i.width=o.videoWidth,i.height=o.videoHeight,i.getContext("2d").drawImage(o,0,0),i.toBlob((function(e){t(URL.createObjectURL(e))}))}catch(t){n.show=t,e(t)}}))}}),Bt(e,"screenshot",{value:function(){e.getDataURL().then((function(e){Ft(e,"".concat(r.title||"artplayer","_").concat(te(o.currentTime),".png")),t.emit("screenshot",e)}))}})}(e,this),function(t,e){var r=t.template.$player;Bt(e,"fullscreen",{get:function(){return de.isFullscreen},set:function(n){n?de.request(r).then((function(){wt(r,"art-fullscreen"),e.aspectRatioReset=!0,t.emit("resize"),t.emit("fullscreen",!0)})):de.exit().then((function(){xt(r,"art-fullscreen"),e.aspectRatioReset=!0,e.autoSize=t.option.autoSize,t.emit("resize"),t.emit("fullscreen")}))}}),Bt(e,"fullscreenToggle",{set:function(t){t&&(e.fullscreen=!e.fullscreen)}})}(e,this),function(t,e){var r=t.template.$player;Bt(e,"fullscreenWeb",{get:function(){return Ot(r,"art-fullscreen-web")},set:function(n){n?(wt(r,"art-fullscreen-web"),e.aspectRatioReset=!0,t.emit("resize"),t.emit("fullscreenWeb",!0)):(xt(r,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=t.option.autoSize,t.emit("resize"),t.emit("fullscreenWeb"))}}),Bt(e,"fullscreenWebToggle",{set:function(t){t&&(e.fullscreenWeb=!e.fullscreenWeb)}})}(e,this),function(t,e){var r=t.template,n=r.$container,o=r.$player;Bt(e,"fullscreenRotate",{get:function(){return Ot(n,"art-fullscreen-rotate")},set:function(r){if(r){wt(n,"art-fullscreen-rotate"),e.autoSize=!0;var i=document.body,a=i.clientHeight,c=i.clientWidth,l=o.clientHeight,s=o.clientWidth;if(c/a0&&!r.paused&&!r.ended&&r.readyState>2)}})}(e,this),function(t,e){var r=t.template,n=r.$container,o=r.$player,i=r.$video;Bt(e,"autoSize",{get:function(){return Ot(n,"art-auto-size")},set:function(r){if(r){var a=i.videoWidth,c=i.videoHeight,l=n.getBoundingClientRect(),s=l.width,u=l.height,p=a/c,f=s/u;if(wt(n,"art-auto-size"),f>p){jt(o,"width","".concat(u*p/s*100,"%")),jt(o,"height","100%")}else{var d=s/p/u*100;jt(o,"width","100%"),jt(o,"height","".concat(d,"%"))}t.emit("autoSize",{width:e.width,height:e.height})}else xt(n,"art-auto-size"),jt(o,"width",null),jt(o,"height",null),t.emit("autoSize")}})}(e,this),function(t,e){Bt(e,"rect",{get:function(){return t.template.$player.getBoundingClientRect()}}),["bottom","height","left","right","top","width"].forEach((function(t){Bt(e,t,{get:function(){return e.rect[t]}})})),Bt(e,"x",{get:function(){return e.left+window.pageXOffset}}),Bt(e,"y",{get:function(){return e.top+window.pageYOffset}})}(e,this),function(t,e){var r=t.template.$player;Bt(e,"flip",{get:function(){return r.dataset.flip},set:function(e){if(e){var n=["normal","horizontal","vertical"];_t(n.includes(e),"'flip' only accept ".concat(n.toString()," as parameters")),r.dataset.flip=e,t.emit("flip",e)}else delete r.dataset.flip,t.emit("flip")}})}(e,this),function(t,e){var r=t.template.$undercover;Bt(e,"light",{get:function(){return"none"!==St(r,"display",!1)},set:function(e){jt(r,"display",e?"block":"none"),t.emit("light",e)}})}(e,this),function(t,e){var r=t.i18n,n=t.option,o=t.storage,i=t.events.proxy,a=t.template,c=a.$player,l=a.$miniClose,s=a.$miniTitle,u=a.$miniHeader,p="",f=!1,d=0,h=0,y=0,b=0;i(u,"mousedown",(function(t){f=!0,d=t.pageX,h=t.pageY,y=e.left,b=e.top})),i(document,"mousemove",(function(t){if(f){wt(c,"art-is-dragging");var e=b+t.pageY-h,r=y+t.pageX-d;jt(c,"top","".concat(e,"px")),jt(c,"left","".concat(r,"px")),o.set("top",e),o.set("left",r)}})),i(document,"mouseup",(function(){f=!1,xt(c,"art-is-dragging")})),i(l,"click",(function(){e.mini=!1,f=!1,xt(c,"art-is-dragging")})),kt(s,n.title||r.get("Mini player")),Bt(e,"mini",{get:function(){return Ot(c,"art-mini")},set:function(r){if(r){e.autoSize=!1,p=c.style.cssText,wt(c,"art-mini");var i=o.get("top"),a=o.get("left");if(i&&a)jt(c,"top","".concat(i,"px")),jt(c,"left","".concat(a,"px")),Ct(u)||(o.del("top"),o.del("left"),e.mini=!0);else{var l=document.body,s=l.clientHeight-e.height-50,f=l.clientWidth-e.width-50;o.set("top",s),o.set("left",f),jt(c,"top","".concat(s,"px")),jt(c,"left","".concat(f,"px"))}e.aspectRatio=!1,e.playbackRate=!1,t.emit("mini",!0)}else c.style.cssText=p,xt(c,"art-mini"),jt(c,"top",null),jt(c,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=n.autoSize,t.emit("mini")}}),Bt(e,"miniToggle",{set:function(t){t&&(e.mini=!e.mini)}})}(e,this),function(t,e){var r=[];Bt(e,"loop",{get:function(){return r},set:function(n){if(Array.isArray(n)&&"number"==typeof n[0]&&"number"==typeof n[1]){var o=Kt(n[0],0,Math.min(n[1],e.duration)),i=Kt(n[1],o,e.duration);i-o>=1?(r=[o,i],t.emit("loop",r)):(r=[],t.emit("loop"))}else r=[],t.emit("loop")}}),t.on("video:timeupdate",(function(){r.length&&(e.currentTimer[1])&&(e.seek=r[0])}))}(e,this),Xt(e,this)};var be=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t},me=n((function(t){function e(r,n,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,r){var n=be(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(r):o.value}},e(r,n,o||r)}t.exports=e})),ve=function(){function t(e){i(this,t),this.id=0,this.art=e,this.add=this.add.bind(this)}return c(t,[{key:"add",value:function(t){var e=this,r="function"==typeof t?t(this.art):t;if(this.$parent&&this.name&&!r.disable){var n=r.name||"".concat(this.name).concat(this.id);_t(!Yt(this,n),"Cannot add an existing name [".concat(n,"] to the [").concat(this.name,"]")),this.id+=1;var o=document.createElement("div");wt(o,"art-".concat(this.name)),wt(o,"art-".concat(this.name,"-").concat(n));var i=Array.from(this.$parent.children);o.dataset.index=r.index||this.id;var a=i.find((function(t){return Number(t.dataset.index)>=Number(o.dataset.index)}));a?a.insertAdjacentElement("beforebegin",o):kt(this.$parent,o),r.html&&kt(o,r.html),r.style&&Pt(o,r.style),r.tooltip&&$t(o,r.tooltip),r.click&&this.art.events.proxy(o,"click",(function(t){t.preventDefault(),r.click.call(e.art,e,t)})),r.selector&&["left","right"].includes(r.position)&&this.selector(r,o),r.mounted&&r.mounted.call(this.art,o),1===o.childNodes.length&&3===o.childNodes[0].nodeType&&wt(o,"art-control-onlyText")}}},{key:"selector",value:function(t,e){var r=this,n=this.art.events,o=n.hover,i=n.proxy;wt(e,"art-control-selector");var a=document.createElement("div");wt(a,"art-selector-value"),kt(a,t.html),e.innerText="",kt(e,a);var c=t.selector.map((function(t){return'
'.concat(t.name,"
")})).join(""),l=document.createElement("div");wt(l,"art-selector-list"),kt(l,c),kt(e,l);var s=function(){l.style.left="-".concat(St(l,"width")/2-St(e,"width")/2,"px")};o(e,s),i(e,"click",(function(e){if(Ot(e.target,"art-selector-item")){var n=e.target.innerText;if(a.innerText===n)return;var o=t.selector.find((function(t){return t.name===n}));a.innerText=n,s(),o&&(t.onSelect&&t.onSelect.call(r.art,o),r.art.emit("selector",o))}}))}},{key:"show",get:function(){return Ot(this.art.template.$player,"art-".concat(this.name,"-show"))},set:function(t){var e=this.art.template.$player,r="art-".concat(this.name,"-show");t?wt(e,r):xt(e,r),this.art.emit(this.name,t)}},{key:"toggle",set:function(t){t&&(this.show=!this.show)}}]),t}();function ge(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function we(t){return function(e){return function(t){for(var e=1;e
'),mounted:function(t){var r=!1,n=vt(".art-progress-loaded",t),i=vt(".art-progress-played",t),l=vt(".art-progress-highlight",t),s=vt(".art-progress-indicator",t),u=vt(".art-progress-tip",t);function p(t,e){"loaded"===t&&jt(n,"width","".concat(100*e,"%")),"played"===t&&(jt(i,"width","".concat(100*e,"%")),jt(s,"left","calc(".concat(100*e,"% - ").concat(St(s,"width")/2,"px)")))}o.forEach((function(t){var e=Kt(t.time,0,c.duration)/c.duration*100;kt(l,''))})),p("loaded",c.loaded),e.on("video:progress",(function(){p("loaded",c.loaded)})),e.on("video:timeupdate",(function(){p("played",c.played)})),e.on("video:ended",(function(){p("played",1)})),a(t,"mousemove",(function(r){jt(u,"display","block"),Dt(r,l)?function(r){var n=Re(e,r).width,o=r.target.dataset.text;u.innerHTML=o;var i=u.clientWidth;n<=i/2?jt(u,"left",0):n>t.clientWidth-i/2?jt(u,"left","".concat(t.clientWidth-i,"px")):jt(u,"left","".concat(n-i/2,"px"))}(r):function(r){var n=Re(e,r),o=n.width,i=n.time;u.innerHTML=i;var a=u.clientWidth;o<=a/2?jt(u,"left",0):o>t.clientWidth-a/2?jt(u,"left","".concat(t.clientWidth-a,"px")):jt(u,"left","".concat(o-a/2,"px"))}(r)})),a(t,"mouseout",(function(){jt(u,"display","none")})),a(t,"click",(function(t){if(t.target!==s){var r=Re(e,t),n=r.second;p("played",r.percentage),c.seek=n}})),a(s,"mousedown",(function(){r=!0})),a(document,"mousemove",(function(t){if(r){var n=Re(e,t),o=n.second,i=n.percentage;wt(s,"art-show-indicator"),p("played",i),c.seek=o}})),a(document,"mouseup",(function(){r&&(r=!1,xt(s,"art-show-indicator"))}))}})}}function Ce(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function De(t){return function(e){return function(t){for(var e=1;e'),u=kt(s,'
');function p(t){var e=s.getBoundingClientRect().left;return Kt(t.pageX-e-6,0,54)/48}function f(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.7;if(o.muted||0===t)jt(c,"display","none"),jt(l,"display","flex"),jt(u,"left","0");else{var e=48*t;jt(c,"display","flex"),jt(l,"display","none"),jt(u,"left","".concat(e,"px"))}}$t(c,i.get("Mute")),jt(l,"display","none"),e.isMobile&&jt(s,"display","none"),f(o.volume),e.on("video:volumechange",(function(){f(o.volume)})),r(c,"click",(function(){o.muted=!0})),r(l,"click",(function(){o.muted=!1})),r(s,"click",(function(t){o.muted=!1,o.volume=p(t)})),r(u,"mousedown",(function(){a=!0})),r(t,"mousemove",(function(t){a&&(o.muted=!1,o.volume=p(t))})),r(document,"mouseup",(function(){a&&(a=!1)}))}})}}function Le(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Me(t){return function(e){return function(t){for(var e=1;en.clientWidth-l/2?jt(t,"left","".concat(n.clientWidth-l,"px")):jt(t,"left","".concat(i-l/2,"px"))}(o))})),i(n,"mouseout",(function(){jt(t,"display","none")}))}})}}function Fe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ne(t){return function(e){return function(t){for(var e=1;e'),o=kt(t,'');e.on("loop",(function(e){e?(jt(t,"display","block"),jt(n,"left","calc(".concat(e[0]/r.duration*100,"% - ").concat(n.clientWidth,"px)")),jt(o,"left","".concat(e[1]/r.duration*100,"%"))):jt(t,"display","none")}))}})}}var Ue=function(t){function e(t){var r;i(this,e),(r=s(this,u(e).call(this,t))).name="control";var n=t.option,o=t.player,a=t.template.$player;return r.delayHide=Qt((function(){o.playing&&r.show&&(wt(a,"art-hide-cursor"),xt(a,"art-hover"),r.show=!1)}),3e3),r.cancelDelayHide=r.delayHide.clearTimeout,t.once("ready",(function(){r.add($e({name:"progress",disable:n.isLive,position:"top",index:10})),r.add(Ie({name:"thumbnails",disable:!n.thumbnails.url||n.isLive,position:"top",index:20})),r.add(Be({name:"loop",disable:!1,position:"top",index:30})),r.add(Se({name:"playAndPause",disable:!1,position:"left",index:10})),r.add(_e({name:"volume",disable:!1,position:"left",index:20})),r.add(Ae({name:"time",disable:n.isLive,position:"left",index:30})),r.add(Ve({name:"quality",disable:0===n.quality.length,position:"right",index:10})),r.add(Ne({name:"screenshot",disable:!n.screenshot,position:"right",index:20})),r.add(De({name:"subtitle",disable:!n.subtitle.url,position:"right",index:30})),r.add(Me({name:"setting",disable:!n.setting,position:"right",index:40})),r.add(je({name:"pip",disable:!n.pip,position:"right",index:50})),r.add(Oe({name:"fullscreenWeb",disable:!n.fullscreenWeb,position:"right",index:60})),r.add(we({name:"fullscreen",disable:!n.fullscreen,position:"right",index:70})),n.controls.forEach((function(t){r.add(t)}))})),r}return f(e,t),c(e,[{key:"add",value:function(t){var r="function"==typeof t?t(this.art):t,n=this.art.template,o=n.$progress,i=n.$controlsLeft,a=n.$controlsRight;switch(r.position){case"top":this.$parent=o;break;case"left":this.$parent=i;break;case"right":this.$parent=a;break;default:_t(!1,"Control option.position must one of 'top', 'left', 'right'")}me(u(e.prototype),"add",this).call(this,r)}}]),e}(ve);function Ye(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Xe(t){return function(e){var n=e.i18n,o=e.player;return function(t){for(var e=1;e0.50.75').concat(n.get("Normal"),'1.251.52.0'),click:function(t,e){var r=e.target.dataset.rate;r&&(o.playbackRate=Number(r),t.show=!1)},mounted:function(t){e.on("playbackRate",(function(e){var r=gt("span",t).find((function(t){return Number(t.dataset.rate)===e}));r&&Rt(r,"art-current")}))}})}}function Je(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ze(t){return function(e){var n=e.i18n,o=e.player;return function(t){for(var e=1;e').concat(n.get("Default"),'4:316:9'),click:function(t,e){var r=e.target.dataset.ratio;r&&(o.aspectRatio=r,t.show=!1)},mounted:function(t){e.on("aspectRatio",(function(e){var r=gt("span",t).find((function(t){return t.dataset.ratio===e}));r&&Rt(r,"art-current")}))}})}}function Qe(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Ge(t){return function(e){return function(t){for(var e=1;eArtPlayer 3.5.13'})}function er(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function rr(t){return function(e){var n=e.i18n,o=e.player;return function(t){for(var e=1;es+l&&(h=l-d),n+f>u+i&&(y=i-f),Pt(c,{top:"".concat(y,"px"),left:"".concat(h,"px")})})),l(a,"click",(function(t){Dt(t,c)||(r.show=!1)})),t.on("blur",(function(){r.show=!1}))})),r}return f(e,t),e}(ve),ar=function(t){function e(t){var r;i(this,e),(r=s(this,u(e).call(this,t))).name="info";var n=t.template,o=n.$infoPanel,a=n.$infoClose,c=n.$video;(0,t.events.proxy)(a,"click",(function(){r.show=!1}));var l=null,p=gt("[data-video]",o);return t.on("destroy",(function(){clearTimeout(l)})),t.on("info",(function(t){clearTimeout(l),t&&function t(){p.forEach((function(t){var e=c[t.dataset.video];t.innerText="number"==typeof e?e.toFixed(2):e})),l=setTimeout((function(){t()}),1e3)}()})),r}return f(e,t),e}(ve),cr=function(t){function e(t){var r;i(this,e),(r=s(this,u(e).call(this,t))).name="subtitle";var n=t.option.subtitle;return Pt(t.template.$subtitle,n.style),n.url&&r.init(n.url),r}return f(e,t),c(e,[{key:"update",value:function(){var t=this.art.template.$subtitle;t.innerHTML="",this.activeCue&&(t.innerHTML=this.activeCue.text.split(/\r?\n/).map((function(t){return"

".concat(ee(t),"

")})).join(""),this.art.emit("subtitleUpdate",this.activeCue.text))}},{key:"switch",value:function(t,e,r){var n=this,o=this.art,i=o.i18n,a=o.notice;return this.init(t,r).then((function(t){return e&&(a.show="".concat(i.get("Switch subtitle"),": ").concat(e)),n.art.emit("subtitleSwitch",t),t}))}},{key:"init",value:function(t,e){var r=this,n=this.art,o=n.notice,i=n.events.proxy,a=n.template,c=a.$subtitle,l=a.$video;if(!a.$track){var s=document.createElement("track");s.default=!0,s.kind="metadata",l.appendChild(s),this.art.template.$track=s,i(this.textTrack,"cuechange",this.update.bind(this))}return fetch(t).then((function(t){return t.text()})).then((function(n){switch(r.art.emit("subtitleLoad",t),e||It(t)){case"srt":return Mt(Lt(n));case"ass":return Mt(qt(n));case"vtt":return Mt(n);default:return t}})).then((function(t){return c.innerHTML="",r.url===t||(URL.revokeObjectURL(r.url),r.art.template.$track.src=t),t})).catch((function(t){throw o.show=t,t}))}},{key:"url",get:function(){return this.art.template.$track.src}},{key:"textTrack",get:function(){return this.art.template.$video.textTracks[0]}},{key:"activeCue",get:function(){return this.textTrack.activeCues[0]}}]),e}(ve);var lr=function(){function t(e){var r=this;i(this,t),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),e.whitelist.state&&e.once("ready",(function(){!function(t,e){var r=t.controls,n=t.template.$player;e.proxy(document,["click","contextmenu"],(function(e){Dt(e,n)?(t.isFocus=!0,t.emit("focus")):(t.isFocus=!1,t.emit("blur"))})),t.on("blur",(function(){r.delayHide()}))}(e,r),function(t,e){var r=t.controls,n=t.template.$player;e.hover(n,(function(){wt(n,"art-hover"),t.emit("hover",!0)}),(function(){xt(n,"art-hover"),t.emit("hover")})),t.on("hover",(function(t){t||r.delayHide()}))}(e,r),function(t,e){var r=t.template,n=r.$player,o=r.$video,i=t.player,a=t.controls;e.proxy(n,"mousemove",(function(e){t.emit("mousemove",e)})),t.on("mousemove",(function(t){a.cancelDelayHide(),xt(n,"art-hide-cursor"),a.show=!0,i.pip||t.target!==o||a.delayHide()}))}(e,r),function(t,e){var r=t.option,n=t.player,o=Gt((function(){n.normal&&(n.autoSize=r.autoSize),n.aspectRatioReset=!0,t.emit("resize")}),500);e.proxy(window,["orientationchange","resize"],(function(){o()}))}(e,r),function(t,e){if(t.isMobile&&!t.option.isLive){var r=t.player,n=t.notice,o=t.template.$video,i=!1,a=0,c=0;e.proxy(o,"touchstart",(function(t){1===t.touches.length&&(i=!0,a=t.touches[0].clientX)})),e.proxy(document,"touchmove",(function(t){if(1===t.touches.length&&i){var e=Kt((t.touches[0].clientX-a)/o.clientWidth,-1,1);c=Kt(r.currentTime+60*e,0,r.duration),n.show="".concat(te(c)," / ").concat(te(r.duration))}})),e.proxy(document,"touchend",(function(){i&&c&&(r.seek=c),i=!1,a=0,c=0}))}}(e,r),function(t,e){var r=t.player,n=t.option.autoMini,o=t.template.$container,i=Qt((function(){t.emit("view",Ct(o))}),200);e.proxy(window,"scroll",(function(){i()})),t.on("view",(function(t){n&&(r.mini=!t)}))}(e,r)}))}return c(t,[{key:"proxy",value:function(t,e,r){var n=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(e))return e.map((function(e){return n.proxy(t,e,r,o)}));t.addEventListener(e,r,o);var i=function(){return t.removeEventListener(e,r,o)};return this.destroyEvents.push(i),i}},{key:"hover",value:function(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}},{key:"loadImg",value:function(t){var e=this;return new Promise((function(r,n){var o;if(t instanceof HTMLImageElement)o=t;else{if("string"!=typeof t)return n(t);(o=new Image).src=t}return o.complete?r(o):(e.proxy(o,"load",(function(){return r(o)})),e.proxy(o,"error",(function(){return n(o)})),t)}))}},{key:"destroy",value:function(){this.destroyEvents.forEach((function(t){return t()}))}}]),t}(),sr=function(){function t(e){var r=this;i(this,t),this.keys={};var n=e.option,o=e.player,a=e.events.proxy;n.hotkey&&e.once("ready",(function(){r.add(27,(function(){o.fullscreenWeb&&(o.fullscreenWeb=!1)})),r.add(32,(function(){o.toggle=!0})),r.add(37,(function(){o.backward=5})),r.add(38,(function(){o.volume+=.1})),r.add(39,(function(){o.forward=5})),r.add(40,(function(){o.volume-=.1})),a(window,"keydown",(function(t){if(e.isFocus){var n=document.activeElement.tagName.toUpperCase(),o=document.activeElement.getAttribute("contenteditable");if("INPUT"!==n&&"TEXTAREA"!==n&&""!==o&&"true"!==o){var i=r.keys[t.keyCode];i&&(t.preventDefault(),i.forEach((function(t){return t()})),e.emit("hotkey",t))}}}))}))}return c(t,[{key:"add",value:function(t,e){this.keys[t]?this.keys[t].push(e):this.keys[t]=[e]}}]),t}(),ur=function(t){function e(t){var r;return i(this,e),(r=s(this,u(e).call(this,t))).name="layer",r.$parent=t.template.$layer,t.once("ready",(function(){t.option.layers.forEach((function(t){r.add(t)}))})),r}return f(e,t),e}(ve),pr=function(t){function e(t){var r;return i(this,e),(r=s(this,u(e).call(this,t))).name="loading",kt(t.template.$loading,t.icons.loading),r}return f(e,t),e}(ve),fr=function(){function t(e){i(this,t),this.art=e,this.time=2e3,this.timer=null}return c(t,[{key:"show",set:function(t){var e=this.art.template,r=e.$player,n=e.$noticeInner;n.innerText=t instanceof Error?t.message.trim():t,wt(r,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout((function(){n.innerText="",xt(r,"art-notice-show")}),this.time)}}]),t}(),dr=function(t){function e(t){var r;return i(this,e),(r=s(this,u(e).call(this,t))).name="mask",kt(t.template.$state,t.icons.state),r}return f(e,t),e}(ve);function hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}var yr=function t(e){var n=this;i(this,t);var o=function(t){for(var e=1;e',state:'',play:'',pause:'',volume:'',volumeClose:'',subtitle:'',screenshot:'\t',setting:'',fullscreen:'\t\t\t\t',fullscreenWeb:'\t',pip:''},e.option.icons);Object.keys(o).forEach((function(t){var e=document.createElement("i");e.classList.add("art-icon"),e.classList.add("art-icon-".concat(t)),kt(e,o[t]),n[t]=e}))};function br(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function mr(t){return function(e){var n=e.i18n,o=e.player;return function(t){for(var e=1;e'.concat(n.get("Flip"),'
"),click:function(t,e){var r=e.target.dataset.value;r&&(o.flip=r)},mounted:function(t){e.on("flip",(function(e){var r=gt("button",t).find((function(t){return t.dataset.value===e}));r&&Rt(r.parentElement,"current")}))}})}}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gr(t){return function(e){var n=e.i18n,o=e.player;return function(t){for(var e=1;e'.concat(n.get("Aspect ratio"),'
'),click:function(t,e){var r=e.target.dataset.value;r&&(o.aspectRatio=r)},mounted:function(t){e.on("aspectRatio",(function(e){var r=gt("button",t).find((function(t){return t.dataset.value===e}));r&&Rt(r.parentElement,"current")}))}})}}function wr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function xr(t){return function(e){var n=e.i18n,o=e.player,i=e.events.proxy;return function(t){for(var e=1;e'.concat(n.get("Play speed"),': 1.0x
'),mounted:function(t){var r=vt(".art-setting-range input",t),n=vt(".art-subtitle-value",t);i(r,"change",(function(){var t=r.value;n.innerText=t,o.playbackRate=Number(t)})),e.on("playbackRate",(function(t){t&&r.value!==t&&(r.value=t,n.innerText=t)}))}})}}var Or=function(t){function e(t){var r;i(this,e),(r=s(this,u(e).call(this,t))).name="setting";var n=t.option,o=t.template,a=o.$setting,c=o.$settingBody,l=t.events.proxy;return r.$parent=c,n.setting&&(t.once("ready",(function(){l(a,"click",(function(t){t.target===a&&(r.show=!1)})),r.add(mr({disable:!n.flip,name:"flip"})),r.add(gr({disable:!n.aspectRatio,name:"aspectRatio"})),r.add(xr({disable:!n.playbackRate,name:"playbackRate"}))})),t.on("blur",(function(){r.show=!1}))),r}return f(e,t),e}(ve),kr=function(){function t(){i(this,t),this.name="artplayer_settings"}return c(t,[{key:"get",value:function(t){var e=JSON.parse(localStorage.getItem(this.name))||{};return t?e[t]:e}},{key:"set",value:function(t,e){var n=Object.assign({},this.get(),r({},t,e));localStorage.setItem(this.name,JSON.stringify(n))}},{key:"del",value:function(t){var e=this.get();delete e[t],localStorage.setItem(this.name,JSON.stringify(e))}},{key:"clean",value:function(){localStorage.removeItem(this.name)}}]),t}();function jr(t){var e=t.i18n,r=t.subtitle,n=t.events.proxy;return{title:"Subtitle",name:"subtitleOffset",index:20,html:'
'.concat(e.get("Subtitle offset time"),': 0s
'),mounted:function(e){var o=vt(".art-setting-range input",e),i=vt(".art-subtitle-value",e);n(o,"change",(function(){var e=o.value;i.innerText=e,t.plugins.subtitleOffset.offset(Number(e))})),t.on("subtitle:switch",(function(){o.value=0,i.innerText=0})),t.on("subtitleOffset",(function(t){r.update(),o.value!==t&&(o.value=t,i.innerText=t)}))}}}function Pr(t){var e=t.constructor.utils.clamp,r=t.setting,n=t.notice,o=t.template,i=t.i18n,a=t.player;r.add(jr);var c=[];return t.on("subtitle:switch",(function(){c=[]})),{name:"subtitleOffset",offset:function(r){if(o.$track&&o.$track.track){var l=Array.from(o.$track.track.cues),s=e(r,-5,5);l.forEach((function(t,r){c[r]||(c[r]={startTime:t.startTime,endTime:t.endTime}),t.startTime=e(c[r].startTime+s,0,a.duration),t.endTime=e(c[r].endTime+s,0,a.duration)})),n.show="".concat(i.get("Subtitle offset time"),": ").concat(r,"s"),t.emit("subtitleOffset",r)}else n.show="".concat(i.get("No subtitles found")),t.emit("subtitleOffset",0)}}}function Sr(t){var e=t.events.proxy,r=t.template,n=t.player,o=t.option,i=t.setting,a=t.i18n;function c(e){if(e){var i=r.$video.canPlayType(e.type);if("maybe"===i||"probably"===i){var a=URL.createObjectURL(e);o.title=e.name,n.switchUrl(a,e.name),t.emit("localVideo",e)}else _t(!1,"Playback of this file format is not supported")}}function l(t){var r=kt(t,'');jt(t,"position","relative"),Pt(r,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),e(r,"change",(function(){c(r.files[0])}))}return e(r.$player,"dragover",(function(t){t.preventDefault()})),e(r.$player,"drop",(function(t){t.preventDefault(),c(t.dataTransfer.files[0])})),t.once("ready",(function(){i.add({title:"Local Video",name:"localVideo",index:30,html:'
'.concat(a.get("Local Video"),'
').concat(a.get("Open"),'
'),mounted:function(e){var r=vt(".art-upload-btn",e),n=vt(".art-upload-value",e);t.on("localVideo",(function(t){n.textContent=t.name,n.title=t.name})),l(r)}})})),{name:"localVideo",attach:l}}function Er(t){var e=t.events.proxy,r=t.subtitle,n=t.setting,o=t.i18n;function i(n){var o=kt(n,'');jt(n,"position","relative"),Pt(o,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),e(o,"change",(function(){!function(e){if(e){var n=It(e.name);if(["ass","vtt","srt"].includes(n)){var o=URL.createObjectURL(e);r.switch(o,e.name,n),t.emit("localSubtitle",e)}else _t(!1,"Only supports subtitle files in .ass, .vtt and .srt format")}}(o.files[0])}))}return t.once("ready",(function(){n.add({title:"Local Subtitle",name:"localSubtitle",index:40,html:'
'.concat(o.get("Local Subtitle"),'
').concat(o.get("Open"),'
'),mounted:function(e){var r=vt(".art-upload-btn",e),n=vt(".art-upload-value",e);t.on("localSubtitle",(function(t){n.textContent=t.name,n.title=t.name})),i(r)}})})),{name:"localSubtitle",attach:i}}function Rr(t){var e=t.layers,r=t.player,n=t.option.theme;return e.add({name:"miniProgressBar",style:{display:"none",position:"absolute",left:0,right:0,bottom:0,height:"2px",background:n},mounted:function(e){t.on("control",(function(t){e.style.display=t?"none":"block"})),t.on("destroy",(function(){e.style.display="none"})),t.on("video:timeupdate",(function(){e.style.width="".concat(100*r.played,"%")}))}}),{name:"miniProgressBar"}}function $r(t){var e=1e4,r=0,n=0,o=0,i=null;function a(){r=0,n=0,o=0,cancelAnimationFrame(i),i=null}function c(){i||function a(){t.isDestroy||(i=requestAnimationFrame((function(){var i=Date.now();if(o){var c=i-o;n+=c,t.player.playing||(r+=c)}o=i,t.emit("networkMonitor",r/n),n>=e&&(r=0,n=0),a()})))}()}return t.on("play",c),t.on("pause",a),{name:"networkMonitor",reset:a,start:c,sample:function(t){e=t}}}var Cr=function(){function t(e){var r=this;i(this,t),this.art=e,this.id=0;var n=e.option;n.subtitle.url&&n.subtitleOffset&&this.add(Pr),!n.isLive&&n.miniProgressBar&&this.add(Rr),n.localVideo&&this.add(Sr),n.localSubtitle&&this.add(Er),n.networkMonitor&&this.add($r),e.option.plugins.forEach((function(t){r.add(t)}))}return c(t,[{key:"add",value:function(t){this.id+=1;var e=t.call(this,this.art),r=e&&e.name||t.name||"plugin".concat(this.id);return _t(!Yt(this,r),"Cannot add a plugin that already has the same name: ".concat(r)),Bt(this,r,{value:e}),this}}]),t}(),Dr=function t(e){i(this,t);var r=e.option,n=e.events.proxy,o=e.template.$video;ce.events.forEach((function(t){n(o,t,(function(t){e.emit("video:".concat(t.type),t)}))})),Object.keys(r.moreVideoAttr).forEach((function(t){o[t]=r.moreVideoAttr[t]})),r.muted&&(o.muted=r.muted),r.volume&&(o.volume=Kt(r.volume,0,1)),r.poster&&(o.poster=r.poster),r.autoplay&&(o.autoplay=r.autoplay),o.controls=!0;var a=r.type||It(r.url),c=r.customType[a];a&&c?(c(o,r.url,e),e.emit("customType",a)):(o.src=r.url,e.emit("url",o.src))},Tr=0,Ar=[],zr=function(t){function e(t){var r;return i(this,e),(r=s(this,u(e).call(this))).option=ft(Jt(e.option,t),ae),r.isFocus=!1,r.isDestroy=!1,r.userAgent=ht,r.isMobile=yt,r.isWechat=mt,r.whitelist=new le(l(r)),r.template=new se(l(r)),r.events=new lr(l(r)),r.whitelist.state?(r.storage=new kr(l(r)),r.icons=new yr(l(r)),r.i18n=new fe(l(r)),r.notice=new fr(l(r)),r.player=new ye(l(r)),r.layers=new ur(l(r)),r.controls=new Ue(l(r)),r.contextmenu=new ir(l(r)),r.subtitle=new cr(l(r)),r.info=new ar(l(r)),r.loading=new pr(l(r)),r.hotkey=new sr(l(r)),r.mask=new dr(l(r)),r.setting=new Or(l(r)),r.plugins=new Cr(l(r))):r.mobile=new Dr(l(r)),Tr+=1,r.id=Tr,Ar.push(l(r)),r}return f(e,t),c(e,[{key:"destroy",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(t),Ar.splice(Ar.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return Ar}},{key:"version",get:function(){return"3.5.13"}},{key:"env",get:function(){return'"production"'}},{key:"config",get:function(){return ce}},{key:"utils",get:function(){return re}},{key:"scheme",get:function(){return ae}},{key:"Emitter",get:function(){return dt}},{key:"validator",get:function(){return ft}},{key:"kindOf",get:function(){return ft.kindOf}},{key:"option",get:function(){return{container:"#artplayer",url:"",poster:"",title:"",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,light:!1,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,localVideo:!1,localSubtitle:!1,networkMonitor:!1,layers:[],contextmenu:[],controls:[],quality:[],highlight:[],plugins:[],whitelist:[],switcher:[],thumbnails:{url:"",number:60,width:160,height:90,column:10},subtitle:{url:"",style:{},bilingual:!1},moreVideoAttr:{controls:!1,preload:bt?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}}]),e}(dt);function _r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Lr(t){for(var e=1;e