text: /*!
   * artplayer.js v3.5.9
   * 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).Artplayer=e()}(this,(function(){"use strict";var t=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};function e(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var n=function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t};"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function r(t,e){return t(e={exports:{}},e.exports),e.exports}var o=r((function(t){function e(n){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(n)}t.exports=e}));var i=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t};var a=function(t,e){return!e||"object"!==o(e)&&"function"!=typeof e?i(t):e},c=r((function(t){function e(n){return t.exports=e=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},e(n)}t.exports=e})),s=r((function(t){function e(n,r){return t.exports=e=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},e(n,r)}t.exports=e}));var l=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&s(t,e)};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}('.art-undercover{background:#000;position:fixed;top:0;left:0;display:none;height:100%;width:100%;opacity:.9;z-index:10}.art-video-player{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;margin:0 auto;z-index:20;width:100%;height:100%;outline:0;zoom:1;font-family:Roboto,Arial,Helvetica,sans-serif;color:#eee;text-align:left;direction:ltr;font-size:14px;line-height:1.3;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none}.art-video-player *{margin:0;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:5px}.art-video-player ::-webkit-scrollbar-thumb{background-color:#666}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:#ccc}.art-video-player .art-icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1.5}.art-video-player .art-icon svg{fill:#fff}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player>object{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:5px 0}.art-video-player.art-subtitle-show .art-subtitle{display:block}.art-video-player.art-control-show .art-subtitle{bottom:40px}.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-switcher{position:relative}.art-video-player .art-control-switcher .art-switcher-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-switcher .art-switcher-list .art-switcher-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-switcher .art-switcher-list .art-switcher-item:hover{background-color:hsla(0,0%,100%,.1)}.art-video-player .art-control-switcher:hover .art-switcher-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 u=r((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,n=function(n){if(void 0===n)return"undefined";if(null===n)return"null";var o=t(n);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"===r(t)}(n)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(n))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(n))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}(n))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(n))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(n))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}(n))return"regexp";switch(r(n)){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}(n))return"generator";switch(o=e.call(n)){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 r(t){return t.constructor?t.constructor.name:null}function o(t,e){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,r),a(t,e,r),function(t,e,r){var c=n(e),s=n(t);if("object"===c){if("object"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'object' type, but got '").concat(s,"'"));Object.keys(e).forEach((function(n){var c=t[n],s=e[n],l=r.slice();l.push(n),i(c,s,l),a(c,s,l),o(c,s,l)}))}if("array"===c){if("array"!==s)throw new Error("[Type Error]: '".concat(r.join("."),"' require 'array' type, but got '").concat(s,"'"));t.forEach((function(n,c){var s=t[c],l=e[c]||e[0],u=r.slice();u.push(c),i(s,l,u),a(s,l,u),o(s,l,u)}))}}(t,e,r),t}function i(t,e,r){if("string"===n(e)){var o=n(t);if(!(-1<e.indexOf("|")?e.split("|").map((function(t){return t.toLowerCase().trim()})).filter(Boolean).some((function(t){return o===t})):e.toLowerCase().trim()===o))throw new Error("[Type Error]: '".concat(r.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,r){if("function"===n(e)){var o=e(t,n(t),r);if(!0!==o){var i=n(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(r.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=n,o}()})),p=function(){function e(){t(this,e)}return n(e,[{key:"on",value:function(t,e,n){var r=this.e||(this.e={});return(r[t]||(r[t]=[])).push({fn:e,ctx:n}),this}},{key:"once",value:function(t,e,n){var r=this;function o(){r.off(t,o);for(var i=arguments.length,a=new Array(i),c=0;c<i;c++)a[c]=arguments[c];e.apply(n,a)}return o._=e,this.on(t,o,n)}},{key:"emit",value:function(t){for(var e=((this.e||(this.e={}))[t]||[]).slice(),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0;i<e.length;i+=1)e[i].fn.apply(e[i].ctx,r);return this}},{key:"off",value:function(t,e){var n=this.e||(this.e={}),r=n[t],o=[];if(r&&e)for(var i=0,a=r.length;i<a;i+=1)r[i].fn!==e&&r[i].fn._!==e&&o.push(r[i]);return o.length?n[t]=o:delete n[t],this}}]),e}(),f=window.navigator.userAgent,d=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(f),h=/^((?!chrome|android).)*safari/i.test(f),b=/MicroMessenger/i.test(f);function y(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return e.querySelector(t)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return Array.from(e.querySelectorAll(t))}function g(t,e){return t.classList.add(e)}function v(t,e){return t.classList.remove(e)}function w(t,e){return t.classList.contains(e)}function x(t,e){return e instanceof Element?t.appendChild(e):t.insertAdjacentHTML("beforeend",String(e)),t.lastElementChild||t.lastChild}function O(t,e,n){return t.style[e]=n,t}function k(t,e){return Object.keys(e).forEach((function(n){O(t,n,e[n])})),t}function j(t,e){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=window.getComputedStyle(t,null).getPropertyValue(e);return n?parseFloat(r):r}function P(t){return Array.from(t.parentElement.children).filter((function(e){return e!==t}))}function S(t,e){P(t).forEach((function(t){return v(t,e)})),g(t,e)}function E(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"up";d||(t.setAttribute("aria-label",e),t.setAttribute("data-balloon-pos",n))}function $(t){var e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth,o=e.top<=n&&e.top+e.height>=0,i=e.left<=r&&e.left+e.width>=0;return o&&i}var D=function(t){return-1!==Function.toString.call(t).indexOf("[native code]")},R=r((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 n(r,o,i){return e()?t.exports=n=Reflect.construct:t.exports=n=function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&s(o,n.prototype),o},n.apply(null,arguments)}t.exports=n})),T=function(e){function n(e,r){var o;return t(this,n),o=a(this,c(n).call(this,e)),"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(i(o),r||o.constructor),o.name="ArtPlayerError",o}return l(n,e),n}(r((function(t){function e(n){var r="function"==typeof Map?new Map:void 0;return t.exports=e=function(t){if(null===t||!D(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(t))return r.get(t);r.set(t,e)}function e(){return R(t,arguments,c(this).constructor)}return e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),s(e,t)},e(n)}t.exports=e}))(Error));function z(t,e){if(!t)throw new T(e);return t}function A(t){return"WEBVTT \r\n\r\n".concat(t.replace(/{[\s\S]*?}/g,"").replace(/\{\\([ibu])\}/g,"</$1>").replace(/\{\\([ibu])1\}/g,"<$1>").replace(/\{([ibu])\}/g,"<$1>").replace(/\{\/([ibu])\}/g,"</$1>").replace(/(\d\d:\d\d:\d\d),(\d\d\d)/g,"$1.$2").concat("\r\n\r\n"))}function L(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function C(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 n(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.split(/[:.]/).map((function(t,e,n){if(e===n.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===n.length-1?".".concat(t):":".concat(t)})).join("")}return"WEBVTT\n\n".concat(t.split(/\r?\n/).map((function(t){var r=t.match(e);return r?{start:n(r[1].trim()),end:n(r[2].trim()),text:r[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 M(t){return t.includes("?")?M(t.split("?")[0]):t.includes("#")?M(t.split("#")[0]):t.trim().toLowerCase().split(".").pop()}function q(t,e){var n=document.createElement("a");n.style.display="none",n.href=t,n.download=e,document.body.appendChild(n),n.click(),document.body.removeChild(n)}var H=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}};var W=function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)};var F=function(){throw new TypeError("Invalid attempt to spread non-iterable instance")};var V=function(t){return H(t)||W(t)||F()},I=Object.defineProperty,B=Object.prototype.hasOwnProperty;function N(t,e){return B.call(t,e)}function U(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return n.reduce((function(t,e){return Object.getOwnPropertyNames(e).forEach((function(n){z(!N(t,n),"Target attribute name is duplicated: ".concat(n)),I(t,n,Object.getOwnPropertyDescriptor(e,n))})),t}),t)}function _(){for(var t=function(t){return t&&"object"===o(t)&&!Array.isArray(t)},e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.reduce((function(e,n){return Object.keys(n).forEach((function(r){var o=e[r],i=n[r];Array.isArray(o)&&Array.isArray(i)?e[r]=o.concat.apply(o,V(i)):!t(o)||!t(i)||i instanceof Element?e[r]=i:e[r]=_(o,i)})),e}),{})}function X(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return new Promise((function(e){return setTimeout(e,t)}))}function Y(t,e,n){var r;function o(){for(var o=arguments.length,i=new Array(o),a=0;a<o;a++)i[a]=arguments[a];var c=function(){r=null,t.apply(n,i)};clearTimeout(r),r=setTimeout(c,e)}return o.clearTimeout=function(){clearTimeout(r)},o}function Z(t,e){var n,r,o=!1;return function i(){for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];if(o)return n=c,void(r=this);o=!0,t.apply(this,c),setTimeout((function(){o=!1,n&&(i.apply(r,n),n=null,r=null)}),e)}}function J(t,e,n){return Math.max(Math.min(t,Math.max(e,n)),Math.min(e,n))}function Q(t){var e=Math.floor(t/3600),n=Math.floor((t-3600*e)/60),r=Math.floor(t-3600*e-60*n);return(e>0?[e,n,r]:[n,r]).map((function(t){return t<10?"0".concat(t):String(t)})).join(":")}function G(t){return t.replace(/[&<>'"]/g,(function(t){return{"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"}[t]||t}))}var K=Object.freeze({__proto__:null,query:y,queryAll:m,addClass:g,removeClass:v,hasClass:w,append:x,remove:function(t){return t.parentNode.removeChild(t)},setStyle:O,setStyles:k,getStyle:j,sublings:P,inverseClass:S,tooltip:E,isInViewport:$,ArtPlayerError:T,errorHandle:z,srtToVtt:A,vttToBlob:L,assToVtt:C,getExt:M,download:q,def:I,has:N,proxyPropertys:U,mergeDeep:_,sleep:X,debounce:Y,throttle:Z,clamp:J,secondToTime:Q,escape:G,userAgent:f,isMobile:d,isSafari:h,isWechat:b});var tt=function(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t};function et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function nt(t,e,n){return z("string"===e||t instanceof Element,"".concat(n.join(".")," require 'string' or 'Element' type"))}var rt={html:nt,disable:"boolean|undefined",name:"string|undefined",index:"number|undefined",style:"object|undefined",click:"function|undefined",mounted:"function|undefined",tooltip:"string|undefined"},ot={container:nt,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:[rt],contextmenu:[rt],controls:[function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?et(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},rt,{position:function(t,e,n){var r=["top","left","right"];return z(r.includes(t),"".concat(n.join(".")," only accept ").concat(r.toString()," as parameters"))}})],quality:[{default:"boolean|undefined",name:"string",url:"string"}],switcher:[{index:"number|undefined",click:"function|undefined",name:"string|undefined",default:"string|undefined",list:[{name:"string",text:"string"}]}],highlight:[{time:"number",text:"string"}],thumbnails:{url:"string",number:"number",width:"number",height:"number",column:"number"},subtitle:{url:"string",style:"object"},moreVideoAttr:"object",icons:"object",customType:"object"},it={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"]},at=function e(n){t(this,e);var r=n.constructor.kindOf,o=n.option.whitelist;this.state=!n.isMobile||o.some((function(t){switch(r(t)){case"string":return"*"===t||n.userAgent.indexOf(t)>-1;case"function":return t(n.userAgent);case"regexp":return t.test(n.userAgent);default:return!1}}))},ct=function(){function e(n){var r=this;t(this,e),this.art=n,n.option.container instanceof Element?this.$container=n.option.container:(this.$container=y(n.option.container),z(this.$container,"No container element found by ".concat(n.option.container))),z(n.constructor.instances.every((function(t){return t.template.$container!==r.$container})),"Cannot mount multiple instances on the same dom element"),z(this.$container.clientWidth&&this.$container.clientHeight,"The width and height of the container cannot be 0"),n.whitelist.state?this.desktop():this.mobile()}return n(e,[{key:"query",value:function(t){return y(t,this.$container)}},{key:"desktop",value:function(){var t=this.art.option,e=t.theme,n=t.backdrop;this.$container.innerHTML='<div class="art-undercover"></div><div class="art-video-player art-subtitle-show art-layer-show" style="--theme: '.concat(e,'"><video class="art-video"></video><div class="art-subtitle"></div><div class="art-danmuku"></div><div class="art-layers"></div><div class="art-mask"><div class="art-state"></div></div><div class="art-bottom"><div class="art-progress"></div><div class="art-controls"><div class="art-controls-left"></div><div class="art-controls-right"></div></div></div><div class="art-loading"></div><div class="art-notice"><div class="art-notice-inner"></div></div><div class="art-settings"><div class="art-setting-inner"><div class="art-setting-body"></div></div></div><div class="art-info"><div class="art-info-panel"><div class="art-info-item"><div class="art-info-title">Player version:</div><div class="art-info-content">3.5.9</div></div><div class="art-info-item"><div class="art-info-title">Video url:</div><div class="art-info-content" data-video="src"></div></div><div class="art-info-item"><div class="art-info-title">Video volume:</div><div class="art-info-content" data-video="volume"></div></div><div class="art-info-item"><div class="art-info-title">Video time:</div><div class="art-info-content" data-video="currentTime"></div></div><div class="art-info-item"><div class="art-info-title">Video duration:</div><div class="art-info-content" data-video="duration"></div></div><div class="art-info-item"><div class="art-info-title">Video resolution:</div><div class="art-info-content"><span data-video="videoWidth"></span> x <span data-video="videoHeight"></span></div></div></div><div class="art-info-close">[x]</div></div><div class="art-mini-header"><div class="art-mini-title"></div><div class="art-mini-close">xD7</div></div><div class="art-contextmenus"></div></div>'),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"),n&&(g(this.$settingInner,"art-backdrop-filter"),g(this.$info,"art-backdrop-filter"),g(this.$contextmenu,"art-backdrop-filter")),this.art.isMobile&&g(this.$container,"art-mobile")}},{key:"mobile",value:function(){this.$container.innerHTML='<div class="art-video-player"><video class="art-video"></video></div>',this.$player=this.query(".art-video-player"),this.$video=this.query(".art-video")}},{key:"destroy",value:function(t){t?this.$container.innerHTML="":g(this.$player,"art-destroy")}}]),e}(),st={"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":"未发现字幕"},lt={"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":"未發現字幕"},ut=function(){function e(n){t(this,e),this.art=n,this.languages={"zh-cn":st,"zh-tw":lt},this.init()}return n(e,[{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=_(this.languages,t),this.init()}}]),e}();var pt=r((function(t){!function(){var e="undefined"!=typeof window&&void 0!==window.document?window.document:{},n=t.exports,r=function(){for(var t,n=[["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"]],r=0,o=n.length,i={};r<o;r++)if((t=n[r])&&t[1]in e){for(r=0;r<t.length;r++)i[n[0][r]]=t[r];return i}return!1}(),o={change:r.fullscreenchange,error:r.fullscreenerror},i={request:function(t){return new Promise(function(n,o){var i=function(){this.off("change",i),n()}.bind(this);this.on("change",i),t=t||e.documentElement,Promise.resolve(t[r.requestFullscreen]()).catch(o)}.bind(this))},exit:function(){return new Promise(function(t,n){if(this.isFullscreen){var o=function(){this.off("change",o),t()}.bind(this);this.on("change",o),Promise.resolve(e[r.exitFullscreen]()).catch(n)}else t()}.bind(this))},toggle:function(t){return this.isFullscreen?this.exit():this.request(t)},onchange:function(t){this.on("change",t)},onerror:function(t){this.on("error",t)},on:function(t,n){var r=o[t];r&&e.addEventListener(r,n,!1)},off:function(t,n){var r=o[t];r&&e.removeEventListener(r,n,!1)},raw:r};r?(Object.defineProperties(i,{isFullscreen:{get:function(){return Boolean(e[r.fullscreenElement])}},element:{enumerable:!0,get:function(){return e[r.fullscreenElement]}},isEnabled:{enumerable:!0,get:function(){return Boolean(e[r.fullscreenEnabled])}}}),n?t.exports=i:window.screenfull=i):n?t.exports={isEnabled:!1}:window.screenfull={isEnabled:!1}}()}));pt.isEnabled;function ft(t,e){var n=t.i18n,r=t.notice,o=t.template.$video;document.pictureInPictureEnabled?function(t,e){var n=t.template.$video,r=t.events.proxy,o=t.notice;n.disablePictureInPicture=!1,I(e,"pip",{get:function(){return document.pictureInPictureElement},set:function(t){t?n.requestPictureInPicture().catch((function(t){throw o.show=t,t})):document.exitPictureInPicture().catch((function(t){throw o.show=t,t}))}}),r(n,"enterpictureinpicture",(function(){t.emit("pip",!0)})),r(n,"leavepictureinpicture",(function(){t.emit("pip")}))}(t,e):o.webkitSupportsPresentationMode?function(t,e){var n=t.template.$video;n.webkitSetPresentationMode("inline"),I(e,"pip",{get:function(){return"picture-in-picture"===n.webkitPresentationMode},set:function(e){e?(n.webkitSetPresentationMode("picture-in-picture"),t.emit("pip",!0)):(n.webkitSetPresentationMode("inline"),t.emit("pip"))}})}(t,e):I(e,"pip",{get:function(){return!1},set:function(){r.show=n.get("PIP not supported")}}),I(e,"pipToggle",{set:function(t){t&&(e.pip=!e.pip)}})}var dt=function e(n){var r;t(this,e),function(t,e){var n=t.option,r=n.type,o=n.customType,i=t.template.$video;I(e,"url",{get:function(){return i.src},set:function(e){var n=r||M(e),a=o[n];n&&a?X().then((function(){t.loading.show=!0;var r=a.call(t,i,e,t);I(t,n,{value:r})})):(i.src=e,t.option.url=e,t.emit("url",e))}})}(n,this),function(t,e){var n=t.option,r=t.events.proxy,o=t.template,i=o.$player,a=o.$video,c=t.i18n,s=t.notice,l=0;r(a,"click",(function(){e.toggle=!0})),it.events.forEach((function(e){r(a,e,(function(e){t.emit("video:".concat(e.type),e)}))})),t.on("video:canplay",(function(){l=0,t.loading.show=!1})),t.once("video:canplay",(function(){t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.emit("ready")})),t.on("video:ended",(function(){n.loop?(e.seek=0,e.play=!0,t.controls.show=!1,t.mask.show=!1):(t.controls.show=!0,t.mask.show=!0)})),t.on("video:error",(function(){l<5?X(1e3).then((function(){l+=1,e.url=n.url,s.show="".concat(c.get("Reconnect"),": ").concat(l)})):(t.loading.show=!1,t.controls.show=!1,g(i,"art-error"),X(1e3).then((function(){s.show=c.get("Video load failed"),t.destroy(!1)})))})),t.once("video:loadedmetadata",(function(){e.autoSize=n.autoSize,t.isMobile&&(t.loading.show=!1,t.controls.show=!0,t.mask.show=!0,t.emit("ready"))})),t.on("video:loadstart",(function(){t.loading.show=!0})),t.on("video:pause",(function(){t.controls.show=!0,t.mask.show=!0})),t.on("video:play",(function(){t.mask.show=!1})),t.on("video:playing",(function(){t.mask.show=!1})),t.on("video:seeked",(function(){t.loading.show=!1})),t.on("video:seeking",(function(){t.loading.show=!0})),t.on("video:timeupdate",(function(){t.mask.show=!1})),t.on("video:waiting",(function(){t.loading.show=!0}))}(n,this),function(t,e){var n=t.option,r=t.storage,o=t.template.$video;Object.keys(n.moreVideoAttr).forEach((function(t){o[t]=n.moreVideoAttr[t]})),n.muted&&(o.muted=n.muted),n.volume&&(o.volume=J(n.volume,0,1));var i=r.get("volume");i&&(o.volume=J(i,0,1)),n.poster&&(o.poster=n.poster),n.autoplay&&(o.autoplay=n.autoplay),o.controls=!1,e.url=n.url}(n,this),function(t,e){var n=["mini","pip","fullscreen","fullscreenWeb","fullscreenRotate"];n.forEach((function(r){t.on(r,(function(t){t&&n.filter((function(t){return t!==r})).forEach((function(t){e[t]&&(e[t]=!1)}))}))})),I(e,"normal",{get:function(){return n.every((function(t){return!e[t]}))}})}(n,this),function(t,e){var n=t.i18n,r=t.notice,o=t.constructor.instances,i=t.option.mutex,a=t.template.$video;I(e,"play",{set:function(c){if(c){var s=a.play();s.then&&s.then().catch((function(t){throw r.show=t,t})),i&&o.filter((function(e){return e!==t})).forEach((function(t){t.player.pause=!0})),r.show=n.get("Play"),t.emit("play")}else e.pause=!0}})}(n,this),function(t,e){var n=t.template.$video,r=t.i18n,o=t.notice;I(e,"pause",{get:function(){return n.paused},set:function(i){i?(n.pause(),o.show=r.get("Pause"),t.emit("pause")):e.play=!0}})}(n,this),I(r=this,"toggle",{set:function(t){t&&(r.playing?r.pause=!0:r.play=!0)}}),function(t,e){var n=t.notice;I(e,"seek",{set:function(r){e.currentTime=r,n.show="".concat(Q(e.currentTime)," / ").concat(Q(e.duration)),t.emit("seek",e.currentTime)}}),I(e,"forward",{set:function(t){e.seek=e.currentTime+t}}),I(e,"backward",{set:function(t){e.seek=e.currentTime-t}})}(n,this),function(t,e){var n=t.template.$video,r=t.i18n,o=t.notice,i=t.storage;I(e,"volume",{get:function(){return n.volume||0},set:function(e){n.volume=J(e,0,1),o.show="".concat(r.get("Volume"),": ").concat(parseInt(100*n.volume,10)),0!==n.volume&&i.set("volume",n.volume),t.emit("volume",n.volume)}}),I(e,"muted",{get:function(){return n.muted},set:function(e){n.muted=e,t.emit("volume",n.volume)}})}(n,this),function(t,e){var n=t.template.$video;I(e,"currentTime",{get:function(){return n.currentTime||0},set:function(t){n.currentTime=J(t,0,e.duration||1/0)}})}(n,this),function(t,e){I(e,"duration",{get:function(){return t.template.$video.duration||1/0}})}(n,this),function(t,e){var n=t.i18n,r=t.notice;function o(o,i,a){if(o!==e.url){URL.revokeObjectURL(e.url);var c=e.playing;e.url=o,e.playbackRate=!1,e.aspectRatio=!1,t.once("video:canplay",(function(){e.currentTime=a})),c&&(e.play=!0),i&&(r.show="".concat(n.get("Switch video"),": ").concat(i)),t.emit("switch",o)}}I(e,"switchQuality",{value:function(t,n){return o(t,n,e.currentTime)}}),I(e,"switchUrl",{value:function(t,e){return o(t,e,0)}})}(n,this),function(t,e){var n=t.template,r=n.$video,o=n.$player,i=t.i18n,a=t.notice;I(e,"playbackRate",{get:function(){return o.dataset.playbackRate},set:function(n){if(n){if(n===o.dataset.playbackRate)return;var c=[.5,.75,1,1.25,1.5,1.75,2];z(c.includes(n),"'playbackRate' only accept ".concat(c.toString()," as parameters")),r.playbackRate=n,o.dataset.playbackRate=n,a.show="".concat(i.get("Rate"),": ").concat(1===n?i.get("Normal"):"".concat(n,"x")),t.emit("playbackRate",n)}else e.playbackRate&&(e.playbackRate=1,delete o.dataset.playbackRate,t.emit("playbackRate"))}}),I(e,"playbackRateReset",{set:function(t){if(t){var n=o.dataset.playbackRate;n&&(e.playbackRate=Number(n))}}})}(n,this),function(t,e){var n=t.template,r=n.$video,o=n.$player,i=t.i18n,a=t.notice;I(e,"aspectRatio",{get:function(){return o.dataset.aspectRatio||""},set:function(n){if(n){var c=["default","4:3","16:9"];if(z(c.includes(n),"'aspectRatio' only accept ".concat(c.toString()," as parameters")),"default"===n)e.aspectRatio=!1;else{var s=n.split(":"),l=r.videoWidth,u=r.videoHeight,p=o.clientWidth,f=o.clientHeight,d=l/u,h=s[0]/s[1];if(d>h){var b=h*u/l;O(r,"width","".concat(100*b,"%")),O(r,"height","100%"),O(r,"padding","0 ".concat((p-p*b)/2,"px"))}else{var y=l/h/u;O(r,"width","100%"),O(r,"height","".concat(100*y,"%")),O(r,"padding","".concat((f-f*y)/2,"px 0"))}}o.dataset.aspectRatio=n,a.show="".concat(i.get("Aspect ratio"),": ").concat("default"===n?i.get("Default"):n),t.emit("aspectRatio",n)}else e.aspectRatio&&(O(r,"width",null),O(r,"height",null),O(r,"padding",null),delete o.dataset.aspectRatio,t.emit("aspectRatio"))}}),I(e,"aspectRatioReset",{set:function(t){if(t&&e.aspectRatio){var n=e.aspectRatio;e.aspectRatio=n}}})}(n,this),function(t,e){var n=t.option,r=t.notice,o=t.template.$video,i=document.createElement("canvas");I(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){r.show=t,e(t)}}))}}),I(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){r.show=t,e(t)}}))}}),I(e,"screenshot",{value:function(){e.getDataURL().then((function(e){q(e,"".concat(n.title||"artplayer","_").concat(Q(o.currentTime),".png")),t.emit("screenshot",e)}))}})}(n,this),function(t,e){var n=t.template.$player;I(e,"fullscreen",{get:function(){return pt.isFullscreen},set:function(r){r?pt.request(n).then((function(){g(n,"art-fullscreen"),e.aspectRatioReset=!0,t.emit("resize"),t.emit("fullscreen",!0)})):pt.exit().then((function(){v(n,"art-fullscreen"),e.aspectRatioReset=!0,e.autoSize=t.option.autoSize,t.emit("resize"),t.emit("fullscreen")}))}}),I(e,"fullscreenToggle",{set:function(t){t&&(e.fullscreen=!e.fullscreen)}})}(n,this),function(t,e){var n=t.template.$player;I(e,"fullscreenWeb",{get:function(){return w(n,"art-fullscreen-web")},set:function(r){r?(g(n,"art-fullscreen-web"),e.aspectRatioReset=!0,t.emit("resize"),t.emit("fullscreenWeb",!0)):(v(n,"art-fullscreen-web"),e.aspectRatioReset=!0,e.autoSize=t.option.autoSize,t.emit("resize"),t.emit("fullscreenWeb"))}}),I(e,"fullscreenWebToggle",{set:function(t){t&&(e.fullscreenWeb=!e.fullscreenWeb)}})}(n,this),function(t,e){var n=t.template,r=n.$container,o=n.$player;I(e,"fullscreenRotate",{get:function(){return w(r,"art-fullscreen-rotate")},set:function(n){if(n){g(r,"art-fullscreen-rotate"),e.autoSize=!0;var i=document.body,a=i.clientHeight,c=i.clientWidth,s=o.clientHeight,l=o.clientWidth;if(c/a<l/s){var u=Math.min(a/l,c/s).toFixed(2);O(o,"transform","rotate(90deg) scale(".concat(u,",").concat(u,")")),t.emit("resize"),t.emit("fullscreenRotate",!0)}}else v(r,"art-fullscreen-rotate"),e.autoSize=t.option.autoSize,O(o,"transform",null),t.emit("resize"),t.emit("fullscreenRotate")}}),I(e,"fullscreenRotateToggle",{set:function(t){t&&(e.fullscreenRotate=!e.fullscreenRotate)}})}(n,this),ft(n,this),function(t,e){var n=t.template.$video;I(e,"loaded",{get:function(){return e.loadedTime/n.duration}}),I(e,"loadedTime",{get:function(){return n.buffered.length?n.buffered.end(n.buffered.length-1):0}})}(n,this),function(t,e){I(e,"played",{get:function(){return e.currentTime/e.duration}})}(0,this),function(t,e){var n=t.template.$video;I(e,"playing",{get:function(){return!!(n.currentTime>0&&!n.paused&&!n.ended&&n.readyState>2)}})}(n,this),function(t,e){var n=t.template,r=n.$container,o=n.$player,i=n.$video;I(e,"autoSize",{get:function(){return w(r,"art-auto-size")},set:function(n){if(n){var a=i.videoWidth,c=i.videoHeight,s=r.getBoundingClientRect(),l=s.width,u=s.height,p=a/c,f=l/u;if(g(r,"art-auto-size"),f>p){O(o,"width","".concat(u*p/l*100,"%")),O(o,"height","100%")}else{var d=l/p/u*100;O(o,"width","100%"),O(o,"height","".concat(d,"%"))}t.emit("autoSize",{width:e.width,height:e.height})}else v(r,"art-auto-size"),O(o,"width",null),O(o,"height",null),t.emit("autoSize")}})}(n,this),function(t,e){I(e,"rect",{get:function(){return t.template.$player.getBoundingClientRect()}}),["bottom","height","left","right","top","width"].forEach((function(t){I(e,t,{get:function(){return e.rect[t]}})})),I(e,"x",{get:function(){return e.left+window.pageXOffset}}),I(e,"y",{get:function(){return e.top+window.pageYOffset}})}(n,this),function(t,e){var n=t.template.$player;I(e,"flip",{get:function(){return n.dataset.flip},set:function(e){if(e){var r=["normal","horizontal","vertical"];z(r.includes(e),"'flip' only accept ".concat(r.toString()," as parameters")),n.dataset.flip=e,t.emit("flip",e)}else delete n.dataset.flip,t.emit("flip")}})}(n,this),function(t,e){var n=t.template.$undercover;I(e,"light",{get:function(){return"none"!==j(n,"display",!1)},set:function(e){O(n,"display",e?"block":"none"),t.emit("light",e)}})}(n,this),function(t,e){var n=t.i18n,r=t.option,o=t.storage,i=t.events.proxy,a=t.template,c=a.$player,s=a.$miniClose,l=a.$miniTitle,u=a.$miniHeader,p="",f=!1,d=0,h=0,b=0,y=0;i(u,"mousedown",(function(t){f=!0,d=t.pageX,h=t.pageY,b=e.left,y=e.top})),i(document,"mousemove",(function(t){if(f){g(c,"art-is-dragging");var e=y+t.pageY-h,n=b+t.pageX-d;O(c,"top","".concat(e,"px")),O(c,"left","".concat(n,"px")),o.set("top",e),o.set("left",n)}})),i(document,"mouseup",(function(){f=!1,v(c,"art-is-dragging")})),i(s,"click",(function(){e.mini=!1,f=!1,v(c,"art-is-dragging")})),x(l,r.title||n.get("Mini player")),I(e,"mini",{get:function(){return w(c,"art-mini")},set:function(n){if(n){e.autoSize=!1,p=c.style.cssText,g(c,"art-mini");var i=o.get("top"),a=o.get("left");if(i&&a)O(c,"top","".concat(i,"px")),O(c,"left","".concat(a,"px")),$(u)||(o.del("top"),o.del("left"),e.mini=!0);else{var s=document.body,l=s.clientHeight-e.height-50,f=s.clientWidth-e.width-50;o.set("top",l),o.set("left",f),O(c,"top","".concat(l,"px")),O(c,"left","".concat(f,"px"))}e.aspectRatio=!1,e.playbackRate=!1,t.emit("mini",!0)}else c.style.cssText=p,v(c,"art-mini"),O(c,"top",null),O(c,"left",null),e.aspectRatio=!1,e.playbackRate=!1,e.autoSize=r.autoSize,t.emit("mini")}}),I(e,"miniToggle",{set:function(t){t&&(e.mini=!e.mini)}})}(n,this),function(t,e){var n=[];I(e,"loop",{get:function(){return n},set:function(r){if(Array.isArray(r)&&"number"==typeof r[0]&&"number"==typeof r[1]){var o=J(r[0],0,Math.min(r[1],e.duration)),i=J(r[1],o,e.duration);i-o>=1?(n=[o,i],t.emit("loop",n)):(n=[],t.emit("loop"))}else n=[],t.emit("loop")}}),t.on("video:timeupdate",(function(){n.length&&(e.currentTime<n[0]||e.currentTime>n[1])&&(e.seek=n[0])}))}(n,this),U(n,this)};var ht=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=c(t)););return t},bt=r((function(t){function e(n,r,o){return"undefined"!=typeof Reflect&&Reflect.get?t.exports=e=Reflect.get:t.exports=e=function(t,e,n){var r=ht(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}},e(n,r,o||n)}t.exports=e})),yt=function(){function e(n){t(this,e),this.id=0,this.art=n,this.add=this.add.bind(this)}return n(e,[{key:"add",value:function(t,e){var n=this,r="function"==typeof t?t(this.art):t;if(this.$parent&&this.name&&!r.disable){this.id+=1;var o=r.name||"".concat(this.name).concat(this.id);z(!N(this,o),"Cannot add an existing name [".concat(o,"] to the [").concat(this.name,"]"));var i=document.createElement("div");i.classList.value="art-".concat(this.name," art-").concat(this.name,"-").concat(o),r.html&&x(i,r.html),r.style&&k(i,r.style),r.tooltip&&E(i,r.tooltip);var a=Array.from(this.$parent.children);i.dataset.index=r.index||this.id;var c=a.find((function(t){return Number(t.dataset.index)>=Number(i.dataset.index)}));c?c.insertAdjacentElement("beforebegin",i):x(this.$parent,i),r.click&&this.art.events.proxy(i,"click",(function(t){t.preventDefault(),r.click.call(n.art,n,t)})),r.mounted&&r.mounted(i,this,this.art),e&&e(i,this,this.art),I(this,o,{get:function(){return r}})}}},{key:"show",get:function(){return w(this.art.template.$player,"art-".concat(this.name,"-show"))},set:function(t){var e=this.art.template.$player,n="art-".concat(this.name,"-show");t?g(e,n):v(e,n),this.art.emit(this.name,t)}},{key:"toggle",set:function(t){t&&(this.show=!this.show)}}]),e}();function mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function gt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?mt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{tooltip:e.i18n.get("Fullscreen"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player;x(t,r.fullscreen),n(t,"click",(function(){i.fullscreenToggle=!0})),e.on("fullscreen",(function(e){E(t,o.get(e?"Exit fullscreen":"Fullscreen"))}))}})}}function vt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function wt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{tooltip:e.i18n.get("Web fullscreen"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player;x(t,r.fullscreenWeb),n(t,"click",(function(){i.fullscreenWebToggle=!0})),e.on("fullscreenWeb",(function(e){E(t,o.get(e?"Exit web fullscreen":"Web fullscreen"))}))}})}}function xt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ot(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?xt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{tooltip:e.i18n.get("PIP mode"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player;x(t,r.pip),n(t,"click",(function(){i.pipToggle=!0})),e.on("pip",(function(e){E(t,o.get(e?"Exit PIP mode":"PIP mode"))}))}})}}function kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function jt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?kt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):kt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.player,a=x(t,r.play),c=x(t,r.pause);function s(){O(a,"display","flex"),O(c,"display","none")}function l(){O(a,"display","none"),O(c,"display","flex")}E(a,o.get("Play")),E(c,o.get("Pause")),n(a,"click",(function(){i.play=!0})),n(c,"click",(function(){i.pause=!0})),i.playing?l():s(),e.on("video:playing",(function(){l()})),e.on("video:pause",(function(){s()}))}})}}function Pt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function St(t,e){var n=t.template.$progress,r=t.player,o=n.getBoundingClientRect().left,i=J(e.pageX-o,0,n.clientWidth),a=i/n.clientWidth*r.duration;return{second:a,time:Q(a),width:i,percentage:J(i/n.clientWidth,0,1)}}function Et(t){return function(e){var n=e.option,r=n.highlight,o=n.theme,i=e.events.proxy,a=e.player;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Pt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Pt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:'<div class="art-control-progress-inner"><div class="art-progress-loaded"></div><div class="art-progress-played" style="background: '.concat(o,'"></div><div class="art-progress-highlight"></div><div class="art-progress-indicator" style="background: ').concat(o,'"></div><div class="art-progress-tip art-tip"></div></div>'),mounted:function(t){var n=!1,o=y(".art-progress-loaded",t),c=y(".art-progress-played",t),s=y(".art-progress-highlight",t),l=y(".art-progress-indicator",t),u=y(".art-progress-tip",t);function p(t,e){"loaded"===t&&O(o,"width","".concat(100*e,"%")),"played"===t&&(O(c,"width","".concat(100*e,"%")),O(l,"left","calc(".concat(100*e,"% - ").concat(j(l,"width")/2,"px)")))}r.forEach((function(t){var e=J(t.time,0,a.duration)/a.duration*100;x(s,'<span data-text="'.concat(t.text,'" data-time="').concat(t.time,'" style="left: ').concat(e,'%"></span>'))})),p("loaded",a.loaded),e.on("video:progress",(function(){p("loaded",a.loaded)})),e.on("video:timeupdate",(function(){p("played",a.played)})),e.on("video:ended",(function(){p("played",1)})),i(t,"mousemove",(function(n){O(u,"display","block"),n.composedPath().indexOf(s)>-1?function(n){var r=St(e,n).width,o=n.target.dataset.text;u.innerHTML=o;var i=u.clientWidth;r<=i/2?O(u,"left",0):r>t.clientWidth-i/2?O(u,"left","".concat(t.clientWidth-i,"px")):O(u,"left","".concat(r-i/2,"px"))}(n):function(n){var r=St(e,n),o=r.width,i=r.time;u.innerHTML=i;var a=u.clientWidth;o<=a/2?O(u,"left",0):o>t.clientWidth-a/2?O(u,"left","".concat(t.clientWidth-a,"px")):O(u,"left","".concat(o-a/2,"px"))}(n)})),i(t,"mouseout",(function(){O(u,"display","none")})),i(t,"click",(function(t){if(t.target!==l){var n=St(e,t),r=n.second;p("played",n.percentage),a.seek=r}})),i(l,"mousedown",(function(){n=!0})),i(document,"mousemove",(function(t){if(n){var r=St(e,t),o=r.second,i=r.percentage;g(l,"art-show-indicator"),p("played",i),a.seek=o}})),i(document,"mouseup",(function(){n&&(n=!1,v(l,"art-show-indicator"))}))}})}}function $t(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Dt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?$t(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):$t(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{tooltip:e.i18n.get("Hide subtitle"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.subtitle;x(t,r.subtitle),n(t,"click",(function(){i.toggle=!0})),e.on("subtitle",(function(e){E(t,o.get(e?"Hide subtitle":"Show subtitle"))}))}})}}function Rt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Tt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Rt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{mounted:function(t){function n(){var n="".concat(Q(e.player.currentTime)," / ").concat(Q(e.player.duration));n!==t.innerText&&(t.innerText=n)}n(),["video:loadedmetadata","video:timeupdate","video:progress"].forEach((function(t){e.on(t,n)}))}})}}function zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function At(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?zt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.player,i=e.i18n,a=!1,c=x(t,r.volume),s=x(t,r.volumeClose),l=x(t,'<div class="art-volume-panel"></div>'),u=x(l,'<div class="art-volume-slider-handle"></div>');function p(t){var e=l.getBoundingClientRect().left;return J(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)O(c,"display","none"),O(s,"display","flex"),O(u,"left","0");else{var e=48*t;O(c,"display","flex"),O(s,"display","none"),O(u,"left","".concat(e,"px"))}}E(c,i.get("Mute")),O(s,"display","none"),e.isMobile&&O(l,"display","none"),f(o.volume),e.on("video:volumechange",(function(){f(o.volume)})),n(c,"click",(function(){o.muted=!0})),n(s,"click",(function(){o.muted=!1})),n(l,"click",(function(t){o.muted=!1,o.volume=p(t)})),n(u,"mousedown",(function(){a=!0})),n(t,"mousemove",(function(t){a&&(o.muted=!1,o.volume=p(t))})),n(document,"mouseup",(function(){a&&(a=!1)}))}})}}function Lt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ct(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Lt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Lt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{tooltip:e.i18n.get("Show setting"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.i18n,i=e.setting;x(t,r.setting),n(t,"click",(function(){i.toggle=!0})),e.on("setting",(function(e){E(t,o.get(e?"Hide setting":"Show setting"))}))}})}}function Mt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function qt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{mounted:function(t){var n=e.option.thumbnails,r=e.template.$progress,o=e.events,i=o.proxy,a=o.loadImg,c=!1,s=!1;i(r,"mousemove",(function(o){c||(c=!0,a(n.url).then((function(){s=!0}))),s&&(O(t,"display","block"),function(o){var i=St(e,o).width,a=n.url,c=n.height,s=n.width,l=n.number,u=n.column,p=r.clientWidth/l,f=Math.floor(i/p),d=Math.ceil(f/u)-1,h=f%u||u-1;O(t,"backgroundImage","url(".concat(a,")")),O(t,"height","".concat(c,"px")),O(t,"width","".concat(s,"px")),O(t,"backgroundPosition","-".concat(h*s,"px -").concat(d*c,"px")),i<=s/2?O(t,"left",0):i>r.clientWidth-s/2?O(t,"left","".concat(r.clientWidth-s,"px")):O(t,"left","".concat(i-s/2,"px"))}(o))})),i(r,"mouseout",(function(){O(t,"display","none")}))}})}}function Ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ht(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ht(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{tooltip:e.i18n.get("Screenshot"),mounted:function(t){var n=e.events.proxy,r=e.icons,o=e.player;x(t,r.screenshot),n(t,"click",(function(){o.screenshot()}))}})}}function Ft(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Vt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ft(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ft(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{mounted:function(t){var n=e.option.quality,r=e.events,o=r.proxy,i=r.hover,a=e.player,c=-1,s=n.find((function(t){return t.default}))||n[0];c=n.indexOf(s);var l=x(t,'<div class="art-quality-name">'.concat(s.name,"</div>")),u=n.map((function(t,e){return'<div class="art-quality-item" data-index="'.concat(e,'">').concat(t.name,"</div>")})).join(""),p=x(t,'<div class="art-qualitys">'.concat(u,"</div>"));i(t,(function(){p.style.left="-".concat(j(p,"width")/2-j(t,"width")/2,"px")})),o(p,"click",(function(t){var e=Number(t.target.dataset.index),r=n[e],o=r.url,i=r.name;o&&i&&c!==e&&(a.switchQuality(o,i),l.innerText=i,c=e)}))}})}}function It(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Bt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?It(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):It(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{mounted:function(t){var n=e.player,r=x(t,'<span class="art-loop-point"></span>'),o=x(t,'<span class="art-loop-point"></span>');e.on("loop",(function(e){e?(O(t,"display","block"),O(r,"left","calc(".concat(e[0]/n.duration*100,"% - ").concat(r.clientWidth,"px)")),O(o,"left","".concat(e[1]/n.duration*100,"%"))):O(t,"display","none")}))}})}}var Nt=function(e){function r(e){var n;t(this,r),(n=a(this,c(r).call(this,e))).name="control";var o=e.option,i=e.player,s=e.template.$player;return n.delayHide=Y((function(){i.playing&&n.show&&(g(s,"art-hide-cursor"),v(s,"art-hover"),n.show=!1)}),3e3),n.cancelDelayHide=n.delayHide.clearTimeout,e.once("ready",(function(){n.add(Et({name:"progress",disable:o.isLive,position:"top",index:10})),n.add(qt({name:"thumbnails",disable:!o.thumbnails.url||o.isLive,position:"top",index:20})),n.add(Bt({name:"loop",disable:!1,position:"top",index:30})),n.add(jt({name:"playAndPause",disable:!1,position:"left",index:10})),n.add(At({name:"volume",disable:!1,position:"left",index:20})),n.add(Tt({name:"time",disable:o.isLive,position:"left",index:30})),n.add(Vt({name:"quality",disable:0===o.quality.length,position:"right",index:10})),n.add(Wt({name:"screenshot",disable:!o.screenshot,position:"right",index:20})),n.add(Dt({name:"subtitle",disable:!o.subtitle.url,position:"right",index:30})),n.add(Ct({name:"setting",disable:!o.setting,position:"right",index:40})),n.add(Ot({name:"pip",disable:!o.pip,position:"right",index:50})),n.add(wt({name:"fullscreenWeb",disable:!o.fullscreenWeb,position:"right",index:60})),n.add(gt({name:"fullscreen",disable:!o.fullscreen,position:"right",index:70})),o.controls.forEach((function(t){n.add(t)}))})),n}return l(r,e),n(r,[{key:"add",value:function(t,e){var n=this,o="function"==typeof t?t(this.art):t;z(["top","left","right"].includes(o.position),"Control option.position must one of 'top', 'left', 'right'");var i=this.art.template,a=i.$progress,s=i.$controlsLeft,l=i.$controlsRight;switch(o.position){case"top":this.$parent=a;break;case"left":this.$parent=s;break;case"right":this.$parent=l}bt(c(r.prototype),"add",this).call(this,o,(function(t){o.disable||"top"===o.position||t.firstElementChild&&"I"===t.firstElementChild.tagName||g(t,"art-control-onlyText"),e&&e(t,n,n.art)}))}}]),r}(yt);function Ut(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _t(t){return function(e){var n=e.i18n,r=e.player;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ut(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ut(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:"".concat(n.get("Play speed"),':<span data-rate="0.5">0.5</span><span data-rate="0.75">0.75</span><span data-rate="1.0" class="art-current">').concat(n.get("Normal"),'</span><span data-rate="1.25">1.25</span><span data-rate="1.5">1.5</span><span data-rate="2.0">2.0</span>'),click:function(t,e){var n=e.target.dataset.rate;n&&(r.playbackRate=Number(n),t.show=!1)},mounted:function(t){e.on("playbackRate",(function(e){var n=m("span",t).find((function(t){return Number(t.dataset.rate)===e}));n&&S(n,"art-current")}))}})}}function Xt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Yt(t){return function(e){var n=e.i18n,r=e.player;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Xt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Xt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:"".concat(n.get("Aspect ratio"),':<span data-ratio="default" class="art-current">').concat(n.get("Default"),'</span><span data-ratio="4:3">4:3</span><span data-ratio="16:9">16:9</span>'),click:function(t,e){var n=e.target.dataset.ratio;n&&(r.aspectRatio=n,t.show=!1)},mounted:function(t){e.on("aspectRatio",(function(e){var n=m("span",t).find((function(t){return t.dataset.ratio===e}));n&&S(n,"art-current")}))}})}}function Zt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Jt(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Zt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:e.i18n.get("Video info"),click:function(t){e.info.show=!0,t.show=!1}})}}function Qt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Gt(t){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Qt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Qt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:'<a href="https://artplayer.org" target="_blank">ArtPlayer 3.5.9</a>'})}function Kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function te(t){return function(e){var n=e.i18n,r=e.player;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kt(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kt(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:n.get("Light Off"),click:function(t){r.light=!r.light,t.show=!1},mounted:function(t){e.on("light",(function(e){t.innerText=n.get(e?"Light On":"Light Off")}))}})}}function ee(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ne(t){return function(e){return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ee(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ee(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:e.i18n.get("Close"),click:function(t){t.show=!1}})}}var re=function(e){function n(e){var r;t(this,n),(r=a(this,c(n).call(this,e))).name="contextmenu";var o=e.option,i=e.template,s=i.$player,l=i.$contextmenu,u=e.events.proxy;return r.$parent=l,e.once("ready",(function(){r.add(_t({disable:!o.playbackRate,name:"playbackRate",index:10})),r.add(Yt({disable:!o.aspectRatio,name:"aspectRatio",index:20})),r.add(Jt({disable:!1,name:"info",index:30})),r.add(Gt({disable:!1,name:"version",index:40})),r.add(te({disable:!o.light,name:"light",index:50})),r.add(ne({disable:!1,name:"close",index:60})),o.contextmenu.forEach((function(t){r.add(t)})),u(s,"contextmenu",(function(t){t.preventDefault(),r.show=!0;var e=t.clientX,n=t.clientY,o=s.getBoundingClientRect(),i=o.height,a=o.width,c=o.left,u=o.top,p=l.getBoundingClientRect(),f=p.height,d=p.width,h=e-c,b=n-u;e+d>c+a&&(h=a-d),n+f>u+i&&(b=i-f),k(l,{top:"".concat(b,"px"),left:"".concat(h,"px")})})),u(s,"click",(function(t){t.composedPath().includes(l)||(r.show=!1)})),e.on("blur",(function(){r.show=!1}))})),r}return l(n,e),n}(yt),oe=function(e){function n(e){var r;t(this,n),(r=a(this,c(n).call(this,e))).name="info";var o=e.template,i=o.$infoPanel,s=o.$infoClose,l=o.$video;(0,e.events.proxy)(s,"click",(function(){r.show=!1}));var u=null,p=m("[data-video]",i);return e.on("destroy",(function(){clearTimeout(u)})),e.on("info",(function(t){clearTimeout(u),t&&function t(){p.forEach((function(t){var e=l[t.dataset.video];t.innerText="number"==typeof e?e.toFixed(2):e})),u=setTimeout((function(){t()}),1e3)}()})),r}return l(n,e),n}(yt),ie=function(e){function r(e){var n;t(this,r),(n=a(this,c(r).call(this,e))).name="subtitle";var o=e.option.subtitle;return k(e.template.$subtitle,o.style),o.url&&n.init(o.url),n}return l(r,e),n(r,[{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"<p>".concat(G(t),"</p>")})).join(""),this.art.emit("subtitleUpdate",this.activeCue.text))}},{key:"switch",value:function(t,e,n){var r=this,o=this.art,i=o.i18n,a=o.notice;return this.init(t,n).then((function(t){return e&&(a.show="".concat(i.get("Switch subtitle"),": ").concat(e)),r.art.emit("subtitleSwitch",t),t}))}},{key:"init",value:function(t,e){var n=this,r=this.art,o=r.notice,i=r.events.proxy,a=r.template,c=a.$subtitle,s=a.$video;if(!a.$track){var l=document.createElement("track");l.default=!0,l.kind="metadata",s.appendChild(l),this.art.template.$track=l,i(this.textTrack,"cuechange",this.update.bind(this))}return fetch(t).then((function(t){return t.text()})).then((function(r){switch(n.art.emit("subtitleLoad",t),e||M(t)){case"srt":return L(A(r));case"ass":return L(C(r));case"vtt":return L(r);default:return t}})).then((function(t){return c.innerHTML="",n.url===t||(URL.revokeObjectURL(n.url),n.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]}}]),r}(yt);var ae=function(){function e(n){var r=this;t(this,e),this.destroyEvents=[],this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),this.loadImg=this.loadImg.bind(this),n.whitelist.state&&n.once("ready",(function(){!function(t,e){var n=t.controls,r=t.template.$player;e.proxy(document,["click","contextmenu"],(function(e){e.composedPath&&e.composedPath().indexOf(r)>-1?(t.isFocus=!0,t.emit("focus")):(t.isFocus=!1,t.emit("blur"))})),t.on("blur",(function(){n.delayHide()}))}(n,r),function(t,e){var n=t.controls,r=t.template.$player;e.hover(r,(function(){g(r,"art-hover"),t.emit("hover",!0)}),(function(){v(r,"art-hover"),t.emit("hover")})),t.on("hover",(function(t){t||n.delayHide()}))}(n,r),function(t,e){var n=t.template,r=n.$player,o=n.$video,i=t.player,a=t.controls;e.proxy(r,"mousemove",(function(e){t.emit("mousemove",e)})),t.on("mousemove",(function(t){a.cancelDelayHide(),v(r,"art-hide-cursor"),a.show=!0,i.pip||t.target!==o||a.delayHide()}))}(n,r),function(t,e){var n=t.option,r=t.player,o=Z((function(){r.normal&&(r.autoSize=n.autoSize),r.aspectRatioReset=!0,t.emit("resize")}),500);e.proxy(window,["orientationchange","resize"],(function(){o()}))}(n,r),function(t,e){if(t.isMobile&&!t.option.isLive){var n=t.player,r=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=J((t.touches[0].clientX-a)/o.clientWidth,-1,1);c=J(n.currentTime+60*e,0,n.duration),r.show="".concat(Q(c)," / ").concat(Q(n.duration))}})),e.proxy(document,"touchend",(function(){i&&c&&(n.seek=c),i=!1,a=0,c=0}))}}(n,r),function(t,e){var n=t.player,r=t.option.autoMini,o=t.template.$container,i=Y((function(){t.emit("view",$(o))}),200);e.proxy(window,"scroll",(function(){i()})),t.on("view",(function(t){r&&(n.mini=!t)}))}(n,r)}))}return n(e,[{key:"proxy",value:function(t,e,n){var r=this,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(Array.isArray(e))return e.map((function(e){return r.proxy(t,e,n,o)}));t.addEventListener(e,n,o);var i=function(){return t.removeEventListener(e,n,o)};return this.destroyEvents.push(i),i}},{key:"hover",value:function(t,e,n){e&&this.proxy(t,"mouseenter",e),n&&this.proxy(t,"mouseleave",n)}},{key:"loadImg",value:function(t){var e=this;return new Promise((function(n,r){var o;if(t instanceof HTMLImageElement)o=t;else{if("string"!=typeof t)return r(t);(o=new Image).src=t}return o.complete?n(o):(e.proxy(o,"load",(function(){return n(o)})),e.proxy(o,"error",(function(){return r(o)})),t)}))}},{key:"destroy",value:function(){this.destroyEvents.forEach((function(t){return t()}))}}]),e}(),ce=function(){function e(n){var r=this;t(this,e),this.keys={};var o=n.option,i=n.player,a=n.events.proxy;o.hotkey&&n.once("ready",(function(){r.add(27,(function(){i.fullscreenWeb&&(i.fullscreenWeb=!1)})),r.add(32,(function(){i.toggle=!0})),r.add(37,(function(){i.backward=5})),r.add(38,(function(){i.volume+=.1})),r.add(39,(function(){i.forward=5})),r.add(40,(function(){i.volume-=.1})),a(window,"keydown",(function(t){if(n.isFocus){var e=document.activeElement.tagName.toUpperCase(),o=document.activeElement.getAttribute("contenteditable");if("INPUT"!==e&&"TEXTAREA"!==e&&""!==o&&"true"!==o){var i=r.keys[t.keyCode];i&&(t.preventDefault(),i.forEach((function(t){return t()})),n.emit("hotkey",t))}}}))}))}return n(e,[{key:"add",value:function(t,e){this.keys[t]?this.keys[t].push(e):this.keys[t]=[e]}}]),e}(),se=function(e){function n(e){var r;return t(this,n),(r=a(this,c(n).call(this,e))).name="layer",r.$parent=e.template.$layer,e.once("ready",(function(){e.option.layers.forEach((function(t){r.add(t)}))})),r}return l(n,e),n}(yt),le=function(e){function n(e){var r;return t(this,n),(r=a(this,c(n).call(this,e))).name="loading",x(e.template.$loading,e.icons.loading),r}return l(n,e),n}(yt),ue=function(){function e(n){t(this,e),this.art=n,this.time=2e3,this.timer=null}return n(e,[{key:"show",set:function(t){var e=this.art.template,n=e.$player,r=e.$noticeInner;r.innerText=t instanceof Error?t.message.trim():t,g(n,"art-notice-show"),clearTimeout(this.timer),this.timer=setTimeout((function(){r.innerText="",v(n,"art-notice-show")}),this.time)}}]),e}(),pe=function(e){function n(e){var r;return t(this,n),(r=a(this,c(n).call(this,e))).name="mask",x(e.template.$state,e.icons.state),r}return l(n,e),n}(yt);function fe(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var de=function e(n){var r=this;t(this,e);var o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?fe(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):fe(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({loading:'<svg xmlns="http://www.w3.org/2000/svg" width="50px" height="50px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default"><rect x="0" y="0" width="100" height="100" fill="none" class="bk"/><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(0 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-1s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(30 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(60 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(90 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.75s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(120 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(150 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(180 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(210 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(240 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(270 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.25s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(300 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"/></rect><rect x="47" y="40" width="6" height="20" rx="5" ry="5" fill="#ffffff" transform="rotate(330 50 50) translate(0 -30)"><animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"/></rect></svg>',state:'<svg xmlns="http://www.w3.org/2000/svg" height="60" width="60" style="filter: drop-shadow(0px 1px 1px black);" viewBox="0 0 24 24"><path d="M20,2H4C1.8,2,0,3.8,0,6v12c0,2.2,1.8,4,4,4h16c2.2,0,4-1.8,4-4V6C24,3.8,22.2,2,20,2z M15.6,12.8L10.5,16 C9.9,16.5,9,16,9,15.2V8.8C9,8,9.9,7.5,10.5,8l5.1,3.2C16.3,11.5,16.3,12.5,15.6,12.8z"/></svg>',play:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M17.982 9.275L8.06 3.27A2.013 2.013 0 0 0 5 4.994v12.011a2.017 2.017 0 0 0 3.06 1.725l9.922-6.005a2.017 2.017 0 0 0 0-3.45z"></path></svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M7 3a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2zM15 3a2 2 0 0 0-2 2v12a2 2 0 1 0 4 0V5a2 2 0 0 0-2-2z"></path></svg>',volume:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M10.188 4.65L6 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39V5.04a.498.498 0 0 0-.812-.39zM14.446 3.778a1 1 0 0 0-.862 1.804 6.002 6.002 0 0 1-.007 10.838 1 1 0 0 0 .86 1.806A8.001 8.001 0 0 0 19 11a8.001 8.001 0 0 0-4.554-7.222z"></path><path d="M15 11a3.998 3.998 0 0 0-2-3.465v6.93A3.998 3.998 0 0 0 15 11z"></path></svg>',volumeClose:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><path d="M15 11a3.998 3.998 0 0 0-2-3.465v2.636l1.865 1.865A4.02 4.02 0 0 0 15 11z"></path><path d="M13.583 5.583A5.998 5.998 0 0 1 17 11a6 6 0 0 1-.585 2.587l1.477 1.477a8.001 8.001 0 0 0-3.446-11.286 1 1 0 0 0-.863 1.805zM18.778 18.778l-2.121-2.121-1.414-1.414-1.415-1.415L13 13l-2-2-3.889-3.889-3.889-3.889a.999.999 0 1 0-1.414 1.414L5.172 8H5a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h1l4.188 3.35a.5.5 0 0 0 .812-.39v-3.131l2.587 2.587-.01.005a1 1 0 0 0 .86 1.806c.215-.102.424-.214.627-.333l2.3 2.3a1.001 1.001 0 0 0 1.414-1.416zM11 5.04a.5.5 0 0 0-.813-.39L8.682 5.854 11 8.172V5.04z"></path></svg>',subtitle:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 48 48"><path d="M0 0h48v48H0z" fill="none"/><path d="M40 8H8c-2.21 0-4 1.79-4 4v24c0 2.21 1.79 4 4 4h32c2.21 0 4-1.79 4-4V12c0-2.21-1.79-4-4-4zM8 24h8v4H8v-4zm20 12H8v-4h20v4zm12 0h-8v-4h8v4zm0-8H20v-4h20v4z"/></svg>',screenshot:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 50 50">\t<path d="M 19.402344 6 C 17.019531 6 14.96875 7.679688 14.5 10.011719 L 14.097656 12 L 9 12 C 6.238281 12 4 14.238281 4 17 L 4 38 C 4 40.761719 6.238281 43 9 43 L 41 43 C 43.761719 43 46 40.761719 46 38 L 46 17 C 46 14.238281 43.761719 12 41 12 L 35.902344 12 L 35.5 10.011719 C 35.03125 7.679688 32.980469 6 30.597656 6 Z M 25 17 C 30.519531 17 35 21.480469 35 27 C 35 32.519531 30.519531 37 25 37 C 19.480469 37 15 32.519531 15 27 C 15 21.480469 19.480469 17 25 17 Z M 25 19 C 20.589844 19 17 22.589844 17 27 C 17 31.410156 20.589844 35 25 35 C 29.410156 35 33 31.410156 33 27 C 33 22.589844 29.410156 19 25 19 Z "/></svg>',setting:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22"><circle cx="11" cy="11" r="2"></circle><path d="M19.164 8.861L17.6 8.6a6.978 6.978 0 0 0-1.186-2.099l.574-1.533a1 1 0 0 0-.436-1.217l-1.997-1.153a1.001 1.001 0 0 0-1.272.23l-1.008 1.225a7.04 7.04 0 0 0-2.55.001L8.716 2.829a1 1 0 0 0-1.272-.23L5.447 3.751a1 1 0 0 0-.436 1.217l.574 1.533A6.997 6.997 0 0 0 4.4 8.6l-1.564.261A.999.999 0 0 0 2 9.847v2.306c0 .489.353.906.836.986l1.613.269a7 7 0 0 0 1.228 2.075l-.558 1.487a1 1 0 0 0 .436 1.217l1.997 1.153c.423.244.961.147 1.272-.23l1.04-1.263a7.089 7.089 0 0 0 2.272 0l1.04 1.263a1 1 0 0 0 1.272.23l1.997-1.153a1 1 0 0 0 .436-1.217l-.557-1.487c.521-.61.94-1.31 1.228-2.075l1.613-.269a.999.999 0 0 0 .835-.986V9.847a.999.999 0 0 0-.836-.986zM11 15a4 4 0 1 1 0-8 4 4 0 0 1 0 8z"></path></svg>',fullscreen:'<svg xmlns="http://www.w3.org/2000/svg" height="36" width="36" viewBox="0 0 36 36">\t<path d="m 10,16 2,0 0,-4 4,0 0,-2 L 10,10 l 0,6 0,0 z"></path>\t<path d="m 20,10 0,2 4,0 0,4 2,0 L 26,10 l -6,0 0,0 z"></path>\t<path d="m 24,24 -4,0 0,2 L 26,26 l 0,-6 -2,0 0,4 0,0 z"></path>\t<path d="M 12,20 10,20 10,26 l 6,0 0,-2 -4,0 0,-4 0,0 z"></path></svg>',fullscreenWeb:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" height="36" width="36">\t<path d="m 28,11 0,14 -20,0 0,-14 z m -18,2 16,0 0,10 -16,0 0,-10 z" fill-rule="evenodd"></path></svg>',pip:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 36 36" height="32" width="32"><path d="M25,17 L17,17 L17,23 L25,23 L25,17 L25,17 Z M29,25 L29,10.98 C29,9.88 28.1,9 27,9 L9,9 C7.9,9 7,9.88 7,10.98 L7,25 C7,26.1 7.9,27 9,27 L27,27 C28.1,27 29,26.1 29,25 L29,25 Z M27,25.02 L9,25.02 L9,10.97 L27,10.97 L27,25.02 L27,25.02 Z"></path></svg>'},n.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)),x(e,o[t]),r[t]=e}))};function he(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function be(t){return function(e){var n=e.i18n,r=e.player;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?he(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:'<div class="art-setting-header">'.concat(n.get("Flip"),'</div><div class="art-setting-radio"><div class="art-radio-item current"><button type="button" data-value="normal">').concat(n.get("Normal"),'</button></div><div class="art-radio-item"><button type="button" data-value="horizontal">').concat(n.get("Horizontal"),'</button></div><div class="art-radio-item"><button type="button" data-value="vertical">').concat(n.get("Vertical"),"</button></div></div>"),click:function(t,e){var n=e.target.dataset.value;n&&(r.flip=n)},mounted:function(t){e.on("flip",(function(e){var n=m("button",t).find((function(t){return t.dataset.value===e}));n&&S(n.parentElement,"current")}))}})}}function ye(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function me(t){return function(e){var n=e.i18n,r=e.player;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ye(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:'<div class="art-setting-header">'.concat(n.get("Aspect ratio"),'</div><div class="art-setting-radio"><div class="art-radio-item current"><button type="button" data-value="default">').concat(n.get("Default"),'</button></div><div class="art-radio-item"><button type="button" data-value="4:3">4:3</button></div><div class="art-radio-item"><button type="button" data-value="16:9">16:9</button></div></div>'),click:function(t,e){var n=e.target.dataset.value;n&&(r.aspectRatio=n)},mounted:function(t){e.on("aspectRatio",(function(e){var n=m("button",t).find((function(t){return t.dataset.value===e}));n&&S(n.parentElement,"current")}))}})}}function ge(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ve(t){return function(e){var n=e.i18n,r=e.player,o=e.events.proxy;return function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ge(Object(n),!0).forEach((function(e){tt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ge(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t,{html:'<div class="art-setting-header">'.concat(n.get("Play speed"),': <span class="art-subtitle-value">1.0</span>x</div><div class="art-setting-range"><input class="art-subtitle-range" value="1" type="range" min="0.5" max="2" step="0.25"></div>'),mounted:function(t){var n=y(".art-setting-range input",t),i=y(".art-subtitle-value",t);o(n,"change",(function(){var t=n.value;i.innerText=t,r.playbackRate=Number(t)})),e.on("playbackRate",(function(t){t&&n.value!==t&&(n.value=t,i.innerText=t)}))}})}}var we=function(e){function n(e){var r;t(this,n),(r=a(this,c(n).call(this,e))).name="setting";var o=e.option,i=e.template,s=i.$setting,l=i.$settingBody,u=e.events.proxy;return r.$parent=l,o.setting&&(e.once("ready",(function(){u(s,"click",(function(t){t.target===s&&(r.show=!1)})),r.add(be({disable:!o.flip,name:"flip"})),r.add(me({disable:!o.aspectRatio,name:"aspectRatio"})),r.add(ve({disable:!o.playbackRate,name:"playbackRate"}))})),e.on("blur",(function(){r.show=!1}))),r}return l(n,e),n}(yt),xe=function(){function e(){t(this,e),this.name="artplayer_settings"}return n(e,[{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(),tt({},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)}}]),e}();function Oe(t){var e=t.i18n,n=t.subtitle,r=t.events.proxy;return{title:"Subtitle",name:"subtitleOffset",index:20,html:'<div class="art-setting-header">'.concat(e.get("Subtitle offset time"),': <span class="art-subtitle-value">0</span>s</div><div class="art-setting-range"><input class="art-subtitle-range" value="0" type="range" min="-5" max="5" step="0.5"></div>'),mounted:function(e){var o=y(".art-setting-range input",e),i=y(".art-subtitle-value",e);r(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){n.update(),o.value!==t&&(o.value=t,i.innerText=t)}))}}}function ke(t){var e=t.constructor.utils.clamp,n=t.setting,r=t.notice,o=t.template,i=t.i18n,a=t.player;n.add(Oe);var c=[];return t.on("subtitle:switch",(function(){c=[]})),{name:"subtitleOffset",offset:function(n){if(o.$track&&o.$track.track){var s=Array.from(o.$track.track.cues),l=e(n,-5,5);s.forEach((function(t,n){c[n]||(c[n]={startTime:t.startTime,endTime:t.endTime}),t.startTime=e(c[n].startTime+l,0,a.duration),t.endTime=e(c[n].endTime+l,0,a.duration)})),r.show="".concat(i.get("Subtitle offset time"),": ").concat(n,"s"),t.emit("subtitleOffset",n)}else r.show="".concat(i.get("No subtitles found")),t.emit("subtitleOffset",0)}}}function je(t){var e=t.events.proxy,n=t.template,r=t.player,o=t.option,i=t.setting,a=t.i18n;function c(e){if(e){var i=n.$video.canPlayType(e.type);if("maybe"===i||"probably"===i){var a=URL.createObjectURL(e);o.title=e.name,r.switchUrl(a,e.name),t.emit("localVideo",e)}else z(!1,"Playback of this file format is not supported")}}function s(t){var n=x(t,'<input type="file">');O(t,"position","relative"),k(n,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),e(n,"change",(function(){c(n.files[0])}))}return e(n.$player,"dragover",(function(t){t.preventDefault()})),e(n.$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:'<div class="art-setting-header">'.concat(a.get("Local Video"),'</div><div class="art-setting-upload"><div class="art-upload-btn">').concat(a.get("Open"),'</div><div class="art-upload-value"></div></div>'),mounted:function(e){var n=y(".art-upload-btn",e),r=y(".art-upload-value",e);t.on("localVideo",(function(t){r.textContent=t.name,r.title=t.name})),s(n)}})})),{name:"localVideo",attach:s}}function Pe(t){var e=t.events.proxy,n=t.subtitle,r=t.setting,o=t.i18n;function i(r){var o=x(r,'<input type="file">');O(r,"position","relative"),k(o,{position:"absolute",width:"100%",height:"100%",left:"0",top:"0",opacity:"0"}),e(o,"change",(function(){!function(e){if(e){var r=M(e.name);if(["ass","vtt","srt"].includes(r)){var o=URL.createObjectURL(e);n.switch(o,e.name,r),t.emit("localSubtitle",e)}else z(!1,"Only supports subtitle files in .ass, .vtt and .srt format")}}(o.files[0])}))}return t.once("ready",(function(){r.add({title:"Local Subtitle",name:"localSubtitle",index:40,html:'<div class="art-setting-header">'.concat(o.get("Local Subtitle"),'</div><div class="art-setting-upload"><div class="art-upload-btn">').concat(o.get("Open"),'</div><div class="art-upload-value"></div></div>'),mounted:function(e){var n=y(".art-upload-btn",e),r=y(".art-upload-value",e);t.on("localSubtitle",(function(t){r.textContent=t.name,r.title=t.name})),i(n)}})})),{name:"localSubtitle",attach:i}}function Se(t){var e=t.layers,n=t.player,r=t.option.theme;return e.add({name:"miniProgressBar",style:{display:"none",position:"absolute",left:0,right:0,bottom:0,height:"2px",background:r},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*n.played,"%")}))}}),{name:"miniProgressBar"}}function Ee(t){var e=1e4,n=0,r=0,o=0,i=null;function a(){n=0,r=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;r+=c,t.player.playing||(n+=c)}o=i,t.emit("networkMonitor",n/r),r>=e&&(n=0,r=0),a()})))}()}return t.on("play",c),t.on("pause",a),{name:"networkMonitor",reset:a,start:c,sample:function(t){e=t}}}function $e(t){var e=t.controls,n=t.option,r=t.events.hover;function o(n){var o,i,a,c=n.list.map((function(t){return'<div class="art-switcher-item" data-switcher-name="'.concat(t.name,'">').concat(t.text,"</div>")})).join(""),s='<div class="art-switcher-list">'.concat(c,'</div><div class="art-switcher-current"></div>');e.add({name:n.name,position:"right",index:n.index,html:s,mounted:function(t){g(t,"art-control-switcher"),o=y(".art-switcher-list",t),i=m(".art-switcher-item",t),a=y(".art-switcher-current",t);var e=n.list.find((function(t){return t.name===n.default}))||n.list[0];if(e){a.innerText=e.text;var c=i.find((function(t){return t.dataset.switcherName===e.name}));c&&S(c,"art-current")}r(t,(function(){o.style.left="-".concat(j(o,"width")/2-j(t,"width")/2,"px")}))},click:function(e,r){var o=r.target.dataset.switcherName;if(o){var c=n.list.find((function(t){return t.name===o}));if(c){var s=i.find((function(t){return t.dataset.switcherName===c.name}));a.innerText=c.text,S(s,"art-current"),n.click&&n.click.call(t,o,r)}}}})}return n.switcher.forEach(o),{name:"switcher",add:o}}var De=function(){function e(n){var r=this;t(this,e),this.art=n,this.id=0;var o=n.option;o.subtitle.url&&o.subtitleOffset&&this.add(ke),!o.isLive&&o.miniProgressBar&&this.add(Se),o.localVideo&&this.add(je),o.localSubtitle&&this.add(Pe),o.networkMonitor&&this.add(Ee),this.add($e),n.option.plugins.forEach((function(t){r.add(t)}))}return n(e,[{key:"add",value:function(t){this.id+=1;var e=t.call(this,this.art),n=e&&e.name||t.name||"plugin".concat(this.id);return z(!N(this,n),"Cannot add a plugin that already has the same name: ".concat(n)),I(this,n,{value:e}),this}}]),e}(),Re=function e(n){t(this,e);var r=n.option,o=n.events.proxy,i=n.template.$video;it.events.forEach((function(t){o(i,t,(function(t){n.emit("video:".concat(t.type),t)}))})),Object.keys(r.moreVideoAttr).forEach((function(t){i[t]=r.moreVideoAttr[t]})),r.muted&&(i.muted=r.muted),r.volume&&(i.volume=J(r.volume,0,1)),r.poster&&(i.poster=r.poster),r.autoplay&&(i.autoplay=r.autoplay),i.controls=!0;var a=r.type||M(r.url),c=r.customType[a];a&&c?(c(i,r.url,n),n.emit("customType",a)):(i.src=r.url,n.emit("url",i.src))},Te=0,ze=[],Ae=function(e){function r(e){var n;return t(this,r),(n=a(this,c(r).call(this))).option=u(_(r.option,e),ot),n.isFocus=!1,n.isDestroy=!1,n.userAgent=f,n.isMobile=d,n.isWechat=b,n.whitelist=new at(i(n)),n.template=new ct(i(n)),n.events=new ae(i(n)),n.whitelist.state?(n.storage=new xe(i(n)),n.icons=new de(i(n)),n.i18n=new ut(i(n)),n.notice=new ue(i(n)),n.player=new dt(i(n)),n.layers=new se(i(n)),n.controls=new Nt(i(n)),n.contextmenu=new re(i(n)),n.subtitle=new ie(i(n)),n.info=new oe(i(n)),n.loading=new le(i(n)),n.hotkey=new ce(i(n)),n.mask=new pe(i(n)),n.setting=new we(i(n)),n.plugins=new De(i(n))):n.mobile=new Re(i(n)),Te+=1,n.id=Te,ze.push(i(n)),n}return l(r,e),n(r,[{key:"destroy",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.events.destroy(),this.template.destroy(t),ze.splice(ze.indexOf(this),1),this.isDestroy=!0,this.emit("destroy")}}],[{key:"instances",get:function(){return ze}},{key:"version",get:function(){return"3.5.9"}},{key:"env",get:function(){return'"production"'}},{key:"config",get:function(){return it}},{key:"utils",get:function(){return K}},{key:"scheme",get:function(){return ot}},{key:"Emitter",get:function(){return p}},{key:"validator",get:function(){return u}},{key:"kindOf",get:function(){return u.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:{}},moreVideoAttr:{controls:!1,preload:h?"auto":"metadata"},icons:{},customType:{},lang:navigator.language.toLowerCase()}}}]),r}(p);return console.log("%c ArtPlayer %c 3.5.9 %c https://artplayer.org","color: #fff; background: #5f5f5f","color: #fff; background: #4bc729",""),Ae}));
  