Files
ArtPlayer/docs/compiled/artplayer.legacy.js
T

71 lines
208 KiB
JavaScript

/*!
* artplayer.js v6.0.0
* Github: https://github.com/zhw2590582/ArtPlayer
* (c) 2017-2026 Harvey Zhao
* Released under the MIT License.
*
* ArtPlayer bundled third-party notices
*
*
* screenfull - reference v6.0.2, locally adapted
* https://github.com/sindresorhus/screenfull
* MIT License
*
* Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
* Hint.css v2.7.0 - scoped and styled for ArtPlayer
* https://github.com/chinchang/hint.css
* MIT License
*
* Copyright (c) 2021 Kushagra Gour
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* option-validator v2.0.6
* https://github.com/zhw2590582/option-validator
* MIT License
*
* Copyright (c) 2018 Harvey Zack
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
!function(t,e){"object"===typeof exports&&"undefined"!==typeof module?module.exports=e():"function"==typeof define&&define.amd?(t.Artplayer=e(),define(function(){return t.Artplayer})):(t="undefined"!==typeof globalThis?globalThis:t||self).Artplayer=e()}(this,function(){"use strict";var t=Object.defineProperty,e=Object.defineProperties,r=Object.getOwnPropertyDescriptors,n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable,a=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,s=(t,e)=>{for(var r in e||(e={}))o.call(e,r)&&a(t,r,e[r]);if(n)for(var r of n(e))i.call(e,r)&&a(t,r,e[r]);return t},l=(t,n)=>e(t,r(n)),c=(t,e,r)=>new Promise((n,o)=>{var i=t=>{try{s(r.next(t))}catch(e){o(e)}},a=t=>{try{s(r.throw(t))}catch(e){o(e)}},s=t=>t.done?n(t.value):Promise.resolve(t.value).then(i,a);s((r=r.apply(t,e)).next())});function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var u,p={exports:{}};var f=(u||(u=1,p.exports=function(){function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}var e=Object.prototype.toString,r=function(r){if(void 0===r)return"undefined";if(null===r)return"null";var o=t(r);if("boolean"===o)return"boolean";if("string"===o)return"string";if("number"===o)return"number";if("symbol"===o)return"symbol";if("function"===o)return"GeneratorFunction"===n(r)?"generatorfunction":"function";if(function(t){return Array.isArray?Array.isArray(t):t instanceof Array}(r))return"array";if(function(t){return!(!t.constructor||"function"!=typeof t.constructor.isBuffer)&&t.constructor.isBuffer(t)}(r))return"buffer";if(function(t){try{if("number"==typeof t.length&&"function"==typeof t.callee)return!0}catch(e){if(-1!==e.message.indexOf("callee"))return!0}return!1}(r))return"arguments";if(function(t){return t instanceof Date||"function"==typeof t.toDateString&&"function"==typeof t.getDate&&"function"==typeof t.setDate}(r))return"date";if(function(t){return t instanceof Error||"string"==typeof t.message&&t.constructor&&"number"==typeof t.constructor.stackTraceLimit}(r))return"error";if(function(t){return t instanceof RegExp||"string"==typeof t.flags&&"boolean"==typeof t.ignoreCase&&"boolean"==typeof t.multiline&&"boolean"==typeof t.global}(r))return"regexp";switch(n(r)){case"Symbol":return"symbol";case"Promise":return"promise";case"WeakMap":return"weakmap";case"WeakSet":return"weakset";case"Map":return"map";case"Set":return"set";case"Int8Array":return"int8array";case"Uint8Array":return"uint8array";case"Uint8ClampedArray":return"uint8clampedarray";case"Int16Array":return"int16array";case"Uint16Array":return"uint16array";case"Int32Array":return"int32array";case"Uint32Array":return"uint32array";case"Float32Array":return"float32array";case"Float64Array":return"float64array"}if(function(t){return"function"==typeof t.throw&&"function"==typeof t.return&&"function"==typeof t.next}(r))return"generator";switch(o=e.call(r)){case"[object Object]":return"object";case"[object Map Iterator]":return"mapiterator";case"[object Set Iterator]":return"setiterator";case"[object String Iterator]":return"stringiterator";case"[object Array Iterator]":return"arrayiterator"}return o.slice(8,-1).toLowerCase().replace(/\s/g,"")};function n(t){return t.constructor?t.constructor.name:null}function o(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:["option"];return i(t,e,n),a(t,e,n),function(t,e,n){var s=r(e),l=r(t);if("object"===s){if("object"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'object' type, but got '").concat(l,"'"));Object.keys(e).forEach(function(r){var s=t[r],l=e[r],c=n.slice();c.push(r),i(s,l,c),a(s,l,c),o(s,l,c)})}if("array"===s){if("array"!==l)throw new Error("[Type Error]: '".concat(n.join("."),"' require 'array' type, but got '").concat(l,"'"));t.forEach(function(r,s){var l=t[s],c=e[s]||e[0],d=n.slice();d.push(s),i(l,c,d),a(l,c,d),o(l,c,d)})}}(t,e,n),t}function i(t,e,n){if("string"===r(e)){var o=r(t);if("?"===e[0]&&(e=e.slice(1)+"|undefined"),!(-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(n.join("."),"' require '").concat(e,"' type, but got '").concat(o,"'"))}}function a(t,e,n){if("function"===r(e)){var o=e(t,r(t),n);if(!0!==o){var i=r(o);throw"string"===i?new Error(o):"error"===i?o:new Error("[Validator Error]: The scheme for '".concat(n.join("."),"' validator require return true, but got '").concat(o,"'"))}}}return o.kindOf=r,o}()),p.exports);const h=d(f),m="6.0.0";function v(t,e){let r=document.getElementById(t);r||(r=document.createElement("style"),r.id=t,"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{document.head.appendChild(r)}):(document.head||document.documentElement).appendChild(r)),r.textContent=e}const g=globalThis.CUSTOM_USER_AGENT,y=null!=g?g:"undefined"===typeof navigator?"":navigator.userAgent,b=/^(?:(?!chrome|android).)*safari/i.test(y),w=/iPad|iPhone|iPod/i.test(y)&&("undefined"===typeof window||!window.MSStream),x=w||y.includes("Macintosh")&&"undefined"!==typeof navigator&&navigator.maxTouchPoints>=1,k=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(y)||x,$="undefined"!==typeof window&&"undefined"!==typeof document;const E={properties:["audioTracks","autoplay","buffered","controller","controls","crossOrigin","currentSrc","currentTime","defaultMuted","defaultPlaybackRate","duration","ended","error","loop","mediaGroup","muted","networkState","paused","playbackRate","played","preload","readyState","seekable","seeking","src","startDate","textTracks","videoTracks","volume"],methods:["addTextTrack","canPlayType","load","play","pause"],events:["abort","canplay","canplaythrough","durationchange","emptied","ended","error","loadeddata","loadedmetadata","loadstart","pause","play","playing","progress","ratechange","seeked","seeking","stalled","suspend","timeupdate","volumechange","waiting"],prototypes:["width","height","videoWidth","videoHeight","poster","webkitDecodedFrameCount","webkitDroppedFrameCount","playsInline","webkitSupportsFullscreen","webkitDisplayingFullscreen","onenterpictureinpicture","onleavepictureinpicture","disablePictureInPicture","cancelVideoFrameCallback","requestVideoFrameCallback","getVideoPlaybackQuality","requestPictureInPicture","webkitEnterFullScreen","webkitEnterFullscreen","webkitExitFullScreen","webkitExitFullscreen"]};class A extends Error{constructor(t){super("Failed to release ArtPlayer resources"),this.errors=t,this.name="ResourceCleanupError"}}class C{constructor(){this.cleanups=new Set,this.disposed=!1}get closed(){return this.disposed}add(t){let e=!0;const r=()=>{e&&(e=!1,this.cleanups.delete(r),t())};return this.closed?r():this.cleanups.add(r),r}child(){const t=new C,e=this.add(()=>{t.dispose()});return t.add(()=>{e()}),t}dispose(){if(this.closed)return;this.disposed=!0;const t=[];for(const r of Array.from(this.cleanups).reverse())try{r()}catch(e){e instanceof A?t.push(...e.errors):t.push(e)}if(t.length)throw new A(t)}}const S=new WeakMap,T=new WeakMap;function L(t){const e=S.get(t);if(!e)throw new Error("ArtPlayer lifecycle has not been initialized");return e}function P(t){return L(t).scope}function M(t){const e=L(t);return e.destroying||e.scope.closed}function z(t,e,r,n,o=!1){var i,a,s;const l=L(t);if(l.destroying||l.scope.closed)return;l.destroying=!0;const c=[],d=t=>{try{t()}catch(e){c.push(...e instanceof A?e.errors:[e])}};n&&(null==(i=t.template)?void 0:i.$video)&&d(()=>t.reset()),d(()=>l.scope.dispose()),d(()=>{var e;return null==(e=t.template||l.mountingTemplate)?void 0:e.destroy(r)});const u=e.indexOf(t);-1!==u&&e.splice(u,1),t.isDestroy=!0,o||(null==(a=l.releaseContainer)||a.call(l),l.releaseContainer=void 0),d(()=>t.emit("destroy")),d(()=>l.finalizers.dispose()),o&&l.rollback&&d(l.rollback),l.rollback=void 0,null==(s=l.releaseContainer)||s.call(l),l.releaseContainer=void 0;for(const p of c.slice(1))console.warn("Additional ArtPlayer cleanup failure:",p);if(c.length)throw c[0]}const R=new WeakMap;function O(t,e){const r=P(t).child();return R.set(e,r),r}function D(t){const e=R.get(t);if(!e)throw new Error("ArtPlayer component has not been registered");return e}function I(t){var e;null==(e=R.get(t))||e.dispose()}function N(t,e,r,n){const o=D(e);if(o.closed)return;const i=(...t)=>{if(!o.closed)return n(...t)};t.on(r,i),o.add(()=>{t.off(r,i)})}function _(t,e){return{on:(r,n)=>{N(t,e,r,n)},proxy:(r,n,o)=>function(t,e,r,n,o){const i=D(e);if(i.closed)return()=>{};const a=t.events.proxy(r,n,t=>{if(!i.closed)return o(t)});return i.add(()=>{t.events.remove(a)})}(t,e,r,n,o)}}function W(t){var e;if(t.composedPath)return t.composedPath();const r=[];let n=t.target;for(;n;)r.push(n),n=null!=(e=n.parentNode)?e:null;return"undefined"===typeof window||r.includes(window)||r.push(window),r}function F(t,e){return W(t).includes(e)}function V(){const t=document.createElement("div");return t.style.display="flex","flex"===t.style.display}function Y(t){return t.getBoundingClientRect()}function B(){const t=document.createElement("div");t.style.cssText="position:fixed;top:env(safe-area-inset-top,0px);right:env(safe-area-inset-right,0px);bottom:env(safe-area-inset-bottom,0px);left:env(safe-area-inset-left,0px);pointer-events:none;visibility:hidden;";try{document.body.appendChild(t);const e=getComputedStyle(t);return{top:Number.parseFloat(e.top)||0,right:Number.parseFloat(e.right)||0,bottom:Number.parseFloat(e.bottom)||0,left:Number.parseFloat(e.left)||0}}finally{t.remove()}}function H(t,e=document){return e.querySelector(t)}function j(t,e){return t.classList.add(e)}function q(t,e){return t.classList.remove(e)}function U(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 G(t){return Array.from(t.parentElement.children).filter(e=>e!==t)}function K(t,e){G(t).forEach(t=>q(t,e)),j(t,e)}function Z(t,e){return e.parentNode.replaceChild(t,e),t}function J(t){return document.createElement(t)}function Q(t,e,r="top"){k||(t.setAttribute("aria-label",e),j(t,"hint--rounded"),j(t,`hint--${r}`))}function tt(t="",e=""){const r=J("i");return j(r,"art-icon"),j(r,`art-icon-${t}`),X(r,e),r}function et(t,e,r){return t.style[e]=r,t}function rt(t,e){for(const r in e)et(t,r,e[r]);return t}function nt(t,e,r){return new Promise((n,o)=>{const i=r?r.child():new C;let a=!1,s=()=>{};function l(t){if(!a){a=!0;try{i.dispose()}catch(e){console.warn("Additional image cleanup failure:",e)}try{s()}catch(e){console.warn("Additional image cleanup failure:",e)}o(t)}}function c(t){if(!a&&!i.closed){a=!0;try{i.dispose(),n(t)}catch(e){try{s()}finally{o(e)}}}}if(i.add(()=>{if(!a){a=!0;try{s()}finally{n(void 0)}}}),!i.closed)try{const n=new Image;d(n,()=>{if(!e||1===e)return void c(n);const t=document.createElement("canvas"),o=t.getContext("2d");if(t.width=n.width*e,t.height=n.height*e,!o)throw new TypeError("Canvas 2D context is unavailable");a||i.closed||(o.drawImage(n,0,0,t.width,t.height),a||i.closed||t.toBlob(t=>{if(!a&&!i.closed)try{if(!t)throw new Error("Unable to encode thumbnail image");const e=URL.createObjectURL(t);let n=!1;const o=()=>{n||(n=!0,URL.revokeObjectURL(e))};if(s=r?r.add(o):o,a||i.closed)return void s();const l=new Image;d(l,()=>c(l)),i.closed||(l.src=e)}catch(e){l(e)}}))}),i.closed||(n.src=t)}catch(u){l(u)}function d(e,r){e.onload=()=>{if(!a&&!i.closed)try{r()}catch(u){l(u)}},e.onerror=()=>l(new Error(`Image load failed: ${t}`)),i.add(()=>{e.onload=null,e.onerror=null,a||e.removeAttribute("src")})}})}class ot extends Error{constructor(t,e){super(t),"captureStackTrace"in Error&&"function"===typeof Error.captureStackTrace&&Error.captureStackTrace(this,e||this.constructor),this.name="ArtPlayerError"}}function it(t,e){if(!t)throw new ot(e);return t}function at(t){const e=t;return e&&"function"===typeof e.catch?e.catch(()=>{}):t}function st(t){const e=t.search(/[?#]/),r=(e<0?t:t.slice(0,e)).trim().toLowerCase();return r.slice(r.lastIndexOf(".")+1)}function lt(t,e){const r=document.createElement("a");r.style.display="none",r.href=t,r.download=e,document.body.appendChild(r);try{r.click()}finally{r.remove()}}function ct(t,e,r){return Math.max(Math.min(t,Math.max(e,r)),Math.min(e,r))}function dt(t){return t.charAt(0).toUpperCase()+t.slice(1)}function ut(t){if(!t)return"00:00";const e=Math.floor(t/3600),r=Math.floor((t-3600*e)/60),n=Math.floor(t-3600*e-60*r);return(e>0?[e,r,n]:[r,n]).map(t=>t<10?`0${t}`:String(t)).join(":")}const pt={"&":"&amp;","<":"&lt;",">":"&gt;","'":"&#39;",'"':"&quot;"},ft={"&amp;":"&","&lt;":"<","&gt;":">","&#39;":"'","&quot;":'"'},ht=/(&amp;|&lt;|&gt;|&#39;|&quot;)/g;function mt(t){return t.replace(/[&<>'"]/g,t=>pt[t]||t)}const vt=Object.defineProperty,{hasOwnProperty:gt}=Object.prototype;function yt(t,e){return gt.call(t,e)}function bt(t,e){return Object.getOwnPropertyDescriptor(t,e)}function wt(...t){const e=t=>!!t&&"object"===typeof t&&!Array.isArray(t);return t.reduce((t,r)=>(Object.keys(r).forEach(n=>{const o=t[n],i=r[n];let a;a=Array.isArray(o)&&Array.isArray(i)?o.concat(...i):e(o)&&e(i)?wt(o,i):i,vt(t,n,{value:a,enumerable:!0,configurable:!0,writable:!0})}),t),{})}function xt(t){return"WEBVTT \r\n\r\n".concat((e=t,e.replace(/(\d\d:\d\d:\d\d)[,.](\d+)/g,(t,e,r)=>{let n=r.slice(0,3);return 1===r.length&&(n=`${r}00`),2===r.length&&(n=`${r}0`),`${e},${n}`})).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").replace(/\{[\s\S]*?\}/g,"").concat("\r\n\r\n"));var e}function kt(t){return URL.createObjectURL(new Blob([t],{type:"text/vtt"}))}function $t(t){const e=new RegExp("Dialogue:\\s\\d,(\\d+:\\d\\d:\\d\\d.\\d\\d),(\\d+:\\d\\d:\\d\\d.\\d\\d),([^,]*),([^,]*),(?:[^,]*,){4}([\\s\\S]*)$","i");function r(t=""){return t.split(/[:.]/).map((t,e,r)=>{if(e===r.length-1){if(1===t.length)return`.${t}00`;if(2===t.length)return`.${t}0`}else if(1===t.length)return(0===e?"0":":0")+t;return 0===e?t:e===r.length-1?`.${t}`:`:${t}`}).join("")}return`WEBVTT\n\n${t.split(/\r?\n/).map(t=>{const n=t.match(e);if(!n)return null;const[,o="",i="",,,a=""]=n;return{start:r(o.trim()),end:r(i.trim()),text:a.replace(/\{[\s\S]*?\}/g,"").replace(/(\\N)/g,"\n").trim().split(/\r?\n/).map(t=>t.trim()).join("\n")}}).filter(t=>t).map((t,e)=>t?`${e+1}\n${t.start} --\x3e ${t.end}\n${t.text}`:"").filter(t=>t.trim()).join("\n\n")}`}const Et=Object.freeze(Object.defineProperty({__proto__:null,ArtPlayerError:ot,addClass:j,append:X,assToVtt:$t,capitalize:dt,clamp:ct,createElement:J,debounce:function(t,e){let r;return function(...n){clearTimeout(r),r=setTimeout(()=>(r=void 0,t.apply(this,n)),e)}},def:vt,download:lt,errorHandle:it,escape:mt,get:bt,getComposedPath:W,getExt:st,getIcon:tt,getRect:Y,getSafeAreaInsets:B,getStyle:function(t,e,r=!0){const n=window.getComputedStyle(t,null).getPropertyValue(e);return r?Number.parseFloat(n):n},has:yt,hasClass:U,includeFromEvent:F,inverseClass:K,isBrowser:$,isIOS:w,isIOS13:x,isInViewport:function(t,e=0){const r=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,o=window.innerWidth||document.documentElement.clientWidth,i=r.top-e<=n&&r.top+r.height+e>=0,a=r.left-e<=o+e&&r.left+r.width+e>=0;return i&&a},isMobile:k,isSafari:b,loadImg:function(t,e){return nt(t,e,void 0)},mergeDeep:wt,query:H,queryAll:function(t,e=document){return Array.from(e.querySelectorAll(t))},remove:function(t){return t.parentNode.removeChild(t)},removeClass:q,replaceElement:Z,secondToTime:ut,setStyle:et,setStyleText:v,setStyles:rt,siblings:G,silencePromise:at,sleep:function(t=0){return new Promise(e=>setTimeout(e,t))},srtToVtt:xt,supportsFlex:V,throttle:function(t,e){let r=!1;return function(...n){r||(t.apply(this,n),r=!0,setTimeout(()=>{r=!1},e))}},tooltip:Q,unescape:function(t){return t.replace(ht,t=>ft[t]||t)},userAgent:y,vttToBlob:kt},Symbol.toStringTag,{value:"Module"}));function At(){}function Ct(t,e,r,n,o={}){const{capture:i=!1,once:a=!1,signal:s}=o;if(t.closed||(null==s?void 0:s.aborted))return At;let l=At;function c(e){a&&l(),t.closed||("function"===typeof n?n.call(this,e):n.handleEvent(e))}return e.addEventListener(r,c,o),l=t.add(()=>{try{e.removeEventListener(r,c,i)}finally{null==s||s.removeEventListener("abort",l)}}),null==s||s.addEventListener("abort",l,{once:!0}),l}function St(t,e,r){if(t.closed)return At;let n=!0,o=At;const i=setTimeout(()=>{n&&(o(),t.closed||e())},r);return o=t.add(()=>{n=!1,clearTimeout(i)}),o}function Tt(t,e=0){return t.closed?Promise.resolve(!1):new Promise(r=>{let n=!1,o=At;const i=setTimeout(()=>{n=!0,o(),r(!0)},e);o=t.add(()=>{clearTimeout(i),n||r(!1)})})}const Lt=new WeakSet;function Pt(t){Lt.add(t),t.preventDefault()}function Mt(t){return!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.isComposing&&229!==t.keyCode}function zt(t,e,r=()=>e.click(),n=()=>!0){if(t.closed)return;e.hasAttribute("role")||e.setAttribute("role","button"),e.hasAttribute("tabindex")||(e.tabIndex=0);let o=!1;const i=()=>n()&&"true"!==e.getAttribute("aria-disabled")&&!e.hasAttribute("disabled"),a=t=>(t.composedPath()[0]||t.target)===e;Ct(t,e,"keydown",t=>{const e=t;a(e)&&Mt(e)&&!e.defaultPrevented&&("Enter"===e.key?(Pt(e),!e.repeat&&i()&&r()):" "===e.key&&(Pt(e),!e.repeat&&i()&&(o=!0)))}),Ct(t,e,"keyup",t=>{const n=t;if(" "!==n.key)return;const s=o;o=!1,s&&a(n)&&Mt(n)&&!n.defaultPrevented&&i()&&e.ownerDocument.activeElement===e&&(Pt(n),r())}),Ct(t,e,"blur",()=>{o=!1}),t.add(()=>{o=!1})}function Rt(t,e){return X(t,e)}function Ot(t,e){return e.querySelector(t)}const Dt=new WeakSet;function It(t){const e=t.template.$player;!M(t)&&e.isConnected&&(e.hasAttribute("tabindex")||(e.setAttribute("tabindex","-1"),Dt.has(e)||(Dt.add(e),P(t).add(()=>{Dt.delete(e),"-1"===e.getAttribute("tabindex")&&e.removeAttribute("tabindex")}))),e.focus({preventScroll:!0}))}const Nt=new WeakSet,_t="[tabindex],button,input,select,textarea,a[href],[contenteditable]";function Wt(t){return[t,...t.querySelectorAll(_t)].find(t=>{var e;if(!t.matches(_t)||t.tabIndex<0||t.matches(":disabled")||t.closest("[inert]")||"true"===t.getAttribute("aria-disabled")||!t.getClientRects().length)return!1;const r=null==(e=t.ownerDocument.defaultView)?void 0:e.getComputedStyle(t);return"hidden"!==(null==r?void 0:r.visibility)&&"collapse"!==(null==r?void 0:r.visibility)})}function Ft(t,e,r){var n;const o=null==e?void 0:e.ownerDocument,i=null==o?void 0:o.activeElement;if(!["control","contextmenu"].includes(null!=(n=t.name)?n:"")||Nt.has(t)||!e||!o||!i||!e.contains(i))return()=>{};const a=t.art.template.$player,s=Array.from(a.querySelectorAll(`.art-${t.name}`)),l=s.indexOf(e),c=[...s.slice(l+1),...s.slice(0,l).reverse()];return Nt.add(t),()=>{var e;if(Nt.delete(t),M(t.art)||!a.isConnected||o.activeElement!==o.body)return;const n=r?null==(e=t.cache.get(r))?void 0:e.$ref:void 0;for(const t of[...n?[n]:[],...c]){if(!a.contains(t))continue;const e=Wt(t);if(e)return void e.focus({preventScroll:!0})}It(t.art)}}const Vt="array",Yt="boolean",Bt="string",Ht="number",jt="object",qt="function";function Ut(t,e,r){return it(e===Bt||e===Ht||t instanceof Element,`${r.join(".")} require '${Bt}' or 'Element' type`)}const Xt={html:Ut,disable:`?${Yt}`,name:`?${Bt}`,index:`?${Ht}`,style:`?${jt}`,click:`?${qt}`,mounted:`?${qt}`,tooltip:`?${Bt}|${Ht}`,width:`?${Ht}`,selector:`?${Vt}`,onSelect:`?${qt}`,switch:`?${Yt}`,onSwitch:`?${qt}`,range:`?${Vt}`,onRange:`?${qt}`,onChange:`?${qt}`},Gt={id:Bt,container:Ut,url:Bt,poster:Bt,type:Bt,theme:Bt,lang:Bt,volume:Ht,isLive:Yt,muted:Yt,autoplay:Yt,autoSize:Yt,autoMini:Yt,loop:Yt,flip:Yt,playbackRate:Yt,aspectRatio:Yt,screenshot:Yt,setting:Yt,hotkey:Yt,pip:Yt,mutex:Yt,backdrop:Yt,fullscreen:Yt,fullscreenWeb:Yt,subtitleOffset:Yt,miniProgressBar:Yt,useSSR:Yt,playsInline:Yt,lock:Yt,gesture:Yt,fastForward:Yt,autoPlayback:Yt,autoOrientation:Yt,airplay:Yt,proxy:`?${qt}`,plugins:[qt],layers:[Xt],contextmenu:[Xt],settings:[Xt],controls:[l(s({},Xt),{position:(t,e,r)=>{const n=["top","left","right"];return it("string"===typeof t&&n.includes(t),`${r.join(".")} only accept ${n.toString()} as parameters`)}})],quality:[{default:`?${Yt}`,html:Bt,url:Bt}],highlight:[{time:Ht,text:Bt}],thumbnails:{url:Bt,number:Ht,column:Ht,width:Ht,height:Ht,scale:Ht},subtitle:{url:Bt,name:Bt,type:Bt,style:jt,escape:Yt,encoding:Bt,onVttLoad:qt},moreVideoAttr:jt,i18n:jt,icons:jt,cssVar:jt,customType:jt},Kt=new WeakSet;class Zt{constructor(t){this.id=0,this.art=t,this.cache=new Map,this.add=this.add.bind(this),this.remove=this.remove.bind(this),this.update=this.update.bind(this)}get show(){return U(this.art.template.$player,`art-${this.name}-show`)}set show(t){const{$player:e}=this.art.template,r=`art-${this.name}-show`;t?j(e,r):q(e,r),this.art.emit(this.name,t)}toggle(){this.show=!this.show}add(t){var e;if(M(this.art))return;const r="function"===typeof t?t(this.art):t;if(M(this.art))return;if(r.html=r.html||"",h(r,Xt),!this.$parent||!this.name||r.disable)return;const n=r.name||`${this.name}${this.id}`,o=this.cache;it(!o.has(n),`Can't add an existing [${n}] to the [${this.name}]`),this.id+=1;const i=document.createElement("div"),a=O(this.art,i),s=[],l=Object.getOwnPropertyDescriptor(this,n);let c=!1;a.add(()=>{for(const t of s)this.art.events.remove(t)});try{if(a.closed)return;if(function(t,e,r,n,o,i){j(t,`art-${r}`),j(t,`art-${r}-${n}`);const a=Array.from(e.children);t.dataset.index=String(i.index||o);const s=a.find(e=>Number(e.dataset.index)>=Number(t.dataset.index));s?s.insertAdjacentElement("beforebegin",t):X(e,t),i.html&&X(t,i.html),i.style&&rt(t,i.style),i.tooltip&&Q(t,i.tooltip)}(i,this.$parent,this.name,n,this.id,r),a.closed)return;if(r.click){("control"===this.name&&!r.selector||"contextmenu"===this.name&&!i.querySelector("[data-value]"))&&!i.querySelector("button,input,select,textarea,a[href],[tabindex],[contenteditable]")&&zt(a,i);const t=this.art.events.proxy(i,"click",t=>{a.closed||(t.preventDefault(),r.click.call(this.art,this,t))});s.push(t)}if(r.selector&&["left","right"].includes(r.position)&&this.selector(r,i,s),a.closed)return;return function(t,e,r){const n=t;"__proto__"===e?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r}(this,n,i),c=!0,o.set(n,{$ref:i,events:s,option:r}),r.mounted&&r.mounted.call(this.art,i),i}catch(d){try{I(i)}catch(u){console.warn("ArtPlayer component cleanup failed:",u)}throw(null==(e=o.get(n))?void 0:e.$ref)===i&&o.delete(n),c&&this[n]===i&&(l?Object.defineProperty(this,n,l):delete this[n]),i.remove(),d}}remove(t){it(this.cache.has(t),`Can't find [${t}] from the [${this.name}]`);const e=this.cache.get(t);if(Kt.has(e))return;const r=Ft(this,e.$ref);Kt.add(e);try{e.option.beforeUnmount&&e.option.beforeUnmount.call(this.art,e.$ref);try{I(e.$ref)}finally{this.cache.get(t)===e&&(this.cache.delete(t),delete this[t]),e.$ref.remove()}}finally{Kt.delete(e),r()}}update(t){var e;const r=Ft(this,null==(e=this.cache.get(t.name))?void 0:e.$ref,t.name);try{if(this.cache.has(t.name)){const e=this.cache.get(t.name);t=Object.assign(e.option,t),this.remove(t.name)}return this.add(t)}finally{r()}}}function Jt(t){for(const e of t.querySelectorAll("[data-value]"))e.setAttribute("aria-pressed",String(e.classList.contains("art-current")))}function Qt(t,e){var r,n;const o=D(t);if(!o.closed){t.setAttribute("role","group"),t.setAttribute("aria-label",e);for(const i of t.querySelectorAll("[data-value]"))zt(o,i),i.setAttribute("aria-label",`${e}: ${null!=(n=null==(r=i.textContent)?void 0:r.trim())?n:""}`);Jt(t)}}const te=new WeakMap;function ee(t,e){e?te.set(t,e):te.delete(t)}function re(t){const e=new Set;let r=t;for(;!e.has(r);){e.add(r);let t,n=r;for(;n&&!t;)t=te.get(n),n=n.parentElement;if(!t)return r;r=t}return t}function ne(t){const e=t;return!!e&&(["INPUT","TEXTAREA","SELECT"].includes(e.tagName)||e.isContentEditable)}function oe(t){var e;const r=null==(e=t.ownerDocument.defaultView)?void 0:e.getComputedStyle(t).visibility;return t.isConnected&&!t.matches(":disabled")&&!t.closest("[inert]")&&"true"!==t.getAttribute("aria-disabled")&&t.getClientRects().length>0&&"hidden"!==r&&"collapse"!==r}class ie extends Zt{constructor(t){super(t),this.name="contextmenu",this.$parent=t.template.$contextmenu,O(t,this.$parent),k||this.init()}init(){const{option:t,template:{$player:e,$contextmenu:r}}=this.art,{on:n,proxy:o}=_(this.art,r);t.playbackRate&&this.add(function(t){return e=>{const{i18n:r,constructor:{PLAYBACK_RATE:n}}=e,o=n.map(t=>`<span data-value="${t}">${1===t?r.get("Normal"):t.toFixed(1)}</span>`).join(""),i=r.get("Play Speed");return l(s({},t),{html:`${i}: ${o}`,click:(t,r)=>{const n=r.target instanceof HTMLElement?r.target.dataset.value:void 0;n&&(e.playbackRate=Number(n),t.show=!1)},mounted:t=>{const{on:r}=_(e,t),n=H('[data-value="1"]',t);n&&K(n,"art-current"),Qt(t,i),r("video:ratechange",()=>{const r=Array.from(t.querySelectorAll("span")).find(t=>Number(t.dataset.value)===e.playbackRate);r&&(K(r,"art-current"),Jt(t))})}})}}({name:"playbackRate",index:10})),t.aspectRatio&&this.add(function(t){return e=>{const{i18n:r,constructor:{ASPECT_RATIO:n}}=e,o=n.map(t=>`<span data-value="${t}">${"default"===t?r.get("Default"):t}</span>`).join(""),i=r.get("Aspect Ratio");return l(s({},t),{html:`${i}: ${o}`,click:(t,r)=>{const n=r.target instanceof HTMLElement?r.target.dataset.value:void 0;n&&(e.aspectRatio=n,t.show=!1)},mounted:t=>{const{on:r}=_(e,t),n=H('[data-value="default"]',t);n&&K(n,"art-current"),Qt(t,i),r("aspectRatio",e=>{const r=Array.from(t.querySelectorAll("span")).find(t=>t.dataset.value===e);r&&(K(r,"art-current"),Jt(t))})}})}}({name:"aspectRatio",index:20})),t.flip&&this.add(function(t){return e=>{const{i18n:r,constructor:{FLIP:n}}=e,o=n.map(t=>`<span data-value="${t}">${r.get(dt(t))}</span>`).join(""),i=r.get("Video Flip");return l(s({},t),{html:`${i}: ${o}`,click:(t,r)=>{const n=r.target instanceof HTMLElement?r.target.dataset.value:void 0;n&&(e.flip=n.toLowerCase(),t.show=!1)},mounted:t=>{const{on:r}=_(e,t),n=H('[data-value="normal"]',t);n&&K(n,"art-current"),Qt(t,i),r("flip",e=>{const r=Array.from(t.querySelectorAll("span")).find(t=>t.dataset.value===e);r&&(K(r,"art-current"),Jt(t))})}})}}({name:"flip",index:30})),this.add(function(t){return e=>l(s({},t),{html:e.i18n.get("Video Info"),click:t=>{e.info.show=!0,t.show=!1}})}({name:"info",index:40})),this.add(function(t){return l(s({},t),{html:`<a href="https://artplayer.org" target="_blank" style="width:100%;">ArtPlayer ${m}</a>`})}({name:"version",index:50})),this.add(function(t){return e=>l(s({},t),{html:e.i18n.get("Close"),click:t=>{t.show=!1}})}({name:"close",index:60}));for(let s=0;s<t.contextmenu.length;s++)this.add(t.contextmenu[s]);if(M(this.art))return;I(r);const i=O(this.art,r),a=(t,e)=>{this.show=!0,i.closed||M(this.art)||!this.show||function(t,e,r){const{$player:n,$contextmenu:o}=t.template,{height:i,width:a,left:s,top:l}=Y(n),{height:c,width:d}=Y(o);let u=e-s,p=r-l;e+d>s+a&&(u=a-d),r+c>l+i&&(p=i-c),M(t)||rt(o,{top:`${p}px`,left:`${u}px`})}(this.art,t,e)},c=function(t,e){const{art:r}=t,{$player:n,$contextmenu:o}=r.template,i=D(o),a=()=>!i.closed&&!M(r);let s,l=!1,c="",d=0;const u=()=>{const t=n.ownerDocument.activeElement;s=t&&n.contains(t)?re(t):n,ee(o,s)},p=()=>Array.from(o.querySelectorAll("[tabindex],button,input,select,textarea,a[href],[contenteditable]")).filter(t=>t.tabIndex>=0&&oe(t)),f=r.i18n.get("Context Menu");if(!a())return{pointer:()=>!1};o.setAttribute("role","group"),o.setAttribute("aria-label",f);const h=t=>{if(!a())return;if(t)return void(o.contains(n.ownerDocument.activeElement)||u());const e=n.ownerDocument.activeElement,i=o.contains(e)||l&&e===n.ownerDocument.body,d=s;s=void 0,l=!1,c="",ee(o),i&&(d&&n.contains(d)&&oe(d)&&d.focus({preventScroll:!0}),(n.ownerDocument.activeElement===n.ownerDocument.body||o.contains(n.ownerDocument.activeElement))&&It(r))};r.on("contextmenu",h),i.add(()=>{r.off("contextmenu",h),ee(o)}),Ct(i,o,"focusin",()=>{l=!0});let m=!1;return Ct(i,o,"focusout",e=>{o.contains(e.relatedTarget)||m||(m=!0,St(i,()=>{m=!1,a()&&t.show&&!o.contains(n.ownerDocument.activeElement)&&(t.show=!1)},0))}),Ct(i,n,"keydown",n=>{var i;const s=n;if(!a()||!Mt(s)||s.defaultPrevented)return;if(("ContextMenu"===s.key||"F10"===s.key&&s.shiftKey)&&r.constructor.CONTEXTMENU&&!ne(s.target)){Pt(s),u();const r=s.target.getBoundingClientRect();return e(r.left,r.bottom),void(a()&&t.show&&(null==(i=p()[0])||i.focus({preventScroll:!0})))}if(!t.show||!o.contains(s.target))return;if("Escape"===s.key)return Pt(s),void(t.show=!1);if("Tab"===s.key)return void(t.show=!1);if(ne(s.target))return;const l=p(),f=l.indexOf(s.target);let h;if("ArrowDown"===s.key||"ArrowRight"===s.key)h=l[(f+1)%l.length];else if("ArrowUp"===s.key||"ArrowLeft"===s.key)h=l[(f+l.length-1)%l.length];else if("Home"===s.key)h=l[0];else if("End"===s.key)h=l[l.length-1];else{if(1!==s.key.length||" "===s.key)return;{const t=s.key.toLowerCase();c=Date.now()-d>700?t:c+t,d=Date.now();const e=[...c].every(e=>e===t)?t:c;h=[...l.slice(f+1),...l.slice(0,f+1)].find(t=>(t.getAttribute("aria-label")||t.textContent||"").trim().toLowerCase().startsWith(e))}}Pt(s),null==h||h.focus({preventScroll:!0})}),{pointer:t=>!(!a()||!r.constructor.CONTEXTMENU||ne(t.target))&&(u(),!0)}}(this,a);o(e,"contextmenu",t=>{c.pointer(t)&&(t.preventDefault(),a(t.clientX,t.clientY))}),o(e,"click",t=>{F(t,r)||(this.show=!1)}),n("blur",()=>{this.show=!1})}}const ae=new WeakMap,se=new WeakMap,le=new WeakMap;function ce(t,e){const r=ae.get(t);(null==r?void 0:r.active())&&void 0!==r.resumePlaying&&(!e&&r.internalPause?r.internalPause=!1:(r.resumePlaying=e,e||r.pauseRevision++))}function de(t){return le.get(t)||P(t)}function ue(t){const e=ae.get(t),r=le.get(t);return()=>ae.get(t)===e&&(!e||e.active())&&le.get(t)===r&&(!r||!r.closed)}function pe(t){const e=le.get(t),r=P(t).child(),n=r.child();le.set(t,r),r.add(()=>{le.get(t)===r&&le.delete(t)});const o={scope:n,assigned:!1,acceptingEvents:!1,pauseRevision:0,active:()=>!M(t)&&!n.closed&&ae.get(t)===o};return ae.set(t,o),n.add(()=>{ae.get(t)===o&&ae.delete(t),o.onAssigned=void 0,o.onError=void 0}),null==e||e.dispose(),o}function fe(t){t.assigned=!0;const e=t.onAssigned;t.onAssigned=void 0,t.active()&&(null==e||e())}function he(t,e,r){se.set(t,e),e.acceptingEvents=!0;try{t.url=r}finally{se.get(t)===e&&(se.delete(t),fe(e))}}function me(t,e){t.active()&&(t.onError?t.onError(e):console.warn("Failed to initialize ArtPlayer source:",e),t.scope.dispose())}function ve(t,e){const{$progress:r}=t.template,{left:n}=Y(r),o=ct((k?e.touches[0].clientX:e.clientX)-n,0,r.clientWidth),i=o/r.clientWidth*t.duration;return{second:i,time:ut(i),width:o,percentage:ct(o/r.clientWidth,0,1)}}function ge(t,e,r=()=>!0){if(r())if(t.isRotate){const n=(e.touches[0].clientY-t.top)/t.height,o=n*t.duration;if(!r())return;t.emit("setBar","played",n,e),r()&&(t.seek=o)}else{const{second:n,percentage:o}=ve(t,e);if(!r())return;t.emit("setBar","played",o,e),r()&&(t.seek=n)}}const ye=new Map([["ArrowRight",1],["ArrowUp",1],["ArrowLeft",-1],["ArrowDown",-1],["PageUp",10],["PageDown",-10]]);function be(t,e,r){t.getAttribute(e)!==r&&t.setAttribute(e,r)}function we(t,e,r,n,o,i="horizontal"){const a=t=>[t.min,t.max,t.value,t.step].every(Number.isFinite)&&t.max>t.min&&t.step>0,s=(t,e)=>Math.min(e.max,Math.max(e.min,t)),l=()=>{if(t.closed)return;const r=n(),o=a(r),i=o?s(r.value,r):0;be(e,"aria-disabled",String(!o)),be(e,"aria-valuemin",String(o?r.min:0)),be(e,"aria-valuemax",String(o?r.max:0)),be(e,"aria-valuenow",String(i)),be(e,"aria-valuetext",r.text(i))};return t.closed||(e.setAttribute("role","slider"),e.tabIndex=0,e.setAttribute("aria-label",r),e.setAttribute("aria-orientation",i),Ct(t,e,"keydown",t=>{const r=t;if((r.composedPath()[0]||r.target)!==e||!Mt(r)||r.defaultPrevented)return;const i=ye.get(r.key);if(void 0===i&&"Home"!==r.key&&"End"!==r.key)return;Pt(r);const c=n();if(!a(c))return void l();const d="Home"===r.key?c.min:"End"===r.key?c.max:s(c.value,c)+i*c.step;o(s(d,c)),l()}),l()),l}const xe=new WeakMap;function ke(t){return xe.get(t)||0}function $e(t,e,r){let n,o=!1,i=!1,a=!1,s=ke(t);const l=()=>a||ke(t)!==s,c=()=>{var e,r;return!!(null==(r=null==(e=t.template)?void 0:e.$video)?void 0:r.seeking)};return{restore(i=()=>{t.currentTime=e}){if(!r()||l())return;const d=ke(t);i(),s=ke(t),s>d+1&&(a=!0),r()&&(n=t.currentTime,r()&&!l()&&(o=c()))},manual(){a=!0},ready(){if(!r()||c())return!1;const e=void 0!==n&&Math.abs(t.currentTime-n)>.05;if(!l()&&o&&!i&&void 0!==n&&e){if(i=!0,!r())return!1;t.currentTime=n}return r()&&!c()}}}function Ee(t,e){const{icons:r,option:n}=t,{$player:o}=t.template,i=D(e),{on:a}=_(t,e);let s=()=>{};const l=Ot(".art-progress-hover",e),c=Ot(".art-progress-loaded",e),d=Ot(".art-progress-played",e),u=Ot(".art-progress-highlight",e),p=Ot(".art-progress-indicator",e),f=Ot(".art-progress-tip",e);function h(r,n){const{width:o,time:i}=n||ve(t,r);f.textContent=i||"00:00";const a=f.clientWidth;o<=a/2?et(f,"left",0):o>e.clientWidth-a/2?et(f,"left",e.clientWidth-a+"px"):et(f,"left",o-a/2+"px")}r.indicator?X(p,r.indicator):et(p,"backgroundColor","var(--art-theme)"),a("setBar",function(r,n,a){const m="played"===r&&a&&k;if("loaded"===r&&et(c,"width",100*n+"%"),"hover"===r&&(et(l,"width",100*n+"%"),F(a,u)?function(r){const{width:n}=ve(t,r),o=r.target instanceof HTMLElement?r.target.dataset.text:void 0;f.textContent=null!=o?o:"";const i=f.clientWidth;n<=i/2?et(f,"left",0):n>e.clientWidth-i/2?et(f,"left",e.clientWidth-i+"px"):et(f,"left",n-i/2+"px")}(a):h(a),0===n?q(o,"art-progress-hover"):j(o,"art-progress-hover")),"played"===r&&(et(d,"width",100*n+"%"),et(p,"left",100*n+"%")),m){j(o,"art-progress-hover");h(a,{width:e.clientWidth*n,time:ut(n*t.duration)}),s(),s=St(i,()=>{q(o,"art-progress-hover")},500)}}),a("video:loadedmetadata",function(){u.textContent="";for(let e=0;e<n.highlight.length;e++){const r=n.highlight[e],o=ct(r.time,0,t.duration)/t.duration*100,i=document.createElement("span");i.dataset.text=r.text,i.dataset.time=String(r.time),i.style.left=`${o}%`,X(u,i)}}),t.constructor.USE_RAF?a("raf",()=>{t.emit("setBar","played",t.played),t.emit("setBar","loaded",t.loaded)}):(a("video:timeupdate",()=>{t.emit("setBar","played",t.played)}),a("video:progress",()=>{t.emit("setBar","loaded",t.loaded)}),a("video:ended",()=>{t.emit("setBar","played",1)})),t.emit("setBar","loaded",t.loaded||0)}function Ae(t){return e=>l(s({},t),{html:'\n <div class="art-control-progress-inner">\n <div class="art-progress-hover"></div>\n <div class="art-progress-loaded"></div>\n <div class="art-progress-played"></div>\n <div class="art-progress-highlight"></div>\n <div class="art-progress-indicator"></div>\n <div class="art-progress-tip">00:00</div>\n </div>\n ',mounted:t=>{Ee(e,t),function(t,e){const{$progress:r}=t.template,n=e.querySelector(".art-progress-indicator"),{on:o,proxy:i}=_(t,e),a=D(e);let s=0;const l=()=>{const e=ue(t);return()=>!a.closed&&!M(t)&&e()},c=()=>{const t=++s,e=l();return()=>t===s&&e()};if(!k){let e;i(r,"click",e=>{e.target!==n&&ge(t,e,c())}),i(r,"mousemove",e=>{const r=l(),{percentage:n}=ve(t,e);r()&&t.emit("setBar","hover",n,e)}),i(r,"mouseleave",e=>{t.emit("setBar","hover",0,e)}),i(r,"mousedown",t=>{e=0===t.button?c():void 0}),o("document:mousemove",r=>{const n=e;if(null==n?void 0:n()){const{second:o,percentage:i}=ve(t,r);if(!n()||e!==n)return;t.emit("setBar","played",i,r),n()&&e===n&&(t.seek=o)}else e=void 0}),o("document:mouseup",()=>{e=void 0})}}(e,t),function(t,e){const r=D(e),{on:n}=_(t,e);let o,i=0;const a=we(r,e,t.i18n.get("Progress"),()=>({min:0,max:t.duration,value:t.currentTime,step:t.constructor.SEEK_STEP,text:e=>`${ut(e)} / ${ut(Number.isFinite(t.duration)&&t.duration>0?t.duration:0)}`}),e=>{const n=++i;null==o||o.dispose();const s=r.child();o=s;const l=de(t).add(()=>{s.dispose()});s.add(()=>{l()}),s.add(()=>{o===s&&(o=void 0)});const c=ue(t),d=()=>n===i&&!s.closed&&!M(t)&&c(),u=$e(t,e,d),p=()=>{d()?u.ready()&&(s.dispose(),a()):s.dispose()};for(const r of["video:seeked","video:ended"])t.on(r,p),s.add(()=>{t.off(r,p)});try{t.emit("setBar","played",e/t.duration),d()&&u.restore(()=>{t.seek=e}),p()}catch(f){throw s.dispose(),f}});n("video:loadedmetadata",a),n("video:durationchange",a),n("video:emptied",a),n("video:timeupdate",a),n("video:seeking",a),n("video:seeked",a),n("video:ended",a)}(e,t)}})}function Ce(t){const{option:e}=t.art;e.isLive||t.add(Ae({name:"progress",position:"top",index:10})),t.add({name:"thumbnails",position:"top",index:20}),t.add(function(t){return e=>l(s({},t),{mounted:t=>{const{on:r,proxy:n}=_(e,t),{icons:o,i18n:i}=e,a=Rt(t,o.play),s=Rt(t,o.pause);function l(){t.setAttribute("aria-label",i.get("Play")),et(a,"display","flex"),et(s,"display","none")}function c(){t.setAttribute("aria-label",i.get("Pause")),et(a,"display","none"),et(s,"display","flex")}zt(D(t),t,()=>(e.playing?s:a).click()),Q(a,i.get("Play")),Q(s,i.get("Pause")),n(a,"click",()=>{at(e.play())}),n(s,"click",()=>{e.pause()}),e.playing?c():l(),r("video:playing",()=>{c()}),r("video:pause",()=>{l()})}})}({name:"playAndPause",position:"left",index:10})),t.add(function(t){return e=>l(s({},t),{mounted:t=>{const{on:r,proxy:n}=_(e,t),{icons:o,i18n:i}=e,a=Rt(t,o.volume),s=Rt(t,o.volumeClose);for(const e of[a,s])zt(D(t),e),e.setAttribute("aria-label",i.get("Mute"));const l=Rt(t,'<div class="art-volume-panel"></div>'),c=Rt(l,'<div class="art-volume-inner"></div>'),d=Rt(c,'<div class="art-volume-val"></div>'),u=Rt(c,'<div class="art-volume-slider"></div>'),p=Rt(u,'<div class="art-volume-handle"></div>'),f=Rt(p,'<div class="art-volume-loaded"></div>'),h=Rt(u,'<div class="art-volume-indicator"></div>'),m=D(t);let v=0;const g=we(m,u,i.get("Volume"),()=>({min:0,max:100,value:e.muted?0:100*e.volume,step:100*e.constructor.VOLUME_STEP,text:t=>`${Math.round(t)}%`}),t=>{const r=++v;e.muted=!1,r!==v||m.closed||M(e)||(e.volume=t/100)},"vertical");function y(t){const{top:e,height:r}=Y(u);return 1-(t.clientY-e)/r}function b(){g();const r=t.ownerDocument.activeElement,n=e.muted||0===e.volume,o=n?s:a;if(a.setAttribute("aria-pressed",String(e.muted)),s.setAttribute("aria-pressed",String(e.muted)),n)et(a,"display","none"),et(s,"display","flex"),et(h,"top","100%"),et(f,"top","100%"),d.textContent="0";else{const t=100*e.volume;et(a,"display","flex"),et(s,"display","none"),et(h,"top",100-t+"%"),et(f,"top",100-t+"%"),d.textContent=String(Math.floor(t))}r!==a&&r!==s||r===o||o.focus({preventScroll:!0})}if(b(),r("video:volumechange",b),n(a,"click",()=>{e.muted=!0}),n(s,"click",()=>{e.muted=!1}),k)et(l,"display","none");else{let t=!1;n(u,"mousedown",r=>{t=0===r.button,e.volume=y(r)}),r("document:mousemove",r=>{t&&(e.muted=!1,e.volume=y(r))}),r("document:mouseup",()=>{t&&(t=!1)})}}})}({name:"volume",position:"left",index:20})),e.isLive||t.add(function(t){return e=>l(s({},t),{style:k?{fontSize:"12px",padding:"0 5px"}:{cursor:"auto",padding:"0 10px"},mounted:t=>{const{on:r}=_(e,t);function n(){const r=`${ut(e.currentTime)} / ${ut(e.duration)}`;r!==t.textContent&&(t.textContent=r)}n();const o=["video:loadedmetadata","video:timeupdate","video:progress"];for(let e=0;e<o.length;e++)r(o[e],n)}})}({name:"time",position:"left",index:30})),e.quality.length&&Tt(P(t.art)).then(r=>{r&&!P(t.art).closed&&(t.art.quality=e.quality)}).catch(t=>{console.warn("ArtPlayer quality initialization failed:",t)}),e.screenshot&&!k&&t.add(function(t){return e=>l(s({},t),{tooltip:e.i18n.get("Screenshot"),mounted:t=>{const{proxy:r}=_(e,t),{icons:n}=e;zt(D(t),t),Rt(t,n.screenshot),r(t,"click",()=>{at(e.screenshot())})}})}({name:"screenshot",position:"right",index:20})),e.setting&&t.add(function(t){return e=>l(s({},t),{tooltip:e.i18n.get("Show Setting"),mounted:t=>{const{on:r,proxy:n}=_(e,t),{icons:o,i18n:i}=e;Rt(t,o.setting),zt(D(t),t),t.setAttribute("aria-expanded","false"),n(t,"click",()=>{e.setting.toggle(),e.setting.resize()}),r("setting",e=>{t.setAttribute("aria-expanded",String(e)),Q(t,i.get(e?"Hide Setting":"Show Setting"))})}})}({name:"setting",position:"right",index:30})),e.pip&&t.add(function(t){return e=>l(s({},t),{tooltip:e.i18n.get("PIP Mode"),mounted:t=>{const{on:r,proxy:n}=_(e,t),{icons:o,i18n:i}=e;zt(D(t),t),Rt(t,o.pip),n(t,"click",()=>{e.pip=!e.pip}),r("pip",e=>{Q(t,i.get(e?"Exit PIP Mode":"PIP Mode"))})}})}({name:"pip",position:"right",index:40})),e.airplay&&"WebKitPlaybackTargetAvailabilityEvent"in window&&window.WebKitPlaybackTargetAvailabilityEvent&&t.add(function(t){return e=>l(s({},t),{tooltip:e.i18n.get("AirPlay"),mounted:t=>{const{proxy:r}=_(e,t),{icons:n}=e;zt(D(t),t),Rt(t,n.airplay),r(t,"click",()=>e.airplay())}})}({name:"airplay",position:"right",index:50})),e.fullscreenWeb&&t.add(function(t){return e=>l(s({},t),{tooltip:e.i18n.get("Web Fullscreen"),mounted:t=>{const{on:r,proxy:n}=_(e,t),{icons:o,i18n:i}=e;zt(D(t),t);const a=Rt(t,o.fullscreenWebOn),s=Rt(t,o.fullscreenWebOff);et(s,"display","none"),n(t,"click",()=>{e.fullscreenWeb=!e.fullscreenWeb}),r("fullscreenWeb",e=>{e?(Q(t,i.get("Exit Web Fullscreen")),et(a,"display","none"),et(s,"display","inline-flex")):(Q(t,i.get("Web Fullscreen")),et(a,"display","inline-flex"),et(s,"display","none"))})}})}({name:"fullscreenWeb",position:"right",index:60})),e.fullscreen&&t.add(function(t){return e=>l(s({},t),{tooltip:e.i18n.get("Fullscreen"),mounted:t=>{const{on:r,proxy:n}=_(e,t),{icons:o,i18n:i}=e;zt(D(t),t);const a=Rt(t,o.fullscreenOn),s=Rt(t,o.fullscreenOff);et(s,"display","none"),n(t,"click",()=>{e.fullscreen=!e.fullscreen}),r("fullscreen",e=>{e?(Q(t,i.get("Exit Fullscreen")),et(a,"display","none"),et(s,"display","inline-flex")):(Q(t,i.get("Fullscreen")),et(a,"display","inline-flex"),et(s,"display","none"))})}})}({name:"fullscreen",position:"right",index:70}));for(let r=0;r<e.controls.length;r++)t.add(e.controls[r])}const Se=new WeakMap;const Te="button,input,select,textarea,a[href],[tabindex],[contenteditable]";const Le=new WeakMap;function Pe(t,e){const r=Le.get(t);it(!r||D(r.owner).closed,"Cannot share selector items between active controls"),r||(vt(t,"$control_option",{get:()=>Le.get(t).option.selector}),vt(t,"$control_item",{get:()=>Le.get(t).item}),vt(t,"$control_value",{get:()=>Le.get(t).value})),Le.set(t,e)}function Me(t,e){t.innerHTML=e}function ze(t,e,r,n,o){const{proxy:i}=t.events,a=D(n),s=r.selector;j(n,"art-control-selector");const l=document.createElement("div");j(l,"art-selector-value"),X(l,r.html),n.textContent="",X(n,l);const d=Rt(n,'<div class="art-selector-list"></div>');for(let c=0;c<s.length;c++){const t=s[c],e=document.createElement("div");j(e,"art-selector-item"),t.default&&j(e,"art-current"),e.dataset.index=String(c),e.dataset.value=String(t.value),Me(e,t.html),X(d,e),Pe(t,{option:r,item:e,value:l,owner:n})}let u=0;const p=i(d,"click",n=>c(null,null,function*(){var o,i;if(a.closed)return;const s=W(n),c=r.selector.find(t=>s.includes(t.$control_item));if(!c)return;const d=++u,p=()=>!a.closed&&d===u,f=a.add(function(t,e){return Se.set(t,e),()=>{Se.get(t)===e&&Se.delete(t)}}(n,p));try{if(e(c),a.closed)return;if(r.onSelect){const e=yield r.onSelect.call(t,c,c.$control_item,n);if(p()){const t=l.contains(l.ownerDocument.activeElement);Me(l,e),null==(i=null==(o=Le.get(c))?void 0:o.refresh)||i.call(o,t)}}}catch(h){console.warn("ArtPlayer selector failed:",h)}finally{f()}}));o.push(p);const f=function(t,e,r,n,o){if(t.closed)return()=>{};const i=Array.from(n.children),a=i.some(t=>t.querySelector(Te));n.setAttribute("role",a?"group":"listbox"),n.setAttribute("aria-label",o);let s=!1,l=!1,c=!1,d="",u=0;const p=()=>i.length>0&&(l||s&&!c),f=()=>r.querySelector('button,a[href],[role="button"]')||r,h=(e=!1)=>{if(t.closed)return;const n=f();r.querySelector(Te)?(r.removeAttribute("role"),r.removeAttribute("tabindex")):(r.setAttribute("role","button"),r.tabIndex=0),n!==r&&(r.removeAttribute("aria-haspopup"),r.removeAttribute("aria-expanded"),r.removeAttribute("aria-disabled")),a?n.removeAttribute("aria-haspopup"):n.setAttribute("aria-haspopup","listbox"),n.setAttribute("aria-expanded",String(p())),n.setAttribute("aria-disabled",String(0===i.length)),e&&r.isConnected&&r.ownerDocument.activeElement===r.ownerDocument.body&&n.focus({preventScroll:!0})},m=(t,r=!1)=>{l=t,c=r,e.classList.toggle("art-selector-open",t),e.classList.toggle("art-selector-dismissed",r),h()},v=e=>{e&&!t.closed&&((e.querySelector(Te)||e).focus({preventScroll:!0}),t.closed||e.scrollIntoView({block:"nearest",inline:"nearest"}))},g=(e=!1)=>{!t.closed&&i.length&&(m(!0),d="",v(i.find(t=>t.classList.contains("art-current"))||i[e?i.length-1:0]))},y=()=>{if(t.closed)return;const o=n.contains(e.ownerDocument.activeElement);m(!1,!0),d="",o&&r.isConnected&&f().focus({preventScroll:!0})};zt(t,r,()=>{r.click(),e.ownerDocument.activeElement===r&&g()}),h();for(const b of i){const e=b.classList.contains("art-current");a?b.setAttribute("aria-current",String(e)):(b.setAttribute("role","option"),b.setAttribute("aria-selected",String(e))),b.querySelector(Te)||(b.tabIndex=-1,zt(t,b,()=>{b.click(),y()}))}return Ct(t,r,"keydown",t=>{const e=t;!Mt(e)||e.defaultPrevented||e.target!==r&&e.target!==f()||("ArrowDown"===e.key||"ArrowUp"===e.key?(Pt(e),g("ArrowUp"===e.key)):"Escape"===e.key&&p()&&(Pt(e),y()))}),Ct(t,r,"click",t=>{t.isTrusted&&0===t.detail&&f()!==r&&g()}),Ct(t,n,"keydown",t=>{var e;const r=t;if(!Mt(r)||r.defaultPrevented)return;if("Escape"===r.key)return Pt(r),void y();const n=i.indexOf(r.target);if(n<0)return;let o;switch(1!==r.key.length&&(d=""),r.key){case"ArrowDown":o=Math.min(n+1,i.length-1);break;case"ArrowUp":o=Math.max(n-1,0);break;case"Home":o=0;break;case"End":o=i.length-1;break;case"ArrowLeft":case"ArrowRight":return void Pt(r);default:{if(1!==r.key.length||" "===r.key)return;const t=Date.now();d=t-u<500?d+r.key.toLocaleLowerCase():r.key.toLocaleLowerCase(),u=t;const a=[...d].every(t=>t===d[0])?d[0]:d;for(let r=1;r<=i.length;r++){const t=(n+r)%i.length;if(null==(e=i[t].textContent)?void 0:e.trim().toLocaleLowerCase().startsWith(a)){o=t;break}}}}Pt(r),void 0!==o&&v(i[o])}),Ct(t,n,"click",t=>{t.isTrusted&&0===t.detail&&y()}),Ct(t,e,"mouseenter",()=>{s=!0,m(l)}),Ct(t,e,"mouseleave",()=>{s=!1,m(n.contains(e.ownerDocument.activeElement))}),Ct(t,e,"focusout",t=>{e.contains(t.relatedTarget)||m(!1,!0)}),t.add(()=>{e.classList.remove("art-selector-open","art-selector-dismissed")}),h}(a,n,l,d,String(r.tooltip||r.name||l.textContent||t.i18n.get("Open")));for(const c of s)Le.get(c).refresh=f}class Re extends Zt{constructor(t){super(t),this.isHover=!1,this.name="control",this.timer=Date.now();const{constructor:e}=t,{$player:r,$bottom:n}=this.art.template,o=function(t,e,r){let n,o,i=!0;const a=()=>!t.closed&&i&&e.contains(e.ownerDocument.activeElement),s=()=>{const t=a(),n=e.classList.contains("art-keyboard-focus");e.classList.toggle("art-keyboard-focus",t),t&&!n&&r()},l=()=>{i=!0,s()},c=()=>{i=!1,s()},d=()=>{n!==e.ownerDocument&&(null==o||o.dispose(),n=e.ownerDocument,o=t.child(),Ct(o,n,"keydown",l,{capture:!0}),Ct(o,n,"mousedown",c,{capture:!0}),Ct(o,n,"touchstart",c,{capture:!0,passive:!0}))};return d(),Ct(t,e,"keydown",l,{capture:!0}),Ct(t,e,"mousedown",c,{capture:!0}),Ct(t,e,"touchstart",c,{capture:!0,passive:!0}),Ct(t,e,"focusin",()=>{d(),s()}),Ct(t,e,"focusout",()=>{e.classList.remove("art-keyboard-focus")}),t.add(()=>{e.classList.remove("art-keyboard-focus")}),a}(O(t,n),r,()=>{this.show=!0}),{on:i,proxy:a}=_(t,n);a(r,"focusin",e=>{var r;t.isFocus=!0,t.isInput="INPUT"===(null==(r=e.target)?void 0:r.tagName)}),a(r,"focusout",e=>{r.contains(e.relatedTarget)||(t.isFocus=!1,t.isInput=!1)}),i("mousemove",()=>{k||(this.show=!0)}),i("click",()=>{k?this.toggle():this.show=!0}),i("document:mousemove",t=>{this.isHover=F(t,n)}),i("video:timeupdate",()=>{!t.setting.show&&!this.isHover&&!t.isInput&&!o()&&t.playing&&this.show&&Date.now()-this.timer>=e.CONTROL_HIDE_TIME&&(this.show=!1)}),i("control",t=>{t?(q(r,"art-hide-cursor"),j(r,"art-hover"),this.timer=Date.now()):(j(r,"art-hide-cursor"),q(r,"art-hover"))}),this.init(),P(t).closed||function(t){const{$bottom:e,$controls:r,$player:n}=t.template,o=D(e),{on:i}=_(t,e),a=()=>{if(o.closed)return;const t=r.offsetHeight;t>0&&n.style.getPropertyValue("--art-controls-height")!==`${t}px`&&n.style.setProperty("--art-controls-height",`${t}px`)};if(i("resize",a),"undefined"!==typeof ResizeObserver){const t=new ResizeObserver(a);return t.observe(r),void o.add(()=>{t.disconnect()})}if("undefined"!==typeof MutationObserver){const t=new MutationObserver(a);t.observe(r,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),o.add(()=>{t.disconnect()})}a()}(t)}init(){Ce(this)}add(t){if(M(this.art))return;const e="function"===typeof t?t(this.art):t,{$progress:r,$controlsLeft:n,$controlsRight:o}=this.art.template;switch(e.position){case"top":this.$parent=r;break;case"left":this.$parent=n;break;case"right":this.$parent=o;break;default:it(!1,"Control option.position must one of 'top', 'left', 'right'")}super.add(e)}check(t){!function(t){var e,r;if(!t)return;const n=t.$control_value.contains(t.$control_value.ownerDocument.activeElement);Me(t.$control_value,t.html);for(let o=0;o<t.$control_option.length;o++){const e=t.$control_option[o];e.default=e===t;const r=e.$control_item;r.setAttribute("option"===r.getAttribute("role")?"aria-selected":"aria-current",String(e.default)),e.default&&K(e.$control_item,"art-current")}null==(r=null==(e=Le.get(t))?void 0:e.refresh)||r.call(e,n)}(t)}selector(t,e,r){ze(this.art,t=>this.check(t),t,e,r)}}function Oe(t,e){const{constructor:r,template:{$video:n}}=t;!function(t){const{$player:e}=t.template,r=r=>{var n;if(M(t))return;const o=F(r,e);t.isInput=o&&"INPUT"===(null==(n=r.target)?void 0:n.tagName),t.isFocus=o,t.emit(o?"focus":"blur",r)};t.on("document:click",r),t.on("document:contextmenu",r),P(t).add(()=>{t.off("document:click",r),t.off("document:contextmenu",r)})}(t);let o=[];e.proxy(n,"click",e=>{if(M(t))return;const n=Date.now();o.push(n);const{MOBILE_CLICK_PLAY:i,DBCLICK_TIME:a,MOBILE_DBCLICK_PLAY:s,DBCLICK_FULLSCREEN:l}=r,c=o.filter(t=>n-t<=a);switch(c.length){case 1:if(t.emit("click",e),M(t))return;(!k||!t.isLock&&i)&&at(t.toggle()),o=c;break;case 2:if(t.emit("dblclick",e),M(t))return;k?!t.isLock&&s&&at(t.toggle()):l&&(t.fullscreen=!t.fullscreen),o=[];break;default:o=[]}})}function De(t){let e;const r=()=>{e=void 0},n=r=>e===r&&!M(t)&&!t.isLock&&!t.option.isLive&&t.isRotate===r.rotated&&r.sourceActive(),o=t=>{t&&r()};t.on("document:touchend",r),t.on("document:touchcancel",r),t.on("lock",o),P(t).add(()=>{r(),t.off("document:touchend",r),t.off("document:touchcancel",r),t.off("lock",o)});return{start:(o,i)=>{r();const a=i.touches[0];if(M(t)||t.isLock||t.option.isLive||1!==i.touches.length||!a)return;if(![a.pageX,a.pageY,a.clientX,a.clientY,t.currentTime].every(Number.isFinite))return;const s={target:o,identifier:a.identifier,x:a.pageX,y:a.pageY,time:t.currentTime,rotated:t.isRotate,sourceActive:ue(t)};if(e=s,o===t.template.$progress){const o=t.isRotate?t.height:t.template.$progress.clientWidth;if(!Number.isFinite(o)||o<=0||!Number.isFinite(t.duration)||t.duration<=0)return void r();try{ge(t,i,()=>n(s))}catch(l){throw e===s&&r(),l}n(s)&&(s.time=t.currentTime)}},move:o=>{const i=e,a=o.touches[0];if(!i)return;if(!n(i)||1!==o.touches.length||!a||a.identifier!==i.identifier)return void r();const s=i.rotated?t.height:t.width,l=i.target===t.template.$video?t.constructor.TOUCH_MOVE_RATIO:1;if(![a.pageX,a.pageY,s,t.duration,l].every(Number.isFinite)||s<=0||t.duration<=0)return void r();const c=function(t,e,r,n){const o=e-n,i=r-t;if(Math.abs(i)<2&&Math.abs(o)<2)return 0;const a=180*Math.atan2(o,i)/Math.PI;return a>=-45&&a<45?4:a>=45&&a<135?1:a>=-135&&a<-45?2:a>=135&&a<=180||a>=-180&&a<-135?3:0}(i.x,i.y,a.pageX,a.pageY);if(!(i.rotated?1===c||2===c:3===c||4===c))return;const d=ct((i.rotated?a.pageY-i.y:a.pageX-i.x)/s,-1,1),u=ct(i.time+t.duration*d*l,0,t.duration);t.seek=u,n(i)&&(t.emit("setBar","played",ct(u/t.duration,0,1),o),n(i)&&(t.notice.show=`${ut(u)} / ${ut(t.duration)}`))},cancel:r}}const Ie=["click","mouseup","keydown","touchend","touchcancel","touchmove","mousemove","pointerup","contextmenu","pointermove","visibilitychange","webkitfullscreenchange"],Ne=["resize","scroll","orientationchange"];const _e=new WeakMap;function We(t){const e=_e.get(t);if(!e)throw new Error("ArtPlayer event registry has not been initialized");return e}function Fe(t,e,r,n,o={}){if(Array.isArray(r)){const i=[];try{return r.map(r=>{const a=Fe(t,e,r,n,o);return i.push(a),a})}catch(f){for(const t of i.reverse())try{t()}catch(h){console.warn("Failed to roll back event listener:",h)}throw f}}const i=r,a=We(t);if(a.scope.closed||a.cleaning)return()=>{};const s="boolean"===typeof o?o:{capture:Boolean(null==o?void 0:o.capture),once:Boolean(null==o?void 0:o.once),passive:null==o?void 0:o.passive,signal:null==o?void 0:o.signal},l="boolean"===typeof s?s:s.capture,c="boolean"===typeof s?void 0:s.signal;if(a.scope.closed||a.cleaning||(null==c?void 0:c.aborted))return()=>{};let d=!0;function u(r=!1){(d||r)&&(e.removeEventListener(i,n,l),null==c||c.removeEventListener("abort",p),d=!1,t.destroyEvents.delete(p))}function p(){u()}t.destroyEvents.add(p);try{e.addEventListener(i,n,s),!d||a.scope.closed||a.cleaning?u(!0):(null==c?void 0:c.aborted)?p():null==c||c.addEventListener("abort",p,{once:!0})}catch(f){try{u(!0)}catch(h){console.warn("Failed to roll back event listener:",h)}throw f}return p}function Ve(t){return(e,r)=>{if(M(t))return;const n=(...e)=>{if(!M(t))return r(...e)};t.on(e,n),P(t).add(()=>{t.off(e,n)})}}function Ye(t){if(!t.constructor.USE_RAF)return;const e=P(t);let r=()=>{};const n=()=>{M(t)||(t.playing&&t.emit("raf"),M(t)||(r=function(t,e){if(t.closed)return At;let r=!0,n=At;const o=requestAnimationFrame(o=>{r&&(n(),t.closed||e(o))});return n=t.add(()=>{r=!1,cancelAnimationFrame(o)}),n}(e,n)))};n(),Ve(t)("destroy",()=>r())}class Be{constructor(t){this.destroyEvents=new Set,function(t,e){_e.set(t,{scope:P(e),cleaning:!1})}(this,t),P(t).add(()=>{this.destroy()}),this.proxy=this.proxy.bind(this),this.hover=this.hover.bind(this),Oe(t,this),function(t,e){const{$player:r}=t.template;e.hover(r,e=>{M(t)||(j(r,"art-hover"),t.emit("hover",!0,e))},e=>{M(t)||(q(r,"art-hover"),t.emit("hover",!1,e))})}(t,this),function(t,e){const{$player:r}=t.template;e.proxy(r,"mousemove",e=>{M(t)||t.emit("mousemove",e)})}(t,this),function(t,e){var r,n;const{option:o,constructor:i}=t,a=Ve(t);a("resize",()=>{const{aspectRatio:e,notice:r}=t;"standard"===t.state&&o.autoSize&&t.autoSize(),M(t)||(t.aspectRatio=e,M(t)||(r.show=""))});const s=P(t);let l=()=>{};const c=()=>{M(t)||(l(),l=St(s,()=>t.emit("resize"),i.RESIZE_TIME))};a("window:orientationchange",c),a("window:resize",c);const d=null==(n=null==(r=t.template.$player.ownerDocument.defaultView)?void 0:r.screen)?void 0:n.orientation;"function"===typeof(null==d?void 0:d.addEventListener)&&e.proxy(d,"change",c)}(t,this),function(t,e){if(!k||t.option.isLive)return;const{$video:r,$progress:n}=t.template,o=De(t),i=t=>{e.proxy(t,"touchstart",e=>o.start(t,e)),e.proxy(t,"touchmove",t=>o.move(t)),e.proxy(t,"touchcancel",o.cancel)};t.option.gesture&&i(r),i(n)}(t,this),function(t){const{option:e,constructor:r,template:{$container:n}}=t,o=r.SCROLL_TIME,i=P(t),a=Ve(t);let s=!1;a("window:scroll",()=>{s||(t.emit("view",function(t,e){const r=t.getBoundingClientRect(),n=t.ownerDocument,o=n.defaultView,i=(null==o?void 0:o.innerHeight)||n.documentElement.clientHeight,a=(null==o?void 0:o.innerWidth)||n.documentElement.clientWidth,s=r.top-e<=i&&r.top+r.height+e>=0,l=r.left-e<=a+e&&r.left+r.width+e>=0;return s&&l}(n,r.SCROLL_GAP)),M(t)||(s=!0,St(i,()=>{s=!1},o)))}),a("view",r=>{e.autoMini&&(t.mini=!r)})}(t),function(t,e){let r,n=0;P(t).add(()=>{r=void 0,n++});const o=t=>{if(t){for(const r of t.disposers)e.remove(r);t.disposers.length=0}};function i(i={}){var a;if(M(t))return;const s=++n,l={disposers:[]},c=()=>s!==n||M(t);try{const{$player:n}=t.template,o=i.document||n.ownerDocument||document,s=i.window||(null==(a=n.ownerDocument)?void 0:a.defaultView)||window,d=(n,o,i)=>{for(const a of o){if(c())return;l.disposers.push(e.proxy(n,a,e=>{r!==l||M(t)||t.emit(`${i}:${a}`,e)}))}};d(o,Ie,"document"),d(s,Ne,"window")}catch(u){throw o(l),u}if(c())return void o(l);const d=r;r=l,o(d)}i(),e.bindGlobalEvents=i}(t,this),Ye(t)}proxy(t,e,r,n={}){return Array.isArray(e),Fe(this,t,e,r,n)}hover(t,e,r){e&&this.proxy(t,"mouseenter",e),r&&this.proxy(t,"mouseleave",r)}remove(t){!function(t,e){if(t.destroyEvents.has(e))try{e(),t.destroyEvents.delete(e)}catch(r){console.warn("Failed to remove event listener:",r)}}(this,t)}destroy(){!function(t){const e=We(t);if(!e.cleaning){e.cleaning=!0;try{for(const e of t.destroyEvents)try{e(),t.destroyEvents.delete(e)}catch(r){console.warn("Failed to destroy event listener:",r)}}finally{e.cleaning=!1}}}(this)}}function He(t){if(t&&1===t.nodeType)return t}function je(t){const e=t.tagName.toUpperCase();return"INPUT"===e||"TEXTAREA"===e||"SELECT"===e||t.isContentEditable}function qe(t,e){var r,n,o,i;if(function(t){return Lt.has(t)}(t)||t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||t.isComposing||229===t.keyCode)return!1;const a=function(t,e){var r;const n=t.target;return 9===(null==n?void 0:n.nodeType)?n:(null==n?void 0:n.ownerDocument)||(null==(r=t.view)?void 0:r.document)||e}(t,e);let s=He(a.activeElement);for(;null==(r=null==s?void 0:s.shadowRoot)?void 0:r.activeElement;)s=He(s.shadowRoot.activeElement);if(s&&je(s))return!1;const l=He(null==(n=t.composedPath)?void 0:n.call(t)[0])||He(t.target),c="Enter"===t.key||"Enter"===t.code||"NumpadEnter"===t.code;if(c||" "===t.key||"Space"===t.code){const t='button,summary,[role="button"],[role="switch"]'+(c?",a[href]":"");if((null==(o=null==l?void 0:l.closest)?void 0:o.call(l,t))||(null==(i=null==s?void 0:s.closest)?void 0:i.call(s,t)))return!1}return!l||!je(l)}const Ue=new WeakMap;class Xe{constructor(t){this.art=t,this.keys={},Ue.set(this,{subscribed:!1}),k||this.init()}init(){const t=this.art;if(M(t))return;const e=Ue.get(this);if(t.option.hotkey){if(!e.defaults){const r=function(t){const{constructor:e}=t;return{Escape:()=>{t.fullscreenWeb&&(t.fullscreenWeb=!1)},Space:()=>{at(t.toggle())},ArrowLeft:()=>{t.backward=e.SEEK_STEP},ArrowUp:()=>{t.volume+=e.VOLUME_STEP},ArrowRight:()=>{t.forward=e.SEEK_STEP},ArrowDown:()=>{t.volume-=e.VOLUME_STEP}}}(t);e.defaults=()=>{for(const t of Object.keys(r))this.add(t,r[t])}}e.defaults()}if(e.subscribed)return;e.subscribed=!0;const r=e=>{if(!M(t)){if(t.isFocus&&qe(e,t.template.$player.ownerDocument)){const r=Object.prototype.hasOwnProperty.call(this.keys,e.code)?this.keys[e.code]:void 0;if(r){e.preventDefault();for(let n=0;n<r.length;n++){if(M(t))return;r[n].call(t,e)}if(M(t))return;t.emit("hotkey",e)}}M(t)||t.emit("keydown",e)}};t.on("document:keydown",r),P(t).add(()=>{e.subscribed=!1,t.off("document:keydown",r)})}add(t,e){const r=Object.prototype.hasOwnProperty.call(this.keys,t)?this.keys[t]:void 0;return r?r.includes(e)||r.push(e):Object.defineProperty(this.keys,t,{value:[e],enumerable:!0,configurable:!0,writable:!0}),this}remove(t,e){const r=Object.prototype.hasOwnProperty.call(this.keys,t)?this.keys[t]:void 0;if(r){const n=r.indexOf(e);-1!==n&&r.splice(n,1),0===r.length&&delete this.keys[t]}return this}}const Ge={"Context Menu":"\u5feb\u6377\u83dc\u5355",Lock:"\u9501\u5b9a",Back:"\u8fd4\u56de",Settings:"\u8bbe\u7f6e",Progress:"\u64ad\u653e\u8fdb\u5ea6","Video Info":"\u7edf\u8ba1\u4fe1\u606f",Close:"\u5173\u95ed","Video Load Failed":"\u52a0\u8f7d\u5931\u8d25",Volume:"\u97f3\u91cf",Play:"\u64ad\u653e",Pause:"\u6682\u505c",Rate:"\u901f\u5ea6",Mute:"\u9759\u97f3","Video Flip":"\u753b\u9762\u7ffb\u8f6c",Horizontal:"\u6c34\u5e73",Vertical:"\u5782\u76f4",Reconnect:"\u91cd\u65b0\u8fde\u63a5","Show Setting":"\u663e\u793a\u8bbe\u7f6e","Hide Setting":"\u9690\u85cf\u8bbe\u7f6e",Screenshot:"\u622a\u56fe","Play Speed":"\u64ad\u653e\u901f\u5ea6","Aspect Ratio":"\u753b\u9762\u6bd4\u4f8b",Default:"\u9ed8\u8ba4",Normal:"\u6b63\u5e38",Open:"\u6253\u5f00","Switch Video":"\u5207\u6362","Switch Subtitle":"\u5207\u6362\u5b57\u5e55",Fullscreen:"\u5168\u5c4f","Exit Fullscreen":"\u9000\u51fa\u5168\u5c4f","Web Fullscreen":"\u7f51\u9875\u5168\u5c4f","Exit Web Fullscreen":"\u9000\u51fa\u7f51\u9875\u5168\u5c4f","Mini Player":"\u8ff7\u4f60\u64ad\u653e\u5668","PIP Mode":"\u5f00\u542f\u753b\u4e2d\u753b","Exit PIP Mode":"\u9000\u51fa\u753b\u4e2d\u753b","PIP Not Supported":"\u4e0d\u652f\u6301\u753b\u4e2d\u753b","Fullscreen Not Supported":"\u4e0d\u652f\u6301\u5168\u5c4f","Subtitle Offset":"\u5b57\u5e55\u504f\u79fb","Last Seen":"\u4e0a\u6b21\u770b\u5230","Jump Play":"\u8df3\u8f6c\u64ad\u653e",AirPlay:"\u9694\u7a7a\u64ad\u653e","AirPlay Not Available":"\u9694\u7a7a\u64ad\u653e\u4e0d\u53ef\u7528"};!function(t,e){if("undefined"!==typeof window){window[t]=e}}("artplayer-i18n-zh-cn",Ge);class Ke{constructor(t){this.art=t,this.languages={"zh-cn":Ge},this.language={},this.update(t.option.i18n)}init(){const t=this.art.option.lang.toLowerCase();this.language=yt(this.languages,t)&&this.languages[t]||{}}get(t){return yt(this.language,t)&&this.language[t]||t}update(t){this.languages=wt(this.languages,t),this.init()}}const Ze={loading:'<svg xmlns="http://www.w3.org/2000/svg" width="50px" height="50px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default">\r\n <rect x="0" y="0" width="100" height="100" fill="none" class="bk"/>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(0 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-1s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(30 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(60 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(90 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.75s" repeatCount="indefinite"/></rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(120 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(150 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(180 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.5s" repeatCount="indefinite"/></rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(210 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(240 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(270 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.25s" repeatCount="indefinite"/></rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(300 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"/>\r\n </rect>\r\n <rect x="47" y="40" width="6" height="20" rx="5" ry="5" transform="rotate(330 50 50) translate(0 -30)">\r\n <animate attributeName="opacity" from="1" to="0" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"/>\r\n </rect>\r\n</svg>',state:'<svg xmlns="http://www.w3.org/2000/svg" width="80" height="80" viewBox="0 0 24 24">\r\n<path d="M9.5 9.325v5.35q0 .575.525.875t1.025-.05l4.15-2.65q.475-.3.475-.85t-.475-.85L11.05 8.5q-.5-.35-1.025-.05t-.525.875ZM12 22q-2.075 0-3.9-.788t-3.175-2.137q-1.35-1.35-2.137-3.175T2 12q0-2.075.788-3.9t2.137-3.175q1.35-1.35 3.175-2.137T12 2q2.075 0 3.9.788t3.175 2.137q1.35 1.35 2.138 3.175T22 12q0 2.075-.788 3.9t-2.137 3.175q-1.35 1.35-3.175 2.138T12 22Z"/>\r\n</svg>\r\n',play:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <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>\r\n</svg>',pause:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <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>\r\n</svg>',check:'<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 24 24" style="width: 100%; height: 100%;">\r\n<path d="M9 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4L9 16.2z" />\r\n</svg>',volume:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <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>\r\n <path d="M15 11a3.998 3.998 0 0 0-2-3.465v6.93A3.998 3.998 0 0 0 15 11z"></path>\r\n</svg>',volumeClose:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <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>\r\n <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>\r\n</svg>',screenshot:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 50 50">\r\n\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 "/>\r\n</svg>\r\n',setting:'<svg xmlns="http://www.w3.org/2000/svg" height="22" width="22" viewBox="0 0 22 22">\r\n <circle cx="11" cy="11" r="2"></circle>\r\n <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>\r\n</svg>',pip:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="22" height="22">\r\n<path d="M844.8 219.648h-665.6c-6.144 0-10.24 4.608-10.24 10.752v563.2c0 5.632 4.096 10.24 10.24 10.24h256v92.16h-256a102.4 102.4 0 0 1-102.4-102.4v-563.2c0-56.832 45.568-102.4 102.4-102.4h665.6a102.4 102.4 0 0 1 102.4 102.4v204.8h-92.16v-204.8c0-6.144-4.608-10.752-10.24-10.752zM614.4 588.8c-28.672 0-51.2 22.528-51.2 51.2v204.8c0 28.16 22.528 51.2 51.2 51.2h281.6c28.16 0 51.2-23.04 51.2-51.2v-204.8c0-28.672-23.04-51.2-51.2-51.2H614.4z"></path>\r\n</svg>',arrowLeft:'<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" viewBox="0 0 32 32">\r\n <path d="M 19.41,20.09 14.83,15.5 19.41,10.91 18,9.5 l -6,6 6,6 z" />\r\n</svg>',arrowRight:'<svg xmlns="http://www.w3.org/2000/svg" height="32" width="32" version="1.1" viewBox="0 0 32 32">\r\n <path d="m 12.59,20.34 4.58,-4.59 -4.58,-4.59 1.41,-1.41 6,6 -6,6 z" />\r\n</svg>',playbackRate:'<svg height="24" viewBox="0 0 24 24" width="24"><path d="M10,8v8l6-4L10,8L10,8z M6.3,5L5.7,4.2C7.2,3,9,2.2,11,2l0.1,1C9.3,3.2,7.7,3.9,6.3,5z M5,6.3L4.2,5.7C3,7.2,2.2,9,2,11 l1,.1C3.2,9.3,3.9,7.7,5,6.3z M5,17.7c-1.1-1.4-1.8-3.1-2-4.8L2,13c0.2,2,1,3.8,2.2,5.4L5,17.7z M11.1,21c-1.8-0.2-3.4-0.9-4.8-2 l-0.6,.8C7.2,21,9,21.8,11,22L11.1,21z M22,12c0-5.2-3.9-9.4-9-10l-0.1,1c4.6,.5,8.1,4.3,8.1,9s-3.5,8.5-8.1,9l0.1,1 C18.2,21.5,22,17.2,22,12z" data-darkreader-inline-fill="" style="--darkreader-inline-fill:#a8a6a4;"></path></svg>',aspectRatio:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 88 88" preserveAspectRatio="xMidYMid meet" style="width: 100%; height: 100%; transform: translate3d(0px, 0px, 0px);"><defs><clipPath id="__lottie_element_216"><rect width="88" height="88" x="0" y="0"></rect></clipPath></defs><g clip-path="url(#__lottie_element_216)"><g transform="matrix(1,0,0,1,44,44)" opacity="1" style="display: block;"><g opacity="1" transform="matrix(1,0,0,1,0,0)"><path fill-opacity="1" d=" M12.437999725341797,-12.70199966430664 C12.437999725341797,-12.70199966430664 9.618000030517578,-9.881999969482422 9.618000030517578,-9.881999969482422 C8.82800006866455,-9.092000007629395 8.82800006866455,-7.831999778747559 9.618000030517578,-7.052000045776367 C9.618000030517578,-7.052000045776367 16.687999725341797,0.017999999225139618 16.687999725341797,0.017999999225139618 C16.687999725341797,0.017999999225139618 9.618000030517578,7.0879998207092285 9.618000030517578,7.0879998207092285 C8.82800006866455,7.877999782562256 8.82800006866455,9.137999534606934 9.618000030517578,9.918000221252441 C9.618000030517578,9.918000221252441 12.437999725341797,12.748000144958496 12.437999725341797,12.748000144958496 C13.227999687194824,13.527999877929688 14.48799991607666,13.527999877929688 15.267999649047852,12.748000144958496 C15.267999649047852,12.748000144958496 26.58799934387207,1.437999963760376 26.58799934387207,1.437999963760376 C27.368000030517578,0.6579999923706055 27.368000030517578,-0.6119999885559082 26.58799934387207,-1.3919999599456787 C26.58799934387207,-1.3919999599456787 15.267999649047852,-12.70199966430664 15.267999649047852,-12.70199966430664 C14.48799991607666,-13.491999626159668 13.227999687194824,-13.491999626159668 12.437999725341797,-12.70199966430664z M-12.442000389099121,-12.70199966430664 C-13.182000160217285,-13.442000389099121 -14.362000465393066,-13.482000350952148 -15.142000198364258,-12.821999549865723 C-15.142000198364258,-12.821999549865723 -15.272000312805176,-12.70199966430664 -15.272000312805176,-12.70199966430664 C-15.272000312805176,-12.70199966430664 -26.582000732421875,-1.3919999599456787 -26.582000732421875,-1.3919999599456787 C-27.32200050354004,-0.6520000100135803 -27.36199951171875,0.5180000066757202 -26.70199966430664,1.3079999685287476 C-26.70199966430664,1.3079999685287476 -26.582000732421875,1.437999963760376 -26.582000732421875,1.437999963760376 C-26.582000732421875,1.437999963760376 -15.272000312805176,12.748000144958496 -15.272000312805176,12.748000144958496 C-14.531999588012695,13.48799991607666 -13.362000465393066,13.527999877929688 -12.571999549865723,12.868000030517578 C-12.571999549865723,12.868000030517578 -12.442000389099121,12.748000144958496 -12.442000389099121,12.748000144958496 C-12.442000389099121,12.748000144958496 -9.612000465393066,9.918000221252441 -9.612000465393066,9.918000221252441 C-8.871999740600586,9.178000450134277 -8.831999778747559,8.008000373840332 -9.501999855041504,7.2179999351501465 C-9.501999855041504,7.2179999351501465 -9.612000465393066,7.0879998207092285 -9.612000465393066,7.0879998207092285 C-9.612000465393066,7.0879998207092285 -16.68199920654297,0.017999999225139618 -16.68199920654297,0.017999999225139618 C-16.68199920654297,0.017999999225139618 -9.612000465393066,-7.052000045776367 -9.612000465393066,-7.052000045776367 C-8.871999740600586,-7.791999816894531 -8.831999778747559,-8.961999893188477 -9.501999855041504,-9.751999855041504 C-9.501999855041504,-9.751999855041504 -9.612000465393066,-9.881999969482422 -9.612000465393066,-9.881999969482422 C-9.612000465393066,-9.881999969482422 -12.442000389099121,-12.70199966430664 -12.442000389099121,-12.70199966430664z M28,-28 C32.41999816894531,-28 36,-24.420000076293945 36,-20 C36,-20 36,20 36,20 C36,24.420000076293945 32.41999816894531,28 28,28 C28,28 -28,28 -28,28 C-32.41999816894531,28 -36,24.420000076293945 -36,20 C-36,20 -36,-20 -36,-20 C-36,-24.420000076293945 -32.41999816894531,-28 -28,-28 C-28,-28 28,-28 28,-28z" data-darkreader-inline-fill="" style="--darkreader-inline-fill:#a8a6a4;"></path></g></g></g></svg>',config:'<svg height="24" viewBox="0 0 24 24" width="24"><path d="M15,17h6v1h-6V17z M11,17H3v1h8v2h1v-2v-1v-2h-1V17z M14,8h1V6V5V3h-1v2H3v1h11V8z M18,5v1h3V5H18z M6,14h1v-2v-1V9H6v2H3v1 h3V14z M10,12h11v-1H10V12z" data-darkreader-inline-fill="" style="--darkreader-inline-fill:#a8a6a4;"></path></svg>',lock:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1650612139149" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20">\r\n<path d="M298.666667 426.666667V341.333333a213.333333 213.333333 0 1 1 426.666666 0v85.333334h42.666667a85.333333 85.333333 0 0 1 85.333333 85.333333v256a85.333333 85.333333 0 0 1-85.333333 85.333333H256a85.333333 85.333333 0 0 1-85.333333-85.333333v-256a85.333333 85.333333 0 0 1 85.333333-85.333333h42.666667z m213.333333-213.333334a128 128 0 0 0-128 128v85.333334h256V341.333333a128 128 0 0 0-128-128z"></path>\r\n</svg>\r\n',flip:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1652445277062" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24" height="24">\r\n<path d="M554.666667 810.666667v85.333333h-85.333334v-85.333333h85.333334zM170.666667 178.005333a42.666667 42.666667 0 0 1 34.986666 18.218667l203.904 291.328a42.666667 42.666667 0 0 1 0 48.896l-203.946666 291.328A42.666667 42.666667 0 0 1 128 803.328V220.672a42.666667 42.666667 0 0 1 42.666667-42.666667z m682.666666 0a42.666667 42.666667 0 0 1 42.368 37.717334l0.298667 4.949333v582.656a42.666667 42.666667 0 0 1-74.24 28.629333l-3.413333-4.181333-203.904-291.328a42.666667 42.666667 0 0 1-3.029334-43.861333l3.029334-5.034667 203.946666-291.328A42.666667 42.666667 0 0 1 853.333333 178.005333zM554.666667 640v85.333333h-85.333334v-85.333333h85.333334zM196.266667 319.104V716.8L335.957333 512 196.309333 319.104zM554.666667 469.333333v85.333334h-85.333334v-85.333334h85.333334z m0-170.666666v85.333333h-85.333334V298.666667h85.333334z m0-170.666667v85.333333h-85.333334V128h85.333334z">\r\n</path>\r\n</svg>\r\n',unlock:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1650612464266" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20" height="20"><path d="M666.752 194.517333L617.386667 268.629333A128 128 0 0 0 384 341.333333l0.042667 85.333334h384a85.333333 85.333333 0 0 1 85.333333 85.333333v256a85.333333 85.333333 0 0 1-85.333333 85.333333H256a85.333333 85.333333 0 0 1-85.333333-85.333333v-256a85.333333 85.333333 0 0 1 85.333333-85.333333h42.666667V341.333333a213.333333 213.333333 0 0 1 368.085333-146.816z"></path></svg>\r\n',fullscreenOff:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg class="icon" width="22" height="22" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M768 298.666667h170.666667v85.333333h-256V128h85.333333v170.666667zM341.333333 384H85.333333V298.666667h170.666667V128h85.333333v256z m426.666667 341.333333v170.666667h-85.333333v-256h256v85.333333h-170.666667zM341.333333 640v256H256v-170.666667H85.333333v-85.333333h256z" />\r\n</svg>\r\n',fullscreenOn:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg class="icon" width="22" height="22" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M625.777778 256h142.222222V398.222222h113.777778V142.222222H625.777778v113.777778zM256 398.222222V256H398.222222v-113.777778H142.222222V398.222222h113.777778zM768 625.777778v142.222222H625.777778v113.777778h256V625.777778h-113.777778zM398.222222 768H256V625.777778h-113.777778v256H398.222222v-113.777778z" />\r\n</svg>\r\n',fullscreenWebOff:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg class="icon" width="18" height="18" viewBox="0 0 1152 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M1075.2 0H76.8A76.8 76.8 0 0 0 0 76.8v870.4A76.8 76.8 0 0 0 76.8 1024h998.4a76.8 76.8 0 0 0 76.8-76.8V76.8A76.8 76.8 0 0 0 1075.2 0zM1024 128v768H128V128h896zM896 512a64 64 0 0 1 7.488 127.552L896 640h-128v128a64 64 0 0 1-56.512 63.552L704 832a64 64 0 0 1-63.552-56.512L640 768V582.592c0-34.496 25.024-66.112 61.632-70.208L709.632 512H896zM256 512a64 64 0 0 1-7.488-127.552L256 384h128V256a64 64 0 0 1 56.512-63.552L448 192a64 64 0 0 1 63.552 56.512L512 256v185.408c0 34.432-25.024 66.112-61.632 70.144L442.368 512H256z" />\r\n</svg>\r\n',fullscreenWebOn:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg class="icon" width="18" height="18" viewBox="0 0 1152 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">\r\n<path d="M1075.2 0H76.8A76.8 76.8 0 0 0 0 76.8v870.4A76.8 76.8 0 0 0 76.8 1024h998.4a76.8 76.8 0 0 0 76.8-76.8V76.8A76.8 76.8 0 0 0 1075.2 0zM1024 128v768H128V128h896zM448 192a64 64 0 0 1 7.488 127.552L448 320H320v128a64 64 0 0 1-56.512 63.552L256 512a64 64 0 0 1-63.552-56.512L192 448V262.592c0-34.432 25.024-66.112 61.632-70.144L261.632 192H448zM704 832a64 64 0 0 1-7.488-127.552L704 704h128V576a64 64 0 0 1 56.512-63.552L896 512a64 64 0 0 1 63.552 56.512L960 576v185.408c0 34.496-25.024 66.112-61.632 70.208l-8 0.384H704z" />\r\n</svg>\r\n',switchOn:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg class="icon" width="26" height="26" viewBox="0 0 1664 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">\r\n <path fill="#648FFC" d="M1152 0H512a512 512 0 0 0 0 1024h640a512 512 0 0 0 0-1024z m0 960a448 448 0 1 1 448-448 448 448 0 0 1-448 448z" />\r\n</svg>',switchOff:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg class="icon" width="26" height="26" viewBox="0 0 1740 1024" version="1.1" xmlns="http://www.w3.org/2000/svg">\r\n <path d="M511.8976 1024h670.5152c282.4192-0.4096 511.1808-229.4784 511.1808-511.8976 0-282.4192-228.7616-511.488-511.1808-511.8976H511.8976C229.4784 0.6144 0.7168 229.6832 0.7168 512.1024c0 282.4192 228.7616 511.488 511.1808 511.8976zM511.3344 48.64A464.5888 464.5888 0 1 1 48.0256 513.024 463.872 463.872 0 0 1 511.3344 48.4352V48.64z" />\r\n</svg>\r\n',error:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1652850026663" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2749" xmlns:xlink="http://www.w3.org/1999/xlink" width="50" height="50">\r\n<path d="M593.8176 168.5504l356.00384 595.21024c26.15296 43.74528 10.73152 99.7376-34.44736 125.05088-14.39744 8.06912-30.72 12.30848-47.37024 12.30848H155.97568C103.75168 901.12 61.44 860.16 61.44 809.61536c0-16.09728 4.38272-31.92832 12.71808-45.8752L430.16192 168.5504c26.17344-43.7248 84.00896-58.65472 129.20832-33.34144a93.0816 93.0816 0 0 1 34.44736 33.34144zM512 819.2a61.44 61.44 0 1 0 0-122.88 61.44 61.44 0 0 0 0 122.88z m0-512a72.31488 72.31488 0 0 0-71.76192 81.3056l25.72288 205.7216a46.40768 46.40768 0 0 0 92.07808 0l25.72288-205.74208A72.31488 72.31488 0 0 0 512 307.2z" p-id="2750">\r\n</path>\r\n</svg>',close:'<?xml version="1.0" standalone="no"?>\r\n<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\r\n<svg t="1655876154826" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="22" height="22">\r\n<path d="M571.733333 512l268.8-268.8c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0L512 452.266667 243.2 183.466667c-17.066667-17.066667-42.666667-17.066667-59.733333 0-17.066667 17.066667-17.066667 42.666667 0 59.733333L452.266667 512 183.466667 780.8c-17.066667 17.066667-17.066667 42.666667 0 59.733333 8.533333 8.533333 19.2 12.8 29.866666 12.8s21.333333-4.266667 29.866667-12.8L512 571.733333l268.8 268.8c8.533333 8.533333 19.2 12.8 29.866667 12.8s21.333333-4.266667 29.866666-12.8c17.066667-17.066667 17.066667-42.666667 0-59.733333L571.733333 512z" p-id="2131">\r\n</path>\r\n</svg>',airplay:'<svg width="18px" height="18px" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">\r\n <g>\r\n <path d="M16,1 L2,1 C1.447,1 1,1.447 1,2 L1,12 C1,12.553 1.447,13 2,13 L5,13 L5,11 L3,11 L3,3 L15,3 L15,11 L13,11 L13,13 L16,13 C16.553,13 17,12.553 17,12 L17,2 C17,1.447 16.553,1 16,1 L16,1 Z"></path>\r\n <polygon points="4 17 14 17 9 11"></polygon>\r\n </g>\r\n</svg>\r\n'};class Je{constructor(t){const e=s(s({},Ze),t.option.icons);for(const r in e)vt(this,r,{get:()=>tt(r,e[r])})}}const Qe=new WeakMap;function tr(t,e,r){const n=()=>!e.closed&&!M(t),o=t=>{try{e.dispose()}catch(r){console.warn("Failed to release info polling resources:",r)}throw t};try{const{proxy:i,constructor:a,template:{$infoPanel:s,$infoClose:l,$video:c}}=t,d=i(l,"click",()=>{n()&&r()});e.add(()=>{t.events.remove(d)});const u=Array.from(s.querySelectorAll("[data-video]")),p=()=>e.dispose();t.on("destroy",p),e.add(()=>{t.off("destroy",p)}),function(t,e,r){const{$player:n,$info:o,$infoClose:i}=t.template;if(!o)return;const a=()=>!e.closed&&!M(t),s=()=>n.classList.contains("art-info-show"),l=t.i18n.get("Close");if(!a())return;const c=t.i18n.get("Video Info");if(!a())return;i.setAttribute("aria-label",l),o.setAttribute("role","group"),o.setAttribute("aria-label",c),zt(e,i,()=>i.click(),s),Ct(e,o,"keydown",t=>{const e=t;a()&&s()&&Mt(e)&&!e.defaultPrevented&&"Escape"===e.key&&(Pt(e),r())});const d=e=>{var r;if(!a())return;const s=n.ownerDocument,l=s.activeElement;if(e)o.contains(l)||(Qe.delete(t),l&&n.contains(l)&&(Qe.set(t,re(l)),n.classList.contains("art-keyboard-focus")&&i.focus({preventScroll:!0})));else{const e=Qe.get(t);if(Qe.delete(t),!o.contains(l))return;const i=e&&(null==(r=s.defaultView)?void 0:r.getComputedStyle(e).visibility);(null==e?void 0:e.isConnected)&&n.contains(e)&&e.getClientRects().length&&"hidden"!==i&&"collapse"!==i&&!e.matches(":disabled")&&!e.closest("[inert]")&&"true"!==e.getAttribute("aria-disabled")?e.focus({preventScroll:!0}):It(t)}};t.on("info",d),e.add(()=>{t.off("info",d)})}(t,e,r);const f=()=>{var t;try{for(const e of u){if(!n())return;const r=Reflect.get(c,null!=(t=e.dataset.video)?t:"undefined");if(!n())return;const o="number"===typeof r?r.toFixed(2):r;if(!n())return;if(e.textContent!==o){const t=null==o?null:`${o}`;if(!n())return;e.textContent=t}}n()&&St(e,f,a.INFO_LOOP_TIME)}catch(r){o(r)}};n()&&f()}catch(i){o(i)}}const er=new WeakMap;class rr extends Zt{constructor(t){super(t),this.name="info",er.set(this,{revision:0}),k||this.init()}init(){var t;const e=er.get(this),r=++e.revision;if(null==(t=e.scope)||t.dispose(),M(this.art)||e.revision!==r)return;const n=P(this.art).child();e.scope=n,n.add(()=>{e.scope===n&&(e.scope=void 0)}),tr(this.art,n,()=>{this.show=!1})}}class nr extends Zt{constructor(t){super(t);const{option:e,template:{$layer:r}}=t;this.name="layer",this.$parent=r;for(let n=0;n<e.layers.length;n++)this.add(e.layers[n])}}class or extends Zt{constructor(t){super(t),this.name="loading";const e=t.icons.loading;M(t)||Rt(t.template.$loading,e)}}class ir extends Zt{constructor(t){super(t),this.name="mask";const{template:e,icons:r,events:n}=t,o=r.state;if(M(t))return;const i=Rt(e.$state,o),a=r.error;if(M(t))return;const s=Rt(e.$state,a);et(s,"display","none");let l=!1;const c=()=>{et(i,"display","none"),et(s,"display",null),M(t)&&(l=!0)};var d;t.on("destroy",c),(d=t,L(d).finalizers).add(()=>{try{l||c()}finally{t.off("destroy",c)}}),M(t)||n.proxy(e.$state,"click",()=>{M(t)||at(t.play())})}}const ar=new WeakMap;function sr(t){const e=ar.get(t);e.revision++,e.pending=void 0,null!==t.timer&&(clearTimeout(t.timer),t.timer=null)}class lr{constructor(t){this.art=t,this.timer=null,ar.set(this,{revision:0});const e=()=>this.destroy();t.on("destroy",e),P(t).add(()=>{t.off("destroy",e)}),P(t).add(()=>{this.destroy()})}destroy(){sr(this)}set show(t){if(M(this.art))return;const e=ar.get(this);e.revision++;const{constructor:r,template:{$player:n,$noticeInner:o}}=this.art;if(t){sr(this);const i=e.revision,a=()=>!M(this.art)&&e.revision===i;if(o.textContent=t instanceof Error?t.message.trim():t,!a())return;if(j(n,"art-notice-show"),!a())return;const s=r.NOTICE_TIME;if(!a())return;const l={};e.pending=l;const c=setTimeout(()=>{if(M(this.art)||e.pending!==l)return;e.pending=void 0;const t=e.revision;o.textContent="",M(this.art)||e.revision!==t||q(n,"art-notice-show")},s);a()?this.timer=c:clearTimeout(c)}else q(n,"art-notice-show")}get show(){const{template:{$player:t}}=this.art;return t.classList.contains("art-notice-show")}}function cr(t,e){return function(t,e){const r=wt(e,t);return r.container=t.container,h(r,Gt)}(t,e)}function dr({width:t,height:e}){return Number.isFinite(t)&&t>0&&Number.isFinite(e)&&e>0}function ur(t,e){if(!dr(t)||!Number.isFinite(e)||e<=0)return;const r=t.width/t.height>e?{width:e*t.height,height:t.height,axis:"width"}:{width:t.width,height:t.width/e,axis:"height"};return dr(r)?r:void 0}function pr(t,e,r,n=!1){const o=e=>{M(t)||r(e)};t[n?"once":"on"](e,o),P(t).add(()=>{t.off(e,o)})}function fr(t,e,r){for(const[n,o]of e){if(M(t)||r&&!r())return;t[n].show=o}}function hr(t){const{option:e,constructor:r,i18n:n,notice:o,template:{$player:i}}=t;let a,s=de(t),l=0;return{reset(){l=0,null==a||a.dispose(),q(i,"art-error")},loadStart(){q(i,"art-error")},schedule(d){(d=>c(null,null,function*(){if(M(t))return;const c=de(t);if(c!==s&&(s=c,l=0),a&&!a.closed)return;const u=c.child();a=u,u.add(()=>{a===u&&(a=void 0)});const p=()=>!M(t)&&!u.closed&&c===de(t),f=l<r.RECONNECT_TIME_MAX;try{if(!f){if(fr(t,[["mask",!0],["loading",!1],["controls",!0]],p),!p())return;j(i,"art-error")}if(!(yield Tt(u,r.RECONNECT_SLEEP_TIME))||!p())return;if(f){const r=e.url;if(!p())return;l+=1;const i=l;u.dispose();const a=pe(t);if(s=de(t),he(t,a,r),!a.active())return;const c=`${n.get("Reconnect")}: ${i}`;if(!a.active())return;o.show=c,a.active()&&t.emit("error",d,i)}else{const t=n.get("Video Load Failed");p()&&(o.show=t)}}finally{u.dispose()}}))(d).catch(t=>{console.warn("ArtPlayer reconnect failed:",t)})}}}const mr=[["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"]],vr=(()=>{if("undefined"===typeof document)return!1;const t=mr[0],e={};for(const r of mr){if(r[1]in document){for(const[n,o]of r.entries())e[t[n]]=o;return e}}return!1})(),gr={change:vr.fullscreenchange,error:vr.fullscreenerror},yr={request:(t=document.documentElement,e)=>new Promise((r,n)=>{const o=()=>{yr.off("change",o),r()};yr.on("change",o);const i=t[vr.requestFullscreen](e);i instanceof Promise&&i.then(o).catch(n)}),exit:()=>new Promise((t,e)=>{if(!yr.isFullscreen)return void t();const r=()=>{yr.off("change",r),t()};yr.on("change",r);const n=document[vr.exitFullscreen]();n instanceof Promise&&n.then(r).catch(e)}),toggle:(t,e)=>yr.isFullscreen?yr.exit():yr.request(t,e),onchange(t){yr.on("change",t)},onerror(t){yr.on("error",t)},on(t,e){const r=gr[t];r&&document.addEventListener(r,e,!1)},off(t,e){const r=gr[t];r&&document.removeEventListener(r,e,!1)},raw:vr};function br(t,e,...r){const n=Reflect.get(t,e);if("function"!==typeof n)throw new TypeError(`Fullscreen method ${e} is not available`);return n.apply(t,r)}Object.defineProperties(yr,{isFullscreen:{get:()=>Boolean(document[vr.fullscreenElement])},element:{enumerable:!0,get:()=>document[vr.fullscreenElement]},isEnabled:{enumerable:!0,get:()=>Boolean(document[vr.fullscreenEnabled])}});const wr=new WeakMap;function xr(t){try{Promise.resolve(t()).catch(()=>{})}catch(e){}}function kr(t){const{document:e,elementProperty:r,changeEvent:n,target:o,exit:i}=t,a=function(t,e,r){let n=wr.get(t);if(!n){n=new WeakMap,wr.set(t,n);const o=n;t.addEventListener(r,()=>{const r=Reflect.get(t,e),n=r&&o.get(r);n&&(o.delete(r),xr(n))})}return n}(e,r,n);a.set(o,i),t.element===o&&(a.delete(o),xr(i))}function $r(t,e,r,n,o=()=>t.element!==t.target){const i=e.child();let a,s,l=!1,c=!1,d=!1,u=!1,p=!1;const f=new Promise((t,e)=>{a=t,s=e});function h(t=!1,e){if(!l){l=!0;try{i.dispose()}catch(r){t||(t=!0,e=r)}t?s(e):a()}}i.add(()=>{l||(l=!0,c=!0,a(),d&&!u&&r&&kr(t))});const m=()=>{d&&!u&&(r?t.element===t.target:o())&&h()};if(Ct(i,t.document,t.changeEvent,m),Ct(i,t.document,t.errorEvent,e=>{e.target!==t.target&&e.target!==t.document||(p=!0,d&&!u&&h(!0,new Error("Fullscreen request failed")))}),!i.closed)try{r&&function(t){var e;null==(e=wr.get(t.document))||e.delete(t.target)}(t);const e=r?t.request():t.exit();u=Boolean(e&&"function"===typeof e.then),d=!0,c&&!u&&r&&kr(t),u?Promise.resolve(e).then(()=>{c?n():h()},t=>h(!0,t)).catch(()=>{}):p?h(!0,new Error("Fullscreen request failed")):m()}catch(v){h(!0,v)}return{promise:f,cancel:()=>i.dispose()}}function Er(t,e){const r=P(t).child(),{$player:n,$video:o}=t.template,i=()=>e.element===n||e.element===o;let a,s=i(),l=0,c=s,d=!1,u=!1,p=!1;function f(){if(i())try{Promise.resolve(e.exit()).catch(()=>{})}catch(t){}}return r.add(()=>{l+=1,c=!1,n.classList.remove("art-fullscreen"),f()}),Ct(r,e.document,e.changeEvent,()=>{const r=i();if(r&&function(t){var e,r;return null!=(r=null==(e=wr.get(t.document))?void 0:e.has(t.target))&&r}(e))return;if(r&&u)return void f();if(r===s||M(t))return;s=r;const o=l,a=()=>M(t)||i()!==r||o!==l&&c!==r;t.emit("fullscreen",r),a()||(r&&(t.state="fullscreen"),a()||(n.classList.toggle("art-fullscreen",r),t.emit("resize")))}),Ct(r,e.document,e.errorEvent,r=>{(r.target===n||r.target===o||r.target===e.document&&(p||void 0!==a||i()))&&!M(t)&&t.emit("fullscreenError",r)}),{get:()=>!M(t)&&i(),set(n){if(M(t))return Promise.resolve();const o=++l;if(c=Boolean(n),c?u=!1:d&&(u=!0),null==a||a.cancel(),a=void 0,d=!1,!c&&!i())return Promise.resolve();p=!0,d=c;const s=$r(e,r,c,()=>{!M(t)&&c||f()},()=>!i());p=!1,l===o?a=s:s.cancel();const h=s.promise.catch(e=>{throw M(t)||l!==o||(t.notice.show=e),e}).finally(()=>{l===o&&(a=void 0,d=!1)});return h.catch(()=>{}),h}}}const Ar=new WeakSet;function Cr(t,e=!1){return"string"===typeof t.webkitPresentationMode?"fullscreen"===t.webkitPresentationMode:"boolean"===typeof t.webkitDisplayingFullscreen?t.webkitDisplayingFullscreen:t.ownerDocument.fullscreenElement===t||e}function Sr(t){Ar.delete(t),t.removeEventListener("webkitbeginfullscreen",Tr),t.removeEventListener("webkitpresentationmodechanged",Tr)}function Tr(t){var e;if(Ar.has(this)&&Cr(this,"webkitbeginfullscreen"===t.type)){Sr(this);try{null==(e=this.webkitExitFullscreen)||e.call(this)}catch(r){}}}function Lr(t){Ar.add(t),t.addEventListener("webkitbeginfullscreen",Tr),t.addEventListener("webkitpresentationmodechanged",Tr)}function Pr(t){const{$video:e}=t.template,r=P(t).child();let n=!1,o=Cr(e),i=o,a=!1,s=0;const l=()=>Cr(e,n);function c(r){if(M(t)||(c=e,Ar.has(c)))return;var c;"boolean"===typeof r&&(n=r);const d=l();if(d&&(a=!1),d===o)return;o=d;const u=s,p=()=>M(t)||l()!==d||u!==s&&i!==d;t.emit("fullscreen",d),p()||(d&&(t.state="fullscreen"),p()||t.emit("resize"))}r.add(()=>{var t;s++,i=!1,a&&Lr(e),l()&&(null==(t=e.webkitExitFullscreen)||t.call(e))}),Ct(r,e,"webkitbeginfullscreen",()=>c(!0)),Ct(r,e,"webkitendfullscreen",()=>c(!1)),Ct(r,e,"webkitpresentationmodechanged",()=>c());const d=()=>c();return t.on("document:webkitfullscreenchange",d),r.add(()=>{t.off("document:webkitfullscreenchange",d)}),{get:()=>!M(t)&&l(),set(r){if(M(t))return;const n=++s;if(i=Boolean(r),r){if(Sr(e),t.state="fullscreen",M(t)||n!==s)return;a=!0;try{e.webkitEnterFullscreen()}catch(o){throw n===s&&(a=!1),o}}else a&&(a=!1,Lr(e)),l()&&e.webkitExitFullscreen()}}}function Mr(t){return{node:t,parent:t.parentNode,next:t.nextSibling}}function zr({node:t,parent:e,next:r}){var n;if(!e)return void(null==(n=t.parentNode)||n.removeChild(t));const o=(null==r?void 0:r.parentNode)===e?r:null;t.parentNode===e&&t.nextSibling===o||e.insertBefore(t,o)}function Rr(t,e,r){const n=Math.max(0,r.viewportWidth-r.width),o=Math.max(0,r.viewportHeight-r.height);return{left:Math.max(0,Math.min(t,n)),top:Math.max(0,Math.min(e,o))}}function Or(t){const{width:e,height:r}=t.getBoundingClientRect(),n=t.ownerDocument.defaultView;return{width:e,height:r,viewportWidth:n.innerWidth,viewportHeight:n.innerHeight}}function Dr(t,e,r,n){const o=e.child();if(o.closed)return;const i=t.template.$mini;if(i){const t=i.style.display;return o.add(()=>{i.style.display=t}),{element:i,cancelDrag:()=>{},fresh:!1}}const a=t.template.$player.ownerDocument,s=a.createElement("div");s.className="art-mini-popup",o.add(()=>{s.remove()});try{const e=a.createElement("div");if(e.className="art-mini-close",e.append(t.icons.close),o.closed)return;const i=a.createElement("div");i.className="art-mini-state";const l=t.icons.play,c=t.icons.pause;if(o.closed)return;i.append(l,c),s.append(e,i),zt(o,e,()=>e.click(),r),zt(o,i,()=>(t.playing?c:l).click(),r);const d=t.i18n.get("Close");if(o.closed||M(t))return;e.setAttribute("aria-label",d);const u=t.i18n.get("Mini Player");if(o.closed||M(t))return;s.setAttribute("role","group"),s.setAttribute("aria-label",u),Ct(o,s,"keydown",t=>{const e=t;r()&&Mt(e)&&!e.defaultPrevented&&"Escape"===e.key&&(Pt(e),n())}),Ct(o,e,"click",n),Ct(o,l,"click",()=>{at(t.play())}),Ct(o,c,"click",()=>{t.pause()});const p=()=>{if(o.closed)return;const e=t.i18n.get(t.playing?"Pause":"Play");o.closed||M(t)||(i.setAttribute("aria-label",e),l.style.display=t.playing?"none":"flex",c.style.display=t.playing?"flex":"none")};p();for(const r of["video:playing","video:pause","video:timeupdate"])t.on(r,p),o.add(()=>{t.off(r,p)});const f=function(t,e,r,n){let o=!1,i=0,a=0;const s=()=>{o=!1,e.classList.remove("art-mini-dragging"),e.style.transform=""};Ct(r,e,"mousedown",t=>{const e=t;0===e.button&&n()&&(o=!0,i=e.clientX,a=e.clientY)});const l=t=>{!r.closed&&o&&n()&&(e.classList.add("art-mini-dragging"),e.style.transform=`translate(${t.clientX-i}px, ${t.clientY-a}px)`)},c=()=>{if(r.closed||!o||!n())return;const i=e.getBoundingClientRect(),a=Rr(i.left,i.top,Or(e));s(),e.style.left=`${a.left}px`,e.style.top=`${a.top}px`,t.storage.set("left",a.left),r.closed||t.storage.set("top",a.top)};return t.on("document:mousemove",l),r.add(()=>{t.off("document:mousemove",l)}),t.on("document:mouseup",c),r.add(()=>{t.off("document:mouseup",c)}),r.add(s),s}(t,s,o,r);if(o.closed)return;if(t.template.$mini=s,a.body.append(s),!o.closed)return{element:s,cancelDrag:f,fresh:!0,focus:()=>e.focus({preventScroll:!0})}}catch(l){throw o.dispose(),t.template.$mini===s&&delete t.template.$mini,l}}function Ir(t){const{$player:e,$video:r}=t.template,n=P(t).child();let o,i,a=0,c=!1,d=!1;const u=()=>!M(t)&&e.classList.contains("art-mini"),p=function(t){const e=t.template.$player;let r;return{entering(){var n;const o=e.ownerDocument,i=o.activeElement,a=i&&e.contains(i);(null==(n=t.template.$mini)?void 0:n.contains(i))||(r=a?re(i):void 0);const s=a&&e.classList.contains("art-keyboard-focus");return e=>{!s||M(t)||o.activeElement!==i&&o.activeElement!==o.body||null==e||e()}},leaving(n){const o=e.ownerDocument,i=null==n?void 0:n.contains(o.activeElement);return()=>{var e;if(!i||M(t)||o.activeElement!==o.body&&!(null==n?void 0:n.contains(o.activeElement)))return;const a=r&&(null==(e=o.defaultView)?void 0:e.getComputedStyle(r).visibility);(null==r?void 0:r.isConnected)&&r.getClientRects().length&&"hidden"!==a&&"collapse"!==a&&"true"!==r.getAttribute("aria-disabled")&&!r.matches(":disabled")&&!r.closest("[inert]")?r.focus({preventScroll:!0}):It(t)}}}}(t);function f(){if(i){const e=i,r=a;i=void 0;try{zr(e)}catch(t){throw r!==a||i||(i=e),t}}}function h(){if(M(t))return;const r=++a;d=!1;const n=p.leaving(t.template.$mini);f(),M(t)||r!==a||(null==o||o.cancelDrag(),e.classList.remove("art-mini"),t.template.$mini&&(t.template.$mini.style.display="none",n(),M(t)||r!==a||t.emit("mini",!1)))}function m(){if(M(t))return;const v=++a;if(c)return void(d=!0);const g=p.entering();if(t.state="mini",!M(t)&&v===a){null!=i||(i=Mr(r)),e.classList.add("art-mini");try{if(!o){c=!0;try{o=Dr(t,n,u,h)}finally{c=!1}}if(d)return d=!1,void m();if(!o||M(t))return;if(v!==a)return void(u()||(o.element.style.display="none"));if(o.fresh?o.element.prepend(r):o.element.append(r),M(t)||v!==a)return;o.element.style.display=o.fresh?"":"flex",o.fresh=!1;const e=t.storage.get("top"),i=function(t,e,r){return"number"===typeof t&&Number.isFinite(t)&&"number"===typeof e&&Number.isFinite(e)&&t>=0&&e>=0&&t+r.width<=r.viewportWidth&&e+r.height<=r.viewportHeight?{left:t,top:e,reset:!1}:l(s({},Rr(r.viewportWidth-r.width-50,r.viewportHeight-r.height-50,r)),{reset:!0})}(t.storage.get("left"),e,Or(o.element));if(M(t)||v!==a)return;if(o.element.style.left=`${i.left}px`,o.element.style.top=`${i.top}px`,i.reset){if(t.storage.set("top",i.top),M(t)||v!==a)return;t.storage.set("left",i.left)}M(t)||v!==a||g(o.focus),M(t)||v!==a||t.emit("mini",!0)}catch(y){const r=d;throw d=!1,M(t)||v!==a&&!r||(f(),e.classList.remove("art-mini"),o&&(o.element.style.display="none")),y}}}return n.add(()=>{a++;try{f()}finally{null==o||o.cancelDrag(),e.classList.remove("art-mini")}}),{get:u,set(t){t?m():h()}}}const Nr=new WeakSet,_r=t=>"picture-in-picture"===t.webkitPresentationMode;function Wr(t){Nr.delete(t),t.removeEventListener("webkitpresentationmodechanged",Fr),t.removeEventListener("enterpictureinpicture",Fr)}function Fr(){var t;if(Nr.has(this)&&_r(this)){Wr(this);try{null==(t=this.webkitSetPresentationMode)||t.call(this,"inline")}catch(e){}}}function Vr(t){Nr.add(t),t.addEventListener("webkitpresentationmodechanged",Fr),t.addEventListener("enterpictureinpicture",Fr)}function Yr(t,e,r,n,o=!0){let i,a=!1;const s=e=>{t.closed||a||(o&&(a=!0,i()),n(e))};return e[o?"once":"on"](r,s),i=t.add(()=>{e.off(r,s)}),s}function Br(t,e,r){return new Promise((n,o)=>{var i;if(M(t)||e===t.url)return void n();const a=null!=(i=function(t){const e=ae.get(t);return(null==e?void 0:e.active())?e.resumePlaying:void 0}(t))?i:t.playing,s=pe(t);s.resumePlaying=a;const l=s.scope.child();let d=!1;const u=(t=!1,e)=>{d||(d=!0,s.resumePlaying=void 0,s.onError=void 0,s.onAssigned=void 0,l.dispose(),t?o(e):n(),t&&s.scope.dispose())};l.add(()=>{u()});const p=()=>!d&&s.active(),f=t=>u(!0,t);s.onError=f;try{const{aspectRatio:n,playbackRate:o}=t;s.internalPause=!0;try{t.pause()}finally{s.internalPause=!1}if(!p())return;const i=l.child();let a=!1,d=!1,h=!1;const m=$e(t,r,p),v=()=>c(null,null,function*(){const e=s.pauseRevision;if(t.aspectRatio=n,p()){if(s.resumePlaying)try{yield t.play()}catch(r){}p()&&(s.pauseRevision===e&&(t.notice.show=""),u())}}),g=()=>{var e,r;if(p()&&!d&&a)try{if(null==(r=null==(e=t.template)?void 0:e.$video)?void 0:r.seeking)return;if(!p())return;if(h||(h=!0,t.playbackRate=o),!m.ready()||!p()||d)return;d=!0,i.dispose(),v().catch(f)}catch(n){f(n)}},y={"video:error":f,"video:loadedmetadata":()=>{if(p())try{m.restore()}catch(t){f(t)}},"video:canplay":()=>{a=!0,g()},"video:seeked":g,seek:m.manual},b=l.child(),w=[],x=Object.keys(y);for(const e of x)Yr(b,t,e,t=>{s.acceptingEvents&&w.push([e,t])},!1);if(he(t,s,e),!p())return;if(t.notice.show="",!p())return;const k=()=>{if(b.dispose(),!e)return void u();const r={};for(const e of x)r[e]=Yr(i,t,e,y[e],"video:seeked"!==e);for(const[t,e]of w){if(!p()||i.closed)break;r[t](e)}w.length=0};s.assigned?k():s.onAssigned=k}catch(h){f(h)}})}function Hr(t){const{option:e,template:{$video:r}}=t;vt(t,"url",{get:()=>r.src,set(n){return c(this,null,function*(){if(M(t))return;const o=function(t){const e=se.get(t);return se.delete(t),e||pe(t)}(t);o.acceptingEvents=!1;try{if(!n)return void((yield Tt(o.scope))&&o.active()&&(t.loading.show=!0));const i=t.url,a=e.type||st(n),s=e.customType[a];if(a&&s){if(!(yield Tt(o.scope))||!o.active())return;t.loading.show=!0}if(!o.active())return;const l=o.scope.child();let c=!1,d=!1;Yr(l,t,"video:canplay",()=>{c=!d}),Yr(l,t,"video:error",()=>{d=!0});try{if(o.acceptingEvents=!0,a&&s){const e=s.call(t,r,n,t);Promise.resolve(e).catch(t=>me(o,t))}else{if(!o.active())return;r.src=n}}finally{l.dispose()}if(!o.active())return;if(i!==t.url&&(t.option.url=n,o.active()&&t.isReady&&i)){const e=()=>{o.active()&&t.emit("restart",n)};c?e():d||Yr(o.scope,t,"video:canplay",e)}}catch(i){me(o,i)}finally{fe(o)}})}})}const jr=[function(t){const{template:{$video:e}}=t;vt(t,"attr",{value(t,r){const n=e;if(void 0===r)return n[t];n[t]=r}})},function(t){const{i18n:e,notice:r,option:n,constructor:{instances:o},template:{$video:i}}=t;vt(t,"play",{value(){return c(this,null,function*(){ce(t,!0);const a=function(t){const e=ue(t),r=ae.get(t),n=null==r?void 0:r.pauseRevision;return()=>e()&&(null==r?void 0:r.pauseRevision)===n}(t),s=yield i.play();if(!a())return s;const l=e.get("Play");if(!a())return s;if(r.show=l,!a())return s;if(t.emit("play"),n.mutex)for(let e=0;e<o.length&&a();e++){const r=o[e];r!==t&&r.pause()}return s})}})},function(t){const{template:{$video:e},i18n:r,notice:n}=t;vt(t,"pause",{value(){ce(t,!1);const o=e.pause();return n.show=r.get("Pause"),t.emit("pause"),o}})},function(t){vt(t,"toggle",{value:()=>t.playing?t.pause():t.play()})},function(t){const{notice:e}=t;vt(t,"seek",{set(r){t.currentTime=r,t.duration&&(e.show=`${ut(t.currentTime)} / ${ut(t.duration)}`),t.emit("seek",t.currentTime,r)}});const r=t;vt(t,"forward",{set(e){r.seek=t.currentTime+e}}),vt(t,"backward",{set(e){r.seek=t.currentTime-e}})},function(t){const{template:{$video:e},i18n:r,notice:n,storage:o}=t;vt(t,"volume",{get:()=>e.volume||0,set:t=>{e.volume=ct(t,0,1),n.show=`${r.get("Volume")}: ${Number.parseInt(String(100*e.volume),10)}`,0!==e.volume&&o.set("volume",e.volume)}}),vt(t,"muted",{get:()=>e.muted,set:r=>{e.muted=r,t.emit("muted",r)}})},function(t){const{$video:e}=t.template;vt(t,"currentTime",{get:()=>e.currentTime||0,set:r=>{const n=Number.parseFloat(r);Number.isNaN(n)||(!function(t){xe.set(t,ke(t)+1)}(t),e.currentTime=ct(n,0,t.duration))}})},function(t){vt(t,"duration",{get:()=>{const{duration:e}=t.template.$video;return e===1/0?0:e||0}})},function(t){const e=e=>Br(t,e,0);vt(t,"switchQuality",{value:e=>Br(t,e,t.currentTime)}),vt(t,"switchUrl",{value:e}),vt(t,"switch",{set:e})},function(t){const{template:{$video:e},i18n:r,notice:n}=t,o=t;vt(t,"playbackRate",{get:()=>e.playbackRate,set(t){if(t){if(t===e.playbackRate)return;e.playbackRate=t,n.show=`${r.get("Rate")}: ${1===t?r.get("Normal"):`${t}x`}`}else o.playbackRate=1}})},function(t){const{i18n:e,notice:r,template:{$video:n,$player:o}}=t;vt(t,"aspectRatio",{get:()=>o.dataset.aspectRatio||"default",set(i){if(!M(t)){if(i||(i="default"),"default"===i)n.style.width="",n.style.height="",n.style.margin="",delete o.dataset.aspectRatio;else{const e=i.split(":").map(Number),r=ur({width:o.clientWidth,height:o.clientHeight},e[0]/e[1]);if(M(t))return;"width"===(null==r?void 0:r.axis)?(n.style.width=`${r.width}px`,n.style.height="100%",n.style.margin="0 auto"):r&&(n.style.width="100%",n.style.height=`${r.height}px`,n.style.margin="auto 0"),o.dataset.aspectRatio=i}r.show=`${e.get("Aspect Ratio")}: ${"default"===i?e.get("Default"):i}`,M(t)||t.emit("aspectRatio",i)}}})},function(t){const{notice:e,template:{$video:r}}=t,n=document.createElement("canvas");function o(o){const i=ue(t);return new Promise((a,s)=>{const l=r=>{try{!M(t)&&i()&&(e.show=r)}catch(n){return void s(n)}s(r)};try{!function(t,e){t.width=e.videoWidth,t.height=e.videoHeight;const r=t.getContext("2d");if(!r)throw new TypeError("Canvas 2D context is unavailable");r.drawImage(e,0,0)}(n,r),o?function(t,e,r){t.toBlob(t=>{try{if(!t)throw new Error("Unable to encode screenshot blob");e(URL.createObjectURL(t))}catch(n){r(n)}})}(n,a,l):a(n.toDataURL("image/png"))}catch(c){l(c)}})}vt(t,"getDataURL",{value:()=>o(!1)}),vt(t,"getBlobUrl",{value:()=>o(!0)}),vt(t,"screenshot",{value:e=>c(null,null,function*(){const n=ue(t),o=yield t.getDataURL();if(!M(t)&&n()){const i=e||`artplayer_${ut(r.currentTime)}`;!M(t)&&n()&&lt(o,`${i}.png`),!M(t)&&n()&&t.emit("screenshot",o)}return o})})},function(t){const{i18n:e,notice:r,template:{$video:n,$player:o}}=t,i=()=>{if(M(t))return;const i=function(t){const e=yr.raw,r=t.ownerDocument;if(e&&Reflect.get(r,e.fullscreenEnabled))return{document:r,target:t,get element(){return Reflect.get(r,e.fullscreenElement)},elementProperty:e.fullscreenElement,changeEvent:e.fullscreenchange,errorEvent:e.fullscreenerror,request:()=>br(t,e.requestFullscreen,void 0),exit:()=>br(r,e.exitFullscreen)}}(o);i?vt(t,"fullscreen",Er(t,i)):n.webkitSupportsFullscreen&&"function"===typeof n.webkitEnterFullscreen&&"function"===typeof n.webkitExitFullscreen?vt(t,"fullscreen",Pr(t)):vt(t,"fullscreen",{get:()=>!1,set(){M(t)||(r.show=e.get("Fullscreen Not Supported"))}}),vt(t,"fullscreen",bt(t,"fullscreen"))};t.once("video:loadedmetadata",i),P(t).add(()=>{t.off("video:loadedmetadata",i)})},function(t){const e=function(t){const{$player:e}=t.template;let r,n=0;function o(t,r){return null===t.style?e.removeAttribute("style"):e.setAttribute("style",t.style),!!r()&&(e.classList.remove("art-fullscreen-web"),!!r()&&(zr(t.placement),r()))}return P(t).add(()=>{var t;n+=1;const i=r;if(r=void 0,i)try{o(i,()=>!0)}catch(a){try{e.parentNode!==i.placement.parent&&(null==(t=e.parentNode)||t.removeChild(e))}catch(s){throw new A([a,s])}throw a}}),i=>{if(M(t))return;const a=++n,s=()=>a===n&&!M(t),l=function(t){var e;const r=null==(e=t.ownerDocument)?void 0:e.activeElement,n=r&&t.contains(r);return()=>{n&&r.isConnected&&t.contains(r)&&r.ownerDocument.activeElement===r.ownerDocument.body&&r.focus({preventScroll:!0})}}(e);if(i){r||(r={placement:Mr(e),style:e.getAttribute("style")});const n=r;try{const r=e.ownerDocument.body;if(t.constructor.FULLSCREEN_WEB_IN_BODY&&e.parentNode!==r&&r.appendChild(e),!s())return;if(t.state="fullscreenWeb",!s())return;e.style.width="100%",e.style.height="100%",e.classList.add("art-fullscreen-web")}catch(c){throw s()&&o(n,s)&&(r=void 0,l()),c}if(!s())return;if(l(),!s())return;t.emit("fullscreenWeb",!0)}else{if(r){if(!o(r,s))return;r=void 0}else e.classList.remove("art-fullscreen-web");if(!s())return;if(l(),!s())return;t.emit("fullscreenWeb",!1)}s()&&t.emit("resize")}}(t);vt(t,"fullscreenWeb",{get:()=>t.template.$player.classList.contains("art-fullscreen-web"),set:e})},function(t){const{i18n:e,notice:r,template:{$video:n}}=t,o=n.ownerDocument;o.pictureInPictureEnabled&&"function"===typeof n.requestPictureInPicture&&"function"===typeof o.exitPictureInPicture?vt(t,"pip",function(t){const{$video:e}=t.template,r=e.ownerDocument,n=P(t).child(),o=()=>r.pictureInPictureElement===e;let i=o(),a=i,s=!1,l=!1,c=0;function d(){if(o())try{r.exitPictureInPicture().catch(()=>{})}catch(t){}}function u(e,r,n){e.then(()=>{!r||!M(t)&&a||d()},e=>{M(t)||c!==n||(t.notice.show=e)}).finally(()=>{c===n&&(s=!1)}).catch(()=>{})}return e.disablePictureInPicture=!1,n.add(()=>{c++,a=!1,d()}),Ct(n,e,"enterpictureinpicture",()=>{if(l)return void d();if(!o()||i)return;const e=c;t.state="pip",!M(t)&&e===c&&o()&&(i=!0,t.emit("pip",!0))}),Ct(n,e,"leavepictureinpicture",()=>{i&&!o()&&(i=!1,t.emit("pip",!1))}),{get:()=>!M(t)&&o()?e:null,set(n){if(M(t))return;const i=++c;if(a=Boolean(n),a?l=!1:s&&(l=!0),s=!1,a){if(t.state="pip",M(t)||c!==i)return;s=!0;try{u(e.requestPictureInPicture(),!0,i)}catch(d){throw c===i&&(s=!1),d}}else o()&&u(r.exitPictureInPicture(),!1,i)}}}(t)):"function"===typeof n.webkitSupportsPresentationMode&&"function"===typeof n.webkitSetPresentationMode?vt(t,"pip",function(t){const{$video:e}=t.template,r=P(t).child();let n=!1,o=!1,i=0,a=0;function s(r=!1){if(M(t)||Nr.has(e))return;const s=_r(e);if(s&&(o=!1),s===n&&!r)return;const l=i;s&&(t.state="pip"),M(t)||i!==l||_r(e)!==s||(n=s,a++,t.emit("pip",s))}e.webkitSetPresentationMode("inline"),r.add(()=>{i++,o&&Vr(e),_r(e)&&e.webkitSetPresentationMode("inline")});for(const l of["webkitpresentationmodechanged","enterpictureinpicture","leavepictureinpicture"])Ct(r,e,l,()=>s());return{get:()=>!M(t)&&_r(e),set(r){var n;if(M(t))return;const l=++i,c=a;if(r){if(!1===(null==(n=e.webkitSupportsPresentationMode)?void 0:n.call(e,"picture-in-picture")))return void(t.notice.show=t.i18n.get("PIP Not Supported"));if(Wr(e),t.state="pip",M(t)||i!==l)return;o=!0;try{e.webkitSetPresentationMode("picture-in-picture")}catch(d){throw l===i&&(o=!1),d}}else o&&(o=!1,Vr(e)),_r(e)&&e.webkitSetPresentationMode("inline");M(t)||l!==i||c!==a||_r(e)!==Boolean(r)||s(!0)}}}(t)):vt(t,"pip",{get:()=>!1,set(){M(t)||(r.show=e.get("PIP Not Supported"))}})},function(t){const{$video:e}=t.template,r=t;vt(t,"loaded",{get:()=>r.loadedTime/e.duration}),vt(t,"loadedTime",{get:()=>e.buffered.length?e.buffered.end(e.buffered.length-1):0})},function(t){vt(t,"played",{get:()=>t.currentTime/t.duration})},function(t){const{$video:e}=t.template;vt(t,"playing",{get:()=>"boolean"===typeof e.playing?e.playing:!!(e.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2)})},function(t){const{$container:e,$player:r,$video:n}=t.template;vt(t,"autoSize",{value(){if(M(t))return;const o={width:n.videoWidth,height:n.videoHeight};if(!dr(o))return;const i=Y(e),a=ur(i,o.width/o.height);a&&!M(t)&&("width"===a.axis?(r.style.width=a.width/i.width*100+"%",r.style.height="100%"):(r.style.width="100%",r.style.height=a.height/i.height*100+"%"),t.emit("autoSize",{width:t.width,height:t.height}))}})},function(t){const e=t;vt(t,"rect",{get:()=>Y(t.template.$player)});const r=["bottom","height","left","right","top","width"];for(let n=0;n<r.length;n++){const o=r[n];vt(t,o,{get:()=>e.rect[o]})}vt(t,"x",{get:()=>e.left+window.pageXOffset}),vt(t,"y",{get:()=>e.top+window.pageYOffset})},function(t){const{template:{$player:e},i18n:r,notice:n}=t;vt(t,"flip",{get:()=>e.dataset.flip||"normal",set(o){M(t)||(o||(o="normal"),"normal"===o?delete e.dataset.flip:e.dataset.flip=o,n.show=`${r.get("Video Flip")}: ${r.get(dt(o))}`,M(t)||t.emit("flip",o))}})},function(t){vt(t,"mini",Ir(t))},function(t){const{template:{$poster:e}}=t;vt(t,"poster",{get:()=>{try{return e.style.backgroundImage.match(/"(.*)"/)[1]}catch(t){return""}},set(t){et(e,"backgroundImage",`url(${t})`)}})},function(t){const{$container:e,$video:r}=t.template;vt(t,"autoHeight",{value(){if(M(t))return;const n=function(t,e){if(!Number.isFinite(t)||t<=0||!dr(e))return;const r=e.height*(t/e.width);return Number.isFinite(r)&&r>0?r:void 0}(e.clientWidth,{width:r.videoWidth,height:r.videoHeight});void 0===n||M(t)||(e.style.height=`${n}px`,t.emit("autoHeight",n))}})},function(t){const{$player:e}=t.template;vt(t,"cssVar",{value:(t,r)=>r?e.style.setProperty(t,r):getComputedStyle(e).getPropertyValue(t)})},function(t){vt(t,"theme",{get:()=>t.cssVar("--art-theme"),set(e){t.cssVar("--art-theme",e)}})},function(t){vt(t,"type",{get:()=>t.option.type,set(e){t.option.type=e}})},function(t){const e=["mini","pip","fullscreen","fullscreenWeb"];vt(t,"state",{get:()=>e.find(e=>t[e])||"standard",set(r){for(let n=0;n<e.length;n++){const o=e[n];o!==r&&t[o]&&(t[o]=!1)}}})},function(t){const{notice:e,i18n:r,template:n}=t;vt(t,"subtitleOffset",{get(){var t;return(null==(t=n.$track)?void 0:t.offset)||0},set(o){var i,a;const{cues:s}=t.subtitle;if(!n.$track||0===s.length)return;const l=ct(o,-10,10);n.$track.offset=l;for(let e=0;e<s.length;e++){const r=s[e];r.originalStartTime=null!=(i=r.originalStartTime)?i:r.startTime,r.originalEndTime=null!=(a=r.originalEndTime)?a:r.endTime,r.startTime=ct(r.originalStartTime+l,0,t.duration),r.endTime=ct(r.originalEndTime+l,0,t.duration)}!function(t,e,r){if(!t||"disabled"===t.mode||!(null==e?void 0:e.paused)||!Number.isFinite(e.currentTime))return;const n=e.currentTime,o=r.filter(t=>t.startTime<=n&&n<t.endTime),i=Array.from(t.activeCues||[]);if(o.length!==i.length||!o.every((t,e)=>i[e]===t)){for(const e of r)t.removeCue(e);for(const e of r)t.addCue(e)}}(n.$track.track,n.$video,s),t.subtitle.update(),e.show=`${r.get("Subtitle Offset")}: ${o}s`,t.emit("subtitleOffset",o)}})},function(t){if(M(t))return;const{i18n:e,notice:r,proxy:n,template:{$video:o}}=t;let i=!0;const a=window.WebKitPlaybackTargetAvailabilityEvent;if(M(t))return;const s=a&&o.webkitShowPlaybackTargetPicker;M(t)||(s?n(o,"webkitplaybacktargetavailabilitychanged",e=>{if(!M(t))switch(e.availability){case"available":i=!0;break;case"not-available":i=!1}}):i=!1,M(t)||vt(t,"airplay",{value(){if(!M(t))if(i){const e=o.webkitShowPlaybackTargetPicker;if(M(t))return;Reflect.apply(e,o,[]),M(t)||t.emit("airplay")}else{const n=e.get("AirPlay Not Available");M(t)||(r.show=n)}}}))},function(t){vt(t,"quality",{set(e){const{controls:r,notice:n,i18n:o}=t,i=e.find(t=>t.default)||e[0];r.update({name:"quality",position:"right",index:10,style:{marginRight:"10px"},html:(null==i?void 0:i.html)||"",selector:e,onSelect(e,r,i){return c(this,null,function*(){const r=function(t){return t&&Se.get(t)||(()=>!0)}(i);if(yield t.switchQuality(e.url),!M(t)&&r()){const i=`${o.get("Switch Video")}: ${e.html}`;!M(t)&&r()&&(n.show=i)}return e.html})}})}})},function(t){const{option:e,template:{$progress:r,$video:n}}=t;let o,i,a,l=P(t).child(),c=!1;function d(){const e=l;l=P(t).child(),o=void 0,c=!1,a=void 0,e.dispose()}function u(){const i=a,c=l;if(!i||!o)return;const d=()=>{var e;return!M(t)&&!c.closed&&l===c&&a===i&&i.sourceActive()&&(null==(e=t.controls)?void 0:e.thumbnails)===i.element};if(!d())return;const u=r.clientWidth*i.percentage;if(!(u>0&&u<r.clientWidth))return;const p=s({backgroundImage:`url(${o.src})`},function(t,e){const{number:r,column:n,width:o,height:i,scale:a}=t,{imageWidth:s,videoWidth:l,videoHeight:c,progressWidth:d,position:u}=e,p=Number(n),f=Number(o)*Number(a)||s/p,h=Number(i)*Number(a)||f/(l/c),m=Math.floor(u/(d/Number(r)));return{height:`${h}px`,width:`${f}px`,backgroundPosition:`-${m%p*f}px -${Math.floor(m/p)*h}px`,left:u<=f/2?0:u>d-f/2?d-f+"px":u-f/2+"px"}}(e.thumbnails,{imageWidth:o.naturalWidth,videoWidth:n.videoWidth,videoHeight:n.videoHeight,progressWidth:r.clientWidth,position:u}));for(const[t,e]of Object.entries(p)){if(!d())return;et(i.element,t,e)}}Ve(t)("setBar",(r,n,s)=>{var p;const f=null==(p=t.controls)?void 0:p.thumbnails,{url:h,scale:m}=e.thumbnails;if(!M(t)&&f&&h&&("hover"===r||"played"===r&&s&&k)){if(i!==f){const t=D(f);if(t.closed)return;i=f,t.add(()=>{i===f&&(i=void 0,d())})}if(a={percentage:n,element:f,sourceActive:ue(t)},o)u();else if(!c){const t=l;c=!0,function(t,e,r){return nt(t,e,r)}(h,m,t).then(e=>{l!==t||t.closed||(c=!1,o=e,u())}).catch(e=>{l!==t||t.closed||(c=!1,console.warn("ArtPlayer thumbnail load failed:",e))})}}}),vt(t,"thumbnails",{get:()=>t.option.thumbnails,set:e=>{M(t)||!e.url||t.option.isLive||M(t)||(t.option.thumbnails=e,d())}})},function(t){!function(t){const{proxy:e,template:{$video:r}}=t;for(let n=0;n<E.events.length;n++)e(r,E.events[n],e=>{M(t)||t.emit(`video:${e.type}`,e)})}(t);const e=hr(t);!function(t,e){pr(t,"video:canplay",()=>{e.reset(),fr(t,[["loading",!1]])}),pr(t,"video:canplay",()=>{fr(t,[["loading",!1],["controls",!0],["mask",!0]]),M(t)||(t.isReady=!0,t.emit("ready"))},!0)}(t,e),function(t){const{option:e}=t;pr(t,"video:ended",()=>{if(e.loop){const e=ue(t);if(t.seek=0,M(t)||!e())return;at(t.play()),e()&&fr(t,[["controls",!1],["mask",!1]],e)}else fr(t,[["controls",!0],["mask",!0]])})}(t),pr(t,"video:error",e.schedule),function(t,e){const{template:{$poster:r}}=t;pr(t,"video:loadedmetadata",()=>{t.emit("resize"),k&&fr(t,[["loading",!1],["controls",!0],["mask",!0]])}),pr(t,"video:loadstart",()=>{e.loadStart(),fr(t,[["loading",!0],["mask",!1],["controls",!0]])}),pr(t,"video:pause",()=>{fr(t,[["controls",!0],["mask",!0]])}),pr(t,"video:play",()=>{fr(t,[["mask",!1]]),M(t)||et(r,"display","none")}),pr(t,"video:playing",()=>fr(t,[["mask",!1]])),pr(t,"video:progress",()=>{t.playing&&fr(t,[["loading",!1]])}),pr(t,"video:seeked",()=>fr(t,[["loading",!1],["mask",!0]])),pr(t,"video:seeking",()=>fr(t,[["loading",!0],["mask",!1]])),pr(t,"video:timeupdate",()=>fr(t,[["mask",!1]])),pr(t,"video:waiting",()=>fr(t,[["loading",!0],["mask",!1]]))}(t,e)},function(t){if(M(t))return;const{option:e,storage:r,template:{$video:n,$poster:o}}=t;for(const s in e.moreVideoAttr){if(M(t))return;const r=e.moreVideoAttr[s];if(M(t))return;t.attr(s,r)}if(M(t))return;if(e.muted){const r=e.muted;if(M(t))return;t.muted=r}if(M(t))return;if(e.volume){const r=ct(e.volume,0,1);if(M(t))return;n.volume=r}if(M(t))return;const i=r.get("volume");if(M(t))return;if("number"===typeof i&&(n.volume=ct(i,0,1)),M(t))return;if(e.poster){const r=`url(${e.poster})`;if(M(t))return;et(o,"backgroundImage",r)}if(M(t))return;if(e.autoplay){const r=e.autoplay;if(M(t))return;n.autoplay=r}if(M(t))return;if(e.playsInline){if(M(t))return;if(n.playsInline=!0,M(t))return;n["webkit-playsinline"]=!0}if(M(t))return;if(e.theme){const r=e.cssVar,n=e.theme;if(M(t))return;r["--art-theme"]=n}for(const s in e.cssVar){if(M(t))return;const r=e.cssVar[s];if(M(t))return;t.cssVar(s,r)}if(M(t))return;const a=e.url;M(t)||(t.url=a)}];class qr{constructor(t){if(!M(t)){Hr(t);for(const e of jr){if(M(t))return;e(t)}}}}const Ur=new WeakMap,Xr="art-auto-orientation-fullscreen";function Gr(t){if(Ur.get(t.orientation)===t)try{t.orientation.unlock()}catch(e){}}const Kr="art-auto-orientation",Zr=["width","height","transform-origin","transform"];function Jr(t){const{$player:e,$video:r}=t.template,n=()=>{const t={width:r.videoWidth,height:r.videoHeight},n=e.ownerDocument.documentElement,o={width:n.clientWidth,height:n.clientHeight};return dr(t)&&dr(o)&&(t.width>t.height&&o.width<o.height||t.width<t.height&&o.width>o.height)},o=function(t,e){const{$player:r}=t.template,n=P(t);let o,i=()=>{};function a(){i(),i=()=>{};const e=o;if(o=void 0,e&&t.fullscreenWeb)for(const{name:t,value:o,priority:i}of e)r.style.setProperty(t,o,i);const n=r.classList.contains(Kr);r.classList.remove(Kr),n&&(t.isRotate=!1,M(t)||t.emit("resize"))}function s(n){if(!t.fullscreenWeb||!e())return;const i=B();if(M(t)||!t.fullscreenWeb)return;const a=r.ownerDocument.documentElement;null!=o||(o=Zr.map(t=>({name:t,value:r.style.getPropertyValue(t),priority:r.style.getPropertyPriority(t)}))),r.style.width=a.clientHeight-i.top-i.bottom+"px",r.style.height=a.clientWidth-i.left-i.right+"px",r.style.transformOrigin="0 0",r.style.transform=`rotate(90deg) translate(${i.top}px, -${a.clientWidth-i.right}px)`,r.classList.add(Kr),t.isRotate=!0,n&&t.emit("resize")}return n.add(a),r=>{var l;M(t)||(r?o?s(!1):e()&&(i(),i=St(n,()=>{o||s(!0)},Number(null!=(l=t.constructor.AUTO_ORIENTATION_TIME)?l:0))):a())}}(t,n),i=function(t,e){const{$player:r}=t.template;let n;function o(){const t=n;n=void 0,r.classList.remove(Xr),t&&(t.cancelled=!0,Gr(t),t.settled&&Ur.get(t.orientation)===t&&Ur.delete(t.orientation))}return P(t).add(o),i=>{var a,s;if(M(t))return;if(!i)return void o();if(n&&!n.cancelled&&Ur.get(n.orientation)===n)return;const l=null==(s=null==(a=r.ownerDocument.defaultView)?void 0:a.screen)?void 0:s.orientation;if("function"!==typeof(null==l?void 0:l.lock)||"function"!==typeof l.unlock||!e())return;const c={orientation:l,cancelled:!1,settled:!1};n=c,Ur.set(l,c);const d=()=>!M(t)&&!c.cancelled&&n===c&&Ur.get(l)===c,u=e=>{c.settled=!0;const o=d();Ur.get(l)===c&&Ur.delete(l),n===c&&(n=void 0),o&&(r.classList.remove(Xr),t.notice.show=e)};try{const t=l.lock(l.type.startsWith("portrait")?"landscape":"portrait");Promise.resolve(t).then(()=>{c.settled=!0,d()?r.classList.add(Xr):(Gr(c),Ur.get(l)===c&&Ur.delete(l))}).catch(u)}catch(p){u(p)}}}(t,n);return t.on("fullscreenWeb",o),t.on("fullscreen",i),P(t).add(()=>{t.off("fullscreenWeb",o),t.off("fullscreen",i)}),{name:"autoOrientation",get state(){return e.classList.contains("art-auto-orientation")}}}function Qr(t){return t.get("times")||{}}function tn(t){const{storage:e}=t,r=function(t){const{i18n:e,icons:r,storage:n,constructor:o,template:{$poster:i}}=t,a=t.layers.add({name:"auto-playback",html:'\n <div class="art-auto-playback-close"></div>\n <div class="art-auto-playback-last"></div>\n <div class="art-auto-playback-jump"></div>\n '});if(!a||M(t))return()=>{};const s=Ot(".art-auto-playback-last",a),l=Ot(".art-auto-playback-jump",a),c=Ot(".art-auto-playback-close",a);Rt(c,r.close);const d=D(a);let u,p=0;const f=()=>{const r=++p;if(null==u||u.dispose(),d.closed||M(t)||p!==r)return;const f=d.child();u=f;const h=()=>u===f&&!f.closed&&!M(t);f.add(()=>{u===f&&(u=void 0,et(a,"display","none"))});const m=de(t).add(()=>{f.dispose()});f.add(()=>{m()});const v=Qr(n)[t.option.id||t.option.url];if(!h())return;if(et(a,"display","none"),!h()||!v||!(v>=o.AUTO_PLAYBACK_MIN))return;if(!h())return;if(et(a,"display","flex"),!h())return;const g=`${e.get("Last Seen")} ${ut(v)}`;if(!h())return;if(s.textContent=g,!h())return;const y=e.get("Jump Play");if(!h())return;if(l.textContent=y,!h())return;const b=(e,r)=>{const n=t.events.proxy(e,"click",()=>{h()&&r()});f.add(()=>{t.events.remove(n)})};if(b(c,()=>{et(a,"display","none")}),!h())return;if(b(l,()=>{t.seek=v,h()&&(at(t.play()),h()&&(et(i,"display","none"),h()&&et(a,"display","none")))}),!h())return;let w=()=>{},x=!1;const k=()=>{!x&&h()&&(x=!0,w(),St(f,()=>{h()&&et(a,"display","none")},o.AUTO_PLAYBACK_TIMEOUT))};t.on("video:timeupdate",k),w=f.add(()=>{t.off("video:timeupdate",k)}),x&&w()};return()=>{N(t,a,"ready",f),N(t,a,"restart",f)}}(t);return function(t){const{storage:e,constructor:r}=t;Ve(t)("video:timeupdate",()=>{if(!t.playing)return;const n=Qr(e),o=Object.keys(n),i=r.AUTO_PLAYBACK_MAX,a=t.option.id||t.option.url,s=t.currentTime;M(t)||(o.length>i&&delete n[o[0]],n[a]=s,M(t)||e.set("times",n))})}(t),r(),{name:"auto-playback",get times(){return Qr(e)},clear:()=>e.del("times"),delete(t){const r=Qr(e);return delete r[t],e.set("times",r),r}}}function en(t){let e,r=0;return{start:n=>{const o=++r;if(null==e||e.scope.dispose(),o!==r||M(t)||1!==n.touches.length||!t.playing||t.isLock)return;const i={scope:de(t).child(),active:!1,previousRate:1};e=i,i.scope.add(()=>{if(e===i&&(e=void 0,i.active))try{t.playbackRate=i.previousRate}finally{(null==e?void 0:e.active)||q(t.template.$player,"art-fast-forward")}}),St(i.scope,()=>{if(e!==i||M(t)||!t.playing||t.isLock)i.scope.dispose();else try{if(i.previousRate=t.playbackRate,e!==i||i.scope.closed)return;i.active=!0;const r=t.constructor.FAST_FORWARD_VALUE;if(e!==i||i.scope.closed||M(t))return;t.playbackRate=r,e!==i||i.scope.closed||M(t)||j(t.template.$player,"art-fast-forward")}catch(r){try{i.scope.dispose()}catch(n){console.warn("Failed to restore fast-forward playback rate:",n)}throw r}},t.constructor.FAST_FORWARD_TIME)},stop:()=>{r++,null==e||e.scope.dispose()}}}function rn(t){const{proxy:e,template:{$player:r,$video:n}}=t,o=en(t),i=Ve(t);return e(n,"touchstart",t=>o.start(t)),e(n,"touchcancel",o.stop),i("document:touchmove",o.stop),i("document:touchend",o.stop),i("document:touchcancel",o.stop),i("video:pause",o.stop),i("destroy",o.stop),i("lock",t=>{t&&o.stop()}),{name:"fastForward",get state(){return U(r,"art-fast-forward")}}}function nn(t,e,r,n){let o;const i=()=>!r.closed&&!M(t),a=t.i18n.get("Lock");if(!i())return()=>{};e.setAttribute("aria-label",a),zt(r,e),Ct(r,e,"keydown",t=>{const r=t;i()&&n()&&Mt(r)&&!r.defaultPrevented&&"Escape"===r.key&&(Pt(r),e.click())});const s=n=>{if(i())if(e.setAttribute("aria-pressed",String(n)),n&&!o){const{$player:n,$bottom:a}=t.template,s=a.contains(a.ownerDocument.activeElement)&&n.classList.contains("art-keyboard-focus");o=r.child(),function(t,e){const r=new Map,n=e.hasAttribute("inert"),o=e.getAttribute("aria-hidden"),i=(t,e)=>{"-1"===t.getAttribute("tabindex")&&(null===e?t.removeAttribute("tabindex"):t.setAttribute("tabindex",e))};if(t.add(()=>{for(const[t,e]of r)i(t,e);r.clear(),n||""!==e.getAttribute("inert")||e.removeAttribute("inert"),"true"===e.getAttribute("aria-hidden")&&(null===o?e.removeAttribute("aria-hidden"):e.setAttribute("aria-hidden",o))}),t.closed)return;n||e.setAttribute("inert",""),e.setAttribute("aria-hidden","true");const a=()=>{if(!t.closed){for(const[t,n]of r)e.contains(t)||(i(t,n),r.delete(t));for(const t of e.querySelectorAll("[tabindex],button,input,select,textarea,a[href],[contenteditable]"))r.has(t)||(r.set(t,t.getAttribute("tabindex")),t.setAttribute("tabindex","-1"))}};if(a(),"undefined"!==typeof MutationObserver){const r=new MutationObserver(a);r.observe(e,{childList:!0,subtree:!0}),t.add(()=>{r.disconnect()})}}(o,a),i()&&s&&e.focus({preventScroll:!0})}else if(!n&&o){const t=o;o=void 0,t.dispose()}};return s(n()),s}function on(t){const{layers:e,icons:r,template:{$player:n}}=t;function o(){return U(n,"art-lock")}function i(){M(t)||(j(n,"art-lock"),M(t)||(t.isLock=!0,M(t)||t.emit("lock",!0)))}function a(){M(t)||(q(n,"art-lock"),M(t)||(t.isLock=!1,M(t)||t.emit("lock",!1)))}return e.add({name:"lock",mounted(e){const n=D(e);if(n.closed||M(t))return;const i=Rt(e,r.lock);if(n.closed||M(t))return;const a=Rt(e,r.unlock);if(n.closed||M(t))return;const s=nn(t,e,n,o);n.closed||M(t)||(o()?(et(i,"display","inline-flex"),n.closed||M(t)||et(a,"display","none")):et(i,"display","none"),N(t,e,"lock",e=>{M(t)||(et(i,"display",e?"inline-flex":"none"),n.closed||M(t)||et(a,"display",e?"none":"inline-flex"),n.closed||M(t)||s(e))}))},click(){o()?a():i()}}),{name:"lock",get state(){return o()},set state(t){t?i():a()}}}function an(t){return Ve(t)("control",e=>{e?q(t.template.$player,"art-mini-progress-bar"):j(t.template.$player,"art-mini-progress-bar")}),{name:"mini-progress-bar"}}class sn{constructor(t){this.art=t,this.id=0;const{option:e}=t;!function(t,e){M(t.art)||!e.miniProgressBar||e.isLive||t.add(an),!M(t.art)&&e.lock&&k&&t.add(on),M(t.art)||!e.autoPlayback||e.isLive||t.add(tn),!M(t.art)&&e.autoOrientation&&k&&t.add(Jr),!M(t.art)&&e.fastForward&&k&&!e.isLive&&t.add(rn)}(this,e);for(let r=0;r<e.plugins.length;r++){if(M(t))return;const n=this.add(e.plugins[r]);n instanceof Promise&&n.catch(t=>console.warn("Failed to initialize ArtPlayer plugin:",t))}}add(t){it(!M(this.art),"Cannot add a plugin after ArtPlayer is destroyed"),this.id+=1;const e=t.call(this.art,this.art);return e instanceof Promise?e.then(e=>this.next(t,e)):this.next(t,e)}next(t,e){return function(t,e,r){if(M(t.art))return t;const n=r&&r.name||e.name||`plugin${t.id}`;if(M(t.art))return t;let o=n;const i=yt(t,o);if(M(t.art))return t;const a=`Cannot add a plugin that already has the same name: ${n}`;return M(t.art)||(it(!i,a),("object"===typeof n&&null!==n||"function"===typeof n)&&(o=Reflect.ownKeys({[o]:void 0})[0]),M(t.art)||vt(t,o,{value:r})),t}(this,t,e)}}const ln=new WeakMap;function cn(t){return!t.closed&&!ln.get(t)}function dn(t){ln.set(t,(ln.get(t)||0)+1);let e=!0;return()=>{if(!e)return;e=!1;const r=(ln.get(t)||1)-1;r?ln.set(t,r):ln.delete(t)}}const un=new WeakMap,pn=new WeakMap,fn=["$parent","$parents","$option","$events","$formatted"];function hn(t){var e,r;const n=new Set;let o=t;for(;o&&!n.has(o);){n.add(o);const t=un.get(o);if(!t||!t.owner.active||(null==(e=t.owner.scope)?void 0:e.closed)||!t.option.includes(o))return!1;if(!t.parent)return t.owner.root===t.option;if((null==(r=un.get(t.parent))?void 0:r.owner)!==t.owner)return!1;o=t.parent}return!1}function mn(t){let e=t;for(;e;){const r=Object.getOwnPropertyDescriptor(e,"name");if(r)return"set"in r?"function"===typeof r.set:Boolean(r.writable&&(e===t||Object.isExtensible(t)));e=Object.getPrototypeOf(e)}return Object.isExtensible(t)}function vn(t){const e=un.get(t);if(!e)throw new Error("Setting item has not been formatted");return e}function gn(t,e){var r;for(let n=0;n<t.length;n++){const o=t[n];e(o),(null==(r=o.selector)?void 0:r.length)&&gn(o.selector,e)}}const yn=new WeakMap;function bn(t){const e=yn.get(t);if(!e)throw new Error("Setting panel has not been registered");return e}function wn(t){const e=yn.get(t);e?e.dispose():t.remove()}const xn=new WeakMap,kn=new WeakMap,$n=new WeakMap;function En(t,e){const r=e.splice(0),n=[];for(const i of r)try{t.events.remove(i)}catch(o){n.push(o)}if(n.length)throw new A(n)}function An(t){return kn.get(t)}function Cn(t){const e=xn.get(t);if(!e)throw new Error("Setting item has not been rendered");return e}function Sn(t,e){const r=xn.get(e);r&&!r.closed?r.dispose():function(t){return un.has(t)}(e)&&En(t,vn(e).events)}function Tn(t,e){const r=xn.get(e);if(!r||r.closed)return;if(!cn(r))throw new Error("Setting item update is already in progress");const n=kn.get(e),o=vn(e).events,i=o.splice(0);$n.set(r,i);const a=dn(r);let s=!0;return{resume(){if(!s)return;s=!1;const l=[],c=xn.get(e);for(const e of[()=>{c&&c!==r&&c.dispose()},()=>En(t,o)])try{e()}catch(d){d instanceof A?l.push(...d.errors):l.push(d)}if(r.closed||M(t)||(o.push(...i.splice(0)),$n.set(r,o),xn.set(e,r),kn.set(e,n)),a(),l.length)throw new A(l)},dispose(){if(s){s=!1;try{r.dispose()}finally{a()}}}}}function Ln(t,e,r,n,o,i){const a=i||Cn(e);if(!cn(a)||M(t))return;const s=t.proxy(r,n,e=>{if(cn(a)&&!M(t))try{return o(e)}catch(r){console.warn("ArtPlayer setting callback failed:",r)}});!cn(a)||M(t)?t.events.remove(s):(vn(e).events.push(s),i&&i!==xn.get(e)&&i.add(()=>{const r=vn(e).events,n=r.indexOf(s);n>=0&&(r.splice(n,1),t.events.remove(s))}))}function Pn(t,e,r,n){const o=Cn(e);if(!cn(o)||M(t))return;const i=(...e)=>{if(cn(o)&&!M(t))return n(...e)};t.on(r,i),o.add(()=>{t.off(r,i)})}const Mn='[tabindex="0"],button,input,select,textarea,a[href],[contenteditable]';function zn(t){var e;if(!t.isConnected||t.matches(":disabled")||t.closest("[inert]")||"true"===t.getAttribute("aria-disabled")||!t.getClientRects().length)return!1;const r=null==(e=t.ownerDocument.defaultView)?void 0:e.getComputedStyle(t).visibility;return"hidden"!==r&&"collapse"!==r}function Rn(t){return Array.from(t.querySelectorAll(Mn)).filter(t=>"-1"!==t.getAttribute("tabindex")&&zn(t))}function On(t,e,r=!1){if(!t.show||M(t.art)||!t.active)return;const n=t.cache.get(t.active);if(!n||!cn(bn(n)))return;const o=function(t,e,r=!1){if(e&&e!==t&&t.contains(e)&&e.matches(Mn)&&"-1"!==e.getAttribute("tabindex")&&zn(e))return e;const n=Rn(t),o=t.querySelector(".art-setting-item.art-current");return n.find(t=>null==e?void 0:e.contains(t))||(r?n[n.length-1]:n.find(t=>null==o?void 0:o.contains(t))||n.find(t=>!t.classList.contains("art-setting-item-back"))||n[0])}(n,e,r);null==o||o.focus({preventScroll:!0}),M(t.art)||null==o||o.scrollIntoView({block:"nearest",inline:"nearest"})}function Dn(t){const e=t.$parent.ownerDocument,r=e.activeElement,n=t.$parent.contains(r);return o=>{n&&!M(t.art)&&(e.activeElement===e.body||e.activeElement===r&&!(null==r?void 0:r.getClientRects().length))&&On(t,o)}}function In(t){const{art:e}=t,r=P(e).child();if(r.closed)return;const n=()=>t.$parent.ownerDocument;let o=!1;const i=()=>{t.show=!1,r.closed||M(e)||t.render()},a=i=>{r.closed||M(e)||(i?n().activeElement===e.controls.setting&&e.template.$player.classList.contains("art-keyboard-focus")&&On(t,void 0,o):t.$parent.contains(n().activeElement)&&function(t){const{art:e,$parent:r}=t,n=e.template.$player,o=r.ownerDocument,i=e.controls.setting;!M(e)&&r.contains(o.activeElement)&&(i&&n.contains(i)&&zn(i)&&i.focus({preventScroll:!0}),(o.activeElement===o.body||r.contains(o.activeElement))&&It(e))}(t))};e.on("setting",a),r.add(()=>{e.off("setting",a)}),Ct(r,e.template.$player,"keydown",r=>{var n,a;const s=r;if(!Mt(s)||s.defaultPrevented||M(e))return;const l=s.target;if(l===e.controls.setting){if("ArrowDown"===s.key||"ArrowUp"===s.key)if(Pt(s),t.show)On(t,void 0,"ArrowUp"===s.key);else{o="ArrowUp"===s.key;try{t.show=!0}finally{o=!1}}else"Escape"===s.key&&t.show&&(Pt(s),i());return}if(!t.show||!t.$parent.contains(l))return;if("Escape"===s.key)return Pt(s),void i();if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight","Home","End"].includes(s.key))return;const c=l.closest(".art-setting-item");if(!c||l!==c&&!l.matches('button,a[href],[role="button"]'))return;const d=t.active&&t.cache.get(t.active);if(!d)return;const u=null==(n=t.active)?void 0:n.find(t=>t.$item===c);if(!cn(bn(d))||u&&!cn(Cn(u)))return void Pt(s);const p=Rn(d),f=p.indexOf(l);if(f<0)return;let h;switch(s.key){case"ArrowDown":h=Math.min(f+1,p.length-1);break;case"ArrowUp":h=Math.max(f-1,0);break;case"Home":h=0;break;case"End":h=p.length-1;break;case"ArrowLeft":{const t=d.querySelector(".art-setting-item-back");return Pt(s),void(null==t||t.click())}case"ArrowRight":return Pt(s),void((null==(a=null==u?void 0:u.selector)?void 0:a.length)&&l.click());default:return}Pt(s),void 0!==h&&On(t,p[h])});let s=!1;Ct(r,t.$parent,"focusout",o=>{const a=o.relatedTarget;a&&(t.$parent.contains(a)||a===e.controls.setting)||s||(s=!0,St(r,()=>{s=!1,r.closed||M(e)||!t.show||t.$parent.contains(n().activeElement)||n().activeElement===e.controls.setting||i()},0))})}function Nn(t){var e,r;const{art:n,active:o}=t,{controls:i,constructor:{SETTING_WIDTH:a,SETTING_ITEM_HEIGHT:s},template:{$player:l,$setting:c,$bottom:d}}=n;if(!i.setting||!t.show||!o)return;const u=l.getBoundingClientRect(),p=i.setting.getBoundingClientRect(),f=u.width/l.offsetWidth||1,h=(p.left-u.left+p.width/2)/f-l.clientLeft,m=function(t){const{containerWidth:e,containerHeight:r,requestedWidth:n,rows:o,rowHeight:i,controlCenter:a,bottom:s,padding:l}=t,c=Math.min(Math.max(0,l),Math.max(0,e/2)),d=Math.min(Math.max(0,n),Math.max(0,e-2*c));return{width:d,height:Math.min(Math.max(0,o*i),Math.max(0,r-s-c)),left:Math.max(c,Math.min(a-d/2,e-c-d))}}({containerWidth:l.clientWidth,containerHeight:l.clientHeight,requestedWidth:(null==(r=null==(e=o[0])?void 0:e.$parent)?void 0:r.width)||a,rows:o.length+(o===t.option?0:1),rowHeight:s,controlCenter:h,bottom:Number.parseFloat(getComputedStyle(c).bottom)||0,padding:Number.parseFloat(getComputedStyle(d).paddingLeft)||0});c.style.height=`${m.height}px`,c.style.width=`${m.width}px`,n.isRotate||k||(h+m.width/2>l.clientWidth?(c.style.left="",c.style.right=""):(c.style.left=`${m.left}px`,c.style.right="auto"))}const _n=new WeakMap;function Wn(t){_n.delete(t)}const Fn=new WeakMap;function Vn(t,e){e?Fn.set(t,e):Fn.delete(t)}function Yn(t){var e;const r=new Map(Reflect.ownKeys(t).map(e=>[e,Object.getOwnPropertyDescriptor(t,e)])),n=[],o=Fn.get(t),i=null==o?void 0:o();for(const a of["html","icon","tooltip"]){const t=null==(e=r.get(a))?void 0:e.value;t instanceof Node&&n.push({node:t,parent:t.parentNode,next:t.nextSibling})}return()=>{var e,a;for(const n of Reflect.ownKeys(t))!r.has(n)&&(null==(e=Object.getOwnPropertyDescriptor(t,n))?void 0:e.configurable)&&Reflect.deleteProperty(t,n);for(const[n,o]of r)Object.defineProperty(t,n,o);null==i||i(),Vn(t,o);for(const{node:t,parent:r,next:o}of n)r?r.insertBefore(t,(null==o?void 0:o.parentNode)===r?o:null):null==(a=t.parentNode)||a.removeChild(t)}}function Bn(t){var e,r;const n=null==(e=t.$item)?void 0:e.querySelector(".art-setting-range");n&&n.setAttribute("aria-label",(null==(r=t.$html)?void 0:r.textContent)||"")}const Hn=new WeakMap;function jn(t,e,r,n,o,i,a,s){return c(this,null,function*(){try{const l=Cn(e),c=Cn(i),d=(Hn.get(i)||0)+1;Hn.set(i,d);const u=()=>cn(l)&&cn(c)&&!M(t.art)&&Hn.get(i)===d;if(null==s||s(),!u())return;const p=yield o.call(t.art,e,r,n);u()&&Reflect.set(i,a,p)}catch(l){console.warn("ArtPlayer setting callback failed:",l)}})}function qn(t){const e=[];return function t(r){const n=Array.from(r.childNodes);e.push({node:r,children:n,attributes:1===r.nodeType?Array.from(r.attributes,t=>[t.name,t.value]):void 0,value:r.nodeValue}),n.forEach(t)}(t),()=>{for(const{node:t,children:r,attributes:n,value:o}of e){for(;t.firstChild;)t.removeChild(t.firstChild);for(const e of r)t.appendChild(e);if(n){const e=t;for(const t of Array.from(e.attributes))e.removeAttribute(t.name);for(const[t,r]of n)e.setAttribute(t,r)}else t.nodeValue=o}}}const Un=new WeakMap;function Xn(t){const e=[];for(const n of t)try{n()}catch(r){r instanceof A?e.push(...r.errors):e.push(r)}if(e.length)throw new A(e)}function Gn(t){var e;null==(e=Un.get(t))||e()}function Kn(t,e){const r=t.find(e.name);if(M(t.art))return r||e;if(!r)return t.add(e);const n=Dn(t);Wn(r),Gn(r);const o=Yn(r),i=r.$item,a=null==i?void 0:i.parentNode,s=null==i?void 0:i.nextSibling,l=i?qn(i):void 0,c=t.active,d=["height","width","left","right"].map(e=>[e,t.$parent.style.getPropertyValue(e),t.$parent.style.getPropertyPriority(e)]),u=function(t,e){const r=new Set,n=new Set,o=e=>{if(!r.has(e)&&(r.add(e),e.selector)){const r=t.cache.get(e.selector);r&&n.add(r),e.selector.forEach(o)}};o(e);const i=[],a=[];try{for(const e of r){const r=Tn(t.art,e);r&&i.push(r)}for(const t of n)a.push(dn(bn(t)))}catch(l){try{Xn([...i.reverse().map(t=>t.resume),...a])}catch(c){console.warn("ArtPlayer setting restore failed:",c)}throw l}let s=!0;return{items:r,resume(){s&&(s=!1,Xn([...i.reverse().map(t=>t.resume),...a]))},dispose(){s&&(s=!1,Xn([...i.reverse().map(t=>t.dispose),...Array.from(n).reverse().map(t=>()=>wn(t)),...a]))}}}(t,r);let p=!0,f=!1;const h=()=>{if(!p)return;p=!1;for(const t of u.items)Un.get(t)===h&&Un.delete(t);if(M(t.art))return void u.dispose();const e=r.$item;try{Xn([u.resume,()=>{e&&e!==i&&e.remove()},o,()=>null==l?void 0:l(),()=>{a&&i&&a.insertBefore(i,(null==s?void 0:s.parentNode)===a?s:null)},()=>t.format(),()=>{if(f){t.active=c,c&&t.cache.has(c)&&K(t.cache.get(c),"art-current");for(const[e,r,n]of d)t.$parent.style.setProperty(e,r,n)}}]),n(i)}catch(m){console.warn("ArtPlayer setting restore failed:",m)}},m=()=>p&&!M(t.art)&&Un.get(r)===h;for(const y of u.items)Un.set(y,h);const v=P(t.art).add(()=>{p=!1;for(const t of u.items)Un.get(t)===h&&Un.delete(t);u.dispose()});try{if(function(t,e,r){for(const n of Reflect.ownKeys(e)){if(!r())return;const o=Object.getOwnPropertyDescriptor(e,n);if(!(null==o?void 0:o.enumerable)||!r())continue;const i=Reflect.get(e,n);if(!r())return;if(!Reflect.set(t,n,i))throw new TypeError(`Cannot assign setting item property [${String(n)}]`)}}(r,e,m),!m())return r;if(t.format(),!m())return r;if(t.createItem(r,!0),!m())return r;if(f=!0,t.render(),!m())return r;p=!1;for(const t of u.items)Un.get(t)===h&&Un.delete(t);return u.dispose(),n(r.$item),r}catch(g){throw m()&&h(),g}finally{v()}}const Zn=new WeakMap;function Jn(t,e,r){vt(t,`$${e}`,{configurable:!0,get:()=>r}),vt(t,e,{configurable:!0,get:()=>r.innerHTML,set(n){r.innerHTML="",X(r,n),"html"===e&&Bn(t)}})}function Qn(t,e,r=!1){var n,o;const i=function(t){const e=Un.get(t);return()=>!e||Un.get(t)===e}(e);if(!t.cache.has(e.$option))return;const a=t.cache.get(e.$option),s=e.$item;let l="selector";yt(e,"switch")&&(l="switch"),yt(e,"range")&&(l="range"),yt(e,"onClick")&&(l="button");const{icons:c,constructor:d}=t.art;if(!i())return;const u=function(t,e,r=P(t)){const n=xn.get(e);(!n||cn(n)||n.closed)&&Sn(t,e);const o=r.child();return xn.set(e,o),kn.set(e,r),$n.set(o,vn(e).events),o.add(()=>{En(t,$n.get(o))}),o}(t.art,e,bn(a)),p=()=>cn(u)&&!M(t.art)&&i();if(!p())return;const f=document.createElement("div");try{if(Vn(e),j(f,"art-setting-item"),et(f,"height",`${d.SETTING_ITEM_HEIGHT}px`),f.dataset.name=e.name||"",f.dataset.value=String(e.value||""),!p())return;const i=Rt(f,'<div class="art-setting-item-left"></div>'),h=Rt(f,'<div class="art-setting-item-right"></div>'),m=document.createElement("div");switch(j(m,"art-setting-item-left-icon"),l){case"button":case"switch":case"range":{const t=e.icon||c.config;if(!p())return;X(m,t);break}case"selector":if(null==(n=e.selector)?void 0:n.length){const t=e.icon||c.config;if(!p())return;X(m,t)}else X(m,c.check)}if(X(i,m),!p())return;Jn(e,"icon",m);const v=document.createElement("div");j(v,"art-setting-item-left-text");const g=e.html||"";if(!p())return;X(v,g),X(i,v),Jn(e,"html",v);const y=document.createElement("div");j(y,"art-setting-item-right-tooltip");const b=e.tooltip||"";if(!p())return;switch(X(y,b),X(h,y),Jn(e,"tooltip",y),l){case"switch":{const t=document.createElement("div");j(t,"art-setting-item-right-icon");const r=Rt(t,c.switchOn),n=Rt(t,c.switchOff),o=e.switch;if(!p())return;et(o?n:r,"display","none"),X(h,t),vt(e,"$switch",{configurable:!0,get:()=>t});let i=e.switch;if(!p())return;Vn(e,()=>{const t=i;return()=>{i=t}}),vt(e,"switch",{configurable:!0,get:()=>i,set(t){i=t,f.setAttribute("aria-checked",String(Boolean(t))),t?(et(n,"display","none"),et(r,"display",null)):(et(n,"display",null),et(r,"display","none"))}});break}case"range":{const t=document.createElement("div");j(t,"art-setting-item-right-icon");const r=document.createElement("input");r.type="range",X(t,r);for(const[o,i]of["value","min","max","step"].entries()){const t=e.range[o];if(!p())return;Reflect.set(r,i,String(t))}j(r,"art-setting-range"),X(h,t),vt(e,"$range",{configurable:!0,get:()=>r});let n=[...e.range];if(!p())return;Vn(e,()=>{const t=n,e=[...t],o={min:r.min,max:r.max,step:r.step,value:r.value};return()=>{t.splice(0,t.length,...e),n=t,Object.assign(r,o)}}),vt(e,"range",{configurable:!0,get:()=>n,set(t){n=[...t],r.value=String(t[0]),r.min=String(t[1]),r.max=String(t[2]),r.step=String(t[3])}})}break;case"selector":if(null==(o=e.selector)?void 0:o.length){const t=document.createElement("div");j(t,"art-setting-item-right-icon"),X(t,c.arrowRight),X(h,t)}}if(!p())return;if(function(t,e,r,n){const{art:o}=t,i=Cn(e),a=(t,r,n)=>Ln(o,e,t,r,n,i);switch(n){case"switch":e.onSwitch&&a(r,"click",n=>jn(t,e,r,n,e.onSwitch,e,"switch"));break;case"range":{const n=e.$range;if(n)for(const[o,i]of[["change","onRange"],["input","onChange"]])e[i]&&a(n,o,o=>jn(t,e,r,o,e[i],e,"tooltip",()=>{e.range[0]=n.valueAsNumber}));break}case"selector":a(r,"click",n=>{var o,i;if(null==(o=e.selector)?void 0:o.length)t.render(e.selector);else{if(null==(i=e.$parent)?void 0:i.onSelect)return jn(t,e,r,n,e.$parent.onSelect,e.$parent,"tooltip",()=>t.check(e));t.check(e)}}),e.default&&j(r,"art-current");break;case"button":e.onClick&&a(r,"click",n=>jn(t,e,r,n,e.onClick,e,"tooltip"))}}(t,e,f,l),!p())return;vt(e,"$item",{configurable:!0,get:()=>f}),function(t,e,r,n,o){var i;"range"!==n?r.querySelector("button,input,select,textarea,a[href],[tabindex],[contenteditable]")||("switch"===n?(r.setAttribute("role","switch"),r.setAttribute("aria-checked",String(Boolean(e.switch))),r.setAttribute("aria-disabled",String(!e.onSwitch))):"selector"!==n||(null==(i=e.selector)?void 0:i.length)||r.setAttribute("aria-current",String(Boolean(e.default))),zt(o,r,()=>r.click(),()=>cn(o)&&!M(t.art))):Bn(e)}(t,e,f,l,u),r&&(null==s?void 0:s.parentNode)?s.replaceWith(f):X(a,f),e.mounted&&p()&&St(u,()=>{var r;if(!M(t.art))try{const n=null==(r=e.mounted)?void 0:r.call(t.art,f,e);Promise.resolve(n).catch(t=>console.warn("ArtPlayer setting mounted failed:",t))}catch(n){console.warn("ArtPlayer setting mounted failed:",n)}},0)}catch(h){try{u.dispose()}catch(m){console.warn("ArtPlayer setting cleanup failed:",m)}throw f.remove(),h}}function to(t,e=t.option){var r,n,o,i,a,s;if(M(t.art))return;const l=Dn(t),c=t.cache.get(e);if(c&&!cn(bn(c)))return;const d=(Zn.get(t)||0)+1;Zn.set(t,d);const u=()=>Zn.get(t)===d&&!M(t.art),p=t.active,f=["height","width","left","right"].map(e=>[e,t.$parent.style.getPropertyValue(e),t.$parent.style.getPropertyPriority(e)]),h=()=>{t.active=p,p&&t.cache.has(p)&&K(t.cache.get(p),"art-current");for(const[e,r,n]of f)t.$parent.style.setProperty(e,r,n)};if(t.active=e,c)try{K(c,"art-current"),t.resize()}catch(m){throw u()&&t.cache.get(e)===c&&!bn(c).closed&&h(),m}else{const a=document.createElement("div");t.cache.set(e,a);const s=function(t,e,r){const n=P(t.art).child();return yn.set(r,n),n.add(()=>{t.cache.get(e)===r&&t.cache.delete(e),r.remove()}),n}(t,e,a),l=()=>!s.closed&&!M(t.art)&&t.cache.get(e)===a,c=[];try{if(!l())return;j(a,"art-setting-panel"),a.setAttribute("role","group"),a.setAttribute("aria-label",(null==(o=null==(n=null==(r=e[0])?void 0:r.$parent)?void 0:n.$html)?void 0:o.textContent)||t.art.i18n.get("Settings")),X(t.$parent,a),K(a,"art-current"),(null==(i=e[0])?void 0:i.$parent)&&t.createHeader(e[0]);for(let r=0;r<e.length&&l();r++){const n=e[r];c.push({item:n,restore:Yn(n)}),t.createItem(n)}if(!l())return;t.resize()}catch(m){const r=l(),n=t.active===e&&u();try{wn(a)}catch(v){console.warn("ArtPlayer setting cleanup failed:",v)}if(r&&!M(t.art)){for(const t of c.reverse())if(An(t.item)===s)try{t.restore()}catch(g){console.warn("ArtPlayer setting restore failed:",g)}n&&h()}throw m}}u()&&l(null==(s=null==(a=null==p?void 0:p[0])?void 0:a.$parent)?void 0:s.$item)}const eo=Zt;class ro extends eo{constructor(t){super(t);const{option:e,template:{$setting:r}}=t;this.name="setting",this.$parent=r,this.id=0,this.active=null,this.cache=new Map,this.option=[...this.builtin,...e.settings];const n=P(t);!function(t,e){pn.set(t,{active:!0,scope:e})}(this,n),n.add(()=>{!function(t){const e=pn.get(t);e&&(e.active=!1,e.root=void 0,e.scope=void 0)}(this)}),e.setting&&(this.format(),this.render(),function(t){const{art:e}=t,r=P(e).child(),n=(t,n)=>{if(r.closed||M(e))return;const o=(...t)=>{if(!r.closed&&!M(e))return n(...t)};e.on(t,o),r.add(()=>{e.off(t,o)})};n("blur",()=>{t.show&&(t.show=!1,t.render())}),n("focus",r=>{const n=F(r,e.controls.setting),o=F(r,t.$parent);!t.show||n||o||(t.show=!1,t.render())}),n("resize",()=>t.resize());const o=()=>{r.closed||M(e)||t.resize()},i=e.proxy(t.$parent,"transitionend",e=>{e.target===t.$parent&&"bottom"===e.propertyName&&o()});r.add(()=>{e.events.remove(i)});const{$player:a,$controls:s}=e.template;if(!r.closed&&"undefined"!==typeof ResizeObserver){const t=new ResizeObserver(o);t.observe(a),t.observe(s),r.add(()=>{t.disconnect()})}if(!r.closed&&"undefined"!==typeof MutationObserver){const t=new MutationObserver(o);"undefined"===typeof ResizeObserver&&t.observe(s,{childList:!0,subtree:!0,attributes:!0,characterData:!0}),t.observe(a,{attributes:!0,attributeFilter:["class","style"]}),r.add(()=>{t.disconnect()})}}(this)),In(this)}get builtin(){const t=[],{option:e}=this.art;return e.playbackRate&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:n,PLAYBACK_RATE:o}}=t;function i(t){return 1===t?e.get("Normal"):t.toFixed(1)}function a(){const e=t.setting.find(`playback-rate-${t.playbackRate}`);t.setting.check(e)}return{width:n,name:"playback-rate",html:e.get("Play Speed"),tooltip:i(t.playbackRate),icon:r.playbackRate,selector:o.map(e=>({value:e,name:`playback-rate-${e}`,default:e===t.playbackRate,html:i(e)})),onSelect:e=>(t.playbackRate=e.value,e.html),mounted:(e,r)=>{a(),Pn(t,r,"video:ratechange",()=>a())}}}(this.art)),e.aspectRatio&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:n,ASPECT_RATIO:o}}=t;function i(t){return"default"===t?e.get("Default"):t}function a(){const e=t.setting.find(`aspect-ratio-${t.aspectRatio}`);t.setting.check(e)}return{width:n,name:"aspect-ratio",html:e.get("Aspect Ratio"),icon:r.aspectRatio,tooltip:i(t.aspectRatio),selector:o.map(e=>({value:e,name:`aspect-ratio-${e}`,default:e===t.aspectRatio,html:i(e)})),onSelect:e=>(t.aspectRatio=e.value,e.html),mounted:(e,r)=>{a(),Pn(t,r,"aspectRatio",()=>a())}}}(this.art)),e.flip&&t.push(function(t){const{i18n:e,icons:r,constructor:{SETTING_ITEM_WIDTH:n,FLIP:o}}=t;function i(t){return e.get(dt(t))}function a(){const e=t.setting.find(`flip-${t.flip}`);t.setting.check(e)}return{width:n,name:"flip",html:e.get("Video Flip"),tooltip:i(t.flip),icon:r.flip,selector:o.map(e=>({value:e,name:`flip-${e}`,default:e===t.flip,html:i(e)})),onSelect:e=>(t.flip=e.value,e.html),mounted:(e,r)=>{a(),Pn(t,r,"flip",()=>a())}}}(this.art)),e.subtitleOffset&&t.push(function(t){const{i18n:e,icons:r,constructor:n}=t;return{width:n.SETTING_ITEM_WIDTH,name:"subtitle-offset",html:e.get("Subtitle Offset"),icon:r.subtitle,tooltip:"0s",range:[0,-10,10,.1],onChange:e=>(t.subtitleOffset=e.range[0],`${e.range[0]}s`),mounted:(e,r)=>{Pn(t,r,"subtitleOffset",t=>{r.$range.value=String(t),r.tooltip=`${t}s`})}}}(this.art)),t}traverse(t,e=this.option){gn(e,t)}check(t){!function(t,e){(null==e?void 0:e.$parent)&&(e.$parent.tooltip=e.html,t.traverse(t=>{t.default=t===e,t.$item&&t.$item.setAttribute("aria-current",String(t.default)),t.default&&t.$item&&K(t.$item,"art-current")},e.$option),t.render(e.$parents))}(this,t)}format(t=this.option,e,r,n=[]){this.option=function(t,e,r,n,o=[]){const i=pn.get(t)||{active:!0},a=[],s=new Set,l=new Set(o),c=(t,e,r)=>{var n;for(let o=0;o<t.length;o++){const d=t[o];if(!d||"object"!==typeof d)throw new TypeError("Setting item must be an object");if(s.has(d))throw new Error("Setting items must appear only once in a tree");s.add(d);const u=un.get(d);if(u&&u.owner!==i&&hn(d)&&it(!1,`Setting item [${d.name||""}] already belongs to another active player`),d.name&&(it(!l.has(d.name),`The [${d.name}] already exists in [setting]`),l.add(d.name)),!un.has(d))for(const t of fn){const e=Object.getOwnPropertyDescriptor(d,t);if(e?!e.configurable:!Object.isExtensible(d))throw new TypeError(`Cannot format setting item property [${t}]`)}if(!d.name&&!mn(d))throw new TypeError("Cannot assign an automatic setting item name");a.push({item:d,parent:e,parents:r,option:t,name:d.name||"",generated:!d.name}),(null==(n=d.selector)?void 0:n.length)&&c(d.selector,d,t)}};c(e,r,n);let d=t.id;pn.set(t,i),i.root=e;for(const u of a)if(!u.name){do{u.name="setting-"+d++}while(l.has(u.name));l.add(u.name)}for(const u of a){const{item:t,name:e,parent:r,parents:n,option:o}=u,a=un.get(t);a||Object.defineProperties(t,{$parent:{get:()=>vn(t).parent},$parents:{get:()=>vn(t).parents},$option:{get:()=>vn(t).option},$events:{get:()=>vn(t).events},$formatted:{get:()=>!0}}),un.set(t,{parent:r,parents:n,option:o,events:(null==a?void 0:a.events)||[],owner:i}),u.generated&&(t.name=e)}for(const u of a)u.generated||o.push(u.name);return t.id=d,e}(this,t,e,r,n)}find(t=""){return function(t,e=""){let r=null;return gn(t,t=>{t.name===e&&(r=t)}),r}(this.option,t)}resize(){Nn(this)}inactivate(t){!function(t,e){const r=[],n=new Set,o=e=>{if(!n.has(e)){n.add(e);for(const t of e.selector||[])o(t);if(e.selector){const n=t.cache.get(e.selector);t.cache.delete(e.selector);try{n&&wn(n)}catch(i){r.push(i)}}try{Sn(t.art,e)}catch(i){i instanceof A?r.push(...i.errors):r.push(i)}}};if(o(e),r.length)throw new A(r)}(this,t)}remove(t){const e=Dn(this),r=this.find(t);it(r,`Can't find [${t}] in the [setting]`),this.traverse(t=>{Wn(t),Gn(t)},[r]);const n=r.$option.indexOf(r);r.$option.splice(n,1);const o=r.$item,i=[];for(const s of[()=>this.inactivate(r),()=>null==o?void 0:o.remove(),()=>this.render()])try{s()}catch(a){a instanceof A?i.push(...a.errors):i.push(a)}if(i.length)throw new A(i);e()}update(t){return Kn(this,t)}add(t,e=this.option){var r;if(M(this.art))return t;let n=!1;this.traverse(e=>{n||(n=e===t)});const o=e.length,i=n?void 0:function(t){const e={};_n.set(t,e);const r=()=>_n.get(t)===e;return{current:r,finish(){r()&&_n.delete(t)}}}(t);let a=!1;try{e.push(t),this.format(),a=!0,this.createItem(t),this.render()}catch(s){if(M(this.art)||i&&!i.current())throw s;if(e[o]===t&&e.splice(o,1),!n&&a){try{this.inactivate(t)}catch(l){console.warn("ArtPlayer setting cleanup failed:",l)}null==(r=t.$item)||r.remove()}throw s}finally{null==i||i.finish()}return t}createHeader(t){!function(t,e){var r;if(!t.cache.has(e.$option))return;const n=t.cache.get(e.$option),{icons:{arrowLeft:o},constructor:{SETTING_ITEM_HEIGHT:i}}=t.art,a=document.createElement("div");et(a,"height",`${i}px`),j(a,"art-setting-item"),j(a,"art-setting-item-back");const s=Rt(a,'<div class="art-setting-item-left"></div>'),l=document.createElement("div");j(l,"art-setting-item-left-icon"),X(l,o),X(s,l),X(s,e.$parent.html),Ln(t.art,e.$parent,a,"click",()=>t.render(e.$parents),bn(n));const c=bn(n);a.querySelector("button,input,select,textarea,a[href],[tabindex],[contenteditable]")||zt(c,a,()=>a.click(),()=>cn(c)&&!M(t.art)),a.setAttribute("aria-label",`${t.art.i18n.get("Back")}: ${(null==(r=a.textContent)?void 0:r.trim())||""}`),X(n,a)}(this,t)}createItem(t,e=!1){Qn(this,t,e)}render(t=this.option){to(this,t)}}class no{constructor(){this.name="artplayer_settings",this.settings={}}get(t){try{const e=JSON.parse(window.localStorage.getItem(this.name))||{};return t?e[t]:e}catch(e){return t?this.settings[t]:this.settings}}set(t,e){try{const r=Object.assign({},this.get(),{[t]:e});window.localStorage.setItem(this.name,JSON.stringify(r))}catch(r){this.settings[t]=e}}del(t){try{const e=this.get();delete e[t],window.localStorage.setItem(this.name,JSON.stringify(e))}catch(e){delete this.settings[t]}}clear(){try{window.localStorage.removeItem(this.name)}catch(t){this.settings={}}}}const oo='.art-video-player{--art-theme: #f00;--art-font-color: #fff;--art-background-color: #000;--art-text-shadow-color: rgba(0, 0, 0, .5);--art-transition-duration: .2s;--art-padding: 10px;--art-border-radius: 3px;--art-progress-height: 6px;--art-progress-color: rgba(255, 255, 255, .25);--art-progress-top-gap: 10px;--art-hover-color: rgba(255, 255, 255, .25);--art-loaded-color: rgba(255, 255, 255, .25);--art-state-size: 80px;--art-state-opacity: .8;--art-bottom-height: 100px;--art-bottom-offset: 20px;--art-bottom-gap: 5px;--art-highlight-width: 8px;--art-highlight-color: rgba(255, 255, 255, .5);--art-control-height: 46px;--art-control-opacity: .75;--art-control-icon-size: 36px;--art-control-icon-scale: 1.1;--art-volume-height: 120px;--art-volume-handle-size: 14px;--art-lock-size: 36px;--art-indicator-scale: 0;--art-indicator-size: 16px;--art-fullscreen-web-index: 9999;--art-settings-icon-size: 24px;--art-settings-max-height: 300px;--art-selector-max-height: 300px;--art-contextmenus-min-width: 250px;--art-subtitle-font-size: 20px;--art-subtitle-gap: 5px;--art-subtitle-bottom: 15px;--art-subtitle-border: #000;--art-widget-background: rgba(0, 0, 0, .85);--art-tip-background: rgba(0, 0, 0, .7);--art-scrollbar-size: 4px;--art-scrollbar-background: rgba(255, 255, 255, .25);--art-scrollbar-background-hover: rgba(255, 255, 255, .5);--art-mini-progress-height: 2px}.art-bg-cover{background-position:center center;background-repeat:no-repeat;background-size:cover}.art-bottom-gradient{background-image:linear-gradient(to top,#000,rgba(0,0,0,.4),transparent);background-repeat:repeat-x;background-position:center bottom}.art-backdrop-filter{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:#000000bf!important}.art-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.art-video-player{position:relative;margin:0 auto;width:100%;height:100%;outline:0;zoom:1;padding:0;text-align:left;direction:ltr;font-size:14px;line-height:1.3;user-select:none;box-sizing:border-box;color:var(--art-font-color);background-color:var(--art-background-color);text-shadow:0 0 2px var(--art-text-shadow-color);font-family:PingFang SC,Helvetica Neue,Microsoft YaHei,Roboto,Arial,sans-serif;-webkit-tap-highlight-color:rgba(0,0,0,0);-ms-touch-action:manipulation;touch-action:manipulation;-ms-high-contrast-adjust:none}.art-video-player *,.art-video-player *:before,.art-video-player *:after{box-sizing:border-box}.art-video-player ::-webkit-scrollbar{width:var(--art-scrollbar-size);height:var(--art-scrollbar-size)}.art-video-player ::-webkit-scrollbar-thumb{background-color:var(--art-scrollbar-background)}.art-video-player ::-webkit-scrollbar-thumb:hover{background-color:var(--art-scrollbar-background-hover)}.art-video-player img{max-width:100%;vertical-align:top}.art-video-player svg{fill:var(--art-font-color)}.art-video-player a{color:var(--art-font-color);text-decoration:none}.art-icon{line-height:1;display:flex;justify-content:center;align-items:center}.art-video-player.art-backdrop .art-contextmenus,.art-video-player.art-backdrop .art-info,.art-video-player.art-backdrop .art-settings,.art-video-player.art-backdrop .art-layer-auto-playback,.art-video-player.art-backdrop .art-selector-list,.art-video-player.art-backdrop .art-volume-inner{-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px);background-color:#000000bf!important}.art-video{position:absolute;inset:0;z-index:10;width:100%;height:100%}.art-poster{position:absolute;inset:0;z-index:11;width:100%;height:100%;background-position:center center;background-repeat:no-repeat;background-size:cover;pointer-events:none}.art-video-player .art-subtitle{display:none;justify-content:center;align-items:center;flex-direction:column;position:absolute;z-index:20;width:100%;padding:0 5%;text-align:center;pointer-events:none;gap:var(--art-subtitle-gap);bottom:var(--art-subtitle-bottom);font-size:var(--art-subtitle-font-size);transition:bottom var(--art-transition-duration) ease;text-shadow:var(--art-subtitle-border) 1px 0 1px,var(--art-subtitle-border) 0 1px 1px,var(--art-subtitle-border) -1px 0 1px,var(--art-subtitle-border) 0 -1px 1px,var(--art-subtitle-border) 1px 1px 1px,var(--art-subtitle-border) -1px -1px 1px,var(--art-subtitle-border) 1px -1px 1px,var(--art-subtitle-border) -1px 1px 1px}.art-video-player.art-subtitle-show .art-subtitle{display:flex}.art-video-player.art-control-show .art-subtitle{bottom:calc(var(--art-controls-height, var(--art-control-height)) + var(--art-subtitle-bottom))}.art-danmuku{position:absolute;inset:0;z-index:30;width:100%;height:100%;pointer-events:none;overflow:hidden}.art-video-player .art-layers{position:absolute;inset:0;z-index:40;width:100%;height:100%;display:none;pointer-events:none}.art-video-player .art-layers .art-layer{pointer-events:auto}.art-video-player.art-layer-show .art-layers{display:flex}.art-video-player .art-mask{display:flex;justify-content:center;align-items:center;position:absolute;inset:0;z-index:50;width:100%;height:100%;pointer-events:none}.art-video-player .art-mask .art-state{display:flex;justify-content:center;align-items:center;opacity:0;transform:scale(2);width:var(--art-state-size);height:var(--art-state-size);transition:all var(--art-transition-duration) ease}.art-video-player.art-mask-show .art-state{pointer-events:auto;opacity:var(--art-state-opacity);transform:scale(1)}.art-video-player.art-loading-show .art-state{display:none}.art-video-player .art-loading{display:none;justify-content:center;align-items:center;position:absolute;inset:0;z-index:70;width:100%;height:100%;pointer-events:none}.art-video-player.art-loading-show .art-loading{display:flex}.art-video-player.art-loading-show .art-mask{display:none}.art-video-player .art-bottom{position:absolute;inset:0;z-index:60;width:100%;height:100%;display:flex;flex-direction:column;justify-content:flex-end;opacity:0;overflow:hidden;pointer-events:none;padding:0 var(--art-padding);transition:all var(--art-transition-duration) ease;background-size:100% var(--art-bottom-height);background-image:linear-gradient(to top,#000,rgba(0,0,0,.4),transparent);background-repeat:repeat-x;background-position:center bottom}.art-video-player .art-bottom .art-controls,.art-video-player .art-bottom .art-progress{transform:translateY(var(--art-bottom-offset));transition:transform var(--art-transition-duration) ease}.art-video-player.art-control-show .art-bottom,.art-video-player.art-hover .art-bottom{opacity:1}.art-video-player.art-control-show .art-bottom .art-controls,.art-video-player.art-hover .art-bottom .art-controls,.art-video-player.art-control-show .art-bottom .art-progress,.art-video-player.art-hover .art-bottom .art-progress{transform:translateY(0)}.art-bottom .art-progress{position:relative;z-index:0;cursor:pointer;pointer-events:auto;padding-top:var(--art-progress-top-gap);padding-bottom:var(--art-bottom-gap)}.art-bottom .art-progress .art-control-progress{position:relative;display:flex;justify-content:center;align-items:center;height:var(--art-progress-height)}.art-bottom .art-progress .art-control-progress .art-control-progress-inner{display:flex;align-items:center;position:relative;height:50%;width:100%;transition:height var(--art-transition-duration) ease;background-color:var(--art-progress-color)}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-hover{position:absolute;inset:0;z-index:0;width:100%;height:100%;width:0%;background-color:var(--art-hover-color)}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-loaded{position:absolute;inset:0;z-index:10;width:100%;height:100%;width:0%;background-color:var(--art-loaded-color)}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-played{position:absolute;inset:0;z-index:20;width:100%;height:100%;width:0%;background-color:var(--art-theme)}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight{position:absolute;inset:0;z-index:30;width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-highlight span{position:absolute;inset:0 auto 0 0;z-index:0;width:100%;height:100%;pointer-events:auto;width:var(--art-highlight-width)!important;transform:translate(calc(var(--art-highlight-width) / -2));background-color:var(--art-highlight-color)}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{display:flex;justify-content:center;align-items:center;position:absolute;z-index:40;left:0;border-radius:50%;width:var(--art-indicator-size);height:var(--art-indicator-size);transform:scale(var(--art-indicator-scale));margin-left:calc(var(--art-indicator-size) / -2);transition:transform var(--art-transition-duration) ease}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator .art-icon{width:100%;height:100%;pointer-events:none}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:hover{transform:scale(1.2)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator:active{transform:scale(1)!important}.art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip{transform-origin:bottom center;transform:scale(.5);opacity:0;position:absolute;z-index:50;top:-25px;left:0;padding:3px 5px;line-height:1;font-size:12px;border-radius:var(--art-border-radius);white-space:nowrap;background-color:var(--art-tip-background);transition:transform var(--art-transition-duration) ease,opacity var(--art-transition-duration) ease}.art-bottom .art-progress .art-control-thumbnails{transform-origin:bottom center;transform:scale(.5);opacity:0;position:absolute;bottom:calc(var(--art-bottom-gap) + 10px);left:0;border-radius:var(--art-border-radius);pointer-events:none;background-color:var(--art-widget-background);transition:transform var(--art-transition-duration) ease,opacity var(--art-transition-duration) ease;box-shadow:0 1px 3px #0003,0 1px 2px -1px #0003}.art-bottom .art-progress:hover .art-control-progress .art-control-progress-inner{height:100%}.art-bottom:hover .art-progress .art-control-progress .art-control-progress-inner .art-progress-indicator{transform:scale(1)}.art-progress-hover .art-bottom .art-progress .art-control-progress .art-control-progress-inner .art-progress-tip,.art-progress-hover .art-bottom .art-progress .art-control-thumbnails{transform:scale(1);opacity:1}.art-video-player .art-controls{position:relative;z-index:10;pointer-events:auto;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;flex-shrink:0;height:auto;min-height:var(--art-control-height)}.art-video-player .art-controls .art-controls-left,.art-video-player .art-controls .art-controls-right{display:flex;flex-wrap:wrap;max-width:100%;min-height:var(--art-control-height)}.art-video-player .art-controls .art-controls-center{display:none;justify-content:center;align-items:center;flex:1;height:100%;padding:0 10px}.art-video-player .art-controls .art-controls-right{justify-content:flex-end;margin-left:auto}.art-video-player .art-controls .art-control{display:flex;justify-content:center;align-items:center;flex-shrink:0;max-width:100%;cursor:pointer;white-space:nowrap;opacity:var(--art-control-opacity);min-height:var(--art-control-height);min-width:var(--art-control-height);transition:opacity var(--art-transition-duration) ease}.art-video-player .art-controls .art-control .art-icon{height:var(--art-control-icon-size);width:var(--art-control-icon-size);transform:scale(var(--art-control-icon-scale));transition:transform var(--art-transition-duration) ease}.art-video-player .art-controls .art-control .art-icon:active{transform:scale(calc(var(--art-control-icon-scale) * .8))}.art-video-player .art-controls .art-control:hover{opacity:1}.art-control-volume{position:relative}.art-control-volume .art-volume-panel{display:flex;justify-content:center;align-items:center;position:absolute;left:0;right:0;padding:0 5px;font-size:12px;text-align:center;cursor:default;opacity:0;visibility:hidden;transform:translateY(10px);pointer-events:none;bottom:var(--art-control-height);width:var(--art-control-height);height:var(--art-volume-height);transition:opacity var(--art-transition-duration) ease,transform var(--art-transition-duration) ease}.art-control-volume .art-volume-panel .art-volume-inner{display:flex;flex-direction:column;align-items:center;gap:10px;height:100%;width:100%;padding:10px 0 12px;border-radius:var(--art-border-radius);background-color:var(--art-widget-background)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider{flex:1;width:100%;display:flex;cursor:pointer;position:relative;justify-content:center}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle{position:relative;display:flex;justify-content:center;width:2px;border-radius:var(--art-border-radius);overflow:hidden;background-color:#ffffff40}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-handle .art-volume-loaded{position:absolute;inset:0;z-index:0;width:100%;height:100%;background-color:var(--art-theme)}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider .art-volume-indicator{position:absolute;width:var(--art-volume-handle-size);height:var(--art-volume-handle-size);margin-top:calc(var(--art-volume-handle-size) / -2);flex-shrink:0;transform:scale(1);border-radius:100%;background-color:var(--art-theme);transition:transform var(--art-transition-duration) ease}.art-control-volume .art-volume-panel .art-volume-inner .art-volume-slider:active .art-volume-indicator{transform:scale(.9)}.art-control-volume:hover .art-volume-panel,.art-control-volume:focus-within .art-volume-panel{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}.art-video-player .art-notice{display:none;position:absolute;inset:0 0 auto;z-index:80;width:100%;height:100%;height:auto;padding:var(--art-padding);pointer-events:none}.art-video-player .art-notice .art-notice-inner{display:inline-flex;padding:5px;line-height:1;border-radius:var(--art-border-radius);background-color:var(--art-tip-background)}.art-video-player.art-notice-show .art-notice{display:flex}.art-video-player .art-contextmenus{display:none;flex-direction:column;position:absolute;z-index:120;padding:5px 0;border-radius:var(--art-border-radius);font-size:12px;background-color:var(--art-widget-background);min-width:var(--art-contextmenus-min-width)}.art-video-player .art-contextmenus .art-contextmenu{cursor:pointer;display:flex;padding:10px 15px;border-bottom:1px solid rgba(255,255,255,.1)}.art-video-player .art-contextmenus .art-contextmenu span{padding:0 8px}.art-video-player .art-contextmenus .art-contextmenu span:hover,.art-video-player .art-contextmenus .art-contextmenu span.art-current{color:var(--art-theme)}.art-video-player .art-contextmenus .art-contextmenu:hover{background-color:#ffffff1a}.art-video-player .art-contextmenus .art-contextmenu:last-child{border-bottom:none}.art-video-player.art-contextmenu-show .art-contextmenus{display:flex}.art-video-player .art-settings{display:none;flex-direction:column;position:absolute;z-index:90;left:auto;overflow-y:auto;overflow-x:hidden;border-radius:var(--art-border-radius);max-height:var(--art-settings-max-height);right:var(--art-padding);bottom:var(--art-controls-height, var(--art-control-height));transition:all var(--art-transition-duration) ease;background-color:var(--art-widget-background)}.art-video-player .art-settings .art-setting-panel{display:none;flex-direction:column}.art-video-player .art-settings .art-setting-panel.art-current{display:flex}.art-video-player .art-settings .art-setting-panel .art-setting-item{display:flex;justify-content:space-between;align-items:center;gap:5px;padding:0 5px;cursor:pointer;overflow:hidden;transition:background-color var(--art-transition-duration) ease}.art-video-player .art-settings .art-setting-panel .art-setting-item:hover{background-color:#ffffff1a}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current{color:var(--art-theme)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-icon-check{visibility:hidden;height:15px}.art-video-player .art-settings .art-setting-panel .art-setting-item.art-current .art-icon-check{visibility:visible}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left{display:flex;justify-content:center;align-items:center;flex-shrink:1;min-width:0;overflow:hidden;gap:5px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;height:var(--art-settings-icon-size);width:var(--art-settings-icon-size)}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-left .art-setting-item-left-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right{display:flex;justify-content:center;align-items:center;flex-shrink:0;min-width:0;max-width:55%;gap:5px;font-size:12px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-tooltip{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#ffffff80}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-item-right-icon{display:flex;justify-content:center;align-items:center;flex-shrink:0;min-width:32px;height:24px}.art-video-player .art-settings .art-setting-panel .art-setting-item .art-setting-item-right .art-setting-range{height:3px;width:80px;outline:none;appearance:none;background-color:#fff3}.art-video-player .art-settings .art-setting-panel .art-setting-item-back{border-bottom:1px solid rgba(255,255,255,.1)}.art-video-player.art-setting-show .art-settings{display:flex}.art-video-player .art-info{display:none;position:absolute;left:var(--art-padding);top:var(--art-padding);z-index:100;padding:10px;font-size:12px;border-radius:var(--art-border-radius);background-color:var(--art-widget-background)}.art-video-player .art-info .art-info-panel{display:flex;flex-direction:column;gap:5px}.art-video-player .art-info .art-info-panel .art-info-item{display:flex;align-items:center;gap:5px}.art-video-player .art-info .art-info-panel .art-info-item .art-info-title{width:100px;text-align:right}.art-video-player .art-info .art-info-panel .art-info-item .art-info-content{width:250px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;user-select:all}.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:flex}.art-hide-cursor *{cursor:none!important}.art-video-player[data-aspect-ratio]{overflow:hidden}.art-video-player[data-aspect-ratio] .art-video{object-fit:fill;box-sizing:content-box}.art-fullscreen{--art-progress-height: 8px;--art-indicator-size: 20px;--art-control-height: 60px;--art-control-icon-scale: 1.3}.art-fullscreen-web{--art-progress-height: 8px;--art-indicator-size: 20px;--art-control-height: 60px;--art-control-icon-scale: 1.3;position:fixed;inset:0;z-index:var(--art-fullscreen-web-index);width:100%;height:100%}.art-mini-popup{position:fixed;z-index:9999;width:320px;height:180px;max-width:100vw;max-height:100vh;background:#000;border-radius:var(--art-border-radius);cursor:move;user-select:none;overflow:hidden;transition:opacity .2s ease;box-shadow:0 0 5px #00000080}.art-mini-popup svg{fill:#fff}.art-mini-popup .art-video{pointer-events:none}.art-mini-popup .art-mini-close{position:absolute;z-index:20;right:10px;top:10px;cursor:pointer;opacity:0;transition:opacity .2s ease}.art-mini-popup .art-mini-state{position:absolute;inset:0;z-index:30;width:100%;height:100%;display:flex;justify-content:center;align-items:center;pointer-events:none;opacity:0;transition:opacity .2s ease;background-color:#00000040}.art-mini-popup .art-mini-state .art-icon{opacity:.75;cursor:pointer;transform:scale(3);pointer-events:auto;transition:transform .2s ease}.art-mini-popup .art-mini-state .art-icon:active{transform:scale(2.5)}.art-mini-popup.art-mini-dragging{opacity:.9}.art-mini-popup:hover .art-mini-close,.art-mini-popup:focus-within .art-mini-close,.art-mini-popup:hover .art-mini-state,.art-mini-popup:focus-within .art-mini-state{opacity:1}.art-mini-popup [role=button]:focus-visible{outline:2px solid #fff;outline-offset:-2px}.art-video-player[data-flip=horizontal] .art-video{transform:scaleX(-1)}.art-video-player[data-flip=vertical] .art-video{transform:scaleY(-1)}.art-video-player .art-layer-lock{display:none;justify-content:center;align-items:center;position:absolute;top:50%;border-radius:50%;transform:translateY(-50%);height:var(--art-lock-size);width:var(--art-lock-size);left:var(--art-padding);background-color:var(--art-tip-background)}.art-video-player .art-layer-auto-playback{display:none;gap:10px;align-items:center;position:absolute;border-radius:var(--art-border-radius);padding:10px;line-height:1;left:var(--art-padding);bottom:calc(var(--art-controls-height, var(--art-control-height)) + var(--art-bottom-gap) + 10px);background-color:var(--art-widget-background)}.art-video-player .art-layer-auto-playback .art-auto-playback-close{display:flex;justify-content:center;align-items:center;cursor:pointer}.art-video-player .art-layer-auto-playback .art-auto-playback-close svg{width:15px;height:15px;fill:var(--art-theme)}.art-video-player .art-layer-auto-playback .art-auto-playback-jump{color:var(--art-theme);cursor:pointer}.art-video-player.art-lock .art-layer-lock{display:flex}.art-video-player.art-lock:not(.art-control-show) .art-layer-lock{opacity:0;pointer-events:none}.art-video-player.art-lock:not(.art-control-show) .art-layer-lock:focus-within{opacity:1;pointer-events:auto}.art-video-player.art-lock .art-subtitle{bottom:var(--art-subtitle-bottom)!important}.art-video-player.art-mini-progress-bar .art-bottom,.art-video-player.art-lock .art-bottom{opacity:1;padding:0;background-image:none}.art-video-player.art-mini-progress-bar .art-bottom .art-controls,.art-video-player.art-lock .art-bottom .art-controls,.art-video-player.art-mini-progress-bar .art-bottom .art-progress,.art-video-player.art-lock .art-bottom .art-progress{transform:translateY(calc(var(--art-controls-height, var(--art-control-height)) + var(--art-bottom-gap) + var(--art-progress-height) / 4))}.art-video-player.art-mini-progress-bar .art-bottom .art-progress-indicator,.art-video-player.art-lock .art-bottom .art-progress-indicator{display:none!important}.art-video-player.art-control-show .art-layer-lock{display:flex}.art-control-selector{position:relative;display:flex;justify-content:center}.art-control-selector .art-selector-list{display:flex;flex-direction:column;align-items:center;text-align:center;position:absolute;border-radius:var(--art-border-radius);overflow-y:auto;overflow-x:hidden;opacity:0;visibility:hidden;transform:translateY(10px);pointer-events:none;bottom:var(--art-control-height);max-height:var(--art-selector-max-height);background-color:var(--art-widget-background);transition:opacity var(--art-transition-duration) ease,transform var(--art-transition-duration) ease}.art-control-selector .art-selector-list .art-selector-item{display:flex;justify-content:center;align-items:center;width:100%;padding:10px 15px;flex-shrink:0;line-height:1}.art-control-selector .art-selector-list .art-selector-item:hover{background-color:#ffffff1a}.art-control-selector .art-selector-list .art-selector-item:hover,.art-control-selector .art-selector-list .art-selector-item.art-current{color:var(--art-theme)}.art-control-selector:hover:not(.art-selector-dismissed) .art-selector-list,.art-control-selector.art-selector-open .art-selector-list{opacity:1;visibility:visible;transform:translateY(0);pointer-events:auto}.art-video-player [class*=hint--]{position:relative;display:inline-block;font-style:normal}.art-video-player [class*=hint--]:before,.art-video-player [class*=hint--]:after{position:absolute;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);transform:translateZ(0);visibility:hidden;opacity:0;z-index:1000000;pointer-events:none;-webkit-transition:.3s ease;-moz-transition:.3s ease;transition:.3s ease;-webkit-transition-delay:0ms;-moz-transition-delay:0ms;transition-delay:0ms}.art-video-player [class*=hint--]:hover:before,.art-video-player [class*=hint--]:hover:after{visibility:visible;opacity:1}.art-video-player [class*=hint--]:hover:before,.art-video-player [class*=hint--]:hover:after{-webkit-transition-delay:.1s;-moz-transition-delay:.1s;transition-delay:.1s}.art-video-player [class*=hint--]:before{content:"";position:absolute;background:transparent;border:6px solid transparent;z-index:1000001}.art-video-player [class*=hint--]:after{background:#000;color:#fff;padding:8px 10px;font-size:12px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;line-height:12px;white-space:nowrap}.art-video-player [class*=hint--][aria-label]:after{content:attr(aria-label)}.art-video-player [class*=hint--][data-hint]:after{content:attr(data-hint)}.art-video-player [aria-label=""]:before,.art-video-player [aria-label=""]:after,.art-video-player [data-hint=""]:before,.art-video-player [data-hint=""]:after{display:none!important}.art-video-player .hint--top-left:before{border-top-color:#000}.art-video-player .hint--top-right:before{border-top-color:#000}.art-video-player .hint--top:before{border-top-color:#000}.art-video-player .hint--bottom-left:before{border-bottom-color:#000}.art-video-player .hint--bottom-right:before{border-bottom-color:#000}.art-video-player .hint--bottom:before{border-bottom-color:#000}.art-video-player .hint--left:before{border-left-color:#000}.art-video-player .hint--right:before{border-right-color:#000}.art-video-player .hint--top:before{margin-bottom:-11px}.art-video-player .hint--top:before,.art-video-player .hint--top:after{bottom:100%;left:50%}.art-video-player .hint--top:before{left:calc(50% - 6px)}.art-video-player .hint--top:after{-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);transform:translate(-50%)}.art-video-player .hint--top:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--top:hover:after{-webkit-transform:translateX(-50%) translateY(-8px);-moz-transform:translateX(-50%) translateY(-8px);transform:translate(-50%) translateY(-8px)}.art-video-player .hint--bottom:before{margin-top:-11px}.art-video-player .hint--bottom:before,.art-video-player .hint--bottom:after{top:100%;left:50%}.art-video-player .hint--bottom:before{left:calc(50% - 6px)}.art-video-player .hint--bottom:after{-webkit-transform:translateX(-50%);-moz-transform:translateX(-50%);transform:translate(-50%)}.art-video-player .hint--bottom:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--bottom:hover:after{-webkit-transform:translateX(-50%) translateY(8px);-moz-transform:translateX(-50%) translateY(8px);transform:translate(-50%) translateY(8px)}.art-video-player .hint--right:before{margin-left:-11px;margin-bottom:-6px}.art-video-player .hint--right:after{margin-bottom:-14px}.art-video-player .hint--right:before,.art-video-player .hint--right:after{left:100%;bottom:50%}.art-video-player .hint--right:hover:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translate(8px)}.art-video-player .hint--right:hover:after{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translate(8px)}.art-video-player .hint--left:before{margin-right:-11px;margin-bottom:-6px}.art-video-player .hint--left:after{margin-bottom:-14px}.art-video-player .hint--left:before,.art-video-player .hint--left:after{right:100%;bottom:50%}.art-video-player .hint--left:hover:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translate(-8px)}.art-video-player .hint--left:hover:after{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translate(-8px)}.art-video-player .hint--top-left:before{margin-bottom:-11px}.art-video-player .hint--top-left:before,.art-video-player .hint--top-left:after{bottom:100%;left:50%}.art-video-player .hint--top-left:before{left:calc(50% - 6px)}.art-video-player .hint--top-left:after{-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);transform:translate(-100%)}.art-video-player .hint--top-left:after{margin-left:12px}.art-video-player .hint--top-left:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--top-left:hover:after{-webkit-transform:translateX(-100%) translateY(-8px);-moz-transform:translateX(-100%) translateY(-8px);transform:translate(-100%) translateY(-8px)}.art-video-player .hint--top-right:before{margin-bottom:-11px}.art-video-player .hint--top-right:before,.art-video-player .hint--top-right:after{bottom:100%;left:50%}.art-video-player .hint--top-right:before{left:calc(50% - 6px)}.art-video-player .hint--top-right:after{-webkit-transform:translateX(0);-moz-transform:translateX(0);transform:translate(0)}.art-video-player .hint--top-right:after{margin-left:-12px}.art-video-player .hint--top-right:hover:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--top-right:hover:after{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--bottom-left:before{margin-top:-11px}.art-video-player .hint--bottom-left:before,.art-video-player .hint--bottom-left:after{top:100%;left:50%}.art-video-player .hint--bottom-left:before{left:calc(50% - 6px)}.art-video-player .hint--bottom-left:after{-webkit-transform:translateX(-100%);-moz-transform:translateX(-100%);transform:translate(-100%)}.art-video-player .hint--bottom-left:after{margin-left:12px}.art-video-player .hint--bottom-left:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--bottom-left:hover:after{-webkit-transform:translateX(-100%) translateY(8px);-moz-transform:translateX(-100%) translateY(8px);transform:translate(-100%) translateY(8px)}.art-video-player .hint--bottom-right:before{margin-top:-11px}.art-video-player .hint--bottom-right:before,.art-video-player .hint--bottom-right:after{top:100%;left:50%}.art-video-player .hint--bottom-right:before{left:calc(50% - 6px)}.art-video-player .hint--bottom-right:after{-webkit-transform:translateX(0);-moz-transform:translateX(0);transform:translate(0)}.art-video-player .hint--bottom-right:after{margin-left:-12px}.art-video-player .hint--bottom-right:hover:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--bottom-right:hover:after{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--small:after,.art-video-player .hint--medium:after,.art-video-player .hint--large:after{white-space:normal;line-height:1.4em;word-wrap:break-word}.art-video-player .hint--small:after{width:80px}.art-video-player .hint--medium:after{width:150px}.art-video-player .hint--large:after{width:300px}.art-video-player [class*=hint--]:after{text-shadow:0 -1px 0px black;box-shadow:4px 4px 8px #0000004d}.art-video-player .hint--error:after{background-color:#b34e4d;text-shadow:0 -1px 0px #592726}.art-video-player .hint--error.hint--top-left:before{border-top-color:#b34e4d}.art-video-player .hint--error.hint--top-right:before{border-top-color:#b34e4d}.art-video-player .hint--error.hint--top:before{border-top-color:#b34e4d}.art-video-player .hint--error.hint--bottom-left:before{border-bottom-color:#b34e4d}.art-video-player .hint--error.hint--bottom-right:before{border-bottom-color:#b34e4d}.art-video-player .hint--error.hint--bottom:before{border-bottom-color:#b34e4d}.art-video-player .hint--error.hint--left:before{border-left-color:#b34e4d}.art-video-player .hint--error.hint--right:before{border-right-color:#b34e4d}.art-video-player .hint--warning:after{background-color:#c09854;text-shadow:0 -1px 0px #6c5328}.art-video-player .hint--warning.hint--top-left:before{border-top-color:#c09854}.art-video-player .hint--warning.hint--top-right:before{border-top-color:#c09854}.art-video-player .hint--warning.hint--top:before{border-top-color:#c09854}.art-video-player .hint--warning.hint--bottom-left:before{border-bottom-color:#c09854}.art-video-player .hint--warning.hint--bottom-right:before{border-bottom-color:#c09854}.art-video-player .hint--warning.hint--bottom:before{border-bottom-color:#c09854}.art-video-player .hint--warning.hint--left:before{border-left-color:#c09854}.art-video-player .hint--warning.hint--right:before{border-right-color:#c09854}.art-video-player .hint--info:after{background-color:#3986ac;text-shadow:0 -1px 0px #1a3c4d}.art-video-player .hint--info.hint--top-left:before{border-top-color:#3986ac}.art-video-player .hint--info.hint--top-right:before{border-top-color:#3986ac}.art-video-player .hint--info.hint--top:before{border-top-color:#3986ac}.art-video-player .hint--info.hint--bottom-left:before{border-bottom-color:#3986ac}.art-video-player .hint--info.hint--bottom-right:before{border-bottom-color:#3986ac}.art-video-player .hint--info.hint--bottom:before{border-bottom-color:#3986ac}.art-video-player .hint--info.hint--left:before{border-left-color:#3986ac}.art-video-player .hint--info.hint--right:before{border-right-color:#3986ac}.art-video-player .hint--success:after{background-color:#458746;text-shadow:0 -1px 0px #1a321a}.art-video-player .hint--success.hint--top-left:before{border-top-color:#458746}.art-video-player .hint--success.hint--top-right:before{border-top-color:#458746}.art-video-player .hint--success.hint--top:before{border-top-color:#458746}.art-video-player .hint--success.hint--bottom-left:before{border-bottom-color:#458746}.art-video-player .hint--success.hint--bottom-right:before{border-bottom-color:#458746}.art-video-player .hint--success.hint--bottom:before{border-bottom-color:#458746}.art-video-player .hint--success.hint--left:before{border-left-color:#458746}.art-video-player .hint--success.hint--right:before{border-right-color:#458746}.art-video-player .hint--always:after,.art-video-player .hint--always:before{opacity:1;visibility:visible}.art-video-player .hint--always.hint--top:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--always.hint--top:after{-webkit-transform:translateX(-50%) translateY(-8px);-moz-transform:translateX(-50%) translateY(-8px);transform:translate(-50%) translateY(-8px)}.art-video-player .hint--always.hint--top-left:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--always.hint--top-left:after{-webkit-transform:translateX(-100%) translateY(-8px);-moz-transform:translateX(-100%) translateY(-8px);transform:translate(-100%) translateY(-8px)}.art-video-player .hint--always.hint--top-right:before{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--always.hint--top-right:after{-webkit-transform:translateY(-8px);-moz-transform:translateY(-8px);transform:translateY(-8px)}.art-video-player .hint--always.hint--bottom:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--always.hint--bottom:after{-webkit-transform:translateX(-50%) translateY(8px);-moz-transform:translateX(-50%) translateY(8px);transform:translate(-50%) translateY(8px)}.art-video-player .hint--always.hint--bottom-left:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--always.hint--bottom-left:after{-webkit-transform:translateX(-100%) translateY(8px);-moz-transform:translateX(-100%) translateY(8px);transform:translate(-100%) translateY(8px)}.art-video-player .hint--always.hint--bottom-right:before{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--always.hint--bottom-right:after{-webkit-transform:translateY(8px);-moz-transform:translateY(8px);transform:translateY(8px)}.art-video-player .hint--always.hint--left:before{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translate(-8px)}.art-video-player .hint--always.hint--left:after{-webkit-transform:translateX(-8px);-moz-transform:translateX(-8px);transform:translate(-8px)}.art-video-player .hint--always.hint--right:before{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translate(8px)}.art-video-player .hint--always.hint--right:after{-webkit-transform:translateX(8px);-moz-transform:translateX(8px);transform:translate(8px)}.art-video-player .hint--rounded:after{border-radius:4px}.art-video-player .hint--no-animate:before,.art-video-player .hint--no-animate:after{-webkit-transition-duration:0ms;-moz-transition-duration:0ms;transition-duration:0ms}.art-video-player .hint--bounce:before,.art-video-player .hint--bounce:after{-webkit-transition:opacity .3s ease,visibility .3s ease,-webkit-transform .3s cubic-bezier(.71,1.7,.77,1.24);-moz-transition:opacity .3s ease,visibility .3s ease,-moz-transform .3s cubic-bezier(.71,1.7,.77,1.24);transition:opacity .3s ease,visibility .3s ease,transform .3s cubic-bezier(.71,1.7,.77,1.24)}.art-video-player .hint--no-shadow:before,.art-video-player .hint--no-shadow:after{text-shadow:initial;box-shadow:initial}.art-video-player .hint--no-arrow:before{display:none}.art-video-player.art-mobile{--art-bottom-gap: 10px;--art-control-height: 38px;--art-control-icon-scale: 1;--art-state-size: 60px;--art-settings-max-height: 180px;--art-selector-max-height: 180px;--art-indicator-scale: 1;--art-control-opacity: 1}.art-video-player.art-mobile .art-controls-left{margin-left:calc(var(--art-padding) / -1)}.art-video-player.art-mobile .art-controls-right{margin-right:calc(var(--art-padding) / -1)}.art-video-player [tabindex]:focus-visible,.art-video-player input:focus-visible,.art-video-player button:focus-visible,.art-video-player a:focus-visible{outline:2px solid currentColor;outline-offset:-2px}.art-video-player.art-keyboard-focus :focus{outline:2px solid currentColor;outline-offset:-2px}.art-video-player.art-keyboard-focus:not(.art-lock) .art-bottom{opacity:1}.art-video-player.art-keyboard-focus:not(.art-lock) .art-bottom .art-controls,.art-video-player.art-keyboard-focus:not(.art-lock) .art-bottom .art-progress{transform:translateY(0)}';class io{constructor(t){var e;this.scope=t.child(),this.cancelled=new Promise(t=>{this.scope.add(()=>{t(void 0)})}),this.signal=null==(e=function(t){if("undefined"===typeof AbortController)return;const e=new AbortController;return t.add(()=>{e.abort()}),e}(this.scope))?void 0:e.signal}get active(){return!this.scope.closed}cancel(){this.scope.dispose()}run(t){return c(this,null,function*(){if(this.active)try{return yield Promise.race([t(),this.cancelled])}finally{this.cancel()}})}}const ao=new WeakMap;function so(t){return ao.get(t)}function lo(t){const e=t.ownedURL;t.ownedURL=void 0,e&&URL.revokeObjectURL(e)}const co=Zt;class uo extends co{constructor(t){super(t),this.name="subtitle",this.option=null,this.destroyEvent=()=>null;const e=function(t,e){const r=P(e).child(),n={scope:r,revision:0,render:0,trackRevision:0};return ao.set(t,n),r.add(()=>{lo(n)}),n}(this,t);this.init(t.option.subtitle).catch(()=>{});let r=!1;const n=()=>{if(e.scope.closed||!this.url)return;const n=t.template.$video.webkitDisplayingFullscreen;"boolean"===typeof n&&n!==r&&(r=n,this.createTrack(n?"subtitles":"metadata",this.url))};t.on("video:timeupdate",n),e.scope.add(()=>{t.off("video:timeupdate",n)})}get url(){return this.art.template.$track.src}set url(t){this.switch(t).catch(()=>{})}get textTrack(){var t,e;return null==(e=null==(t=this.art.template.$video)?void 0:t.textTracks)?void 0:e[0]}get activeCues(){var t;return Array.from((null==(t=this.textTrack)?void 0:t.activeCues)||[])}get cues(){var t;return Array.from((null==(t=this.textTrack)?void 0:t.cues)||[])}style(t,e){const{$subtitle:r}=this.art.template;return"object"===typeof t?rt(r,t):et(r,t,e)}update(){!function(t){const e=so(t);if(e.scope.closed)return;const r=e.revision,n=++e.render,o=()=>!e.scope.closed&&e.revision===r&&e.render===n,{art:i}=t,{$subtitle:a}=i.template;if(a.innerHTML="",!t.activeCues.length)return;if(i.emit("subtitleBeforeUpdate",t.activeCues),!o())return;const s=t.activeCues.map((t,e)=>t.text.split(/\r?\n/).filter(t=>t.trim()).map(t=>`<div class="art-subtitle-line" data-group="${e}">\n ${i.option.subtitle.escape?mt(t):t}\n </div>`).join("")).join("");o()&&(a.innerHTML=s,i.emit("subtitleAfterUpdate",t.activeCues))}(this)}switch(t){return c(this,arguments,function*(t,e={}){const{i18n:r,notice:n,option:o}=this.art,i=l(s(s({},o.subtitle),e),{url:t}),a=so(this),c=a.revision+1,d=yield this.init(i);return!a.scope.closed&&a.revision===c&&e.name&&(n.show=`${r.get("Switch Subtitle")}: ${e.name}`),d})}createTrack(t,e){!function(t,e,r){const n=so(t);if(n.scope.closed)return;const o=++n.trackRevision,{art:i}=t,{template:a}=i,s=a.$track,l=s.parentNode,c=s.nextSibling,d=document.createElement("track"),u=n.scope.child();u.add(()=>{d.onload=null,d.onerror=null});let p=!1;try{if(d.default=!0,d.kind=e,d.src=r,d.label=i.option.subtitle.name||"Artplayer",d.track.mode="hidden",d.onload=()=>{u.closed||a.$track!==d||i.emit("subtitleLoad",t.cues,t.option)},d.onerror=()=>{u.closed||a.$track!==d||(i.notice.show=new Error("Failed to load subtitle track"))},u.closed||n.trackRevision!==o)return void u.dispose();s.remove(),a.$video.appendChild(d),a.$track=d;const l=t.textTrack,c=l?i.proxy(l,"cuechange",()=>{u.closed||a.$track!==d||t.update()}):()=>{};if(u.add(()=>{i.events.remove(c)}),u.closed||n.trackRevision!==o)return u.dispose(),void d.remove();const f=n.track;n.track=u,t.destroyEvent=c,s.onload=null,s.onerror=null,p=!0;try{null==f||f.dispose()}finally{n.ownedURL&&n.ownedURL!==r&&lo(n)}}catch(f){if(p)throw f;if(u.dispose(),d.remove(),n.scope.closed||n.trackRevision!==o)throw f;throw a.$track=s,l&&l.insertBefore(s,(null==c?void 0:c.parentNode)===l?c:null),f}}(this,t,e)}init(t){return c(this,null,function*(){const e=so(this),r=function(t){const e=t.request,r=new io(t.scope);return t.request=r,t.revision+=1,null==e||e.cancel(),r}(e),{notice:n,template:{$subtitle:o}}=this.art;return r.run(()=>c(this,null,function*(){if(!this.textTrack)return null;if(h(t,Gt.subtitle),!t.url)return;let i;this.option=t,this.style(t.style);try{if(!r.active)return;const n=yield fetch(t.url,{signal:r.signal});if(!r.active)return;if(!n.ok)throw new Error(`Failed to load subtitle: ${n.status} ${n.statusText}`);const a=yield n.arrayBuffer();if(!r.active)return;const s=function(t,e){const r=new TextDecoder(e.encoding).decode(t);switch(e.type||st(e.url)){case"srt":return{vtt:e.onVttLoad(xt(r))};case"ass":return{vtt:e.onVttLoad($t(r))};case"vtt":return{vtt:e.onVttLoad(r)};default:return}}(a,t);if(!r.active)return;const l=void 0===s?t.url:i=kt(s.vtt);if(!r.active)return;o.innerHTML="";const c=e.trackRevision+1;if(this.url!==l&&this.createTrack("metadata",l),!r.active||e.trackRevision>c)return;return i&&(e.ownedURL=i,i=void 0),l}catch(a){if(!r.active)return;throw o.innerHTML="",n.show=a,a}finally{i&&(e.scope.closed||this.url!==i?URL.revokeObjectURL(i):e.ownedURL=i)}}))})}}const po=`\n <div class="art-video-player art-subtitle-show art-layer-show art-control-show art-mask-show">\n <video class="art-video">\n <track default kind="metadata" src=""></track>\n </video>\n <div class="art-poster"></div>\n <div class="art-subtitle"></div>\n <div class="art-danmuku"></div>\n <div class="art-layers"></div>\n <div class="art-mask">\n <div class="art-state"></div>\n </div>\n <div class="art-bottom">\n <div class="art-progress"></div>\n <div class="art-controls">\n <div class="art-controls-left"></div>\n <div class="art-controls-center"></div>\n <div class="art-controls-right"></div>\n </div>\n </div>\n <div class="art-loading"></div>\n <div class="art-notice">\n <div class="art-notice-inner"></div>\n </div>\n <div class="art-settings"></div>\n <div class="art-info">\n <div class="art-info-panel">\n <div class="art-info-item">\n <div class="art-info-title">Player version:</div>\n <div class="art-info-content">${m}</div>\n </div>\n <div class="art-info-item">\n <div class="art-info-title">Video url:</div>\n <div class="art-info-content" data-video="currentSrc"></div>\n </div>\n <div class="art-info-item">\n <div class="art-info-title">Video volume:</div>\n <div class="art-info-content" data-video="volume"></div>\n </div>\n <div class="art-info-item">\n <div class="art-info-title">Video time:</div>\n <div class="art-info-content" data-video="currentTime"></div>\n </div>\n <div class="art-info-item">\n <div class="art-info-title">Video duration:</div>\n <div class="art-info-content" data-video="duration"></div>\n </div>\n <div class="art-info-item">\n <div class="art-info-title">Video resolution:</div>\n <div class="art-info-content">\n <span data-video="videoWidth"></span> x <span data-video="videoHeight"></span>\n </div>\n </div>\n </div>\n <div class="art-info-close">[x]</div>\n </div>\n <div class="art-contextmenus"></div>\n </div>\n `;class fo{constructor(t){this.art=t;const{option:e,constructor:r}=t;e.container instanceof Element?this.$container=e.container:(this.$container=H(e.container),it(this.$container,`No container element found by ${e.container}`)),it(V(),"The current browser does not support flex layout");const n=this.$container.tagName.toLowerCase();it("div"===n,`Unsupported container element type, only support 'div' but got '${n}'`),it(r.instances.every(t=>t.template.$container!==this.$container),"Cannot mount multiple instances on the same dom element"),this.query=this.query.bind(this),function(t,e,r){const n=T.get(e);if(n&&n!==t)throw new Error("Cannot mount multiple instances on the same dom element");const o=L(t);o.rollback=r,T.set(e,t),o.releaseContainer=()=>{T.get(e)===t&&T.delete(e)}}(t,this.$container,qn(this.$container)),function(t,e,r){const n=L(t),o=n.mountingTemplate;n.mountingTemplate=e;try{r()}finally{n.mountingTemplate=o}}(t,this,()=>{this.$container.dataset.artId=String(t.id),this.init()})}static get html(){return po}query(t){return H(t,this.$container)}init(){const{option:t}=this.art;var e;if(t.useSSR||(this.$container.innerHTML=fo.html),(e=this).$player=e.query(".art-video-player"),e.$video=e.query(".art-video"),e.$track=e.query("track"),e.$poster=e.query(".art-poster"),e.$subtitle=e.query(".art-subtitle"),e.$danmuku=e.query(".art-danmuku"),e.$bottom=e.query(".art-bottom"),e.$progress=e.query(".art-progress"),e.$controls=e.query(".art-controls"),e.$controlsLeft=e.query(".art-controls-left"),e.$controlsCenter=e.query(".art-controls-center"),e.$controlsRight=e.query(".art-controls-right"),e.$layer=e.query(".art-layers"),e.$loading=e.query(".art-loading"),e.$notice=e.query(".art-notice"),e.$noticeInner=e.query(".art-notice-inner"),e.$mask=e.query(".art-mask"),e.$state=e.query(".art-state"),e.$setting=e.query(".art-settings"),e.$info=e.query(".art-info"),e.$infoPanel=e.query(".art-info-panel"),e.$infoClose=e.query(".art-info-close"),e.$contextmenu=e.query(".art-contextmenus"),t.proxy){const e=t.proxy.call(this.art,this.art);if(M(this.art))return;!function(t){it(t instanceof HTMLVideoElement||t instanceof HTMLCanvasElement,"Function 'option.proxy' needs to return 'HTMLVideoElement' or 'HTMLCanvasElement'")}(e),Z(e,this.$video),e.className="art-video",this.$video=e}t.backdrop&&j(this.$player,"art-backdrop"),k&&j(this.$player,"art-mobile")}destroy(t){t?this.$container.innerHTML="":j(this.$player,"art-destroy")}}const ho=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);class mo{on(t,e,r){const n=this.e||(this.e={});let o=ho(n,t)?n[t]:void 0;return o||(o=[],Object.defineProperty(n,t,{value:o,enumerable:!0,configurable:!0,writable:!0})),o.push({fn:e,ctx:r}),this}once(t,e,r){const n=this,o=e;let i=!1;function a(...e){i||(i=!0,n.off(t,a),o.apply(r,e))}return a._=e,this.on(t,a,r)}emit(t,...e){const r=this.e||(this.e={}),n=(ho(r,t)&&r[t]||[]).slice();for(const o of n)o.fn.apply(o.ctx,e);return this}off(t,e){const r=this.e||(this.e={}),n=ho(r,t)?r[t]:void 0,o=[];if(n&&e)for(let i=0,a=n.length;i<a;i+=1){const t=n[i];t.fn!==e&&t.fn._!==e&&o.push(t)}return o.length?r[t]=o:delete r[t],this}}let vo=0;const go=[];class yo extends mo{constructor(t,e){if(super(),!$)throw new Error("Artplayer can only be used in the browser environment");this.id=++vo,this.option=cr(t,yo.option),this.isLock=!1,this.isReady=!1,this.isFocus=!1,this.isInput=!1,this.isRotate=!1,this.isDestroy=!1,function(t){const e={scope:new C,finalizers:new C,destroying:!1};S.set(t,e),e.scope.add(()=>{e.destroying||e.finalizers.dispose()})}(this);try{if(this.template=new fo(this),P(this).closed)return;if(this.events=new Be(this),P(this).closed)return;if(this.storage=new no,P(this).closed)return;if(this.icons=new Je(this),P(this).closed)return;if(this.i18n=new Ke(this),P(this).closed)return;if(this.notice=new lr(this),P(this).closed)return;if(this.player=new qr(this),P(this).closed)return;if(this.layers=new nr(this),P(this).closed)return;if(this.controls=new Re(this),P(this).closed)return;if(this.contextmenu=new ie(this),P(this).closed)return;if(this.subtitle=new uo(this),P(this).closed)return;if(this.info=new rr(this),P(this).closed)return;if(this.loading=new or(this),P(this).closed)return;if(this.hotkey=new Xe(this),P(this).closed)return;if(this.mask=new ir(this),P(this).closed)return;if(this.setting=new ro(this),P(this).closed)return;if(this.plugins=new sn(this),P(this).closed)return;if("function"===typeof e&&this.on("ready",()=>e.call(this,this)),yo.DEBUG){const t=t=>console.log(`[ART.${this.id}] -> ${t}`);t(`Version@${yo.version}`);for(let e=0;e<E.events.length;e++)this.on(`video:${E.events[e]}`,e=>t(`Event@${e.type}`))}(function(t){const e=L(t);return e.rollback=void 0,!e.scope.closed})(this)&&go.push(this)}catch(r){try{z(this,go,!0,yo.REMOVE_SRC_WHEN_DESTROY,!0)}catch(n){console.warn("Failed to clean up ArtPlayer initialization:",n)}throw r}}static get instances(){return go}static get version(){return m}static get config(){return E}static get utils(){return Et}static get scheme(){return Gt}static get Emitter(){return mo}static get validator(){return h}static get kindOf(){return h.kindOf}static get html(){return fo.html}static get option(){return{id:"",container:"#artplayer",url:"",poster:"",type:"",theme:"#f00",volume:.7,isLive:!1,muted:!1,autoplay:!1,autoSize:!1,autoMini:!1,loop:!1,flip:!1,playbackRate:!1,aspectRatio:!1,screenshot:!1,setting:!1,hotkey:!0,pip:!1,mutex:!0,backdrop:!0,fullscreen:!1,fullscreenWeb:!1,subtitleOffset:!1,miniProgressBar:!1,useSSR:!1,playsInline:!0,lock:!1,gesture:!0,fastForward:!1,autoPlayback:!1,autoOrientation:!1,airplay:!1,proxy:void 0,layers:[],contextmenu:[],controls:[],settings:[],quality:[],highlight:[],plugins:[],thumbnails:{url:"",number:60,column:10,width:0,height:0,scale:1},subtitle:{url:"",type:"",style:{},name:"",escape:!0,encoding:"utf-8",onVttLoad:t=>t},moreVideoAttr:{controls:!1,preload:b?"auto":"metadata"},i18n:{},icons:{},cssVar:{},customType:{},lang:"undefined"===typeof navigator||null==navigator?void 0:navigator.language.toLowerCase()}}get proxy(){return this.events.proxy}get query(){return this.template.query}get video(){return this.template.$video}reset(){this.video.removeAttribute("src"),this.video.load()}destroy(t=!0){z(this,go,t,yo.REMOVE_SRC_WHEN_DESTROY)}}var bo,wo;return yo.STYLE=oo,yo.DEBUG=!1,yo.CONTEXTMENU=!0,yo.NOTICE_TIME=2e3,yo.SETTING_WIDTH=250,yo.SETTING_ITEM_WIDTH=200,yo.SETTING_ITEM_HEIGHT=35,yo.RESIZE_TIME=200,yo.SCROLL_TIME=200,yo.SCROLL_GAP=50,yo.AUTO_PLAYBACK_MAX=10,yo.AUTO_PLAYBACK_MIN=5,yo.AUTO_PLAYBACK_TIMEOUT=3e3,yo.RECONNECT_TIME_MAX=5,yo.RECONNECT_SLEEP_TIME=1e3,yo.CONTROL_HIDE_TIME=3e3,yo.DBCLICK_TIME=300,yo.DBCLICK_FULLSCREEN=!0,yo.MOBILE_DBCLICK_PLAY=!0,yo.MOBILE_CLICK_PLAY=!1,yo.AUTO_ORIENTATION_TIME=200,yo.INFO_LOOP_TIME=1e3,yo.FAST_FORWARD_VALUE=3,yo.FAST_FORWARD_TIME=1e3,yo.TOUCH_MOVE_RATIO=.5,yo.VOLUME_STEP=.1,yo.SEEK_STEP=5,yo.PLAYBACK_RATE=[.5,.75,1,1.25,1.5,2],yo.ASPECT_RATIO=["default","4:3","16:9"],yo.FLIP=["normal","horizontal","vertical"],yo.FULLSCREEN_WEB_IN_BODY=!0,yo.LOG_VERSION=!0,yo.USE_RAF=!1,yo.REMOVE_SRC_WHEN_DESTROY=!0,bo=yo,wo=oo,$&&(window.Artplayer=bo,v("artplayer-style",wo),setTimeout(()=>{bo.LOG_VERSION&&console.log(`%c ArtPlayer %c ${bo.version} %c https://artplayer.org`,"color: #fff; background: #5f5f5f","color: #fff; background: #4bc729","")},100)),yo});